@esri/solutions-components 0.7.52 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. package/dist/assets/t9n/consent-manager/resources.json +12 -0
  2. package/dist/assets/t9n/consent-manager/resources_en.json +12 -0
  3. package/dist/cjs/{_commonjsHelpers-384729db.js → _commonjsHelpers-480c2e77.js} +16 -0
  4. package/dist/cjs/basemap-gallery_7.cjs.entry.js +3 -3
  5. package/dist/cjs/buffer-tools_3.cjs.entry.js +3 -3
  6. package/dist/cjs/calcite-action-pad_2.cjs.entry.js +3 -3
  7. package/dist/cjs/calcite-alert_4.cjs.entry.js +4 -4
  8. package/dist/cjs/calcite-color-picker-hex-input_2.cjs.entry.js +2 -2
  9. package/dist/cjs/calcite-color-picker.cjs.entry.js +2 -2
  10. package/dist/cjs/calcite-combobox_5.cjs.entry.js +3 -3
  11. package/dist/cjs/calcite-flow_5.cjs.entry.js +4 -4
  12. package/dist/cjs/calcite-input-date-picker_3.cjs.entry.js +5 -5
  13. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +6 -6
  14. package/dist/cjs/card-manager_3.cjs.entry.js +6 -6
  15. package/dist/cjs/{common-4cd3537b.js → common-e6e9f7d6.js} +1 -1
  16. package/dist/cjs/consent-manager.cjs.entry.js +1779 -0
  17. package/dist/cjs/crowdsource-manager.cjs.entry.js +3 -3
  18. package/dist/cjs/crowdsource-reporter.cjs.entry.js +3 -3
  19. package/dist/cjs/{downloadUtils-82bc9a04.js → downloadUtils-c2bd7c80.js} +6 -6
  20. package/dist/cjs/{esri-loader-a91c0ec1.js → esri-loader-ce6c3d3d.js} +1 -1
  21. package/dist/cjs/{helpers-e328869d.js → helpers-81779c18.js} +1 -1
  22. package/dist/cjs/{html2canvas-34208bbf.js → html2canvas-27a2547c.js} +1 -1
  23. package/dist/cjs/{index.es-79d8773c.js → index.es-22b3d1a2.js} +6 -6
  24. package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +6 -6
  25. package/dist/cjs/instant-apps-control-panel.cjs.entry.js +3 -3
  26. package/dist/cjs/instant-apps-export.cjs.entry.js +5 -5
  27. package/dist/cjs/instant-apps-header.cjs.entry.js +3 -3
  28. package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +4 -4
  29. package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +4 -4
  30. package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +4 -4
  31. package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +4 -4
  32. package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +6 -6
  33. package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +5 -5
  34. package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +7 -7
  35. package/dist/cjs/instant-apps-language-translator.cjs.entry.js +7 -7
  36. package/dist/cjs/instant-apps-measurement.cjs.entry.js +5 -5
  37. package/dist/cjs/instant-apps-popover.cjs.entry.js +5 -5
  38. package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +5 -5
  39. package/dist/cjs/instant-apps-splash.cjs.entry.js +5 -5
  40. package/dist/cjs/{languageSwitcher-7de41e17.js → languageSwitcher-4822684b.js} +1 -1
  41. package/dist/cjs/{languageUtil-a3b464f8.js → languageUtil-9bd00bad.js} +1 -1
  42. package/dist/cjs/layout-manager.cjs.entry.js +3 -3
  43. package/dist/cjs/{loadModules-51c30ab9.js → loadModules-69fc5b98.js} +1 -1
  44. package/dist/cjs/loader.cjs.js +1 -1
  45. package/dist/cjs/{locale-8c42ba7a.js → locale-3d0a4bc2.js} +1 -1
  46. package/dist/cjs/{locale-dab3f46a.js → locale-3e33f44c.js} +2 -2
  47. package/dist/cjs/map-select-tools_3.cjs.entry.js +6 -6
  48. package/dist/cjs/{popupUtils-824d2f7c.js → popupUtils-6be3588c.js} +1 -1
  49. package/dist/cjs/public-notification.cjs.entry.js +6 -6
  50. package/dist/cjs/{purify-f8c3e427.js → purify-4791ecca.js} +1 -1
  51. package/dist/cjs/{resources-adfcb1ec.js → resources-02142b99.js} +1 -1
  52. package/dist/cjs/{restHelpersGet-e0737480.js → restHelpersGet-2ed729ab.js} +1 -1
  53. package/dist/cjs/solution-configuration.cjs.entry.js +6 -6
  54. package/dist/cjs/solution-contents_3.cjs.entry.js +7 -7
  55. package/dist/cjs/{solution-resource-abec7452.js → solution-resource-97186521.js} +1 -1
  56. package/dist/cjs/{solution-store-2f7fbcc5.js → solution-store-67bcf552.js} +2 -2
  57. package/dist/cjs/solutions-components.cjs.js +1 -1
  58. package/dist/cjs/spatial-ref.cjs.entry.js +5 -5
  59. package/dist/cjs/{utils-a137dc1a.js → utils-ea7a5a63.js} +1 -1
  60. package/dist/collection/collection-manifest.json +1 -0
  61. package/dist/collection/components/consent-manager/consent-manager.css +67 -0
  62. package/dist/collection/components/consent-manager/consent-manager.js +287 -0
  63. package/dist/collection/components/consent-manager/test/consent-manager.e2e.js +29 -0
  64. package/dist/collection/components/consent-manager/test/consent-manager.spec.js +37 -0
  65. package/dist/collection/utils/interfaces.ts +4 -0
  66. package/dist/components/_commonjsHelpers.js +16 -1
  67. package/dist/components/consent-manager.d.ts +11 -0
  68. package/dist/components/consent-manager.js +1854 -0
  69. package/dist/components/downloadUtils.js +1 -1
  70. package/dist/components/index.es.js +1 -1
  71. package/dist/esm/{_commonjsHelpers-d5f9d613.js → _commonjsHelpers-0f74c230.js} +16 -1
  72. package/dist/esm/basemap-gallery_7.entry.js +3 -3
  73. package/dist/esm/buffer-tools_3.entry.js +3 -3
  74. package/dist/esm/calcite-action-pad_2.entry.js +3 -3
  75. package/dist/esm/calcite-alert_4.entry.js +4 -4
  76. package/dist/esm/calcite-color-picker-hex-input_2.entry.js +2 -2
  77. package/dist/esm/calcite-color-picker.entry.js +2 -2
  78. package/dist/esm/calcite-combobox_5.entry.js +3 -3
  79. package/dist/esm/calcite-flow_5.entry.js +4 -4
  80. package/dist/esm/calcite-input-date-picker_3.entry.js +5 -5
  81. package/dist/esm/calcite-shell-panel_14.entry.js +6 -6
  82. package/dist/esm/card-manager_3.entry.js +6 -6
  83. package/dist/esm/{common-d04ccc0d.js → common-06bcfe81.js} +1 -1
  84. package/dist/esm/consent-manager.entry.js +1775 -0
  85. package/dist/esm/crowdsource-manager.entry.js +3 -3
  86. package/dist/esm/crowdsource-reporter.entry.js +3 -3
  87. package/dist/esm/{downloadUtils-3bab4b5f.js → downloadUtils-a6c0e25f.js} +6 -6
  88. package/dist/esm/{esri-loader-eda07632.js → esri-loader-1b324844.js} +1 -1
  89. package/dist/esm/{helpers-633917fe.js → helpers-aeddac74.js} +1 -1
  90. package/dist/esm/{html2canvas-a0a4df55.js → html2canvas-7f5bb1cc.js} +1 -1
  91. package/dist/esm/{index.es-be703f2b.js → index.es-b0a676ae.js} +6 -6
  92. package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +6 -6
  93. package/dist/esm/instant-apps-control-panel.entry.js +3 -3
  94. package/dist/esm/instant-apps-export.entry.js +5 -5
  95. package/dist/esm/instant-apps-header.entry.js +3 -3
  96. package/dist/esm/instant-apps-interactive-legend-classic.entry.js +4 -4
  97. package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +4 -4
  98. package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +4 -4
  99. package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +4 -4
  100. package/dist/esm/instant-apps-interactive-legend.entry.js +6 -6
  101. package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +5 -5
  102. package/dist/esm/instant-apps-language-switcher.entry.js +7 -7
  103. package/dist/esm/instant-apps-language-translator.entry.js +7 -7
  104. package/dist/esm/instant-apps-measurement.entry.js +5 -5
  105. package/dist/esm/instant-apps-popover.entry.js +5 -5
  106. package/dist/esm/instant-apps-scoreboard.entry.js +5 -5
  107. package/dist/esm/instant-apps-splash.entry.js +5 -5
  108. package/dist/esm/{languageSwitcher-62232826.js → languageSwitcher-4faa659f.js} +1 -1
  109. package/dist/esm/{languageUtil-8b54477c.js → languageUtil-dc3111c1.js} +1 -1
  110. package/dist/esm/layout-manager.entry.js +3 -3
  111. package/dist/esm/{loadModules-b677d6d7.js → loadModules-877bbb89.js} +1 -1
  112. package/dist/esm/loader.js +1 -1
  113. package/dist/esm/{locale-25a5ae3e.js → locale-bcbea4ef.js} +1 -1
  114. package/dist/esm/{locale-c7d9e9aa.js → locale-bd9034e1.js} +2 -2
  115. package/dist/esm/map-select-tools_3.entry.js +6 -6
  116. package/dist/esm/{popupUtils-23fe3c9f.js → popupUtils-af124b47.js} +1 -1
  117. package/dist/esm/public-notification.entry.js +6 -6
  118. package/dist/esm/{purify-c99d2ace.js → purify-dce4d86b.js} +1 -1
  119. package/dist/esm/{resources-79914606.js → resources-61b0cdad.js} +1 -1
  120. package/dist/esm/{restHelpersGet-af032ab2.js → restHelpersGet-2a85d395.js} +1 -1
  121. package/dist/esm/solution-configuration.entry.js +6 -6
  122. package/dist/esm/solution-contents_3.entry.js +7 -7
  123. package/dist/esm/{solution-resource-7b8d302d.js → solution-resource-77aa99c8.js} +1 -1
  124. package/dist/esm/{solution-store-01769bbf.js → solution-store-13ddaf1c.js} +2 -2
  125. package/dist/esm/solutions-components.js +1 -1
  126. package/dist/esm/spatial-ref.entry.js +5 -5
  127. package/dist/esm/{utils-b46c535b.js → utils-28d0a086.js} +1 -1
  128. package/dist/solutions-components/{p-54b7b859.entry.js → p-015a45e2.entry.js} +1 -1
  129. package/dist/solutions-components/{p-b756d01f.js → p-03037cf9.js} +1 -1
  130. package/dist/solutions-components/{p-2917dae0.entry.js → p-03a65871.entry.js} +1 -1
  131. package/dist/solutions-components/{p-86b21da1.js → p-07626c45.js} +1 -1
  132. package/dist/solutions-components/{p-14a48b14.js → p-090e0241.js} +1 -1
  133. package/dist/solutions-components/{p-531ccf84.entry.js → p-09312a7a.entry.js} +1 -1
  134. package/dist/solutions-components/{p-8595b4aa.entry.js → p-09801ba6.entry.js} +1 -1
  135. package/dist/solutions-components/{p-2f017ad2.entry.js → p-0d72a9ca.entry.js} +1 -1
  136. package/dist/solutions-components/{p-bb94c414.entry.js → p-104f07e3.entry.js} +1 -1
  137. package/dist/solutions-components/p-131bcc7f.entry.js +6 -0
  138. package/dist/solutions-components/{p-2592e0dd.js → p-188ed8b6.js} +1 -1
  139. package/dist/solutions-components/{p-16a82c20.js → p-192b6455.js} +1 -1
  140. package/dist/solutions-components/{p-7cfc4ba5.entry.js → p-1a7cef7b.entry.js} +1 -1
  141. package/dist/solutions-components/{p-463712ef.entry.js → p-1ac2125a.entry.js} +2 -2
  142. package/dist/solutions-components/{p-23fed594.entry.js → p-1bca71bf.entry.js} +1 -1
  143. package/dist/solutions-components/{p-ce4eed51.entry.js → p-220c46c2.entry.js} +1 -1
  144. package/dist/solutions-components/{p-c8ca9b8c.entry.js → p-299d1eaf.entry.js} +3 -3
  145. package/dist/solutions-components/{p-7cfce9ee.entry.js → p-2e7a9b9b.entry.js} +2 -2
  146. package/dist/solutions-components/{p-df468e80.entry.js → p-35c9256b.entry.js} +2 -2
  147. package/dist/solutions-components/{p-d561c970.entry.js → p-41bc9e9d.entry.js} +1 -1
  148. package/dist/solutions-components/{p-4742efa8.entry.js → p-5a28d60c.entry.js} +1 -1
  149. package/dist/solutions-components/{p-e46617d1.entry.js → p-5c7e3941.entry.js} +1 -1
  150. package/dist/solutions-components/{p-8dbf3319.entry.js → p-63466518.entry.js} +1 -1
  151. package/dist/solutions-components/{p-c05467fd.entry.js → p-6512dc44.entry.js} +1 -1
  152. package/dist/solutions-components/{p-0f66fd89.js → p-66bca043.js} +3 -3
  153. package/dist/solutions-components/{p-a8a0187d.js → p-70359c2b.js} +1 -1
  154. package/dist/solutions-components/{p-91d3732f.js → p-734d1dc5.js} +1 -1
  155. package/dist/solutions-components/{p-de459c0a.entry.js → p-7d6ee026.entry.js} +1 -1
  156. package/dist/solutions-components/{p-91710f0e.entry.js → p-8ad937b4.entry.js} +1 -1
  157. package/dist/solutions-components/{p-d918ec36.js → p-8ddc7786.js} +1 -1
  158. package/dist/solutions-components/p-8e9f96db.js +6 -0
  159. package/dist/solutions-components/{p-220ec0d1.js → p-94c634ba.js} +1 -1
  160. package/dist/solutions-components/{p-e2b0b3fa.entry.js → p-a2544cba.entry.js} +1 -1
  161. package/dist/solutions-components/{p-3cf84035.entry.js → p-a455c3f0.entry.js} +1 -1
  162. package/dist/solutions-components/{p-044cd52c.entry.js → p-a59078ee.entry.js} +1 -1
  163. package/dist/solutions-components/{p-701ed205.js → p-a7b7f8d1.js} +1 -1
  164. package/dist/solutions-components/{p-96104375.entry.js → p-aec4441b.entry.js} +1 -1
  165. package/dist/solutions-components/{p-d9995b7e.js → p-b41e2c4c.js} +3 -3
  166. package/dist/solutions-components/{p-d89fff3a.js → p-b503d01d.js} +1 -1
  167. package/dist/solutions-components/{p-cacd0307.entry.js → p-b80bc5b9.entry.js} +1 -1
  168. package/dist/solutions-components/{p-b04c9dc3.js → p-be8ef276.js} +1 -1
  169. package/dist/solutions-components/{p-6ac459d9.entry.js → p-c10b44ee.entry.js} +1 -1
  170. package/dist/solutions-components/{p-88cd4a24.entry.js → p-c302bbea.entry.js} +1 -1
  171. package/dist/solutions-components/{p-547b4dba.entry.js → p-c375881a.entry.js} +1 -1
  172. package/dist/solutions-components/{p-e05b02c5.entry.js → p-cd1ca3a6.entry.js} +1 -1
  173. package/dist/solutions-components/{p-3cce003d.js → p-cde1d741.js} +1 -1
  174. package/dist/solutions-components/{p-ccfdd890.entry.js → p-cfe890f6.entry.js} +1 -1
  175. package/dist/solutions-components/{p-a4bb0787.entry.js → p-df29f4c2.entry.js} +1 -1
  176. package/dist/solutions-components/p-e2d0ad1b.js +6 -0
  177. package/dist/solutions-components/{p-bf9e18d4.js → p-eab00813.js} +1 -1
  178. package/dist/solutions-components/{p-e8cd89c2.entry.js → p-efe1694a.entry.js} +1 -1
  179. package/dist/solutions-components/{p-697e9e11.entry.js → p-f3467807.entry.js} +1 -1
  180. package/dist/solutions-components/{p-3cb1de38.entry.js → p-f6be44e6.entry.js} +1 -1
  181. package/dist/solutions-components/{p-f23e6499.js → p-fb7a5f6e.js} +2 -2
  182. package/dist/solutions-components/{p-dbb6f1e2.entry.js → p-ff302d95.entry.js} +1 -1
  183. package/dist/solutions-components/solutions-components.esm.js +1 -1
  184. package/dist/solutions-components/utils/interfaces.ts +4 -0
  185. package/dist/types/components/consent-manager/consent-manager.d.ts +115 -0
  186. package/dist/types/components.d.ts +62 -2
  187. package/dist/types/preact.d.ts +4 -0
  188. package/dist/types/utils/interfaces.d.ts +3 -0
  189. package/package.json +5 -2
  190. package/dist/solutions-components/p-00f9774c.js +0 -6
  191. package/dist/solutions-components/p-e1a4994d.js +0 -6
@@ -561,3 +561,7 @@ export interface IPopupUtils {
561
561
  arcade: typeof import("esri/arcade");
562
562
  getPopupTitle(graphic: __esri.Graphic, map: __esri.Map): Promise<string>;
563
563
  }
564
+
565
+ export interface IConsentResponse {
566
+ granted: boolean;
567
+ }
@@ -0,0 +1,115 @@
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
+ * Called once after the component is loaded
79
+ *
80
+ * @returns Promise when complete
81
+ */
82
+ componentDidLoad(): Promise<void>;
83
+ /**
84
+ * Fetches the component's translations
85
+ *
86
+ * @returns Promise when complete
87
+ * @protected
88
+ */
89
+ _init(): Promise<void>;
90
+ /**
91
+ * Store the users granting of consent
92
+ *
93
+ * @protected
94
+ */
95
+ _accept(): void;
96
+ /**
97
+ * Store the users refusal of consent
98
+ *
99
+ * @protected
100
+ */
101
+ _refuse(): void;
102
+ /**
103
+ * Store and emit the users choice for consent
104
+ *
105
+ * @protected
106
+ */
107
+ protected _handleConsent(): void;
108
+ /**
109
+ * Fetches the component's translations
110
+ *
111
+ * @returns Promise when complete
112
+ * @protected
113
+ */
114
+ protected _getTranslations(): Promise<void>;
115
+ }
@@ -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>;
@@ -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;
@@ -484,3 +484,6 @@ export interface IPopupUtils {
484
484
  arcade: typeof import("esri/arcade");
485
485
  getPopupTitle(graphic: __esri.Graphic, map: __esri.Map): Promise<string>;
486
486
  }
487
+ export interface IConsentResponse {
488
+ granted: boolean;
489
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/solutions-components",
3
- "version": "0.7.52",
3
+ "version": "0.8.1",
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}