src
└── spfx
└── spfx-solution-01
└── spfx-solution-02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="documentTreeInjection"></div> | |
| <script src="https://code.jquery.com/jquery-3.4.1.min.js" | |
| integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> | |
| <script> | |
| // change path to app url | |
| $.getScript("/sites/00053/Privat/DokumentBaum/DocumentTree/components/DocumentTree.js").then(function () { | |
| injectDocumentTreeComponent( | |
| "documentTreeInjection", { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * UI | |
| */ | |
| function renderDocumentTree(treeData) { | |
| var html = ""; | |
| html += "<div class='document-tree'>"; | |
| html += renderItems(treeData.children); | |
| html += "</div>"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Converts a list to tree structure | |
| * @param {Array} list - list of items with [id], [parentId], [children] | |
| */ | |
| function list_to_tree(list) { | |
| var map = {}, node, roots = [], i; | |
| for (i = 0; i < list.length; i += 1) { | |
| map[list[i].id] = i; // initialize the map | |
| list[i].children = []; // initialize the children | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function _httpGet(url) { | |
| return $.ajax({ | |
| type: "GET", | |
| url: url, | |
| crossDomain: true, | |
| contentType: "application/json;odata=verbose", | |
| dataType: "json", | |
| success: function (data) { | |
| return data; | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* sort by folder and name */ | |
| _merged.sort(function (a, b) { | |
| if (a.type == "Folder" && b.type != "Folder") return -1; | |
| if (a.type != "Folder" && b.type == "Folder") return 1; | |
| return a.name.localeCompare(b.name); | |
| return 0; | |
| }); |
Ecmascript Standard Repo:
https://github.com/tc39/ecma262
all settings
https://{TENANT}/sites/{SITE}/_layouts/15/settings.aspx
termstore
https://{TENANT}/sites/{SITE}/_layouts/15/termstoremanager.aspx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- data-interception="off" --> | |
| <Link href={someLinkUrl} target="_blank" data-interception="off">Link</Link> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface IField { | |
| type: string; | |
| message: string; | |
| } | |
| /** | |
| * Fields - with validation type and message | |
| */ | |
| export const Fields: { [key: string]: IField } = { |