@mikezimm/fps-core-v7 1.0.36 → 1.0.38
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/banner/FPSWebPartClass/functions/updateUrlParam.d.ts.map +1 -1
- package/lib/banner/FPSWebPartClass/functions/updateUrlParam.js +2 -1
- package/lib/banner/FPSWebPartClass/functions/updateUrlParam.js.map +1 -1
- package/lib/banner/FPSWebPartClass/getCert.d.ts.map +1 -1
- package/lib/banner/FPSWebPartClass/getCert.js +2 -1
- package/lib/banner/FPSWebPartClass/getCert.js.map +1 -1
- package/lib/banner/bannerX/sendFeedback.d.ts.map +1 -1
- package/lib/banner/bannerX/sendFeedback.js +2 -1
- package/lib/banner/bannerX/sendFeedback.js.map +1 -1
- package/lib/banner/components/ItemPicker/functions/fetchFileList.d.ts.map +1 -1
- package/lib/banner/components/ItemPicker/functions/fetchFileList.js +2 -1
- package/lib/banner/components/ItemPicker/functions/fetchFileList.js.map +1 -1
- package/lib/banner/components/ItemPicker/functions/fetchListList.d.ts.map +1 -1
- package/lib/banner/components/ItemPicker/functions/fetchListList.js +2 -1
- package/lib/banner/components/ItemPicker/functions/fetchListList.js.map +1 -1
- package/lib/banner/features/FPSDOM/FPSEnviro.d.ts.map +1 -1
- package/lib/banner/features/FPSDOM/FPSEnviro.js +4 -3
- package/lib/banner/features/FPSDOM/FPSEnviro.js.map +1 -1
- package/lib/banner/features/FPSDOM/IFPSDigestValues.d.ts +1 -1
- package/lib/banner/features/FPSDOM/IFPSDigestValues.d.ts.map +1 -1
- package/lib/banner/features/Tricky/logfun.d.ts.map +1 -1
- package/lib/banner/features/Tricky/logfun.js +7 -6
- package/lib/banner/features/Tricky/logfun.js.map +1 -1
- package/lib/components/atoms/SharedItems/processSharedItems.d.ts.map +1 -1
- package/lib/components/atoms/SharedItems/processSharedItems.js +2 -1
- package/lib/components/atoms/SharedItems/processSharedItems.js.map +1 -1
- package/lib/components/atoms/easy-analytics/functions/createAnalyticsSourceProps.js +2 -2
- package/lib/components/atoms/easy-analytics/functions/createAnalyticsSourceProps.js.map +1 -1
- package/lib/components/atoms/easy-analytics/interfaces/constants.js +1 -1
- package/lib/components/atoms/easy-analytics/interfaces/constants.js.map +1 -1
- package/lib/components/atoms/easy-icons/interfaces/EasyIconLocation.d.ts.map +1 -1
- package/lib/components/atoms/easy-icons/interfaces/EasyIconLocation.js +2 -1
- package/lib/components/atoms/easy-icons/interfaces/EasyIconLocation.js.map +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromContext/getThisFPSDigestValueFromContext.js +2 -2
- package/lib/components/molecules/SpHttp/digestValues/fromContext/getThisFPSDigestValueFromContext.js.map +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/addFPSDigestToSourceProps.d.ts +3 -0
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/addFPSDigestToSourceProps.d.ts.map +1 -0
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/addFPSDigestToSourceProps.js +16 -0
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/addFPSDigestToSourceProps.js.map +1 -0
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl.js +6 -2
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl.js.map +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/setMultiFPSFormDigests.js +2 -2
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/setMultiFPSFormDigests.js.map +1 -1
- package/lib/components/molecules/SpHttp/doSpJsBatchFetch.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/doSpJsBatchFetch.js +4 -3
- package/lib/components/molecules/SpHttp/doSpJsBatchFetch.js.map +1 -1
- package/lib/components/molecules/SpHttp/doSpJsFetch.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/doSpJsFetch.js +4 -3
- package/lib/components/molecules/SpHttp/doSpJsFetch.js.map +1 -1
- package/lib/components/molecules/SpHttp/doSpJsFileFetch.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/doSpJsFileFetch.js +4 -3
- package/lib/components/molecules/SpHttp/doSpJsFileFetch.js.map +1 -1
- package/lib/components/molecules/SpHttp/helpers/check4ThisFPSDigestValue.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/helpers/check4ThisFPSDigestValue.js +28 -5
- package/lib/components/molecules/SpHttp/helpers/check4ThisFPSDigestValue.js.map +1 -1
- package/lib/components/molecules/SpHttp/helpers/getCurrentFPSDigest.js +5 -5
- package/lib/components/molecules/SpHttp/helpers/getCurrentFPSDigest.js.map +1 -1
- package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.d.ts +3 -0
- package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.d.ts.map +1 -0
- package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.js +15 -0
- package/lib/components/molecules/process-results/createEmptyFpsErrorReturn.js.map +1 -0
- package/lib/components/molecules/process-results/createEmptyFpsItemsReturn.d.ts +0 -1
- package/lib/components/molecules/process-results/createEmptyFpsItemsReturn.d.ts.map +1 -1
- package/lib/components/molecules/process-results/createEmptyFpsItemsReturn.js +2 -2
- package/lib/components/molecules/process-results/createEmptyFpsItemsReturn.js.map +1 -1
- package/lib/components/molecules/process-results/createEmptyFpsUsersReturn.d.ts.map +1 -1
- package/lib/components/molecules/process-results/createEmptyFpsUsersReturn.js +3 -3
- package/lib/components/molecules/process-results/createEmptyFpsUsersReturn.js.map +1 -1
- package/lib/components/molecules/process-results/createErrorFpsFileReturn.d.ts +3 -0
- package/lib/components/molecules/process-results/createErrorFpsFileReturn.d.ts.map +1 -0
- package/lib/components/molecules/process-results/createErrorFpsFileReturn.js +9 -0
- package/lib/components/molecules/process-results/createErrorFpsFileReturn.js.map +1 -0
- package/lib/components/molecules/process-results/createErrorFpsListItemsReturn.d.ts.map +1 -1
- package/lib/components/molecules/process-results/createErrorFpsListItemsReturn.js +2 -4
- package/lib/components/molecules/process-results/createErrorFpsListItemsReturn.js.map +1 -1
- package/lib/components/molecules/source-props/IMinSourceFetchProps.d.ts +0 -4
- package/lib/components/molecules/source-props/IMinSourceFetchProps.d.ts.map +1 -1
- package/lib/components/molecules/source-props/IMinSourceFetchProps.js +9 -7
- package/lib/components/molecules/source-props/IMinSourceFetchProps.js.map +1 -1
- package/lib/components/molecules/source-props/Lists/createListSource.d.ts +1 -0
- package/lib/components/molecules/source-props/Lists/createListSource.d.ts.map +1 -1
- package/lib/components/molecules/source-props/Lists/createListSource.js +12 -3
- package/lib/components/molecules/source-props/Lists/createListSource.js.map +1 -1
- package/lib/components/molecules/source-props/SitePages/NewsLinksSource.js +1 -1
- package/lib/components/molecules/source-props/SitePages/NewsLinksSource.js.map +1 -1
- package/lib/components/molecules/source-props/SitePages/NewsSource.js +1 -1
- package/lib/components/molecules/source-props/SitePages/NewsSource.js.map +1 -1
- package/lib/components/molecules/source-props/SitePages/SitePagesSource.js +1 -1
- package/lib/components/molecules/source-props/SitePages/SitePagesSource.js.map +1 -1
- package/lib/components/molecules/source-props/WindowLocationConstants.d.ts +34 -0
- package/lib/components/molecules/source-props/WindowLocationConstants.d.ts.map +1 -0
- package/lib/components/molecules/source-props/WindowLocationConstants.js +57 -0
- package/lib/components/molecules/source-props/WindowLocationConstants.js.map +1 -0
- package/lib/components/molecules/source-props/createGroupsSource.d.ts +14 -0
- package/lib/components/molecules/source-props/createGroupsSource.d.ts.map +1 -0
- package/lib/components/molecules/source-props/createGroupsSource.js +49 -0
- package/lib/components/molecules/source-props/createGroupsSource.js.map +1 -0
- package/lib/components/molecules/source-props/createLibrarySource.d.ts +1 -0
- package/lib/components/molecules/source-props/createLibrarySource.d.ts.map +1 -1
- package/lib/components/molecules/source-props/createLibrarySource.js +12 -3
- package/lib/components/molecules/source-props/createLibrarySource.js.map +1 -1
- package/lib/components/molecules/state-source/IStateSource.d.ts.map +1 -1
- package/lib/components/molecules/state-source/IStateSource.js +2 -2
- package/lib/components/molecules/state-source/IStateSource.js.map +1 -1
- package/lib/logic/Links/UrlFunctions.d.ts.map +1 -1
- package/lib/logic/Links/UrlFunctions.js +9 -8
- package/lib/logic/Links/UrlFunctions.js.map +1 -1
- package/lib/logic/Links/getAllDomainsFromUrls.d.ts.map +1 -1
- package/lib/logic/Links/getAllDomainsFromUrls.js +6 -5
- package/lib/logic/Links/getAllDomainsFromUrls.js.map +1 -1
- package/lib/logic/Links/getDomainTypeFromUrl.js +1 -1
- package/lib/logic/Links/getDomainTypeFromUrl.js.map +1 -1
- package/lib/logic/Links/getSPOUrl.d.ts +7 -0
- package/lib/logic/Links/getSPOUrl.d.ts.map +1 -1
- package/lib/logic/Links/getSPOUrl.js +7 -0
- package/lib/logic/Links/getSPOUrl.js.map +1 -1
- package/lib/logic/Strings/getAbssoluteWebUrlFromSourceProps.d.ts +0 -1
- package/lib/logic/Strings/getAbssoluteWebUrlFromSourceProps.d.ts.map +1 -1
- package/lib/logic/Strings/getAbssoluteWebUrlFromSourceProps.js +1 -6
- package/lib/logic/Strings/getAbssoluteWebUrlFromSourceProps.js.map +1 -1
- package/lib/logic/Strings/getFullUrlFromSlashSitesUrl.d.ts +0 -5
- package/lib/logic/Strings/getFullUrlFromSlashSitesUrl.d.ts.map +1 -1
- package/lib/logic/Strings/getFullUrlFromSlashSitesUrl.js +21 -23
- package/lib/logic/Strings/getFullUrlFromSlashSitesUrl.js.map +1 -1
- package/lib/logic/Strings/getSiteCollectionUrlFromLink.d.ts +18 -0
- package/lib/logic/Strings/getSiteCollectionUrlFromLink.d.ts.map +1 -1
- package/lib/logic/Strings/getSiteCollectionUrlFromLink.js +33 -3
- package/lib/logic/Strings/getSiteCollectionUrlFromLink.js.map +1 -1
- package/lib/logic/Strings/urlServices.d.ts +0 -1
- package/lib/logic/Strings/urlServices.d.ts.map +1 -1
- package/lib/logic/Strings/urlServices.js +2 -2
- package/lib/logic/Strings/urlServices.js.map +1 -1
- package/lib/restAPIs/lists/files/getFileEmbedUrl.d.ts +37 -0
- package/lib/restAPIs/lists/files/getFileEmbedUrl.d.ts.map +1 -0
- package/lib/restAPIs/lists/files/getFileEmbedUrl.js +74 -0
- package/lib/restAPIs/lists/files/getFileEmbedUrl.js.map +1 -0
- package/lib/restAPIs/lists/items/getSourceItemsAPI.d.ts +5 -0
- package/lib/restAPIs/lists/items/getSourceItemsAPI.d.ts.map +1 -1
- package/lib/restAPIs/lists/items/getSourceItemsAPI.js +14 -1
- package/lib/restAPIs/lists/items/getSourceItemsAPI.js.map +1 -1
- package/lib/restAPIs/lists/items/getSourceItemsBatchAPI.d.ts +1 -3
- package/lib/restAPIs/lists/items/getSourceItemsBatchAPI.d.ts.map +1 -1
- package/lib/restAPIs/lists/items/getSourceItemsBatchAPI.js +37 -35
- package/lib/restAPIs/lists/items/getSourceItemsBatchAPI.js.map +1 -1
- package/lib/restAPIs/lists/items/getTodayRestFilter.d.ts +9 -0
- package/lib/restAPIs/lists/items/getTodayRestFilter.d.ts.map +1 -0
- package/lib/restAPIs/lists/items/getTodayRestFilter.js +29 -0
- package/lib/restAPIs/lists/items/getTodayRestFilter.js.map +1 -0
- package/lib/restAPIs/lists/items/postSourceItemsAPI.d.ts.map +1 -1
- package/lib/restAPIs/lists/items/postSourceItemsAPI.js.map +1 -1
- package/lib/restAPIs/logging/interfaces/constants.d.ts.map +1 -1
- package/lib/restAPIs/logging/interfaces/constants.js +11 -3
- package/lib/restAPIs/logging/interfaces/constants.js.map +1 -1
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.d.ts +4 -4
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.d.ts.map +1 -1
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.js +8 -5
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.js.map +1 -1
- package/lib/restAPIs/sites/groups/getWebAssociatedGroupAPI.d.ts.map +1 -1
- package/lib/restAPIs/sites/groups/getWebAssociatedGroupAPI.js +7 -6
- package/lib/restAPIs/sites/groups/getWebAssociatedGroupAPI.js.map +1 -1
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.d.ts +2 -2
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.d.ts.map +1 -1
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.js +3 -2
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.js.map +1 -1
- package/lib/restAPIs/sites/groups/getWebGroupInfoBatchAPI.d.ts +4 -0
- package/lib/restAPIs/sites/groups/getWebGroupInfoBatchAPI.d.ts.map +1 -0
- package/lib/restAPIs/sites/groups/getWebGroupInfoBatchAPI.js +28 -0
- package/lib/restAPIs/sites/groups/getWebGroupInfoBatchAPI.js.map +1 -0
- package/lib/restAPIs/sites/users/UserSelects.d.ts +5 -0
- package/lib/restAPIs/sites/users/UserSelects.d.ts.map +1 -0
- package/lib/restAPIs/sites/users/UserSelects.js +6 -0
- package/lib/restAPIs/sites/users/UserSelects.js.map +1 -0
- package/lib/restAPIs/sites/users/getSiteUsersAPI.d.ts.map +1 -1
- package/lib/restAPIs/sites/users/getSiteUsersAPI.js +9 -4
- package/lib/restAPIs/sites/users/getSiteUsersAPI.js.map +1 -1
- package/lib/restAPIs/sites/users/getSiteUsersBatchAPI.d.ts +4 -0
- package/lib/restAPIs/sites/users/getSiteUsersBatchAPI.d.ts.map +1 -0
- package/lib/restAPIs/sites/users/getSiteUsersBatchAPI.js +28 -0
- package/lib/restAPIs/sites/users/getSiteUsersBatchAPI.js.map +1 -0
- package/lib/types/@pnp/@2.14.0/sp/site-users.d.ts +1 -0
- package/lib/types/@pnp/@2.14.0/sp/site-users.d.ts.map +1 -1
- package/lib/types/fps-returns/common/IFPSResultStatus.d.ts +1 -1
- package/lib/types/fps-returns/common/IFPSResultStatus.d.ts.map +1 -1
- package/lib/types/fps-returns/common/IFPSResultStatus.js +1 -1
- package/lib/types/fps-returns/common/IFPSResultStatus.js.map +1 -1
- package/lib/types/fps-returns/sites/groups/IGroupResults.d.ts +3 -3
- package/lib/types/fps-returns/sites/groups/IGroupResults.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/restAPIs/sites/users/UserGroupSelects.d.ts +0 -3
- package/lib/restAPIs/sites/users/UserGroupSelects.d.ts.map +0 -1
- package/lib/restAPIs/sites/users/UserGroupSelects.js +0 -3
- package/lib/restAPIs/sites/users/UserGroupSelects.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { makeAbsoluteUrl } from "./getSiteCollectionUrlFromLink";
|
|
2
2
|
/**
|
|
3
3
|
* To be used for any JS Fetch where you need the full absolute web url for the API
|
|
4
4
|
*
|
|
@@ -10,9 +10,4 @@ export function getAbsoluteWebUrlFromSourceProps(sourceProps) {
|
|
|
10
10
|
let useUrl = absoluteWebUrl ? absoluteWebUrl : webUrl ? webUrl : '';
|
|
11
11
|
return makeAbsoluteUrl(useUrl);
|
|
12
12
|
}
|
|
13
|
-
export function makeAbsoluteUrl(useUrl) {
|
|
14
|
-
if (useUrl && useUrl.indexOf('/sites/') === 0)
|
|
15
|
-
useUrl = `${TenantUrlOrigin}${useUrl}`;
|
|
16
|
-
return useUrl;
|
|
17
|
-
}
|
|
18
13
|
//# sourceMappingURL=getAbssoluteWebUrlFromSourceProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAbssoluteWebUrlFromSourceProps.js","sourceRoot":"","sources":["../../../src/logic/Strings/getAbssoluteWebUrlFromSourceProps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getAbssoluteWebUrlFromSourceProps.js","sourceRoot":"","sources":["../../../src/logic/Strings/getAbssoluteWebUrlFromSourceProps.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,UAAU,gCAAgC,CAAE,WAAyB;IACzE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC;IAC/C,IAAI,MAAM,GAAW,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5E,OAAO,eAAe,CAAE,MAAM,CAAE,CAAC;AACnC,CAAC"}
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NOTE This only works when the /sites/ you are refering to is in the same tenant
|
|
3
|
-
* @param relUrl
|
|
4
|
-
*/
|
|
5
|
-
export declare function getFullUrlFromSlashSitesUrl(relUrl: string, showConsole?: boolean): string;
|
|
6
1
|
//# sourceMappingURL=getFullUrlFromSlashSitesUrl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFullUrlFromSlashSitesUrl.d.ts","sourceRoot":"","sources":["../../../src/logic/Strings/getFullUrlFromSlashSitesUrl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getFullUrlFromSlashSitesUrl.d.ts","sourceRoot":"","sources":["../../../src/logic/Strings/getFullUrlFromSlashSitesUrl.ts"],"names":[],"mappings":""}
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return newURL;
|
|
23
|
-
}
|
|
1
|
+
// import { CurrentOrigin } from "../../components/molecules/source-props/WindowLocationConstants";
|
|
2
|
+
// import { check4This } from "../Links/CheckSearch";
|
|
3
|
+
// /**
|
|
4
|
+
// * NOTE This only works when the /sites/ you are refering to is in the same tenant
|
|
5
|
+
// * REPLACED with: makeAbsoluteUrl
|
|
6
|
+
// * @param relUrl
|
|
7
|
+
// */
|
|
8
|
+
// export function getFullUrlFromSlashSitesUrl(relUrl: string, showConsole: boolean = true): string {
|
|
9
|
+
// if (relUrl === undefined || relUrl === null) { relUrl = ''; }
|
|
10
|
+
// let newURL = relUrl + '';
|
|
11
|
+
// //Added this to prevent errors in next
|
|
12
|
+
// if (!relUrl || relUrl.length === 0) {
|
|
13
|
+
// newURL = '';
|
|
14
|
+
// }
|
|
15
|
+
// if (relUrl.indexOf('/sites/') === 0 || relUrl.indexOf('/teams/') === 0 ) {
|
|
16
|
+
// // let domain = window.location.href.substr( 0, window.location.href.indexOf('/sites/') );
|
|
17
|
+
// newURL = CurrentOrigin + relUrl;
|
|
18
|
+
// if (check4This('prepSource') === true) { console.log('updated Url to: ', newURL); }
|
|
19
|
+
// }
|
|
20
|
+
// return newURL;
|
|
21
|
+
// }
|
|
24
22
|
//# sourceMappingURL=getFullUrlFromSlashSitesUrl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFullUrlFromSlashSitesUrl.js","sourceRoot":"","sources":["../../../src/logic/Strings/getFullUrlFromSlashSitesUrl.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"getFullUrlFromSlashSitesUrl.js","sourceRoot":"","sources":["../../../src/logic/Strings/getFullUrlFromSlashSitesUrl.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,qDAAqD;AAErD,MAAM;AACN,qFAAqF;AACrF,wCAAwC;AACxC,mBAAmB;AACnB,MAAM;AAEN,qGAAqG;AACrG,kEAAkE;AAClE,8BAA8B;AAC9B,2CAA2C;AAC3C,0CAA0C;AAC1C,mBAAmB;AACnB,MAAM;AACN,+EAA+E;AAC/E,iGAAiG;AACjG,uCAAuC;AACvC,0FAA0F;AAE1F,MAAM;AACN,mBAAmB;AACnB,IAAI"}
|
|
@@ -1,2 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE: WORKS ONLY ON CURRENT TENANT
|
|
3
|
+
* returns this:
|
|
4
|
+
* https://tenant.sharepoint.com/sites/SiteCollection
|
|
5
|
+
*
|
|
6
|
+
* Use makeAbsoluteUrl if you need the full Url after the collection
|
|
7
|
+
*
|
|
8
|
+
* @param link
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
1
11
|
export declare function getSiteCollectionUrlFromLink(link: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* returns this:
|
|
14
|
+
* https://tenant.sharepoint.com/sites/SiteCollection/Subsite/SitePages/Page.aspx
|
|
15
|
+
*
|
|
16
|
+
* NOTE This only works when the /[ sites | teams ]/ you are refering to is in the same tenant
|
|
17
|
+
* @param relUrl
|
|
18
|
+
*/
|
|
19
|
+
export declare function makeAbsoluteUrl(useUrl: string): string;
|
|
2
20
|
//# sourceMappingURL=getSiteCollectionUrlFromLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSiteCollectionUrlFromLink.d.ts","sourceRoot":"","sources":["../../../src/logic/Strings/getSiteCollectionUrlFromLink.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getSiteCollectionUrlFromLink.d.ts","sourceRoot":"","sources":["../../../src/logic/Strings/getSiteCollectionUrlFromLink.ts"],"names":[],"mappings":"AAYA;;;;;;;;;GASG;AAEH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAajE;AAED;;;;;;GAMG;AAEH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAKtD"}
|
|
@@ -6,16 +6,46 @@
|
|
|
6
6
|
// pathname: "/sites/WebPartDev/SitePages/ECStorage.aspx"
|
|
7
7
|
// protocol: "https:"
|
|
8
8
|
// search: "?debug=true&noredir=true&debugManifestsFile=https%3A%2F%2Flocalhost%3A4321%2Ftemp%2Fmanifests.js&allowOtherSites=true&scenario=dev"
|
|
9
|
+
import { CurrentOrigin, CurrentSiteAbsolute } from "../../components/molecules/source-props/WindowLocationConstants";
|
|
10
|
+
import { check4This } from "../Links/CheckSearch";
|
|
11
|
+
/**
|
|
12
|
+
* NOTE: WORKS ONLY ON CURRENT TENANT
|
|
13
|
+
* returns this:
|
|
14
|
+
* https://tenant.sharepoint.com/sites/SiteCollection
|
|
15
|
+
*
|
|
16
|
+
* Use makeAbsoluteUrl if you need the full Url after the collection
|
|
17
|
+
*
|
|
18
|
+
* @param link
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
9
21
|
export function getSiteCollectionUrlFromLink(link) {
|
|
10
22
|
if (!link || link.length === 0) {
|
|
11
|
-
link =
|
|
23
|
+
link = CurrentSiteAbsolute;
|
|
24
|
+
return link;
|
|
12
25
|
}
|
|
13
26
|
else if (link.indexOf('http') === 0) {
|
|
14
|
-
link = link.replace(
|
|
27
|
+
link = link.replace(CurrentOrigin, '');
|
|
15
28
|
}
|
|
16
29
|
//At this point, link should be relative url /sites/collection....
|
|
17
30
|
let parts = link.split('/');
|
|
18
|
-
|
|
31
|
+
// 2024/12/06: updated logic to work for both /sites/ and /teams/
|
|
32
|
+
let collectionUrl = `${CurrentOrigin}/${parts[1]}/${parts[2]}`;
|
|
19
33
|
return collectionUrl;
|
|
20
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* returns this:
|
|
37
|
+
* https://tenant.sharepoint.com/sites/SiteCollection/Subsite/SitePages/Page.aspx
|
|
38
|
+
*
|
|
39
|
+
* NOTE This only works when the /[ sites | teams ]/ you are refering to is in the same tenant
|
|
40
|
+
* @param relUrl
|
|
41
|
+
*/
|
|
42
|
+
export function makeAbsoluteUrl(useUrl) {
|
|
43
|
+
let newUrl = `${useUrl ? useUrl : ''}`;
|
|
44
|
+
if (newUrl && newUrl.indexOf('/sites/') === 0 || newUrl.indexOf('/teams/') === 0)
|
|
45
|
+
newUrl = `${CurrentOrigin}${newUrl}`;
|
|
46
|
+
if (check4This('prepSource') === true) {
|
|
47
|
+
console.log('updated Url to: ', newUrl);
|
|
48
|
+
}
|
|
49
|
+
return newUrl;
|
|
50
|
+
}
|
|
21
51
|
//# sourceMappingURL=getSiteCollectionUrlFromLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSiteCollectionUrlFromLink.js","sourceRoot":"","sources":["../../../src/logic/Strings/getSiteCollectionUrlFromLink.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,gCAAgC;AAChC,oCAAoC;AACpC,oNAAoN;AACpN,0CAA0C;AAC1C,yDAAyD;AACzD,qBAAqB;AACrB,+IAA+I;AAE/I,MAAM,UAAU,4BAA4B,CAAC,IAAY;IACvD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QAC9B,IAAI,GAAG,
|
|
1
|
+
{"version":3,"file":"getSiteCollectionUrlFromLink.js","sourceRoot":"","sources":["../../../src/logic/Strings/getSiteCollectionUrlFromLink.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,gCAAgC;AAChC,oCAAoC;AACpC,oNAAoN;AACpN,0CAA0C;AAC1C,yDAAyD;AACzD,qBAAqB;AACrB,+IAA+I;AAE/I,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,iEAAiE,CAAC;AACrH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;;;;;;;;GASG;AAEH,MAAM,UAAU,4BAA4B,CAAC,IAAY;IACvD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QAC9B,IAAI,GAAG,mBAAmB,CAAC;QAC3B,OAAO,IAAI,CAAC;KACb;SAAM,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;QACrC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;KACxC;IACD,kEAAkE;IAClE,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE5B,iEAAiE;IACjE,IAAI,aAAa,GAAG,GAAG,aAAa,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/D,OAAO,aAAa,CAAC;AACvB,CAAC;AAED;;;;;;GAMG;AAEH,MAAM,UAAU,eAAe,CAAC,MAAc;IAC5C,IAAI,MAAM,GAAW,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAC/C,IAAI,MAAM,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC;QAAE,MAAM,GAAG,GAAG,aAAa,GAAG,MAAM,EAAE,CAAC;IACvH,IAAI,UAAU,CAAC,YAAY,CAAC,KAAK,IAAI,EAAE;QAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;KAAE;IACnF,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { getFullUrlFromSlashSitesUrl } from './getFullUrlFromSlashSitesUrl';
|
|
2
1
|
export { getSiteCollectionUrlFromLink } from './getSiteCollectionUrlFromLink';
|
|
3
2
|
/***
|
|
4
3
|
* d88888b d8b db .o88b. .d88b. d8888b. d88888b d8888b. d88888b .o88b. .d88b. d8888b. d88888b .d8888. d888888b d8888b. d888888b d8b db d888b
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlServices.d.ts","sourceRoot":"","sources":["../../../src/logic/Strings/urlServices.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"urlServices.d.ts","sourceRoot":"","sources":["../../../src/logic/Strings/urlServices.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E;;;;;;;;;GASG;AAEF,wBAAgB,kBAAkB,CAAE,GAAG,EAAG,MAAM,EAAG,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAwCrF;AAEH;;;;;;;;;GASG;AACH;;;;GAIG;AACF,wBAAgB,cAAc,CAAE,GAAG,EAAG,MAAM,GAAI,MAAM,CAGpD;AAED;;;;;;;;;GASG;AAMH,wBAAgB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAoBlD;AAEL,eAAO,MAAM,kBAAkB,QAAS,CAAC;AACzC,eAAO,MAAM,sBAAsB,QAAkB,CAAC;AACtD,eAAO,MAAM,oBAAoB,QAAmB,CAAC;AAErD,eAAO,MAAM,iBAAiB,QAAmB,CAAC;AAElD;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAE,GAAG,EAAG,MAAM,GAAI,MAAM,CAuB3D"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// import { cleanSPListURL, cleanURL, encodeDecodeString, } from '@mikezimm/npmfunctions/dist/Services/Strings/urlServices';
|
|
2
|
+
import { CurrentOrigin } from '../../components/molecules/source-props/WindowLocationConstants';
|
|
2
3
|
// import { check4This } from "@mikezimm/fps-pnp2/lib/services/sp/CheckSearch";
|
|
3
|
-
export { getFullUrlFromSlashSitesUrl } from './getFullUrlFromSlashSitesUrl';
|
|
4
4
|
export { getSiteCollectionUrlFromLink } from './getSiteCollectionUrlFromLink';
|
|
5
5
|
/***
|
|
6
6
|
* d88888b d8b db .o88b. .d88b. d8888b. d88888b d8888b. d88888b .o88b. .d88b. d8888b. d88888b .d8888. d888888b d8888b. d888888b d8b db d888b
|
|
@@ -134,7 +134,7 @@ export const regexAnyProtocoll = /https?:\/\/+/ig; // https:// or hTTps:// or ht
|
|
|
134
134
|
*/
|
|
135
135
|
export function standardizeLocalLink(url) {
|
|
136
136
|
//1.) remove the hostname from a link
|
|
137
|
-
let newUrl = url.toLowerCase().indexOf(`${
|
|
137
|
+
let newUrl = url.toLowerCase().indexOf(`${CurrentOrigin}`) === 0 ? url.slice(CurrentOrigin.length) : url;
|
|
138
138
|
//2.) %3a with : if it is pasted in
|
|
139
139
|
newUrl = newUrl.replace(/%3a/gi, ':');
|
|
140
140
|
//2.) get backHalf of url ( any part after https:// )
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlServices.js","sourceRoot":"","sources":["../../../src/logic/Strings/urlServices.ts"],"names":[],"mappings":"AAEA,4HAA4H;
|
|
1
|
+
{"version":3,"file":"urlServices.js","sourceRoot":"","sources":["../../../src/logic/Strings/urlServices.ts"],"names":[],"mappings":"AAEA,4HAA4H;AAE5H,OAAO,EAAE,aAAa,EAAE,MAAM,iEAAiE,CAAC;AAEhG,+EAA+E;AAE/E,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E;;;;;;;;;GASG;AAEF,MAAM,UAAU,kBAAkB,CAAE,GAAY,EAAG,MAA2B;IAE3E,kHAAkH;IAElH,IAAI,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC;IACtB,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,EAAC,GAAG,CAAC,CAAC;IACxC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,EAAC,GAAG,CAAC,CAAC;IACxC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,EAAC,GAAG,CAAC,CAAC;IACxC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,EAAC,GAAG,CAAC,CAAC;IACxC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,EAAC,GAAG,CAAC,CAAC;IACxC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,EAAC,GAAG,CAAC,CAAC;IACxC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,EAAC,GAAG,CAAC,CAAC;IACxC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,EAAC,GAAG,CAAC,CAAC;IACxC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,EAAC,GA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O,CAAE,oBAAoB,EAAC,sBAAsB,CAAE,CAAC,OAAO,CAAE,sBAAsB,EAAC,wBAAwB,CAAE,CAAC;IAEtI,iEAAiE;IACjE,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAE,kBAAkB,EAAE,IAAI,CAAE,CAAC;IAExD,6FAA6F;IAC7F,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAE,uBAAuB,EAAE,UAAU,CAAE,CAAC;IACnE,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAE,yBAAyB,EAAE,SAAS,CAAE,CAAC;IAEpE,IAAI,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC9B,OAAO,MAAM,CAAC;AAEhB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
import { ISourceProps, SourcePropsNoListTitle, SourcePropsNoWebUrl } from '@mikezimm/fps-core-v7/lib/components/molecules/source-props/ISourceProps'; ///ISourceProps';
|
|
3
|
+
import { checkItemsResults, IFpsItemsReturn } from '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults';
|
|
4
|
+
import { startPerformOpV2, updatePerformanceEndV2 } from "@mikezimm/fps-core-v7/lib/components/molecules/Performance/functions";
|
|
5
|
+
import { check4This } from "@mikezimm/fps-core-v7/lib/logic/Links/CheckSearch";
|
|
6
|
+
import { IPerformanceOp } from "@mikezimm/fps-core-v7/lib/components/molecules/Performance/IPerformance";
|
|
7
|
+
import { createErrorFpsListReturn } from '@mikezimm/fps-core-v7/lib/components/molecules/process-results/createErrorFpsListItemsReturn';
|
|
8
|
+
import { doSpJsFileFetchOrPost } from '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFileFetch';
|
|
9
|
+
*/
|
|
10
|
+
import { IFpsItemsReturn } from '../../../components/molecules/process-results/CheckItemsResults';
|
|
11
|
+
export interface IMinEmbedUrlFetchProps {
|
|
12
|
+
webUrl: string;
|
|
13
|
+
FileByServerRelativePath: string;
|
|
14
|
+
ThenGo: boolean;
|
|
15
|
+
alertMe?: boolean;
|
|
16
|
+
digestValue: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IAttachmentsReturn extends IFpsItemsReturn {
|
|
19
|
+
url: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 2024-12-05: Migrated from fetchFileEmbedUrl in fps-Pnp2/lib\services\sp\fetch\items\fetchFileEmbedUrl
|
|
23
|
+
* NOTE: You need a CURRENT digest value in source props or it will fetch one... if this is a batch op, be sure to fetch and include once for performance
|
|
24
|
+
*
|
|
25
|
+
* 2024-12-05: THIS IS UNVERIFIED - VERIFY IN TESTING
|
|
26
|
+
* result.url = result.item.ServerRedirectedEmbedUrl;
|
|
27
|
+
*
|
|
28
|
+
* @param sourceProps
|
|
29
|
+
* @param overWrite
|
|
30
|
+
* @param blob
|
|
31
|
+
* @param fileName
|
|
32
|
+
* @param alertMe
|
|
33
|
+
* @param consoleLog
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
export declare function getFileEmbedUrl(fetchProps: IMinEmbedUrlFetchProps): Promise<IAttachmentsReturn>;
|
|
37
|
+
//# sourceMappingURL=getFileEmbedUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFileEmbedUrl.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/files/getFileEmbedUrl.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AAEH,OAAO,EAAqB,eAAe,EAAE,MAAM,iEAAiE,CAAC;AASrH,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,wBAAwB,EAAE,MAAM,CAAC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,eAAe,CAAE,UAAU,EAAE,sBAAsB,GAAM,OAAO,CAAC,kBAAkB,CAAC,CAwDzG"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
import { ISourceProps, SourcePropsNoListTitle, SourcePropsNoWebUrl } from '@mikezimm/fps-core-v7/lib/components/molecules/source-props/ISourceProps'; ///ISourceProps';
|
|
3
|
+
import { checkItemsResults, IFpsItemsReturn } from '@mikezimm/fps-core-v7/lib/components/molecules/process-results/CheckItemsResults';
|
|
4
|
+
import { startPerformOpV2, updatePerformanceEndV2 } from "@mikezimm/fps-core-v7/lib/components/molecules/Performance/functions";
|
|
5
|
+
import { check4This } from "@mikezimm/fps-core-v7/lib/logic/Links/CheckSearch";
|
|
6
|
+
import { IPerformanceOp } from "@mikezimm/fps-core-v7/lib/components/molecules/Performance/IPerformance";
|
|
7
|
+
import { createErrorFpsListReturn } from '@mikezimm/fps-core-v7/lib/components/molecules/process-results/createErrorFpsListItemsReturn';
|
|
8
|
+
import { doSpJsFileFetchOrPost } from '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/doSpJsFileFetch';
|
|
9
|
+
*/
|
|
10
|
+
import { checkItemsResults } from '../../../components/molecules/process-results/CheckItemsResults';
|
|
11
|
+
import { startPerformOpV2, updatePerformanceEndV2 } from "../../../components/molecules/Performance/functions";
|
|
12
|
+
import { check4This } from "../../../logic/Links/CheckSearch";
|
|
13
|
+
import { createErrorFpsFileReturn } from '../../../components/molecules/process-results/createErrorFpsFileReturn';
|
|
14
|
+
import { makeAbsoluteUrl } from "../../../logic/Strings/getSiteCollectionUrlFromLink";
|
|
15
|
+
import { doSpJsFetchOrPost } from '../../../components/molecules/SpHttp/doSpJsFetch';
|
|
16
|
+
/**
|
|
17
|
+
* 2024-12-05: Migrated from fetchFileEmbedUrl in fps-Pnp2/lib\services\sp\fetch\items\fetchFileEmbedUrl
|
|
18
|
+
* NOTE: You need a CURRENT digest value in source props or it will fetch one... if this is a batch op, be sure to fetch and include once for performance
|
|
19
|
+
*
|
|
20
|
+
* 2024-12-05: THIS IS UNVERIFIED - VERIFY IN TESTING
|
|
21
|
+
* result.url = result.item.ServerRedirectedEmbedUrl;
|
|
22
|
+
*
|
|
23
|
+
* @param sourceProps
|
|
24
|
+
* @param overWrite
|
|
25
|
+
* @param blob
|
|
26
|
+
* @param fileName
|
|
27
|
+
* @param alertMe
|
|
28
|
+
* @param consoleLog
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
export async function getFileEmbedUrl(fetchProps) {
|
|
32
|
+
const { webUrl, FileByServerRelativePath, ThenGo, alertMe, digestValue } = fetchProps;
|
|
33
|
+
if (!webUrl) {
|
|
34
|
+
// NO WebURL... Throw Alert
|
|
35
|
+
if (alertMe === true)
|
|
36
|
+
alert(`${FileByServerRelativePath} No webUrl`);
|
|
37
|
+
return createErrorFpsFileReturn(webUrl, FileByServerRelativePath);
|
|
38
|
+
}
|
|
39
|
+
if (!FileByServerRelativePath) {
|
|
40
|
+
// NO WebURL... Throw Alert
|
|
41
|
+
if (alertMe === true)
|
|
42
|
+
alert(`${'FileByServerRelativePath'} - No FileByServerRelativePath`);
|
|
43
|
+
return createErrorFpsFileReturn(webUrl, FileByServerRelativePath);
|
|
44
|
+
}
|
|
45
|
+
let thisPerformance = startPerformOpV2({ label: `getFileEmbedUrl`, includeMsStr: true });
|
|
46
|
+
// 2024-12-05: Added this because some places like PivotTiles had absoluteWebUrl in webUrl prop... so just taking care of differences
|
|
47
|
+
const useUrl = makeAbsoluteUrl(webUrl);
|
|
48
|
+
let decodedLink = decodeURI(FileByServerRelativePath);
|
|
49
|
+
let fetchAPI = `${useUrl}/_api/web/getFileByServerRelativePath(decodedurl='${decodedLink}')`;
|
|
50
|
+
fetchAPI += `&$select=*,ServerRedirectedEmbedUrl`;
|
|
51
|
+
const initialResult = await doSpJsFetchOrPost(fetchAPI, 'GET', digestValue ? digestValue : '', '');
|
|
52
|
+
const result = checkItemsResults(initialResult, `fps-core-v7: postSourceItems ~ 46`, alertMe, true);
|
|
53
|
+
// 2024-12-05: THIS IS UNVERIFIED
|
|
54
|
+
result.url = result.item.ServerRedirectedEmbedUrl;
|
|
55
|
+
result.fpsContentType = ['file', 'item'];
|
|
56
|
+
// 2024-12-05: changed if to test result, not sourceProps... was getting error reading indexOf
|
|
57
|
+
// if ( result.fpsContentType.indexOf( 'item' ) < 0 ) result.fpsContentType.push( 'item' );
|
|
58
|
+
// if ( result.fpsContentType.indexOf( 'file' ) < 0 ) result.fpsContentType.push( 'file' );
|
|
59
|
+
result.unifiedPerformanceOps.fetch = updatePerformanceEndV2({ op: thisPerformance, updateMiliseconds: true, count: 1 });
|
|
60
|
+
result.fetchOp = result.unifiedPerformanceOps.save;
|
|
61
|
+
if (check4This(`fpsShowFetchResults=true`) === true) {
|
|
62
|
+
console.log(`fps-core-v7 COMPLETE: postSourceItems ~ 56`, result);
|
|
63
|
+
}
|
|
64
|
+
if (ThenGo === true) {
|
|
65
|
+
if (result.url) {
|
|
66
|
+
window.open(result.url, '_blank');
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
window.open(decodedLink, '_blank');
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=getFileEmbedUrl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFileEmbedUrl.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/files/getFileEmbedUrl.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AAEH,OAAO,EAAE,iBAAiB,EAAmB,MAAM,iEAAiE,CAAC;AACrH,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC/G,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,wEAAwE,CAAC;AAClH,OAAO,EAAE,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;IAEjJ,kCAAkC;IAClC,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC;IAClD,MAAM,CAAC,cAAc,GAAG,CAAE,MAAM,EAAE,MAAM,CAAE,CAAC;IAE3C,+FAA+F;IAC/F,2FAA2F;IAC3F,2FAA2F;IAG3F,MAAM,CAAC,qBAAqB,CAAC,KAAK,GAAG,sBAAsB,CAAE,EAAE,EAAE,EAAE,eAAiC,EAAE,iBAAiB,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,CAAmB,CAAC;IAE7J,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC;IAEnD,IAAK,UAAU,CAAE,0BAA0B,CAAE,KAAK,IAAI,EAAG;QAAE,OAAO,CAAC,GAAG,CAAE,4CAA4C,EAAE,MAAM,CAAE,CAAA;KAAE;IAEhI,IAAK,MAAM,KAAK,IAAI,EAAG;QACrB,IAAK,MAAM,CAAC,GAAG,EAAG;YAChB,MAAM,CAAC,IAAI,CAAE,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAE,CAAE;SACtC;aAAM;YACL,MAAM,CAAC,IAAI,CAAE,WAAW,EAAE,QAAQ,CAAE,CAAE;SACvC;KACF;IAED,OAAO,MAAM,CAAC;AAEhB,CAAC"}
|
|
@@ -3,9 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { ISourceProps } from '../../../components/molecules/source-props/ISourceProps';
|
|
5
5
|
import { IFpsItemsReturn } from '../../../components/molecules/process-results/CheckItemsResults';
|
|
6
|
+
export declare const UniquePermsFilter = "HasUniqueRoleAssignments eq true";
|
|
7
|
+
export declare const UniquePermsHiddenFilter: string;
|
|
8
|
+
export declare function getSourceItemsUniquePermissionsAPI(sourceProps: ISourceProps, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsItemsReturn>;
|
|
6
9
|
/**
|
|
7
10
|
* getSourceItems calls the Pnp function to get the results which returns the raw error.
|
|
8
11
|
* This function then will convert the error into the helpful error and return the standard IItemsError object.
|
|
12
|
+
* const UniquePermsFilter = 'HasUniqueRoleAssignments eq true';
|
|
13
|
+
* const UniquePermsHiddenFilter = `${ UniquePermsFilter } and Hidden eq false`;
|
|
9
14
|
*
|
|
10
15
|
* @param sourceProps
|
|
11
16
|
* @param alertMe
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSourceItemsAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getSourceItemsAPI.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAA+C,MAAM,yDAAyD,CAAC;AACpI,OAAO,EAAqB,eAAe,EAAE,MAAM,iEAAiE,CAAC;
|
|
1
|
+
{"version":3,"file":"getSourceItemsAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getSourceItemsAPI.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAA+C,MAAM,yDAAyD,CAAC;AACpI,OAAO,EAAqB,eAAe,EAAE,MAAM,iEAAiE,CAAC;AASrH,eAAO,MAAM,iBAAiB,qCAAqC,CAAC;AACpE,eAAO,MAAM,uBAAuB,QAAgD,CAAC;AAErF,wBAAsB,kCAAkC,CAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAM9K;AACD;;;;;;;;;;GAUG;AAEH,wBAAsB,iBAAiB,CAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAwE7J"}
|
|
@@ -8,9 +8,21 @@ import { check4This } from "../../../logic/Links/CheckSearch";
|
|
|
8
8
|
import { doSpJsFetchOrPost } from "../../../components/molecules/SpHttp/doSpJsFetch";
|
|
9
9
|
import { createErrorFpsListReturn } from '../../../components/molecules/process-results/createErrorFpsListItemsReturn';
|
|
10
10
|
import { getAbsoluteWebUrlFromSourceProps } from '../../../logic/Strings/getAbssoluteWebUrlFromSourceProps';
|
|
11
|
+
import { getTodayRestFilter } from './getTodayRestFilter';
|
|
12
|
+
export const UniquePermsFilter = 'HasUniqueRoleAssignments eq true';
|
|
13
|
+
export const UniquePermsHiddenFilter = `${UniquePermsFilter} and Hidden eq false`;
|
|
14
|
+
export async function getSourceItemsUniquePermissionsAPI(sourceProps, alertMe, consoleLog) {
|
|
15
|
+
const newSourceProps = JSON.parse(JSON.stringify(sourceProps));
|
|
16
|
+
newSourceProps.restFilter = `${newSourceProps.restFilter ? newSourceProps.restFilter : ''}`;
|
|
17
|
+
newSourceProps.restFilter += `${newSourceProps.restFilter ? ' and ' : ''}${UniquePermsHiddenFilter}`;
|
|
18
|
+
const results = await getSourceItemsAPI(sourceProps, alertMe, consoleLog);
|
|
19
|
+
return results;
|
|
20
|
+
}
|
|
11
21
|
/**
|
|
12
22
|
* getSourceItems calls the Pnp function to get the results which returns the raw error.
|
|
13
23
|
* This function then will convert the error into the helpful error and return the standard IItemsError object.
|
|
24
|
+
* const UniquePermsFilter = 'HasUniqueRoleAssignments eq true';
|
|
25
|
+
* const UniquePermsHiddenFilter = `${ UniquePermsFilter } and Hidden eq false`;
|
|
14
26
|
*
|
|
15
27
|
* @param sourceProps
|
|
16
28
|
* @param alertMe
|
|
@@ -50,8 +62,9 @@ export async function getSourceItemsAPI(sourceProps, alertMe, consoleLog) {
|
|
|
50
62
|
fetchAPI += `$select=${selectThese.join(',')}&`;
|
|
51
63
|
if (expandThese && expandThese.length > 0)
|
|
52
64
|
fetchAPI += `$expand=${expandThese.join(',')}&`;
|
|
65
|
+
// 2024-12-05: Added getTodayRestFilter from fps-Pnp2 fetchAnyItems
|
|
53
66
|
if (restFilter)
|
|
54
|
-
fetchAPI += `$filter=${restFilter}&`;
|
|
67
|
+
fetchAPI += `$filter=${getTodayRestFilter(restFilter)}&`;
|
|
55
68
|
const orderBys = [];
|
|
56
69
|
if (orderBy)
|
|
57
70
|
orderBys.push(`${orderBy.prop} ${orderBy.order}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSourceItemsAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getSourceItemsAPI.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,OAAO,EAAgB,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC,CAAC,iBAAiB;AACtJ,OAAO,EAAE,iBAAiB,EAAmB,MAAM,iEAAiE,CAAC;AACrH,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC/G,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AAErF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6EAA6E,CAAC;AACvH,OAAO,EAAE,gCAAgC,EAAE,MAAM,0DAA0D,CAAC;
|
|
1
|
+
{"version":3,"file":"getSourceItemsAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getSourceItemsAPI.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,OAAO,EAAgB,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC,CAAC,iBAAiB;AACtJ,OAAO,EAAE,iBAAiB,EAAmB,MAAM,iEAAiE,CAAC;AACrH,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC/G,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AAErF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6EAA6E,CAAC;AACvH,OAAO,EAAE,gCAAgC,EAAE,MAAM,0DAA0D,CAAC;AAC5G,OAAO,EAA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AA,CAAC;IAEnI,OAAO,MAAM,CAAC;AAEhB,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 2024-11-23: This is for EXPERIMENTAL Purposes to test out batch calls
|
|
3
3
|
*/
|
|
4
|
-
declare
|
|
5
|
-
declare const batchEndpoint: string;
|
|
6
|
-
declare function executeBatch(): Promise<void>;
|
|
4
|
+
declare function sampleBatchCall(): void;
|
|
7
5
|
//# sourceMappingURL=getSourceItemsBatchAPI.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSourceItemsBatchAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getSourceItemsBatchAPI.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,
|
|
1
|
+
{"version":3,"file":"getSourceItemsBatchAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getSourceItemsBatchAPI.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,iBAAS,eAAe,SAiDvB"}
|
|
@@ -1,45 +1,47 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 2024-11-23: This is for EXPERIMENTAL Purposes to test out batch calls
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Content-
|
|
4
|
+
function sampleBatchCall() {
|
|
5
|
+
const siteUrl = "https://fuzzypawstech.sharepoint.com/sites/WorldMaps";
|
|
6
|
+
const batchEndpoint = `${siteUrl}/_api/$batch`;
|
|
7
|
+
async function executeBatch() {
|
|
8
|
+
const headers = {
|
|
9
|
+
"Accept": "application/json;odata=verbose",
|
|
10
|
+
"Content-Type": "multipart/mixed; boundary=batch_boundary",
|
|
11
|
+
"Authorization": "Bearer YOUR_ACCESS_TOKEN" // Use an access token if required
|
|
12
|
+
};
|
|
13
|
+
// Construct batch request body
|
|
14
|
+
const body = `
|
|
15
|
+
--batch_boundary
|
|
16
|
+
Content-Type: application/http
|
|
17
|
+
Content-Transfer-Encoding: binary
|
|
17
18
|
|
|
18
|
-
GET ${siteUrl}/_api/web/lists/getbytitle('WorldCoords888')/items?$top=5 HTTP/1.1
|
|
19
|
-
Accept: application/json;odata=verbose
|
|
19
|
+
GET ${siteUrl}/_api/web/lists/getbytitle('WorldCoords888')/items?$top=5 HTTP/1.1
|
|
20
|
+
Accept: application/json;odata=verbose
|
|
20
21
|
|
|
21
|
-
--batch_boundary
|
|
22
|
-
Content-Type: application/http
|
|
23
|
-
Content-Transfer-Encoding: binary
|
|
22
|
+
--batch_boundary
|
|
23
|
+
Content-Type: application/http
|
|
24
|
+
Content-Transfer-Encoding: binary
|
|
24
25
|
|
|
25
|
-
GET ${siteUrl}/_api/web/lists/getbytitle('WorldCoords999')/items?$top=5 HTTP/1.1
|
|
26
|
-
Accept: application/json;odata=verbose
|
|
26
|
+
GET ${siteUrl}/_api/web/lists/getbytitle('WorldCoords999')/items?$top=5 HTTP/1.1
|
|
27
|
+
Accept: application/json;odata=verbose
|
|
27
28
|
|
|
28
|
-
--batch_boundary--
|
|
29
|
-
`;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
--batch_boundary--
|
|
30
|
+
`;
|
|
31
|
+
// Send batch request
|
|
32
|
+
const response = await fetch(batchEndpoint, {
|
|
33
|
+
method: "POST",
|
|
34
|
+
headers,
|
|
35
|
+
body
|
|
36
|
+
});
|
|
37
|
+
if (response.ok) {
|
|
38
|
+
const text = await response.text();
|
|
39
|
+
console.log(text); // Contains the raw batch response
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
console.error(`Batch request failed with status: ${response.status}`);
|
|
43
|
+
}
|
|
42
44
|
}
|
|
45
|
+
executeBatch();
|
|
43
46
|
}
|
|
44
|
-
executeBatch();
|
|
45
47
|
//# sourceMappingURL=getSourceItemsBatchAPI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSourceItemsBatchAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getSourceItemsBatchAPI.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,MAAM,OAAO,GAAG,sDAAsD,CAAC;
|
|
1
|
+
{"version":3,"file":"getSourceItemsBatchAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getSourceItemsBatchAPI.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,SAAS,eAAe;IAEtB,MAAM,OAAO,GAAG,sDAAsD,CAAC;IACvE,MAAM,aAAa,GAAG,GAAG,OAAO,cAAc,CAAC;IAE/C,KAAK,UAAU,YAAY;QACvB,MAAM,OAAO,GAAG;YACZ,QAAQ,EAAE,gCAAgC;YAC1C,cAAc,EAAE,0CAA0C;YAC1D,eAAe,EAAE,0BAA0B,CAAC,kCAAkC;SACjF,CAAC;QAEF,+BAA+B;QAC/B,MAAM,IAAI,GAAG;;;;;QAKX,OAAO;;;;;;;QAOP,OAAO;;;;GAIZ,CAAC;QAEE,qBAAqB;QACrB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,aAAa,EAAE;YACxC,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI;SACP,CAAC,CAAC;QAEH,IAAI,QAAQ,CAAC,EAAE,EAAE;YACb,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,kCAAkC;SACxD;aAAM;YACH,OAAO,CAAC,KAAK,CAAC,qCAAqC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;SACzE;IACL,CAAC;IAED,YAAY,EAAE,CAAC;AAGjB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migrated from fps-Pnp2
|
|
3
|
+
* Added for https://github.com/mikezimm/drilldown7/issues/369
|
|
4
|
+
* Takes a typical rest filter and replaces references like [Today -7] with proper rest filter string
|
|
5
|
+
* @param restFilter
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function getTodayRestFilter(restFilter: string): string;
|
|
9
|
+
//# sourceMappingURL=getTodayRestFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTodayRestFilter.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getTodayRestFilter.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,wBAAgB,kBAAkB,CAAE,UAAU,EAAE,MAAM,GAAI,MAAM,CAwB/D"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migrated from fps-Pnp2
|
|
3
|
+
* Added for https://github.com/mikezimm/drilldown7/issues/369
|
|
4
|
+
* Takes a typical rest filter and replaces references like [Today -7] with proper rest filter string
|
|
5
|
+
* @param restFilter
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export function getTodayRestFilter(restFilter) {
|
|
9
|
+
if (!restFilter)
|
|
10
|
+
return '';
|
|
11
|
+
if (restFilter && restFilter.indexOf('[Today') > 1) {
|
|
12
|
+
const currentTime = new Date().toISOString();
|
|
13
|
+
//Replace [Today] with currect time
|
|
14
|
+
restFilter = restFilter.replace(/\B\[Today\]\B/gi, `datetime'${currentTime}'`);
|
|
15
|
+
//Regex looks for anything matching [Today-+xxx] and replaces with date string
|
|
16
|
+
// NOTE This did not work: "MeetingDate gt datetime'2023-09-17T00:08:07.458Z'"
|
|
17
|
+
restFilter = restFilter.replace(/\[Today(.*?)\]/gi, (match => {
|
|
18
|
+
let numb = parseInt(match.toLowerCase().substring(6).replace("]", ""), 10);
|
|
19
|
+
const today = new Date();
|
|
20
|
+
var newdate = new Date();
|
|
21
|
+
newdate.setDate(today.getDate() + numb);
|
|
22
|
+
let newDateString = newdate.toISOString();
|
|
23
|
+
// return `'${newDateString}'`;
|
|
24
|
+
return `datetime'${newDateString}'`;
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
return restFilter;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=getTodayRestFilter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTodayRestFilter.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/getTodayRestFilter.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,MAAM,UAAU,kBAAkB,CAAE,UAAkB;IAEpD,IAAK,CAAC,UAAU;QAAG,OAAO,EAAE,CAAC;IAE7B,IAAK,UAAU,IAAI,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAG;QACpD,MAAM,WAAW,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC7C,mCAAmC;QACnC,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,iBAAiB,EAAE,YAAY,WAAW,GAAG,CAAC,CAAC;QAE/E,8EAA8E;QAC9E,+EAA+E;QAC/E,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,KAAK,CAAC,EAAE;YAC3D,IAAI,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YAC3E,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;YACzB,IAAI,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC;YACzB,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;YACxC,IAAI,aAAa,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;YAC1C,+BAA+B;YAC/B,OAAO,YAAY,aAAa,GAAG,CAAC;QACtC,CAAC,CAAC,CAAC,CAAC;KACL;IAED,OAAO,UAAU,CAAC;AAEpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postSourceItemsAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/postSourceItemsAPI.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"postSourceItemsAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/items/postSourceItemsAPI.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAA+C,MAAM,yDAAyD,CAAC;AACpI,OAAO,EAAqB,eAAe,EAAE,MAAM,iEAAiE,CAAC;AAQrH,wBAAsB,kBAAkB,CAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAG,GAAG,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAsD9K"}
|