@mikezimm/fps-core-v7 1.0.31 → 1.0.33
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/ItemPicker/functions/fetchFileList.d.ts +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/fetchFileListUniqueIds.d.ts +1 -1
- package/lib/banner/components/ItemPicker/functions/fetchFileListUniqueIds.d.ts.map +1 -1
- package/lib/banner/components/ItemPicker/functions/fetchListList.d.ts +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/components/atoms/Inputs/ClipboardImage/ImageSave.d.ts +24 -0
- package/lib/components/atoms/Inputs/ClipboardImage/ImageSave.d.ts.map +1 -0
- package/lib/components/atoms/Inputs/ClipboardImage/ImageSave.js +83 -0
- package/lib/components/atoms/Inputs/ClipboardImage/ImageSave.js.map +1 -0
- package/lib/components/atoms/Inputs/ClipboardImage/handlePasteFiles.d.ts +14 -0
- package/lib/components/atoms/Inputs/ClipboardImage/handlePasteFiles.d.ts.map +1 -0
- package/lib/components/atoms/Inputs/ClipboardImage/handlePasteFiles.js +67 -0
- package/lib/components/atoms/Inputs/ClipboardImage/handlePasteFiles.js.map +1 -0
- package/lib/components/atoms/Inputs/ClipboardImage/handlePasteImage.d.ts +8 -0
- package/lib/components/atoms/Inputs/ClipboardImage/handlePasteImage.d.ts.map +1 -0
- package/lib/components/atoms/Inputs/ClipboardImage/handlePasteImage.js +31 -0
- package/lib/components/atoms/Inputs/ClipboardImage/handlePasteImage.js.map +1 -0
- package/lib/components/atoms/Inputs/GeoLocation/functions.d.ts +2 -1
- package/lib/components/atoms/Inputs/GeoLocation/functions.d.ts.map +1 -1
- package/lib/components/atoms/Inputs/GeoLocation/functions.js +25 -3
- package/lib/components/atoms/Inputs/GeoLocation/functions.js.map +1 -1
- package/lib/components/atoms/Inputs/GeoLocation/interfaces.d.ts +6 -5
- package/lib/components/atoms/Inputs/GeoLocation/interfaces.d.ts.map +1 -1
- package/lib/components/atoms/Inputs/GeoLocation/interfaces.js +1 -0
- package/lib/components/atoms/Inputs/GeoLocation/interfaces.js.map +1 -1
- package/lib/components/molecules/SpHttp/IJSFetchReturn.d.ts +38 -0
- package/lib/components/molecules/SpHttp/IJSFetchReturn.d.ts.map +1 -0
- package/lib/components/molecules/SpHttp/IJSFetchReturn.js +21 -0
- package/lib/components/molecules/SpHttp/IJSFetchReturn.js.map +1 -0
- package/lib/components/molecules/SpHttp/SpFetchCommon.d.ts +9 -0
- package/lib/components/molecules/SpHttp/SpFetchCommon.d.ts.map +1 -0
- package/lib/components/molecules/SpHttp/SpFetchCommon.js +52 -0
- package/lib/components/molecules/SpHttp/SpFetchCommon.js.map +1 -0
- package/lib/components/molecules/SpHttp/doSpJsFetch.d.ts +1 -30
- package/lib/components/molecules/SpHttp/doSpJsFetch.d.ts.map +1 -1
- package/lib/components/molecules/SpHttp/doSpJsFetch.js +7 -47
- package/lib/components/molecules/SpHttp/doSpJsFetch.js.map +1 -1
- package/lib/components/molecules/SpHttp/doSpJsFileFetch.d.ts +22 -0
- package/lib/components/molecules/SpHttp/doSpJsFileFetch.d.ts.map +1 -0
- package/lib/components/molecules/SpHttp/doSpJsFileFetch.js +100 -0
- package/lib/components/molecules/SpHttp/doSpJsFileFetch.js.map +1 -0
- package/lib/components/molecules/process-results/CheckItemsResults.d.ts +2 -0
- package/lib/components/molecules/process-results/CheckItemsResults.d.ts.map +1 -1
- package/lib/components/molecules/process-results/CheckItemsResults.js.map +1 -1
- package/lib/components/molecules/source-props/ISourceProps.d.ts +2 -0
- package/lib/components/molecules/source-props/ISourceProps.d.ts.map +1 -1
- package/lib/components/molecules/source-props/ISourceProps.js +2 -0
- package/lib/components/molecules/source-props/ISourceProps.js.map +1 -1
- package/lib/components/webparts/PalettePal/functions/ReactComponent.d.ts.map +1 -1
- package/lib/components/webparts/PalettePal/functions/ReactComponent.js.map +1 -1
- package/lib/components/webparts/PalettePal/interfaces/IPalettePalReactProps.d.ts +1 -1
- package/lib/components/webparts/PalettePal/interfaces/IPalettePalReactProps.d.ts.map +1 -1
- package/lib/logic/Errors/friendly.d.ts.map +1 -1
- package/lib/logic/Errors/friendly.js +3 -0
- package/lib/logic/Errors/friendly.js.map +1 -1
- package/lib/restAPIs/lists/files/postSourceFilesAPI.d.ts +23 -0
- package/lib/restAPIs/lists/files/postSourceFilesAPI.d.ts.map +1 -0
- package/lib/restAPIs/lists/files/postSourceFilesAPI.js +65 -0
- package/lib/restAPIs/lists/files/postSourceFilesAPI.js.map +1 -0
- package/lib/restAPIs/lists/items/getSourceItemsAPI.d.ts.map +1 -1
- package/lib/restAPIs/lists/items/getSourceItemsAPI.js +3 -2
- package/lib/restAPIs/lists/items/getSourceItemsAPI.js.map +1 -1
- package/lib/restAPIs/lists/items/postSourceItemsAPI.d.ts.map +1 -1
- package/lib/restAPIs/lists/items/postSourceItemsAPI.js +3 -2
- package/lib/restAPIs/lists/items/postSourceItemsAPI.js.map +1 -1
- package/lib/restAPIs/lists/lists/getSourceListsAPI.d.ts.map +1 -1
- package/lib/restAPIs/lists/lists/getSourceListsAPI.js +2 -1
- package/lib/restAPIs/lists/lists/getSourceListsAPI.js.map +1 -1
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.d.ts.map +1 -1
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.js +2 -1
- package/lib/restAPIs/sites/groups/getGroupMembersAPI.js.map +1 -1
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.d.ts.map +1 -1
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.js +2 -1
- package/lib/restAPIs/sites/groups/getWebGroupInfoAPI.js.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/package.json +1 -1
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* Update:: import { IPropPaneFetchFileProps } to '@mikezimm/fps-core-v7/lib/banner/components/ItemPicker/interfaces/IPropPaneFetchFileProps;'
|
|
16
16
|
|
|
17
17
|
*/
|
|
18
|
-
import { IJSFetchReturn } from
|
|
18
|
+
import { IJSFetchReturn } from "../../../../components/molecules/SpHttp/IJSFetchReturn";
|
|
19
19
|
import { IFPSListItemPropPaneDropDownOption } from '../../ItemPicker/interfaces/IFPSListItemPropPaneDropDownOption';
|
|
20
20
|
import { IPropPaneFetchFileProps } from '../../ItemPicker/interfaces/IPropPaneFetchFileProps';
|
|
21
21
|
export declare const DefaultCustomFileSelect: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchFileList.d.ts","sourceRoot":"","sources":["../../../../../src/banner/components/ItemPicker/functions/fetchFileList.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"fetchFileList.d.ts","sourceRoot":"","sources":["../../../../../src/banner/components/ItemPicker/functions/fetchFileList.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,EAAE,cAAc,EAA0B,MAAM,wDAAwD,CAAC;AAMhH,OAAO,EAAE,kCAAkC,EAAE,MAAM,gEAAgE,CAAC;AAEpH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAG9F,eAAO,MAAM,uBAAuB,EAAE,MAA0D,CAAC;AAGjG;;;;;;;;GAQG;AAIH,wBAAsB,aAAa,CAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,GAAG,kCAAkC,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,YAAY,GAAE,MAAgC,GAAI,OAAO,CAAC,cAAc,CAAC,CAoBxN;AAED,MAAM,WAAW,gBAAgB;CAGhC;AAED,wBAAgB,gBAAgB,CAAE,cAAc,EAAE,uBAAuB,EAAE,EAAG,WAAW,EAAE,MAAM,EAAE,GAAI,uBAAuB,EAAE,CAuC/H"}
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
* Update:: import { IPropPaneFetchFileProps } to '@mikezimm/fps-core-v7/lib/banner/components/ItemPicker/interfaces/IPropPaneFetchFileProps;'
|
|
16
16
|
|
|
17
17
|
*/
|
|
18
|
-
import {
|
|
18
|
+
import { doSpJsFetch } from '../../../../components/molecules/SpHttp/doSpJsFetch';
|
|
19
|
+
import { createEmptyFetchReturn } from "../../../../components/molecules/SpHttp/IJSFetchReturn";
|
|
19
20
|
import { startPerformOpV2, unifiedPerformanceEnd } from '../../../../components/molecules/Performance/functions';
|
|
20
21
|
import { checkItemsResults } from '../../../../components/molecules/process-results/CheckItemsResults';
|
|
21
22
|
import { sortObjectArrayByStringKey } from '../../../../logic/Arrays/sorting/objects';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchFileList.js","sourceRoot":"","sources":["../../../../../src/banner/components/ItemPicker/functions/fetchFileList.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,
|
|
1
|
+
{"version":3,"file":"fetchFileList.js","sourceRoot":"","sources":["../../../../../src/banner/components/ItemPicker/functions/fetchFileList.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAkB,sBAAsB,EAAE,MAAM,wDAAwD,CAAC;AAEhH,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAEjH,OAAO,EAAmB,iBAAi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,CAAC,WAAW,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC;QAE7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC;QAC9B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC;IAE1B,CAAC,CAAC,CAAC;IAEH,MAAM,WAAW,GAA8B,0BAA0B,CAAE,aAAa,EAAE,KAAK,EAAE,MAAM,CAAE,CAAC;IAE1G,OAAO,WAAW,CAAC;AAErB,CAAC"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Update:: import { IFPSListItemPropPaneDropDownOption } to '@mikezimm/fps-core-v7/lib/banner/components/ItemPicker/interfaces/IFPSListItemPropPaneDropDownOption;'
|
|
11
11
|
|
|
12
12
|
*/
|
|
13
|
-
import { IJSFetchReturn } from
|
|
13
|
+
import { IJSFetchReturn } from "../../../../components/molecules/SpHttp/IJSFetchReturn";
|
|
14
14
|
/**
|
|
15
15
|
* Added for easier use getting Site Assets with Doc Ids in PagePal
|
|
16
16
|
* @param context
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchFileListUniqueIds.d.ts","sourceRoot":"","sources":["../../../../../src/banner/components/ItemPicker/functions/fetchFileListUniqueIds.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"fetchFileListUniqueIds.d.ts","sourceRoot":"","sources":["../../../../../src/banner/components/ItemPicker/functions/fetchFileListUniqueIds.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AAKxF;;;;;;;;;GASG;AAEH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,GAAG,CAAC;CAEpB;AAED,wBAAsB,sBAAsB,CAAE,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,IAAI,GAAE,MAAY,EAAE,kBAAkB,GAAE,MAAW,GAAG,OAAO,CAAC,cAAc,CAAC,CAWlN"}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Update:: import { WebPartContextCopy_15_2 } to '@mikezimm/fps-core-v7/lib/types/@msft/1.15.2/WebPartContext;'
|
|
13
13
|
|
|
14
14
|
*/
|
|
15
|
-
import { IJSFetchReturn } from
|
|
15
|
+
import { IJSFetchReturn } from "../../../../components/molecules/SpHttp/IJSFetchReturn";
|
|
16
16
|
export interface IListPickerLists {
|
|
17
17
|
Title: string;
|
|
18
18
|
EntityTypeName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchListList.d.ts","sourceRoot":"","sources":["../../../../../src/banner/components/ItemPicker/functions/fetchListList.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"fetchListList.d.ts","sourceRoot":"","sources":["../../../../../src/banner/components/ItemPicker/functions/fetchListList.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,EAAE,cAAc,EAA0B,MAAM,wDAAwD,CAAC;AAShH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE;QACV,iBAAiB,EAAE,MAAM,CAAC;KAC3B,CAAA;IACD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB;AAcD;;;;;;GAMG;AAEH,wBAAsB,aAAa,CAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAG,MAAM,EAAE,MAAM,EAAE,MAAM,GAAI,OAAO,CAAC,cAAc,CAAC,CAwBhH;AAED,wBAAgB,aAAa,CAAE,cAAc,EAAE,gBAAgB,EAAE,GAAK,gBAAgB,EAAE,CAmBvF"}
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
* Update:: import { WebPartContextCopy_15_2 } to '@mikezimm/fps-core-v7/lib/types/@msft/1.15.2/WebPartContext;'
|
|
13
13
|
|
|
14
14
|
*/
|
|
15
|
-
import {
|
|
15
|
+
import { doSpJsFetch } from '../../../../components/molecules/SpHttp/doSpJsFetch';
|
|
16
|
+
import { createEmptyFetchReturn } from "../../../../components/molecules/SpHttp/IJSFetchReturn";
|
|
16
17
|
import { startPerformOpV2, unifiedPerformanceEnd } from '../../../../components/molecules/Performance/functions';
|
|
17
18
|
import { checkItemsResults } from '../../../../components/molecules/process-results/CheckItemsResults';
|
|
18
19
|
// THIS SHOULD COME FROM doSpJsFetch file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchListList.js","sourceRoot":"","sources":["../../../../../src/banner/components/ItemPicker/functions/fetchListList.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"fetchListList.js","sourceRoot":"","sources":["../../../../../src/banner/components/ItemPicker/functions/fetchListList.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAkB,sBAAsB,EAAE,MAAM,wDAAwD,CAAC;AAEhH,OAAO,EAAE,g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AAG,CAAC;IAEvF,IAAI,MAAM,GAAoB,qBAAqB,CAAE,cAAiC,EAAE,mBAAmB,EAAE,OAAyB,EAAE,OAAO,EAAE,OAAO,CAAqB,CAAC;IAC9K,MAAM,CAAC,cAAc,GAAG,CAAE,MAAM,CAAE,CAAC;IAEnC,MAAM,GAAG,iBAAiB,CAAE,MAAyB,EAAE,iCAAiC,EAAE,KAAK,EAAE,IAAI,CAAoB,CAAC;IAE1H,OAAO,MAAM,CAAC;AAEhB,CAAC;AAED,MAAM,UAAU,aAAa,CAAE,cAAkC;IAE/D,sBAAsB;IACtB,eAAe;IAEf,cAAc,CAAC,GAAG,CAAE,IAAI,CAAC,EAAE;QACzB,MAAM,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC;YACvC,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;YACnC,IAAI,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;gBACrE,GAAG,IAAI,CAAC,YAAY,UAAU,IAAI,CAAC,cAAc,EAAE,CAAC;QAEtD,IAAI,CAAC,eAAe,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAC9C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC;QAChC,IAAI,CAAC,GAAG,GAAG,eAAe,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,OAAO,cAAc,CAAC;AAExB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 2024-11-04: Copied from PhotoFormWebpart
|
|
3
|
+
* Sample functions generated by ChatGPT for handling various types of file.
|
|
4
|
+
* 2024-11-03: Currently not used or tested.
|
|
5
|
+
*
|
|
6
|
+
import { ISourceProps } from "../../../molecules/source-props/ISourceProps";
|
|
7
|
+
import { getThisFPSDigestValueFromUrl } from "../../../molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl";
|
|
8
|
+
|
|
9
|
+
import { ISourceProps } from '@mikezimm/fps-core-v7/lib/components/molecules/source-props/ISourceProps';
|
|
10
|
+
import { getThisFPSDigestValueFromUrl } from '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl';
|
|
11
|
+
*/
|
|
12
|
+
import { ISourceProps } from "../../../molecules/source-props/ISourceProps";
|
|
13
|
+
export declare const base64ToBlob: (base64: string) => Blob;
|
|
14
|
+
/**
|
|
15
|
+
* Recommended to use this end point for the base call to upload... or the wrapper which returns IStateSource
|
|
16
|
+
*
|
|
17
|
+
* @param ImagesSource
|
|
18
|
+
* @param base64
|
|
19
|
+
* @param fileName
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
export declare function uploadBase64ImageToLibrary(ImagesSource: ISourceProps, base64: string, fileName: string): Promise<string | null>;
|
|
23
|
+
export declare function uploadImageToLibrary(ImagesSource: ISourceProps, blob: Blob, fileName: string): Promise<string | null>;
|
|
24
|
+
//# sourceMappingURL=ImageSave.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageSave.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Inputs/ClipboardImage/ImageSave.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAS5E,eAAO,MAAM,YAAY,WAAY,MAAM,KAAG,IAO7C,CAAA;AAED;;;;;;;GAOG;AACH,wBAAsB,0BAA0B,CAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAIvI;AAGD,wBAAsB,oBAAoB,CAAC,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAgD3H"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 2024-11-04: Copied from PhotoFormWebpart
|
|
3
|
+
* Sample functions generated by ChatGPT for handling various types of file.
|
|
4
|
+
* 2024-11-03: Currently not used or tested.
|
|
5
|
+
*
|
|
6
|
+
import { ISourceProps } from "../../../molecules/source-props/ISourceProps";
|
|
7
|
+
import { getThisFPSDigestValueFromUrl } from "../../../molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl";
|
|
8
|
+
|
|
9
|
+
import { ISourceProps } from '@mikezimm/fps-core-v7/lib/components/molecules/source-props/ISourceProps';
|
|
10
|
+
import { getThisFPSDigestValueFromUrl } from '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl';
|
|
11
|
+
*/
|
|
12
|
+
import { getThisFPSDigestValueFromUrl } from "../../../molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl";
|
|
13
|
+
// import { ISourceProps } from '@mikezimm/fps-core-v7/lib/components/molecules/source-props/ISourceProps';
|
|
14
|
+
// import { getThisFPSDigestValueFromUrl } from '@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/digestValues/fromUrl/getThisFPSDigestValueFromUrl';
|
|
15
|
+
// 2024-11-02: https://github.com/fps-solutions/FPS-Photo-Form/issues/66
|
|
16
|
+
// Convert base64 image to a Blob
|
|
17
|
+
export const base64ToBlob = (base64) => {
|
|
18
|
+
const binary = atob(base64.split(',')[1]);
|
|
19
|
+
const array = [];
|
|
20
|
+
for (let i = 0; i < binary.length; i++) {
|
|
21
|
+
array.push(binary.charCodeAt(i));
|
|
22
|
+
}
|
|
23
|
+
return new Blob([new Uint8Array(array)], { type: 'image/png' });
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Recommended to use this end point for the base call to upload... or the wrapper which returns IStateSource
|
|
27
|
+
*
|
|
28
|
+
* @param ImagesSource
|
|
29
|
+
* @param base64
|
|
30
|
+
* @param fileName
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
33
|
+
export async function uploadBase64ImageToLibrary(ImagesSource, base64, fileName) {
|
|
34
|
+
const blob = base64ToBlob(base64);
|
|
35
|
+
const imageUrl = await uploadImageToLibrary(ImagesSource, blob, fileName);
|
|
36
|
+
return imageUrl;
|
|
37
|
+
}
|
|
38
|
+
// Upload image to SiteAssets library
|
|
39
|
+
export async function uploadImageToLibrary(ImagesSource, blob, fileName) {
|
|
40
|
+
// Destructure properties from ImagesSource for easier access
|
|
41
|
+
const { absoluteWebUrl, listTitle, subFolder } = ImagesSource;
|
|
42
|
+
// Retrieve the request digest value necessary for SharePoint authentication
|
|
43
|
+
const requestDigest = await getThisFPSDigestValueFromUrl(absoluteWebUrl);
|
|
44
|
+
// Return a new Promise for handling the asynchronous file upload
|
|
45
|
+
return new Promise((resolve, reject) => {
|
|
46
|
+
// Create a FileReader to read the Blob data
|
|
47
|
+
const fileReader = new FileReader();
|
|
48
|
+
// Event handler for when the file reading is complete
|
|
49
|
+
fileReader.onloadend = async () => {
|
|
50
|
+
// Get the result as an ArrayBuffer
|
|
51
|
+
const buffer = fileReader.result;
|
|
52
|
+
// Determine the folder path where the file will be uploaded
|
|
53
|
+
const folderRelativeUrl = subFolder ? `${listTitle}/${subFolder}` : listTitle;
|
|
54
|
+
try {
|
|
55
|
+
// Make a POST request to the SharePoint REST API to upload the file
|
|
56
|
+
const response = await fetch(`${absoluteWebUrl}/_api/web/GetFolderByServerRelativeUrl('${folderRelativeUrl}')/Files/add(url='${fileName}', overwrite=true)`, {
|
|
57
|
+
method: 'POST',
|
|
58
|
+
headers: {
|
|
59
|
+
'Accept': 'application/json; odata=verbose',
|
|
60
|
+
'X-RequestDigest': requestDigest,
|
|
61
|
+
'Content-Length': buffer.byteLength.toString() // Set content length for the upload
|
|
62
|
+
},
|
|
63
|
+
body: buffer // Set the body of the request to the ArrayBuffer
|
|
64
|
+
});
|
|
65
|
+
// Check if the response is OK (status code 200-299)
|
|
66
|
+
if (response.ok) {
|
|
67
|
+
const data = await response.json(); // Parse the JSON response
|
|
68
|
+
const imageUrl = data.d.ServerRelativeUrl; // Get the server-relative URL of the uploaded image
|
|
69
|
+
resolve(imageUrl); // Resolve the promise with the image URL
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
reject(new Error('File upload failed')); // Reject if the upload fails
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
reject(error); // Reject the promise if there’s an error during the fetch
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
// Start reading the Blob as an ArrayBuffer
|
|
80
|
+
fileReader.readAsArrayBuffer(blob);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=ImageSave.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageSave.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Inputs/ClipboardImage/ImageSave.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,4BAA4B,EAAE,MAAM,6EAA6E,CAAC;AAE3H,2GAA2G;AAC3G,0JAA0J;AAE1J,yEAAyE;AAEzE,iCAAiC;AACjC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAc,EAAQ,EAAE;IACnD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACpC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KACpC;IACD,OA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AO,EAAE;wBACP,QAAQ,EAAE,iCAAiC;wBAC3C,iBAAiB,EAAE,aAAa;wBAChC,gBAAgB,EAAE,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,oCAAoC;qBACpF;oBACD,IAAI,EAAE,MAAM,CAAC,iDAAiD;iBAC/D,CAAC,CAAC;gBAEH,oDAAoD;gBACpD,IAAI,QAAQ,CAAC,EAAE,EAAE;oBACf,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,0BAA0B;oBAC9D,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,oDAAoD;oBAC/F,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,yCAAyC;iBAC7D;qBAAM;oBACL,MAAM,CAAC,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,6BAA6B;iBACvE;aACF;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,0DAA0D;aAC1E;QACH,CAAC,CAAC;QAEF,2CAA2C;QAC3C,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 2024-11-04: Copied from PhotoFormWebpart
|
|
3
|
+
* Sample functions generated by ChatGPT for handling various types of file.
|
|
4
|
+
* 2024-11-03: Currently not used or tested.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export interface IClipboardHandlerOptions {
|
|
8
|
+
onImageData?: (data: string) => void;
|
|
9
|
+
onExcelData?: (data: ArrayBuffer) => void;
|
|
10
|
+
onTextData?: (data: string) => void;
|
|
11
|
+
onPowerPointData?: (data: ArrayBuffer) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const handlePaste: (e: ClipboardEvent, options: IClipboardHandlerOptions) => void;
|
|
14
|
+
//# sourceMappingURL=handlePasteFiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlePasteFiles.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Inputs/ClipboardImage/handlePasteFiles.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IAC1C,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;CAChD;AAuCD,eAAO,MAAM,WAAW,MAAO,cAAc,WAAW,wBAAwB,KAAG,IAqBlF,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 2024-11-04: Copied from PhotoFormWebpart
|
|
3
|
+
* Sample functions generated by ChatGPT for handling various types of file.
|
|
4
|
+
* 2024-11-03: Currently not used or tested.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
// Handle image files
|
|
8
|
+
const handleImage = (file, onImageData) => {
|
|
9
|
+
const reader = new FileReader();
|
|
10
|
+
reader.onloadend = function () {
|
|
11
|
+
onImageData(reader.result);
|
|
12
|
+
};
|
|
13
|
+
reader.readAsDataURL(file);
|
|
14
|
+
};
|
|
15
|
+
// Handle Excel files
|
|
16
|
+
const handleExcel = (file, onExcelData) => {
|
|
17
|
+
const reader = new FileReader();
|
|
18
|
+
reader.onloadend = function () {
|
|
19
|
+
onExcelData(reader.result);
|
|
20
|
+
};
|
|
21
|
+
reader.readAsArrayBuffer(file);
|
|
22
|
+
};
|
|
23
|
+
// Handle text files
|
|
24
|
+
const handleText = (file, onTextData) => {
|
|
25
|
+
const reader = new FileReader();
|
|
26
|
+
reader.onloadend = function () {
|
|
27
|
+
onTextData(reader.result);
|
|
28
|
+
};
|
|
29
|
+
reader.readAsText(file);
|
|
30
|
+
};
|
|
31
|
+
// Handle PowerPoint files
|
|
32
|
+
const handlePowerPoint = (file, onPowerPointData) => {
|
|
33
|
+
const reader = new FileReader();
|
|
34
|
+
reader.onloadend = function () {
|
|
35
|
+
onPowerPointData(reader.result);
|
|
36
|
+
};
|
|
37
|
+
reader.readAsArrayBuffer(file);
|
|
38
|
+
};
|
|
39
|
+
// Main clipboard handler
|
|
40
|
+
export const handlePaste = (e, options) => {
|
|
41
|
+
var _a;
|
|
42
|
+
const clipboardItems = (_a = e.clipboardData) === null || _a === void 0 ? void 0 : _a.items;
|
|
43
|
+
if (clipboardItems)
|
|
44
|
+
for (let i = 0; i < (clipboardItems === null || clipboardItems === void 0 ? void 0 : clipboardItems.length); i++) {
|
|
45
|
+
const item = clipboardItems[i];
|
|
46
|
+
const file = item.getAsFile();
|
|
47
|
+
if (!file)
|
|
48
|
+
continue; // Skip if no file is found
|
|
49
|
+
// Combine existence check and type check
|
|
50
|
+
if (options.onImageData && item.type.indexOf('image') !== -1) {
|
|
51
|
+
handleImage(file, options.onImageData);
|
|
52
|
+
}
|
|
53
|
+
else if (options.onExcelData && item.type.indexOf('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') !== -1) {
|
|
54
|
+
handleExcel(file, options.onExcelData);
|
|
55
|
+
}
|
|
56
|
+
else if (options.onTextData && item.type.indexOf('text/plain') !== -1) {
|
|
57
|
+
handleText(file, options.onTextData);
|
|
58
|
+
}
|
|
59
|
+
else if (options.onPowerPointData && item.type.indexOf('application/vnd.openxmlformats-officedocument.presentationml.presentation') !== -1) {
|
|
60
|
+
handlePowerPoint(file, options.onPowerPointData);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
console.warn('Unsupported file type');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=handlePasteFiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlePasteFiles.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Inputs/ClipboardImage/handlePasteFiles.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AASH,qBAAqB;AACrB,MAAM,WAAW,GAAG,CAAC,IAAU,EAAE,WAAmC,EAAQ,EAAE;IAC5E,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;IAChC,MAAM,CAAC,SAAS,GAAG;QACjB,WAAW,CAAC,MAAM,CAAC,MAAgB,CAAC,CAAC;IACvC,CAAC,CAAC;IACF,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEF,qBAAqB;AACrB,MAAM,WAAW,GAAG,CAAC,IAAU,EAAE,WAAwC,EAAQ,EAAE;IACjF,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;IAChC,MAAM,CAAC,SAAS,GAAG;QACjB,WAAW,CAAC,MAAM,CAAC,MAAqB,CAAC,CAAC;IAC5C,CAAC,CAAC;IACF,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,oBAAoB;AACpB,MAAM,UAAU,GAAG,CAAC,IAAU,EAAE,UAAkC,EAAQ,EAAE;IAC1E,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;IAChC,MAAM,CAAC,SAAS,GAAG;QACjB,UAAU,CAAC,MAAM,CAAC,MAAgB,CAAC,CAAC;IACtC,CAAC,CAAC;IACF,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC,CAAC;AAEF,0BAA0B;AAC1B,MAAM,gBAAgB,GAAG,CAAC,IAAU,EAAE,gBAA6C,EAAQ,EAAE;IAC3F,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;IAChC,MAAM,CAAC,SAAS,GAAG;QACjB,gBAAgB,CAAC,MAAM,CAAC,MAAqB,CAAC,CAAC;I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,CAAC,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;aAClD;iBAAM;gBACL,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;aACvC;SACF;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 2024-11-04: Copied from PhotoFormWebpart
|
|
3
|
+
* Sample functions generated by ChatGPT for handling various types of file.
|
|
4
|
+
* 2024-11-03: Currently tested and used in PasteFormForm.tsx in PhotoForm.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export declare function handleImagePaste(e: ClipboardEvent, setImageData: (data: string | null) => void): void;
|
|
8
|
+
//# sourceMappingURL=handlePasteImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlePasteImage.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Inputs/ClipboardImage/handlePasteImage.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAGH,wBAAgB,gBAAgB,CAAE,CAAC,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,GAAI,IAAI,CAwBvG"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 2024-11-04: Copied from PhotoFormWebpart
|
|
3
|
+
* Sample functions generated by ChatGPT for handling various types of file.
|
|
4
|
+
* 2024-11-03: Currently tested and used in PasteFormForm.tsx in PhotoForm.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
// eslint-disable-next-line @rushstack/no-new-null
|
|
8
|
+
export function handleImagePaste(e, setImageData) {
|
|
9
|
+
var _a;
|
|
10
|
+
// Get the clipboard items from the event
|
|
11
|
+
const clipboardItems = (_a = e.clipboardData) === null || _a === void 0 ? void 0 : _a.items;
|
|
12
|
+
// Loop through each item in the clipboard
|
|
13
|
+
if (clipboardItems)
|
|
14
|
+
for (let i = 0; i < (clipboardItems === null || clipboardItems === void 0 ? void 0 : clipboardItems.length); i++) {
|
|
15
|
+
// Check if the item is an image
|
|
16
|
+
if (clipboardItems[i].type.indexOf('image') !== -1) {
|
|
17
|
+
// Get the image file from the clipboard item
|
|
18
|
+
const file = clipboardItems[i].getAsFile();
|
|
19
|
+
// Create a new FileReader instance
|
|
20
|
+
const reader = new FileReader();
|
|
21
|
+
// Define what to do when the file has been read
|
|
22
|
+
reader.onloadend = function () {
|
|
23
|
+
// Store the base64 image data
|
|
24
|
+
setImageData(reader.result);
|
|
25
|
+
};
|
|
26
|
+
// Start reading the image file as a Data URL (base64 format)
|
|
27
|
+
reader.readAsDataURL(file);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=handlePasteImage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlePasteImage.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Inputs/ClipboardImage/handlePasteImage.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,kDAAkD;AAClD,MAAM,UAAU,gBAAgB,CAAE,CAAiB,EAAE,YAA2C;;IAC9F,yCAAyC;IACzC,MAAM,cAAc,GAAG,MAAA,CAAC,CAAC,aAAa,0CAAE,KAAK,CAAC;IAE9C,0CAA0C;IAC1C,IAAK,cAAc;QAAG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAG,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,MAAM,CAAA,EAAE,CAAC,EAAE,EAAE;YACrE,gCAAgC;YAChC,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE;gBAClD,6CAA6C;gBAC7C,MAAM,IAAI,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;gBAE3C,mCAAmC;gBACnC,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;gBAEhC,gDAAgD;gBAChD,MAAM,CAAC,SAAS,GAAG;oBACjB,8BAA8B;oBAC9B,YAAY,CAAC,MAAM,CAAC,MAAgB,CAAC,CAAC;gBACxC,CAAC,CAAC;gBAEF,6DAA6D;gBAC7D,MAAM,CAAC,aAAa,CAAC,IAAY,CAAC,CAAC;aACpC;SACF;AACH,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 2024-10-31 GeoLocation code originally migrated from PhotoForm Webpart sample
|
|
3
3
|
* Happy Halloween 2024!
|
|
4
|
+
* 2024-11-04 updated
|
|
4
5
|
*/
|
|
5
6
|
import { IFpsGeolocationPosition } from "./interfaces";
|
|
6
7
|
export declare const UnknownGeoLocation: IFpsGeolocationPosition;
|
|
7
|
-
export declare function getGeoLocation(): Promise<IFpsGeolocationPosition>;
|
|
8
|
+
export declare function getGeoLocation(debugMode: boolean): Promise<IFpsGeolocationPosition>;
|
|
8
9
|
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Inputs/GeoLocation/functions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Inputs/GeoLocation/functions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAA8B,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEnF,eAAO,MAAM,kBAAkB,EAAE,uBAOhC,CAAC;AAEF,wBAAgB,cAAc,CAAE,SAAS,EAAE,OAAO,GAAI,OAAO,CAAC,uBAAuB,CAAC,CA0CrF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 2024-10-31 GeoLocation code originally migrated from PhotoForm Webpart sample
|
|
3
3
|
* Happy Halloween 2024!
|
|
4
|
+
* 2024-11-04 updated
|
|
4
5
|
*/
|
|
5
6
|
export const UnknownGeoLocation = {
|
|
6
7
|
timestamp: new Date().getTime(),
|
|
@@ -8,20 +9,39 @@ export const UnknownGeoLocation = {
|
|
|
8
9
|
coords: {},
|
|
9
10
|
status: 'Unknown',
|
|
10
11
|
message: '',
|
|
11
|
-
error:
|
|
12
|
+
error: undefined,
|
|
12
13
|
};
|
|
13
|
-
export function getGeoLocation() {
|
|
14
|
+
export function getGeoLocation(debugMode) {
|
|
14
15
|
return new Promise((resolve, reject) => {
|
|
16
|
+
if (debugMode)
|
|
17
|
+
alert(`debugMode getGeoLocation ~ 19`);
|
|
15
18
|
let result = JSON.parse(JSON.stringify(UnknownGeoLocation));
|
|
19
|
+
if (debugMode)
|
|
20
|
+
alert(`debugMode getGeoLocation ~ 21`);
|
|
16
21
|
if (navigator.geolocation) {
|
|
17
22
|
navigator.geolocation.getCurrentPosition((position) => {
|
|
23
|
+
if (debugMode)
|
|
24
|
+
alert(`debugMode getGeoLocation ~ 25`);
|
|
18
25
|
result = JSON.parse(JSON.stringify(position));
|
|
26
|
+
if (debugMode)
|
|
27
|
+
alert(`debugMode getGeoLocation ~ 27`);
|
|
19
28
|
result.status = 'Success';
|
|
20
29
|
result.localTime = new Date(result.timestamp).toLocaleString();
|
|
21
|
-
|
|
30
|
+
// https://github.com/fps-solutions/FPS-Photo-Form/issues/68
|
|
31
|
+
if (result.localTime.indexOf('Invalid') > -1) {
|
|
32
|
+
result.status = 'Error';
|
|
33
|
+
result.error = { code: 2, message: 'Invalid Time' };
|
|
34
|
+
}
|
|
35
|
+
result.message = `${result.localTime}`;
|
|
36
|
+
if (debugMode)
|
|
37
|
+
alert(`debugMode getGeoLocation ~ 31: ${JSON.stringify(result)}`);
|
|
22
38
|
resolve(result); // Resolve the promise with the result
|
|
23
39
|
}, (error) => {
|
|
40
|
+
if (debugMode)
|
|
41
|
+
alert(`debugMode getGeoLocation ~ 35`);
|
|
24
42
|
console.error('Error obtaining location:', error);
|
|
43
|
+
if (debugMode)
|
|
44
|
+
alert(`debugMode getGeoLocation ~ 37: ${error.message}`);
|
|
25
45
|
result.status = 'Error';
|
|
26
46
|
result.error = error;
|
|
27
47
|
result.message = error.message;
|
|
@@ -32,6 +52,8 @@ export function getGeoLocation() {
|
|
|
32
52
|
else {
|
|
33
53
|
result.status = 'Error';
|
|
34
54
|
result.message = 'Geolocation is not supported by this browser.';
|
|
55
|
+
if (debugMode)
|
|
56
|
+
alert(`debugMode getGeoLocation ~ 48: ${result.message}`);
|
|
35
57
|
reject(result); // Reject the promise
|
|
36
58
|
}
|
|
37
59
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Inputs/GeoLocation/functions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Inputs/GeoLocation/functions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,CAAC,MAAM,kBAAkB,GAA4B;IACzD,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE;IAC/B,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,cAAc,EAAE;IACtC,MAAM,EAAE,EAAgC;IACxC,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,SAAS;CACjB,CAAC;AAEF,MAAM,UAAU,cAAc,CAAE,SAAkB;IAChD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAK,SAAS;YAAG,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACxD,IAAI,MAAM,GAA4B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAC;QACrF,IAAK,SAAS;YAAG,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACxD,IAAI,SAAS,CAAC,WAAW,EAAE;YACzB,SAAS,CAAC,WAAW,CAAC,kBAAk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,CAAC;gBAC/B,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,2CAA2C;YAC7D,CAAC,EACD,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC,gBAAgB;aAC9C,CAAC;SACH;aAAM;YACL,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC;YACxB,MAAM,CAAC,OAAO,GAAG,+CAA+C,CAAC;YACjE,IAAK,SAAS;gBAAG,KAAK,CAAC,kCAAkC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;YAC3E,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,qBAAqB;SACtC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 2024-10-31 GeoLocation code originally migrated from PhotoForm Webpart sample
|
|
3
3
|
* Happy Halloween 2024!
|
|
4
|
+
* 2024-11-04 updated
|
|
4
5
|
*/
|
|
5
6
|
import { IReactCSSProperties } from "../../../../types/react/IReactCSSTypes";
|
|
6
7
|
/**
|
|
@@ -24,16 +25,16 @@ export interface IFpsGeolocationPosition {
|
|
|
24
25
|
coords: IFpsGeolocationCoordinates;
|
|
25
26
|
status: string;
|
|
26
27
|
message: string;
|
|
27
|
-
error: IFpsGeolocationPositionError |
|
|
28
|
+
error: IFpsGeolocationPositionError | undefined;
|
|
28
29
|
}
|
|
29
30
|
export interface IFpsGeolocationCoordinates {
|
|
30
31
|
accuracy: number;
|
|
31
32
|
latitude: number;
|
|
32
33
|
longitude: number;
|
|
33
|
-
altitude: number |
|
|
34
|
-
altitudeAccuracy: number |
|
|
35
|
-
heading: number |
|
|
36
|
-
speed: number |
|
|
34
|
+
altitude: number | undefined;
|
|
35
|
+
altitudeAccuracy: number | undefined;
|
|
36
|
+
heading: number | undefined;
|
|
37
|
+
speed: number | undefined;
|
|
37
38
|
}
|
|
38
39
|
export interface IFpsGeolocationPositionError {
|
|
39
40
|
code: IFpsGeolocationPositionErrorCode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Inputs/GeoLocation/interfaces.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Inputs/GeoLocation/interfaces.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAE7E;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,CAAE,QAAQ,EAAE,uBAAuB,KAAM,IAAI,CAAC;IAC9D,QAAQ,CAAC,EAAE,CAAE,QAAQ,EAAE,uBAAuB,KAAM,IAAI,CAAC;IACzD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,0BAA0B,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,4BAA4B,GAAG,SAAS,CAAC;CACjD;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,gCAAgC,CAAC;IACvC,OAAO,EAAE,MAAM,CAAC;IAEhB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAGD,oBAAY,gCAAgC;IAC1C,iBAAiB,IAAI;IACrB,oBAAoB,IAAI;IACxB,OAAO,IAAI;CACZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Inputs/GeoLocation/interfaces.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Inputs/GeoLocation/interfaces.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgDH,2DAA2D;AAC3D,MAAM,CAAN,IAAY,gCAIX;AAJD,WAAY,gCAAgC;IAC1C,iHAAqB,CAAA;IACrB,uHAAwB,CAAA;IACxB,6FAAW,CAAA;AACb,CAAC,EAJW,gCAAgC,KAAhC,gCAAgC,QAI3C"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
import { IFPSBaseContentType } from "@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFPSBaseContentType";
|
|
3
|
+
import { IFpsErrorObject, IUnifiedPerformanceOps } from "@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFpsErrorObject";
|
|
4
|
+
import { IFPSResultStatus } from "@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFPSResultStatus";
|
|
5
|
+
import { IFPSSearchAPIResultsData } from "@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/interfaces/IFPSSearchAPIResultsData";
|
|
6
|
+
*/
|
|
7
|
+
import { IFPSBaseContentType } from "../../../types/fps-returns/common/IFPSBaseContentType";
|
|
8
|
+
import { IFpsErrorObject, IUnifiedPerformanceOps } from "../../../types/fps-returns/common/IFpsErrorObject";
|
|
9
|
+
import { IFPSResultStatus } from "../../../types/fps-returns/common/IFPSResultStatus";
|
|
10
|
+
import { IFPSSearchAPIResultsData } from "./interfaces/IFPSSearchAPIResultsData";
|
|
11
|
+
export interface IJSFetchReturn extends IFpsErrorObject {
|
|
12
|
+
status: IFPSResultStatus;
|
|
13
|
+
ok: boolean;
|
|
14
|
+
items: any[];
|
|
15
|
+
e: any;
|
|
16
|
+
rawSearchResults?: IFPSSearchAPIResultsData;
|
|
17
|
+
fetchAPI: string;
|
|
18
|
+
unifiedPerformanceOps: IUnifiedPerformanceOps;
|
|
19
|
+
fpsContentType: IFPSBaseContentType[];
|
|
20
|
+
itemUrl?: string;
|
|
21
|
+
method: IJSFetchMethod;
|
|
22
|
+
meta0?: string[];
|
|
23
|
+
meta1?: string[];
|
|
24
|
+
meta2?: string[];
|
|
25
|
+
meta3?: string[];
|
|
26
|
+
meta4?: string[];
|
|
27
|
+
metaA?: string[];
|
|
28
|
+
metaB?: string[];
|
|
29
|
+
metaC?: string[];
|
|
30
|
+
metaD?: string[];
|
|
31
|
+
metaS?: string[];
|
|
32
|
+
metaW?: string[];
|
|
33
|
+
metaL?: string[];
|
|
34
|
+
metaF?: string[];
|
|
35
|
+
}
|
|
36
|
+
export type IJSFetchMethod = 'GET' | 'POST' | 'DELETE';
|
|
37
|
+
export declare function createEmptyFetchReturn(fetchAPI: string, method: IJSFetchMethod, makeError?: string): IJSFetchReturn;
|
|
38
|
+
//# sourceMappingURL=IJSFetchReturn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJSFetchReturn.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/SpHttp/IJSFetchReturn.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAC5F,OAAO,EAAE,eAAe,E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AAS,GAAE,MAAW,GAAG,cAAc,CAavH"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
import { IFPSBaseContentType } from "@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFPSBaseContentType";
|
|
3
|
+
import { IFpsErrorObject, IUnifiedPerformanceOps } from "@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFpsErrorObject";
|
|
4
|
+
import { IFPSResultStatus } from "@mikezimm/fps-core-v7/lib/types/fps-returns/common/IFPSResultStatus";
|
|
5
|
+
import { IFPSSearchAPIResultsData } from "@mikezimm/fps-core-v7/lib/components/molecules/SpHttp/interfaces/IFPSSearchAPIResultsData";
|
|
6
|
+
*/
|
|
7
|
+
export function createEmptyFetchReturn(fetchAPI, method, makeError = '') {
|
|
8
|
+
const emptyObject = {
|
|
9
|
+
items: [],
|
|
10
|
+
// 2024-09-15: Added 'as any' when migrating from fps-library-v2
|
|
11
|
+
ok: makeError ? false : null,
|
|
12
|
+
e: makeError ? makeError : null,
|
|
13
|
+
status: makeError ? 'Error' : 'Unknown',
|
|
14
|
+
fetchAPI: fetchAPI,
|
|
15
|
+
unifiedPerformanceOps: {},
|
|
16
|
+
fpsContentType: [],
|
|
17
|
+
method: method,
|
|
18
|
+
};
|
|
19
|
+
return emptyObject;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=IJSFetchReturn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJSFetchReturn.js","sourceRoot":"","sources":["../../../../src/components/molecules/SpHttp/IJSFetchReturn.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AA4CH,MAAM,UAAU,sBAAsB,CAAC,QAAgB,EAAE,MAAsB,EAAE,YAAoB,EAAE;IACrG,MAAM,WAAW,GAAmB;QAClC,KAAK,EAAE,EAAE;QACT,iEAAiE;QACjE,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAW;QACnC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;QAC/B,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;QACvC,QAAQ,EAAE,QAAQ;QAClB,qBAAqB,EAAE,EAAE;QACzB,cAAc,EAAE,EAAE;QAClB,MAAM,EAAE,MAAM;KACf,CAAC;IACF,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
import { check4This } from "@mikezimm/fps-core-v7/lib/logic/Links/CheckSearch";
|
|
3
|
+
import { checkDeepProperty } from "@mikezimm/fps-core-v7/lib/logic/Objects/deep";
|
|
4
|
+
import { IJSFetchReturn } from "./IJSFetchReturn";
|
|
5
|
+
*/
|
|
6
|
+
import { IJSFetchReturn } from "./IJSFetchReturn";
|
|
7
|
+
export declare function addCatchResponseError(results: IJSFetchReturn, response: Response, digestValue: string): Promise<IJSFetchReturn>;
|
|
8
|
+
export declare function addUnknownFetchError(results: IJSFetchReturn, e: any): IJSFetchReturn;
|
|
9
|
+
//# sourceMappingURL=SpFetchCommon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpFetchCommon.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/SpHttp/SpFetchCommon.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,wBAAsB,qBAAqB,CAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,GAAI,OAAO,CAAC,cAAc,CAAC,CA2BvI;AAED,wBAAgB,oBAAoB,CAAE,OAAO,EAAE,cAAc,EAAE,CAAC,EAAE,GAAG,GAAG,cAAc,CAsBrF"}
|