@esri/solutions-components 0.8.0 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/buffer-tools_3.cjs.entry.js +3 -3
- package/dist/cjs/consent-manager.cjs.entry.js +11 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +31 -20
- package/dist/cjs/public-notification.cjs.entry.js +24 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/consent-manager/consent-manager.js +13 -4
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +3 -3
- package/dist/collection/components/map-select-tools/map-select-tools.js +33 -20
- package/dist/collection/components/public-notification/public-notification.js +24 -1
- package/dist/components/consent-manager.js +11 -1
- package/dist/components/map-draw-tools2.js +3 -3
- package/dist/components/map-select-tools2.js +32 -20
- package/dist/components/public-notification.js +24 -1
- package/dist/esm/buffer-tools_3.entry.js +3 -3
- package/dist/esm/consent-manager.entry.js +11 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +31 -20
- package/dist/esm/public-notification.entry.js +24 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/p-0f427774.entry.js +6 -0
- package/dist/solutions-components/{p-0e5274bd.entry.js → p-131bcc7f.entry.js} +1 -1
- package/dist/solutions-components/p-52b37bad.entry.js +6 -0
- package/dist/solutions-components/{p-35c9256b.entry.js → p-955647ea.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/consent-manager/consent-manager.d.ts +6 -0
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +5 -1
- package/dist/types/components/public-notification/public-notification.d.ts +12 -0
- package/dist/types/components.d.ts +1 -1
- package/package.json +1 -1
- package/dist/solutions-components/p-41bc9e9d.entry.js +0 -6
- package/dist/solutions-components/p-df29f4c2.entry.js +0 -6
@@ -86,6 +86,14 @@ const MapSelectTools = class {
|
|
86
86
|
}
|
87
87
|
}
|
88
88
|
}
|
89
|
+
/**
|
90
|
+
* Called each time the mapView prop is changed.
|
91
|
+
*/
|
92
|
+
async mapViewWatchHandler(v, oldV) {
|
93
|
+
if (v && v !== oldV) {
|
94
|
+
await this._init();
|
95
|
+
}
|
96
|
+
}
|
89
97
|
/**
|
90
98
|
* Called each time the searchConfiguration prop is changed.
|
91
99
|
*
|
@@ -93,7 +101,7 @@ const MapSelectTools = class {
|
|
93
101
|
*/
|
94
102
|
async watchSearchConfigurationHandler(newValue, oldValue) {
|
95
103
|
if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
|
96
|
-
this._initSearchWidget();
|
104
|
+
await this._initSearchWidget();
|
97
105
|
}
|
98
106
|
}
|
99
107
|
//--------------------------------------------------------------------------
|
@@ -177,12 +185,6 @@ const MapSelectTools = class {
|
|
177
185
|
*/
|
178
186
|
async componentDidLoad() {
|
179
187
|
await this._init();
|
180
|
-
await this._searchWidget.when(() => {
|
181
|
-
var _a;
|
182
|
-
this._searchWidget.allPlaceholder = ((_a = this.searchConfiguration) === null || _a === void 0 ? void 0 : _a.allPlaceholder) &&
|
183
|
-
this.searchConfiguration.allPlaceholder.toLowerCase() !== "find address or place" ?
|
184
|
-
this.searchConfiguration.allPlaceholder : this._translations.placeholder;
|
185
|
-
});
|
186
188
|
}
|
187
189
|
/**
|
188
190
|
* Renders the component.
|
@@ -269,7 +271,7 @@ const MapSelectTools = class {
|
|
269
271
|
async _init() {
|
270
272
|
this._initGraphicsLayer();
|
271
273
|
await this._initSelectionSet();
|
272
|
-
this._initSearchWidget();
|
274
|
+
await this._initSearchWidget();
|
273
275
|
}
|
274
276
|
/**
|
275
277
|
* Initialize the state of the component with any stored values in a selection set
|
@@ -315,7 +317,7 @@ const MapSelectTools = class {
|
|
315
317
|
*
|
316
318
|
* @protected
|
317
319
|
*/
|
318
|
-
_initSearchWidget() {
|
320
|
+
async _initSearchWidget() {
|
319
321
|
if (this.mapView && this._searchElement) {
|
320
322
|
const searchConfiguration = this._getSearchConfig(this.searchConfiguration, this.mapView);
|
321
323
|
const searchOptions = Object.assign({ view: this.mapView, container: this._searchElement, searchTerm: this._searchTerm }, searchConfiguration);
|
@@ -344,6 +346,12 @@ const MapSelectTools = class {
|
|
344
346
|
void this._clearResults(false, clearLabel);
|
345
347
|
}
|
346
348
|
});
|
349
|
+
await this._searchWidget.when(() => {
|
350
|
+
var _a;
|
351
|
+
this._searchWidget.allPlaceholder = ((_a = this.searchConfiguration) === null || _a === void 0 ? void 0 : _a.allPlaceholder) &&
|
352
|
+
this.searchConfiguration.allPlaceholder.toLowerCase() !== "find address or place" ?
|
353
|
+
this.searchConfiguration.allPlaceholder : this._translations.placeholder;
|
354
|
+
});
|
347
355
|
}
|
348
356
|
}
|
349
357
|
/**
|
@@ -411,19 +419,21 @@ const MapSelectTools = class {
|
|
411
419
|
*/
|
412
420
|
_initGraphicsLayer() {
|
413
421
|
const title = this._translations.bufferLayer;
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
else {
|
419
|
-
this._bufferGraphicsLayer = new this.GraphicsLayer({ title, listMode: "hide" });
|
420
|
-
publicNotificationStore.state.managedLayers.push(title);
|
421
|
-
const sketchIndex = this.mapView.map.layers.findIndex((l) => l.title === this._translations.sketchLayer);
|
422
|
-
if (sketchIndex > -1) {
|
423
|
-
this.mapView.map.layers.add(this._bufferGraphicsLayer, sketchIndex);
|
422
|
+
if (this.mapView) {
|
423
|
+
const bufferIndex = this.mapView.map.layers.findIndex((l) => l.title === title);
|
424
|
+
if (bufferIndex > -1) {
|
425
|
+
this._bufferGraphicsLayer = this.mapView.map.layers.getItemAt(bufferIndex);
|
424
426
|
}
|
425
427
|
else {
|
426
|
-
this.
|
428
|
+
this._bufferGraphicsLayer = new this.GraphicsLayer({ title, listMode: "hide" });
|
429
|
+
publicNotificationStore.state.managedLayers.push(title);
|
430
|
+
const sketchIndex = this.mapView.map.layers.findIndex((l) => l.title === this._translations.sketchLayer);
|
431
|
+
if (sketchIndex > -1) {
|
432
|
+
this.mapView.map.layers.add(this._bufferGraphicsLayer, sketchIndex);
|
433
|
+
}
|
434
|
+
else {
|
435
|
+
this.mapView.map.layers.add(this._bufferGraphicsLayer);
|
436
|
+
}
|
427
437
|
}
|
428
438
|
}
|
429
439
|
}
|
@@ -781,6 +791,7 @@ const MapSelectTools = class {
|
|
781
791
|
get el() { return index.getElement(this); }
|
782
792
|
static get watchers() { return {
|
783
793
|
"geometries": ["watchGeometriesHandler"],
|
794
|
+
"mapView": ["mapViewWatchHandler"],
|
784
795
|
"searchConfiguration": ["watchSearchConfigurationHandler"]
|
785
796
|
}; }
|
786
797
|
};
|
@@ -82,6 +82,7 @@ const PublicNotification = class {
|
|
82
82
|
if (v === null || v === void 0 ? void 0 : v.popup) {
|
83
83
|
this._popupsEnabled = v === null || v === void 0 ? void 0 : v.popup.autoOpenEnabled;
|
84
84
|
}
|
85
|
+
this._initSearchConfiguration(this.searchConfiguration);
|
85
86
|
}
|
86
87
|
/**
|
87
88
|
* Called each time the searchConfiguration prop is changed.
|
@@ -90,7 +91,7 @@ const PublicNotification = class {
|
|
90
91
|
*/
|
91
92
|
async watchSearchConfigurationHandler(newValue, oldValue) {
|
92
93
|
const s_newValue = JSON.stringify(newValue);
|
93
|
-
if (s_newValue !== JSON.stringify(oldValue)) {
|
94
|
+
if (this.mapView && (s_newValue !== JSON.stringify(oldValue) || (s_newValue && !this._searchConfiguration))) {
|
94
95
|
this._searchConfiguration = JSON.parse(s_newValue);
|
95
96
|
this.searchConfigurationChange.emit(this._searchConfiguration);
|
96
97
|
// force back to list page before we create Search
|
@@ -179,6 +180,12 @@ const PublicNotification = class {
|
|
179
180
|
const headerSlot = this._isMobile ? "footer" : "header";
|
180
181
|
return (index.h(index.Host, null, index.h("calcite-shell", null, index.h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: headerSlot }, this._getActionGroup("list-check", interfaces.EPageType.LIST, this._translations.myLists), this.showRefineSelection ? this._getActionGroup("test-data", interfaces.EPageType.REFINE, this._translations.refineSelection) : null, this._getActionGroup("export", interfaces.EPageType.EXPORT, this._translations.export)), this._getPage(this._pageType))));
|
181
182
|
}
|
183
|
+
/**
|
184
|
+
* StencilJS: Called once just after the component is first loaded.
|
185
|
+
*/
|
186
|
+
async componentDidLoad() {
|
187
|
+
this._initSearchConfiguration(this.searchConfiguration);
|
188
|
+
}
|
182
189
|
/**
|
183
190
|
* StencilJS: Called every time the component is disconnected from the DOM
|
184
191
|
*/
|
@@ -205,6 +212,22 @@ const PublicNotification = class {
|
|
205
212
|
this._geometryEngine = geometryEngine;
|
206
213
|
this._jsonUtils = jsonUtils;
|
207
214
|
}
|
215
|
+
/**
|
216
|
+
* Load the search configuration
|
217
|
+
*
|
218
|
+
* @returns Promise resolving when function is done
|
219
|
+
*
|
220
|
+
* @protected
|
221
|
+
*/
|
222
|
+
_initSearchConfiguration(v) {
|
223
|
+
if (this.searchConfiguration && !this._searchConfiguration && this.mapView) {
|
224
|
+
this._searchConfiguration = v;
|
225
|
+
this.searchConfigurationChange.emit(this._searchConfiguration);
|
226
|
+
// force back to list page before we create Search
|
227
|
+
// https://devtopia.esri.com/WebGIS/arcgis-template-configuration/issues/3402
|
228
|
+
void this._home();
|
229
|
+
}
|
230
|
+
}
|
208
231
|
/**
|
209
232
|
* Initialize the default symbols that will be used when creating new graphics
|
210
233
|
*
|