@esri/solutions-components 0.7.52 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/consent-manager/resources.json +12 -0
- package/dist/assets/t9n/consent-manager/resources_en.json +12 -0
- package/dist/cjs/{_commonjsHelpers-384729db.js → _commonjsHelpers-480c2e77.js} +16 -0
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +3 -3
- package/dist/cjs/buffer-tools_3.cjs.entry.js +3 -3
- package/dist/cjs/calcite-action-pad_2.cjs.entry.js +3 -3
- package/dist/cjs/calcite-alert_4.cjs.entry.js +4 -4
- package/dist/cjs/calcite-color-picker-hex-input_2.cjs.entry.js +2 -2
- package/dist/cjs/calcite-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/calcite-combobox_5.cjs.entry.js +3 -3
- package/dist/cjs/calcite-flow_5.cjs.entry.js +4 -4
- package/dist/cjs/calcite-input-date-picker_3.cjs.entry.js +5 -5
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +6 -6
- package/dist/cjs/card-manager_3.cjs.entry.js +6 -6
- package/dist/cjs/{common-4cd3537b.js → common-e6e9f7d6.js} +1 -1
- package/dist/cjs/consent-manager.cjs.entry.js +1769 -0
- package/dist/cjs/crowdsource-manager.cjs.entry.js +3 -3
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +3 -3
- package/dist/cjs/{downloadUtils-82bc9a04.js → downloadUtils-c2bd7c80.js} +6 -6
- package/dist/cjs/{esri-loader-a91c0ec1.js → esri-loader-ce6c3d3d.js} +1 -1
- package/dist/cjs/{helpers-e328869d.js → helpers-81779c18.js} +1 -1
- package/dist/cjs/{html2canvas-34208bbf.js → html2canvas-27a2547c.js} +1 -1
- package/dist/cjs/{index.es-79d8773c.js → index.es-22b3d1a2.js} +6 -6
- package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-control-panel.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-export.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-header.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +7 -7
- package/dist/cjs/instant-apps-language-translator.cjs.entry.js +7 -7
- package/dist/cjs/instant-apps-measurement.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-popover.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-splash.cjs.entry.js +5 -5
- package/dist/cjs/{languageSwitcher-7de41e17.js → languageSwitcher-4822684b.js} +1 -1
- package/dist/cjs/{languageUtil-a3b464f8.js → languageUtil-9bd00bad.js} +1 -1
- package/dist/cjs/layout-manager.cjs.entry.js +3 -3
- package/dist/cjs/{loadModules-51c30ab9.js → loadModules-69fc5b98.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{locale-8c42ba7a.js → locale-3d0a4bc2.js} +1 -1
- package/dist/cjs/{locale-dab3f46a.js → locale-3e33f44c.js} +2 -2
- package/dist/cjs/map-select-tools_3.cjs.entry.js +6 -6
- package/dist/cjs/{popupUtils-824d2f7c.js → popupUtils-6be3588c.js} +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +6 -6
- package/dist/cjs/{purify-f8c3e427.js → purify-4791ecca.js} +1 -1
- package/dist/cjs/{resources-adfcb1ec.js → resources-02142b99.js} +1 -1
- package/dist/cjs/{restHelpersGet-e0737480.js → restHelpersGet-2ed729ab.js} +1 -1
- package/dist/cjs/solution-configuration.cjs.entry.js +6 -6
- package/dist/cjs/solution-contents_3.cjs.entry.js +7 -7
- package/dist/cjs/{solution-resource-abec7452.js → solution-resource-97186521.js} +1 -1
- package/dist/cjs/{solution-store-2f7fbcc5.js → solution-store-67bcf552.js} +2 -2
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/cjs/spatial-ref.cjs.entry.js +5 -5
- package/dist/cjs/{utils-a137dc1a.js → utils-ea7a5a63.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/consent-manager/consent-manager.css +67 -0
- package/dist/collection/components/consent-manager/consent-manager.js +278 -0
- package/dist/collection/components/consent-manager/test/consent-manager.e2e.js +29 -0
- package/dist/collection/components/consent-manager/test/consent-manager.spec.js +37 -0
- package/dist/collection/utils/interfaces.ts +4 -0
- package/dist/components/_commonjsHelpers.js +16 -1
- package/dist/components/consent-manager.d.ts +11 -0
- package/dist/components/consent-manager.js +1844 -0
- package/dist/components/downloadUtils.js +1 -1
- package/dist/components/index.es.js +1 -1
- package/dist/esm/{_commonjsHelpers-d5f9d613.js → _commonjsHelpers-0f74c230.js} +16 -1
- package/dist/esm/basemap-gallery_7.entry.js +3 -3
- package/dist/esm/buffer-tools_3.entry.js +3 -3
- package/dist/esm/calcite-action-pad_2.entry.js +3 -3
- package/dist/esm/calcite-alert_4.entry.js +4 -4
- package/dist/esm/calcite-color-picker-hex-input_2.entry.js +2 -2
- package/dist/esm/calcite-color-picker.entry.js +2 -2
- package/dist/esm/calcite-combobox_5.entry.js +3 -3
- package/dist/esm/calcite-flow_5.entry.js +4 -4
- package/dist/esm/calcite-input-date-picker_3.entry.js +5 -5
- package/dist/esm/calcite-shell-panel_14.entry.js +6 -6
- package/dist/esm/card-manager_3.entry.js +6 -6
- package/dist/esm/{common-d04ccc0d.js → common-06bcfe81.js} +1 -1
- package/dist/esm/consent-manager.entry.js +1765 -0
- package/dist/esm/crowdsource-manager.entry.js +3 -3
- package/dist/esm/crowdsource-reporter.entry.js +3 -3
- package/dist/esm/{downloadUtils-3bab4b5f.js → downloadUtils-a6c0e25f.js} +6 -6
- package/dist/esm/{esri-loader-eda07632.js → esri-loader-1b324844.js} +1 -1
- package/dist/esm/{helpers-633917fe.js → helpers-aeddac74.js} +1 -1
- package/dist/esm/{html2canvas-a0a4df55.js → html2canvas-7f5bb1cc.js} +1 -1
- package/dist/esm/{index.es-be703f2b.js → index.es-b0a676ae.js} +6 -6
- package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +6 -6
- package/dist/esm/instant-apps-control-panel.entry.js +3 -3
- package/dist/esm/instant-apps-export.entry.js +5 -5
- package/dist/esm/instant-apps-header.entry.js +3 -3
- package/dist/esm/instant-apps-interactive-legend-classic.entry.js +4 -4
- package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +4 -4
- package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +4 -4
- package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +4 -4
- package/dist/esm/instant-apps-interactive-legend.entry.js +6 -6
- package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +5 -5
- package/dist/esm/instant-apps-language-switcher.entry.js +7 -7
- package/dist/esm/instant-apps-language-translator.entry.js +7 -7
- package/dist/esm/instant-apps-measurement.entry.js +5 -5
- package/dist/esm/instant-apps-popover.entry.js +5 -5
- package/dist/esm/instant-apps-scoreboard.entry.js +5 -5
- package/dist/esm/instant-apps-splash.entry.js +5 -5
- package/dist/esm/{languageSwitcher-62232826.js → languageSwitcher-4faa659f.js} +1 -1
- package/dist/esm/{languageUtil-8b54477c.js → languageUtil-dc3111c1.js} +1 -1
- package/dist/esm/layout-manager.entry.js +3 -3
- package/dist/esm/{loadModules-b677d6d7.js → loadModules-877bbb89.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{locale-25a5ae3e.js → locale-bcbea4ef.js} +1 -1
- package/dist/esm/{locale-c7d9e9aa.js → locale-bd9034e1.js} +2 -2
- package/dist/esm/map-select-tools_3.entry.js +6 -6
- package/dist/esm/{popupUtils-23fe3c9f.js → popupUtils-af124b47.js} +1 -1
- package/dist/esm/public-notification.entry.js +6 -6
- package/dist/esm/{purify-c99d2ace.js → purify-dce4d86b.js} +1 -1
- package/dist/esm/{resources-79914606.js → resources-61b0cdad.js} +1 -1
- package/dist/esm/{restHelpersGet-af032ab2.js → restHelpersGet-2a85d395.js} +1 -1
- package/dist/esm/solution-configuration.entry.js +6 -6
- package/dist/esm/solution-contents_3.entry.js +7 -7
- package/dist/esm/{solution-resource-7b8d302d.js → solution-resource-77aa99c8.js} +1 -1
- package/dist/esm/{solution-store-01769bbf.js → solution-store-13ddaf1c.js} +2 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/spatial-ref.entry.js +5 -5
- package/dist/esm/{utils-b46c535b.js → utils-28d0a086.js} +1 -1
- package/dist/solutions-components/{p-54b7b859.entry.js → p-015a45e2.entry.js} +1 -1
- package/dist/solutions-components/{p-b756d01f.js → p-03037cf9.js} +1 -1
- package/dist/solutions-components/{p-2917dae0.entry.js → p-03a65871.entry.js} +1 -1
- package/dist/solutions-components/{p-86b21da1.js → p-07626c45.js} +1 -1
- package/dist/solutions-components/{p-14a48b14.js → p-090e0241.js} +1 -1
- package/dist/solutions-components/{p-531ccf84.entry.js → p-09312a7a.entry.js} +1 -1
- package/dist/solutions-components/{p-8595b4aa.entry.js → p-09801ba6.entry.js} +1 -1
- package/dist/solutions-components/{p-2f017ad2.entry.js → p-0d72a9ca.entry.js} +1 -1
- package/dist/solutions-components/p-0e5274bd.entry.js +6 -0
- package/dist/solutions-components/{p-bb94c414.entry.js → p-104f07e3.entry.js} +1 -1
- package/dist/solutions-components/{p-2592e0dd.js → p-188ed8b6.js} +1 -1
- package/dist/solutions-components/{p-16a82c20.js → p-192b6455.js} +1 -1
- package/dist/solutions-components/{p-7cfc4ba5.entry.js → p-1a7cef7b.entry.js} +1 -1
- package/dist/solutions-components/{p-463712ef.entry.js → p-1ac2125a.entry.js} +2 -2
- package/dist/solutions-components/{p-23fed594.entry.js → p-1bca71bf.entry.js} +1 -1
- package/dist/solutions-components/{p-ce4eed51.entry.js → p-220c46c2.entry.js} +1 -1
- package/dist/solutions-components/{p-c8ca9b8c.entry.js → p-299d1eaf.entry.js} +3 -3
- package/dist/solutions-components/{p-7cfce9ee.entry.js → p-2e7a9b9b.entry.js} +2 -2
- package/dist/solutions-components/{p-df468e80.entry.js → p-35c9256b.entry.js} +2 -2
- package/dist/solutions-components/{p-d561c970.entry.js → p-41bc9e9d.entry.js} +1 -1
- package/dist/solutions-components/{p-4742efa8.entry.js → p-5a28d60c.entry.js} +1 -1
- package/dist/solutions-components/{p-e46617d1.entry.js → p-5c7e3941.entry.js} +1 -1
- package/dist/solutions-components/{p-8dbf3319.entry.js → p-63466518.entry.js} +1 -1
- package/dist/solutions-components/{p-c05467fd.entry.js → p-6512dc44.entry.js} +1 -1
- package/dist/solutions-components/{p-0f66fd89.js → p-66bca043.js} +3 -3
- package/dist/solutions-components/{p-a8a0187d.js → p-70359c2b.js} +1 -1
- package/dist/solutions-components/{p-91d3732f.js → p-734d1dc5.js} +1 -1
- package/dist/solutions-components/{p-de459c0a.entry.js → p-7d6ee026.entry.js} +1 -1
- package/dist/solutions-components/{p-91710f0e.entry.js → p-8ad937b4.entry.js} +1 -1
- package/dist/solutions-components/{p-d918ec36.js → p-8ddc7786.js} +1 -1
- package/dist/solutions-components/p-8e9f96db.js +6 -0
- package/dist/solutions-components/{p-220ec0d1.js → p-94c634ba.js} +1 -1
- package/dist/solutions-components/{p-e2b0b3fa.entry.js → p-a2544cba.entry.js} +1 -1
- package/dist/solutions-components/{p-3cf84035.entry.js → p-a455c3f0.entry.js} +1 -1
- package/dist/solutions-components/{p-044cd52c.entry.js → p-a59078ee.entry.js} +1 -1
- package/dist/solutions-components/{p-701ed205.js → p-a7b7f8d1.js} +1 -1
- package/dist/solutions-components/{p-96104375.entry.js → p-aec4441b.entry.js} +1 -1
- package/dist/solutions-components/{p-d9995b7e.js → p-b41e2c4c.js} +3 -3
- package/dist/solutions-components/{p-d89fff3a.js → p-b503d01d.js} +1 -1
- package/dist/solutions-components/{p-cacd0307.entry.js → p-b80bc5b9.entry.js} +1 -1
- package/dist/solutions-components/{p-b04c9dc3.js → p-be8ef276.js} +1 -1
- package/dist/solutions-components/{p-6ac459d9.entry.js → p-c10b44ee.entry.js} +1 -1
- package/dist/solutions-components/{p-88cd4a24.entry.js → p-c302bbea.entry.js} +1 -1
- package/dist/solutions-components/{p-547b4dba.entry.js → p-c375881a.entry.js} +1 -1
- package/dist/solutions-components/{p-e05b02c5.entry.js → p-cd1ca3a6.entry.js} +1 -1
- package/dist/solutions-components/{p-3cce003d.js → p-cde1d741.js} +1 -1
- package/dist/solutions-components/{p-ccfdd890.entry.js → p-cfe890f6.entry.js} +1 -1
- package/dist/solutions-components/{p-a4bb0787.entry.js → p-df29f4c2.entry.js} +1 -1
- package/dist/solutions-components/p-e2d0ad1b.js +6 -0
- package/dist/solutions-components/{p-bf9e18d4.js → p-eab00813.js} +1 -1
- package/dist/solutions-components/{p-e8cd89c2.entry.js → p-efe1694a.entry.js} +1 -1
- package/dist/solutions-components/{p-697e9e11.entry.js → p-f3467807.entry.js} +1 -1
- package/dist/solutions-components/{p-3cb1de38.entry.js → p-f6be44e6.entry.js} +1 -1
- package/dist/solutions-components/{p-f23e6499.js → p-fb7a5f6e.js} +2 -2
- package/dist/solutions-components/{p-dbb6f1e2.entry.js → p-ff302d95.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +4 -0
- package/dist/types/components/consent-manager/consent-manager.d.ts +109 -0
- package/dist/types/components.d.ts +62 -2
- package/dist/types/preact.d.ts +4 -0
- package/dist/types/utils/interfaces.d.ts +3 -0
- package/package.json +5 -2
- package/dist/solutions-components/p-00f9774c.js +0 -6
- package/dist/solutions-components/p-e1a4994d.js +0 -6
@@ -0,0 +1,109 @@
|
|
1
|
+
/** @license
|
2
|
+
* Copyright 2024 Esri
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
/// <reference types="arcgis-js-api" />
|
17
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
18
|
+
import ConsentManager_T9n from "../../assets/t9n/consent-manager/resources.json";
|
19
|
+
import { Telemetry } from "@esri/telemetry";
|
20
|
+
import { IConsentResponse } from "../../utils/interfaces";
|
21
|
+
export declare class ConsentManager {
|
22
|
+
el: HTMLConsentManagerElement;
|
23
|
+
/**
|
24
|
+
* string: The name to use for the variable stored in the browsers local storge that
|
25
|
+
* will keep track of the users choice for consent
|
26
|
+
*/
|
27
|
+
firstUseVar: string;
|
28
|
+
/**
|
29
|
+
* string[]: Any ids for the analytics configured to receive events from the telemety instance
|
30
|
+
*/
|
31
|
+
measurementIds: string[];
|
32
|
+
/**
|
33
|
+
* esri/portal/Portal: https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html
|
34
|
+
* Required prop for this component to function
|
35
|
+
*/
|
36
|
+
portal: __esri.Portal;
|
37
|
+
/**
|
38
|
+
* boolean: When true the user has not allowed or denied consent
|
39
|
+
*/
|
40
|
+
_shouldRender: boolean;
|
41
|
+
/**
|
42
|
+
* Contains the translations for this component.
|
43
|
+
* All UI strings should be defined here.
|
44
|
+
*/
|
45
|
+
_translations: typeof ConsentManager_T9n;
|
46
|
+
/**
|
47
|
+
* boolean: When true the user has granted consent and the telemetry instance will be avaliable
|
48
|
+
*/
|
49
|
+
protected _consentGranted: boolean;
|
50
|
+
/**
|
51
|
+
* boolean: When true the telemetry instance has been loaded
|
52
|
+
*/
|
53
|
+
protected _loaded: boolean;
|
54
|
+
/**
|
55
|
+
* Telemetry: The telemetry instance that can be used to log events by the consuming application
|
56
|
+
* https://www.npmjs.com/package/@esri/telemetry
|
57
|
+
*/
|
58
|
+
protected _telemetryInstance: Telemetry;
|
59
|
+
/**
|
60
|
+
* Initialize and return the telemetry instance if consent has been granted
|
61
|
+
*/
|
62
|
+
getInstance(): Promise<Telemetry | undefined>;
|
63
|
+
/**
|
64
|
+
* Emitted on demand when the user accepts or denies consent
|
65
|
+
*/
|
66
|
+
consentGranted: EventEmitter<IConsentResponse>;
|
67
|
+
/**
|
68
|
+
* StencilJS: Called once just after the component is first connected to the DOM.
|
69
|
+
*
|
70
|
+
* @returns Promise when complete
|
71
|
+
*/
|
72
|
+
componentWillLoad(): Promise<void>;
|
73
|
+
/**
|
74
|
+
* Renders the component.
|
75
|
+
*/
|
76
|
+
render(): any;
|
77
|
+
/**
|
78
|
+
* Fetches the component's translations
|
79
|
+
*
|
80
|
+
* @returns Promise when complete
|
81
|
+
* @protected
|
82
|
+
*/
|
83
|
+
_init(): Promise<void>;
|
84
|
+
/**
|
85
|
+
* Store the users granting of consent
|
86
|
+
*
|
87
|
+
* @protected
|
88
|
+
*/
|
89
|
+
_accept(): void;
|
90
|
+
/**
|
91
|
+
* Store the users refusal of consent
|
92
|
+
*
|
93
|
+
* @protected
|
94
|
+
*/
|
95
|
+
_refuse(): void;
|
96
|
+
/**
|
97
|
+
* Store and emit the users choice for consent
|
98
|
+
*
|
99
|
+
* @protected
|
100
|
+
*/
|
101
|
+
protected _handleConsent(): void;
|
102
|
+
/**
|
103
|
+
* Fetches the component's translations
|
104
|
+
*
|
105
|
+
* @returns Promise when complete
|
106
|
+
* @protected
|
107
|
+
*/
|
108
|
+
protected _getTranslations(): Promise<void>;
|
109
|
+
}
|
@@ -5,9 +5,9 @@
|
|
5
5
|
* It contains typing information for all components that exist in this project.
|
6
6
|
*/
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
8
|
-
import { ButtonType, DistanceUnit, EditType, EDrawMode, ELayoutMode, IBasemapConfig, IExportInfos, IInventoryItem, ILayerAndTableIds, IMapChange, IMapInfo, ISearchConfiguration, ISelectionSet, ISketchGraphicsChange, ISolutionSpatialReferenceInfo, ISpatialRefRepresentation, IValueChange, theme } from "./utils/interfaces";
|
8
|
+
import { ButtonType, DistanceUnit, EditType, EDrawMode, ELayoutMode, IBasemapConfig, IConsentResponse, IExportInfos, IInventoryItem, ILayerAndTableIds, IMapChange, IMapInfo, ISearchConfiguration, ISelectionSet, ISketchGraphicsChange, ISolutionSpatialReferenceInfo, ISpatialRefRepresentation, IValueChange, theme } from "./utils/interfaces";
|
9
9
|
import { UserSession } from "@esri/solution-common";
|
10
|
-
export { ButtonType, DistanceUnit, EditType, EDrawMode, ELayoutMode, IBasemapConfig, IExportInfos, IInventoryItem, ILayerAndTableIds, IMapChange, IMapInfo, ISearchConfiguration, ISelectionSet, ISketchGraphicsChange, ISolutionSpatialReferenceInfo, ISpatialRefRepresentation, IValueChange, theme } from "./utils/interfaces";
|
10
|
+
export { ButtonType, DistanceUnit, EditType, EDrawMode, ELayoutMode, IBasemapConfig, IConsentResponse, IExportInfos, IInventoryItem, ILayerAndTableIds, IMapChange, IMapInfo, ISearchConfiguration, ISelectionSet, ISketchGraphicsChange, ISolutionSpatialReferenceInfo, ISpatialRefRepresentation, IValueChange, theme } from "./utils/interfaces";
|
11
11
|
export { UserSession } from "@esri/solution-common";
|
12
12
|
export namespace Components {
|
13
13
|
interface ArcgisLogin {
|
@@ -84,6 +84,24 @@ export namespace Components {
|
|
84
84
|
*/
|
85
85
|
"zoomAndScrollToSelected": boolean;
|
86
86
|
}
|
87
|
+
interface ConsentManager {
|
88
|
+
/**
|
89
|
+
* string: The name to use for the variable stored in the browsers local storge that will keep track of the users choice for consent
|
90
|
+
*/
|
91
|
+
"firstUseVar": string;
|
92
|
+
/**
|
93
|
+
* Initialize and return the telemetry instance if consent has been granted
|
94
|
+
*/
|
95
|
+
"getInstance": () => Promise<Telemetry | undefined>;
|
96
|
+
/**
|
97
|
+
* string[]: Any ids for the analytics configured to receive events from the telemety instance
|
98
|
+
*/
|
99
|
+
"measurementIds": string[];
|
100
|
+
/**
|
101
|
+
* esri/portal/Portal: https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html Required prop for this component to function
|
102
|
+
*/
|
103
|
+
"portal": __esri.Portal;
|
104
|
+
}
|
87
105
|
interface CreateFeature {
|
88
106
|
/**
|
89
107
|
* Destroy the Editor widget instance
|
@@ -1307,6 +1325,10 @@ export interface BufferToolsCustomEvent<T> extends CustomEvent<T> {
|
|
1307
1325
|
detail: T;
|
1308
1326
|
target: HTMLBufferToolsElement;
|
1309
1327
|
}
|
1328
|
+
export interface ConsentManagerCustomEvent<T> extends CustomEvent<T> {
|
1329
|
+
detail: T;
|
1330
|
+
target: HTMLConsentManagerElement;
|
1331
|
+
}
|
1310
1332
|
export interface CreateFeatureCustomEvent<T> extends CustomEvent<T> {
|
1311
1333
|
detail: T;
|
1312
1334
|
target: HTMLCreateFeatureElement;
|
@@ -1445,6 +1467,23 @@ declare global {
|
|
1445
1467
|
prototype: HTMLCardManagerElement;
|
1446
1468
|
new (): HTMLCardManagerElement;
|
1447
1469
|
};
|
1470
|
+
interface HTMLConsentManagerElementEventMap {
|
1471
|
+
"consentGranted": IConsentResponse;
|
1472
|
+
}
|
1473
|
+
interface HTMLConsentManagerElement extends Components.ConsentManager, HTMLStencilElement {
|
1474
|
+
addEventListener<K extends keyof HTMLConsentManagerElementEventMap>(type: K, listener: (this: HTMLConsentManagerElement, ev: ConsentManagerCustomEvent<HTMLConsentManagerElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
1475
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
1476
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
1477
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
1478
|
+
removeEventListener<K extends keyof HTMLConsentManagerElementEventMap>(type: K, listener: (this: HTMLConsentManagerElement, ev: ConsentManagerCustomEvent<HTMLConsentManagerElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
1479
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
1480
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
1481
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
1482
|
+
}
|
1483
|
+
var HTMLConsentManagerElement: {
|
1484
|
+
prototype: HTMLConsentManagerElement;
|
1485
|
+
new (): HTMLConsentManagerElement;
|
1486
|
+
};
|
1448
1487
|
interface HTMLCreateFeatureElementEventMap {
|
1449
1488
|
"success": void;
|
1450
1489
|
"fail": Error;
|
@@ -2018,6 +2057,7 @@ declare global {
|
|
2018
2057
|
"basemap-gallery": HTMLBasemapGalleryElement;
|
2019
2058
|
"buffer-tools": HTMLBufferToolsElement;
|
2020
2059
|
"card-manager": HTMLCardManagerElement;
|
2060
|
+
"consent-manager": HTMLConsentManagerElement;
|
2021
2061
|
"create-feature": HTMLCreateFeatureElement;
|
2022
2062
|
"crowdsource-manager": HTMLCrowdsourceManagerElement;
|
2023
2063
|
"crowdsource-reporter": HTMLCrowdsourceReporterElement;
|
@@ -2148,6 +2188,24 @@ declare namespace LocalJSX {
|
|
2148
2188
|
*/
|
2149
2189
|
"zoomAndScrollToSelected"?: boolean;
|
2150
2190
|
}
|
2191
|
+
interface ConsentManager {
|
2192
|
+
/**
|
2193
|
+
* string: The name to use for the variable stored in the browsers local storge that will keep track of the users choice for consent
|
2194
|
+
*/
|
2195
|
+
"firstUseVar"?: string;
|
2196
|
+
/**
|
2197
|
+
* string[]: Any ids for the analytics configured to receive events from the telemety instance
|
2198
|
+
*/
|
2199
|
+
"measurementIds": string[];
|
2200
|
+
/**
|
2201
|
+
* Emitted on demand when the user accepts or denies consent
|
2202
|
+
*/
|
2203
|
+
"onConsentGranted"?: (event: ConsentManagerCustomEvent<IConsentResponse>) => void;
|
2204
|
+
/**
|
2205
|
+
* esri/portal/Portal: https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html Required prop for this component to function
|
2206
|
+
*/
|
2207
|
+
"portal": __esri.Portal;
|
2208
|
+
}
|
2151
2209
|
interface CreateFeature {
|
2152
2210
|
/**
|
2153
2211
|
* boolean: Set this to true when have a custom submit button in the app. This will hide the header and footer elements of the editor and user needs to execute the submit method manually.
|
@@ -3418,6 +3476,7 @@ declare namespace LocalJSX {
|
|
3418
3476
|
"basemap-gallery": BasemapGallery;
|
3419
3477
|
"buffer-tools": BufferTools;
|
3420
3478
|
"card-manager": CardManager;
|
3479
|
+
"consent-manager": ConsentManager;
|
3421
3480
|
"create-feature": CreateFeature;
|
3422
3481
|
"crowdsource-manager": CrowdsourceManager;
|
3423
3482
|
"crowdsource-reporter": CrowdsourceReporter;
|
@@ -3474,6 +3533,7 @@ declare module "@stencil/core" {
|
|
3474
3533
|
"basemap-gallery": LocalJSX.BasemapGallery & JSXBase.HTMLAttributes<HTMLBasemapGalleryElement>;
|
3475
3534
|
"buffer-tools": LocalJSX.BufferTools & JSXBase.HTMLAttributes<HTMLBufferToolsElement>;
|
3476
3535
|
"card-manager": LocalJSX.CardManager & JSXBase.HTMLAttributes<HTMLCardManagerElement>;
|
3536
|
+
"consent-manager": LocalJSX.ConsentManager & JSXBase.HTMLAttributes<HTMLConsentManagerElement>;
|
3477
3537
|
"create-feature": LocalJSX.CreateFeature & JSXBase.HTMLAttributes<HTMLCreateFeatureElement>;
|
3478
3538
|
"crowdsource-manager": LocalJSX.CrowdsourceManager & JSXBase.HTMLAttributes<HTMLCrowdsourceManagerElement>;
|
3479
3539
|
"crowdsource-reporter": LocalJSX.CrowdsourceReporter & JSXBase.HTMLAttributes<HTMLCrowdsourceReporterElement>;
|
package/dist/types/preact.d.ts
CHANGED
@@ -510,6 +510,10 @@ declare module "preact/src/jsx" {
|
|
510
510
|
|
511
511
|
"card-manager": JSX.SolutionsCardManager & JSXInternal.HTMLAttributes<HTMLSolutionsCardManagerElement>
|
512
512
|
|
513
|
+
"consent-manager": Omit<JSX.SolutionsConsentManager, "onConsentGranted"> & JSXInternal.HTMLAttributes<HTMLSolutionsConsentManagerElement> & {
|
514
|
+
"onconsentGranted"?: (event: CustomEvent<any>) => void;
|
515
|
+
}
|
516
|
+
|
513
517
|
"create-feature": Omit<JSX.SolutionsCreateFeature, "onSuccess" | "onFail" | "onDrawComplete" | "onEditingAttachment"> & JSXInternal.HTMLAttributes<HTMLSolutionsCreateFeatureElement> & {
|
514
518
|
"onsuccess"?: (event: CustomEvent<any>) => void;
|
515
519
|
"onfail"?: (event: CustomEvent<any>) => void;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@esri/solutions-components",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.8.0",
|
4
4
|
"description": "Web Components for Esri's Solutions Applications",
|
5
5
|
"main": "dist/index.cjs.js",
|
6
6
|
"module": "dist/index.js",
|
@@ -71,7 +71,10 @@
|
|
71
71
|
"tailwindcss": "3.0.23",
|
72
72
|
"ts-node": "^10.9.1",
|
73
73
|
"tslib": "^2.4.0",
|
74
|
-
"typescript": "^4.8.4"
|
74
|
+
"typescript": "^4.8.4",
|
75
|
+
"@esri/telemetry": "6.1.3",
|
76
|
+
"@esri/telemetry-amazon": "1.1.3",
|
77
|
+
"@esri/telemetry-google-analytics": "0.4.3"
|
75
78
|
},
|
76
79
|
"dependencies": {
|
77
80
|
"@esri/arcgis-rest-auth": "^3.4.2",
|
@@ -1,6 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{l as o}from"./p-a8a0187d.js";async function t(o,t){var n,a,e;try{const s=null===(e=null===(a=null===(n=null==t?void 0:t.portalItem)||void 0===n?void 0:n.portal)||void 0===a?void 0:a.credential)||void 0===e?void 0:e.token,i={responseType:"json"};s&&(i.query={token:s});var r="cacheBuster="+Date.now();const l=`${t.url}?${r}`,c=await o(l,i);return Promise.resolve(c.data)}catch(o){console.error("Unable to get resource t9n data.")}}async function n(t){if(!t)return null;const[n]=await o(["esri/portal/PortalItemResource"]),a=await t.fetchResources(),e=`t9n/${null==t?void 0:t.id}.json`,r=new n({path:e,portalItem:t}),s=a.resources.filter((o=>o.resource.path===e));if(0!==s.length)return Promise.resolve(s[0].resource);{const o="application/json",n=new Blob([JSON.stringify({})],{type:o});try{await t.addResource(r,n);const o=await t.fetchResources(),a=`t9n/${null==t?void 0:t.id}.json`,e=o.resources.filter((o=>o.resource.path===a));return Promise.resolve(e[0].resource)}catch(o){return console.error("ERROR: ",o),Promise.reject(null)}}}export{t as f,n as g}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function o(e,n,o){return e(o={path:n,exports:{},require:function(){return r()}},o.exports),o.exports}function r(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}export{e as a,r as b,o as c,n as g}
|