@mikezimm/fps-core-v7 1.0.35 → 1.0.37
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/components/SingleHelpPage/interfaces/ITrickRow.d.ts.map +1 -1
- package/lib/banner/components/SingleHelpPage/interfaces/ITrickRow.js +1 -0
- package/lib/banner/components/SingleHelpPage/interfaces/ITrickRow.js.map +1 -1
- package/lib/components/atoms/easy-icons/SystemIcons/DefaultEasyIcons.d.ts.map +1 -1
- package/lib/components/atoms/easy-icons/SystemIcons/DefaultEasyIcons.js.map +1 -1
- package/lib/components/atoms/easy-icons/interfaces/eiTypes.d.ts.map +1 -1
- package/lib/components/atoms/easy-icons/interfaces/eiTypes.js +3 -4
- package/lib/components/atoms/easy-icons/interfaces/eiTypes.js.map +1 -1
- package/lib/components/molecules/AnyContent/IAnyListLib.d.ts +8 -3
- package/lib/components/molecules/AnyContent/IAnyListLib.d.ts.map +1 -1
- package/lib/components/molecules/AnyContent/IAnyListLib.js +4 -16
- package/lib/components/molecules/AnyContent/IAnyListLib.js.map +1 -1
- package/lib/components/molecules/SearchPage/functions/addListIsAMeta.d.ts +13 -0
- package/lib/components/molecules/SearchPage/functions/addListIsAMeta.d.ts.map +1 -1
- package/lib/components/molecules/SearchPage/functions/addListIsAMeta.js +13 -0
- package/lib/components/molecules/SearchPage/functions/addListIsAMeta.js.map +1 -1
- package/lib/components/molecules/SearchPage/functions/addSearchMeta1.d.ts.map +1 -1
- package/lib/components/molecules/SearchPage/functions/addSearchMeta1.js +3 -1
- package/lib/components/molecules/SearchPage/functions/addSearchMeta1.js.map +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getFormDigestValueNoContext.js +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getFormDigestValueNoContext.js.map +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl.js +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl.js.map +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/setMultiFPSFormDigests.js +1 -1
- package/lib/components/molecules/SpHttp/digestValues/fromUrl/setMultiFPSFormDigests.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 +4 -0
- package/lib/components/molecules/process-results/createEmptyFpsUsersReturn.d.ts.map +1 -0
- package/lib/components/molecules/process-results/createEmptyFpsUsersReturn.js +15 -0
- package/lib/components/molecules/process-results/createEmptyFpsUsersReturn.js.map +1 -0
- 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/logic/Math/convertFileSizeStringToNum.d.ts.map +1 -1
- package/lib/logic/Math/convertFileSizeStringToNum.js +3 -0
- package/lib/logic/Math/convertFileSizeStringToNum.js.map +1 -1
- package/lib/logic/Math/labels.d.ts +8 -0
- package/lib/logic/Math/labels.d.ts.map +1 -1
- package/lib/logic/Math/labels.js +12 -0
- package/lib/logic/Math/labels.js.map +1 -1
- package/lib/logic/Strings/getAbssoluteWebUrlFromSourceProps.d.ts +10 -0
- package/lib/logic/Strings/getAbssoluteWebUrlFromSourceProps.d.ts.map +1 -0
- package/lib/logic/Strings/getAbssoluteWebUrlFromSourceProps.js +18 -0
- package/lib/logic/Strings/getAbssoluteWebUrlFromSourceProps.js.map +1 -0
- 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/files/postSourceFilesAPI.d.ts.map +1 -1
- package/lib/restAPIs/lists/files/postSourceFilesAPI.js +12 -8
- package/lib/restAPIs/lists/files/postSourceFilesAPI.js.map +1 -1
- 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 +28 -10
- 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 +10 -6
- package/lib/restAPIs/lists/items/postSourceItemsAPI.js.map +1 -1
- package/lib/restAPIs/lists/lists/MinListSelects.d.ts +8 -0
- package/lib/restAPIs/lists/lists/MinListSelects.d.ts.map +1 -0
- package/lib/restAPIs/lists/lists/MinListSelects.js +26 -0
- package/lib/restAPIs/lists/lists/MinListSelects.js.map +1 -0
- package/lib/restAPIs/lists/lists/getSourceListsAPI.d.ts.map +1 -1
- package/lib/restAPIs/lists/lists/getSourceListsAPI.js +10 -6
- package/lib/restAPIs/lists/lists/getSourceListsAPI.js.map +1 -1
- package/lib/restAPIs/sites/groups/GroupSelects.d.ts +4 -0
- package/lib/restAPIs/sites/groups/GroupSelects.d.ts.map +1 -0
- package/lib/restAPIs/sites/groups/GroupSelects.js +4 -0
- package/lib/restAPIs/sites/groups/GroupSelects.js.map +1 -0
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.d.ts +4 -5
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.d.ts.map +1 -1
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.js +17 -13
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.js.map +1 -1
- package/lib/restAPIs/sites/groups/getWebAssociatedGroupAPI.d.ts +6 -0
- package/lib/restAPIs/sites/groups/getWebAssociatedGroupAPI.d.ts.map +1 -0
- package/lib/restAPIs/sites/groups/getWebAssociatedGroupAPI.js +65 -0
- package/lib/restAPIs/sites/groups/getWebAssociatedGroupAPI.js.map +1 -0
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.d.ts +2 -1
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.d.ts.map +1 -1
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.js +15 -6
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.js.map +1 -1
- package/lib/restAPIs/sites/sites/getSiteAPI.d.ts +8 -0
- package/lib/restAPIs/sites/sites/getSiteAPI.d.ts.map +1 -0
- package/lib/restAPIs/sites/sites/getSiteAPI.js +77 -0
- package/lib/restAPIs/sites/sites/getSiteAPI.js.map +1 -0
- package/lib/restAPIs/sites/users/UserGroupSelects.d.ts +3 -0
- package/lib/restAPIs/sites/users/UserGroupSelects.d.ts.map +1 -0
- package/lib/restAPIs/sites/users/UserGroupSelects.js +3 -0
- package/lib/restAPIs/sites/users/UserGroupSelects.js.map +1 -0
- package/lib/restAPIs/sites/users/getSiteUsersAPI.d.ts +5 -0
- package/lib/restAPIs/sites/users/getSiteUsersAPI.d.ts.map +1 -0
- package/lib/restAPIs/sites/users/getSiteUsersAPI.js +62 -0
- package/lib/restAPIs/sites/users/getSiteUsersAPI.js.map +1 -0
- 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/IFpsSiteReturn.d.ts +41 -0
- package/lib/types/fps-returns/sites/IFpsSiteReturn.d.ts.map +1 -0
- package/lib/types/fps-returns/sites/IFpsSiteReturn.js +2 -0
- package/lib/types/fps-returns/sites/IFpsSiteReturn.js.map +1 -0
- package/lib/types/fps-returns/sites/ISiteErrorObj.d.ts +3 -0
- package/lib/types/fps-returns/sites/ISiteErrorObj.d.ts.map +1 -1
- package/lib/types/fps-returns/sites/groups/IGroupResults.d.ts +18 -12
- package/lib/types/fps-returns/sites/groups/IGroupResults.d.ts.map +1 -1
- package/lib/types/fps-returns/sites/groups/IGroupResults.js +0 -10
- package/lib/types/fps-returns/sites/groups/IGroupResults.js.map +1 -1
- package/lib/types/fps-returns/sites/groups/IGroupsResults.d.ts +10 -12
- package/lib/types/fps-returns/sites/groups/IGroupsResults.d.ts.map +1 -1
- package/lib/types/fps-returns/sites/groups/IGroupsResults.js +0 -10
- package/lib/types/fps-returns/sites/groups/IGroupsResults.js.map +1 -1
- package/lib/types/fps-returns/sites/users/{ISiteUsersResults.d.ts → IFpsUsersReturn.d.ts} +6 -3
- package/lib/types/fps-returns/sites/users/IFpsUsersReturn.d.ts.map +1 -0
- package/lib/types/fps-returns/sites/users/{ISiteUsersResults.js → IFpsUsersReturn.js} +1 -1
- package/lib/types/fps-returns/sites/users/IFpsUsersReturn.js.map +1 -0
- package/lib/types/fps-returns/sites/users/ISiteUserResults.d.ts +5 -2
- package/lib/types/fps-returns/sites/users/ISiteUserResults.d.ts.map +1 -1
- package/lib/types/fps-returns/sites/webs/IWebErrorObj.d.ts +2 -2
- package/lib/types/fps-returns/sites/webs/IWebErrorObj.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/types/fps-returns/sites/users/ISiteUsersResults.d.ts.map +0 -1
- package/lib/types/fps-returns/sites/users/ISiteUsersResults.js.map +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createEmptyFpsItemsReturn } from "./createEmptyFpsItemsReturn";
|
|
2
|
+
import { createEmptyFpsErrorReturn } from "./createEmptyFpsErrorReturn";
|
|
3
|
+
export function createEmptyFpsUsersReturn() {
|
|
4
|
+
const results = createEmptyFpsItemsReturn();
|
|
5
|
+
results.users = [];
|
|
6
|
+
return results;
|
|
7
|
+
}
|
|
8
|
+
export function createErrorFpsUsersReturn(absoluteWebUrl) {
|
|
9
|
+
const results = createEmptyFpsErrorReturn();
|
|
10
|
+
results.users = [];
|
|
11
|
+
results.statusText = `${!absoluteWebUrl ? 'NoWebUrl' : ''}`;
|
|
12
|
+
results.status = !absoluteWebUrl ? 'NoWeb' : 'Unknown';
|
|
13
|
+
return results;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=createEmptyFpsUsersReturn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createEmptyFpsUsersReturn.js","sourceRoot":"","sources":["../../../../src/components/molecules/process-results/createEmptyFpsUsersReturn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,MAAM,UAAU,yBAAyB;IACvC,MAAM,OAAO,GAAoB,yBAAyB,EAAqB,CAAC;IAChF,OAAO,CAAC,KAAK,GAAG,EAAE,CAAC;IACnB,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,cAAyC;IACjF,MAAM,OAAO,GAAoB,yBAAyB,EAAqB,CAAC;IAChF,OAAO,CAAC,KAAK,GAAG,EAAE,CAAC;IACnB,OAAO,CAAC,UAAU,GAAG,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAC5D,OAAO,CAAC,MAAM,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IACvD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IAttachmentsReturn } from "../../../restAPIs/lists/files/getFileEmbedUrl";
|
|
2
|
+
export declare function createErrorFpsFileReturn(webUrl: string | undefined | null, FileByServerRelativePath: string | undefined | null): IAttachmentsReturn;
|
|
3
|
+
//# sourceMappingURL=createErrorFpsFileReturn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createErrorFpsFileReturn.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/process-results/createErrorFpsFileReturn.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAGnF,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,EAAE,wBAAwB,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,kBAAkB,CAMnJ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createEmptyFpsErrorReturn } from "./createEmptyFpsErrorReturn";
|
|
2
|
+
export function createErrorFpsFileReturn(webUrl, FileByServerRelativePath) {
|
|
3
|
+
const results = createEmptyFpsErrorReturn();
|
|
4
|
+
results.statusText = `${!webUrl ? 'NoWebUrl' : ''} ${!FileByServerRelativePath ? 'Missing File Path' : ''}`;
|
|
5
|
+
results.status = !webUrl ? 'NoWeb' : !FileByServerRelativePath ? 'MissingFilePath' : 'Error';
|
|
6
|
+
results.url = '';
|
|
7
|
+
return results;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=createErrorFpsFileReturn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createErrorFpsFileReturn.js","sourceRoot":"","sources":["../../../../src/components/molecules/process-results/createErrorFpsFileReturn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,MAAM,UAAU,wBAAwB,CAAC,MAAiC,EAAE,wBAAmD;IAC7H,MAAM,OAAO,GAAuB,yBAAyB,EAAwB,CAAC;IACtF,OAAO,CAAC,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAC5G,OAAO,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAAC;IAC7F,OAAO,CAAC,GAAG,GAAG,EAAE,CAAC;IACjB,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createErrorFpsListItemsReturn.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/process-results/createErrorFpsListItemsReturn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,wBAAgB,wBAAwB,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,eAAe,
|
|
1
|
+
{"version":3,"file":"createErrorFpsListItemsReturn.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/process-results/createErrorFpsListItemsReturn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,wBAAgB,wBAAwB,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,eAAe,CAKzI"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createEmptyFpsErrorReturn } from "./createEmptyFpsErrorReturn";
|
|
2
2
|
export function createErrorFpsListReturn(absoluteWebUrl, listTitle) {
|
|
3
|
-
const results =
|
|
4
|
-
results.ok = false;
|
|
3
|
+
const results = createEmptyFpsErrorReturn();
|
|
5
4
|
results.statusText = `${!absoluteWebUrl ? 'NoWebUrl' : ''} ${!listTitle ? 'NoListTitle' : ''}`;
|
|
6
|
-
results.statusNo = 667;
|
|
7
5
|
results.status = !absoluteWebUrl ? 'NoWeb' : !listTitle ? 'NoList' : 'Unknown';
|
|
8
6
|
return results;
|
|
9
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createErrorFpsListItemsReturn.js","sourceRoot":"","sources":["../../../../src/components/molecules/process-results/createErrorFpsListItemsReturn.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,MAAM,UAAU,wBAAwB,CAAC,cAAyC,EAAE,SAAoC;IACtH,MAAM,OAAO,GAAoB,yBAAyB,EAAE,CAAC;IAC7D,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"createErrorFpsListItemsReturn.js","sourceRoot":"","sources":["../../../../src/components/molecules/process-results/createErrorFpsListItemsReturn.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,MAAM,UAAU,wBAAwB,CAAC,cAAyC,EAAE,SAAoC;IACtH,MAAM,OAAO,GAAoB,yBAAyB,EAAE,CAAC;IAC7D,OAAO,CAAC,UAAU,GAAG,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAC/F,OAAO,CAAC,MAAM,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/E,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertFileSizeStringToNum.d.ts","sourceRoot":"","sources":["../../../src/logic/Math/convertFileSizeStringToNum.tsx"],"names":[],"mappings":"AACA;;GAEG;AAEH,eAAO,MAAM,oBAAoB,EAAE,MAAM,EAA6B,CAAC;AACvE,eAAO,MAAM,kBAAkB,EAAE,MAA2C,CAAC;AAE7E;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,GAAE,MAAW,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"convertFileSizeStringToNum.d.ts","sourceRoot":"","sources":["../../../src/logic/Math/convertFileSizeStringToNum.tsx"],"names":[],"mappings":"AACA;;GAEG;AAEH,eAAO,MAAM,oBAAoB,EAAE,MAAM,EAA6B,CAAC;AACvE,eAAO,MAAM,kBAAkB,EAAE,MAA2C,CAAC;AAE7E;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,GAAE,MAAW,GAAG,MAAM,CAsBxE"}
|
|
@@ -9,6 +9,9 @@ export const FileSizeScaleRegex = /^(\d+(\.\d+)?)\s*(KB|MB|GB|TB)$/i;
|
|
|
9
9
|
* @returns
|
|
10
10
|
*/
|
|
11
11
|
export function convertFileSizeStringToNum(fileSize = '') {
|
|
12
|
+
// 2024-12-04: Added type check to be safe
|
|
13
|
+
if (typeof fileSize === 'number')
|
|
14
|
+
return fileSize;
|
|
12
15
|
// Extract the numeric part and the unit part (KB, MB, GB, TB, etc.)
|
|
13
16
|
const match = fileSize.trim().match(FileSizeScaleRegex);
|
|
14
17
|
if (!match)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertFileSizeStringToNum.js","sourceRoot":"","sources":["../../../src/logic/Math/convertFileSizeStringToNum.tsx"],"names":[],"mappings":"AACA;;GAEG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAa,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACvE,MAAM,CAAC,MAAM,kBAAkB,GAAW,kCAAkC,CAAC;AAE7E;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,WAAmB,EAAE;IAE9D,oEAAoE;IACpE,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAExD,IAAI,CAAC,KAAK;QAAE,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAEtC,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAEpC,mCAAmC;IACnC,MAAM,KAAK,GAAG,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjD,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;KACrC;IAED,uCAAuC;IACvC,OAAO,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AAC9C,CAAC"}
|
|
1
|
+
{"version":3,"file":"convertFileSizeStringToNum.js","sourceRoot":"","sources":["../../../src/logic/Math/convertFileSizeStringToNum.tsx"],"names":[],"mappings":"AACA;;GAEG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAa,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACvE,MAAM,CAAC,MAAM,kBAAkB,GAAW,kCAAkC,CAAC;AAE7E;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,WAAmB,EAAE;IAE9D,2CAA2C;IAC3C,IAAK,OAAO,QAAQ,KAAK,QAAQ;QAAG,OAAO,QAAQ,CAAC;IAEpD,oEAAoE;IACpE,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAExD,IAAI,CAAC,KAAK;QAAE,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAEtC,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAEpC,mCAAmC;IACnC,MAAM,KAAK,GAAG,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjD,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;KACrC;IAED,uCAAuC;IACvC,OAAO,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -8,6 +8,14 @@
|
|
|
8
8
|
*
|
|
9
9
|
* import { getSizeLabel } from '@mikezimm/npmfunctions/dist/Services/Strings/stringServices';
|
|
10
10
|
*/
|
|
11
|
+
/**
|
|
12
|
+
* NOTE: If you pass a string, it will first parseInt it so BE SURE TO VERIFY you are not passing in
|
|
13
|
+
* something like 1.24MB or it will return as 1.24B
|
|
14
|
+
*
|
|
15
|
+
* @param size
|
|
16
|
+
* @param decimal
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
11
19
|
export declare function getSizeLabel(size: number, decimal?: number): string;
|
|
12
20
|
/**
|
|
13
21
|
* Converts a number into a label, used in eXTreme Storage to show 1.6M and 2.3G sizes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../../src/logic/Math/labels.ts"],"names":[],"mappings":"AAEC;;;;;;;;;EASE;AAaH,wBAAgB,YAAY,CAAG,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,MAAU,GAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../../src/logic/Math/labels.ts"],"names":[],"mappings":"AAEC;;;;;;;;;EASE;AAaH;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAG,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,MAAU,GAAI,MAAM,CAQzE;AAEA;;;;;GAKG;AACJ,wBAAgB,aAAa,CAAG,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,MAAU,GAAI,MAAM,CAQ3E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAE,IAAI,EAAE,MAAM,GAAI,MAAM,CAGvD"}
|
package/lib/logic/Math/labels.js
CHANGED
|
@@ -17,10 +17,22 @@
|
|
|
17
17
|
const oneKB = 1024;
|
|
18
18
|
const oneMB = 1024 * oneKB;
|
|
19
19
|
const oneGB = 1024 * oneMB;
|
|
20
|
+
/**
|
|
21
|
+
* NOTE: If you pass a string, it will first parseInt it so BE SURE TO VERIFY you are not passing in
|
|
22
|
+
* something like 1.24MB or it will return as 1.24B
|
|
23
|
+
*
|
|
24
|
+
* @param size
|
|
25
|
+
* @param decimal
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
20
28
|
export function getSizeLabel(size, decimal = 1) {
|
|
21
29
|
if (size === null || size === undefined) {
|
|
22
30
|
return '';
|
|
23
31
|
}
|
|
32
|
+
// 2024-12-04: Found in PivotTiles that the FileSizeDisplay is a string like '12341234'.
|
|
33
|
+
// Not sure if I should just parseInt the string or check for other chars like GB etc first.
|
|
34
|
+
if (typeof size === 'string')
|
|
35
|
+
size = parseInt(size);
|
|
24
36
|
return size > oneGB ? `${(size / oneGB).toFixed(decimal)} GB` : size > oneMB ? `${(size / oneMB).toFixed(decimal)} MB` : size > oneKB ? `${(size / oneKB).toFixed(decimal)} KB` : `${(size).toFixed(decimal)} B`;
|
|
25
37
|
}
|
|
26
38
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labels.js","sourceRoot":"","sources":["../../../src/logic/Math/labels.ts"],"names":[],"mappings":"AAEC;;;;;;;;;EASE;AAEF;;;;;GAKG;AAEJ,MAAM,KAAK,GAAG,IAAI,CAAC;AACnB,MAAM,KAAK,GAAG,IAAI,GAAG,KAAK,CAAC;AAC3B,MAAM,KAAK,GAAG,IAAI,GAAG,KAAK,CAAC;AAE3B,MAAM,UAAU,YAAY,CAAG,IAAY,EAAE,UAAkB,CAAC;IAC9D,IAAK,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAG;QAAE,OAAO,EAAE,CAAE;KAAE;
|
|
1
|
+
{"version":3,"file":"labels.js","sourceRoot":"","sources":["../../../src/logic/Math/labels.ts"],"names":[],"mappings":"AAEC;;;;;;;;;EASE;AAEF;;;;;GAKG;AAEJ,MAAM,KAAK,GAAG,IAAI,CAAC;AACnB,MAAM,KAAK,GAAG,IAAI,GAAG,KAAK,CAAC;AAC3B,MAAM,KAAK,GAAG,IAAI,GAAG,KAAK,CAAC;AAE3B;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAG,IAAY,EAAE,UAAkB,CAAC;IAC9D,IAAK,IAAI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,CAAC;gBACxD,GAAI,CAAE,KAAK,CAAE,CAAC,OAAO,CAAE,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAG,EAAE,CAAC;AAChE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAE,IAAY;IAC7C,OAAO,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAE7C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ISourceProps } from "../../components/molecules/source-props/ISourceProps";
|
|
2
|
+
/**
|
|
3
|
+
* To be used for any JS Fetch where you need the full absolute web url for the API
|
|
4
|
+
*
|
|
5
|
+
* @param sourceProps
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function getAbsoluteWebUrlFromSourceProps(sourceProps: ISourceProps): string;
|
|
9
|
+
export declare function makeAbsoluteUrl(useUrl: string): string;
|
|
10
|
+
//# sourceMappingURL=getAbssoluteWebUrlFromSourceProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAbssoluteWebUrlFromSourceProps.d.ts","sourceRoot":"","sources":["../../../src/logic/Strings/getAbssoluteWebUrlFromSourceProps.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sDAAsD,CAAC;AAEpF;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAE,WAAW,EAAE,YAAY,GAAI,MAAM,CAKpF;AAED,wBAAgB,eAAe,CAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGvD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TenantUrlOrigin } from "../../components/molecules/source-props/IMinSourceFetchProps";
|
|
2
|
+
/**
|
|
3
|
+
* To be used for any JS Fetch where you need the full absolute web url for the API
|
|
4
|
+
*
|
|
5
|
+
* @param sourceProps
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export function getAbsoluteWebUrlFromSourceProps(sourceProps) {
|
|
9
|
+
const { absoluteWebUrl, webUrl } = sourceProps;
|
|
10
|
+
let useUrl = absoluteWebUrl ? absoluteWebUrl : webUrl ? webUrl : '';
|
|
11
|
+
return makeAbsoluteUrl(useUrl);
|
|
12
|
+
}
|
|
13
|
+
export function makeAbsoluteUrl(useUrl) {
|
|
14
|
+
if (useUrl && useUrl.indexOf('/sites/') === 0)
|
|
15
|
+
useUrl = `${TenantUrlOrigin}${useUrl}`;
|
|
16
|
+
return useUrl;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=getAbssoluteWebUrlFromSourceProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAbssoluteWebUrlFromSourceProps.js","sourceRoot":"","sources":["../../../src/logic/Strings/getAbssoluteWebUrlFromSourceProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAC;AAG/F;;;;;GAKG;AACH,MAAM,UAAU,gCAAgC,CAAE,WAAyB;IAEzE,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;AAED,MAAM,UAAU,eAAe,CAAE,MAAc;IAC7C,IAAK,MAAM,IAAI,MAAM,CAAC,OAAO,CAAE,SAAS,CAAC,KAAK,CAAC;QAAG,MAAM,GAAG,GAAG,eAAe,GAAG,MAAM,EAAE,CAAC;IACzF,OAAO,MAAM,CAAC;AAChB,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/getAbssoluteWebUrlFromSourceProps';
|
|
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,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAE3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AAcrF;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAE,UAAkC;IAEvE,MAAM,EAAE,MAAM,EAAE,wBAAwB,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAG,GAAG,UAAU,CAAC;IAGvF,IAAK,CAAC,MAAM,EAAG;QACb,2BAA2B;QAC3B,IAAK,OAAO,KAAK,IAAI;YAAG,KAAK,CAAC,GAAG,wBAAwB,YAAY,CAAC,CAAC;QACvE,OAAO,wBAAwB,CAAE,MAAM,EAAE,wBAAwB,CAAE,CAAC;KACrE;IAED,IAAK,CAAC,wBAAwB,EAAG;QAC/B,2BAA2B;QAC3B,IAAK,OAAO,KAAK,IAAI;YAAG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,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postSourceFilesAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/files/postSourceFilesAPI.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAA+C,MAAM,yDAAyD,CAAC;AACpI,OAAO,EAAqB,eAAe,EAAE,MAAM,iEAAiE,CAAC;
|
|
1
|
+
{"version":3,"file":"postSourceFilesAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/lists/files/postSourceFilesAPI.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAA+C,MAAM,yDAAyD,CAAC;AACpI,OAAO,EAAqB,eAAe,EAAE,MAAM,iEAAiE,CAAC;AASrH;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAiDjN"}
|
|
@@ -14,6 +14,7 @@ import { check4This } from "../../../logic/Links/CheckSearch";
|
|
|
14
14
|
import { createErrorFpsListReturn } from '../../../components/molecules/process-results/createErrorFpsListItemsReturn';
|
|
15
15
|
import { doSpJsFileFetchOrPost } from '../../../components/molecules/SpHttp/doSpJsFileFetch';
|
|
16
16
|
import { getThisFPSDigestValueFromUrl } from '../../../components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl';
|
|
17
|
+
import { getAbsoluteWebUrlFromSourceProps } from '../../../logic/Strings/getAbssoluteWebUrlFromSourceProps';
|
|
17
18
|
/**
|
|
18
19
|
* 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
|
* @param sourceProps
|
|
@@ -27,31 +28,34 @@ import { getThisFPSDigestValueFromUrl } from '../../../components/molecules/SpHt
|
|
|
27
28
|
export async function postSourceFilesAPI(sourceProps, overWrite, blob, fileName, alertMe, consoleLog) {
|
|
28
29
|
const { performanceSettings } = sourceProps;
|
|
29
30
|
const fetchOp = performanceSettings ? startPerformOpV2(performanceSettings) : null;
|
|
30
|
-
const {
|
|
31
|
+
const { listTitle, subFolder } = sourceProps;
|
|
32
|
+
// 2024-12-05: Added this because some places like PivotTiles had absoluteWebUrl in webUrl prop... so just taking care of differences
|
|
33
|
+
const useUrl = getAbsoluteWebUrlFromSourceProps(sourceProps);
|
|
31
34
|
/**
|
|
32
35
|
Make a POST request to the SharePoint REST API to upload the file
|
|
33
36
|
*/
|
|
34
37
|
const folderRelativeUrl = subFolder ? `${listTitle}/${subFolder}` : listTitle;
|
|
35
|
-
const postAPI = `${
|
|
36
|
-
if (!
|
|
38
|
+
const postAPI = `${useUrl}/_api/web/GetFolderByServerRelativeUrl('${folderRelativeUrl}')/Files/add(url='${fileName}', overwrite=${overWrite})`;
|
|
39
|
+
if (!useUrl) {
|
|
37
40
|
// NO WebURL... Throw Alert
|
|
38
41
|
if (alertMe === true)
|
|
39
42
|
alert(`${listTitle} ${SourcePropsNoWebUrl}`);
|
|
40
|
-
return createErrorFpsListReturn(
|
|
43
|
+
return createErrorFpsListReturn(useUrl, listTitle);
|
|
41
44
|
}
|
|
42
45
|
if (!listTitle) {
|
|
43
46
|
// NO WebURL... Throw Alert
|
|
44
47
|
if (alertMe === true)
|
|
45
48
|
alert(`${''} ${SourcePropsNoListTitle}`);
|
|
46
|
-
return createErrorFpsListReturn(
|
|
49
|
+
return createErrorFpsListReturn(useUrl, listTitle);
|
|
47
50
|
}
|
|
48
|
-
const requestDigest = sourceProps.digestValue ? sourceProps.digestValue : await getThisFPSDigestValueFromUrl(
|
|
51
|
+
const requestDigest = sourceProps.digestValue ? sourceProps.digestValue : await getThisFPSDigestValueFromUrl(useUrl);
|
|
49
52
|
const initialResult = await doSpJsFileFetchOrPost(postAPI, 'POST', requestDigest, '', blob);
|
|
50
53
|
const result = checkItemsResults(initialResult, `fps-core-v7: postSourceItems ~ 46`, alertMe, consoleLog);
|
|
51
54
|
result.fpsContentType = !sourceProps.fpsContentType ? ['file', 'item'] : sourceProps.fpsContentType;
|
|
52
|
-
if
|
|
55
|
+
// 2024-12-05: changed if to test result, not sourceProps... was getting error reading indexOf
|
|
56
|
+
if (result.fpsContentType.indexOf('item') < 0)
|
|
53
57
|
result.fpsContentType.push('item');
|
|
54
|
-
if (
|
|
58
|
+
if (result.fpsContentType.indexOf('file') < 0)
|
|
55
59
|
result.fpsContentType.push('file');
|
|
56
60
|
result.unifiedPerformanceOps.save = performanceSettings ?
|
|
57
61
|
updatePerformanceEndV2({ op: fetchOp, updateMiliseconds: performanceSettings.updateMiliseconds, count: 1 })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postSourceFilesAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/lists/files/postSourceFilesAPI.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;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;AAE9D,OAAO,EAAE,wBAA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OAAO,CAAE,MAAM,CAAE,GAAG,CAAC;QAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAE,MAAM,CAAE,CAAC;IAExF,MAAM,CAAC,qBAAqB,CAAC,IAAI,GAAG,mBAAmB,CAAC,CAAC;QACvD,sBAAsB,CAAE,EAAE,EAAE,EAAE,OAAyB,EAAE,iBAAiB,EAAE,mBAAmB,CAAC,iBAAiB,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;QAC9H,CAAC,CAAC,IAAW,CAAC,CAAE,oDAAoD;IAEtE,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,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"}
|
|
@@ -7,9 +7,22 @@ import { startPerformOpV2, updatePerformanceEndV2 } from "../../../components/mo
|
|
|
7
7
|
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
|
+
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
|
+
}
|
|
10
21
|
/**
|
|
11
22
|
* getSourceItems calls the Pnp function to get the results which returns the raw error.
|
|
12
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`;
|
|
13
26
|
*
|
|
14
27
|
* @param sourceProps
|
|
15
28
|
* @param alertMe
|
|
@@ -19,19 +32,21 @@ import { createErrorFpsListReturn } from '../../../components/molecules/process-
|
|
|
19
32
|
export async function getSourceItemsAPI(sourceProps, alertMe, consoleLog) {
|
|
20
33
|
const { performanceSettings } = sourceProps;
|
|
21
34
|
const fetchOp = performanceSettings ? startPerformOpV2(performanceSettings) : null;
|
|
22
|
-
const {
|
|
23
|
-
|
|
24
|
-
|
|
35
|
+
const { listTitle, orderBy, orderBy2, fetchCount, restFilter, selectThese, expandThese, skip } = sourceProps;
|
|
36
|
+
// 2024-12-05: Added this because some places like PivotTiles had absoluteWebUrl in webUrl prop... so just taking care of differences
|
|
37
|
+
const useUrl = getAbsoluteWebUrlFromSourceProps(sourceProps);
|
|
38
|
+
let fetchAPI = `${useUrl}/_api/web/lists/getbytitle('${listTitle}')/items?`;
|
|
39
|
+
if (!useUrl) {
|
|
25
40
|
// NO WebURL... Throw Alert
|
|
26
41
|
if (alertMe === true)
|
|
27
42
|
alert(`${listTitle} ${SourcePropsNoWebUrl}`);
|
|
28
|
-
return createErrorFpsListReturn(
|
|
43
|
+
return createErrorFpsListReturn(useUrl, listTitle);
|
|
29
44
|
}
|
|
30
45
|
if (!listTitle) {
|
|
31
46
|
// NO WebURL... Throw Alert
|
|
32
47
|
if (alertMe === true)
|
|
33
48
|
alert(`${''} ${SourcePropsNoListTitle}`);
|
|
34
|
-
return createErrorFpsListReturn(
|
|
49
|
+
return createErrorFpsListReturn(useUrl, listTitle);
|
|
35
50
|
}
|
|
36
51
|
/**
|
|
37
52
|
SAMPLE Full SharePoint Items Rest call:
|
|
@@ -47,8 +62,9 @@ export async function getSourceItemsAPI(sourceProps, alertMe, consoleLog) {
|
|
|
47
62
|
fetchAPI += `$select=${selectThese.join(',')}&`;
|
|
48
63
|
if (expandThese && expandThese.length > 0)
|
|
49
64
|
fetchAPI += `$expand=${expandThese.join(',')}&`;
|
|
65
|
+
// 2024-12-05: Added getTodayRestFilter from fps-Pnp2 fetchAnyItems
|
|
50
66
|
if (restFilter)
|
|
51
|
-
fetchAPI += `$filter=${restFilter}&`;
|
|
67
|
+
fetchAPI += `$filter=${getTodayRestFilter(restFilter)}&`;
|
|
52
68
|
const orderBys = [];
|
|
53
69
|
if (orderBy)
|
|
54
70
|
orderBys.push(`${orderBy.prop} ${orderBy.order}`);
|
|
@@ -56,7 +72,8 @@ export async function getSourceItemsAPI(sourceProps, alertMe, consoleLog) {
|
|
|
56
72
|
orderBys.push(`${orderBy2.prop} ${orderBy2.order}`);
|
|
57
73
|
if (orderBys.length > 0)
|
|
58
74
|
fetchAPI += `$orderby=${orderBys.join(',')}&`;
|
|
59
|
-
|
|
75
|
+
// 2024-12-05: changed to fetchCount > 0 because it was doing top=null which caused an error
|
|
76
|
+
if (fetchCount > 0)
|
|
60
77
|
fetchAPI += `$top=${fetchCount}&`;
|
|
61
78
|
if (skip)
|
|
62
79
|
fetchAPI += `$skip=${skip}&`;
|
|
@@ -65,16 +82,17 @@ export async function getSourceItemsAPI(sourceProps, alertMe, consoleLog) {
|
|
|
65
82
|
// if ( resultHubSites.ok ) {
|
|
66
83
|
// resultHubSites.items = cleanSearchedWebs( resultHubSites.items );
|
|
67
84
|
// }
|
|
68
|
-
const result = checkItemsResults(initialResult, `fps-core-v7:
|
|
85
|
+
const result = checkItemsResults(initialResult, `fps-core-v7: getSourceItemsAPI ~ 79`, alertMe, consoleLog);
|
|
69
86
|
result.fpsContentType = !sourceProps.fpsContentType ? ['item'] : sourceProps.fpsContentType;
|
|
70
|
-
if
|
|
87
|
+
// 2024-12-05: changed if to test result, not sourceProps... was getting error reading indexOf
|
|
88
|
+
if (result.fpsContentType.indexOf('item') < 0)
|
|
71
89
|
result.fpsContentType.push('item');
|
|
72
90
|
result.unifiedPerformanceOps.fetch = performanceSettings ?
|
|
73
91
|
updatePerformanceEndV2({ op: fetchOp, updateMiliseconds: performanceSettings.updateMiliseconds, count: result.items ? result.items.length : 0 })
|
|
74
92
|
: null; // 2024-09-29: set null as any to pass build error.
|
|
75
93
|
result.fetchOp = result.unifiedPerformanceOps.fetch;
|
|
76
94
|
if (check4This(`fpsShowFetchResults=true`) === true) {
|
|
77
|
-
console.log(`fps-core-v7 COMPLETE: getSourceItemsAPI ~
|
|
95
|
+
console.log(`fps-core-v7 COMPLETE: getSourceItemsAPI ~ 90`, result);
|
|
78
96
|
}
|
|
79
97
|
;
|
|
80
98
|
return result;
|
|
@@ -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,gB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W,CAAC,cAAc,CAAC,CAAC,CAAC,CAAE,MAAM,CAAE,CAAC,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC;IAE9F,+FAA+F;IAC/F,IAAK,MAAM,CAAC,cAAc,CAAC,OAAO,CAAE,MAAM,CAAE,GAAG,CAAC;QAAI,MAAM,CAAC,cAAc,CAAC,IAAI,CAAE,MAAM,CAAE,CAAC;IAEzF,MAAM,CAAC,qBAAqB,CAAC,KAAK,GAAG,mBAAmB,CAAC,CAAC;QACxD,sBAAsB,CAAE,EAAE,EAAE,EAAE,OAAyB,EAAE,iBAAiB,EAAE,mBAAmB,CAAC,iBAAiB,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACnK,CAAC,CAAC,IAAW,CAAC,CAAE,oDAAoD;IAEtE,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,qBAAqB,CAAC,KAAK,CAAC;IAEpD,IAAK,UAAU,CAAE,0BAA0B,CAAE,KAAK,IAAI,EAAG;QAAE,OAAO,CAAC,GAAG,CAAE,8CAA8C,EAAE,MAAM,CAAE,CAAA;KAAE;IAAA,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"}
|