@mikezimm/fps-core-v7 1.0.63 → 1.0.65
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/ModernPages/functions/getDocWikiAPI.d.ts +22 -0
- package/lib/components/molecules/ModernPages/functions/getDocWikiAPI.d.ts.map +1 -0
- package/lib/components/molecules/ModernPages/functions/getDocWikiAPI.js +67 -0
- package/lib/components/molecules/ModernPages/functions/getDocWikiAPI.js.map +1 -0
- package/lib/components/molecules/ModernPages/functions/processModernContent.d.ts +35 -0
- package/lib/components/molecules/ModernPages/functions/processModernContent.d.ts.map +1 -0
- package/lib/components/molecules/ModernPages/functions/processModernContent.js +208 -0
- package/lib/components/molecules/ModernPages/functions/processModernContent.js.map +1 -0
- package/lib/components/molecules/SpHttp/Sp/doSpHttpFetch.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/Sp/doSpHttpFetch.js +2 -0
- package/lib/components/molecules/SpHttp/Sp/doSpHttpFetch.js.map +1 -1
- package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.d.ts +1 -1
- package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.d.ts.map +1 -1
- package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.js +7 -2
- package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.js.map +1 -1
- package/lib/components/molecules/process-results/createEmptyFpsUsersReturn.js +2 -2
- package/lib/components/molecules/process-results/createEmptyFpsUsersReturn.js.map +1 -1
- package/lib/components/molecules/process-results/createErrorFpsFileReturn.js +2 -2
- package/lib/components/molecules/process-results/createErrorFpsFileReturn.js.map +1 -1
- package/lib/components/molecules/process-results/createErrorFpsListItemsReturn.d.ts.map +1 -1
- package/lib/components/molecules/process-results/createErrorFpsListItemsReturn.js +2 -2
- package/lib/components/molecules/process-results/createErrorFpsListItemsReturn.js.map +1 -1
- package/lib/restAPIs/lists/items/getFpsPageAsXmlAPI.d.ts +34 -0
- package/lib/restAPIs/lists/items/getFpsPageAsXmlAPI.d.ts.map +1 -0
- package/lib/restAPIs/lists/items/getFpsPageAsXmlAPI.js +76 -0
- package/lib/restAPIs/lists/items/getFpsPageAsXmlAPI.js.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/fetches/fetchMyHubsSubs.d.ts +28 -0
- package/lib/restAPIs/sites/HubsSubs/fetches/fetchMyHubsSubs.d.ts.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/fetches/fetchMyHubsSubs.js +48 -0
- package/lib/restAPIs/sites/HubsSubs/fetches/fetchMyHubsSubs.js.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/fetches/fetchMyHubsites.d.ts +27 -0
- package/lib/restAPIs/sites/HubsSubs/fetches/fetchMyHubsites.d.ts.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/fetches/fetchMyHubsites.js +94 -0
- package/lib/restAPIs/sites/HubsSubs/fetches/fetchMyHubsites.js.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/fetches/fetchMySubsites.d.ts +25 -0
- package/lib/restAPIs/sites/HubsSubs/fetches/fetchMySubsites.d.ts.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/fetches/fetchMySubsites.js +79 -0
- package/lib/restAPIs/sites/HubsSubs/fetches/fetchMySubsites.js.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/functions/cleanSearchedWebs.d.ts +9 -0
- package/lib/restAPIs/sites/HubsSubs/functions/cleanSearchedWebs.d.ts.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/functions/cleanSearchedWebs.js +41 -0
- package/lib/restAPIs/sites/HubsSubs/functions/cleanSearchedWebs.js.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/functions/createHubSubSourceProps.d.ts +10 -0
- package/lib/restAPIs/sites/HubsSubs/functions/createHubSubSourceProps.d.ts.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/functions/createHubSubSourceProps.js +48 -0
- package/lib/restAPIs/sites/HubsSubs/functions/createHubSubSourceProps.js.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/functions/processHubSubResults.d.ts +23 -0
- package/lib/restAPIs/sites/HubsSubs/functions/processHubSubResults.d.ts.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/functions/processHubSubResults.js +103 -0
- package/lib/restAPIs/sites/HubsSubs/functions/processHubSubResults.js.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/getHubAssocSites.d.ts +33 -0
- package/lib/restAPIs/sites/HubsSubs/getHubAssocSites.d.ts.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/getHubAssocSites.js +22 -0
- package/lib/restAPIs/sites/HubsSubs/getHubAssocSites.js.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSHubSiteDataDocsApi.d.ts +20 -0
- package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSHubSiteDataDocsApi.d.ts.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSHubSiteDataDocsApi.js +27 -0
- package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSHubSiteDataDocsApi.js.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSHubSitesApi.d.ts +24 -0
- package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSHubSitesApi.d.ts.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSHubSitesApi.js +7 -0
- package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSHubSitesApi.js.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSSubsFilteredItem.d.ts +19 -0
- package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSSubsFilteredItem.d.ts.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSSubsFilteredItem.js +2 -0
- package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSSubsFilteredItem.js.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSSubsSearchCleanItem.d.ts +27 -0
- package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSSubsSearchCleanItem.d.ts.map +1 -0
- package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSSubsSearchCleanItem.js +2 -0
- package/lib/restAPIs/sites/HubsSubs/interfaces/IFPSSubsSearchCleanItem.js.map +1 -0
- package/lib/restAPIs/sites/nav/functions/findNavNodes.d.ts +24 -0
- package/lib/restAPIs/sites/nav/functions/findNavNodes.d.ts.map +1 -0
- package/lib/restAPIs/sites/nav/functions/findNavNodes.js +132 -0
- package/lib/restAPIs/sites/nav/functions/findNavNodes.js.map +1 -0
- package/lib/restAPIs/sites/nav/getHubSiteDataAPI.d.ts.map +1 -1
- package/lib/restAPIs/sites/nav/getHubSiteDataAPI.js +49 -7
- package/lib/restAPIs/sites/nav/getHubSiteDataAPI.js.map +1 -1
- package/lib/types/fps-returns/sites/nav/INavErrorObj.d.ts +1 -1
- package/lib/types/fps-returns/sites/nav/INavErrorObj.d.ts.map +1 -1
- package/lib/types/fps-returns/sites/nav/INavigationLink.d.ts +39 -6
- package/lib/types/fps-returns/sites/nav/INavigationLink.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 2024-09-29: Migrated from src\pnpjs\SourceItems\getSourceItems.ts
|
|
3
|
+
*/
|
|
4
|
+
import { SourcePropsNoListTitle, SourcePropsNoWebUrl } from '../../../components/molecules/source-props/ISourceProps'; ///ISourceProps';
|
|
5
|
+
import { check4This } from "../../../logic/Links/CheckSearch";
|
|
6
|
+
import { doSpHttpFetchOrPostAndCheck } from "../../../components/molecules/SpHttp/Sp/doSpHttpFetch";
|
|
7
|
+
import { createErrorFpsListReturn } from '../../../components/molecules/process-results/createErrorFpsListItemsReturn';
|
|
8
|
+
import { getAbsoluteWebUrlFromSourceProps } from '../../../logic/Strings/getAbssoluteWebUrlFromSourceProps';
|
|
9
|
+
import { getExpandColumns } from '../../../components/molecules/source-props/Lists/getVX/getExpandV2';
|
|
10
|
+
import { ModernSitePagesColumns } from '../../../components/molecules/source-props/SitePages/ModernSitePagesColumns';
|
|
11
|
+
/**
|
|
12
|
+
* getFpsPageAsXmlAPI gets the HTML for a sharepoint site page.
|
|
13
|
+
*
|
|
14
|
+
* import { getFpsPageAsXmlAPI, getDocWikiAPI } from "@mikezimm/fps-core-v7/lib/restAPIs/lists/items/getFpsPageAsXmlAPI";
|
|
15
|
+
*
|
|
16
|
+
* @param sourceProps
|
|
17
|
+
* @param autoExapnd = true is for normal sourceProps, use false if you have custom logic for expands such as Drilldown
|
|
18
|
+
* @param alertMe
|
|
19
|
+
* @param consoleLog
|
|
20
|
+
* @param expandFormats = optional - use FieldValuesAsText and FieldValuesAsHtml to add to the expands for return format regardless of autoExpand
|
|
21
|
+
* @param ItemId -- optional to add a number Id greater than -1 to use the .getById filter, over-rides any restFilter on sourceProps
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
export async function getFpsPageAsXmlAPI(sourceProps, isModern, Id = -1, alertMe, consoleLog) {
|
|
25
|
+
const { listTitle, } = sourceProps;
|
|
26
|
+
// 2024-12-05: Added this because some places like PivotTiles had absoluteWebUrl in webUrl prop... so just taking care of differences
|
|
27
|
+
const useUrl = getAbsoluteWebUrlFromSourceProps(sourceProps);
|
|
28
|
+
let fetchAPI = `${useUrl}/_api/web/lists/getbytitle('${listTitle}')/items`;
|
|
29
|
+
if (!useUrl || !listTitle) {
|
|
30
|
+
// NO WebURL... Throw Alert
|
|
31
|
+
if (alertMe === true)
|
|
32
|
+
alert(`${listTitle ? listTitle : SourcePropsNoListTitle} ${SourcePropsNoWebUrl}`);
|
|
33
|
+
const results = createErrorFpsListReturn(useUrl, listTitle);
|
|
34
|
+
return results;
|
|
35
|
+
}
|
|
36
|
+
// Added just so it's always here for cases like getOnlySharedItems
|
|
37
|
+
// sourceProps = await addFPSDigestToSourceProps( sourceProps );
|
|
38
|
+
/**
|
|
39
|
+
SAMPLE Full SharePoint Items Rest call:
|
|
40
|
+
|
|
41
|
+
https://example.sharepoint.com/sites/MySite/_api/web/lists/getbytitle('MyList')/items?
|
|
42
|
+
$select=Id,Title,EULAText,ExpandedField1/Id,ExpandedField1/Title,ExpandedField2/Id,ExpandedField2/Title&
|
|
43
|
+
$expand=ExpandedField1,ExpandedField2&
|
|
44
|
+
$filter=Title eq 'SomeTitle'&
|
|
45
|
+
$orderby=Id desc
|
|
46
|
+
|
|
47
|
+
*/
|
|
48
|
+
const selectThese = sourceProps.selectThese ? sourceProps.selectThese : ModernSitePagesColumns;
|
|
49
|
+
if (isModern === true) {
|
|
50
|
+
selectThese.push(...['*', 'CanvasContent1', 'LayoutsWebpartsContent', 'BannerImageUrl']);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
selectThese.push(...['*', 'WikiField',]);
|
|
54
|
+
}
|
|
55
|
+
// https://github.com/fps-solutions/HubCon/issues/112
|
|
56
|
+
if (Id || Id === 0) { // add the getById selector
|
|
57
|
+
fetchAPI += `/getById(${Id})?`;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
fetchAPI += `?`;
|
|
61
|
+
}
|
|
62
|
+
fetchAPI += `$select=${selectThese.join(',')}&`;
|
|
63
|
+
// https://github.com/fps-solutions/HubCon/issues/111
|
|
64
|
+
let useExpands = getExpandColumns(selectThese);
|
|
65
|
+
// This is the magic field that will make return as html
|
|
66
|
+
useExpands.push('FieldValuesAsHtml');
|
|
67
|
+
fetchAPI += `$expand=${useExpands.join(',')}&`;
|
|
68
|
+
const result = await doSpHttpFetchOrPostAndCheck(fetchAPI, 'GET', sourceProps.fpsSpService, '', alertMe, consoleLog, 'page', null);
|
|
69
|
+
result.unifiedPerformanceOps.fetch.label = `fetch xml page ${listTitle} ${Id}`;
|
|
70
|
+
if (check4This(`fpsShowFetchResults=true`) === true) {
|
|
71
|
+
console.log(`fps-core-v7 COMPLETE: getFpsPageAsXML ~ 90`, result);
|
|
72
|
+
}
|
|
73
|
+
;
|
|
74
|
+
return result;
|
|
75
|
+
}
|
|
76
|
+
//# source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AA;KAAE;IAAA,CAAC;IAEjI,OAAO,MAAM,CAAC;AAEhB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeAnalizerComment: Updated 1 imports on 2024-09-22 14:49:52
|
|
3
|
+
* Update:: import { IJSFetchReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
|
|
4
|
+
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* CodeAnalizerComment: Updated 2 imports on 2024-09-21 23:07:24
|
|
8
|
+
* Update:: import { IJSFetchReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
|
|
9
|
+
* Update:: import { check4This } to '@mikezimm/fps-core-v7/lib/logic/Links/CheckSearch;'
|
|
10
|
+
|
|
11
|
+
*/
|
|
12
|
+
import { IJSFetchReturn } from '../../../../components/molecules/SpHttp/IJSFetchReturn';
|
|
13
|
+
import { IFetchHubDepth } from './fetchMyHubsites';
|
|
14
|
+
import { IFpsSpHttpServiceMIN } from '../../../../components/molecules/SpHttp/Sp/IFpsSpHttpServiceMIN';
|
|
15
|
+
export interface IFPSHubsSubs {
|
|
16
|
+
hubs: IJSFetchReturn;
|
|
17
|
+
subs: IJSFetchReturn;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* fetchMyHubSubs will syncronsly fetch the links for the current site's parent hub's associated sites and the current site's subsites.
|
|
21
|
+
* Used in Pivot Tiles and Hub Connections.
|
|
22
|
+
*
|
|
23
|
+
* @param webUrl
|
|
24
|
+
* @param departmentId
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
export declare function fetchMyHubSubs(fpsSpService: IFpsSpHttpServiceMIN, webUrl: string, depth: IFetchHubDepth, departmentId: string): Promise<IFPSHubsSubs>;
|
|
28
|
+
//# sourceMappingURL=fetchMyHubsSubs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchMyHubsSubs.d.ts","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/fetches/fetchMyHubsSubs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AAGxF,OAAO,EAAE,cAAc,EAAmB,MAAM,mBAAmB,CAAC;AAGpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iEAAiE,CAAC;AAEvG,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,cAAc,CAAC;CAEtB;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,GAAI,OAAO,CAAC,YAAY,CAAC,CAiC7J"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeAnalizerComment: Updated 1 imports on 2024-09-22 14:49:52
|
|
3
|
+
* Update:: import { IJSFetchReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
|
|
4
|
+
|
|
5
|
+
*/
|
|
6
|
+
// import { findSimilarNavNodes, findSpecificNavNodes } from '../functions/findNavNodes';
|
|
7
|
+
// import { fetchMyHubNav } from '../HubSiteData/fetchMyHubNav';
|
|
8
|
+
import { fetchMyHubsites } from './fetchMyHubsites';
|
|
9
|
+
import { fetchMySubsites } from './fetchMySubsites';
|
|
10
|
+
import { check4This } from '../../../../logic/Links/CheckSearch';
|
|
11
|
+
/**
|
|
12
|
+
* fetchMyHubSubs will syncronsly fetch the links for the current site's parent hub's associated sites and the current site's subsites.
|
|
13
|
+
* Used in Pivot Tiles and Hub Connections.
|
|
14
|
+
*
|
|
15
|
+
* @param webUrl
|
|
16
|
+
* @param departmentId
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
export async function fetchMyHubSubs(fpsSpService, webUrl, depth, departmentId) {
|
|
20
|
+
// const [ hubs, subs, nav ] = await Promise.all([
|
|
21
|
+
const [hubs, subs,] = await Promise.all([
|
|
22
|
+
fetchMyHubsites(fpsSpService, webUrl, depth, departmentId, 'HubAndAssoc'),
|
|
23
|
+
fetchMySubsites(fpsSpService, webUrl),
|
|
24
|
+
// fetchMyHubNav( webUrl, departmentId ),
|
|
25
|
+
]);
|
|
26
|
+
// Verified on /sites/TheSharePointHub
|
|
27
|
+
// findSimilarNavNodes( nav, 'Title', 'Branding' );
|
|
28
|
+
// findSimilarNavNodes( nav, 'Title', 'Branding', 2 );
|
|
29
|
+
// findSimilarNavNodes( nav, 'Title', 'Branding', 1 );
|
|
30
|
+
// findSimilarNavNodes( nav, 'Title', 'Child', 1 );
|
|
31
|
+
// findSimilarNavNodes( nav, 'Title', 'TestHeader', );
|
|
32
|
+
// findSpecificNavNodes( nav, 'Title', [ 'SharePoint Online Info (Public)', 'Branding' ] );
|
|
33
|
+
// findSpecificNavNodes( nav, 'Title', [ 'SharePoint Team (Access required)', 'TestHeader' ] );
|
|
34
|
+
// findSpecificNavNodes( nav, 'Title', [ 'Hubs (DO NOT request access)', 'Child', ] );
|
|
35
|
+
// findSpecificNavNodes( nav, 'Title', [ 'Hubs (DO NOT request access)', 'TheSharePointHub' ] );
|
|
36
|
+
// findSpecificNavNodes( nav, 'Title', [ 'Hubs (DO NOT request access)','Child', 'TheSharePointHub' ] );
|
|
37
|
+
// findSpecificNavNodes( nav, 'Title', [ 'SharePoint Online Info (Public)' ] );
|
|
38
|
+
// findSpecificNavNodes( nav, 'Title', [ 'The Share PointHub' ] );
|
|
39
|
+
const results = {
|
|
40
|
+
hubs: hubs,
|
|
41
|
+
subs: subs,
|
|
42
|
+
// nav: nav,
|
|
43
|
+
};
|
|
44
|
+
if (check4This('fpsShowFetchResults=true') === true)
|
|
45
|
+
console.log(`fps-library-v2 Complete: fetchMyHubSubs ~ 51 results`, results);
|
|
46
|
+
return results;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=fetchMyHubsSubs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchMyHubsSubs.js","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/fetches/fetchMyHubsSubs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,yFAAyF;AACzF,gEAAgE;AAChE,OAAO,EAAkB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AASjE;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAE,YAAkC,EAAE,MAAc,EAAE,KAAqB,EAAE,YAAoB;IAEnI,kDAAkD;IAClD,MAAM,CAAE,IAAI,EAAE,IAAI,EAAG,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACxC,eAAe,CAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,aAAa,CAAE;QAC3E,eAAe,CAAE,YAAY,EAAE,MAAM,CAAG;QACxC,yCAAyC;KAC1C,CAAC,CAAC;IAEH,sCAAsC;IACtC,mDAAmD;IACnD,sDAAsD;IACtD,sDAAsD;IACtD,mDAAmD;IACnD,sDAAsD;IAEtD,2FAA2F;IAC3F,+FAA+F;IAC/F,sFAAsF;IACtF,gGAAgG;IAChG,wGAAwG;IACxG,+EAA+E;IAC/E,kEAAkE;IAElE,MAAM,OAAO,GAAiB;QAC5B,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,IAAI;QACV,YAAY;KACb,CAAA;IACD,IAAK,UAAU,CAAE,0BAA0B,CAAE,KAAK,IAAI;QAAG,OAAO,CAAC,GAAG,CAAE,sDAAsD,EAAE,OAAO,CAAE,CAAC;IAExI,OAAO,OAAO,CAAC;AAEjB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeAnalizerComment: Updated 5 imports on 2024-09-22 14:49:52
|
|
3
|
+
* Update:: import { IJSFetchReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
|
|
4
|
+
* Update:: import { doSpJsFetch } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
|
|
5
|
+
* Update:: import { IFpsErrorObject } to '@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFpsErrorObject;'
|
|
6
|
+
* Update:: import { IFpsItemsReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
|
|
7
|
+
* Update:: import { checkItemsResults } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
|
|
8
|
+
|
|
9
|
+
*/
|
|
10
|
+
import { IJSFetchReturn } from '../../../../components/molecules/SpHttp/IJSFetchReturn';
|
|
11
|
+
import { IFPSWebsWithLogo } from '../interfaces/IFPSHubSiteDataDocsApi';
|
|
12
|
+
import { IFpsSpHttpServiceMIN } from '../../../../components/molecules/SpHttp/Sp/IFpsSpHttpServiceMIN';
|
|
13
|
+
export type IFetchHubDepth = 'site' | 'web';
|
|
14
|
+
export type IHubFilterType = 'Associated' | 'Hubs' | 'Teams' | 'HubAndAssoc';
|
|
15
|
+
export interface IFetchHubsReturn extends IJSFetchReturn {
|
|
16
|
+
allHubs?: IFPSWebsWithLogo[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* fetchMyHubsites imported from HubCon on 2024-07-29.
|
|
20
|
+
* @param webUrl
|
|
21
|
+
* @param depth IFetchHubDepth = 'site' | 'web';
|
|
22
|
+
* @param departmentId
|
|
23
|
+
* @param filter IHubFilterType = 'Associated' | 'Hubs' | 'Teams' | 'HubAndAssoc';
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
export declare function fetchMyHubsites(fpsSpService: IFpsSpHttpServiceMIN, webUrl: string, depth: IFetchHubDepth, departmentId: string, filter: IHubFilterType): Promise<IFetchHubsReturn>;
|
|
27
|
+
//# sourceMappingURL=fetchMyHubsites.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchMyHubsites.d.ts","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/fetches/fetchMyHubsites.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAkBH,OAAO,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAc,MAAM,sCAAsC,CAAC;AAwCpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iEAAiE,CAAC;AAGvG,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,CAAC;AAE5C,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,CAAE;AAE9E,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAC9B;AAED;;;;;;;GAOG;AAEH,wBAAsB,eAAe,CAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAI,OAAO,CAAC,gBAAgB,CAAC,CA6C1L"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeAnalizerComment: Updated 5 imports on 2024-09-22 14:49:52
|
|
3
|
+
* Update:: import { IJSFetchReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
|
|
4
|
+
* Update:: import { doSpJsFetch } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
|
|
5
|
+
* Update:: import { IFpsErrorObject } to '@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFpsErrorObject;'
|
|
6
|
+
* Update:: import { IFpsItemsReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
|
|
7
|
+
* Update:: import { checkItemsResults } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
|
|
8
|
+
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* CodeAnalizerComment: Updated 8 imports on 2024-09-21 23:07:24
|
|
12
|
+
* Update:: import { IJSFetchReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
|
|
13
|
+
* Update:: import { doSpJsFetch } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
|
|
14
|
+
* Update:: import { IPerformanceSettings } to '@mikezimm/fps-core-v7/lib/components/molecules/Performance/IPerformanceSettings;'
|
|
15
|
+
* Update:: import { startPerformOpV2 } to '@mikezimm/fps-core-v7/lib/components/molecules/Performance/functions;'
|
|
16
|
+
* Update:: import { unifiedPerformanceEnd } to '@mikezimm/fps-core-v7/lib/components/molecules/Performance/functions;'
|
|
17
|
+
* Update:: import { IFpsErrorObject } to '@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFpsErrorObject;'
|
|
18
|
+
* Update:: import { IFpsItemsReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
|
|
19
|
+
* Update:: import { checkItemsResults } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
|
|
20
|
+
|
|
21
|
+
*/
|
|
22
|
+
import { cleanSearchedWebs } from '../functions/cleanSearchedWebs';
|
|
23
|
+
import { doSpHttpFetchOrPostAndCheck } from '../../../../components/molecules/SpHttp/Sp/doSpHttpFetch';
|
|
24
|
+
import { hubSelects } from '../interfaces/IFPSHubSiteDataDocsApi';
|
|
25
|
+
import { startPerformOpV2, unifiedPerformanceEnd } from '../../../../components/molecules/Performance/functions';
|
|
26
|
+
import { checkItemsResults } from '../../../../components/molecules/process-results/CheckWService/CheckItemsResults';
|
|
27
|
+
/**
|
|
28
|
+
* fetchMyHubsites will fetch an array of the current site's hub associated sites. Used in Pivot Tiles and Hub Connections.
|
|
29
|
+
* @param webUrl
|
|
30
|
+
* @param departmentId
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
33
|
+
// export type IFetchHubDepth = 'site' | 'web';
|
|
34
|
+
// export async function fetchMyHubsites( webUrl: string, depth: IFetchHubDepth, departmentId: string ): Promise<IJSFetchReturn> {
|
|
35
|
+
// const performanceSettings: IPerformanceSettings = { label: 'myHubs', updateMiliseconds: true, includeMsStr: true, op: 'fetch' };
|
|
36
|
+
// const fetchOp = performanceSettings ? startPerformOpV2( performanceSettings ) : null;
|
|
37
|
+
// const apiFetchAssociatedHubs: string = `${webUrl}/_api/search/query?querytext='DepartmentId=${departmentId} contentclass:sts_${depth} -SiteId:${departmentId}'&selectproperties='${hubSelects.join(',')}'&rowlimit=${depth==='site'?200:500}`;// 9 Works
|
|
38
|
+
// const resultHubSites: IJSFetchReturn = await doSpJsFetch( apiFetchAssociatedHubs );
|
|
39
|
+
// if ( resultHubSites.ok ) resultHubSites.items = cleanSearchedWebs( resultHubSites.items );
|
|
40
|
+
// let result : IJSFetchReturn = unifiedPerformanceEnd( resultHubSites as IFpsErrorObject, performanceSettings, fetchOp, 'fetch', 'items' ) as IJSFetchReturn;
|
|
41
|
+
// result.fpsContentType = [ depth ];
|
|
42
|
+
// result = checkItemsResults( result as IFpsItemsReturn, `fps-library-v2: fetchMyHubsites ~ 30`, false, true ) as IJSFetchReturn;
|
|
43
|
+
// return resultHubSites;
|
|
44
|
+
// }
|
|
45
|
+
import { NonGroupGroupID } from '../functions/processHubSubResults';
|
|
46
|
+
/**
|
|
47
|
+
* fetchMyHubsites imported from HubCon on 2024-07-29.
|
|
48
|
+
* @param webUrl
|
|
49
|
+
* @param depth IFetchHubDepth = 'site' | 'web';
|
|
50
|
+
* @param departmentId
|
|
51
|
+
* @param filter IHubFilterType = 'Associated' | 'Hubs' | 'Teams' | 'HubAndAssoc';
|
|
52
|
+
* @returns
|
|
53
|
+
*/
|
|
54
|
+
export async function fetchMyHubsites(fpsSpService, webUrl, depth, departmentId, filter) {
|
|
55
|
+
const performanceSettings = { label: 'myHubs', updateMiliseconds: true, includeMsStr: true, op: 'fetch' };
|
|
56
|
+
const fetchOp = performanceSettings ? startPerformOpV2(performanceSettings) : null;
|
|
57
|
+
const minSearch = `${webUrl}/_api/search/query?querytext='DepartmentId=`;
|
|
58
|
+
const minSelectRowLimit = `'&selectproperties='${hubSelects.join(',')}'&rowlimit=`;
|
|
59
|
+
// 2024-12-22: digestValue not required when using SpHTTPClient
|
|
60
|
+
// const digestValue = await getThisFPSDigestValueFromUrl( webUrl );
|
|
61
|
+
// -SiteId:${departmentId}
|
|
62
|
+
let fetchAPIStr = ``;
|
|
63
|
+
// if ( filter === 'Associated' ) { fetchAPIStr = `${minSearch}${departmentId} contentclass:sts_${depth} -SiteId:${departmentId} ${ minSelectRowLimit }${depth==='site'?200:500}`; // 9 Works
|
|
64
|
+
if (filter === 'Associated') {
|
|
65
|
+
fetchAPIStr = `${webUrl}/_api/search/query?querytext='DepartmentId=${departmentId} contentclass:sts_${depth} -SiteId:${departmentId}'&selectproperties='${hubSelects.join(',')}'&rowlimit=${depth === 'site' ? 200 : 500}`; // 9 Works
|
|
66
|
+
}
|
|
67
|
+
if (filter === 'HubAndAssoc') {
|
|
68
|
+
fetchAPIStr = `${webUrl}/_api/search/query?querytext='DepartmentId=${departmentId} contentclass:sts_${depth}'&selectproperties='${hubSelects.join(',')}'&rowlimit=${depth === 'site' ? 200 : 500}`; // 9 Works
|
|
69
|
+
}
|
|
70
|
+
if (filter === 'Hubs') {
|
|
71
|
+
fetchAPIStr = `${webUrl}/_api/search/query?querytext='DepartmentId=* contentclass:sts_site GroupId:"${NonGroupGroupID}" ${minSelectRowLimit}${500}`; // 9 Works
|
|
72
|
+
}
|
|
73
|
+
if (filter === 'Teams') {
|
|
74
|
+
fetchAPIStr = `${minSearch}* contentclass:sts_site -GroupId:"${NonGroupGroupID}" ${minSelectRowLimit}${500}`; // 9 Works
|
|
75
|
+
// } if ( filter === 'AllChildSubs' ) { fetchAPIStr = `${minSearch}* contentclass:sts_site -GroupId:"${NonGroupGroupID}" ${ minSelectRowLimit }${500}`;// 9 Works
|
|
76
|
+
// } if ( filter === 'DirectChildren' ) { fetchAPIStr = `${minSearch}* contentclass:sts_site -GroupId:"${NonGroupGroupID}" ${ minSelectRowLimit }${500}`;// 9 Works
|
|
77
|
+
}
|
|
78
|
+
// fetchAPIStr = `${webUrl}/_api/search/query?querytext='DepartmentId=${departmentId} contentclass:sts_${depth} -SiteId:${departmentId}'&selectproperties='${hubSelects.join(',')}'&rowlimit=${depth==='site'?200:500}`;// 9 Works
|
|
79
|
+
// fetchAPIStr = `${minSearch}/${departmentId} contentclass:sts_${depth} -SiteId:${departmentId}'&selectproperties='${hubSelects.join(',')}'&rowlimit=${depth==='site'?200:500}`;// 9 Works
|
|
80
|
+
const resultHubSites = await doSpHttpFetchOrPostAndCheck(fetchAPIStr, 'GET', fpsSpService, '', false, true, 'hub', null);
|
|
81
|
+
if (resultHubSites.ok) {
|
|
82
|
+
resultHubSites.items = cleanSearchedWebs(resultHubSites.items);
|
|
83
|
+
}
|
|
84
|
+
if (filter === 'Hubs') {
|
|
85
|
+
resultHubSites.allHubs = resultHubSites.items.filter(item => item.DepartmentId.indexOf(item.SiteId) === 1);
|
|
86
|
+
//https://github.com/fps-solutions/HubCon/issues/23
|
|
87
|
+
resultHubSites.allHubs.sort((a, b) => a.Title.localeCompare(b.Title));
|
|
88
|
+
}
|
|
89
|
+
let result = unifiedPerformanceEnd(resultHubSites, performanceSettings, fetchOp, 'fetch', 'items');
|
|
90
|
+
result.fpsContentType = [depth];
|
|
91
|
+
result = checkItemsResults(fpsSpService, result, `fps-library-v2: fetchMyHubsites ~ 30`, false, true);
|
|
92
|
+
return resultHubSites;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=fetchMyHubsites.js.map
|
|
@@ -0,0 +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AAG,cAAc,CAAC,KAAK,CAAC,MAAM,CAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAE,IAAI,CAAC,MAAM,CAAE,KAAK,CAAC,CAAE,CAAC;QAC/G,mDAAmD;QACnD,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;KACvE;IAED,IAAI,MAAM,GAAoB,qBAAqB,CAAE,cAAiC,EAAE,mBAAmB,EAAE,OAAyB,EAAE,OAAO,EAAE,OAAO,CAAqB,CAAC;IAC9K,MAAM,CAAC,cAAc,GAAG,CAAE,KAAK,CAAE,CAAC;IAElC,MAAM,GAAG,iBAAiB,CAAE,YAAY,EAAE,MAAyB,EAAE,sCAAsC,EAAE,KAAK,EAAE,IAAI,CAAoB,CAAC;IAE7I,OAAO,cAAc,CAAC;AAExB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeAnalizerComment: Updated 5 imports on 2024-09-22 14:49:52
|
|
3
|
+
* Update:: import { IJSFetchReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
|
|
4
|
+
* Update:: import { doSpJsFetch } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
|
|
5
|
+
* Update:: import { IFpsErrorObject } to '@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFpsErrorObject;'
|
|
6
|
+
* Update:: import { IFpsItemsReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
|
|
7
|
+
* Update:: import { checkItemsResults } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
|
|
8
|
+
|
|
9
|
+
*/
|
|
10
|
+
import { IJSFetchReturn } from '../../../../components/molecules/SpHttp/IJSFetchReturn';
|
|
11
|
+
import { IFpsSpHttpServiceMIN } from '../../../../components/molecules/SpHttp/Sp/IFpsSpHttpServiceMIN';
|
|
12
|
+
/**
|
|
13
|
+
* This will fetch Subsites and their site logos, be sure to run EasyIcons after
|
|
14
|
+
* It does two fetches at the same time syncronosly.... needed due to SPO rest limiations.
|
|
15
|
+
* - apiSearchWebs api uses Search to find all subsites of the parent Url in order to get the actual SiteLogs
|
|
16
|
+
* - apiFilteredWebs api gets the actual current subsites the user has access to FOR THE CURRENT WEB.
|
|
17
|
+
* - Technically you could just use Search but that requires a crawl which may result in returning items that have been changed or deleted.
|
|
18
|
+
* Used in Pivot Tiles and Hub Connections.
|
|
19
|
+
*
|
|
20
|
+
* @param webUrl
|
|
21
|
+
* @param departmentId
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
export declare function fetchMySubsites(fpsSpService: IFpsSpHttpServiceMIN, webUrl: string): Promise<IJSFetchReturn>;
|
|
25
|
+
//# sourceMappingURL=fetchMySubsites.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchMySubsites.d.ts","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/fetches/fetchMySubsites.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAkBH,OAAO,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AAOxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iEAAiE,CAAC;AAGvG;;;;;;;;;;;GAWG;AACH,wBAAsB,eAAe,CAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,GAAK,OAAO,CAAC,cAAc,CAAC,CAgDpH"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeAnalizerComment: Updated 5 imports on 2024-09-22 14:49:52
|
|
3
|
+
* Update:: import { IJSFetchReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
|
|
4
|
+
* Update:: import { doSpJsFetch } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
|
|
5
|
+
* Update:: import { IFpsErrorObject } to '@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFpsErrorObject;'
|
|
6
|
+
* Update:: import { IFpsItemsReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
|
|
7
|
+
* Update:: import { checkItemsResults } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
|
|
8
|
+
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* CodeAnalizerComment: Updated 8 imports on 2024-09-21 23:07:24
|
|
12
|
+
* Update:: import { IJSFetchReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
|
|
13
|
+
* Update:: import { doSpJsFetch } to '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFetch;'
|
|
14
|
+
* Update:: import { IPerformanceSettings } to '@mikezimm/fps-core-v7/lib/components/molecules/Performance/IPerformanceSettings;'
|
|
15
|
+
* Update:: import { startPerformOpV2 } to '@mikezimm/fps-core-v7/lib/components/molecules/Performance/functions;'
|
|
16
|
+
* Update:: import { unifiedPerformanceEnd } to '@mikezimm/fps-core-v7/lib/components/molecules/Performance/functions;'
|
|
17
|
+
* Update:: import { IFpsErrorObject } to '@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFpsErrorObject;'
|
|
18
|
+
* Update:: import { IFpsItemsReturn } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
|
|
19
|
+
* Update:: import { checkItemsResults } to '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults;'
|
|
20
|
+
|
|
21
|
+
*/
|
|
22
|
+
import { cleanSearchedWebs } from '../functions/cleanSearchedWebs';
|
|
23
|
+
import { doSpHttpFetchOrPostAndCheck } from '../../../../components/molecules/SpHttp/Sp/doSpHttpFetch';
|
|
24
|
+
import { hubSelects } from '../interfaces/IFPSHubSiteDataDocsApi';
|
|
25
|
+
import { startPerformOpV2, unifiedPerformanceEnd } from '../../../../components/molecules/Performance/functions';
|
|
26
|
+
import { checkItemsResults } from '../../../../components/molecules/process-results/CheckWService/CheckItemsResults';
|
|
27
|
+
/**
|
|
28
|
+
* This will fetch Subsites and their site logos, be sure to run EasyIcons after
|
|
29
|
+
* It does two fetches at the same time syncronosly.... needed due to SPO rest limiations.
|
|
30
|
+
* - apiSearchWebs api uses Search to find all subsites of the parent Url in order to get the actual SiteLogs
|
|
31
|
+
* - apiFilteredWebs api gets the actual current subsites the user has access to FOR THE CURRENT WEB.
|
|
32
|
+
* - Technically you could just use Search but that requires a crawl which may result in returning items that have been changed or deleted.
|
|
33
|
+
* Used in Pivot Tiles and Hub Connections.
|
|
34
|
+
*
|
|
35
|
+
* @param webUrl
|
|
36
|
+
* @param departmentId
|
|
37
|
+
* @returns
|
|
38
|
+
*/
|
|
39
|
+
export async function fetchMySubsites(fpsSpService, webUrl) {
|
|
40
|
+
let performanceSettings = { label: 'mySubs', updateMiliseconds: true, includeMsStr: true, op: 'fetch' };
|
|
41
|
+
const fetchOp = performanceSettings ? startPerformOpV2(performanceSettings) : null;
|
|
42
|
+
// const apiSearchWebs: string = `${webUrl}/_api/search/query?querytext='DepartmentId=${departmentId} ParentLink=${webUrl} contentclass:STS_Web'&selectproperties='${hubSelects.join(',')}'&rowlimit=50`;// 9 Works
|
|
43
|
+
const apiSearchWebs = `${webUrl}/_api/search/query?querytext='ParentLink=${webUrl} contentclass:STS_Web'&selectproperties='${hubSelects.join(',')}'&rowlimit=200`; // 9 Works
|
|
44
|
+
const apiFilteredWebs = `${webUrl}/_api/web/getsubwebsfilteredforcurrentuser(nwebtemplatefilter=-1,nconfigurationfilter=0)`; // 12 Works! Finally from chatGPT
|
|
45
|
+
// this api only works for SiteAdmins on the site you are trying to fetch from
|
|
46
|
+
// const apiFilteredWebsOnlyWorksForSCAs: string = `${webUrl}//_api/web/webs?$select=Title`; // 12 Works! Finally from chatGPT
|
|
47
|
+
let [searchedWebs, filteredWebs,] = await Promise.all([
|
|
48
|
+
doSpHttpFetchOrPostAndCheck(apiSearchWebs, 'GET', fpsSpService, '', false, true, 'web', null),
|
|
49
|
+
doSpHttpFetchOrPostAndCheck(apiFilteredWebs, 'GET', fpsSpService, '', false, true, 'web', null),
|
|
50
|
+
]);
|
|
51
|
+
if (searchedWebs.ok)
|
|
52
|
+
searchedWebs.items = cleanSearchedWebs(searchedWebs.items);
|
|
53
|
+
const resultWebs = [];
|
|
54
|
+
// Search through the fetched webs and try to find SiteLogos from Search
|
|
55
|
+
if (filteredWebs.items)
|
|
56
|
+
filteredWebs.items.map(filteredWeb => {
|
|
57
|
+
const matchedWeb = searchedWebs.items ? searchedWebs.items.filter(cleanedWeb => { return cleanedWeb.ServerRelativeUrl === filteredWeb.ServerRelativeUrl; }) : [];
|
|
58
|
+
if (matchedWeb.length) {
|
|
59
|
+
// Added to support: https://github.com/mikezimm/pivottiles7/issues/289
|
|
60
|
+
const LastItemUserModifiedDate = filteredWeb.LastItemUserModifiedDate ? `${filteredWeb.LastItemUserModifiedDate}` : undefined;
|
|
61
|
+
filteredWeb = { ...filteredWeb, ...matchedWeb[0] };
|
|
62
|
+
filteredWeb.LastItemUserModifiedDate = LastItemUserModifiedDate; // Add this back after merging because matchedWeb does not have it.
|
|
63
|
+
}
|
|
64
|
+
resultWebs.push(filteredWeb);
|
|
65
|
+
});
|
|
66
|
+
searchedWebs.items = resultWebs;
|
|
67
|
+
// Go back and update searchWebs status if filteredWebs is not ok
|
|
68
|
+
if (filteredWebs.ok !== true)
|
|
69
|
+
searchedWebs.ok = filteredWebs.ok;
|
|
70
|
+
if (filteredWebs.ok !== true)
|
|
71
|
+
searchedWebs.status = filteredWebs.status;
|
|
72
|
+
if (filteredWebs.ok !== true)
|
|
73
|
+
searchedWebs.statusText = filteredWebs.statusText;
|
|
74
|
+
let result = unifiedPerformanceEnd(searchedWebs, performanceSettings, fetchOp, 'fetch', 'items');
|
|
75
|
+
result = checkItemsResults(fpsSpService, result, `fps-library-v2: fetchMySubsites ~ 62`, false, true);
|
|
76
|
+
result.fpsContentType = ['web'];
|
|
77
|
+
return result;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=fetchMySubsites.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchMySubsites.js","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/fetches/fetchMySubsites.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,0DAA0D,CAAC;AAEvG,OAAO,EAAoB,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAEjH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kFAAkF,CAAC;AAKrH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAE,YAAkC,EAAE,MAAc;IAEvF,IAAI,mBAAmB,GAAyB,EAAG,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC;IAC/H,MAAM,OAAO,GAAG,mBAAmB,CAAC,CAAC,CAAC,gBAAgB,CAAE,mBAAmB,CAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAErF,mNAAmN;IACnN,MAAM,aAAa,GAAW,GAAG,MAAM,4CAA4C,MAAM,4CAA4C,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA,UAAU;IACpL,MAAM,eAAe,GAAW,GAAG,MAAM,0FAA0F,CAAC,CAAC,kCAAkC;IAEvK,8EAA8E;IAC9E,+HAA+H;IAE/H,I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K,GAAG,UAAU,CAAC;IAEhC,iEAAiE;IACjE,IAAK,YAAY,CAAC,EAAE,KAAK,IAAI;QAAG,YAAY,CAAC,EAAE,GAAG,YAAY,CAAC,EAAE,CAAC;IAClE,IAAK,YAAY,CAAC,EAAE,KAAK,IAAI;QAAG,YAAY,CAAC,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;IAC1E,IAAK,YAAY,CAAC,EAAE,KAAK,IAAI;QAAG,YAAY,CAAC,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC;IAElF,IAAI,MAAM,GAAoB,qBAAqB,CAAE,YAA+B,EAAE,mBAAmB,EAAE,OAAyB,EAAE,OAAO,EAAE,OAAO,CAAqB,CAAC;IAE5K,MAAM,GAAG,iBAAiB,CAAE,YAAY,EAAE,MAAyB,EAAE,sCAAsC,EAAE,KAAK,EAAE,IAAI,CAAoB,CAAC;IAC7I,MAAM,CAAC,cAAc,GAAG,CAAE,KAAK,CAAE,CAAC;IAElC,OAAO,MAAM,CAAC;AAEhB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IFPSWebsWithLogo } from '../interfaces/IFPSHubSiteDataDocsApi';
|
|
2
|
+
/**
|
|
3
|
+
* cleanSearchedWebs will go through results from the Search API for Hubs and Subs and clean up the results.
|
|
4
|
+
* - it also adds some duplicate properties that are already used in other web parts like Pivot Tiles and Hub Connections.
|
|
5
|
+
* @param searchedWebs
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function cleanSearchedWebs(searchedWebs: any[]): IFPSWebsWithLogo[];
|
|
9
|
+
//# sourceMappingURL=cleanSearchedWebs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleanSearchedWebs.d.ts","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/functions/cleanSearchedWebs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAc,MAAM,sCAAsC,CAAC;AAGpF;;;;;GAKG;AAGH,wBAAgB,iBAAiB,CAAE,YAAY,EAAE,GAAG,EAAE,GAAI,gBAAgB,EAAE,CAkC3E"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { CurrentOrigin } from '../../../../components/molecules/source-props/WindowLocationConstants';
|
|
2
|
+
import { hubSelects } from '../interfaces/IFPSHubSiteDataDocsApi';
|
|
3
|
+
// import { check4This } from '@mikezimm/fps-core-v7/lib/logic/Links/CheckSearch';
|
|
4
|
+
/**
|
|
5
|
+
* cleanSearchedWebs will go through results from the Search API for Hubs and Subs and clean up the results.
|
|
6
|
+
* - it also adds some duplicate properties that are already used in other web parts like Pivot Tiles and Hub Connections.
|
|
7
|
+
* @param searchedWebs
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
+
export function cleanSearchedWebs(searchedWebs) {
|
|
12
|
+
// get Cleaned Search
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
|
+
const cleanWebs = [];
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
+
searchedWebs.map((item) => {
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
+
const thisItem = {};
|
|
19
|
+
hubSelects.map((prop, idx2) => {
|
|
20
|
+
if (item.Cells[idx2])
|
|
21
|
+
thisItem[prop] = item.Cells[idx2].Value;
|
|
22
|
+
});
|
|
23
|
+
// commonize some props for easier compatibility with other web parts
|
|
24
|
+
if (!thisItem.imageUrl)
|
|
25
|
+
thisItem.imageUrl = thisItem.SiteLogo ? thisItem.SiteLogo : thisItem.PictureThumbnailURL;
|
|
26
|
+
if (!thisItem.title)
|
|
27
|
+
thisItem.title = thisItem.Title;
|
|
28
|
+
// Added this beause includes ServerRelativeUrl but not Path but searchedWebs include Path and not ServerRelativeUrl
|
|
29
|
+
if (!thisItem.ServerRelativeUrl)
|
|
30
|
+
thisItem.ServerRelativeUrl = thisItem.Path ? thisItem.Path.replace(CurrentOrigin, '') : '';
|
|
31
|
+
if (!thisItem.href)
|
|
32
|
+
thisItem.href = thisItem.ServerRelativeUrl ? thisItem.ServerRelativeUrl : thisItem.Path;
|
|
33
|
+
if (!thisItem.description)
|
|
34
|
+
thisItem.description = thisItem.Description;
|
|
35
|
+
if (!thisItem.sourceType)
|
|
36
|
+
thisItem.sourceType = thisItem.sourceType = `sites`;
|
|
37
|
+
cleanWebs.push(thisItem);
|
|
38
|
+
});
|
|
39
|
+
return cleanWebs;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=cleanSearchedWebs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleanSearchedWebs.js","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/functions/cleanSearchedWebs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uEAAuE,CAAC;AACtG,OAAO,EAAoB,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACpF,kFAAkF;AAElF;;;;;GAKG;AAEH,8DAA8D;AAC9D,MAAM,UAAU,iBAAiB,CAAE,YAAmB;IAEpD,qBAAqB;IAErB,8DAA8D;IAC9D,MAAM,SAAS,GAAU,EAAE,CAAC;IAE5B,8DAA8D;IAC9D,YAAY,CAAC,GAAG,CAAG,CAAE,IAAS,EAAG,EAAE;QAEjC,8DAA8D;QAC9D,MAAM,QAAQ,GAAQ,EAAE,CAAC;QACzB,UAAU,CAAC,GAAG,CAAE,CAAE,IAAI,EAAE,IAAI,EAAG,EAAE;YAC/B,IAAK,IAAI,CAAC,KAAK,CAAE,IAAI,CAAE;gBAAG,QAAQ,CAAE,IAAI,CAAE,GAAG,IAAI,CAAC,KAAK,CAAE,IAAI,CAAE,CAAC,KAAK,CAAC;QACxE,CAAC,CAAC,CAAC;QAEH,qEAAqE;QACrE,IAAK,CAAC,QAAQ,CAAC,QAAQ;YAAG,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC;QACnH,IAAK,CAAC,QAAQ,CAAC,KAAK;YAAG,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;QAEvD,oHAAoH;QACpH,IAAK,CAAC,QAAQ,CAAC,iBAAiB;YAAG,QAAQ,CAAC,iBAAiB,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAE,aAAa,EAAE,EAAE,CAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAEhI,IAAK,CAAC,QAAQ,CAAC,IAAI;YAAG,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;QAE9G,IAAK,CAAC,QAAQ,CAAC,WAAW;YAAG,QAAQ,CAAC,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC;QACzE,IAAK,CAAC,QAAQ,CAAC,UAAU;YAAG,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU,GAAG,OAAO,CAAC;QAEhF,SAAS,CAAC,IAAI,CAAE,QAAQ,CAAE,CAAC;IAE7B,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AAEnB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeAnalizerComment: Updated 2 imports on 2024-09-21 23:07:24
|
|
3
|
+
* Update:: import { CurrentTenant } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/IMinSourceFetchProps;'
|
|
4
|
+
* Update:: import { ISourceProps } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/ISourceProps;'
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
import { ISourceProps } from "../../../../components/molecules/source-props/ISourceProps";
|
|
8
|
+
export declare const HubSubSourceProps: ISourceProps;
|
|
9
|
+
export declare const WebSourceProps: ISourceProps;
|
|
10
|
+
//# sourceMappingURL=createHubSubSourceProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createHubSubSourceProps.d.ts","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/functions/createHubSubSourceProps.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,4DAA4D,CAAC;AAK1F,eAAO,MAAM,iBAAiB,EAAE,YAuC/B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,YAAsG,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeAnalizerComment: Updated 2 imports on 2024-09-21 23:07:24
|
|
3
|
+
* Update:: import { CurrentTenant } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/IMinSourceFetchProps;'
|
|
4
|
+
* Update:: import { ISourceProps } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/ISourceProps;'
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
import { CurrentTenant } from "../../../../components/molecules/source-props/WindowLocationConstants";
|
|
8
|
+
import { hubSelects } from "../interfaces/IFPSHubSiteDataDocsApi";
|
|
9
|
+
import { makeid } from "../../../../logic/Strings/guids";
|
|
10
|
+
export const HubSubSourceProps = {
|
|
11
|
+
fpsSpService: null,
|
|
12
|
+
key: 'sites',
|
|
13
|
+
refreshId: makeid(5),
|
|
14
|
+
defType: 'sites',
|
|
15
|
+
fpsContentType: ['site',],
|
|
16
|
+
tenant: CurrentTenant,
|
|
17
|
+
webUrl: ``,
|
|
18
|
+
listTitle: '',
|
|
19
|
+
webRelativeLink: '',
|
|
20
|
+
searchSource: '',
|
|
21
|
+
searchSourceDesc: '',
|
|
22
|
+
// editProps: [ 'Title' , 'Description', 'SiteLogoUrl', 'ServerRelativeUrl' ],
|
|
23
|
+
viewProps: hubSelects,
|
|
24
|
+
columns: hubSelects,
|
|
25
|
+
searchProps: hubSelects,
|
|
26
|
+
selectThese: hubSelects,
|
|
27
|
+
// itemFetchCol: ExtraFetchModernPage,
|
|
28
|
+
// isModern: true,
|
|
29
|
+
// restFilter - see src\components\molecules\SpHttp\HubsSubs\fetches\fetchMyHubsites.ts
|
|
30
|
+
// restFilter: "Id ne 'X' and ContentTypeId ne '0x012000F6C75276DBE501468CA3CC575AD8E159' and Title ne 'Home'",
|
|
31
|
+
// restFilter: "Id ne 'X' and ContentTypeId ne '0x012000F6C75276DBE501468CA3CC575AD8E159'",
|
|
32
|
+
// evalFilter: ``,
|
|
33
|
+
defSearchButtons: ['*', '-',],
|
|
34
|
+
fetchCount: 200,
|
|
35
|
+
orderBy: {
|
|
36
|
+
prop: 'Title',
|
|
37
|
+
order: 'asc',
|
|
38
|
+
asc: true,
|
|
39
|
+
},
|
|
40
|
+
meta0: [],
|
|
41
|
+
meta1: [],
|
|
42
|
+
meta2: [],
|
|
43
|
+
meta3: [],
|
|
44
|
+
metaX: [],
|
|
45
|
+
performanceSettings: { label: 'HubSub', updateMiliseconds: true, includeMsStr: true, op: 'fetch' },
|
|
46
|
+
};
|
|
47
|
+
export const WebSourceProps = { ...HubSubSourceProps, ...{ key: 'webs', defType: 'webs', fpsContentType: ['web'], } };
|
|
48
|
+
//# sourceMappingURL=createHubSubSourceProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createHubSubSourceProps.js","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/functions/createHubSubSourceProps.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uEAAuE,CAAC;AAEtG,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAGzD,MAAM,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Update:: import { addPopularityToItems } to '@mikezimm/fps-core-v7/lib/components/molecules/SearchPage/functions/markPopular;'
|
|
4
|
+
* Update:: import { addSearchMeta1 } to '@mikezimm/fps-core-v7/lib/components/molecules/SearchPage/functions/addSearchMeta1;'
|
|
5
|
+
* Update:: import { addItemIsA } to '@mikezimm/fps-core-v7/lib/components/molecules/SearchPage/functions/addItemIsA;'
|
|
6
|
+
|
|
7
|
+
*/
|
|
8
|
+
import { ISourceProps } from '../../../../components/molecules/source-props/ISourceProps';
|
|
9
|
+
import { ISourceSearch } from '../../../../components/molecules/SearchPage/Interfaces/ISourceSearch';
|
|
10
|
+
import { IStateSourceHubSubs } from '../getHubAssocSites';
|
|
11
|
+
import { IItemIsAKeys } from '../../../../components/molecules/AnyContent/IsA/IFPSItemIsA';
|
|
12
|
+
export declare const NonGroupGroupID: string;
|
|
13
|
+
/**
|
|
14
|
+
* processHubSubResults adds addSearchMeta1, Popularity and IsA keys to sub, hubs
|
|
15
|
+
* @param results
|
|
16
|
+
* @param sourceProps - used in addSearchMeta1
|
|
17
|
+
* @param search - used in addSearchMeta1
|
|
18
|
+
* @param departmentId
|
|
19
|
+
* @param siteIsAKeys
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
export declare function processHubSubResults(results: IStateSourceHubSubs, sourceProps: ISourceProps, search: ISourceSearch, departmentId: string, siteIsAKeys?: IItemIsAKeys[]): IStateSourceHubSubs;
|
|
23
|
+
//# sourceMappingURL=processHubSubResults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processHubSubResults.d.ts","sourceRoot":"","sources":["../../../../../src/restAPIs/sites/HubsSubs/functions/processHubSubResults.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqBH,OAAO,EAAE,YAAY,EAAE,MAAM,4DAA4D,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,sEAAsE,CAAC;AAErG,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAgE,MAAM,6DAA6D,CAAC;AAIzJ,eAAO,MAAM,eAAe,EAAE,MAA+C,CAAC;AAE9E;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,GAAE,YAAY,EAAO,GAAI,mBAAmB,CAqElM"}
|