@esri/solutions-components 0.10.44 → 0.10.45
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.
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +5 -5
- package/dist/cjs/buffer-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/{calcite-alert_5.cjs.entry.js → calcite-alert_6.cjs.entry.js} +136 -0
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +6 -6
- package/dist/cjs/{calcite-shell_3.cjs.entry.js → calcite-shell.cjs.entry.js} +0 -256
- package/dist/cjs/card-manager_3.cjs.entry.js +13 -7
- package/dist/cjs/crowdsource-manager.cjs.entry.js +25 -4
- package/dist/cjs/delete-dialog.cjs.entry.js +131 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +3 -3
- package/dist/cjs/pci-calculator.cjs.entry.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +1 -1
- package/dist/cjs/share-item.cjs.entry.js +1 -1
- package/dist/cjs/solution-configuration.cjs.entry.js +3 -3
- package/dist/cjs/solution-contents_3.cjs.entry.js +3 -3
- package/dist/cjs/solution-item-accordion.cjs.entry.js +1 -1
- package/dist/cjs/solution-item-icon.cjs.entry.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/cjs/spatial-ref.cjs.entry.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +4 -0
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +31 -3
- package/dist/collection/components/layer-table/layer-table.js +32 -7
- package/dist/collection/components/map-card/map-card.js +1 -1
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +1 -1
- package/dist/collection/components/map-fullscreen/map-fullscreen.js +1 -1
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +1 -1
- package/dist/collection/components/map-legend/map-legend.js +1 -1
- package/dist/collection/components/map-picker/map-picker.js +1 -1
- package/dist/collection/components/map-search/map-search.js +1 -1
- package/dist/collection/components/map-select-tools/map-select-tools.js +1 -1
- package/dist/collection/components/map-tools/map-tools.js +1 -1
- package/dist/collection/components/pci-calculator/pci-calculator.js +1 -1
- package/dist/collection/components/pdf-download/pdf-download.js +1 -1
- package/dist/collection/components/public-notification/public-notification.js +1 -1
- package/dist/collection/components/refine-selection/refine-selection.js +1 -1
- package/dist/collection/components/share-item/share-item.js +1 -1
- package/dist/collection/components/solution-configuration/solution-configuration.js +3 -3
- package/dist/collection/components/solution-contents/solution-contents.js +1 -1
- package/dist/collection/components/solution-item/solution-item.js +1 -1
- package/dist/collection/components/solution-item-accordion/solution-item-accordion.js +1 -1
- package/dist/collection/components/solution-item-details/solution-item-details.js +1 -1
- package/dist/collection/components/solution-item-icon/solution-item-icon.js +1 -1
- package/dist/collection/components/solution-item-sharing/solution-item-sharing.js +1 -1
- package/dist/collection/components/solution-organization-variables/solution-organization-variables.js +1 -1
- package/dist/collection/components/solution-resource-item/solution-resource-item.js +1 -1
- package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +1 -1
- package/dist/collection/components/solution-template-data/solution-template-data.js +1 -1
- package/dist/collection/components/solution-variables/solution-variables.js +1 -1
- package/dist/collection/components/spatial-ref/spatial-ref.js +1 -1
- package/dist/collection/utils/interfaces.ts +4 -0
- package/dist/components/crowdsource-manager.js +27 -5
- package/dist/components/layer-table2.js +84 -91
- package/dist/components/map-card2.js +1 -1
- package/dist/components/map-draw-tools2.js +1 -1
- package/dist/components/map-fullscreen2.js +1 -1
- package/dist/components/map-layer-picker2.js +1 -1
- package/dist/components/map-legend2.js +1 -1
- package/dist/components/map-picker2.js +1 -1
- package/dist/components/map-search2.js +1 -1
- package/dist/components/map-select-tools2.js +1 -1
- package/dist/components/map-tools2.js +1 -1
- package/dist/components/pci-calculator.js +1 -1
- package/dist/components/pdf-download2.js +1 -1
- package/dist/components/public-notification.js +1 -1
- package/dist/components/refine-selection2.js +1 -1
- package/dist/components/share-item.js +1 -1
- package/dist/components/solution-configuration.js +3 -3
- package/dist/components/solution-contents2.js +1 -1
- package/dist/components/solution-item-accordion.js +1 -1
- package/dist/components/solution-item-details2.js +1 -1
- package/dist/components/solution-item-icon2.js +1 -1
- package/dist/components/solution-item-sharing2.js +1 -1
- package/dist/components/solution-item2.js +1 -1
- package/dist/components/solution-organization-variables2.js +1 -1
- package/dist/components/solution-resource-item2.js +1 -1
- package/dist/components/solution-spatial-ref2.js +1 -1
- package/dist/components/solution-template-data2.js +1 -1
- package/dist/components/solution-variables2.js +1 -1
- package/dist/components/spatial-ref.js +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +5 -5
- package/dist/esm/buffer-tools_3.entry.js +1 -1
- package/dist/esm/{calcite-alert_5.entry.js → calcite-alert_6.entry.js} +136 -1
- package/dist/esm/calcite-combobox_3.entry.js +1 -1
- package/dist/esm/calcite-shell-panel_14.entry.js +6 -6
- package/dist/esm/{calcite-shell_3.entry.js → calcite-shell.entry.js} +2 -256
- package/dist/esm/card-manager_3.entry.js +13 -7
- package/dist/esm/crowdsource-manager.entry.js +25 -4
- package/dist/esm/delete-dialog.entry.js +127 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +3 -3
- package/dist/esm/pci-calculator.entry.js +1 -1
- package/dist/esm/public-notification.entry.js +1 -1
- package/dist/esm/share-item.entry.js +1 -1
- package/dist/esm/solution-configuration.entry.js +3 -3
- package/dist/esm/solution-contents_3.entry.js +3 -3
- package/dist/esm/solution-item-accordion.entry.js +1 -1
- package/dist/esm/solution-item-icon.entry.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/spatial-ref.entry.js +1 -1
- package/dist/solutions-components/{p-56beff4c.entry.js → p-112df7b2.entry.js} +1 -1
- package/dist/solutions-components/{p-ce53e33d.entry.js → p-11c2426d.entry.js} +2 -2
- package/dist/solutions-components/{p-5001cc41.entry.js → p-274aa753.entry.js} +1 -1
- package/dist/solutions-components/{p-e1e21798.entry.js → p-36b864ba.entry.js} +1 -1
- package/dist/solutions-components/{p-561c0e02.entry.js → p-44dc3dec.entry.js} +1 -1
- package/dist/solutions-components/{p-471d5c7f.entry.js → p-45ab1117.entry.js} +2 -2
- package/dist/solutions-components/p-49ed272d.entry.js +11 -0
- package/dist/solutions-components/{p-b7fbaeb7.entry.js → p-6b5b52c1.entry.js} +1 -1
- package/dist/solutions-components/{p-62d8796c.entry.js → p-7475b8b4.entry.js} +2 -2
- package/dist/solutions-components/{p-80e81af7.entry.js → p-7bcfe068.entry.js} +1 -1
- package/dist/solutions-components/{p-41314f33.entry.js → p-96027923.entry.js} +1 -1
- package/dist/solutions-components/p-9c25ee2c.entry.js +6 -0
- package/dist/solutions-components/{p-0a2e5861.entry.js → p-add973e2.entry.js} +1 -1
- package/dist/solutions-components/{p-8d4a4498.entry.js → p-b6d50640.entry.js} +1 -1
- package/dist/solutions-components/p-b8d1b57a.entry.js +6 -0
- package/dist/solutions-components/p-b95968fa.entry.js +6 -0
- package/dist/solutions-components/p-d2f8d8a8.entry.js +6 -0
- package/dist/solutions-components/{p-d51c07d2.entry.js → p-f57978f3.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +4 -0
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +19 -0
- package/dist/types/components/layer-table/layer-table.d.ts +5 -5
- package/dist/types/components.d.ts +7 -2
- package/dist/types/preact.d.ts +2 -1
- package/dist/types/utils/interfaces.d.ts +3 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-8b92fe23.entry.js +0 -6
- package/dist/solutions-components/p-8e2f4995.entry.js +0 -6
- package/dist/solutions-components/p-d7afbe8d.entry.js +0 -11
- package/dist/solutions-components/p-f0509d41.entry.js +0 -6
|
@@ -428,7 +428,7 @@ const MapFullscreen = class {
|
|
|
428
428
|
* Renders the component.
|
|
429
429
|
*/
|
|
430
430
|
render() {
|
|
431
|
-
return (index.h(index.Host, { key: '
|
|
431
|
+
return (index.h(index.Host, { key: '7eec3dc5ab76a4ad8fdd24d8d18f8e6cf2820dde' }, index.h("div", { key: '2093cc2a6a3678209e61eea63ebde2f69ec00011', class: "fullscreen-widget", ref: (el) => { this._fullscreenElement = el; } })));
|
|
432
432
|
}
|
|
433
433
|
/**
|
|
434
434
|
* StencilJS: Called just after the component updates.
|
|
@@ -555,7 +555,7 @@ const MapLegend = class {
|
|
|
555
555
|
* StencilJS: Renders the component.
|
|
556
556
|
*/
|
|
557
557
|
render() {
|
|
558
|
-
return (index.h(index.Host, { key: '
|
|
558
|
+
return (index.h(index.Host, { key: '768d9d69042516c6d4edc55fcb0af23f90d33e6e' }, index.h("div", { key: 'e1147cf58240e7a6fcb9a00fce3649a380755e3d', ref: (el) => { this._legendElement = el; } })));
|
|
559
559
|
}
|
|
560
560
|
/**
|
|
561
561
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
|
@@ -715,7 +715,7 @@ const MapPicker = class {
|
|
|
715
715
|
* Renders the component.
|
|
716
716
|
*/
|
|
717
717
|
render() {
|
|
718
|
-
return (index.h(index.Host, { key: '
|
|
718
|
+
return (index.h(index.Host, { key: 'ecfbf2669de4ce8c916e47c7a731f0a3ad33b419' }, this._getToolbar(), this._getMapNameList(this._mapListExpanded)));
|
|
719
719
|
}
|
|
720
720
|
/**
|
|
721
721
|
* Called once after the component has loaded
|
|
@@ -900,7 +900,7 @@ const MapSearch = class {
|
|
|
900
900
|
* Renders the component.
|
|
901
901
|
*/
|
|
902
902
|
render() {
|
|
903
|
-
return (index.h(index.Host, { key: '
|
|
903
|
+
return (index.h(index.Host, { key: '36e0fb49fdedbe9e8789fba37f86a2f2d57b4e45' }, index.h("div", { key: '796ee258723e9277dc98323ba76def22bd7dca3a', class: "search-widget", ref: (el) => { this._searchElement = el; } })));
|
|
904
904
|
}
|
|
905
905
|
//--------------------------------------------------------------------------
|
|
906
906
|
//
|
|
@@ -1207,7 +1207,7 @@ const MapTools = class {
|
|
|
1207
1207
|
const toolMarginClass = this.enableSingleExpand ? "margin-top-1-2" : "";
|
|
1208
1208
|
const toolOrder = this.toolOrder ? this.toolOrder : ["legend", "search", "fullscreen", "floorfilter"];
|
|
1209
1209
|
const shadowClass = this.stackTools ? "box-shadow" : "";
|
|
1210
|
-
return (index.h(index.Host, { key: '
|
|
1210
|
+
return (index.h(index.Host, { key: '6a707a10b3cbe094548a863b13d0852969c46f94' }, index.h("div", { key: 'c1e349ba8577a87f967b31a7a042be30cb933d34', class: containerClass }, this.enableSingleExpand ? (index.h("div", { class: "box-shadow" }, this._getActionGroup(toggleIcon, false, expandTip, () => this._toggleTools()))) : undefined, index.h("div", { key: '7120793f9d707fb0d1914f5aeffb3293532ab891', class: `${toolMarginClass} ${shadowClass} ${toolsClass}` }, this._getMapWidgets(toolOrder))), index.h("basemap-gallery", { key: '11e280302f6b1f5287aa83c7eb33542f3a9d87ab', basemapConfig: this.basemapConfig, class: basemapClass, mapView: this.mapView, ref: (el) => { this._basemapElement = el; } }), index.h("map-search", { key: 'c3afd22dc8d652877f48a6def87e486546993d61', class: searchClass, mapView: this.mapView, ref: (el) => { this._searchElement = el; }, resultGraphicEnabled: true, searchConfiguration: this.searchConfiguration }), index.h("map-legend", { key: 'b8fad3cdbc3b96b4f3441316651ad78b4ed3de65', class: legendClass, mapView: this.mapView, ref: (el) => { this._legendElement = el; } }), index.h("map-fullscreen", { key: 'e34111225f1ec80fedfd548196e407786d28200b', class: fullscreenClass, mapView: this.mapView, onFullscreenStateChange: (evt) => this._fullscreenStateChange(evt.detail), ref: (el) => { this._fullscreenElement = el; } }), index.h("floor-filter", { key: '2db5c7e6182d77786b162692169263495b2752f5', class: floorFilterClass, enabled: this.enableFloorFilter, mapView: this.mapView, ref: (el) => { this._floorFilterElement = el; } })));
|
|
1211
1211
|
}
|
|
1212
1212
|
//--------------------------------------------------------------------------
|
|
1213
1213
|
//
|
|
@@ -534,7 +534,7 @@ const MapDrawTools = class {
|
|
|
534
534
|
"border" : "border esri-widget esri-sketch__panel";
|
|
535
535
|
const undoRedoClass = this.drawMode === interfaces.EDrawMode.SKETCH ?
|
|
536
536
|
"display-none" : "esri-widget esri-sketch__panel border-left esri-sketch__section";
|
|
537
|
-
return (index.h(index.Host, { key: '
|
|
537
|
+
return (index.h(index.Host, { key: '253db0399bab5d5fc6f4232bb537ddeec81fec2c' }, index.h("div", { key: 'bbac53da8b8b1196cc3a7aedf5479cd4e33ab3ea', class: containerClass }, index.h("div", { key: '8d3dae2c2f82f7e4d7aae92d4a4c6050d2a96478', ref: (el) => { this._sketchElement = el; } }), index.h("div", { key: 'd635374374ebdff26157a1258ba84932d491e36a', class: undoRedoClass }, index.h("calcite-action", { key: 'fb437fec19fa7ffc57459e426ba988fd4d50c1e6', disabled: !this.undoEnabled, icon: "undo", onClick: () => this._undo(), scale: "s", text: this._translations.undo }), index.h("calcite-action", { key: 'fd3f4f3e8b722b95c0b7aad1fc6b909a97787b86', disabled: !this.redoEnabled, icon: "redo", onClick: () => this._redo(), scale: "s", text: this._translations.redo })))));
|
|
538
538
|
}
|
|
539
539
|
//--------------------------------------------------------------------------
|
|
540
540
|
//
|
|
@@ -1262,6 +1262,141 @@ const CreateFeature = class {
|
|
|
1262
1262
|
};
|
|
1263
1263
|
CreateFeature.style = CreateFeatureStyle0;
|
|
1264
1264
|
|
|
1265
|
+
const deleteButtonCss = ":host{display:block}.delete-modal{position:fixed}";
|
|
1266
|
+
const DeleteButtonStyle0 = deleteButtonCss;
|
|
1267
|
+
|
|
1268
|
+
const DeleteButton = class {
|
|
1269
|
+
constructor(hostRef) {
|
|
1270
|
+
index.registerInstance(this, hostRef);
|
|
1271
|
+
this.editsComplete = index.createEvent(this, "editsComplete", 7);
|
|
1272
|
+
this.deleteDialog = undefined;
|
|
1273
|
+
this.buttonType = "button";
|
|
1274
|
+
this.disabled = false;
|
|
1275
|
+
this.icon = undefined;
|
|
1276
|
+
this.ids = [];
|
|
1277
|
+
this.layer = undefined;
|
|
1278
|
+
this.locale = undefined;
|
|
1279
|
+
this._confirmDelete = false;
|
|
1280
|
+
this._deleteEndabled = false;
|
|
1281
|
+
this._supportsDelete = undefined;
|
|
1282
|
+
this._translations = undefined;
|
|
1283
|
+
}
|
|
1284
|
+
get el() { return index.getElement(this); }
|
|
1285
|
+
//--------------------------------------------------------------------------
|
|
1286
|
+
//
|
|
1287
|
+
// Properties (protected)
|
|
1288
|
+
//
|
|
1289
|
+
//--------------------------------------------------------------------------
|
|
1290
|
+
//--------------------------------------------------------------------------
|
|
1291
|
+
//
|
|
1292
|
+
// Watch handlers
|
|
1293
|
+
//
|
|
1294
|
+
//--------------------------------------------------------------------------
|
|
1295
|
+
/**
|
|
1296
|
+
* watch for changes in layer view and verify if it has editing enabled
|
|
1297
|
+
*/
|
|
1298
|
+
async idsWatchHandler() {
|
|
1299
|
+
this._setDeleteEnabled();
|
|
1300
|
+
}
|
|
1301
|
+
/**
|
|
1302
|
+
* watch for changes in layer view and verify if it has editing enabled
|
|
1303
|
+
*/
|
|
1304
|
+
async layerWatchHandler() {
|
|
1305
|
+
this._setDeleteEnabled();
|
|
1306
|
+
}
|
|
1307
|
+
/**
|
|
1308
|
+
* Fetch translations when the locale is updated
|
|
1309
|
+
*/
|
|
1310
|
+
async localeWatchHandler() {
|
|
1311
|
+
// to support url param and language switcher
|
|
1312
|
+
this.el.lang = this.locale;
|
|
1313
|
+
await this._getTranslations();
|
|
1314
|
+
}
|
|
1315
|
+
//--------------------------------------------------------------------------
|
|
1316
|
+
//
|
|
1317
|
+
// Methods (public)
|
|
1318
|
+
//
|
|
1319
|
+
//--------------------------------------------------------------------------
|
|
1320
|
+
//--------------------------------------------------------------------------
|
|
1321
|
+
//
|
|
1322
|
+
// Events (public)
|
|
1323
|
+
//
|
|
1324
|
+
//--------------------------------------------------------------------------
|
|
1325
|
+
/**
|
|
1326
|
+
* Emitted on demand when features have been deleted
|
|
1327
|
+
*/
|
|
1328
|
+
editsComplete;
|
|
1329
|
+
//--------------------------------------------------------------------------
|
|
1330
|
+
//
|
|
1331
|
+
// Functions (lifecycle)
|
|
1332
|
+
//
|
|
1333
|
+
//--------------------------------------------------------------------------
|
|
1334
|
+
/**
|
|
1335
|
+
* StencilJS: Called once just after the component is first connected to the DOM.
|
|
1336
|
+
*
|
|
1337
|
+
* @returns Promise when complete
|
|
1338
|
+
*/
|
|
1339
|
+
async componentWillLoad() {
|
|
1340
|
+
await this._getTranslations();
|
|
1341
|
+
}
|
|
1342
|
+
/**
|
|
1343
|
+
* Renders the component.
|
|
1344
|
+
*/
|
|
1345
|
+
render() {
|
|
1346
|
+
return (index.h(index.Host, { key: '1816da3d5cd7903b4e699dffa4ac4836dca722bb' }, this.buttonType === "button" ? (index.h("calcite-button", { appearance: "outline", disabled: !this._deleteEndabled, id: "solutions-delete", kind: "danger", onClick: () => this._delete(), width: "full" }, this._translations.deleteCount.replace("{{n}}", this.ids.length.toString()))) : (index.h("calcite-action", { appearance: "solid", compact: true, disabled: !this._deleteEndabled, id: this.icon, onClick: () => this._delete(), scale: "s", text: this._translations.delete }, index.h("calcite-button", { appearance: "transparent", iconStart: this.icon, kind: "danger" }, this._translations.delete))), this._deleteMessage(), index.h("calcite-tooltip", { key: '26fc4d4b4ea02b7a6c5e3f87abe2c5b8f96a3654', placement: "bottom", "reference-element": this.buttonType === "button" ? "solutions-delete" : this.icon }, index.h("span", { key: 'c2f7b101bb3a99274fe7f364ad29365c212d856e' }, this._translations.delete))));
|
|
1347
|
+
}
|
|
1348
|
+
/**
|
|
1349
|
+
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
|
1350
|
+
*/
|
|
1351
|
+
async componentDidLoad() {
|
|
1352
|
+
this._setDeleteEnabled();
|
|
1353
|
+
}
|
|
1354
|
+
//--------------------------------------------------------------------------
|
|
1355
|
+
//
|
|
1356
|
+
// Functions (protected)
|
|
1357
|
+
//
|
|
1358
|
+
//--------------------------------------------------------------------------
|
|
1359
|
+
/**
|
|
1360
|
+
* Verify if the layer supports delete and that we have 1 or more ids
|
|
1361
|
+
*/
|
|
1362
|
+
_setDeleteEnabled() {
|
|
1363
|
+
this._supportsDelete = this.layer?.editingEnabled && this.layer?.capabilities?.operations?.supportsDelete;
|
|
1364
|
+
this._deleteEndabled = !this.disabled || this._supportsDelete && this.ids.length > 0;
|
|
1365
|
+
}
|
|
1366
|
+
/**
|
|
1367
|
+
* Delete all selected records or shows an alert if the layer does not have editing enabled
|
|
1368
|
+
*
|
|
1369
|
+
* @returns a promise that will resolve when the operation is complete
|
|
1370
|
+
*/
|
|
1371
|
+
_delete() {
|
|
1372
|
+
this._confirmDelete = true;
|
|
1373
|
+
}
|
|
1374
|
+
/**
|
|
1375
|
+
* Show delete confirmation message
|
|
1376
|
+
*
|
|
1377
|
+
* @returns node to confirm or deny the delete operation
|
|
1378
|
+
*/
|
|
1379
|
+
_deleteMessage() {
|
|
1380
|
+
return this.deleteDialog ? this.deleteDialog : (index.h("delete-dialog", { id: "solution-delete-dialog", ids: this.ids, layer: this.layer, locale: this.locale, onDeleteDialogClose: () => this._confirmDelete = false, open: this._confirmDelete }));
|
|
1381
|
+
}
|
|
1382
|
+
/**
|
|
1383
|
+
* Fetches the component's translations
|
|
1384
|
+
*
|
|
1385
|
+
* @returns Promise when complete
|
|
1386
|
+
* @protected
|
|
1387
|
+
*/
|
|
1388
|
+
async _getTranslations() {
|
|
1389
|
+
const messages = await locale$1.getLocaleComponentStrings(this.el);
|
|
1390
|
+
this._translations = messages[0];
|
|
1391
|
+
}
|
|
1392
|
+
static get watchers() { return {
|
|
1393
|
+
"ids": ["idsWatchHandler"],
|
|
1394
|
+
"layer": ["layerWatchHandler"],
|
|
1395
|
+
"locale": ["localeWatchHandler"]
|
|
1396
|
+
}; }
|
|
1397
|
+
};
|
|
1398
|
+
DeleteButton.style = DeleteButtonStyle0;
|
|
1399
|
+
|
|
1265
1400
|
const editCardCss = ":host{display:block}.padding-bottom-1{padding-bottom:1rem}.font-bold{font-weight:var(--calcite-font-weight-bold)}.font-500{font-weight:var(--calcite-font-weight-medium)}.font-italic{font-style:italic}#feature-form{padding-top:0px}.padding-sides-bottom-1{padding:0 1rem 1rem 1rem}.position-relative{position:relative}.esri-editor__prompt--danger{position:relative !important;width:100% !important;background-color:var(--calcite-color-foreground-1) !important}.esri-feature__content-node{background-color:var(--calcite-color-foreground-1) !important}.esri-editor__panel-toolbar{display:none !important}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.esri-editor__panel-content{padding-block:10px !important}";
|
|
1266
1401
|
const EditCardStyle0 = editCardCss;
|
|
1267
1402
|
|
|
@@ -1965,5 +2100,6 @@ InfoCard.style = InfoCardStyle0;
|
|
|
1965
2100
|
exports.calcite_alert = Alert;
|
|
1966
2101
|
exports.calcite_flow_item = FlowItem;
|
|
1967
2102
|
exports.create_feature = CreateFeature;
|
|
2103
|
+
exports.delete_button = DeleteButton;
|
|
1968
2104
|
exports.edit_card = EditCard;
|
|
1969
2105
|
exports.info_card = InfoCard;
|
|
@@ -1354,7 +1354,7 @@ const MapLayerPicker = class {
|
|
|
1354
1354
|
const id = "map-layer-picker";
|
|
1355
1355
|
let style = this.height > 0 ? { "height": `${this.height.toString()}px` } : {};
|
|
1356
1356
|
style = { ...style, "display": this.display };
|
|
1357
|
-
return (index.h(index.Host, { key: '
|
|
1357
|
+
return (index.h(index.Host, { key: '47d80c20f364f6d4f1a247f7f84d25ca4ff5cd7b' }, index.h("div", { key: '16ecc0c3dad51b0707304e003861e419796f3fba', class: "map-layer-picker-container", style: style }, index.h("div", { key: '56a3d93b9f91afd753952a0e86fe9ee426c529f5', class: "map-layer-picker", style: style }, !this._hasValidLayers ? this._getInvalidPlaceholder() :
|
|
1358
1358
|
!this._hasMultipleLayers && this.showSingleLayerAsLabel ? this._getSingleLayerPlaceholder() :
|
|
1359
1359
|
this.type === "combobox" ? this._getCombobox(id) :
|
|
1360
1360
|
this.type === "select" ? this._getSelect(id) : this._getDropdown(id)))));
|
|
@@ -2232,7 +2232,7 @@ const SolutionItemDetails = class {
|
|
|
2232
2232
|
* Renders the component.
|
|
2233
2233
|
*/
|
|
2234
2234
|
render() {
|
|
2235
|
-
return (index.h(index.Host, { key: '
|
|
2235
|
+
return (index.h(index.Host, { key: '91b7ce062e477c856e3a512e5247ac9fb3299fc9' }, index.h("div", { key: 'fa10231c42260d1117b14653359f531e0688a46c', class: "parent-container" }, index.h("div", { key: 'c6a3c70442de79c97f730c5c9a351f033a75e0f5', class: "inputBottomSeparation" }, index.h("calcite-input", { key: '8b33b09b05bd3d81bde6e739288ef806083bfe9a', id: "item-title", value: this.itemDetails.title })), index.h("div", { key: '288c1856a396fd47b6df74d76da153a70832a548', class: "inputBottomSeparation" }, index.h("input", { key: '16bedd351e0be19f7ef8b0f9e30ac8d54bf19512', accept: ".jpg,.gif,.png,image/jpg,image/gif,image/png", class: "display-none", onChange: (event) => (this._updateThumbnail(event)), ref: (el) => (this.browseForThumbnail = el), type: "file" }), index.h("button", { key: 'e0f9adf5152b9b292e859667bacf4d154e563302', class: "font-size--3 btn-link inline-block trailer-quarter", onClick: () => this._getThumbnail() }, index.h("svg", { key: '99611f9c671193b9a833b76a6ed071bc8a61b18f', class: "icon-inline icon-inline--on-left", height: "16", viewBox: "0 0 16 16", width: "16" }, index.h("path", { key: 'c499a06b58b083384ad0ab7b053c266bdc6db252', d: "M14.792 2.666l-1.414-1.413a.965.965 0 0 0-1.385-.03l-1.444 1.444-8.763 8.72L.03 15.481a.371.371 0 0 0 .488.488l4.096-1.756 8.763-8.72-.001-.001.002.002 1.443-1.444a.965.965 0 0 0-.03-1.385zM1.569 14.431l.554-1.293.74.739zm2.338-.924l-1.414-1.414 7.963-7.92 1.414 1.415zm8.67-8.626l-1.413-1.414 1.29-1.29a.306.306 0 0 1 .433 0l.981.98a.306.306 0 0 1 0 .433z" })), this._translations.editThumbnail), index.h("div", { key: 'fa7b1a1c072901eb2abed7f9c756320e03b8d7de', class: "flex" }, index.h("div", { key: 'e5e982728dfcc569987db0f3bbd621fea819fc6c', class: "img-container", ref: (el) => (this.thumbnailContainer = el) }, index.h("img", { key: 'e09073dc5598c3dac5a020830b44e013dc884f2b', class: "scale-down", height: "133", id: "item-thumbnail", ref: (el) => (this.thumbnail = el), width: "200" })), index.h("div", { key: '3023ad5fba278e0a9982d51c63cf052ffb7a4dc4', class: "snippet-count-container" }, index.h("calcite-input", { key: '2b57abed7b2299b29e011363976290425457f194', id: "item-snippet", maxLength: 250, type: "textarea", value: this.itemDetails.snippet }), index.h("label", { key: 'b8af7f4e80bcc1722ba512f63941dc38dc8c3ae4', class: "font-size--3", id: "item-snippet-count", ref: (el) => (this.itemSnippetCount = el) })))), index.h("calcite-label", { key: 'd364ae177e5ac0b8356b63cd842f5ef8f4a10bb8' }, this._translations.description, index.h("label", { key: '88655b88d2f5fbf3a000492c780110fc3a4d0634', id: "item-description-label" }, index.h("calcite-input", { key: '5034fb4d2ccf7927bb200dadd0d543ca05bb4da2', id: "item-description", type: "textarea", value: this.itemDetails.description }))), index.h("calcite-label", { key: '00f30749424b6c07279e11ba171d4335af6b6443' }, this._translations.tags, index.h("label", { key: '64564edcf7c4a55102d06ffd1c937fd275cc0733', id: "item-tags-label" }, index.h("calcite-input", { key: 'bc46622ffde1e9064e726594fd70c43c91fe36d7', id: "item-tags", value: (this.itemDetails.tags && Array.isArray(this.itemDetails.tags) ? this.itemDetails.tags : [this.itemDetails.tags]).join(",") }))), this.itemType !== "Group" ? index.h("calcite-label", null, this._translations.credits, index.h("label", { id: "item-credits-label" }, index.h("calcite-input", { id: "item-credits", value: this.itemDetails.accessInformation }))) : null, this.itemType !== "Group" ? index.h("calcite-label", null, index.h("label", { id: "item-terms-label" }, this._translations.termsOfUse, index.h("calcite-input", { id: "item-terms", type: "textarea", value: this.itemDetails.licenseInfo }))) : null)));
|
|
2236
2236
|
}
|
|
2237
2237
|
componentDidRender() {
|
|
2238
2238
|
this._loadThumb();
|
|
@@ -2427,7 +2427,7 @@ const SolutionItemSharing = class {
|
|
|
2427
2427
|
* Renders the component.
|
|
2428
2428
|
*/
|
|
2429
2429
|
render() {
|
|
2430
|
-
return (index.h(index.Host, { key: '
|
|
2430
|
+
return (index.h(index.Host, { key: 'eca66b743e748d9f915c6d356ea84075ab21709a' }, index.h("div", { key: 'b0765e14cc9de5a81afa5d20bc41e7f78913a37e', class: "container-border" }, index.h("calcite-label", { key: '36cbf3b48a2641bcb2107e61609c2ec6c9f18991' }, this._translations.groupInfo), this._renderItems(this.sharing))));
|
|
2431
2431
|
}
|
|
2432
2432
|
//--------------------------------------------------------------------------
|
|
2433
2433
|
//
|
|
@@ -2561,7 +2561,7 @@ const SolutionOrganizationVariables = class {
|
|
|
2561
2561
|
* Renders the component.
|
|
2562
2562
|
*/
|
|
2563
2563
|
render() {
|
|
2564
|
-
return (index.h(index.Host, { key: '
|
|
2564
|
+
return (index.h(index.Host, { key: '4d1a39b53287d445a1fc66cd5088a7bc60516ab6' }, index.h("div", { key: '7a40ad712fe1af01e92701d128f65b0590aa15bc' }, index.h("h4", { key: '7517fc56b5b0128ee102dc3f57e334501befe14f', class: "org-var-header" }, this._translations.orgVariables)), index.h("div", { key: 'd48cbc3ffb24ba54ded2b24c7c518ecf8114cd55', class: "container-border" }, index.h("calcite-tree", { key: '383124c0ae3d646dc9ee857109051e7a151dbe62', id: "variable-label" }, this._renderHierarchy(this._organizationVariables)))));
|
|
2565
2565
|
}
|
|
2566
2566
|
//--------------------------------------------------------------------------
|
|
2567
2567
|
//
|
|
@@ -2674,7 +2674,7 @@ const SolutionResourceItem = class {
|
|
|
2674
2674
|
*/
|
|
2675
2675
|
render() {
|
|
2676
2676
|
const hasValidResources = this._hasValidResources();
|
|
2677
|
-
return (index.h(index.Host, { key: '
|
|
2677
|
+
return (index.h(index.Host, { key: '36017a54e5f8fafda593af2b727f1fbda80c7455' }, index.h("div", { key: 'eb9f53c9b4161c09e0b00d9a4d90a814d944819c', class: "resource-item" }, index.h("div", { key: '504dfa5fb623ed27a0829f60ebbf5de17b6d467f', class: "margin-bottom-1" }, index.h("calcite-button", { key: 'e578443e1ef409917c5946c77e660c04d273cb6c', appearance: "solid", class: "resource-button", color: "blue", onClick: () => this._addNewResource() }, this._translations.addResource), index.h("calcite-button", { key: 'e4c11326d7c5d96de1d0983eb0beb3cf726177c8', appearance: "solid", color: "blue", disabled: !hasValidResources, onClick: () => this._downloadAll() }, this._translations.downloadAll)), index.h("div", { key: '3617bf40ac8b01d70b523642757a624c977ea491', class: "resources-container", style: { display: hasValidResources ? "inherit" : "none" } }, this._renderResourceList()))));
|
|
2678
2678
|
}
|
|
2679
2679
|
_removedResources = {};
|
|
2680
2680
|
//--------------------------------------------------------------------------
|
|
@@ -2971,7 +2971,7 @@ const SolutionTemplateData = class {
|
|
|
2971
2971
|
* Renders the component.
|
|
2972
2972
|
*/
|
|
2973
2973
|
render() {
|
|
2974
|
-
return (index.h(index.Host, { key: '
|
|
2974
|
+
return (index.h(index.Host, { key: 'db99cf57229d7d8b9fe6315e180d95de0b20fc8d' }, index.h("div", { key: '83473f420d1417c85ebb4119be9f359cab878c54', class: "solution-data-container" }, index.h("calcite-shell", { key: '013754ef962c2e5c112f6a8cc6c5d1b8e768078e', class: "light var-container", dir: "ltr" }, index.h("calcite-panel", { key: '11ab2a07fe4af542d8cefc1c131246deef43dd9a', class: "json-editor" }, index.h("div", { key: 'ba0460977eb0375acaf5b11ce951986a08ece39b', class: "solution-data-child-container calcite-match-height" }, index.h("json-editor", { key: '53251c1583aa7e8cf2a4e9a1f22e4c72430d3928', class: "solution-data-editor-container", instanceid: this.itemId + "|" + this.instanceid, locale: this.locale, value: this.value }))), index.h("calcite-shell-panel", { key: '30c47797a35ff7228c4318a5633aec57de05b8cf', "height-scale": "l", position: "end", slot: "contextual-panel", "width-scale": "xs" }, index.h("div", { key: '028b16654835744f0735b880ca85a3d174963414', class: this.varsOpen ? "solution-data-child-container" : "solution-data-child-container-collapsed" }, index.h("calcite-button", { key: 'bb5049611e778b970454544851a625ccef47d23a', appearance: "transparent", class: "collapse-btn", "icon-start": this.varsOpen ? "chevrons-right" : "chevrons-left", id: "collapse-vars", onClick: () => this._toggleVars(), scale: "s", title: this.varsOpen ? this._translations.collapse : this._translations.expand }), index.h("div", { key: 'c2a30a7c27db181e0dfe0e201d9d3b2742247080', class: this.varsOpen ? "org-vars" : "org-vars display-none", id: "orgVars" }, index.h("solution-organization-variables", { key: '178c4301c8558c4fe7114c8f6cf5bc0df10883a0', locale: this.locale, value: this.organizationVariables })), index.h("div", { key: 'f85375bac946cff856b6915f340bf926498265ea', class: this.varsOpen ? "sol-vars" : "sol-vars display-none", id: "solVars" }, index.h("solution-variables", { key: '166d0752746994bc4aebd4e41660f8a2d2c678ea', locale: this.locale, value: this.solutionVariables }))))))));
|
|
2975
2975
|
}
|
|
2976
2976
|
_initializing = false;
|
|
2977
2977
|
//--------------------------------------------------------------------------
|
|
@@ -3060,7 +3060,7 @@ const SolutionVariables = class {
|
|
|
3060
3060
|
* Renders the component.
|
|
3061
3061
|
*/
|
|
3062
3062
|
render() {
|
|
3063
|
-
return (index.h(index.Host, { key: '
|
|
3063
|
+
return (index.h(index.Host, { key: 'a9354a1d3b3d91b9b9522bec945726e106487b78' }, index.h("div", { key: 'd38d0151ba9f8421e3ec863ce90b234964cb7f21' }, index.h("h4", { key: '3d10129c3327e803e38b4fc21976764f9ac91693', class: "org-var-header" }, this._translations.solVariables)), index.h("div", { key: '8b79cef63c5b8f5f66b0e11a4b94021f6a025fc3', class: "container-border" }, index.h("calcite-tree", { key: '7f69edec6e35a65e45b461d69e92d0e163563bee', id: "variable-label" }, this._renderHierarchy(this._solutionVariables)))));
|
|
3064
3064
|
}
|
|
3065
3065
|
//--------------------------------------------------------------------------
|
|
3066
3066
|
//
|
|
@@ -10,13 +10,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
10
10
|
const index = require('./index-4b68e4b4.js');
|
|
11
11
|
const conditionalSlot = require('./conditionalSlot-37ff4832.js');
|
|
12
12
|
const dom = require('./dom-795d4a33.js');
|
|
13
|
-
const locale = require('./locale-339b55f0.js');
|
|
14
13
|
require('./observers-18d87cb5.js');
|
|
15
14
|
require('./browser-333a21c5.js');
|
|
16
15
|
require('./guid-e84a8375.js');
|
|
17
16
|
require('./resources-18f799c7.js');
|
|
18
|
-
require('./esri-loader-08dc41bd.js');
|
|
19
|
-
require('./_commonjsHelpers-baf43783.js');
|
|
20
17
|
|
|
21
18
|
/*!
|
|
22
19
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
@@ -206,257 +203,4 @@ const Shell = class {
|
|
|
206
203
|
};
|
|
207
204
|
Shell.style = CalciteShellStyle0;
|
|
208
205
|
|
|
209
|
-
const deleteButtonCss = ":host{display:block}.delete-modal{position:fixed}";
|
|
210
|
-
const DeleteButtonStyle0 = deleteButtonCss;
|
|
211
|
-
|
|
212
|
-
const DeleteButton = class {
|
|
213
|
-
constructor(hostRef) {
|
|
214
|
-
index.registerInstance(this, hostRef);
|
|
215
|
-
this.editsComplete = index.createEvent(this, "editsComplete", 7);
|
|
216
|
-
this.deleteDialog = undefined;
|
|
217
|
-
this.buttonType = "button";
|
|
218
|
-
this.disabled = false;
|
|
219
|
-
this.icon = undefined;
|
|
220
|
-
this.ids = [];
|
|
221
|
-
this.layer = undefined;
|
|
222
|
-
this.locale = undefined;
|
|
223
|
-
this._confirmDelete = false;
|
|
224
|
-
this._deleteEndabled = false;
|
|
225
|
-
this._supportsDelete = undefined;
|
|
226
|
-
this._translations = undefined;
|
|
227
|
-
}
|
|
228
|
-
get el() { return index.getElement(this); }
|
|
229
|
-
//--------------------------------------------------------------------------
|
|
230
|
-
//
|
|
231
|
-
// Properties (protected)
|
|
232
|
-
//
|
|
233
|
-
//--------------------------------------------------------------------------
|
|
234
|
-
//--------------------------------------------------------------------------
|
|
235
|
-
//
|
|
236
|
-
// Watch handlers
|
|
237
|
-
//
|
|
238
|
-
//--------------------------------------------------------------------------
|
|
239
|
-
/**
|
|
240
|
-
* watch for changes in layer view and verify if it has editing enabled
|
|
241
|
-
*/
|
|
242
|
-
async idsWatchHandler() {
|
|
243
|
-
this._setDeleteEnabled();
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* watch for changes in layer view and verify if it has editing enabled
|
|
247
|
-
*/
|
|
248
|
-
async layerWatchHandler() {
|
|
249
|
-
this._setDeleteEnabled();
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Fetch translations when the locale is updated
|
|
253
|
-
*/
|
|
254
|
-
async localeWatchHandler() {
|
|
255
|
-
// to support url param and language switcher
|
|
256
|
-
this.el.lang = this.locale;
|
|
257
|
-
await this._getTranslations();
|
|
258
|
-
}
|
|
259
|
-
//--------------------------------------------------------------------------
|
|
260
|
-
//
|
|
261
|
-
// Methods (public)
|
|
262
|
-
//
|
|
263
|
-
//--------------------------------------------------------------------------
|
|
264
|
-
//--------------------------------------------------------------------------
|
|
265
|
-
//
|
|
266
|
-
// Events (public)
|
|
267
|
-
//
|
|
268
|
-
//--------------------------------------------------------------------------
|
|
269
|
-
/**
|
|
270
|
-
* Emitted on demand when features have been deleted
|
|
271
|
-
*/
|
|
272
|
-
editsComplete;
|
|
273
|
-
//--------------------------------------------------------------------------
|
|
274
|
-
//
|
|
275
|
-
// Functions (lifecycle)
|
|
276
|
-
//
|
|
277
|
-
//--------------------------------------------------------------------------
|
|
278
|
-
/**
|
|
279
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
|
280
|
-
*
|
|
281
|
-
* @returns Promise when complete
|
|
282
|
-
*/
|
|
283
|
-
async componentWillLoad() {
|
|
284
|
-
await this._getTranslations();
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Renders the component.
|
|
288
|
-
*/
|
|
289
|
-
render() {
|
|
290
|
-
return (index.h(index.Host, { key: '1816da3d5cd7903b4e699dffa4ac4836dca722bb' }, this.buttonType === "button" ? (index.h("calcite-button", { appearance: "outline", disabled: !this._deleteEndabled, id: "solutions-delete", kind: "danger", onClick: () => this._delete(), width: "full" }, this._translations.deleteCount.replace("{{n}}", this.ids.length.toString()))) : (index.h("calcite-action", { appearance: "solid", compact: true, disabled: !this._deleteEndabled, id: this.icon, onClick: () => this._delete(), scale: "s", text: this._translations.delete }, index.h("calcite-button", { appearance: "transparent", iconStart: this.icon, kind: "danger" }, this._translations.delete))), this._deleteMessage(), index.h("calcite-tooltip", { key: '26fc4d4b4ea02b7a6c5e3f87abe2c5b8f96a3654', placement: "bottom", "reference-element": this.buttonType === "button" ? "solutions-delete" : this.icon }, index.h("span", { key: 'c2f7b101bb3a99274fe7f364ad29365c212d856e' }, this._translations.delete))));
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
|
294
|
-
*/
|
|
295
|
-
async componentDidLoad() {
|
|
296
|
-
this._setDeleteEnabled();
|
|
297
|
-
}
|
|
298
|
-
//--------------------------------------------------------------------------
|
|
299
|
-
//
|
|
300
|
-
// Functions (protected)
|
|
301
|
-
//
|
|
302
|
-
//--------------------------------------------------------------------------
|
|
303
|
-
/**
|
|
304
|
-
* Verify if the layer supports delete and that we have 1 or more ids
|
|
305
|
-
*/
|
|
306
|
-
_setDeleteEnabled() {
|
|
307
|
-
this._supportsDelete = this.layer?.editingEnabled && this.layer?.capabilities?.operations?.supportsDelete;
|
|
308
|
-
this._deleteEndabled = !this.disabled || this._supportsDelete && this.ids.length > 0;
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* Delete all selected records or shows an alert if the layer does not have editing enabled
|
|
312
|
-
*
|
|
313
|
-
* @returns a promise that will resolve when the operation is complete
|
|
314
|
-
*/
|
|
315
|
-
_delete() {
|
|
316
|
-
this._confirmDelete = true;
|
|
317
|
-
}
|
|
318
|
-
/**
|
|
319
|
-
* Show delete confirmation message
|
|
320
|
-
*
|
|
321
|
-
* @returns node to confirm or deny the delete operation
|
|
322
|
-
*/
|
|
323
|
-
_deleteMessage() {
|
|
324
|
-
return this.deleteDialog ? this.deleteDialog : (index.h("delete-dialog", { id: "solution-delete-dialog", ids: this.ids, layer: this.layer, locale: this.locale, onDeleteDialogClose: () => this._confirmDelete = false, open: this._confirmDelete }));
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* Fetches the component's translations
|
|
328
|
-
*
|
|
329
|
-
* @returns Promise when complete
|
|
330
|
-
* @protected
|
|
331
|
-
*/
|
|
332
|
-
async _getTranslations() {
|
|
333
|
-
const messages = await locale.getLocaleComponentStrings(this.el);
|
|
334
|
-
this._translations = messages[0];
|
|
335
|
-
}
|
|
336
|
-
static get watchers() { return {
|
|
337
|
-
"ids": ["idsWatchHandler"],
|
|
338
|
-
"layer": ["layerWatchHandler"],
|
|
339
|
-
"locale": ["localeWatchHandler"]
|
|
340
|
-
}; }
|
|
341
|
-
};
|
|
342
|
-
DeleteButton.style = DeleteButtonStyle0;
|
|
343
|
-
|
|
344
|
-
const deleteDialogCss = ":host{display:block}.delete-modal{position:fixed}";
|
|
345
|
-
const DeleteDialogStyle0 = deleteDialogCss;
|
|
346
|
-
|
|
347
|
-
const DeleteDialog = class {
|
|
348
|
-
constructor(hostRef) {
|
|
349
|
-
index.registerInstance(this, hostRef);
|
|
350
|
-
this.editsComplete = index.createEvent(this, "editsComplete", 7);
|
|
351
|
-
this.deleteDialogClose = index.createEvent(this, "deleteDialogClose", 7);
|
|
352
|
-
this.ids = [];
|
|
353
|
-
this.layer = undefined;
|
|
354
|
-
this.locale = undefined;
|
|
355
|
-
this.open = false;
|
|
356
|
-
this._isDeleting = false;
|
|
357
|
-
this._translations = undefined;
|
|
358
|
-
}
|
|
359
|
-
get el() { return index.getElement(this); }
|
|
360
|
-
//--------------------------------------------------------------------------
|
|
361
|
-
//
|
|
362
|
-
// Properties (protected)
|
|
363
|
-
//
|
|
364
|
-
//--------------------------------------------------------------------------
|
|
365
|
-
//--------------------------------------------------------------------------
|
|
366
|
-
//
|
|
367
|
-
// Watch handlers
|
|
368
|
-
//
|
|
369
|
-
//--------------------------------------------------------------------------
|
|
370
|
-
/**
|
|
371
|
-
* Fetch translations when the locale is updated
|
|
372
|
-
*/
|
|
373
|
-
async localeWatchHandler() {
|
|
374
|
-
// to support url param and language switcher
|
|
375
|
-
this.el.lang = this.locale;
|
|
376
|
-
await this._getTranslations();
|
|
377
|
-
}
|
|
378
|
-
//--------------------------------------------------------------------------
|
|
379
|
-
//
|
|
380
|
-
// Methods (public)
|
|
381
|
-
//
|
|
382
|
-
//--------------------------------------------------------------------------
|
|
383
|
-
//--------------------------------------------------------------------------
|
|
384
|
-
//
|
|
385
|
-
// Events (public)
|
|
386
|
-
//
|
|
387
|
-
//--------------------------------------------------------------------------
|
|
388
|
-
/**
|
|
389
|
-
* Emitted on demand when features have been deleted
|
|
390
|
-
*/
|
|
391
|
-
editsComplete;
|
|
392
|
-
/**
|
|
393
|
-
* Emitted on demand when features have been deleted
|
|
394
|
-
*/
|
|
395
|
-
deleteDialogClose;
|
|
396
|
-
//--------------------------------------------------------------------------
|
|
397
|
-
//
|
|
398
|
-
// Functions (lifecycle)
|
|
399
|
-
//
|
|
400
|
-
//--------------------------------------------------------------------------
|
|
401
|
-
/**
|
|
402
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
|
403
|
-
*
|
|
404
|
-
* @returns Promise when complete
|
|
405
|
-
*/
|
|
406
|
-
async componentWillLoad() {
|
|
407
|
-
await this._getTranslations();
|
|
408
|
-
}
|
|
409
|
-
/**
|
|
410
|
-
* Renders the component.
|
|
411
|
-
*/
|
|
412
|
-
render() {
|
|
413
|
-
const confirmMessage = this.ids.length === 1 ? this._translations?.confirmSingle :
|
|
414
|
-
this._translations?.confirmMultiple;
|
|
415
|
-
return (index.h(index.Host, { key: 'eafca7d4325c65ff21fbfeaa24ea14e95bc25a34' }, index.h("calcite-modal", { key: '745e52d7b23318492914662cc769a1206baefd28', "aria-labelledby": "modal-title", class: "delete-modal", kind: "danger", onCalciteModalClose: () => this._close(), open: this.open, widthScale: "s" }, index.h("div", { key: '363614f6eaf30c30c6c2ccde3875dfff5cd94088', class: "display-flex align-center", id: "modal-title", slot: "header" }, this._translations?.deleteFeature), index.h("div", { key: 'b3b6f74495894589b7fd8be54265c4a69ffaa62e', slot: "content" }, confirmMessage), index.h("calcite-button", { key: 'd325fcf12624bac39f56ec690f7e4e9660789891', appearance: "outline", kind: "danger", onClick: () => this._close(), slot: "secondary", width: "full" }, this._translations?.cancel), index.h("calcite-button", { key: '73a10546ad92065c949bfacca3eb3d508685030e', kind: "danger", loading: this._isDeleting, onClick: () => void this._deleteFeatures(), slot: "primary", width: "full" }, this._translations?.delete))));
|
|
416
|
-
}
|
|
417
|
-
//--------------------------------------------------------------------------
|
|
418
|
-
//
|
|
419
|
-
// Functions (protected)
|
|
420
|
-
//
|
|
421
|
-
//--------------------------------------------------------------------------
|
|
422
|
-
/**
|
|
423
|
-
* Delete the currently selected features
|
|
424
|
-
*/
|
|
425
|
-
async _deleteFeatures() {
|
|
426
|
-
this._isDeleting = true;
|
|
427
|
-
const deleteFeatures = this.ids.map((objectId) => {
|
|
428
|
-
return { objectId };
|
|
429
|
-
});
|
|
430
|
-
await this.layer.applyEdits({
|
|
431
|
-
deleteFeatures
|
|
432
|
-
});
|
|
433
|
-
this._isDeleting = false;
|
|
434
|
-
this._close();
|
|
435
|
-
this.editsComplete.emit("delete");
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
* Set the alertOpen member to false when the alert is closed
|
|
439
|
-
*/
|
|
440
|
-
_close() {
|
|
441
|
-
this.open = false;
|
|
442
|
-
this.deleteDialogClose.emit();
|
|
443
|
-
}
|
|
444
|
-
/**
|
|
445
|
-
* Fetches the component's translations
|
|
446
|
-
*
|
|
447
|
-
* @returns Promise when complete
|
|
448
|
-
* @protected
|
|
449
|
-
*/
|
|
450
|
-
async _getTranslations() {
|
|
451
|
-
const messages = await locale.getLocaleComponentStrings(this.el);
|
|
452
|
-
this._translations = messages[0];
|
|
453
|
-
}
|
|
454
|
-
static get watchers() { return {
|
|
455
|
-
"locale": ["localeWatchHandler"]
|
|
456
|
-
}; }
|
|
457
|
-
};
|
|
458
|
-
DeleteDialog.style = DeleteDialogStyle0;
|
|
459
|
-
|
|
460
206
|
exports.calcite_shell = Shell;
|
|
461
|
-
exports.delete_button = DeleteButton;
|
|
462
|
-
exports.delete_dialog = DeleteDialog;
|