@esri/solutions-components 0.3.2 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. package/dist/assets/t9n/public-notification/resources.json +4 -1
  2. package/dist/assets/t9n/public-notification/resources_en.json +4 -1
  3. package/dist/cjs/buffer-tools_6.cjs.entry.js +8 -7
  4. package/dist/cjs/calcite-combobox_3.cjs.entry.js +38 -25
  5. package/dist/cjs/calcite-input-message_5.cjs.entry.js +272 -21
  6. package/dist/cjs/{csvUtils-18a03353.js → csvUtils-83af7ae1.js} +5 -5
  7. package/dist/cjs/layer-table.cjs.entry.js +3 -3
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/map-search.cjs.entry.js +46 -7
  10. package/dist/cjs/{mapViewUtils-8ea9adc5.js → mapViewUtils-55ac76cb.js} +40 -25
  11. package/dist/cjs/public-notification.cjs.entry.js +101 -18
  12. package/dist/cjs/{publicNotificationStore-aca88430.js → publicNotificationStore-28a8759d.js} +3 -1
  13. package/dist/cjs/solutions-components.cjs.js +1 -1
  14. package/dist/collection/collection-manifest.json +0 -5
  15. package/dist/collection/components/buffer-tools/buffer-tools.js +7 -6
  16. package/dist/collection/components/layer-table/layer-table.js +1 -1
  17. package/dist/collection/components/map-layer-picker/map-layer-picker.js +47 -29
  18. package/dist/collection/components/map-search/map-search.js +66 -7
  19. package/dist/collection/components/map-select-tools/map-select-tools.js +125 -8
  20. package/dist/collection/components/pdf-download/pdf-download.js +32 -8
  21. package/dist/collection/components/public-notification/public-notification.css +46 -41
  22. package/dist/collection/components/public-notification/public-notification.js +267 -19
  23. package/dist/collection/components/refine-selection/refine-selection.js +18 -1
  24. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +22 -5
  25. package/dist/{solutions-components/demos/config-pdf-download.html → collection/demos/buffer-tools.html} +13 -21
  26. package/dist/collection/demos/index.html +0 -24
  27. package/dist/collection/demos/map-draw-tools.html +17 -17
  28. package/dist/collection/demos/map-layer-picker.html +2 -0
  29. package/dist/collection/demos/map-search.html +16 -15
  30. package/dist/collection/demos/map-select-tools.html +16 -24
  31. package/dist/collection/demos/new-public-notification.html +46 -35
  32. package/dist/collection/demos/pdf-download.html +8 -1
  33. package/dist/collection/utils/csvUtils.js +4 -4
  34. package/dist/collection/utils/csvUtils.ts +6 -4
  35. package/dist/collection/utils/interfaces.ts +65 -1
  36. package/dist/collection/utils/mapViewUtils.js +36 -22
  37. package/dist/collection/utils/mapViewUtils.ts +50 -27
  38. package/dist/collection/utils/publicNotificationStore.js +3 -1
  39. package/dist/collection/utils/publicNotificationStore.ts +3 -1
  40. package/dist/collection/utils/queryUtils.js +2 -2
  41. package/dist/collection/utils/queryUtils.ts +2 -2
  42. package/dist/components/buffer-tools2.js +1 -1
  43. package/dist/components/csvUtils.js +4 -4
  44. package/dist/components/index.d.ts +0 -5
  45. package/dist/components/index.js +0 -5
  46. package/dist/components/layer-table.js +2 -3
  47. package/dist/components/map-layer-picker2.js +177 -28
  48. package/dist/components/map-search.js +47 -7
  49. package/dist/components/map-select-tools2.js +56 -11
  50. package/dist/components/pdf-download2.js +217 -8
  51. package/dist/components/public-notification.js +154 -55
  52. package/dist/components/publicNotificationStore.js +3 -1
  53. package/dist/components/queryUtils.js +3 -3
  54. package/dist/components/refine-selection-tools2.js +9 -8
  55. package/dist/components/refine-selection2.js +3 -1
  56. package/dist/esm/buffer-tools_6.entry.js +8 -7
  57. package/dist/esm/calcite-combobox_3.entry.js +38 -25
  58. package/dist/esm/calcite-input-message_5.entry.js +271 -20
  59. package/dist/esm/{csvUtils-edc0c2a8.js → csvUtils-eb231cfb.js} +5 -5
  60. package/dist/esm/layer-table.entry.js +3 -3
  61. package/dist/esm/loader.js +1 -1
  62. package/dist/esm/map-search.entry.js +46 -7
  63. package/dist/esm/{mapViewUtils-31d2c2bb.js → mapViewUtils-e5d8a1e1.js} +39 -25
  64. package/dist/esm/public-notification.entry.js +101 -18
  65. package/dist/esm/{publicNotificationStore-3e762eea.js → publicNotificationStore-8e9cb73b.js} +3 -1
  66. package/dist/esm/solutions-components.js +1 -1
  67. package/dist/{collection/demos/config-pdf-download.html → solutions-components/demos/buffer-tools.html} +13 -21
  68. package/dist/solutions-components/demos/index.html +0 -24
  69. package/dist/solutions-components/demos/map-draw-tools.html +17 -17
  70. package/dist/solutions-components/demos/map-layer-picker.html +2 -0
  71. package/dist/solutions-components/demos/map-search.html +16 -15
  72. package/dist/solutions-components/demos/map-select-tools.html +16 -24
  73. package/dist/solutions-components/demos/new-public-notification.html +46 -35
  74. package/dist/solutions-components/demos/pdf-download.html +8 -1
  75. package/dist/solutions-components/p-07593958.entry.js +6 -0
  76. package/dist/solutions-components/p-3fa9b3c8.js +36 -0
  77. package/dist/solutions-components/p-9b5a9117.entry.js +12 -0
  78. package/dist/solutions-components/{p-15cd8a97.js → p-9c1ebc90.js} +1 -1
  79. package/dist/solutions-components/{p-c76f8ff7.entry.js → p-a516c658.entry.js} +1 -1
  80. package/dist/solutions-components/{p-ad42039f.js → p-b668daf8.js} +2 -2
  81. package/dist/solutions-components/p-bfa95147.entry.js +17 -0
  82. package/dist/solutions-components/p-d09a168c.entry.js +6 -0
  83. package/dist/solutions-components/{p-fa6046a8.entry.js → p-fc9609e6.entry.js} +2 -2
  84. package/dist/solutions-components/solutions-components.esm.js +1 -1
  85. package/dist/solutions-components/utils/csvUtils.ts +6 -4
  86. package/dist/solutions-components/utils/interfaces.ts +65 -1
  87. package/dist/solutions-components/utils/mapViewUtils.ts +50 -27
  88. package/dist/solutions-components/utils/publicNotificationStore.ts +3 -1
  89. package/dist/solutions-components/utils/queryUtils.ts +2 -2
  90. package/dist/types/components/buffer-tools/buffer-tools.d.ts +4 -3
  91. package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +22 -11
  92. package/dist/types/components/map-search/map-search.d.ts +18 -1
  93. package/dist/types/components/map-select-tools/map-select-tools.d.ts +31 -1
  94. package/dist/types/components/pdf-download/pdf-download.d.ts +7 -2
  95. package/dist/types/components/public-notification/public-notification.d.ts +98 -4
  96. package/dist/types/components/refine-selection/refine-selection.d.ts +5 -0
  97. package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +6 -1
  98. package/dist/types/components.d.ts +154 -180
  99. package/dist/types/preact.d.ts +0 -10
  100. package/dist/types/utils/csvUtils.d.ts +1 -1
  101. package/dist/types/utils/interfaces.d.ts +56 -1
  102. package/dist/types/utils/mapViewUtils.d.ts +19 -9
  103. package/dist/types/utils/publicNotificationStore.d.ts +1 -0
  104. package/package.json +1 -1
  105. package/dist/cjs/check-list.cjs.entry.js +0 -103
  106. package/dist/cjs/config-buffer-tools.cjs.entry.js +0 -125
  107. package/dist/cjs/config-draw-tools.cjs.entry.js +0 -85
  108. package/dist/cjs/config-layer-picker.cjs.entry.js +0 -113
  109. package/dist/cjs/config-pdf-download.cjs.entry.js +0 -117
  110. package/dist/cjs/labelFormats-3236d2e0.js +0 -212
  111. package/dist/collection/components/check-list/check-list.css +0 -3
  112. package/dist/collection/components/check-list/check-list.js +0 -179
  113. package/dist/collection/components/config-buffer-tools/config-buffer-tools.css +0 -34
  114. package/dist/collection/components/config-buffer-tools/config-buffer-tools.js +0 -209
  115. package/dist/collection/components/config-draw-tools/config-draw-tools.css +0 -17
  116. package/dist/collection/components/config-draw-tools/config-draw-tools.js +0 -150
  117. package/dist/collection/components/config-layer-picker/config-layer-picker.css +0 -17
  118. package/dist/collection/components/config-layer-picker/config-layer-picker.js +0 -218
  119. package/dist/collection/components/config-pdf-download/config-pdf-download.css +0 -17
  120. package/dist/collection/components/config-pdf-download/config-pdf-download.js +0 -183
  121. package/dist/collection/demos/check-list.html +0 -65
  122. package/dist/collection/demos/config-buffer-tools.html +0 -92
  123. package/dist/collection/demos/config-draw-tools.html +0 -58
  124. package/dist/collection/demos/config-layer-picker.html +0 -97
  125. package/dist/components/check-list.d.ts +0 -11
  126. package/dist/components/check-list.js +0 -11
  127. package/dist/components/check-list2.js +0 -131
  128. package/dist/components/config-buffer-tools.d.ts +0 -11
  129. package/dist/components/config-buffer-tools.js +0 -187
  130. package/dist/components/config-draw-tools.d.ts +0 -11
  131. package/dist/components/config-draw-tools.js +0 -121
  132. package/dist/components/config-layer-picker.d.ts +0 -11
  133. package/dist/components/config-layer-picker.js +0 -163
  134. package/dist/components/config-pdf-download.d.ts +0 -11
  135. package/dist/components/config-pdf-download.js +0 -154
  136. package/dist/components/labelFormats.js +0 -210
  137. package/dist/components/mapViewUtils.js +0 -129
  138. package/dist/esm/check-list.entry.js +0 -99
  139. package/dist/esm/config-buffer-tools.entry.js +0 -121
  140. package/dist/esm/config-draw-tools.entry.js +0 -81
  141. package/dist/esm/config-layer-picker.entry.js +0 -109
  142. package/dist/esm/config-pdf-download.entry.js +0 -113
  143. package/dist/esm/labelFormats-b37958c3.js +0 -210
  144. package/dist/solutions-components/demos/check-list.html +0 -65
  145. package/dist/solutions-components/demos/config-buffer-tools.html +0 -92
  146. package/dist/solutions-components/demos/config-draw-tools.html +0 -58
  147. package/dist/solutions-components/demos/config-layer-picker.html +0 -97
  148. package/dist/solutions-components/p-16a0e65a.entry.js +0 -6
  149. package/dist/solutions-components/p-35078393.entry.js +0 -17
  150. package/dist/solutions-components/p-3d72bba6.entry.js +0 -6
  151. package/dist/solutions-components/p-3e444242.entry.js +0 -6
  152. package/dist/solutions-components/p-67afea92.entry.js +0 -12
  153. package/dist/solutions-components/p-7dcab29d.js +0 -36
  154. package/dist/solutions-components/p-89f7b02a.entry.js +0 -6
  155. package/dist/solutions-components/p-906b7b96.entry.js +0 -6
  156. package/dist/solutions-components/p-99c98510.entry.js +0 -6
  157. package/dist/solutions-components/p-b1a3605f.entry.js +0 -6
  158. package/dist/solutions-components/p-e99b1247.js +0 -6
  159. package/dist/types/components/check-list/check-list.d.ts +0 -57
  160. package/dist/types/components/config-buffer-tools/config-buffer-tools.d.ts +0 -92
  161. package/dist/types/components/config-draw-tools/config-draw-tools.d.ts +0 -58
  162. package/dist/types/components/config-layer-picker/config-layer-picker.d.ts +0 -83
  163. package/dist/types/components/config-pdf-download/config-pdf-download.d.ts +0 -81
@@ -16,28 +16,29 @@
16
16
 
17
17
  :host {
18
18
  display: block;
19
+ --calcite-input-message-spacing-value: 0;
19
20
  }
20
-
21
+
21
22
  .border-bottom-1 {
22
23
  border-width: 0px;
23
24
  border-bottom-width: 1px;
24
25
  border-style: solid;
25
26
  border-color: var(--calcite-ui-border-3);
26
27
  }
27
-
28
+
28
29
  .action-bar-size {
29
30
  height: 3.5rem;
30
31
  width: 100%;
31
32
  }
32
-
33
+
33
34
  .w-1-3 {
34
35
  width: 33.3%;
35
36
  }
36
-
37
+
37
38
  .w-1-4 {
38
39
  width: 25%;
39
40
  }
40
-
41
+
41
42
  .action-center {
42
43
  -webkit-box-align: center;
43
44
  -webkit-align-items: center;
@@ -46,19 +47,19 @@
46
47
  align-content: center;
47
48
  justify-content: center;
48
49
  }
49
-
50
+
50
51
  .width-full {
51
52
  width: 100%;
52
53
  }
53
-
54
+
54
55
  .height-full {
55
56
  height: 100%;
56
57
  }
57
-
58
+
58
59
  .padding-1 {
59
60
  padding: 1rem;
60
61
  }
61
-
62
+
62
63
  .padding-top-sides-1 {
63
64
  -webkit-padding-before: 1rem;
64
65
  padding-block-start: 1rem;
@@ -67,147 +68,151 @@
67
68
  -webkit-padding-end: 1rem;
68
69
  padding-inline-end: 1rem;
69
70
  }
70
-
71
+
71
72
  .padding-sides-1 {
72
73
  -webkit-padding-start: 1rem;
73
74
  padding-inline-start: 1rem;
74
75
  -webkit-padding-end: 1rem;
75
76
  padding-inline-end: 1rem;
76
77
  }
77
-
78
+
78
79
  .padding-end-1-2 {
79
80
  -webkit-padding-end: .5rem;
80
81
  padding-inline-end: .5rem;
81
82
  }
82
-
83
+
83
84
  .padding-top-1-2 {
84
85
  -webkit-padding-before: .5rem;
85
86
  padding-block-start: .5rem;
86
87
  }
87
-
88
+
88
89
  .padding-top-1 {
89
90
  padding-top: 1rem;
90
91
  }
91
-
92
+
92
93
  .padding-bottom-1 {
93
94
  padding-bottom: 1rem;
94
95
  }
95
-
96
+
96
97
  .info-blue {
97
98
  /* This would be better but not the right color in light theme */
98
99
  /* color: var(--calcite-ui-info); */
99
-
100
+
100
101
  /* This is --calcite-ui-info value for dark theme*/
101
102
  color: #00A0FF;
102
103
  }
103
-
104
+
104
105
  .info-message {
105
106
  justify-content: center;
106
107
  display: grid;
107
108
  }
108
-
109
+
109
110
  .font-bold {
110
111
  font-weight: bold;
111
112
  }
112
-
113
+
113
114
  .display-flex {
114
115
  display: flex;
115
116
  }
116
-
117
+
117
118
  .display-block {
118
119
  display: block;
119
120
  }
120
-
121
+
121
122
  .display-none {
122
123
  display: none;
123
124
  }
124
-
125
+
125
126
  .main-label {
126
127
  float: left;
127
128
  }
128
-
129
+
129
130
  html[dir="rtl"] .main-label {
130
131
  float: right;
131
132
  }
132
-
133
+
133
134
  .back-label:hover {
134
135
  cursor: pointer;
135
136
  color: var(--calcite-ui-brand-hover);
136
137
  }
137
-
138
+
138
139
  .border-bottom {
139
140
  border-bottom: 1px solid var(--calcite-ui-border-2);
140
141
  }
141
-
142
+
142
143
  .margin-side-1 {
143
144
  -webkit-margin-start: 1rem;
144
145
  margin-inline-start: 1rem;
145
146
  -webkit-margin-end: 1rem;
146
147
  margin-inline-end: 1rem;
147
148
  }
148
-
149
+
149
150
  .border-top {
150
151
  border-top: 1px solid var(--calcite-ui-border-2);
151
152
  }
152
-
153
+
153
154
  .w-100 {
154
155
  width: 100%;
155
156
  }
156
-
157
+
157
158
  .w-50 {
158
159
  width: 50%;
159
160
  }
160
-
161
+
161
162
  .padding-1-2 {
162
163
  padding: 0.5rem;
163
164
  }
164
-
165
+
165
166
  .list-border {
166
167
  border: 1px solid var(--calcite-ui-border-2);
167
168
  }
168
-
169
+
169
170
  .margin-sides-1 {
170
171
  -webkit-margin-start: 1rem;
171
172
  margin-inline-start: 1rem;
172
173
  -webkit-margin-end: 1rem;
173
174
  margin-inline-end: 1rem;
174
175
  }
175
-
176
+
176
177
  .margin-start-1-2 {
177
178
  -webkit-margin-start: 0.5rem;
178
179
  margin-inline-start: 0.5rem;
179
180
  }
180
-
181
+
181
182
  .position-right {
182
183
  position: absolute;
183
184
  right: 1rem;
184
185
  }
185
-
186
+
186
187
  .position-right[dir="rtl"] {
187
188
  position: absolute;
188
189
  left: 1rem;
189
190
  }
190
-
191
+
191
192
  .position-left {
192
193
  position: absolute;
193
194
  left: 1rem;
194
195
  }
195
-
196
+
196
197
  .position-left[dir="rtl"] {
197
198
  position: absolute;
198
199
  right: 1rem;
199
200
  }
200
-
201
+
201
202
  .margin-top-0 {
202
203
  -webkit-margin-before: 0 !important;
203
204
  margin-block-start: 0 !important;
204
205
  }
205
-
206
+
206
207
  .height-1-1-2 {
207
208
  height: 1.5rem;
208
209
  }
209
-
210
+
210
211
  .main-background {
211
212
  background-color: var(--calcite-ui-foreground-2);
212
213
  }
213
-
214
+
215
+ .num-selected {
216
+ align-items: center;
217
+ display: flex;
218
+ }
@@ -28,9 +28,19 @@ import { getLocaleComponentStrings } from "../../utils/locale";
28
28
  import * as utils from "../../utils/publicNotificationUtils";
29
29
  export class PublicNotification {
30
30
  constructor() {
31
- this.addresseeLayer = undefined;
31
+ this.addresseeLayerIds = [];
32
+ this.defaultBufferDistance = undefined;
33
+ this.defaultBufferUnit = undefined;
34
+ this.exportOptions = undefined;
35
+ this.featureEffect = undefined;
36
+ this.featureHighlightEnabled = undefined;
32
37
  this.mapView = undefined;
38
+ this.noResultText = undefined;
39
+ this.searchConfiguration = undefined;
40
+ this.selectionLayerIds = [];
33
41
  this.showRefineSelection = false;
42
+ this.showSearchSettings = true;
43
+ this.addresseeLayer = undefined;
34
44
  this._downloadActive = true;
35
45
  this._numSelected = 0;
36
46
  this._pageType = EPageType.LIST;
@@ -38,6 +48,7 @@ export class PublicNotification {
38
48
  this._selectionSets = [];
39
49
  this._sketchType = ESketchType.INTERACTIVE;
40
50
  this._selectionWorkflowType = EWorkflowType.SEARCH;
51
+ this._showLayerSelectionChangeModal = false;
41
52
  this._translations = undefined;
42
53
  }
43
54
  //--------------------------------------------------------------------------
@@ -116,8 +127,13 @@ export class PublicNotification {
116
127
  * Renders the component.
117
128
  */
118
129
  render() {
130
+ var _a, _b, _c, _d, _e, _f;
119
131
  const hasSelections = this._selectionSets.length > 0;
120
- return (h(Host, null, h("calcite-shell", null, h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getActionGroup("list-check", false, EPageType.LIST, this._translations.myLists), this.showRefineSelection ? this._getActionGroup("test-data", !hasSelections, EPageType.REFINE, this._translations.refineSelection) : undefined, this._getActionGroup("file-pdf", !hasSelections, EPageType.PDF, this._translations.downloadPDF), this._getActionGroup("file-csv", !hasSelections, EPageType.CSV, this._translations.downloadCSV)), this._getPage(this._pageType))));
132
+ const csvEnabled = typeof ((_b = (_a = this.exportOptions) === null || _a === void 0 ? void 0 : _a.csvOptions) === null || _b === void 0 ? void 0 : _b.enabled) === "boolean" ?
133
+ (_c = this.exportOptions) === null || _c === void 0 ? void 0 : _c.csvOptions.enabled : true;
134
+ const pdfEnabled = typeof ((_e = (_d = this.exportOptions) === null || _d === void 0 ? void 0 : _d.pdfOptions) === null || _e === void 0 ? void 0 : _e.enabled) === "boolean" ?
135
+ (_f = this.exportOptions) === null || _f === void 0 ? void 0 : _f.pdfOptions.enabled : true;
136
+ return (h(Host, null, h("calcite-shell", null, h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getActionGroup("list-check", false, EPageType.LIST, this._translations.myLists), this.showRefineSelection ? this._getActionGroup("test-data", !hasSelections, EPageType.REFINE, this._translations.refineSelection) : undefined, pdfEnabled ? this._getActionGroup("file-pdf", !hasSelections, EPageType.PDF, this._translations.downloadPDF) : undefined, csvEnabled ? this._getActionGroup("file-csv", !hasSelections, EPageType.CSV, this._translations.downloadCSV) : undefined), this._getPage(this._pageType))));
121
137
  }
122
138
  //--------------------------------------------------------------------------
123
139
  //
@@ -198,10 +214,19 @@ export class PublicNotification {
198
214
  * @protected
199
215
  */
200
216
  _getListPage() {
201
- var _a, _b;
202
217
  const hasSets = this._selectionSets.filter(ss => ss.workflowType !== EWorkflowType.REFINE).length > 0;
203
218
  const total = utils.getTotal(this._selectionSets);
204
- return hasSets ? (h("calcite-panel", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, this._translations.myLists)), this._getNotice(this._translations.listHasSetsTip, "padding-sides-1 padding-bottom-1"), h("div", { class: "display-flex padding-sides-1" }, h("calcite-label", { class: "font-bold width-full" }, this._translations.addresseeLayer, h("map-layer-picker", { mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChange(evt), selectedLayers: this.addresseeLayer ? [(_a = this.addresseeLayer) === null || _a === void 0 ? void 0 : _a.layer.title] : [], selectionMode: "single" }))), h("div", { class: "padding-sides-1 height-1-1-2" }, h("div", { class: "position-left" }, h("calcite-label", { alignment: "start", class: "font-bold" }, this._translations.notifications)), h("div", { class: "position-right" }, h("calcite-input-message", { active: true, class: "info-blue margin-top-0", scale: "m" }, this._translations.uniqueCout.replace("{{n}}", total.toString())))), hasSets ? this._getSelectionSetList() : (h("div", { class: "info-message" }, h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._translations.noNotifications))), h("div", { class: "display-flex padding-1" }, h("calcite-button", { onClick: () => { this._setPageType(EPageType.SELECT); }, width: "full" }, this._translations.add)))) : (h("calcite-panel", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, this._translations.myLists)), h("div", { class: "padding-sides-1" }, h("calcite-label", null, this._translations.notifications)), h("div", { class: "info-message padding-bottom-1" }, 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"), h("div", { class: "display-flex padding-sides-1" }, h("calcite-label", { class: "font-bold width-full" }, this._translations.addresseeLayer, h("map-layer-picker", { mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChange(evt), selectedLayers: this.addresseeLayer ? [(_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.title] : [], selectionMode: "single" }))), h("div", { class: "display-flex padding-1" }, h("calcite-button", { onClick: () => { this._setPageType(EPageType.SELECT); }, width: "full" }, this._translations.add))));
219
+ return hasSets ? (h("calcite-panel", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, this._translations.myLists)), this._getNotice(this._translations.listHasSetsTip, "padding-sides-1 padding-bottom-1"), this._getMapLayerPicker(), h("div", { class: "padding-sides-1 height-1-1-2" }, h("div", { class: "position-left" }, h("calcite-label", { alignment: "start", class: "font-bold" }, this._translations.notifications)), h("div", { class: "position-right" }, h("calcite-input-message", { active: true, class: "info-blue margin-top-0", scale: "m" }, this._translations.uniqueCout.replace("{{n}}", total.toString())))), hasSets ? this._getSelectionSetList() : (h("div", { class: "info-message" }, h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._translations.noNotifications))), h("div", { class: "display-flex padding-1" }, h("calcite-button", { onClick: () => { this._setPageType(EPageType.SELECT); }, width: "full" }, this._translations.add)), this._showModal(this._showLayerSelectionChangeModal))) : (h("calcite-panel", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, this._translations.myLists)), h("div", { class: "padding-sides-1" }, h("calcite-label", null, this._translations.notifications)), h("div", { class: "info-message padding-bottom-1" }, 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(), h("div", { class: "display-flex padding-1" }, h("calcite-button", { onClick: () => { this._setPageType(EPageType.SELECT); }, width: "full" }, this._translations.add))));
220
+ }
221
+ /**
222
+ * Create the UI element that will expose the addressee layers
223
+ *
224
+ * @returns addressee layer list node
225
+ * @protected
226
+ */
227
+ _getMapLayerPicker() {
228
+ var _a;
229
+ return (h("div", { class: "display-flex padding-sides-1" }, h("calcite-label", { class: "font-bold width-full" }, this._translations.addresseeLayer, h("map-layer-picker", { enabledLayerIds: this.addresseeLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChange(evt), selectedLayerIds: this.addresseeLayer ? [(_a = this.addresseeLayer) === null || _a === void 0 ? void 0 : _a.layer.id] : [], selectionMode: "single" }))));
205
230
  }
206
231
  /**
207
232
  * Create the selection sets list node for the List page
@@ -220,6 +245,40 @@ export class PublicNotification {
220
245
  return prev;
221
246
  }, [])));
222
247
  }
248
+ /**
249
+ * Alert the user of the potential change to the selection sets and ask if they would like to proceed.
250
+ *
251
+ * @returns the page node
252
+ * @protected
253
+ */
254
+ _showModal(open) {
255
+ return (h("calcite-modal", { "aria-labelledby": "modal-title", "background-color": "grey", color: "red", open: open, scale: "s", width: "s" }, h("div", { id: "modal-title", slot: "header" }, this._translations.shouldProceed), h("div", { slot: "content" }, this._translations.proceedInfo), h("calcite-button", { appearance: "outline", onClick: () => this._cancelLayerChange(), slot: "secondary", width: "full" }, this._translations.cancel), h("calcite-button", { onClick: () => this._handleLayerChange(), slot: "primary", width: "full" }, this._translations.proceed)));
256
+ }
257
+ /**
258
+ * Prevent the default behavior of layer selection change and close the modal.
259
+ *
260
+ * @returns the page node
261
+ * @protected
262
+ */
263
+ _cancelLayerChange() {
264
+ this._layerSelectionChangeEvt.preventDefault();
265
+ this._layerSelectionChangeEvt.stopPropagation();
266
+ this._layerSelectionChangeEvt = undefined;
267
+ this._showLayerSelectionChangeModal = false;
268
+ }
269
+ /**
270
+ * Allow the default behavior of layer selection change and close the modal.
271
+ *
272
+ * @returns the page node
273
+ * @protected
274
+ */
275
+ async _handleLayerChange() {
276
+ var _a, _b;
277
+ this._showLayerSelectionChangeModal = false;
278
+ const id = ((_b = (_a = this._layerSelectionChangeEvt) === null || _a === void 0 ? void 0 : _a.detail) === null || _b === void 0 ? void 0 : _b.length) > 0 ?
279
+ this._layerSelectionChangeEvt.detail[0] : "";
280
+ await this._updateAddresseeLayer(id);
281
+ }
223
282
  /**
224
283
  * Create the Select page that shows the selection workflows
225
284
  *
@@ -240,7 +299,8 @@ export class PublicNotification {
240
299
  this._translations.selectLayerTip;
241
300
  const noticeText = this._selectionWorkflowType === EWorkflowType.SELECT ? selectTip :
242
301
  this._selectionWorkflowType === EWorkflowType.SKETCH ? sketchTip : searchTip;
243
- return (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), h("div", { class: "padding-1" }, h("map-select-tools", { class: "font-bold", isUpdate: !!this._activeSelection, mapView: this.mapView, onSelectionSetChange: (evt) => this._updateForSelection(evt), onWorkflowTypeChange: (evt) => this._updateForWorkflowType(evt), ref: (el) => { this._selectTools = el; }, selectLayerView: this.addresseeLayer, selectionSet: this._activeSelection })), h("div", { class: "padding-sides-1 padding-bottom-1", style: { "align-items": "end", "display": "flex" } }, h("calcite-icon", { class: "info-blue padding-end-1-2", icon: "feature-layer", scale: "s" }), h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._translations.selectedAddresses.replace("{{n}}", this._numSelected.toString()).replace("{{layer}}", ((_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.title) || ""))), this._getPageNavButtons(this._translations.done, this._numSelected === 0, () => { void this._saveSelection(); }, this._translations.cancel, false, () => { void this._home(); })));
302
+ return (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), h("div", { class: "padding-1" }, h("map-select-tools", { class: "font-bold", 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 })), h("div", { class: "padding-sides-1 padding-bottom-1", style: { "align-items": "end", "display": "flex" } }, h("calcite-icon", { class: "info-blue padding-end-1-2", icon: "feature-layer", scale: "s" }), h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this.noResultText && this._numSelected === 0 ? this.noResultText :
303
+ this._translations.selectedAddresses.replace("{{n}}", this._numSelected.toString()).replace("{{layer}}", ((_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.title) || ""))), this._getPageNavButtons(this._translations.done, this._numSelected === 0, () => { void this._saveSelection(); }, this._translations.cancel, false, () => { void this._home(); })));
244
304
  }
245
305
  /**
246
306
  * Create the Refine page that users can interactively add/remove features from existing selection sets
@@ -249,7 +309,7 @@ export class PublicNotification {
249
309
  * @protected
250
310
  */
251
311
  _getRefinePage() {
252
- return (h("calcite-panel", null, this._getLabel(this._translations.refineSelection), this._getNotice(this._translations.refineTip, "padding-sides-1"), h("refine-selection", { addresseeLayer: this.addresseeLayer, mapView: this.mapView, selectionSets: this._selectionSets })));
312
+ return (h("calcite-panel", null, this._getLabel(this._translations.refineSelection), this._getNotice(this._translations.refineTip, "padding-sides-1"), h("refine-selection", { addresseeLayer: this.addresseeLayer, enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, selectionSets: this._selectionSets })));
253
313
  }
254
314
  /**
255
315
  * Create the PDF download page that shows the download options
@@ -279,8 +339,10 @@ export class PublicNotification {
279
339
  * @protected
280
340
  */
281
341
  _getDownloadPage(type) {
342
+ var _a, _b;
282
343
  const isPdf = type === EExportType.PDF;
283
- return (h("calcite-panel", null, h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.pdfDownloads : this._translations.csvDownloads), h("calcite-label", null, this._translations.notifications)), this._getSelectionLists(), h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicates = el; } }), this._translations.removeDuplicate)), h("div", { class: isPdf ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), h("div", { class: "padding-sides-1" }, h("pdf-download", { disabled: !this._downloadActive, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), h("div", { class: "padding-1 display-flex" }, h("calcite-button", { disabled: !this._downloadActive, onClick: isPdf ? () => this._downloadPDF() : () => this._downloadCSV(), width: "full" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)))));
344
+ const multiPdfOptions = ((_a = this.exportOptions) === null || _a === void 0 ? void 0 : _a.pdfOptions.enabledSizeValues.length) > 1;
345
+ return (h("calcite-panel", null, h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.pdfDownloads : this._translations.csvDownloads), h("calcite-label", null, this._translations.notifications)), this._getSelectionLists(), h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicates = el; } }), this._translations.removeDuplicate)), h("div", { class: isPdf && multiPdfOptions ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), h("div", { class: "padding-sides-1" }, h("pdf-download", { disabled: !this._downloadActive, enabledSizeValues: (_b = this.exportOptions) === null || _b === void 0 ? void 0 : _b.pdfOptions.enabledSizeValues, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), h("div", { class: "padding-1 display-flex" }, h("calcite-button", { disabled: !this._downloadActive, onClick: isPdf ? () => this._downloadPDF() : () => this._downloadCSV(), width: "full" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)))));
284
346
  }
285
347
  /**
286
348
  * Create the stacked navigation buttons for a page
@@ -371,8 +433,9 @@ export class PublicNotification {
371
433
  * @protected
372
434
  */
373
435
  _downloadCSV() {
436
+ var _a;
374
437
  const ids = utils.getSelectionIds(this._getDownloadSelectionSets());
375
- void this._downloadTools.downloadCSV(ids, this._removeDuplicates.checked);
438
+ void this._downloadTools.downloadCSV(ids, this._removeDuplicates.checked, (_a = this.exportOptions) === null || _a === void 0 ? void 0 : _a.csvOptions.addColumnTitle);
376
439
  }
377
440
  /**
378
441
  * Get all enabled selection sets
@@ -433,19 +496,39 @@ export class PublicNotification {
433
496
  this._setPageType(EPageType.LIST);
434
497
  }
435
498
  /**
436
- * Fetch the layer defined in the selection change event
499
+ * Fetch the addressee layer from the map if no selection sets exist.
500
+ * Alert the user of the potential change to the selection sets if they exist.
501
+ *
502
+ * @param evt layer selection change event
437
503
  *
438
504
  * @returns Promise when the function has completed
439
505
  * @protected
440
506
  */
441
507
  async _layerSelectionChange(evt) {
442
- var _a, _b;
443
- const title = ((_a = evt === null || evt === void 0 ? void 0 : evt.detail) === null || _a === void 0 ? void 0 : _a.length) > 0 ? evt.detail[0] : "";
444
- if (title !== ((_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.title)) {
445
- this.addresseeLayer = await getMapLayerView(this.mapView, title);
446
- await this._updateSelectionSets(this.addresseeLayer);
508
+ var _a, _b, _c;
509
+ const id = ((_a = evt === null || evt === void 0 ? void 0 : evt.detail) === null || _a === void 0 ? void 0 : _a.length) > 0 ? evt.detail[0] : "";
510
+ if (id !== ((_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.id)) {
511
+ this._showLayerSelectionChangeModal = ((_c = this.addresseeLayer) === null || _c === void 0 ? void 0 : _c.layer.id) !== undefined && this._selectionSets.length > 0;
512
+ if (this._showLayerSelectionChangeModal) {
513
+ this._layerSelectionChangeEvt = evt;
514
+ }
515
+ else {
516
+ await this._updateAddresseeLayer(id);
517
+ }
447
518
  }
448
519
  }
520
+ /**
521
+ * Fetch the new addressee layer and update the selection sets
522
+ *
523
+ * @param id the id of the layer to fetch
524
+ *
525
+ * @returns Promise when the function has completed
526
+ * @protected
527
+ */
528
+ async _updateAddresseeLayer(id) {
529
+ this.addresseeLayer = await getMapLayerView(this.mapView, id);
530
+ await this._updateSelectionSets(this.addresseeLayer);
531
+ }
449
532
  /**
450
533
  * Update selection sets when the addressee layer changes.
451
534
  * Will remove any "refine" selection set.
@@ -529,7 +612,7 @@ export class PublicNotification {
529
612
  * @protected
530
613
  */
531
614
  _gotoSelection(selSet, mapView) {
532
- void goToSelection(selSet.selectedIds, selSet.layerView, mapView);
615
+ void goToSelection(selSet.selectedIds, selSet.layerView, mapView, this.featureHighlightEnabled, this.featureEffect);
533
616
  }
534
617
  /**
535
618
  * Open the selection set for further adjustment
@@ -597,12 +680,87 @@ export class PublicNotification {
597
680
  }
598
681
  static get properties() {
599
682
  return {
600
- "addresseeLayer": {
683
+ "addresseeLayerIds": {
684
+ "type": "unknown",
685
+ "mutable": false,
686
+ "complexType": {
687
+ "original": "string[]",
688
+ "resolved": "string[]",
689
+ "references": {}
690
+ },
691
+ "required": false,
692
+ "optional": false,
693
+ "docs": {
694
+ "tags": [],
695
+ "text": "string[]: List of layer ids that should be shown as potential addressee layers"
696
+ },
697
+ "defaultValue": "[]"
698
+ },
699
+ "defaultBufferDistance": {
700
+ "type": "number",
701
+ "mutable": false,
702
+ "complexType": {
703
+ "original": "number",
704
+ "resolved": "number",
705
+ "references": {}
706
+ },
707
+ "required": false,
708
+ "optional": false,
709
+ "docs": {
710
+ "tags": [],
711
+ "text": "number: The default value to show for the buffer distance"
712
+ },
713
+ "attribute": "default-buffer-distance",
714
+ "reflect": false
715
+ },
716
+ "defaultBufferUnit": {
717
+ "type": "string",
718
+ "mutable": false,
719
+ "complexType": {
720
+ "original": "DistanceUnit",
721
+ "resolved": "\"feet\" | \"kilometers\" | \"meters\" | \"miles\"",
722
+ "references": {
723
+ "DistanceUnit": {
724
+ "location": "import",
725
+ "path": "../../utils/interfaces"
726
+ }
727
+ }
728
+ },
729
+ "required": false,
730
+ "optional": false,
731
+ "docs": {
732
+ "tags": [],
733
+ "text": "number: The default value to show for the buffer unit (\"feet\"|\"meters\"|\"miles\"|\"kilometers\")"
734
+ },
735
+ "attribute": "default-buffer-unit",
736
+ "reflect": false
737
+ },
738
+ "exportOptions": {
601
739
  "type": "unknown",
602
740
  "mutable": false,
603
741
  "complexType": {
604
- "original": "__esri.FeatureLayerView",
605
- "resolved": "FeatureLayerView",
742
+ "original": "IExportOptions",
743
+ "resolved": "IExportOptions",
744
+ "references": {
745
+ "IExportOptions": {
746
+ "location": "import",
747
+ "path": "../../utils/interfaces"
748
+ }
749
+ }
750
+ },
751
+ "required": false,
752
+ "optional": false,
753
+ "docs": {
754
+ "tags": [],
755
+ "text": "IExportOptions: Set of options that control export capabilities\r\n If not provided all export capabilities will be enabled."
756
+ }
757
+ },
758
+ "featureEffect": {
759
+ "type": "unknown",
760
+ "mutable": false,
761
+ "complexType": {
762
+ "original": "__esri.FeatureEffect",
763
+ "resolved": "FeatureEffect",
606
764
  "references": {
607
765
  "___esri": {
608
766
  "location": "global"
@@ -613,9 +771,26 @@ export class PublicNotification {
613
771
  "optional": false,
614
772
  "docs": {
615
773
  "tags": [],
616
- "text": "esri/views/layers/FeatureLayerView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html"
774
+ "text": "The effect that will be applied when featureHighlightEnabled is true\r\n\r\nesri/layers/support/FeatureEffect: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureEffect.html"
617
775
  }
618
776
  },
777
+ "featureHighlightEnabled": {
778
+ "type": "boolean",
779
+ "mutable": false,
780
+ "complexType": {
781
+ "original": "boolean",
782
+ "resolved": "boolean",
783
+ "references": {}
784
+ },
785
+ "required": false,
786
+ "optional": false,
787
+ "docs": {
788
+ "tags": [],
789
+ "text": "boolean: When enabled features will be highlighted when their notification list item is clicked."
790
+ },
791
+ "attribute": "feature-highlight-enabled",
792
+ "reflect": false
793
+ },
619
794
  "mapView": {
620
795
  "type": "unknown",
621
796
  "mutable": false,
@@ -635,6 +810,59 @@ export class PublicNotification {
635
810
  "text": "esri/views/View: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html"
636
811
  }
637
812
  },
813
+ "noResultText": {
814
+ "type": "string",
815
+ "mutable": false,
816
+ "complexType": {
817
+ "original": "string",
818
+ "resolved": "string",
819
+ "references": {}
820
+ },
821
+ "required": false,
822
+ "optional": false,
823
+ "docs": {
824
+ "tags": [],
825
+ "text": "string: The value to show for no results\r\nwhen left empty the default text \"0 selected features from {layerTitle}\" will be shown"
826
+ },
827
+ "attribute": "no-result-text",
828
+ "reflect": false
829
+ },
830
+ "searchConfiguration": {
831
+ "type": "unknown",
832
+ "mutable": false,
833
+ "complexType": {
834
+ "original": "ISearchConfiguration",
835
+ "resolved": "ISearchConfiguration",
836
+ "references": {
837
+ "ISearchConfiguration": {
838
+ "location": "import",
839
+ "path": "../../utils/interfaces"
840
+ }
841
+ }
842
+ },
843
+ "required": false,
844
+ "optional": false,
845
+ "docs": {
846
+ "tags": [],
847
+ "text": "ISearchConfiguration: Configuration details for the Search widget"
848
+ }
849
+ },
850
+ "selectionLayerIds": {
851
+ "type": "unknown",
852
+ "mutable": false,
853
+ "complexType": {
854
+ "original": "string[]",
855
+ "resolved": "string[]",
856
+ "references": {}
857
+ },
858
+ "required": false,
859
+ "optional": false,
860
+ "docs": {
861
+ "tags": [],
862
+ "text": "string[]: List of layer ids that should be shown as potential selection layers\r\nwhen skectching with \"Use layer features\" option"
863
+ },
864
+ "defaultValue": "[]"
865
+ },
638
866
  "showRefineSelection": {
639
867
  "type": "boolean",
640
868
  "mutable": false,
@@ -652,11 +880,30 @@ export class PublicNotification {
652
880
  "attribute": "show-refine-selection",
653
881
  "reflect": false,
654
882
  "defaultValue": "false"
883
+ },
884
+ "showSearchSettings": {
885
+ "type": "boolean",
886
+ "mutable": false,
887
+ "complexType": {
888
+ "original": "boolean",
889
+ "resolved": "boolean",
890
+ "references": {}
891
+ },
892
+ "required": false,
893
+ "optional": false,
894
+ "docs": {
895
+ "tags": [],
896
+ "text": "boolean: When false no buffer distance or unit controls will be exposed"
897
+ },
898
+ "attribute": "show-search-settings",
899
+ "reflect": false,
900
+ "defaultValue": "true"
655
901
  }
656
902
  };
657
903
  }
658
904
  static get states() {
659
905
  return {
906
+ "addresseeLayer": {},
660
907
  "_downloadActive": {},
661
908
  "_numSelected": {},
662
909
  "_pageType": {},
@@ -664,6 +911,7 @@ export class PublicNotification {
664
911
  "_selectionSets": {},
665
912
  "_sketchType": {},
666
913
  "_selectionWorkflowType": {},
914
+ "_showLayerSelectionChangeModal": {},
667
915
  "_translations": {}
668
916
  };
669
917
  }