@esri/solutions-components 0.5.10 → 0.5.12

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.
@@ -1126,7 +1126,7 @@ const Slider = class {
1126
1126
  };
1127
1127
  Slider.style = sliderCss;
1128
1128
 
1129
- const mapDrawToolsCss = ":host{display:block}.border{outline:1px solid var(--calcite-ui-border-input)}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir=\"rtl\"] .main-label{display:flex;float:right}.margin-top-1{margin-top:1rem}.border-left{border-left:1px solid rgba(110,110,110,.3)}.border-left[dir=\"rtl\"]{border-right:1px solid rgba(110,110,110,.3)}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:\"Avenir Next\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:#fff;--esri-widget-padding-v:12px;--esri-widget-padding-h:15px;--esri-widget-padding:var(--esri-widget-padding-v) var(--esri-widget-padding-h)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row wrap;padding:0}.esri-sketch__section{align-items:center;display:flex;flex-flow:row wrap;padding:0 7px;margin:6px 0}.esri-sketch__section.esri-sketch__info-section>calcite-action:first-of-type{display:none}";
1129
+ const mapDrawToolsCss = ":host{display:block}.border{outline:1px solid var(--calcite-ui-border-input)}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir=\"rtl\"] .main-label{display:flex;float:right}.margin-top-1{margin-top:1rem}.border-left{border-left:1px solid rgba(110,110,110,.3)}.border-left[dir=\"rtl\"]{border-right:1px solid rgba(110,110,110,.3)}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:\"Avenir Next\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:#fff;--esri-widget-padding-v:12px;--esri-widget-padding-h:15px;--esri-widget-padding:var(--esri-widget-padding-v) var(--esri-widget-padding-h)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row wrap;padding:0}.esri-sketch__section{align-items:center;display:flex;flex-flow:row wrap;padding:0 7px;margin:6px 0}";
1130
1130
 
1131
1131
  const MapDrawTools = class {
1132
1132
  constructor(hostRef) {
@@ -1213,6 +1213,17 @@ const MapDrawTools = class {
1213
1213
  componentDidLoad() {
1214
1214
  this._init();
1215
1215
  }
1216
+ /**
1217
+ * StencilJS: Called every time the component is disconnected from the DOM
1218
+ *
1219
+ * @returns void
1220
+ */
1221
+ disconnectedCallback() {
1222
+ // cancel any existing create operations
1223
+ this._sketchWidget.cancel();
1224
+ // clear any current temp sketch
1225
+ this._clearSketch();
1226
+ }
1216
1227
  /**
1217
1228
  * Renders the component.
1218
1229
  */
@@ -1298,6 +1309,7 @@ const MapDrawTools = class {
1298
1309
  }
1299
1310
  };
1300
1311
  this._sketchWidget = new this.Sketch(Object.assign(Object.assign({}, sketchOptions), { container: this._sketchElement, creationMode: "single", visibleElements: {
1312
+ duplicateButton: false,
1301
1313
  selectionTools: {
1302
1314
  "lasso-selection": false,
1303
1315
  "rectangle-selection": false
@@ -1306,11 +1318,13 @@ const MapDrawTools = class {
1306
1318
  },
1307
1319
  undoRedoMenu: false,
1308
1320
  settingsMenu: this.drawMode === interfaces.EDrawMode.SKETCH
1309
- } }));
1321
+ } // temp workaround since we need duplicateButton flag that is not in 4.26 types but will be in the 4.27 modules we get from IA
1322
+ }));
1310
1323
  this._sketchViewModel = new this.SketchViewModel(Object.assign({}, sketchOptions));
1311
1324
  this._sketchWidget.viewModel.polylineSymbol = this.polylineSymbol;
1312
1325
  this._sketchWidget.viewModel.pointSymbol = this.pointSymbol;
1313
1326
  this._sketchWidget.viewModel.polygonSymbol = this.polygonSymbol;
1327
+ let forceCreate = false;
1314
1328
  this._sketchWidget.on("create", (evt) => {
1315
1329
  if (evt.state === "complete") {
1316
1330
  this.graphics = [evt.graphic];
@@ -1318,6 +1332,16 @@ const MapDrawTools = class {
1318
1332
  graphics: this.graphics,
1319
1333
  useOIDs: false
1320
1334
  });
1335
+ if (this.drawMode === interfaces.EDrawMode.REFINE) {
1336
+ // calling create during complete will force the cancel event
1337
+ // https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#event-create
1338
+ forceCreate = true;
1339
+ this._sketchWidget.viewModel.create(evt.tool);
1340
+ }
1341
+ }
1342
+ if (evt.state === "cancel" && this.drawMode === interfaces.EDrawMode.REFINE && forceCreate) {
1343
+ forceCreate = !forceCreate;
1344
+ this._sketchWidget.viewModel.create(evt.tool);
1321
1345
  }
1322
1346
  });
1323
1347
  this._sketchWidget.on("update", (evt) => {
@@ -17,12 +17,16 @@ const downloadUtils = require('./downloadUtils-7a0fd3c0.js');
17
17
  require('./index-e1b1954f.js');
18
18
  require('./_commonjsHelpers-384729db.js');
19
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-2{width:50%}.w-1-3{width:33.33%}.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}.padding-bottom-1-2{padding-bottom:.5rem}.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}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-start-1-2{-webkit-padding-start:0.5rem;padding-inline-start: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)}.position-right{position:absolute;right:1rem}.position-right[dir=\"rtl\"]{position:absolute;left:1rem}.label-margin-0{--calcite-label-margin-bottom:0}.list-label{color:var(--calcite-ui-text-1)}.list-label,.list-description{font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.list-description{-webkit-margin-before:0.125rem;margin-block-start:0.125rem;color:var(--calcite-ui-text-3)}";
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-2{width:50%}.w-1-3{width:33.33%}.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}.padding-bottom-1-2{padding-bottom:.5rem}.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}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-start-1-2{-webkit-padding-start:0.5rem;padding-inline-start: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)}.position-right{position:absolute;right:1rem}.position-right[dir=\"rtl\"]{position:absolute;left:1rem}.label-margin-0{--calcite-label-margin-bottom:0}.list-label{color:var(--calcite-ui-text-1)}.list-label,.list-description{font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.list-description{-webkit-margin-before:0.125rem;margin-block-start:0.125rem;color:var(--calcite-ui-text-3)}.img-container{width:100%;height:100%}";
21
21
 
22
22
  const PublicNotification = class {
23
23
  constructor(hostRef) {
24
24
  index.registerInstance(this, hostRef);
25
25
  this.searchConfigurationChange = index.createEvent(this, "searchConfigurationChange", 7);
26
+ /**
27
+ * string: The url to the onboarding image
28
+ */
29
+ this._onboardingImageUrl = "";
26
30
  /**
27
31
  * number: The number of selected features
28
32
  */
@@ -145,6 +149,7 @@ const PublicNotification = class {
145
149
  await this._getTranslations();
146
150
  await this._initModules();
147
151
  this._initSymbols();
152
+ this._onboardingImageUrl = index.getAssetPath(`../assets/data/images/onboarding.png`);
148
153
  }
149
154
  /**
150
155
  * Renders the component.
@@ -303,7 +308,16 @@ const PublicNotification = class {
303
308
  */
304
309
  _getListPage() {
305
310
  const hasSets = this._hasSelections();
306
- return (index.h("calcite-panel", null, this._getLabel(this._translations.myLists), this._getNotice(hasSets ? this._translations.listHasSetsTip : this._translations.selectLayerAndAdd, "padding-sides-1 padding-bottom-1"), hasSets ? this._getSelectionSetList() : (null), index.h("div", { class: "display-flex padding-1" }, index.h("calcite-button", { onClick: () => { this._setPageType(interfaces.EPageType.SELECT); }, width: "full" }, this._translations.add))));
311
+ return (index.h("calcite-panel", null, this._getLabel(this._translations.myLists), this._getNotice(hasSets ? this._translations.listHasSetsTip : this._translations.selectLayerAndAdd, "padding-sides-1 padding-bottom-1"), hasSets ? this._getSelectionSetList() : (this._getOnboardingImage()), index.h("div", { class: "display-flex padding-1" }, index.h("calcite-button", { onClick: () => { this._setPageType(interfaces.EPageType.SELECT); }, width: "full" }, this._translations.add))));
312
+ }
313
+ /**
314
+ * Display an image to help illustrate the basic workflow of the widget
315
+ *
316
+ * @returns the image node to display
317
+ * @protected
318
+ */
319
+ _getOnboardingImage() {
320
+ return (index.h("div", { class: "display-flex padding-sides-1" }, index.h("img", { class: "img-container", src: this._onboardingImageUrl })));
307
321
  }
308
322
  /**
309
323
  * Create the selection sets list node for the List page
@@ -392,7 +406,9 @@ const PublicNotification = class {
392
406
  // REFINE will only ever be 1 ISelectionSet
393
407
  Object.keys(cur.refineInfos).forEach(k => {
394
408
  const refineIds = cur.refineInfos[k];
395
- this._updateIds(k, refineIds.layerView, refineIds.addIds, prev);
409
+ if (refineIds.addIds.length > 0) {
410
+ this._updateIds(k, refineIds.layerView, refineIds.addIds, prev);
411
+ }
396
412
  });
397
413
  }
398
414
  }
@@ -83,7 +83,3 @@ html[dir="rtl"] .main-label {
83
83
  padding: 0 7px;
84
84
  margin: 6px 0;
85
85
  }
86
-
87
- .esri-sketch__section.esri-sketch__info-section>calcite-action:first-of-type {
88
- display: none;
89
- }
@@ -103,6 +103,17 @@ export class MapDrawTools {
103
103
  componentDidLoad() {
104
104
  this._init();
105
105
  }
106
+ /**
107
+ * StencilJS: Called every time the component is disconnected from the DOM
108
+ *
109
+ * @returns void
110
+ */
111
+ disconnectedCallback() {
112
+ // cancel any existing create operations
113
+ this._sketchWidget.cancel();
114
+ // clear any current temp sketch
115
+ this._clearSketch();
116
+ }
106
117
  /**
107
118
  * Renders the component.
108
119
  */
@@ -188,6 +199,7 @@ export class MapDrawTools {
188
199
  }
189
200
  };
190
201
  this._sketchWidget = new this.Sketch(Object.assign(Object.assign({}, sketchOptions), { container: this._sketchElement, creationMode: "single", visibleElements: {
202
+ duplicateButton: false,
191
203
  selectionTools: {
192
204
  "lasso-selection": false,
193
205
  "rectangle-selection": false
@@ -196,11 +208,13 @@ export class MapDrawTools {
196
208
  },
197
209
  undoRedoMenu: false,
198
210
  settingsMenu: this.drawMode === EDrawMode.SKETCH
199
- } }));
211
+ } // temp workaround since we need duplicateButton flag that is not in 4.26 types but will be in the 4.27 modules we get from IA
212
+ }));
200
213
  this._sketchViewModel = new this.SketchViewModel(Object.assign({}, sketchOptions));
201
214
  this._sketchWidget.viewModel.polylineSymbol = this.polylineSymbol;
202
215
  this._sketchWidget.viewModel.pointSymbol = this.pointSymbol;
203
216
  this._sketchWidget.viewModel.polygonSymbol = this.polygonSymbol;
217
+ let forceCreate = false;
204
218
  this._sketchWidget.on("create", (evt) => {
205
219
  if (evt.state === "complete") {
206
220
  this.graphics = [evt.graphic];
@@ -208,6 +222,16 @@ export class MapDrawTools {
208
222
  graphics: this.graphics,
209
223
  useOIDs: false
210
224
  });
225
+ if (this.drawMode === EDrawMode.REFINE) {
226
+ // calling create during complete will force the cancel event
227
+ // https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#event-create
228
+ forceCreate = true;
229
+ this._sketchWidget.viewModel.create(evt.tool);
230
+ }
231
+ }
232
+ if (evt.state === "cancel" && this.drawMode === EDrawMode.REFINE && forceCreate) {
233
+ forceCreate = !forceCreate;
234
+ this._sketchWidget.viewModel.create(evt.tool);
211
235
  }
212
236
  });
213
237
  this._sketchWidget.on("update", (evt) => {
@@ -14,206 +14,211 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- :host {
18
- display: block;
19
- --calcite-input-message-spacing-value: 0;
20
- }
21
-
22
- .align-center {
23
- align-items: center;
24
- }
25
-
26
- .border-bottom-1 {
27
- border-width: 0px;
28
- border-bottom-width: 1px;
29
- border-style: solid;
30
- border-color: var(--calcite-ui-border-3);
31
- }
32
-
33
- .action-bar-size {
34
- height: 3.5rem;
35
- width: 100%;
36
- }
37
-
38
- .w-1-2 {
39
- width: 50%;
40
- }
41
-
42
- .w-1-3 {
43
- width: 33.33%;
44
- }
45
-
46
- .action-center {
47
- -webkit-box-align: center;
48
- -webkit-align-items: center;
49
- -ms-grid-row-align: center;
50
- align-items: center;
51
- align-content: center;
52
- justify-content: center;
53
- }
54
-
55
- .width-full {
56
- width: 100%;
57
- }
58
-
59
- .height-full {
60
- height: 100%;
61
- }
62
-
63
- .padding-1 {
64
- padding: 1rem;
65
- }
66
-
67
- .padding-top-sides-1 {
68
- -webkit-padding-before: 1rem;
69
- padding-block-start: 1rem;
70
- -webkit-padding-start: 1rem;
71
- padding-inline-start: 1rem;
72
- -webkit-padding-end: 1rem;
73
- padding-inline-end: 1rem;
74
- }
75
-
76
- .padding-sides-1 {
77
- -webkit-padding-start: 1rem;
78
- padding-inline-start: 1rem;
79
- -webkit-padding-end: 1rem;
80
- padding-inline-end: 1rem;
81
- }
82
-
83
- .padding-end-1-2 {
84
- -webkit-padding-end: .5rem;
85
- padding-inline-end: .5rem;
86
- }
87
-
88
- .padding-top-1-2 {
89
- -webkit-padding-before: .5rem;
90
- padding-block-start: .5rem;
91
- }
92
-
93
- .padding-top-1 {
94
- padding-top: 1rem;
95
- }
96
-
97
- .padding-bottom-1 {
98
- padding-bottom: 1rem;
99
- }
100
-
101
- .padding-bottom-1-2 {
102
- padding-bottom: .5rem;
103
- }
104
-
105
- .info-blue {
106
- /* This would be better but not the right color in light theme */
107
- /* color: var(--calcite-ui-info); */
108
-
109
- /* This is --calcite-ui-info value for dark theme*/
110
- color: #00A0FF;
111
- }
112
-
113
- .info-message {
114
- justify-content: center;
115
- display: grid;
116
- }
117
-
118
- .font-bold {
119
- font-weight: bold;
120
- }
121
-
122
- .display-flex {
123
- display: flex;
124
- }
125
-
126
- .display-block {
127
- display: block;
128
- }
129
-
130
- .display-none {
131
- display: none;
132
- }
133
-
134
- .border-bottom {
135
- border-bottom: 1px solid var(--calcite-ui-border-2);
136
- }
137
-
138
- .padding-start-1-2 {
139
- -webkit-padding-start: 0.5rem;
140
- padding-inline-start: 0.5rem;
141
- }
142
-
143
- .list-border {
144
- border: 1px solid var(--calcite-ui-border-2);
145
- }
146
-
147
- .margin-sides-1 {
148
- -webkit-margin-start: 1rem;
149
- margin-inline-start: 1rem;
150
- -webkit-margin-end: 1rem;
151
- margin-inline-end: 1rem;
152
- }
153
-
154
- .margin-start-1-2 {
155
- -webkit-margin-start: 0.5rem;
156
- margin-inline-start: 0.5rem;
157
- }
158
-
159
- .float-right {
160
- float: right;
161
- }
162
-
163
- .float-right[dir="rtl"] {
164
- float: left;
165
- }
166
-
167
- .float-left {
168
- float: left;
169
- }
170
-
171
- .float-left[dir="rtl"] {
172
- float: right;
173
- }
174
-
175
- .margin-top-0 {
176
- -webkit-margin-before: 0 !important;
177
- margin-block-start: 0 !important;
178
- }
179
-
180
- .height-1-1-2 {
181
- height: 1.5rem;
182
- }
183
-
184
- .main-background {
185
- background-color: var(--calcite-ui-foreground-2);
186
- }
187
-
188
- .position-right {
189
- position: absolute;
190
- right: 1rem;
191
- }
192
-
193
- .position-right[dir="rtl"] {
194
- position: absolute;
195
- left: 1rem;
196
- }
197
-
198
- .label-margin-0 {
199
- --calcite-label-margin-bottom: 0;
200
- }
201
-
202
- .list-label {
203
- color: var(--calcite-ui-text-1);
204
- }
205
-
206
- .list-label,
207
- .list-description {
208
- font-family: var(--calcite-sans-family);
209
- font-size: var(--calcite-font-size--2);
210
- font-weight: var(--calcite-font-weight-normal);
211
- overflow-wrap: break-word;
212
- word-break: break-word;
213
- }
214
-
215
- .list-description {
216
- -webkit-margin-before: 0.125rem;
217
- margin-block-start: 0.125rem;
218
- color: var(--calcite-ui-text-3);
219
- }
17
+ :host {
18
+ display: block;
19
+ --calcite-input-message-spacing-value: 0;
20
+ }
21
+
22
+ .align-center {
23
+ align-items: center;
24
+ }
25
+
26
+ .border-bottom-1 {
27
+ border-width: 0px;
28
+ border-bottom-width: 1px;
29
+ border-style: solid;
30
+ border-color: var(--calcite-ui-border-3);
31
+ }
32
+
33
+ .action-bar-size {
34
+ height: 3.5rem;
35
+ width: 100%;
36
+ }
37
+
38
+ .w-1-2 {
39
+ width: 50%;
40
+ }
41
+
42
+ .w-1-3 {
43
+ width: 33.33%;
44
+ }
45
+
46
+ .action-center {
47
+ -webkit-box-align: center;
48
+ -webkit-align-items: center;
49
+ -ms-grid-row-align: center;
50
+ align-items: center;
51
+ align-content: center;
52
+ justify-content: center;
53
+ }
54
+
55
+ .width-full {
56
+ width: 100%;
57
+ }
58
+
59
+ .height-full {
60
+ height: 100%;
61
+ }
62
+
63
+ .padding-1 {
64
+ padding: 1rem;
65
+ }
66
+
67
+ .padding-top-sides-1 {
68
+ -webkit-padding-before: 1rem;
69
+ padding-block-start: 1rem;
70
+ -webkit-padding-start: 1rem;
71
+ padding-inline-start: 1rem;
72
+ -webkit-padding-end: 1rem;
73
+ padding-inline-end: 1rem;
74
+ }
75
+
76
+ .padding-sides-1 {
77
+ -webkit-padding-start: 1rem;
78
+ padding-inline-start: 1rem;
79
+ -webkit-padding-end: 1rem;
80
+ padding-inline-end: 1rem;
81
+ }
82
+
83
+ .padding-end-1-2 {
84
+ -webkit-padding-end: .5rem;
85
+ padding-inline-end: .5rem;
86
+ }
87
+
88
+ .padding-top-1-2 {
89
+ -webkit-padding-before: .5rem;
90
+ padding-block-start: .5rem;
91
+ }
92
+
93
+ .padding-top-1 {
94
+ padding-top: 1rem;
95
+ }
96
+
97
+ .padding-bottom-1 {
98
+ padding-bottom: 1rem;
99
+ }
100
+
101
+ .padding-bottom-1-2 {
102
+ padding-bottom: .5rem;
103
+ }
104
+
105
+ .info-blue {
106
+ /* This would be better but not the right color in light theme */
107
+ /* color: var(--calcite-ui-info); */
108
+
109
+ /* This is --calcite-ui-info value for dark theme*/
110
+ color: #00A0FF;
111
+ }
112
+
113
+ .info-message {
114
+ justify-content: center;
115
+ display: grid;
116
+ }
117
+
118
+ .font-bold {
119
+ font-weight: bold;
120
+ }
121
+
122
+ .display-flex {
123
+ display: flex;
124
+ }
125
+
126
+ .display-block {
127
+ display: block;
128
+ }
129
+
130
+ .display-none {
131
+ display: none;
132
+ }
133
+
134
+ .border-bottom {
135
+ border-bottom: 1px solid var(--calcite-ui-border-2);
136
+ }
137
+
138
+ .padding-start-1-2 {
139
+ -webkit-padding-start: 0.5rem;
140
+ padding-inline-start: 0.5rem;
141
+ }
142
+
143
+ .list-border {
144
+ border: 1px solid var(--calcite-ui-border-2);
145
+ }
146
+
147
+ .margin-sides-1 {
148
+ -webkit-margin-start: 1rem;
149
+ margin-inline-start: 1rem;
150
+ -webkit-margin-end: 1rem;
151
+ margin-inline-end: 1rem;
152
+ }
153
+
154
+ .margin-start-1-2 {
155
+ -webkit-margin-start: 0.5rem;
156
+ margin-inline-start: 0.5rem;
157
+ }
158
+
159
+ .float-right {
160
+ float: right;
161
+ }
162
+
163
+ .float-right[dir="rtl"] {
164
+ float: left;
165
+ }
166
+
167
+ .float-left {
168
+ float: left;
169
+ }
170
+
171
+ .float-left[dir="rtl"] {
172
+ float: right;
173
+ }
174
+
175
+ .margin-top-0 {
176
+ -webkit-margin-before: 0 !important;
177
+ margin-block-start: 0 !important;
178
+ }
179
+
180
+ .height-1-1-2 {
181
+ height: 1.5rem;
182
+ }
183
+
184
+ .main-background {
185
+ background-color: var(--calcite-ui-foreground-2);
186
+ }
187
+
188
+ .position-right {
189
+ position: absolute;
190
+ right: 1rem;
191
+ }
192
+
193
+ .position-right[dir="rtl"] {
194
+ position: absolute;
195
+ left: 1rem;
196
+ }
197
+
198
+ .label-margin-0 {
199
+ --calcite-label-margin-bottom: 0;
200
+ }
201
+
202
+ .list-label {
203
+ color: var(--calcite-ui-text-1);
204
+ }
205
+
206
+ .list-label,
207
+ .list-description {
208
+ font-family: var(--calcite-sans-family);
209
+ font-size: var(--calcite-font-size--2);
210
+ font-weight: var(--calcite-font-weight-normal);
211
+ overflow-wrap: break-word;
212
+ word-break: break-word;
213
+ }
214
+
215
+ .list-description {
216
+ -webkit-margin-before: 0.125rem;
217
+ margin-block-start: 0.125rem;
218
+ color: var(--calcite-ui-text-3);
219
+ }
220
+
221
+ .img-container {
222
+ width: 100%;
223
+ height: 100%;
224
+ }
@@ -25,8 +25,13 @@ import { goToSelection, highlightFeatures } from "../../utils/mapViewUtils";
25
25
  import state from "../../utils/publicNotificationStore";
26
26
  import { getLocaleComponentStrings } from "../../utils/locale";
27
27
  import { consolidateLabels, removeDuplicateLabels } from "../../utils/downloadUtils";
28
+ import { getAssetPath } from "@stencil/core";
28
29
  export class PublicNotification {
29
30
  constructor() {
31
+ /**
32
+ * string: The url to the onboarding image
33
+ */
34
+ this._onboardingImageUrl = "";
30
35
  /**
31
36
  * number: The number of selected features
32
37
  */
@@ -149,6 +154,7 @@ export class PublicNotification {
149
154
  await this._getTranslations();
150
155
  await this._initModules();
151
156
  this._initSymbols();
157
+ this._onboardingImageUrl = getAssetPath(`../assets/data/images/onboarding.png`);
152
158
  }
153
159
  /**
154
160
  * Renders the component.
@@ -307,7 +313,16 @@ export class PublicNotification {
307
313
  */
308
314
  _getListPage() {
309
315
  const hasSets = this._hasSelections();
310
- return (h("calcite-panel", null, this._getLabel(this._translations.myLists), this._getNotice(hasSets ? this._translations.listHasSetsTip : this._translations.selectLayerAndAdd, "padding-sides-1 padding-bottom-1"), hasSets ? this._getSelectionSetList() : (null), h("div", { class: "display-flex padding-1" }, h("calcite-button", { onClick: () => { this._setPageType(EPageType.SELECT); }, width: "full" }, this._translations.add))));
316
+ return (h("calcite-panel", null, this._getLabel(this._translations.myLists), this._getNotice(hasSets ? this._translations.listHasSetsTip : this._translations.selectLayerAndAdd, "padding-sides-1 padding-bottom-1"), hasSets ? this._getSelectionSetList() : (this._getOnboardingImage()), h("div", { class: "display-flex padding-1" }, h("calcite-button", { onClick: () => { this._setPageType(EPageType.SELECT); }, width: "full" }, this._translations.add))));
317
+ }
318
+ /**
319
+ * Display an image to help illustrate the basic workflow of the widget
320
+ *
321
+ * @returns the image node to display
322
+ * @protected
323
+ */
324
+ _getOnboardingImage() {
325
+ return (h("div", { class: "display-flex padding-sides-1" }, h("img", { class: "img-container", src: this._onboardingImageUrl })));
311
326
  }
312
327
  /**
313
328
  * Create the selection sets list node for the List page
@@ -396,7 +411,9 @@ export class PublicNotification {
396
411
  // REFINE will only ever be 1 ISelectionSet
397
412
  Object.keys(cur.refineInfos).forEach(k => {
398
413
  const refineIds = cur.refineInfos[k];
399
- this._updateIds(k, refineIds.layerView, refineIds.addIds, prev);
414
+ if (refineIds.addIds.length > 0) {
415
+ this._updateIds(k, refineIds.layerView, refineIds.addIds, prev);
416
+ }
400
417
  });
401
418
  }
402
419
  }