- Contains a package of one or multiple:
webpartslibrariesapplicationCustomizerscommandSetsfieldCustomizers
- Components, that can be added to any site
- Enables code sharing inside of a Solution
| import * as React from 'react'; | |
| import * as ReactDOM from 'react-dom'; | |
| import { DialogContent } from 'office-ui-fabric-react'; | |
| import { BaseDialog, IDialogConfiguration } from '@microsoft/sp-dialog'; | |
| import { BaseComponentContext } from '@microsoft/sp-component-base'; | |
| export default class CustomDialog extends BaseDialog { | |
| public context: BaseComponentContext; | |
| public render(): void { |
| import { SPHttpClient } from "@pnp/sp"; | |
| import { IWebPartContext } from "@microsoft/sp-webpart-base"; | |
| import { UrlHelper } from "../helpers/UrlHelper"; | |
| export interface SearchParams { | |
| querytext: string; | |
| rowlimit?: number; | |
| trimduplicates?: boolean; | |
| } |
| import { DatePicker } from "office-ui-fabric-react/lib/DatePicker"; | |
| <div className={styles.row}> | |
| <DatePicker | |
| label="Freigabe am" | |
| isRequired={true} | |
| strings={{ | |
| ...DayPickerStrings, | |
| isRequiredErrorMessage: formErrors.publishOn, |
| const express = require("express"); | |
| const cors = require("cors"); | |
| const mongoose = require("mongoose"); | |
| require("dotenv").config(); | |
| const app = express(); | |
| const port = process.env.PORT || 5200; | |
| // express middleware |
| // Function | |
| let fn:() => number = function(){} | |
| /** | |
| * http get request with success and fail callback | |
| * handles xml and json data | |
| */ | |
| function httpGet(url, onSuccess, onFail){ | |
| var request = new XMLHttpRequest(); | |
| request.open('GET', url, true); | |
| //request.setRequestHeader('Accept', 'application/json;odata=nometadata'); | |
| //request.setRequestHeader('Content-Type', 'application/json;odata=nometadata'); |
| function parseXMLValue(xmlString, nodeName){ | |
| var parser, xmlDoc; | |
| var _xmlString = xmlString || ""; | |
| var _nodeName = nodeName || ""; | |
| if (window.DOMParser) { | |
| parser = new DOMParser(); | |
| xmlDoc = parser.parseFromString(_xmlString,"text/xml"); | |
| } else { | |
| xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); |
| /** | |
| * Display Template managed properties | |
| **/ | |
| var webAbsoluteUrl = _spPageContextInfo.webAbsoluteUrl || ""; | |
| var path = ctx.CurrentItem.Path || ""; | |
| var fileName = calcFilename(path); | |
| var majorVersion = ctx.CurrentItem.UIVersionStringOWSTEXT || ""; | |
| var id = ctx.ClientControl.get_nextUniqueId(); | |
| var linkId = id + "link_id"; |