@mikezimm/fps-library-v2 2.0.59 → 2.0.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/molecules/FPSTiles/functions/HubsSubs/buildFPSTileItems.d.ts +1 -1
- package/lib/components/molecules/FPSTiles/functions/HubsSubs/buildFPSTileItems.d.ts.map +1 -1
- package/lib/components/molecules/FPSTiles/functions/HubsSubs/makeFPSSubHubTiles.d.ts +1 -1
- package/lib/components/molecules/FPSTiles/functions/HubsSubs/makeFPSSubHubTiles.d.ts.map +1 -1
- package/lib/components/molecules/FPSTiles/functions/getFPSHubTiles.d.ts +2 -2
- package/lib/components/molecules/FPSTiles/functions/getFPSHubTiles.d.ts.map +1 -1
- package/lib/components/molecules/FPSTiles/functions/getFPSHubTiles.js +2 -2
- package/lib/components/molecules/FPSTiles/functions/getFPSHubTiles.js.map +1 -1
- package/lib/components/molecules/FPSTiles/functions/getFPSItemTiles.d.ts +1 -1
- package/lib/components/molecules/FPSTiles/functions/getFPSItemTiles.d.ts.map +1 -1
- package/lib/components/molecules/FPSTiles/functions/getFPSItemTiles.js +4 -3
- package/lib/components/molecules/FPSTiles/functions/getFPSItemTiles.js.map +1 -1
- package/lib/components/molecules/FPSTiles/functions/getFPSLinkList.d.ts +1 -1
- package/lib/components/molecules/FPSTiles/functions/getFPSLinkList.d.ts.map +1 -1
- package/lib/components/molecules/FPSTiles/functions/getFPSLinkList.js +4 -3
- package/lib/components/molecules/FPSTiles/functions/getFPSLinkList.js.map +1 -1
- package/lib/components/molecules/FPSTiles/functions/getFPSLinkListMultiple.js +2 -2
- package/lib/components/molecules/FPSTiles/functions/getFPSLinkListMultiple.js.map +1 -1
- package/lib/components/molecules/FPSTiles/functions/getFPSListTiles.d.ts +1 -1
- package/lib/components/molecules/FPSTiles/functions/getFPSListTiles.d.ts.map +1 -1
- package/lib/components/molecules/FPSTiles/functions/getFPSListTiles.js +7 -3
- package/lib/components/molecules/FPSTiles/functions/getFPSListTiles.js.map +1 -1
- package/lib/components/molecules/FPSTiles/functions/getFPSWebTiles.d.ts +1 -1
- package/lib/components/molecules/FPSTiles/functions/getFPSWebTiles.d.ts.map +1 -1
- package/lib/components/molecules/FPSTiles/functions/getFPSWebTiles.js +2 -2
- package/lib/components/molecules/FPSTiles/functions/getFPSWebTiles.js.map +1 -1
- package/lib/components/molecules/FieldPanel/components/fetch/funcions.d.ts.map +1 -1
- package/lib/components/molecules/FieldPanel/components/fetch/funcions.js.map +1 -1
- package/lib/components/molecules/ModernPages/ModernPages.js +5 -5
- package/lib/components/molecules/ModernPages/ModernPages.js.map +1 -1
- package/lib/components/molecules/ModernPages/SinglePage/SingleModernPage.js +3 -3
- package/lib/components/molecules/ModernPages/SinglePage/SingleModernPage.js.map +1 -1
- package/lib/components/molecules/ModernPages/SinglePage/getModernContent.d.ts +13 -1
- package/lib/components/molecules/ModernPages/SinglePage/getModernContent.d.ts.map +1 -1
- package/lib/components/molecules/ModernPages/SinglePage/getModernContent.js +18 -6
- package/lib/components/molecules/ModernPages/SinglePage/getModernContent.js.map +1 -1
- package/lib/components/molecules/ModernPages/SinglePage/processModernContent.d.ts +0 -29
- package/lib/components/molecules/ModernPages/SinglePage/processModernContent.d.ts.map +1 -1
- package/lib/components/molecules/ModernPages/SinglePage/processModernContent.js +194 -204
- package/lib/components/molecules/ModernPages/SinglePage/processModernContent.js.map +1 -1
- package/lib/components/molecules/SpHttp/HubSiteData/fetchMyHubNav.d.ts +7 -5
- package/lib/components/molecules/SpHttp/HubSiteData/fetchMyHubNav.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/HubSiteData/fetchMyHubNav.js +3 -1
- package/lib/components/molecules/SpHttp/HubSiteData/fetchMyHubNav.js.map +1 -1
- package/lib/components/molecules/SpHttp/HubSiteData/interface.d.ts +17 -6
- package/lib/components/molecules/SpHttp/HubSiteData/interface.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/fetches/fetchMyHubsSubs.d.ts +10 -13
- package/lib/components/molecules/SpHttp/HubsSubs/fetches/fetchMyHubsSubs.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/fetches/fetchMyHubsSubs.js +64 -39
- package/lib/components/molecules/SpHttp/HubsSubs/fetches/fetchMyHubsSubs.js.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/fetches/fetchMyHubsites.d.ts +23 -15
- package/lib/components/molecules/SpHttp/HubsSubs/fetches/fetchMyHubsites.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/fetches/fetchMyHubsites.js +81 -63
- package/lib/components/molecules/SpHttp/HubsSubs/fetches/fetchMyHubsites.js.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/fetches/fetchMySubsites.d.ts +25 -3
- package/lib/components/molecules/SpHttp/HubsSubs/fetches/fetchMySubsites.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/fetches/fetchMySubsites.js +58 -44
- package/lib/components/molecules/SpHttp/HubsSubs/fetches/fetchMySubsites.js.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/functions/cleanSearchedWebs.d.ts +11 -6
- package/lib/components/molecules/SpHttp/HubsSubs/functions/cleanSearchedWebs.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/functions/cleanSearchedWebs.js +44 -38
- package/lib/components/molecules/SpHttp/HubsSubs/functions/cleanSearchedWebs.js.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/functions/createHubSubSourceProps.d.ts +13 -3
- package/lib/components/molecules/SpHttp/HubsSubs/functions/createHubSubSourceProps.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/functions/createHubSubSourceProps.js +56 -41
- package/lib/components/molecules/SpHttp/HubsSubs/functions/createHubSubSourceProps.js.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/functions/processHubSubResults.d.ts +27 -13
- package/lib/components/molecules/SpHttp/HubsSubs/functions/processHubSubResults.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/functions/processHubSubResults.js +82 -73
- package/lib/components/molecules/SpHttp/HubsSubs/functions/processHubSubResults.js.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/getHubAssocSites.d.ts +11 -30
- package/lib/components/molecules/SpHttp/HubsSubs/getHubAssocSites.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/getHubAssocSites.js +56 -19
- package/lib/components/molecules/SpHttp/HubsSubs/getHubAssocSites.js.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/interfaces/IFPSHubSiteDataDocsApi.d.ts +11 -20
- package/lib/components/molecules/SpHttp/HubsSubs/interfaces/IFPSHubSiteDataDocsApi.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/interfaces/IFPSHubSiteDataDocsApi.js +35 -5
- package/lib/components/molecules/SpHttp/HubsSubs/interfaces/IFPSHubSiteDataDocsApi.js.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/interfaces/IFPSHubSitesApi.d.ts +13 -18
- package/lib/components/molecules/SpHttp/HubsSubs/interfaces/IFPSHubSitesApi.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/interfaces/IFPSHubSitesApi.js +31 -1
- package/lib/components/molecules/SpHttp/HubsSubs/interfaces/IFPSHubSitesApi.js.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/interfaces/IFPSSubsFilteredItem.d.ts +13 -13
- package/lib/components/molecules/SpHttp/HubsSubs/interfaces/IFPSSubsFilteredItem.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/interfaces/IFPSSubsFilteredItem.js +31 -1
- package/lib/components/molecules/SpHttp/HubsSubs/interfaces/IFPSSubsFilteredItem.js.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/interfaces/IFPSSubsSearchCleanItem.d.ts +13 -22
- package/lib/components/molecules/SpHttp/HubsSubs/interfaces/IFPSSubsSearchCleanItem.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/HubsSubs/interfaces/IFPSSubsSearchCleanItem.js +40 -1
- package/lib/components/molecules/SpHttp/HubsSubs/interfaces/IFPSSubsSearchCleanItem.js.map +1 -1
- package/lib/components/molecules/SpHttp/functions/findNavNodes.d.ts +1 -1
- package/lib/components/molecules/SpHttp/functions/findNavNodes.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/functions/findNavNodes.js +1 -1
- package/lib/components/molecules/SpHttp/functions/findNavNodes.js.map +1 -1
- package/lib/pnpjs/FieldAsXML/FetchItem.d.ts +5 -1
- package/lib/pnpjs/FieldAsXML/FetchItem.d.ts.map +1 -1
- package/lib/pnpjs/FieldAsXML/FetchItem.js +5 -1
- package/lib/pnpjs/FieldAsXML/FetchItem.js.map +1 -1
- package/lib/pnpjs/FieldAsXML/FetchPage.d.ts +5 -1
- package/lib/pnpjs/FieldAsXML/FetchPage.d.ts.map +1 -1
- package/lib/pnpjs/FieldAsXML/FetchPage.js +7 -3
- package/lib/pnpjs/FieldAsXML/FetchPage.js.map +1 -1
- package/lib/pnpjs/Lists/getList/getSourceList.js.map +1 -1
- package/lib/pnpjs/Lists/getList/getWebLists.d.ts +3 -0
- package/lib/pnpjs/Lists/getList/getWebLists.d.ts.map +1 -1
- package/lib/pnpjs/Lists/getList/getWebLists.js.map +1 -1
- package/lib/pnpjs/Navigation/addWebNav.d.ts +5 -1
- package/lib/pnpjs/Navigation/addWebNav.d.ts.map +1 -1
- package/lib/pnpjs/Navigation/addWebNav.js +5 -1
- package/lib/pnpjs/Navigation/addWebNav.js.map +1 -1
- package/lib/pnpjs/Navigation/getWebNav.d.ts +9 -5
- package/lib/pnpjs/Navigation/getWebNav.d.ts.map +1 -1
- package/lib/pnpjs/Navigation/getWebNav.js +5 -1
- package/lib/pnpjs/Navigation/getWebNav.js.map +1 -1
- package/package.json +2 -2
|
@@ -3,11 +3,20 @@
|
|
|
3
3
|
* Update:: import { ICanvasContentOptions } to '@mikezimm/fps-core-v7/lib/components/molecules/ModernPages/Interfaces/IModernPage;'
|
|
4
4
|
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { fetchFpsPageAsXMLD } from "../../../../pnpjs/FieldAsXML/FetchPage";
|
|
7
|
+
/**
|
|
8
|
+
* 2024-12-31: This was migrated to fps-core-v7 here:
|
|
9
|
+
*
|
|
10
|
+
* import { getDocWikiAPI } from "@mikezimm/fps-core-v7/lib/components/molecules/ModernPages/functions/getDocWikiAPI";
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
* @param item
|
|
14
|
+
* @param source
|
|
15
|
+
* @param canvasOptions
|
|
16
|
+
* @param showCanvasContent1
|
|
17
|
+
* @param callBack
|
|
18
|
+
*/
|
|
19
|
+
export function getDocWikiD(item, source, canvasOptions, showCanvasContent1, callBack) {
|
|
11
20
|
if (!item || !item.ID) {
|
|
12
21
|
console.log('Error getting item wiki');
|
|
13
22
|
const result = {
|
|
@@ -20,7 +29,10 @@ export function getDocWiki(item, source, canvasOptions, showCanvasContent1, call
|
|
|
20
29
|
const { webUrl, listTitle, selectThese, expandThese, isModern } = source;
|
|
21
30
|
const { ID, } = item;
|
|
22
31
|
// const result: IFpsPageAsXMLReturn = await fetchFpsPageAsXML( webUrl, listTitle, typeof ID === 'string' ? parseInt(ID): ID, selectThese, expandThese, [], isModern, true, true );
|
|
23
|
-
fetchFpsPageAsXML(source.fpsSpService, webUrl, listTitle, typeof ID === 'string' ? parseInt(ID)
|
|
32
|
+
// fetchFpsPageAsXML( source.fpsSpService, webUrl, listTitle, typeof ID === 'string' ? parseInt(ID): ID, selectThese, expandThese, [], isModern, true, true ).then( result => {
|
|
33
|
+
// getSourceItemsAPI( source, false, true, true, [''])
|
|
34
|
+
fetchFpsPageAsXMLD(source.fpsSpService, webUrl, listTitle, typeof ID === 'string' ? parseInt(ID) : ID, selectThese, expandThese, [], isModern, true, true).then(result => {
|
|
35
|
+
const useItem = result.item ? result.item : result[`items`] ? result[`items`] : null;
|
|
24
36
|
if (result.status === 'Success' && result.item) {
|
|
25
37
|
const fetchedItem = result.item;
|
|
26
38
|
//Added this to fit images into the current width or else the image is full size
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getModernContent.js","sourceRoot":"","sources":["../../../../../src/components/molecules/ModernPages/SinglePage/getModernContent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"getModernContent.js","sourceRoot":"","sources":["../../../../../src/components/molecules/ModernPages/SinglePage/getModernContent.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,30 +1 @@
|
|
|
1
|
-
export declare const imgSrcRegex: RegExp;
|
|
2
|
-
/**
|
|
3
|
-
* reverseStylesStringQuotes will take the WebPart Styles css and fix all the double quotes so it can actually be parsed.
|
|
4
|
-
* Without this, you can not parse the html.
|
|
5
|
-
*
|
|
6
|
-
* Looks for strings like this:
|
|
7
|
-
* "pageInfoStyle":""paddingBottom":"20px","backgroundColor":"#dcdcdc";"borderLeft":"solid 3px #c4c4c4"","bannerStyleChoice":
|
|
8
|
-
*
|
|
9
|
-
* and converts to strings like this:
|
|
10
|
-
* "pageInfoStyle":"'paddingBottom':'20px','backgroundColor':'#dcdcdc';'borderLeft':'solid 3px #c4c4c4'","bannerStyleChoice":
|
|
11
|
-
* @param str
|
|
12
|
-
* @returns
|
|
13
|
-
*/
|
|
14
|
-
export declare function reverseStylesStringQuotes(str: string): string;
|
|
15
|
-
/**
|
|
16
|
-
* This will take Modern Page and convert CanvasContent1 into more human readable version.
|
|
17
|
-
* The goal is to make it easier to debug and see what is in the HTML replacing all special characters and entites with actual characters.
|
|
18
|
-
*
|
|
19
|
-
* Example of CanvaseCotnent1: Contents","tocExpanded":true,"minHeadingToShow":"h3","pageInfoStyle":"
|
|
20
|
-
* \"paddingBottom\":\"20px\",\"backgroundColor\":\"#dcdcdc\";\"borderLeft\":\"solid 3px #c4c4c4\"",&qu
|
|
21
|
-
*
|
|
22
|
-
* TO:
|
|
23
|
-
* "tocExpanded":true,"minHeadingToShow":"h3","pageInfoStyle":""paddingBottom":"20px","backgroundColor":"#dcdcdc";"borderLeft":"solid 3px #c4c4c4"","bannerStyleChoice":"corpDark1","bannerStyle":"{"color":"white","backgroundColor":"#005495",
|
|
24
|
-
*
|
|
25
|
-
* @param result
|
|
26
|
-
* @returns
|
|
27
|
-
*/
|
|
28
|
-
export declare function getModernHumanReadable(result: any): any;
|
|
29
|
-
export declare function getCanvaseWebPartsFromContent(part: string): string;
|
|
30
1
|
//# sourceMappingURL=processModernContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processModernContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/ModernPages/SinglePage/processModernContent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"processModernContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/ModernPages/SinglePage/processModernContent.ts"],"names":[],"mappings":""}
|
|
@@ -1,205 +1,195 @@
|
|
|
1
|
-
// import { replaceHTMLEntities } from '../../../fpsReferences';
|
|
2
|
-
import { replaceHTMLEntitiesv1 } from "@mikezimm/fps-core-v7/lib/logic/Strings/html";
|
|
3
|
-
export const imgSrcRegex = /<iframe[\s\S]*>/gi;
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
const specialWebPartIDs = [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
];
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
//
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
thisContent = thisContent.substring(thisContent.indexOf('"><') + 2);
|
|
196
|
-
}
|
|
197
|
-
parseThisObject.content = thisContent;
|
|
198
|
-
HumanJSON_ContentWebpart = parseThisObject;
|
|
199
|
-
}
|
|
200
|
-
catch (e) {
|
|
201
|
-
HumanJSON_ContentWebpart = { part: part, errorText: errCanvasWebParts, parseMe: parseMe, error: e };
|
|
202
|
-
}
|
|
203
|
-
return HumanJSON_ContentWebpart;
|
|
204
|
-
}
|
|
1
|
+
// // import { replaceHTMLEntities } from '../../../fpsReferences';
|
|
2
|
+
// import { replaceHTMLEntitiesv1 } from "@mikezimm/fps-core-v7/lib/logic/Strings/html";
|
|
3
|
+
// export const imgSrcRegex = /<iframe[\s\S]*>/gi;
|
|
4
|
+
// /**
|
|
5
|
+
// *
|
|
6
|
+
// Need to do special parsing on custom webparts:
|
|
7
|
+
// */
|
|
8
|
+
// const specialWebPartIDs: string[] = [
|
|
9
|
+
// '37b649bc-f846-4718-863d-9487d8fffb23', // FPS Page Info - TOC & Props
|
|
10
|
+
// '92b4cb98-3aa1-4ece-9149-a591a572aced', // Pivot Tiles-TEAM
|
|
11
|
+
// '2762fd19-106f-4fcc-9949-0c58c512be4e', // ALVFinMan
|
|
12
|
+
// '44f426eb-86a2-41d0-bf5d-3db469b93ab6', // FPS Easy Contents Webpart
|
|
13
|
+
// ];
|
|
14
|
+
// /**
|
|
15
|
+
// * 2024-12-31: Migrated from fps-library-v2:
|
|
16
|
+
// *
|
|
17
|
+
// * import { reverseStylesStringQuotesm, getModernHumanReadable, getCanvaseWebPartsFromContent } from "@mikezimm/fps-core-v7/lib/components/molecules/ModernPages/functions/processModernContent";
|
|
18
|
+
// *
|
|
19
|
+
// *
|
|
20
|
+
// * reverseStylesStringQuotes will take the WebPart Styles css and fix all the double quotes so it can actually be parsed.
|
|
21
|
+
// * Without this, you can not parse the html.
|
|
22
|
+
// *
|
|
23
|
+
// * Looks for strings like this:
|
|
24
|
+
// * "pageInfoStyle":""paddingBottom":"20px","backgroundColor":"#dcdcdc";"borderLeft":"solid 3px #c4c4c4"","bannerStyleChoice":
|
|
25
|
+
// *
|
|
26
|
+
// * and converts to strings like this:
|
|
27
|
+
// * "pageInfoStyle":"'paddingBottom':'20px','backgroundColor':'#dcdcdc';'borderLeft':'solid 3px #c4c4c4'","bannerStyleChoice":
|
|
28
|
+
// * @param str
|
|
29
|
+
// * @returns
|
|
30
|
+
// */
|
|
31
|
+
// export function reverseStylesStringQuotesD( str: string ) : string {
|
|
32
|
+
// let newString = '';
|
|
33
|
+
// // part = part.replace(/:\"\"(?!,)/g, ':\"\''); //Replace instances of :"" that do not have a comma after it
|
|
34
|
+
// // part = part.replace(/(?<!:)\"\",/g, '\'\",'); //Replace instances of "", that do not have a colon in front it
|
|
35
|
+
// str = str.replace(/:"{"/g, ':{"');
|
|
36
|
+
// str = str.replace(/"}"/g, '"}');
|
|
37
|
+
// // str = str.replace(/:\"{\"/g, ':{\"');
|
|
38
|
+
// // str = str.replace(/\"}\"/g, '\"}');
|
|
39
|
+
// const styleColons = str.split(/:""(?!,)/g); // Split by :"" strings
|
|
40
|
+
// const newParts: string[] = [];
|
|
41
|
+
// console.log('reversStyle: styleColons', styleColons );
|
|
42
|
+
// styleColons.map( ( part, idx1 ) => {
|
|
43
|
+
// if ( idx1 === 0 ) {
|
|
44
|
+
// newParts.push( part ); //The first one never has to be fixed.
|
|
45
|
+
// } else { //All other items need to be fixed
|
|
46
|
+
// //Step 1: Find where to stop .... 250px"", --- basically where you find /(?<!:)\"\",/g
|
|
47
|
+
// const portions = part.split(/(?<!:)"",/g); // Split by "", strings
|
|
48
|
+
// console.log(`reversStyle: portions1 /(?<!:)"",/g`, portions );
|
|
49
|
+
// if ( portions.length > 2 ) alert('Whoa, wasnt expecting this.ToggleJSONCmd.key.toLocaleString.~ 342' );
|
|
50
|
+
// if ( portions.length > 1 ) portions[0] = portions[0].replace(/"/g, "'" ); //Replace all double quotes with single quotes only if there is a second half
|
|
51
|
+
// if ( portions.length > 1 ) portions[1] = reverseStylesStringQuotesD(portions[1]); //Replace all double quotes with single quotes only if there is a second half
|
|
52
|
+
// console.log('reversStyle: portions2', portions );
|
|
53
|
+
// newParts.push( portions.join( `'",`) );
|
|
54
|
+
// console.log('reversStyle: newParts1', newParts );
|
|
55
|
+
// //Step 2: From start to stop, replace double quotes " with single quotes '
|
|
56
|
+
// //Step 3: Push to newParts
|
|
57
|
+
// }
|
|
58
|
+
// });
|
|
59
|
+
// console.log('reversStyle: newPartsz', newParts );
|
|
60
|
+
// newString = newParts.join(':"\'' );
|
|
61
|
+
// // let typeDivs = newString.split('{"type":"div"');
|
|
62
|
+
// // let result = typeDivs[0];
|
|
63
|
+
// // if ( typeDivs.length > 0 ) {
|
|
64
|
+
// // newString = result + '""';
|
|
65
|
+
// // }
|
|
66
|
+
// return newString;
|
|
67
|
+
// }
|
|
68
|
+
// //String constants used to parse W
|
|
69
|
+
// const errCanvasWebParts = 'Unable to parse HumanJSON_ContentWebparts';
|
|
70
|
+
// const CanvasWebPartsTag = '<div data-sp-canvascontrol="" data-sp-canvasdataversion="1.0" data-sp-controldata="';
|
|
71
|
+
// const WebPartDataTag = 'data-sp-webpartdata="';
|
|
72
|
+
// /**
|
|
73
|
+
// * This will take Modern Page and convert CanvasContent1 into more human readable version.
|
|
74
|
+
// * The goal is to make it easier to debug and see what is in the HTML replacing all special characters and entites with actual characters.
|
|
75
|
+
// *
|
|
76
|
+
// * Example of CanvaseCotnent1: Contents","tocExpanded":true,"minHeadingToShow":"h3","pageInfoStyle":"
|
|
77
|
+
// * \"paddingBottom\":\"20px\",\"backgroundColor\":\"#dcdcdc\";\"borderLeft\":\"solid 3px #c4c4c4\"",&qu
|
|
78
|
+
// *
|
|
79
|
+
// * TO:
|
|
80
|
+
// * "tocExpanded":true,"minHeadingToShow":"h3","pageInfoStyle":""paddingBottom":"20px","backgroundColor":"#dcdcdc";"borderLeft":"solid 3px #c4c4c4"","bannerStyleChoice":"corpDark1","bannerStyle":"{"color":"white","backgroundColor":"#005495",
|
|
81
|
+
// *
|
|
82
|
+
// * @param result
|
|
83
|
+
// * @returns
|
|
84
|
+
// */
|
|
85
|
+
// export function getModernHumanReadableD( result: any ): any {
|
|
86
|
+
// const startParsing = new Date();
|
|
87
|
+
// //Added this for debug option to be able to read CanvasContent1 better
|
|
88
|
+
// if ( !result.HumanReadable_Canvas1 ) result.HumanReadable_Canvas1 = result.CanvasContent1 ? replaceHTMLEntitiesv1( result.CanvasContent1 ) : '';
|
|
89
|
+
// if ( result.HumanReadable_Canvas1 ) { //Look for any web part properties and add to JSON object
|
|
90
|
+
// const webparts = result.HumanReadable_Canvas1.split(CanvasWebPartsTag);
|
|
91
|
+
// if ( webparts.length > 0 ) {
|
|
92
|
+
// webparts.map ( ( part: string, idx1: number ) => {
|
|
93
|
+
// if ( idx1 > 0 ) {
|
|
94
|
+
// if ( idx1 === 1 ) result.HumanJSON_ContentWebparts = [];
|
|
95
|
+
// result.HumanJSON_ContentWebparts.push( getCanvaseWebPartsFromContentD( part ) );
|
|
96
|
+
// }
|
|
97
|
+
// });
|
|
98
|
+
// }
|
|
99
|
+
// }
|
|
100
|
+
// /**
|
|
101
|
+
// * Convert LayoutWebpartsContent portion from html entities to more human readable
|
|
102
|
+
// */
|
|
103
|
+
// if ( !result.HumanReadable_LayoutWebpartsContent ) result.HumanReadable_LayoutWebpartsContent = result.LayoutWebpartsContent ? replaceHTMLEntitiesv1( result.LayoutWebpartsContent ) : ''; // eslint-disable-line dot-notation
|
|
104
|
+
// const LayoutWebpartsTag = '<div><div data-sp-canvascontrol="" data-sp-canvasdataversion="1.4" data-sp-controldata="';
|
|
105
|
+
// if ( result.HumanReadable_LayoutWebpartsContent.indexOf( LayoutWebpartsTag ) === 0 ) {
|
|
106
|
+
// try {
|
|
107
|
+
// result.HumanJSON_LayoutWebpartsContent = JSON.parse(result.HumanReadable_LayoutWebpartsContent.replace(LayoutWebpartsTag,'').replace('"></div></div>',''));
|
|
108
|
+
// } catch (e) {
|
|
109
|
+
// result.HumanJSON_LayoutWebpartsContent = 'Unable to parse LayoutWebpartsContent' + JSON.stringify(e);
|
|
110
|
+
// }
|
|
111
|
+
// }
|
|
112
|
+
// //Gets page HTML for Author and Editor
|
|
113
|
+
// if ( !result.HumanReadableOData_Author ) result.HumanReadableOData_Author = result.Author ? replaceHTMLEntitiesv1( result.Author ) : ''; // eslint-disable-line dot-notation
|
|
114
|
+
// if ( !result.HumanReadableOData_Editor ) result.HumanReadableOData_Editor = result.Editor ? replaceHTMLEntitiesv1( result.Editor ) : ''; // eslint-disable-line dot-notation
|
|
115
|
+
// const endParsing = new Date();
|
|
116
|
+
// result.parsingTime = ( endParsing.getTime() - startParsing.getTime() ) ;
|
|
117
|
+
// console.log('parse time: ', result.parsingTime );
|
|
118
|
+
// return result;
|
|
119
|
+
// }
|
|
120
|
+
// export function getCanvaseWebPartsFromContentD( part: string ): string {
|
|
121
|
+
// let HumanJSON_ContentWebpart: any = {};
|
|
122
|
+
// const startWebPartData = part.indexOf( WebPartDataTag );
|
|
123
|
+
// const parseThisPart = startWebPartData < 0 ? part : part.substring( startWebPartData ).replace( WebPartDataTag,'');
|
|
124
|
+
// let parseMe = parseThisPart.substring(0, parseThisPart.indexOf( '"><' ) );
|
|
125
|
+
// try {
|
|
126
|
+
// const doubleQuotes = parseMe.split(/(?<!:)""(?!,)/g);
|
|
127
|
+
// if ( doubleQuotes.length > 0 ) {
|
|
128
|
+
// let cleanParseMe = '';
|
|
129
|
+
// const newDoubleQuotes: string[] = [];
|
|
130
|
+
// doubleQuotes.map( ( doubleQt, idx2 ) => {
|
|
131
|
+
// if ( doubleQuotes.length === 0 ) {
|
|
132
|
+
// //Do nothing, there are no elements with double quotes
|
|
133
|
+
// } else if ( idx2 === 0 ) {
|
|
134
|
+
// //Do nothing, this is the first element that does not have quotes
|
|
135
|
+
// // console.log(' doubleQuotes1:' , doubleQt );
|
|
136
|
+
// } else if ( idx2 !== doubleQuotes.length -1 ) {//This is the last item so this should not need to change quotes
|
|
137
|
+
// doubleQt = `"'${doubleQt.replace(/"/g, "'" )}'"`;
|
|
138
|
+
// // console.log(' doubleQuotes2:' , doubleQt );
|
|
139
|
+
// }
|
|
140
|
+
// newDoubleQuotes.push( doubleQt );
|
|
141
|
+
// });
|
|
142
|
+
// cleanParseMe = newDoubleQuotes.join('');
|
|
143
|
+
// // console.log('cleanParseMe', cleanParseMe );
|
|
144
|
+
// parseMe = cleanParseMe;
|
|
145
|
+
// let isSpecial: any = false;
|
|
146
|
+
// specialWebPartIDs.map( id => {
|
|
147
|
+
// if ( parseMe.indexOf( id ) > -1 ) {
|
|
148
|
+
// isSpecial = true;
|
|
149
|
+
// }
|
|
150
|
+
// });
|
|
151
|
+
// if ( isSpecial === true ) { //This is a web part with known complex props that need special code
|
|
152
|
+
// parseMe = reverseStylesStringQuotesD( parseMe );
|
|
153
|
+
// const typeDivs = parseMe.split('{"type":"div"');
|
|
154
|
+
// parseMe = typeDivs[0];
|
|
155
|
+
// if ( typeDivs.length > 1 ) {
|
|
156
|
+
// parseMe += '""}}';
|
|
157
|
+
// }
|
|
158
|
+
// }
|
|
159
|
+
// }
|
|
160
|
+
// /**
|
|
161
|
+
// * You Tube Web Part
|
|
162
|
+
// */
|
|
163
|
+
// let parseThisObject = null;
|
|
164
|
+
// if ( parseMe.indexOf('544dd15b-cf3c-441b-96da-004d5a8cea1d') > -1 ) {
|
|
165
|
+
// const iframes = parseMe.match(imgSrcRegex);
|
|
166
|
+
// //This is the youtube video... add some things manually
|
|
167
|
+
// if ( iframes.length > 0 ) {
|
|
168
|
+
// parseMe = parseMe.replace( iframes[0], '' );
|
|
169
|
+
// }
|
|
170
|
+
// parseThisObject = JSON.parse( parseMe );
|
|
171
|
+
// parseThisObject.properties.cachedEmbedCode = iframes[0];
|
|
172
|
+
// } else {
|
|
173
|
+
// parseThisObject = JSON.parse( parseMe );
|
|
174
|
+
// }
|
|
175
|
+
// /**
|
|
176
|
+
// * OOTB Text Web Part
|
|
177
|
+
// */
|
|
178
|
+
// const startContent = part.indexOf( '"><' ) + 2;
|
|
179
|
+
// const endContent = part.lastIndexOf('</div>');
|
|
180
|
+
// let thisContent = part.substring(startContent,endContent);
|
|
181
|
+
// if ( thisContent.indexOf('<div data-sp-rte="">') > -1 ) {
|
|
182
|
+
// //This is common Text WebPart
|
|
183
|
+
// parseThisObject.title = 'OOTB Text Web Part';
|
|
184
|
+
// } else {
|
|
185
|
+
// //This is not OOTB Text Web Part so trim props from beginning of string
|
|
186
|
+
// thisContent = thisContent.substring( thisContent.indexOf( '"><' ) + 2) ;
|
|
187
|
+
// }
|
|
188
|
+
// parseThisObject.content = thisContent;
|
|
189
|
+
// HumanJSON_ContentWebpart = parseThisObject;
|
|
190
|
+
// } catch (e) {
|
|
191
|
+
// HumanJSON_ContentWebpart = { part: part, errorText: errCanvasWebParts, parseMe: parseMe, error: e };
|
|
192
|
+
// }
|
|
193
|
+
// return HumanJSON_ContentWebpart;
|
|
194
|
+
// }
|
|
205
195
|
//# sourceMappingURL=processModernContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processModernContent.js","sourceRoot":"","sources":["../../../../../src/components/molecules/ModernPages/SinglePage/processModernContent.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"processModernContent.js","sourceRoot":"","sources":["../../../../../src/components/molecules/ModernPages/SinglePage/processModernContent.ts"],"names":[],"mappings":"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"}
|
|
@@ -7,20 +7,22 @@
|
|
|
7
7
|
* Update:: import { doSpJsFetch } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
|
|
8
8
|
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
10
|
+
import { IFPSHubNavigationItem_D, IHubSiteDataResultAPI_D } from './interface';
|
|
11
11
|
import { IJSFetchReturn } from '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/IJSFetchReturn';
|
|
12
12
|
import { IFpsSpHttpServiceMIN } from '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/Sp/IFpsSpHttpServiceMIN';
|
|
13
13
|
export interface IFPSHubNav extends IJSFetchReturn {
|
|
14
|
-
'nav.navigation':
|
|
15
|
-
nav:
|
|
16
|
-
itemsN?:
|
|
14
|
+
'nav.navigation': IFPSHubNavigationItem_D[];
|
|
15
|
+
nav: IHubSiteDataResultAPI_D;
|
|
16
|
+
itemsN?: IFPSHubNavigationItem_D[];
|
|
17
17
|
metaN?: string[];
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* fetchMyHubNav should be given the Url of a Hub Site and it should return that hubsite's navigation.
|
|
21
21
|
* - useful in Hub Connections or where you want to get navigation elements of a site.
|
|
22
|
+
*
|
|
23
|
+
* 2024-12-31: MIGRATED THIS TO import { getHubSiteDataAPI } from '@mikezimm/fps-core-v7/lib/restAPIs/sites/nav/getHubSiteDataAPI';
|
|
22
24
|
* @param webUrl
|
|
23
25
|
* @returns
|
|
24
26
|
*/
|
|
25
|
-
export declare function
|
|
27
|
+
export declare function fetchMyHubNavD(fpsSpService: IFpsSpHttpServiceMIN, webUrl: string): Promise<IFPSHubNav>;
|
|
26
28
|
//# sourceMappingURL=fetchMyHubNav.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchMyHubNav.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/SpHttp/HubSiteData/fetchMyHubNav.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAsBH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"fetchMyHubNav.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/SpHttp/HubSiteData/fetchMyHubNav.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAsBH,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,sEAAsE,CAAC;AACtG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+EAA+E,CAAC;AAIrH,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,gBAAgB,EAAE,uBAAuB,EAAE,CAAC;IAC5C,GAAG,EAAE,uBAAuB,CAAC;IAC7B,MAAM,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,GAAK,OAAO,CAAC,UAAU,CAAC,CAwC/G"}
|
|
@@ -25,10 +25,12 @@ import { doSpHttpFetchOrPostAndCheck } from '@mikezimm/fps-core-v7/lib/component
|
|
|
25
25
|
/**
|
|
26
26
|
* fetchMyHubNav should be given the Url of a Hub Site and it should return that hubsite's navigation.
|
|
27
27
|
* - useful in Hub Connections or where you want to get navigation elements of a site.
|
|
28
|
+
*
|
|
29
|
+
* 2024-12-31: MIGRATED THIS TO import { getHubSiteDataAPI } from '@mikezimm/fps-core-v7/lib/restAPIs/sites/nav/getHubSiteDataAPI';
|
|
28
30
|
* @param webUrl
|
|
29
31
|
* @returns
|
|
30
32
|
*/
|
|
31
|
-
export async function
|
|
33
|
+
export async function fetchMyHubNavD(fpsSpService, webUrl) {
|
|
32
34
|
let performanceSettings = { label: 'hubNav', updateMiliseconds: true, includeMsStr: true, op: 'fetch' };
|
|
33
35
|
const fetchOp = performanceSettings ? startPerformOpV2(performanceSettings) : null;
|
|
34
36
|
// api from chatGPT
|