@esri/solutions-components 0.7.51 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) 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 +7 -7
  15. package/dist/cjs/{common-4cd3537b.js → common-e6e9f7d6.js} +1 -1
  16. package/dist/cjs/consent-manager.cjs.entry.js +1769 -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 +278 -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/components/layer-table/layer-table.js +1 -1
  66. package/dist/collection/utils/interfaces.ts +4 -0
  67. package/dist/components/_commonjsHelpers.js +16 -1
  68. package/dist/components/consent-manager.d.ts +11 -0
  69. package/dist/components/consent-manager.js +1844 -0
  70. package/dist/components/downloadUtils.js +1 -1
  71. package/dist/components/index.es.js +1 -1
  72. package/dist/components/layer-table2.js +1 -1
  73. package/dist/esm/{_commonjsHelpers-d5f9d613.js → _commonjsHelpers-0f74c230.js} +16 -1
  74. package/dist/esm/basemap-gallery_7.entry.js +3 -3
  75. package/dist/esm/buffer-tools_3.entry.js +3 -3
  76. package/dist/esm/calcite-action-pad_2.entry.js +3 -3
  77. package/dist/esm/calcite-alert_4.entry.js +4 -4
  78. package/dist/esm/calcite-color-picker-hex-input_2.entry.js +2 -2
  79. package/dist/esm/calcite-color-picker.entry.js +2 -2
  80. package/dist/esm/calcite-combobox_5.entry.js +3 -3
  81. package/dist/esm/calcite-flow_5.entry.js +4 -4
  82. package/dist/esm/calcite-input-date-picker_3.entry.js +5 -5
  83. package/dist/esm/calcite-shell-panel_14.entry.js +6 -6
  84. package/dist/esm/card-manager_3.entry.js +7 -7
  85. package/dist/esm/{common-d04ccc0d.js → common-06bcfe81.js} +1 -1
  86. package/dist/esm/consent-manager.entry.js +1765 -0
  87. package/dist/esm/crowdsource-manager.entry.js +3 -3
  88. package/dist/esm/crowdsource-reporter.entry.js +3 -3
  89. package/dist/esm/{downloadUtils-3bab4b5f.js → downloadUtils-a6c0e25f.js} +6 -6
  90. package/dist/esm/{esri-loader-eda07632.js → esri-loader-1b324844.js} +1 -1
  91. package/dist/esm/{helpers-633917fe.js → helpers-aeddac74.js} +1 -1
  92. package/dist/esm/{html2canvas-a0a4df55.js → html2canvas-7f5bb1cc.js} +1 -1
  93. package/dist/esm/{index.es-be703f2b.js → index.es-b0a676ae.js} +6 -6
  94. package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +6 -6
  95. package/dist/esm/instant-apps-control-panel.entry.js +3 -3
  96. package/dist/esm/instant-apps-export.entry.js +5 -5
  97. package/dist/esm/instant-apps-header.entry.js +3 -3
  98. package/dist/esm/instant-apps-interactive-legend-classic.entry.js +4 -4
  99. package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +4 -4
  100. package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +4 -4
  101. package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +4 -4
  102. package/dist/esm/instant-apps-interactive-legend.entry.js +6 -6
  103. package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +5 -5
  104. package/dist/esm/instant-apps-language-switcher.entry.js +7 -7
  105. package/dist/esm/instant-apps-language-translator.entry.js +7 -7
  106. package/dist/esm/instant-apps-measurement.entry.js +5 -5
  107. package/dist/esm/instant-apps-popover.entry.js +5 -5
  108. package/dist/esm/instant-apps-scoreboard.entry.js +5 -5
  109. package/dist/esm/instant-apps-splash.entry.js +5 -5
  110. package/dist/esm/{languageSwitcher-62232826.js → languageSwitcher-4faa659f.js} +1 -1
  111. package/dist/esm/{languageUtil-8b54477c.js → languageUtil-dc3111c1.js} +1 -1
  112. package/dist/esm/layout-manager.entry.js +3 -3
  113. package/dist/esm/{loadModules-b677d6d7.js → loadModules-877bbb89.js} +1 -1
  114. package/dist/esm/loader.js +1 -1
  115. package/dist/esm/{locale-25a5ae3e.js → locale-bcbea4ef.js} +1 -1
  116. package/dist/esm/{locale-c7d9e9aa.js → locale-bd9034e1.js} +2 -2
  117. package/dist/esm/map-select-tools_3.entry.js +6 -6
  118. package/dist/esm/{popupUtils-23fe3c9f.js → popupUtils-af124b47.js} +1 -1
  119. package/dist/esm/public-notification.entry.js +6 -6
  120. package/dist/esm/{purify-c99d2ace.js → purify-dce4d86b.js} +1 -1
  121. package/dist/esm/{resources-79914606.js → resources-61b0cdad.js} +1 -1
  122. package/dist/esm/{restHelpersGet-af032ab2.js → restHelpersGet-2a85d395.js} +1 -1
  123. package/dist/esm/solution-configuration.entry.js +6 -6
  124. package/dist/esm/solution-contents_3.entry.js +7 -7
  125. package/dist/esm/{solution-resource-7b8d302d.js → solution-resource-77aa99c8.js} +1 -1
  126. package/dist/esm/{solution-store-01769bbf.js → solution-store-13ddaf1c.js} +2 -2
  127. package/dist/esm/solutions-components.js +1 -1
  128. package/dist/esm/spatial-ref.entry.js +5 -5
  129. package/dist/esm/{utils-b46c535b.js → utils-28d0a086.js} +1 -1
  130. package/dist/solutions-components/{p-b4d2feb0.entry.js → p-015a45e2.entry.js} +1 -1
  131. package/dist/solutions-components/{p-b756d01f.js → p-03037cf9.js} +1 -1
  132. package/dist/solutions-components/{p-2917dae0.entry.js → p-03a65871.entry.js} +1 -1
  133. package/dist/solutions-components/{p-86b21da1.js → p-07626c45.js} +1 -1
  134. package/dist/solutions-components/{p-14a48b14.js → p-090e0241.js} +1 -1
  135. package/dist/solutions-components/{p-531ccf84.entry.js → p-09312a7a.entry.js} +1 -1
  136. package/dist/solutions-components/{p-8595b4aa.entry.js → p-09801ba6.entry.js} +1 -1
  137. package/dist/solutions-components/{p-2f017ad2.entry.js → p-0d72a9ca.entry.js} +1 -1
  138. package/dist/solutions-components/p-0e5274bd.entry.js +6 -0
  139. package/dist/solutions-components/{p-bb94c414.entry.js → p-104f07e3.entry.js} +1 -1
  140. package/dist/solutions-components/{p-2592e0dd.js → p-188ed8b6.js} +1 -1
  141. package/dist/solutions-components/{p-16a82c20.js → p-192b6455.js} +1 -1
  142. package/dist/solutions-components/{p-7cfc4ba5.entry.js → p-1a7cef7b.entry.js} +1 -1
  143. package/dist/solutions-components/{p-463712ef.entry.js → p-1ac2125a.entry.js} +2 -2
  144. package/dist/solutions-components/{p-23fed594.entry.js → p-1bca71bf.entry.js} +1 -1
  145. package/dist/solutions-components/{p-ce4eed51.entry.js → p-220c46c2.entry.js} +1 -1
  146. package/dist/solutions-components/{p-c8ca9b8c.entry.js → p-299d1eaf.entry.js} +3 -3
  147. package/dist/solutions-components/{p-7cfce9ee.entry.js → p-2e7a9b9b.entry.js} +2 -2
  148. package/dist/solutions-components/{p-df468e80.entry.js → p-35c9256b.entry.js} +2 -2
  149. package/dist/solutions-components/{p-d561c970.entry.js → p-41bc9e9d.entry.js} +1 -1
  150. package/dist/solutions-components/{p-4742efa8.entry.js → p-5a28d60c.entry.js} +1 -1
  151. package/dist/solutions-components/{p-e46617d1.entry.js → p-5c7e3941.entry.js} +1 -1
  152. package/dist/solutions-components/{p-8dbf3319.entry.js → p-63466518.entry.js} +1 -1
  153. package/dist/solutions-components/{p-c05467fd.entry.js → p-6512dc44.entry.js} +1 -1
  154. package/dist/solutions-components/{p-0f66fd89.js → p-66bca043.js} +3 -3
  155. package/dist/solutions-components/{p-a8a0187d.js → p-70359c2b.js} +1 -1
  156. package/dist/solutions-components/{p-91d3732f.js → p-734d1dc5.js} +1 -1
  157. package/dist/solutions-components/{p-de459c0a.entry.js → p-7d6ee026.entry.js} +1 -1
  158. package/dist/solutions-components/{p-91710f0e.entry.js → p-8ad937b4.entry.js} +1 -1
  159. package/dist/solutions-components/{p-d918ec36.js → p-8ddc7786.js} +1 -1
  160. package/dist/solutions-components/p-8e9f96db.js +6 -0
  161. package/dist/solutions-components/{p-220ec0d1.js → p-94c634ba.js} +1 -1
  162. package/dist/solutions-components/{p-e2b0b3fa.entry.js → p-a2544cba.entry.js} +1 -1
  163. package/dist/solutions-components/{p-3cf84035.entry.js → p-a455c3f0.entry.js} +1 -1
  164. package/dist/solutions-components/{p-044cd52c.entry.js → p-a59078ee.entry.js} +1 -1
  165. package/dist/solutions-components/{p-701ed205.js → p-a7b7f8d1.js} +1 -1
  166. package/dist/solutions-components/{p-96104375.entry.js → p-aec4441b.entry.js} +1 -1
  167. package/dist/solutions-components/{p-d9995b7e.js → p-b41e2c4c.js} +3 -3
  168. package/dist/solutions-components/{p-d89fff3a.js → p-b503d01d.js} +1 -1
  169. package/dist/solutions-components/{p-cacd0307.entry.js → p-b80bc5b9.entry.js} +1 -1
  170. package/dist/solutions-components/{p-b04c9dc3.js → p-be8ef276.js} +1 -1
  171. package/dist/solutions-components/{p-6ac459d9.entry.js → p-c10b44ee.entry.js} +1 -1
  172. package/dist/solutions-components/{p-88cd4a24.entry.js → p-c302bbea.entry.js} +1 -1
  173. package/dist/solutions-components/{p-547b4dba.entry.js → p-c375881a.entry.js} +1 -1
  174. package/dist/solutions-components/{p-e05b02c5.entry.js → p-cd1ca3a6.entry.js} +1 -1
  175. package/dist/solutions-components/{p-3cce003d.js → p-cde1d741.js} +1 -1
  176. package/dist/solutions-components/{p-ccfdd890.entry.js → p-cfe890f6.entry.js} +1 -1
  177. package/dist/solutions-components/{p-a4bb0787.entry.js → p-df29f4c2.entry.js} +1 -1
  178. package/dist/solutions-components/p-e2d0ad1b.js +6 -0
  179. package/dist/solutions-components/{p-bf9e18d4.js → p-eab00813.js} +1 -1
  180. package/dist/solutions-components/{p-e8cd89c2.entry.js → p-efe1694a.entry.js} +1 -1
  181. package/dist/solutions-components/{p-697e9e11.entry.js → p-f3467807.entry.js} +1 -1
  182. package/dist/solutions-components/{p-3cb1de38.entry.js → p-f6be44e6.entry.js} +1 -1
  183. package/dist/solutions-components/{p-f23e6499.js → p-fb7a5f6e.js} +2 -2
  184. package/dist/solutions-components/{p-dbb6f1e2.entry.js → p-ff302d95.entry.js} +1 -1
  185. package/dist/solutions-components/solutions-components.esm.js +1 -1
  186. package/dist/solutions-components/utils/interfaces.ts +4 -0
  187. package/dist/types/components/consent-manager/consent-manager.d.ts +109 -0
  188. package/dist/types/components.d.ts +62 -2
  189. package/dist/types/preact.d.ts +4 -0
  190. package/dist/types/utils/interfaces.d.ts +3 -0
  191. package/package.json +5 -2
  192. package/dist/solutions-components/p-00f9774c.js +0 -6
  193. package/dist/solutions-components/p-e1a4994d.js +0 -6
@@ -8,11 +8,11 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-105cf2b9.js');
11
- const locale = require('./locale-8c42ba7a.js');
12
- const common = require('./common-4cd3537b.js');
13
- require('./esri-loader-a91c0ec1.js');
14
- require('./_commonjsHelpers-384729db.js');
15
- require('./solution-resource-abec7452.js');
11
+ const locale = require('./locale-3d0a4bc2.js');
12
+ const common = require('./common-e6e9f7d6.js');
13
+ require('./esri-loader-ce6c3d3d.js');
14
+ require('./_commonjsHelpers-480c2e77.js');
15
+ require('./solution-resource-97186521.js');
16
16
  require('./index-f64944ad.js');
17
17
  require('./interfaces-7cd0a48a.js');
18
18
 
@@ -5,7 +5,7 @@
5
5
  */
6
6
  'use strict';
7
7
 
8
- const locale = require('./locale-dab3f46a.js');
8
+ const locale = require('./locale-3e33f44c.js');
9
9
  const index = require('./index-ae65e42f.js');
10
10
 
11
11
  exports.EInputType = void 0;
@@ -4,6 +4,7 @@
4
4
  "components/basemap-gallery/basemap-gallery.js",
5
5
  "components/buffer-tools/buffer-tools.js",
6
6
  "components/card-manager/card-manager.js",
7
+ "components/consent-manager/consent-manager.js",
7
8
  "components/create-feature/create-feature.js",
8
9
  "components/crowdsource-manager/crowdsource-manager.js",
9
10
  "components/crowdsource-reporter/crowdsource-reporter.js",
@@ -0,0 +1,67 @@
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
+
17
+ :host {
18
+ display: block;
19
+ }
20
+
21
+ .consent-panel {
22
+ position: fixed;
23
+ display: block;
24
+ z-index: 5000;
25
+ bottom: 0;
26
+ left: 0;
27
+ width: 100%;
28
+ height: auto;
29
+ text-align: center;
30
+ }
31
+
32
+ .cookie-consent-popup-container {
33
+ position: relative;
34
+ display: block;
35
+ bottom: 0;
36
+ left: 0;
37
+ width: 100%;
38
+ margin: 0;
39
+ padding-top: 1rem;
40
+ padding-bottom: 1rem;
41
+ transition: transform 0.5s ease-out 0s;
42
+ background-color: rgba(51, 51, 51, 0.95);
43
+ color: #fff;
44
+ }
45
+
46
+ .button-container {
47
+ position: static;
48
+ margin-bottom: 1rem;
49
+ display: flex;
50
+ justify-content: center;
51
+ flex-wrap: wrap;
52
+ }
53
+
54
+ .padding-end-1 {
55
+ padding-inline-end: 1rem;
56
+ }
57
+
58
+ .link-text {
59
+ /* 1.0 vars*/
60
+ --calcite-ui-text-link: var(--calcite-color-text-inverse);
61
+ --calcite-ui-brand: var(--calcite-color-text-inverse);
62
+
63
+ /* 2.0 vars */
64
+ --calcite-color-text-link: var(--calcite-color-text-inverse);
65
+ --calcite-color-brand-underline: var(--calcite-color-text-inverse);
66
+ --calcite-color-brand: var(--calcite-color-text-inverse);
67
+ }
@@ -0,0 +1,278 @@
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
+ /** @license
7
+ * Copyright 2024 Esri
8
+ *
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+ import { Host, h } from "@stencil/core";
22
+ import { getLocaleComponentStrings } from "../../utils/locale";
23
+ import { Telemetry } from "@esri/telemetry";
24
+ import { GoogleAnalytics } from "@esri/telemetry-google-analytics";
25
+ export class ConsentManager {
26
+ constructor() {
27
+ //--------------------------------------------------------------------------
28
+ //
29
+ // Properties (protected)
30
+ //
31
+ //--------------------------------------------------------------------------
32
+ /**
33
+ * boolean: When true the user has granted consent and the telemetry instance will be avaliable
34
+ */
35
+ this._consentGranted = false;
36
+ /**
37
+ * boolean: When true the telemetry instance has been loaded
38
+ */
39
+ this._loaded = false;
40
+ this.firstUseVar = "solutions-first-use";
41
+ this.measurementIds = undefined;
42
+ this.portal = undefined;
43
+ this._shouldRender = undefined;
44
+ this._translations = undefined;
45
+ }
46
+ //--------------------------------------------------------------------------
47
+ //
48
+ // Watch handlers
49
+ //
50
+ //--------------------------------------------------------------------------
51
+ //--------------------------------------------------------------------------
52
+ //
53
+ // Methods (public)
54
+ //
55
+ //--------------------------------------------------------------------------
56
+ /**
57
+ * Initialize and return the telemetry instance if consent has been granted
58
+ */
59
+ async getInstance() {
60
+ if (localStorage.getItem(this.firstUseVar) === "true") {
61
+ await this._init();
62
+ return this._telemetryInstance;
63
+ }
64
+ else {
65
+ return undefined;
66
+ }
67
+ }
68
+ //--------------------------------------------------------------------------
69
+ //
70
+ // Functions (lifecycle)
71
+ //
72
+ //--------------------------------------------------------------------------
73
+ /**
74
+ * StencilJS: Called once just after the component is first connected to the DOM.
75
+ *
76
+ * @returns Promise when complete
77
+ */
78
+ async componentWillLoad() {
79
+ await this._getTranslations();
80
+ this._shouldRender = localStorage.getItem(this.firstUseVar) === null;
81
+ }
82
+ /**
83
+ * Renders the component.
84
+ */
85
+ render() {
86
+ return this._shouldRender ? (h(Host, null, h("calcite-panel", { class: "consent-panel calcite-mode-dark", id: "cookie-policy" }, h("div", { class: "cookie-consent-popup-container" }, h("div", { id: "cookie-policy-description-top", tabindex: "-1" }, h("p", null, this._translations.dearVisitor), h("p", null, this._translations.useAnalytics)), h("div", { class: "button-container" }, h("calcite-button", { appearance: "solid", class: "padding-end-1", kind: "brand", onClick: () => this._refuse() }, this._translations.refuseAnalytics), h("calcite-button", { appearance: "solid", kind: "brand", onClick: () => this._accept() }, this._translations.acceptAnalytics)), h("div", null, h("p", null, this._translations.moreInfo, "\u00A0", h("calcite-link", { class: "link-text", href: "https://www.arcgis.com/", rel: "noopener noreferrer", target: "_blank" }, this._translations.protectionPolicy), this._translations.our, "\u00A0", h("calcite-link", { class: "link-text", href: "https://www.arcgis.com/", rel: "noopener noreferrer", target: "_blank" }, this._translations.cookiePolicy, "\u00A0"), this._translations.andOur, "\u00A0", h("calcite-link", { class: "link-text", href: "https://www.arcgis.com/", rel: "noopener noreferrer", target: "_blank" }, this._translations.cookiesInventory))))))) : undefined;
87
+ }
88
+ //--------------------------------------------------------------------------
89
+ //
90
+ // Functions (protected)
91
+ //
92
+ //--------------------------------------------------------------------------
93
+ /**
94
+ * Fetches the component's translations
95
+ *
96
+ * @returns Promise when complete
97
+ * @protected
98
+ */
99
+ async _init() {
100
+ var _a;
101
+ if (!this._loaded && ((_a = this.measurementIds) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.portal) {
102
+ const googleAnalyticsTracker = new GoogleAnalytics({
103
+ measurementIds: this.measurementIds
104
+ });
105
+ this._telemetryInstance = new Telemetry({
106
+ plugins: [googleAnalyticsTracker],
107
+ portal: this.portal
108
+ });
109
+ await this._telemetryInstance.init();
110
+ this._loaded = true;
111
+ }
112
+ }
113
+ /**
114
+ * Store the users granting of consent
115
+ *
116
+ * @protected
117
+ */
118
+ _accept() {
119
+ this._consentGranted = true;
120
+ this._handleConsent();
121
+ }
122
+ /**
123
+ * Store the users refusal of consent
124
+ *
125
+ * @protected
126
+ */
127
+ _refuse() {
128
+ this._consentGranted = false;
129
+ this._handleConsent();
130
+ }
131
+ /**
132
+ * Store and emit the users choice for consent
133
+ *
134
+ * @protected
135
+ */
136
+ _handleConsent() {
137
+ this._shouldRender = false;
138
+ localStorage.setItem(this.firstUseVar, this._consentGranted.toString());
139
+ this.consentGranted.emit({
140
+ granted: this._consentGranted
141
+ });
142
+ }
143
+ /**
144
+ * Fetches the component's translations
145
+ *
146
+ * @returns Promise when complete
147
+ * @protected
148
+ */
149
+ async _getTranslations() {
150
+ const messages = await getLocaleComponentStrings(this.el);
151
+ this._translations = messages[0];
152
+ }
153
+ static get is() { return "consent-manager"; }
154
+ static get encapsulation() { return "shadow"; }
155
+ static get originalStyleUrls() {
156
+ return {
157
+ "$": ["consent-manager.css"]
158
+ };
159
+ }
160
+ static get styleUrls() {
161
+ return {
162
+ "$": ["consent-manager.css"]
163
+ };
164
+ }
165
+ static get properties() {
166
+ return {
167
+ "firstUseVar": {
168
+ "type": "string",
169
+ "mutable": false,
170
+ "complexType": {
171
+ "original": "string",
172
+ "resolved": "string",
173
+ "references": {}
174
+ },
175
+ "required": false,
176
+ "optional": false,
177
+ "docs": {
178
+ "tags": [],
179
+ "text": "string: The name to use for the variable stored in the browsers local storge that\r\nwill keep track of the users choice for consent"
180
+ },
181
+ "attribute": "first-use-var",
182
+ "reflect": false,
183
+ "defaultValue": "\"solutions-first-use\""
184
+ },
185
+ "measurementIds": {
186
+ "type": "unknown",
187
+ "mutable": false,
188
+ "complexType": {
189
+ "original": "string[]",
190
+ "resolved": "string[]",
191
+ "references": {}
192
+ },
193
+ "required": true,
194
+ "optional": false,
195
+ "docs": {
196
+ "tags": [],
197
+ "text": "string[]: Any ids for the analytics configured to receive events from the telemety instance"
198
+ }
199
+ },
200
+ "portal": {
201
+ "type": "unknown",
202
+ "mutable": false,
203
+ "complexType": {
204
+ "original": "__esri.Portal",
205
+ "resolved": "Portal",
206
+ "references": {
207
+ "___esri": {
208
+ "location": "global",
209
+ "id": "global::___esri"
210
+ }
211
+ }
212
+ },
213
+ "required": true,
214
+ "optional": false,
215
+ "docs": {
216
+ "tags": [],
217
+ "text": "esri/portal/Portal: https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html\r\nRequired prop for this component to function"
218
+ }
219
+ }
220
+ };
221
+ }
222
+ static get states() {
223
+ return {
224
+ "_shouldRender": {},
225
+ "_translations": {}
226
+ };
227
+ }
228
+ static get events() {
229
+ return [{
230
+ "method": "consentGranted",
231
+ "name": "consentGranted",
232
+ "bubbles": true,
233
+ "cancelable": true,
234
+ "composed": true,
235
+ "docs": {
236
+ "tags": [],
237
+ "text": "Emitted on demand when the user accepts or denies consent"
238
+ },
239
+ "complexType": {
240
+ "original": "IConsentResponse",
241
+ "resolved": "IConsentResponse",
242
+ "references": {
243
+ "IConsentResponse": {
244
+ "location": "import",
245
+ "path": "../../utils/interfaces",
246
+ "id": "src/utils/interfaces.ts::IConsentResponse"
247
+ }
248
+ }
249
+ }
250
+ }];
251
+ }
252
+ static get methods() {
253
+ return {
254
+ "getInstance": {
255
+ "complexType": {
256
+ "signature": "() => Promise<Telemetry | undefined>",
257
+ "parameters": [],
258
+ "references": {
259
+ "Promise": {
260
+ "location": "global",
261
+ "id": "global::Promise"
262
+ },
263
+ "Telemetry": {
264
+ "location": "global",
265
+ "id": "global::Telemetry"
266
+ }
267
+ },
268
+ "return": "Promise<any>"
269
+ },
270
+ "docs": {
271
+ "text": "Initialize and return the telemetry instance if consent has been granted",
272
+ "tags": []
273
+ }
274
+ }
275
+ };
276
+ }
277
+ static get elementRef() { return "el"; }
278
+ }
@@ -0,0 +1,29 @@
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
+ /** @license
7
+ * Copyright 2024 Esri
8
+ *
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+ import { newE2EPage } from "@stencil/core/testing";
22
+ xdescribe('consent-manager', () => {
23
+ it('renders', async () => {
24
+ const page = await newE2EPage();
25
+ await page.setContent('<consent-manager></consent-manager>');
26
+ const element = await page.find('consent-manager');
27
+ expect(element).toHaveClass('hydrated');
28
+ });
29
+ });
@@ -0,0 +1,37 @@
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
+ /** @license
7
+ * Copyright 2024 Esri
8
+ *
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+ import { newSpecPage } from "@stencil/core/testing";
22
+ import { ConsentManager } from "../consent-manager";
23
+ xdescribe('consent-manager', () => {
24
+ it('renders', async () => {
25
+ const page = await newSpecPage({
26
+ components: [ConsentManager],
27
+ html: `<consent-manager></consent-manager>`,
28
+ });
29
+ expect(page.root).toEqualHtml(`
30
+ <consent-manager>
31
+ <mock:shadow-root>
32
+ <slot></slot>
33
+ </mock:shadow-root>
34
+ </consent-manager>
35
+ `);
36
+ });
37
+ });
@@ -978,7 +978,7 @@ export class LayerTable {
978
978
  var _a;
979
979
  return JSON.stringify((_a = this._table) === null || _a === void 0 ? void 0 : _a.tableTemplate.columnTemplates[i]) !== JSON.stringify(ct);
980
980
  });
981
- if (this._table && columnTemplates && hasChange) {
981
+ if (this._table && columnTemplates && (hasChange || !this._columnsInfo)) {
982
982
  this._table.tableTemplate = new this.TableTemplate({
983
983
  columnTemplates
984
984
  });
@@ -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
+ }
@@ -19,8 +19,23 @@ function createCommonjsModule(fn, basedir, module) {
19
19
  }, fn(module, module.exports), module.exports;
20
20
  }
21
21
 
22
+ function getAugmentedNamespace(n) {
23
+ if (n.__esModule) return n;
24
+ var a = Object.defineProperty({}, '__esModule', {value: true});
25
+ Object.keys(n).forEach(function (k) {
26
+ var d = Object.getOwnPropertyDescriptor(n, k);
27
+ Object.defineProperty(a, k, d.get ? d : {
28
+ enumerable: true,
29
+ get: function () {
30
+ return n[k];
31
+ }
32
+ });
33
+ });
34
+ return a;
35
+ }
36
+
22
37
  function commonjsRequire () {
23
38
  throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
24
39
  }
25
40
 
26
- export { commonjsGlobal as a, commonjsRequire as b, createCommonjsModule as c, getDefaultExportFromCjs as g };
41
+ export { commonjsGlobal as a, commonjsRequire as b, createCommonjsModule as c, getDefaultExportFromCjs as d, getAugmentedNamespace as g };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface ConsentManager extends Components.ConsentManager, HTMLElement {}
4
+ export const ConsentManager: {
5
+ prototype: ConsentManager;
6
+ new (): ConsentManager;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;