Skip to content

Instantly share code, notes, and snippets.

@precyx
precyx / webpart-component.ts
Last active June 9, 2020 06:41
Basic SPFx Webpart Setup: -
import * as React from "react";
import * as ReactDom from "react-dom";
import { Version } from "@microsoft/sp-core-library";
import { BaseClientSideWebPart } from "@microsoft/sp-webpart-base";
import { initializeIcons } from "@uifabric/icons";
import { sp } from "@pnp/sp";
// property pane
import { IPropertyPaneConfiguration, PropertyPaneTextField } from "@microsoft/sp-property-pane"; //prettier-ignore
@precyx
precyx / Stack.tsx
Created May 11, 2020 08:13
Basic Stack component - styled with styled components
import React from "react";
import styled, { css } from "styled-components";
export enum Orientation {
HORIZONTAL = "horizontal",
VERTICAL = "vertical"
}
export interface StackProps {
children: any;

Release Notes

[1.0.4] - 2020-04-30

  • Dokument veröffentlichen: Aktuell eingeloggter Benutzer wird an Service mitgeschickt.

[1.0.3] - 2020-04-07

  • "PDF erzeugen" Checkbox ist neu nur bei Word-Dokumenten aktivierbar
<!-- Render URL's of Url Filetype correctly -->
{{#eq FileType 'url'}}
{{getUrl item}}
{{else}}
http://{{Title}}
{{/eq}}
<!-- Render last user of Authr field -->
@precyx
precyx / generate_office_app_links.ts
Last active March 28, 2024 09:35
Generate Office App Links for: - Word - Powerpoint - Excel - Visio - Project - Publisher
let _relativeLibraryUrl = this.context.pageContext.list.serverRelativeUrl
.replace(this.context.pageContext.web.serverRelativeUrl, "")
.replace(/(^\/+|\/+$)/g, ""); // match all start and end occurances of '/' character
import { SPHttpClient } from "@pnp/sp";
import { BaseComponentContext } from '@microsoft/sp-component-base';
export interface IHttpResponseValue {
parameter: string;
}
export const getList = async (context: BaseComponentContext, listName: string): Promise<any> => {
var http = new SPHttpClient();
var baseUrl = context.pageContext.web.absoluteUrl;

Changelog

All notable changes to this solution and its webparts/extensions will be documented in this file.
Solution: VisualMetadataNavigation
Webparts: visualMetadataNavigation, filterableDokumentList, vmnDetail

TODO

[Readability,Accessability]

  • visualMetadataNavigation: Add visual selected style to items on click/select
<CustomAction
Title="PublishDocuments"
RegistrationId="0x010100321566DF2DF30743A6241CE8C2AC7FEB000C4BE455A288CE4CBAAAC624CDA70FFC"
RegistrationType="ContentType"
Location="ClientSideExtension.ListViewCommandSet.CommandBar"
ClientSideComponentId="5800008d-fac6-4e2b-b855-36239bc25776"
ClientSideComponentProperties="{&quot;sampleTextOne&quot;:&quot;One item is selected in the list.&quot;, &quot;sampleTextTwo&quot;:&quot;This command is always visible.&quot;}">
</CustomAction>