@esri/solutions-components 0.5.0 → 0.5.2

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.
Files changed (162) hide show
  1. package/dist/assets/arcgis-pdf-creator/PDFCreator.js +6 -3
  2. package/dist/assets/arcgis-pdf-creator/PDFCreator_jsPDF.js +1 -1
  3. package/dist/assets/arcgis-pdf-creator/PDFCreator_pdf_lib.js +1 -1
  4. package/dist/assets/arcgis-pdf-creator/PDFLabels.js +54 -3
  5. package/dist/assets/arcgis-pdf-creator/grid.js +1 -1
  6. package/dist/assets/data/images/grid.png +0 -0
  7. package/dist/assets/data/images/horizontal.png +0 -0
  8. package/dist/assets/data/images/vertical.png +0 -0
  9. package/dist/assets/t9n/crowdsource-manager/resources.json +7 -1
  10. package/dist/assets/t9n/crowdsource-manager/resources_en.json +7 -1
  11. package/dist/cjs/buffer-tools_6.cjs.entry.js +88 -92
  12. package/dist/cjs/{calcite-block_2.cjs.entry.js → calcite-action-bar_4.cjs.entry.js} +307 -18
  13. package/dist/cjs/{calcite-action.cjs.entry.js → calcite-action_2.cjs.entry.js} +84 -1
  14. package/dist/cjs/{calcite-combobox_3.cjs.entry.js → calcite-chip_4.cjs.entry.js} +131 -5
  15. package/dist/cjs/{calcite-dropdown-group_4.cjs.entry.js → calcite-dropdown_5.cjs.entry.js} +467 -1
  16. package/dist/cjs/calcite-input-message_5.cjs.entry.js +19 -17
  17. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
  18. package/dist/cjs/{calcite-action-bar_2.cjs.entry.js → calcite-tooltip.cjs.entry.js} +2 -208
  19. package/dist/cjs/crowdsource-manager.cjs.entry.js +88 -14
  20. package/dist/cjs/{downloadUtils-415ab342.js → downloadUtils-9359e9ff.js} +135 -44
  21. package/dist/cjs/{index.es-98008aa0.js → index.es-9c0d0ed6.js} +3 -3
  22. package/dist/cjs/{interfaces-17c631bf.js → interfaces-cac36920.js} +6 -0
  23. package/dist/cjs/layer-table_2.cjs.entry.js +512 -0
  24. package/dist/cjs/loader.cjs.js +1 -1
  25. package/dist/cjs/{mapViewUtils-f617ae9a.js → mapViewUtils-090f4d4d.js} +3 -3
  26. package/dist/cjs/public-notification.cjs.entry.js +173 -48
  27. package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
  28. package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
  29. package/dist/cjs/{solution-store-b86759b2.js → solution-store-d28c332e.js} +1 -1
  30. package/dist/cjs/solutions-components.cjs.js +1 -1
  31. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator.js +6 -3
  32. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator_jsPDF.js +1 -1
  33. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator_pdf_lib.js +1 -1
  34. package/dist/collection/assets/arcgis-pdf-creator/PDFLabels.js +54 -3
  35. package/dist/collection/assets/arcgis-pdf-creator/grid.js +1 -1
  36. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +122 -0
  37. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +130 -14
  38. package/dist/collection/components/layer-table/layer-table.css +2 -70
  39. package/dist/collection/components/layer-table/layer-table.js +66 -106
  40. package/dist/collection/components/map-card/map-card.css +4 -7
  41. package/dist/collection/components/map-card/map-card.js +44 -10
  42. package/dist/collection/components/map-draw-tools/map-draw-tools.js +4 -8
  43. package/dist/collection/components/map-select-tools/map-select-tools.js +75 -15
  44. package/dist/collection/components/public-notification/public-notification.js +217 -25
  45. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +1 -1
  46. package/dist/collection/demos/crowdsource-manager.html +14 -41
  47. package/dist/collection/utils/csvDownload.js +41 -0
  48. package/dist/collection/utils/csvDownload.ts +42 -0
  49. package/dist/collection/utils/csvUtils.js +6 -23
  50. package/dist/collection/utils/csvUtils.ts +8 -27
  51. package/dist/collection/utils/downloadUtils.js +30 -14
  52. package/dist/collection/utils/downloadUtils.ts +36 -14
  53. package/dist/collection/utils/interfaces.js +6 -0
  54. package/dist/collection/utils/interfaces.ts +6 -0
  55. package/dist/collection/utils/pdfUtils.js +9 -6
  56. package/dist/collection/utils/pdfUtils.ts +13 -8
  57. package/dist/collection/utils/queryUtils.js +2 -2
  58. package/dist/collection/utils/queryUtils.ts +2 -2
  59. package/dist/collection/utils/test/csvUtils.spec.tsx +56 -0
  60. package/dist/collection/utils/test/downloadUtils.spec.tsx +133 -0
  61. package/dist/components/crowdsource-manager.js +293 -17
  62. package/dist/components/downloadUtils.js +133 -42
  63. package/dist/components/interfaces3.js +7 -1
  64. package/dist/components/layer-table.js +1 -443
  65. package/dist/components/layer-table2.js +429 -0
  66. package/dist/components/map-card.js +1 -339
  67. package/dist/{esm/map-card.entry.js → components/map-card2.js} +118 -22
  68. package/dist/components/map-draw-tools2.js +19 -23
  69. package/dist/components/map-layer-picker2.js +1 -1
  70. package/dist/components/map-select-tools2.js +21 -16
  71. package/dist/components/public-notification.js +209 -81
  72. package/dist/components/queryUtils.js +2 -2
  73. package/dist/components/refine-selection-tools2.js +3 -3
  74. package/dist/components/refine-selection2.js +1 -1
  75. package/dist/components/solution-resource-item2.js +1 -1
  76. package/dist/components/solution-store.js +1 -1
  77. package/dist/esm/buffer-tools_6.entry.js +79 -83
  78. package/dist/esm/{calcite-block_2.entry.js → calcite-action-bar_4.entry.js} +307 -20
  79. package/dist/esm/{calcite-action.entry.js → calcite-action_2.entry.js} +84 -2
  80. package/dist/esm/{calcite-combobox_3.entry.js → calcite-chip_4.entry.js} +134 -9
  81. package/dist/esm/{calcite-dropdown-group_4.entry.js → calcite-dropdown_5.entry.js} +468 -3
  82. package/dist/esm/calcite-input-message_5.entry.js +19 -17
  83. package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
  84. package/dist/esm/{calcite-action-bar_2.entry.js → calcite-tooltip.entry.js} +4 -209
  85. package/dist/esm/crowdsource-manager.entry.js +88 -14
  86. package/dist/esm/{downloadUtils-606b0f0e.js → downloadUtils-a8f139c5.js} +135 -44
  87. package/dist/esm/{index.es-c736c805.js → index.es-a75412ff.js} +3 -3
  88. package/dist/esm/{interfaces-d0d83efa.js → interfaces-cd4054e5.js} +7 -1
  89. package/dist/esm/layer-table_2.entry.js +507 -0
  90. package/dist/esm/loader.js +1 -1
  91. package/dist/esm/{mapViewUtils-4e945e07.js → mapViewUtils-8ffcd36d.js} +4 -4
  92. package/dist/esm/public-notification.entry.js +169 -44
  93. package/dist/esm/solution-configuration.entry.js +2 -2
  94. package/dist/esm/solution-contents_3.entry.js +2 -2
  95. package/dist/esm/{solution-store-477288ac.js → solution-store-1b67f2c8.js} +1 -1
  96. package/dist/esm/solutions-components.js +1 -1
  97. package/dist/solutions-components/demos/crowdsource-manager.html +14 -41
  98. package/dist/solutions-components/{p-dd11eeb2.js → p-1395b0ef.js} +1 -1
  99. package/dist/solutions-components/{p-4f5641b4.entry.js → p-1affd711.entry.js} +18 -18
  100. package/dist/solutions-components/p-30de8da1.entry.js +17 -0
  101. package/dist/solutions-components/{p-91cad71e.entry.js → p-439c878d.entry.js} +3 -9
  102. package/dist/solutions-components/{p-72117a18.js → p-765a27f3.js} +1 -1
  103. package/dist/solutions-components/p-813a04c3.entry.js +6 -0
  104. package/dist/solutions-components/{p-9e8a371f.entry.js → p-874b39a7.entry.js} +3 -3
  105. package/dist/solutions-components/p-8cece97f.js +21 -0
  106. package/dist/solutions-components/{p-dd0241fb.entry.js → p-97aa7211.entry.js} +1 -1
  107. package/dist/solutions-components/{p-0e459cc7.entry.js → p-a955a3e6.entry.js} +10 -4
  108. package/dist/solutions-components/{p-6a657ff6.js → p-bb64bd47.js} +25 -9
  109. package/dist/solutions-components/p-c392dd95.entry.js +17 -0
  110. package/dist/solutions-components/p-ca386a72.entry.js +6 -0
  111. package/dist/solutions-components/p-d47d74a6.entry.js +23 -0
  112. package/dist/solutions-components/p-db846ee2.entry.js +11 -0
  113. package/dist/solutions-components/p-dc53c9c1.js +36 -0
  114. package/dist/solutions-components/p-e1c93241.entry.js +6 -0
  115. package/dist/solutions-components/{p-4cbaf0f1.entry.js → p-e6d235d6.entry.js} +1 -1
  116. package/dist/solutions-components/solutions-components.esm.js +6 -6
  117. package/dist/solutions-components/utils/csvDownload.ts +42 -0
  118. package/dist/solutions-components/utils/csvUtils.ts +8 -27
  119. package/dist/solutions-components/utils/downloadUtils.ts +36 -14
  120. package/dist/solutions-components/utils/interfaces.ts +6 -0
  121. package/dist/solutions-components/utils/pdfUtils.ts +13 -8
  122. package/dist/solutions-components/utils/queryUtils.ts +2 -2
  123. package/dist/solutions-components/utils/test/csvUtils.spec.tsx +56 -0
  124. package/dist/solutions-components/utils/test/downloadUtils.spec.tsx +133 -0
  125. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +39 -0
  126. package/dist/types/components/layer-table/layer-table.d.ts +35 -48
  127. package/dist/types/components/map-card/map-card.d.ts +10 -6
  128. package/dist/types/components/map-select-tools/map-select-tools.d.ts +16 -1
  129. package/dist/types/components/public-notification/public-notification.d.ts +86 -4
  130. package/dist/types/components.d.ts +68 -0
  131. package/dist/types/preact.d.ts +2 -1
  132. package/dist/types/utils/csvDownload.d.ts +24 -0
  133. package/dist/types/utils/csvUtils.d.ts +2 -1
  134. package/dist/types/utils/downloadUtils.d.ts +25 -0
  135. package/dist/types/utils/interfaces.d.ts +5 -0
  136. package/dist/types/utils/pdfUtils.d.ts +2 -1
  137. package/package.json +4 -4
  138. package/dist/cjs/calcite-chip.cjs.entry.js +0 -142
  139. package/dist/cjs/calcite-dropdown.cjs.entry.js +0 -481
  140. package/dist/cjs/calcite-handle.cjs.entry.js +0 -99
  141. package/dist/cjs/calcite-loader.cjs.entry.js +0 -95
  142. package/dist/cjs/layer-table.cjs.entry.js +0 -317
  143. package/dist/cjs/map-card.cjs.entry.js +0 -252
  144. package/dist/esm/calcite-chip.entry.js +0 -138
  145. package/dist/esm/calcite-dropdown.entry.js +0 -477
  146. package/dist/esm/calcite-handle.entry.js +0 -95
  147. package/dist/esm/calcite-loader.entry.js +0 -91
  148. package/dist/esm/layer-table.entry.js +0 -313
  149. package/dist/solutions-components/p-11132485.entry.js +0 -11
  150. package/dist/solutions-components/p-15b43c29.entry.js +0 -11
  151. package/dist/solutions-components/p-5034aabc.entry.js +0 -11
  152. package/dist/solutions-components/p-5ee7b022.entry.js +0 -12
  153. package/dist/solutions-components/p-6f012424.entry.js +0 -6
  154. package/dist/solutions-components/p-7fd10eb3.entry.js +0 -11
  155. package/dist/solutions-components/p-84bbaebf.entry.js +0 -6
  156. package/dist/solutions-components/p-88e28de2.js +0 -36
  157. package/dist/solutions-components/p-a57ef371.entry.js +0 -6
  158. package/dist/solutions-components/p-ac76d270.entry.js +0 -17
  159. package/dist/solutions-components/p-dbc9a5a8.js +0 -21
  160. package/dist/solutions-components/p-e162304e.entry.js +0 -6
  161. package/dist/solutions-components/p-f5c70be2.entry.js +0 -6
  162. package/dist/solutions-components/p-f6b17cc6.entry.js +0 -11
@@ -1,24 +1,24 @@
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
- 'use strict';
7
-
8
- Object.defineProperty(exports, '__esModule', { value: true });
9
-
10
- const index = require('./index-c6979cbb.js');
11
- const interfaces = require('./interfaces-17c631bf.js');
12
- const loadModules = require('./loadModules-0806a34f.js');
13
- const mapViewUtils = require('./mapViewUtils-f617ae9a.js');
14
- const publicNotificationStore = require('./publicNotificationStore-20e924f5.js');
15
- const locale = require('./locale-04da9a8c.js');
16
- const publicNotificationUtils = require('./publicNotificationUtils-9d585d8d.js');
17
- require('./index-763f87ac.js');
18
- require('./_commonjsHelpers-384729db.js');
19
-
20
- const publicNotificationCss = ":host{display:block;--calcite-input-message-spacing-value:0}.align-center{align-items:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-3{width:33.3%}.w-1-4{width:25%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-top-sides-1{-webkit-padding-before:1rem;padding-block-start:1rem;-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-sides-1{-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-end-1-2{-webkit-padding-end:.5rem;padding-inline-end:.5rem}.padding-top-1-2{-webkit-padding-before:.5rem;padding-block-start:.5rem}.padding-top-1{padding-top:1rem}.padding-bottom-1{padding-bottom:1rem}.info-blue{color:#00A0FF}.info-message{justify-content:center;display:grid}.font-bold{font-weight:bold}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.main-label{float:left}html[dir=\"rtl\"] .main-label{float:right}.back-label:hover{cursor:pointer;color:var(--calcite-ui-brand-hover)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.margin-side-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.border-top{border-top:1px solid var(--calcite-ui-border-2)}.w-100{width:100%}.w-50{width:50%}.padding-1-2{padding:0.5rem}.list-border{border:1px solid var(--calcite-ui-border-2)}.margin-sides-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.margin-start-1-2{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.float-right{float:right}.float-right[dir=\"rtl\"]{float:left}.float-left{float:left}.float-left[dir=\"rtl\"]{float:right}.margin-top-0{-webkit-margin-before:0 !important;margin-block-start:0 !important}.height-1-1-2{height:1.5rem}.main-background{background-color:var(--calcite-ui-foreground-2)}.num-selected{align-items:center;display:flex}";
21
-
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
+ 'use strict';
7
+
8
+ Object.defineProperty(exports, '__esModule', { value: true });
9
+
10
+ const index = require('./index-c6979cbb.js');
11
+ const interfaces = require('./interfaces-cac36920.js');
12
+ const loadModules = require('./loadModules-0806a34f.js');
13
+ const mapViewUtils = require('./mapViewUtils-090f4d4d.js');
14
+ const publicNotificationStore = require('./publicNotificationStore-20e924f5.js');
15
+ const locale = require('./locale-04da9a8c.js');
16
+ const publicNotificationUtils = require('./publicNotificationUtils-9d585d8d.js');
17
+ require('./index-763f87ac.js');
18
+ require('./_commonjsHelpers-384729db.js');
19
+
20
+ const publicNotificationCss = ":host{display:block;--calcite-input-message-spacing-value:0}.align-center{align-items:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-3{width:33.3%}.w-1-4{width:25%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-top-sides-1{-webkit-padding-before:1rem;padding-block-start:1rem;-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-sides-1{-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-end-1-2{-webkit-padding-end:.5rem;padding-inline-end:.5rem}.padding-top-1-2{-webkit-padding-before:.5rem;padding-block-start:.5rem}.padding-top-1{padding-top:1rem}.padding-bottom-1{padding-bottom:1rem}.info-blue{color:#00A0FF}.info-message{justify-content:center;display:grid}.font-bold{font-weight:bold}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.main-label{float:left}html[dir=\"rtl\"] .main-label{float:right}.back-label:hover{cursor:pointer;color:var(--calcite-ui-brand-hover)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.margin-side-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.border-top{border-top:1px solid var(--calcite-ui-border-2)}.w-100{width:100%}.w-50{width:50%}.padding-1-2{padding:0.5rem}.list-border{border:1px solid var(--calcite-ui-border-2)}.margin-sides-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.margin-start-1-2{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.float-right{float:right}.float-right[dir=\"rtl\"]{float:left}.float-left{float:left}.float-left[dir=\"rtl\"]{float:right}.margin-top-0{-webkit-margin-before:0 !important;margin-block-start:0 !important}.height-1-1-2{height:1.5rem}.main-background{background-color:var(--calcite-ui-foreground-2)}.num-selected{align-items:center;display:flex}";
21
+
22
22
  const PublicNotification = class {
23
23
  constructor(hostRef) {
24
24
  index.registerInstance(this, hostRef);
@@ -38,6 +38,9 @@ const PublicNotification = class {
38
38
  this.selectionLayerIds = [];
39
39
  this.showRefineSelection = false;
40
40
  this.showSearchSettings = true;
41
+ this.sketchLineSymbol = undefined;
42
+ this.sketchPointSymbol = undefined;
43
+ this.sketchPolygonSymbol = undefined;
41
44
  this.addresseeLayer = undefined;
42
45
  this._downloadActive = true;
43
46
  this._numSelected = 0;
@@ -79,14 +82,27 @@ const PublicNotification = class {
79
82
  }
80
83
  }
81
84
  /**
82
- * Called each time the selectionSets prop is changed.
85
+ * Called each time the sketchLineSymbol prop is changed.
83
86
  */
84
- async selectionSetsWatchHandler(v, oldV) {
85
- if (v && v !== oldV && v.length > 0) {
86
- const nonRefineSets = v.filter(ss => ss.workflowType !== interfaces.EWorkflowType.REFINE);
87
- if (nonRefineSets.length === 0) {
88
- this._selectionSets = [];
89
- }
87
+ async sketchLineSymbolWatchHandler(v, oldV) {
88
+ if (v && JSON.stringify(v) !== JSON.stringify(oldV)) {
89
+ this._setLineSymbol(v);
90
+ }
91
+ }
92
+ /**
93
+ * Called each time the sketchPointSymbol prop is changed.
94
+ */
95
+ async sketchPointSymbolWatchHandler(v, oldV) {
96
+ if (v && JSON.stringify(v) !== JSON.stringify(oldV)) {
97
+ this._setPointSymbol(v);
98
+ }
99
+ }
100
+ /**
101
+ * Called each time the sketchPolygonSymbol prop is changed.
102
+ */
103
+ async sketchPolygonSymbolWatchHandler(v, oldV) {
104
+ if (v && JSON.stringify(v) !== JSON.stringify(oldV)) {
105
+ this._setPolygonSymbol(v);
90
106
  }
91
107
  }
92
108
  /**
@@ -146,6 +162,7 @@ const PublicNotification = class {
146
162
  async componentWillLoad() {
147
163
  await this._getTranslations();
148
164
  await this._initModules();
165
+ this._initSymbols();
149
166
  }
150
167
  /**
151
168
  * Renders the component.
@@ -166,10 +183,84 @@ const PublicNotification = class {
166
183
  * @protected
167
184
  */
168
185
  async _initModules() {
169
- const [geometryEngine] = await loadModules.loadModules([
170
- "esri/geometry/geometryEngine"
186
+ const [geometryEngine, jsonUtils] = await loadModules.loadModules([
187
+ "esri/geometry/geometryEngine",
188
+ "esri/symbols/support/jsonUtils"
171
189
  ]);
172
190
  this._geometryEngine = geometryEngine;
191
+ this._jsonUtils = jsonUtils;
192
+ }
193
+ /**
194
+ * Initialize the default symbols that will be used when creating new graphics
195
+ *
196
+ * @protected
197
+ */
198
+ _initSymbols() {
199
+ this._setLineSymbol(this.sketchLineSymbol);
200
+ this._setPointSymbol(this.sketchPointSymbol);
201
+ this._setPolygonSymbol(this.sketchPolygonSymbol);
202
+ }
203
+ /**
204
+ * Convert a JSON representation of a line symbol and/or set the line symbol
205
+ *
206
+ * @param v SimpleLineSymbol or a JSON representation of a line symbol
207
+ *
208
+ * @protected
209
+ */
210
+ _setLineSymbol(v) {
211
+ const isSymbol = (v === null || v === void 0 ? void 0 : v.type) === 'simple-line';
212
+ this.sketchLineSymbol = isSymbol ? v : this._jsonUtils.fromJSON(v ? v : {
213
+ "type": "esriSLS",
214
+ "color": [130, 130, 130, 255],
215
+ "width": 2,
216
+ "style": "esriSLSSolid"
217
+ });
218
+ }
219
+ /**
220
+ * Convert a JSON representation of a point symbol and/or set the point symbol
221
+ *
222
+ * @param v SimpleMarkerSymbol or a JSON representation of a point symbol
223
+ *
224
+ * @protected
225
+ */
226
+ _setPointSymbol(v) {
227
+ const isSymbol = (v === null || v === void 0 ? void 0 : v.type) === 'simple-marker';
228
+ this.sketchPointSymbol = isSymbol ? v : this._jsonUtils.fromJSON(v ? v : {
229
+ "type": "esriSMS",
230
+ "color": [255, 255, 255, 255],
231
+ "angle": 0,
232
+ "xoffset": 0,
233
+ "yoffset": 0,
234
+ "size": 6,
235
+ "style": "esriSMSCircle",
236
+ "outline": {
237
+ "type": "esriSLS",
238
+ "color": [50, 50, 50, 255],
239
+ "width": 1,
240
+ "style": "esriSLSSolid"
241
+ }
242
+ });
243
+ }
244
+ /**
245
+ * Convert a JSON representation of a polygon symbol and/or set the polygon symbol
246
+ *
247
+ * @param v SimpleFillSymbol or a JSON representation of a polygon symbol
248
+ *
249
+ * @protected
250
+ */
251
+ _setPolygonSymbol(v) {
252
+ const isSymbol = (v === null || v === void 0 ? void 0 : v.type) === 'simple-fill';
253
+ this.sketchPolygonSymbol = isSymbol ? v : this._jsonUtils.fromJSON(v ? v : {
254
+ "type": "esriSFS",
255
+ "color": [150, 150, 150, 51],
256
+ "outline": {
257
+ "type": "esriSLS",
258
+ "color": [50, 50, 50, 255],
259
+ "width": 2,
260
+ "style": "esriSLSSolid"
261
+ },
262
+ "style": "esriSFSSolid"
263
+ });
173
264
  }
174
265
  /**
175
266
  * Get a calcite action group for the current action
@@ -232,7 +323,7 @@ const PublicNotification = class {
232
323
  * @protected
233
324
  */
234
325
  _getListPage() {
235
- const hasSets = this._selectionSets.filter(ss => ss.workflowType !== interfaces.EWorkflowType.REFINE).length > 0;
326
+ const hasSets = this._hasSelections();
236
327
  const total = publicNotificationUtils.getTotal(this._selectionSets);
237
328
  return hasSets ? (index.h("calcite-panel", null, index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "font-bold" }, this._translations.myLists)), this._getNotice(this._translations.listHasSetsTip, "padding-sides-1 padding-bottom-1"), this._getMapLayerPicker(), index.h("div", { class: "display-block padding-sides-1 height-1-1-2" }, index.h("div", { class: "display-block float-left" }, index.h("calcite-label", { alignment: "start", class: "font-bold" }, this._translations.notifications)), index.h("div", { class: "display-block float-right" }, index.h("calcite-input-message", { active: true, class: "info-blue margin-top-0", scale: "m" }, this._translations.uniqueCout.replace("{{n}}", total.toString())))), hasSets ? this._getSelectionSetList() : (index.h("div", { class: "info-message" }, index.h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._translations.noNotifications))), index.h("div", { class: "display-flex padding-1" }, index.h("calcite-button", { onClick: () => { this._setPageType(interfaces.EPageType.SELECT); }, width: "full" }, this._translations.add)), this._showModal(this._showLayerSelectionChangeModal))) : (index.h("calcite-panel", null, index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "font-bold" }, this._translations.myLists)), index.h("div", { class: "padding-sides-1" }, index.h("calcite-label", null, this._translations.notifications)), index.h("div", { class: "info-message padding-bottom-1" }, index.h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._translations.noNotifications)), this._getNotice(this._translations.selectLayerAndAdd, "padding-sides-1 padding-bottom-1"), this._getMapLayerPicker(), index.h("div", { class: "display-flex padding-1" }, index.h("calcite-button", { onClick: () => { this._setPageType(interfaces.EPageType.SELECT); }, width: "full" }, this._translations.add))));
238
329
  }
@@ -257,7 +348,8 @@ const PublicNotification = class {
257
348
  // REFINE is handled seperately from the core selection sets
258
349
  // You can only access after clicking the refine action
259
350
  this._selectionSets.reduce((prev, cur, i) => {
260
- if (cur.workflowType !== interfaces.EWorkflowType.REFINE) {
351
+ const validSet = this._isValidSet(cur);
352
+ if (validSet) {
261
353
  prev.push((index.h("calcite-list-item", { description: this._translations.selectedFeatures.replace("{{n}}", cur.selectedIds.length.toString()), label: cur.label, onClick: () => this._gotoSelection(cur, this.mapView) }, this._getAction(true, "pencil", "", (evt) => this._openSelection(cur, evt), false, "actions-end"), this._getAction(true, "x", "", (evt) => this._deleteSelection(i, evt), false, "actions-end"))));
262
354
  }
263
355
  return prev;
@@ -298,14 +390,38 @@ const PublicNotification = class {
298
390
  await this._updateAddresseeLayer(id);
299
391
  }
300
392
  /**
301
- * Check if any selection sets exist.
393
+ * Check if any valid selection sets exist.
302
394
  *
303
- * @returns true if selection sets exist
395
+ * @returns true if valid selection sets exist
304
396
  *
305
397
  * @protected
306
398
  */
307
399
  _hasSelections() {
308
- return this._selectionSets.length > 0;
400
+ return this._selectionSets.filter(ss => this._isValidSet(ss)).length > 0;
401
+ }
402
+ /**
403
+ * Check if any duplicates exist
404
+ *
405
+ * @returns true if duplicates are found
406
+ *
407
+ * @protected
408
+ */
409
+ _hasDuplicates() {
410
+ const selectedIds = this._selectionSets.reduce((prev, cur) => {
411
+ return prev.concat(cur.download ? cur.selectedIds : []);
412
+ }, []);
413
+ return selectedIds.length > new Set(selectedIds).size;
414
+ }
415
+ /**
416
+ * Check if a selection set is valid (exists or has at least one added if its a refine set)
417
+ *
418
+ * @returns true if selection set is valid
419
+ *
420
+ * @protected
421
+ */
422
+ _isValidSet(ss) {
423
+ var _a, _b;
424
+ return ss.workflowType === interfaces.EWorkflowType.REFINE ? ((_b = (_a = ss === null || ss === void 0 ? void 0 : ss.refineIds) === null || _a === void 0 ? void 0 : _a.addIds) === null || _b === void 0 ? void 0 : _b.length) > 0 : true;
309
425
  }
310
426
  /**
311
427
  * Create the Select page that shows the selection workflows
@@ -327,7 +443,7 @@ const PublicNotification = class {
327
443
  const locale$1 = locale.getComponentClosestLanguage(this.el);
328
444
  const selectionLoading = locale$1 && locale$1 === "en" ?
329
445
  `${this._translations.selectionLoading}...` : this._translations.selectionLoading;
330
- return (index.h("calcite-panel", null, this._getLabel(this._translations.stepTwoFull.replace("{{layer}}", (_a = this.addresseeLayer) === null || _a === void 0 ? void 0 : _a.layer.title)), this._getNotice(noticeText), index.h("div", { class: "padding-top-sides-1" }, index.h("map-select-tools", { bufferColor: this.bufferColor, bufferOutlineColor: this.bufferOutlineColor, class: "font-bold", defaultBufferDistance: this.defaultBufferDistance, defaultBufferUnit: this.defaultBufferUnit, enabledLayerIds: this.selectionLayerIds, isUpdate: !!this._activeSelection, mapView: this.mapView, onSelectionSetChange: (evt) => this._updateForSelection(evt), onWorkflowTypeChange: (evt) => this._updateForWorkflowType(evt), ref: (el) => { this._selectTools = el; }, searchConfiguration: this._searchConfiguration, selectLayerView: this.addresseeLayer, selectionSet: this._activeSelection, showBufferTools: this.showSearchSettings })), index.h("div", { class: "padding-sides-1 padding-bottom-1", style: { "align-items": "end", "display": "flex" } }, this._selectionLoading ? (index.h("div", null, index.h("calcite-loader", { active: true, class: "info-blue", inline: true, label: selectionLoading, scale: "m", type: "indeterminate" }))) : (index.h("calcite-icon", { class: "info-blue padding-end-1-2", icon: "feature-layer", scale: "s" })), index.h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._selectionLoading ? selectionLoading :
446
+ return (index.h("calcite-panel", null, this._getLabel(this._translations.stepTwoFull.replace("{{layer}}", (_a = this.addresseeLayer) === null || _a === void 0 ? void 0 : _a.layer.title)), this._getNotice(noticeText), index.h("div", { class: "padding-top-sides-1" }, index.h("map-select-tools", { bufferColor: this.bufferColor, bufferOutlineColor: this.bufferOutlineColor, class: "font-bold", defaultBufferDistance: this.defaultBufferDistance, defaultBufferUnit: this.defaultBufferUnit, enabledLayerIds: this.selectionLayerIds, isUpdate: !!this._activeSelection, mapView: this.mapView, onSelectionSetChange: (evt) => this._updateForSelection(evt), onWorkflowTypeChange: (evt) => this._updateForWorkflowType(evt), ref: (el) => { this._selectTools = el; }, searchConfiguration: this._searchConfiguration, selectLayerView: this.addresseeLayer, selectionSet: this._activeSelection, showBufferTools: this.showSearchSettings, sketchLineSymbol: this.sketchLineSymbol, sketchPointSymbol: this.sketchPointSymbol, sketchPolygonSymbol: this.sketchPolygonSymbol })), index.h("div", { class: "padding-sides-1 padding-bottom-1", style: { "align-items": "end", "display": "flex" } }, this._selectionLoading ? (index.h("div", null, index.h("calcite-loader", { active: true, class: "info-blue", inline: true, label: selectionLoading, scale: "m", type: "indeterminate" }))) : (index.h("calcite-icon", { class: "info-blue padding-end-1-2", icon: "feature-layer", scale: "s" })), index.h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._selectionLoading ? selectionLoading :
331
447
  this.noResultText && this._numSelected === 0 ? this.noResultText :
332
448
  this._translations.selectedAddresses.replace("{{n}}", this._numSelected.toString()).replace("{{layer}}", ((_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.title) || ""))), index.h("div", { class: "padding-sides-1 " + nameLabelClass }, index.h("calcite-label", { class: "font-bold" }, "List name", index.h("calcite-input", { onInput: () => {
333
449
  this.labelChange.emit(this._labelName.value);
@@ -374,7 +490,8 @@ const PublicNotification = class {
374
490
  _getDownloadPage(type) {
375
491
  const isPdf = type === interfaces.EExportType.PDF;
376
492
  const hasSelections = this._hasSelections();
377
- return (index.h("calcite-panel", null, index.h("div", null, index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)), hasSelections ? (index.h("div", null, index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", null, this._translations.notifications)), this._getSelectionLists(), index.h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: isPdf ? "display-none" : "", layout: "inline" }, index.h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicatesCSV = el; } }), this._translations.removeDuplicate), index.h("calcite-label", { class: isPdf ? "" : "display-none", layout: "inline" }, index.h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicatesPDF = el; } }), this._translations.removeDuplicate)), index.h("div", { class: isPdf ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), index.h("div", { class: "padding-sides-1" }, index.h("pdf-download", { disabled: !this._downloadActive, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), index.h("div", { class: "padding-1 display-flex" }, index.h("calcite-button", { disabled: !this._downloadActive, onClick: isPdf ? () => this._downloadPDF() : () => this._downloadCSV(), width: "full" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)))) : (this._getNotice(this._translations.downloadNoLists, "padding-sides-1 padding-bottom-1")))));
493
+ const hasDuplicates = this._hasDuplicates();
494
+ return (index.h("calcite-panel", null, index.h("div", null, index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)), hasSelections ? (index.h("div", null, index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", null, this._translations.notifications)), this._getSelectionLists(), index.h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: isPdf ? "display-none" : "", disabled: !hasDuplicates, layout: "inline" }, index.h("calcite-checkbox", { disabled: !hasDuplicates, ref: (el) => { this._removeDuplicatesCSV = el; } }), this._translations.removeDuplicate), index.h("calcite-label", { class: isPdf ? "" : "display-none", disabled: !hasDuplicates, layout: "inline" }, index.h("calcite-checkbox", { disabled: !hasDuplicates, ref: (el) => { this._removeDuplicatesPDF = el; } }), this._translations.removeDuplicate)), index.h("div", { class: isPdf ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), index.h("div", { class: "padding-sides-1" }, index.h("pdf-download", { disabled: !this._downloadActive, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), index.h("div", { class: "padding-1 display-flex" }, index.h("calcite-button", { disabled: !this._downloadActive, onClick: isPdf ? () => this._downloadPDF() : () => this._downloadCSV(), width: "full" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)))) : (this._getNotice(this._translations.downloadNoLists, "padding-sides-1 padding-bottom-1")))));
378
495
  }
379
496
  /**
380
497
  * Create the stacked navigation buttons for a page
@@ -424,7 +541,8 @@ const PublicNotification = class {
424
541
  */
425
542
  _getSelectionLists() {
426
543
  return this._selectionSets.reduce((prev, cur) => {
427
- if (cur.workflowType !== interfaces.EWorkflowType.REFINE) {
544
+ const validSet = this._isValidSet(cur);
545
+ if (validSet) {
428
546
  if (!this._downloadActive && cur.download) {
429
547
  this._downloadActive = true;
430
548
  }
@@ -587,7 +705,7 @@ const PublicNotification = class {
587
705
  * @protected
588
706
  */
589
707
  async _updateSelectionSets(layerView) {
590
- const _selectionSets = this._selectionSets.filter(selectionSet => selectionSet.workflowType !== interfaces.EWorkflowType.REFINE);
708
+ const _selectionSets = this._selectionSets;
591
709
  const oidDefs = [];
592
710
  _selectionSets.forEach(selectionSet => {
593
711
  selectionSet.layerView = layerView;
@@ -671,11 +789,16 @@ const PublicNotification = class {
671
789
  */
672
790
  _openSelection(selectionSet, evt) {
673
791
  evt.stopPropagation();
674
- this._activeSelection = selectionSet;
675
- this._distance = this._activeSelection.distance;
676
- this._unit = this._activeSelection.unit;
677
- this._customLabel = this._activeSelection.label;
678
- this._pageType = interfaces.EPageType.SELECT;
792
+ if (selectionSet.workflowType === interfaces.EWorkflowType.REFINE) {
793
+ this._pageType = interfaces.EPageType.REFINE;
794
+ }
795
+ else {
796
+ this._activeSelection = selectionSet;
797
+ this._distance = this._activeSelection.distance;
798
+ this._unit = this._activeSelection.unit;
799
+ this._customLabel = this._activeSelection.label;
800
+ this._pageType = interfaces.EPageType.SELECT;
801
+ }
679
802
  }
680
803
  /**
681
804
  * Highlight any selected features in the map
@@ -724,10 +847,12 @@ const PublicNotification = class {
724
847
  static get watchers() { return {
725
848
  "mapView": ["mapViewWatchHandler"],
726
849
  "searchConfiguration": ["watchSearchConfigurationHandler"],
727
- "_selectionSets": ["selectionSetsWatchHandler"],
850
+ "sketchLineSymbol": ["sketchLineSymbolWatchHandler"],
851
+ "sketchPointSymbol": ["sketchPointSymbolWatchHandler"],
852
+ "sketchPolygonSymbol": ["sketchPolygonSymbolWatchHandler"],
728
853
  "_pageType": ["pageTypeWatchHandler"]
729
854
  }; }
730
855
  };
731
- PublicNotification.style = publicNotificationCss;
732
-
733
- exports.public_notification = PublicNotification;
856
+ PublicNotification.style = publicNotificationCss;
857
+
858
+ exports.public_notification = PublicNotification;
@@ -8,10 +8,10 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-c6979cbb.js');
11
- const solutionStore = require('./solution-store-b86759b2.js');
11
+ const solutionStore = require('./solution-store-d28c332e.js');
12
12
  const locale = require('./locale-04da9a8c.js');
13
13
  require('./index-763f87ac.js');
14
- require('./interfaces-17c631bf.js');
14
+ require('./interfaces-cac36920.js');
15
15
  require('./_commonjsHelpers-384729db.js');
16
16
 
17
17
  /** @license
@@ -8,9 +8,9 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-c6979cbb.js');
11
- const solutionStore = require('./solution-store-b86759b2.js');
11
+ const solutionStore = require('./solution-store-d28c332e.js');
12
12
  const locale = require('./locale-04da9a8c.js');
13
- require('./interfaces-17c631bf.js');
13
+ require('./interfaces-cac36920.js');
14
14
  require('./index-763f87ac.js');
15
15
  require('./_commonjsHelpers-384729db.js');
16
16
 
@@ -6,7 +6,7 @@
6
6
  'use strict';
7
7
 
8
8
  const index = require('./index-763f87ac.js');
9
- const interfaces = require('./interfaces-17c631bf.js');
9
+ const interfaces = require('./interfaces-cac36920.js');
10
10
  const _commonjsHelpers = require('./_commonjsHelpers-384729db.js');
11
11
 
12
12
  /*! *****************************************************************************