@esri/solutions-components 0.10.43 → 0.10.45
Sign up to get free protection for your applications and to get access to all the features.
- 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 +42 -8
- 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 +61 -8
- 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 +113 -92
- 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 +42 -8
- 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 +9 -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-a1d8aed8.entry.js +0 -6
- package/dist/solutions-components/p-d7afbe8d.entry.js +0 -11
@@ -225,6 +225,7 @@ const LayerTable = class {
|
|
225
225
|
index.registerInstance(this, hostRef);
|
226
226
|
this.featureSelectionChange = index.createEvent(this, "featureSelectionChange", 7);
|
227
227
|
this.toggleFilter = index.createEvent(this, "toggleFilter", 7);
|
228
|
+
this.showDelete = index.createEvent(this, "showDelete", 7);
|
228
229
|
this.appLayout = undefined;
|
229
230
|
this.defaultGlobalId = undefined;
|
230
231
|
this.defaultLayerId = undefined;
|
@@ -255,7 +256,6 @@ const LayerTable = class {
|
|
255
256
|
this._filterOpen = false;
|
256
257
|
this._layer = undefined;
|
257
258
|
this._selectAllActive = false;
|
258
|
-
this._deleteDialogOpen = false;
|
259
259
|
this._showHideOpen = false;
|
260
260
|
this._showOnlySelected = false;
|
261
261
|
this._toolInfos = undefined;
|
@@ -426,6 +426,10 @@ const LayerTable = class {
|
|
426
426
|
* string the current search expression
|
427
427
|
*/
|
428
428
|
_searchExpression;
|
429
|
+
/**
|
430
|
+
* number[]: selected features from table
|
431
|
+
*/
|
432
|
+
_tempSelectedIds;
|
429
433
|
//--------------------------------------------------------------------------
|
430
434
|
//
|
431
435
|
// Watch handlers
|
@@ -618,6 +622,10 @@ const LayerTable = class {
|
|
618
622
|
* Emitted on demand when filter action is clicked
|
619
623
|
*/
|
620
624
|
toggleFilter;
|
625
|
+
/**
|
626
|
+
* Emitted on demand when when the delete dialog should be shown
|
627
|
+
*/
|
628
|
+
showDelete;
|
621
629
|
/**
|
622
630
|
* Scroll and zoom to the selected feature from the Features widget.
|
623
631
|
*
|
@@ -731,10 +739,10 @@ const LayerTable = class {
|
|
731
739
|
const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
|
732
740
|
const showSearch = this._canShowFullTextSearch();
|
733
741
|
this._validateActiveActions();
|
734
|
-
return (index.h(index.Host, { key: '
|
735
|
-
index.h("div", { key: '
|
742
|
+
return (index.h(index.Host, { key: 'ade26bd309af37b5b9f9bdc355f1cf6c575fa89a' }, index.h("calcite-shell", { key: '95668ae72cde1a3600e17a0d138ba8b810a4c525' }, this._getTableControlRow("header"), index.h("div", { key: '488eabfc4666c0d81aacbac523e7ba20288a4701', class: `width-full ${tableHeightClass}` }, index.h("calcite-panel", { key: '75d01c41afbb872f57472adc76045431163c0cab', class: "height-full width-full" }, showSearch &&
|
743
|
+
index.h("div", { key: 'b6062ca6e5702fc835777a6fe6ecec7a66926bc0', class: "search-container" }, index.h("calcite-input", { key: 'eade11ccb0d7b6d5aed838dbb6b2eaec4286d8c6', class: "search", clearable: true, icon: "search", onCalciteInputChange: (evt) => void this._searchTextChanged(evt), placeholder: this._searchPlaceHolder, title: this._searchPlaceHolder, type: "search" })), index.h("calcite-loader", { key: '889c97b23074f5be4b045199cf48632720d6c598', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { key: '4ac0bfdaf07c38ff57008bade29b4b90b11f437d', class: tableNodeClass, ref: this.onTableNodeCreate }))), !this.isMobile ? (index.h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
|
736
744
|
.replace("{{total}}", total)
|
737
|
-
.replace("{{selected}}", selected))) : undefined), this.createFilterModal && this._filterModal()
|
745
|
+
.replace("{{selected}}", selected))) : undefined), this.createFilterModal && this._filterModal()));
|
738
746
|
}
|
739
747
|
_deleteDialog;
|
740
748
|
/**
|
@@ -794,18 +802,37 @@ const LayerTable = class {
|
|
794
802
|
*
|
795
803
|
*/
|
796
804
|
async _searchFullText() {
|
805
|
+
let selectedIds = [];
|
806
|
+
let showSelected = false;
|
807
|
+
if (this._showOnlySelected) {
|
808
|
+
selectedIds = this._tempSelectedIds;
|
809
|
+
showSelected = true;
|
810
|
+
}
|
811
|
+
else {
|
812
|
+
this._clearSelection();
|
813
|
+
this._tempSelectedIds = [];
|
814
|
+
}
|
797
815
|
//always clear previous search definition
|
798
816
|
if (this._searchExpression) {
|
799
817
|
this._clearSearchDefinitionExpression();
|
800
818
|
}
|
819
|
+
let searchedIds = [];
|
801
820
|
if (this._fullTextSearchInfo.length) {
|
802
821
|
if (this._fullTextSearchInfo[0].searchTerm) {
|
803
822
|
const searchQueryParams = this._layer.createQuery();
|
804
823
|
searchQueryParams.fullText = this._fullTextSearchInfo;
|
805
|
-
|
824
|
+
searchedIds = await this._layer.queryObjectIds(searchQueryParams);
|
825
|
+
if (showSelected && selectedIds?.length) {
|
826
|
+
searchedIds = searchedIds.filter((id) => selectedIds.includes(id));
|
827
|
+
}
|
806
828
|
await this._updateSearchDefinitionExpression(searchedIds?.length ? searchedIds : [-1]);
|
807
829
|
}
|
808
830
|
}
|
831
|
+
// highlight the feature only when selected feature is present in applied filter
|
832
|
+
if (showSelected && searchedIds?.length) {
|
833
|
+
this._showOnlySelected = true;
|
834
|
+
this._table.highlightIds.addMany(searchedIds.reverse());
|
835
|
+
}
|
809
836
|
//Added timeout and table.refresh() to avoid the issue in which we see empty table records after searching in combination to filter/reset filter
|
810
837
|
await new Promise(resolve => setTimeout(resolve, 800));
|
811
838
|
await this._updateAllIds();
|
@@ -1311,7 +1338,9 @@ const LayerTable = class {
|
|
1311
1338
|
*
|
1312
1339
|
*/
|
1313
1340
|
_showDelete() {
|
1314
|
-
this.
|
1341
|
+
this.showDelete.emit({
|
1342
|
+
ids: this._getIds()
|
1343
|
+
});
|
1315
1344
|
}
|
1316
1345
|
/**
|
1317
1346
|
* Get an action and tooltip for share
|
@@ -1389,7 +1418,7 @@ const LayerTable = class {
|
|
1389
1418
|
*/
|
1390
1419
|
_getDangerAction(icon, label, func, disabled) {
|
1391
1420
|
const _disabled = this._layer === undefined ? true : disabled;
|
1392
|
-
return (index.h("div", { class: "display-flex", id: this._getId(icon) },
|
1421
|
+
return (index.h("div", { class: "display-flex", id: this._getId(icon) }, (index.h("calcite-action", { appearance: "solid", compact: true, disabled: _disabled, id: icon, onClick: func, text: "" }, index.h("calcite-button", { appearance: "transparent", iconStart: icon, kind: "danger" }, label))), this._getToolTip("bottom", icon, label)));
|
1393
1422
|
}
|
1394
1423
|
/**
|
1395
1424
|
* Return all currently selected IDs from the table
|
@@ -1425,6 +1454,7 @@ const LayerTable = class {
|
|
1425
1454
|
highlightEnabled: true,
|
1426
1455
|
multiSortEnabled: false,
|
1427
1456
|
visibleElements: {
|
1457
|
+
columnDescriptions: false,
|
1428
1458
|
header: false,
|
1429
1459
|
menu: false
|
1430
1460
|
},
|
@@ -1455,6 +1485,7 @@ const LayerTable = class {
|
|
1455
1485
|
// only readd in specific case where we have multiple selected and then click one of the currently selected
|
1456
1486
|
const reAdd = this.selectedIds.length > 1 && evt.removed.length === 1;
|
1457
1487
|
const newIds = reAdd ? evt.removed : ids.filter(id => this.selectedIds.indexOf(id) < 0);
|
1488
|
+
this._tempSelectedIds = newIds.length ? [...newIds] : [...this.selectedIds];
|
1458
1489
|
this._clearSelection();
|
1459
1490
|
this.selectedIds = [...newIds];
|
1460
1491
|
if (newIds.length > 0) {
|
@@ -1467,10 +1498,12 @@ const LayerTable = class {
|
|
1467
1498
|
else {
|
1468
1499
|
// https://github.com/Esri/solutions-components/issues/365
|
1469
1500
|
this.selectedIds = ids.reverse();
|
1501
|
+
this._tempSelectedIds = [...this.selectedIds];
|
1470
1502
|
}
|
1471
1503
|
}
|
1472
1504
|
else if (this._ctrlIsPressed) {
|
1473
1505
|
this.selectedIds = ids.reverse();
|
1506
|
+
this._tempSelectedIds = [...this.selectedIds];
|
1474
1507
|
}
|
1475
1508
|
else if (this._shiftIsPressed && ids?.length > 0) {
|
1476
1509
|
this._skipOnChange = true;
|
@@ -1507,6 +1540,7 @@ const LayerTable = class {
|
|
1507
1540
|
}, []);
|
1508
1541
|
const selectedIds = _start < _end ? idsInRange.reverse() : idsInRange;
|
1509
1542
|
this.selectedIds = [...new Set([...selectedIds, ...this.selectedIds])];
|
1543
|
+
this._tempSelectedIds = [...this.selectedIds];
|
1510
1544
|
this._table.highlightIds.addMany(this.selectedIds.filter(i => ids.indexOf(i) < 0));
|
1511
1545
|
}
|
1512
1546
|
}
|
@@ -2469,7 +2503,7 @@ const MapCard = class {
|
|
2469
2503
|
const mapHeightClass = this.mapInfos?.length > 1 || this.isMapLayout ? "map-height" : "height-full";
|
2470
2504
|
const progressClass = this.isMapLayout ? "" : "display-none";
|
2471
2505
|
this._validateActiveActions();
|
2472
|
-
return (index.h(index.Host, { key: '
|
2506
|
+
return (index.h(index.Host, { key: '5861d407b8529c6834d5d05450693d1fff2b71ee' }, index.h("div", { key: '01e028e8a00fc66d5eaa8eb7f85b58d579c3e7ff', class: `${mapContainerClass} width-full`, ref: (el) => this._toolbar = el }, this._getActionBar(), !this.isMobile && this.isMapLayout && this._getDropdown("more-table-options"), this.enableShare && !this.isMobile && this.isMapLayout ? this._getShare("share") : undefined), index.h("calcite-progress", { key: '6a0b7a2a734f3631b8c8a712acaf60a9e95c6c16', class: progressClass, value: 0 }), index.h("div", { key: '74cebf9c194bfc5b72be3b397821f586a5923fa4', class: `${mapHeightClass} ${mapClass}`, ref: (el) => (this._mapDiv = el) }), index.h("map-tools", { key: '6c87207eecaacf61c594f1036af38c0548ea1767', basemapConfig: this.basemapConfig, class: `box-shadow ${themeClass}`, enableBasemap: this.enableBasemap, enableFloorFilter: this.enableFloorFilter, enableFullscreen: this.enableFullscreen, enableHome: this.enableHome, enableLegend: this.enableLegend, enableSearch: this.enableSearch, enableSingleExpand: this.enableSingleExpand, homeZoomToolsSize: this.homeZoomToolsSize, locale: this.locale, mapView: this.mapView, mapWidgetsSize: this.mapWidgetsSize, position: this.mapWidgetsPosition, ref: (el) => this._mapTools = el, searchConfiguration: this._searchConfiguration, stackTools: this.stackTools, toolOrder: this.toolOrder })));
|
2473
2507
|
}
|
2474
2508
|
/**
|
2475
2509
|
* Called each time after the component is loaded
|
@@ -14,7 +14,7 @@ const mapViewUtils = require('./mapViewUtils-18c46b84.js');
|
|
14
14
|
require('./esri-loader-08dc41bd.js');
|
15
15
|
require('./_commonjsHelpers-baf43783.js');
|
16
16
|
|
17
|
-
const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-right{border-right:2px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.position-absolute{position:absolute}.position-sticky{position:sticky}.height-50{height:50%}.top-51{top:51px}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-51{height:calc(100% - 51px)}.display-none{display:none !important}.adjusted-height-50_25{height:calc(50% + 25px)}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-50-px{height:50px}.padding-inline-start-75{padding-inline-start:0.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button{width:40px !important;height:40px !important}.esri-floor-filter__level-button{width:40px !important;height:40px !important}.esri-floor-filter__browse-button{width:40px !important;height:40px !important}.position-absolute-50{position:absolute;top:50px;bottom:0px;left:0px;right:0px}.position-absolute-0{position:absolute;top:0px;bottom:0px;left:0px;right:0px}.visibility-hidden{visibility:hidden;height:0px}.position-fixed{position:fixed}.border-width-0{border-width:0px}.border-bottom-width-0{border-bottom-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;right:0;margin:100px 0px}.floating-container .floating-button{box-shadow:0 10px 25px rgb(92 93 94 / 60%);transform:translatey(5px);transition:all 0.3s}.z-index-0{z-index:0 !important}";
|
17
|
+
const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-right{border-right:2px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.position-absolute{position:absolute}.position-sticky{position:sticky}.height-50{height:50%}.top-51{top:51px}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-51{height:calc(100% - 51px)}.display-none{display:none !important}.adjusted-height-50_25{height:calc(50% + 25px)}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-50-px{height:50px}.padding-inline-start-75{padding-inline-start:0.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button{width:40px !important;height:40px !important}.esri-floor-filter__level-button{width:40px !important;height:40px !important}.esri-floor-filter__browse-button{width:40px !important;height:40px !important}.position-absolute-50{position:absolute;top:50px;bottom:0px;left:0px;right:0px}.position-absolute-0{position:absolute;top:0px;bottom:0px;left:0px;right:0px}.visibility-hidden{visibility:hidden;height:0px}.position-fixed{position:fixed}.border-width-0{border-width:0px}.border-bottom-width-0{border-bottom-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;right:0;margin:100px 0px}.floating-container .floating-button{box-shadow:0 10px 25px rgb(92 93 94 / 60%);transform:translatey(5px);transition:all 0.3s}.z-index-0{z-index:0 !important}.z-index-1{z-index:1 !important}";
|
18
18
|
const CrowdsourceManagerStyle0 = crowdsourceManagerCss;
|
19
19
|
|
20
20
|
const CrowdsourceManager = class {
|
@@ -60,6 +60,7 @@ const CrowdsourceManager = class {
|
|
60
60
|
this.theme = "light";
|
61
61
|
this.zoomAndScrollToSelected = false;
|
62
62
|
this.zoomToScale = undefined;
|
63
|
+
this._deleteDialogOpen = false;
|
63
64
|
this._enableCreateFeatures = true;
|
64
65
|
this._hideFooter = false;
|
65
66
|
this._hideTable = false;
|
@@ -97,6 +98,10 @@ const CrowdsourceManager = class {
|
|
97
98
|
* MapView.when is not fired when mapView is not currently visible
|
98
99
|
*/
|
99
100
|
_defaultLevelHonored = false;
|
101
|
+
/**
|
102
|
+
* number[]: the ids to be deleted
|
103
|
+
*/
|
104
|
+
_deleteIds;
|
100
105
|
/**
|
101
106
|
* HTMLLayerTableElement: The layer table element
|
102
107
|
*/
|
@@ -228,6 +233,13 @@ const CrowdsourceManager = class {
|
|
228
233
|
this._isLoading = false;
|
229
234
|
});
|
230
235
|
}
|
236
|
+
/**
|
237
|
+
* Get the feature ids and open the delete dialog
|
238
|
+
*/
|
239
|
+
async showDelete(evt) {
|
240
|
+
this._deleteIds = evt.detail.ids;
|
241
|
+
this._deleteDialogOpen = true;
|
242
|
+
}
|
231
243
|
/**
|
232
244
|
* Get the layer ids from the map
|
233
245
|
*/
|
@@ -254,7 +266,7 @@ const CrowdsourceManager = class {
|
|
254
266
|
render() {
|
255
267
|
// only avoid border when we have a header color that is not white
|
256
268
|
const borderClass = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "";
|
257
|
-
return (index.h(index.Host, { key: '
|
269
|
+
return (index.h(index.Host, { key: '8f8d68ca8cd5e170196639cda11b61d64a8e6050' }, index.h("calcite-shell", { key: '351696228f10d637c4c033d857dc2e169d33bcb5', class: "position-relative" }, index.h("calcite-panel", { key: 'b77a1b4d4d15f466cf2650d86f084c150b8aaa86', class: `width-full height-full ${borderClass}`, loading: this._isLoading }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter()), this._filterModal(), this._deleteModal()));
|
258
270
|
}
|
259
271
|
/**
|
260
272
|
* Called after each render
|
@@ -434,7 +446,7 @@ const CrowdsourceManager = class {
|
|
434
446
|
_getMapAndCard(layoutMode, panelOpen, hideTable) {
|
435
447
|
const mapSizeClass = this._getMapSizeClass(layoutMode, panelOpen, hideTable);
|
436
448
|
const borderRight = !this._isPortraitMobile && this._isMobile ? "border-right" : "";
|
437
|
-
return (index.h("div", { class: `${mapSizeClass} overflow-hidden ${borderRight}` }, this._getMapNode(panelOpen), this._getPopupExpandNode()));
|
449
|
+
return (index.h("div", { class: `${mapSizeClass} overflow-hidden z-index-1 ${borderRight}` }, this._getMapNode(panelOpen), this._getPopupExpandNode()));
|
438
450
|
}
|
439
451
|
/**
|
440
452
|
* Get the map node based for the current layout options
|
@@ -459,7 +471,7 @@ const CrowdsourceManager = class {
|
|
459
471
|
* @protected
|
460
472
|
*/
|
461
473
|
_getPopupExpandNode() {
|
462
|
-
const popupNodeClass = this._isMobile ? "height-full" : "height-full position-relative
|
474
|
+
const popupNodeClass = this._isMobile ? "height-full" : "height-full position-relative";
|
463
475
|
const headerClass = this._isPortraitMobile && this._showInformationHeader ? "display-none height-0" : "";
|
464
476
|
const headerTheme = this.popupHeaderColor ? "" : !this._isPortraitMobile ? "calcite-mode-dark" : "calcite-mode-light";
|
465
477
|
const containerClass = this._isPortraitMobile && this._hideTable ? "position-absolute-0 width-full height-full" : this._isPortraitMobile ? "display-none height-0" : "";
|
@@ -526,6 +538,15 @@ const CrowdsourceManager = class {
|
|
526
538
|
const id = "toggle-layout";
|
527
539
|
return (index.h(index.Fragment, null, index.h("calcite-action", { active: this.appLayout === 'splitView', class: "toggle-node", icon: "browser", id: "browser-action", onClick: () => { this.appLayout = "splitView"; }, text: "" }), index.h("calcite-tooltip", { placement: "right", "reference-element": "browser-action" }, index.h("span", null, this._translations.splitView)), index.h("calcite-action", { active: this.appLayout === 'tableView', class: "toggle-node", icon: "dock-left", id: "dock-left-action", onClick: () => { this.appLayout = "tableView"; }, text: "" }), index.h("calcite-tooltip", { placement: "right", "reference-element": "dock-left-action" }, index.h("span", null, this._translations.tableView)), index.h("calcite-action", { active: this.appLayout === 'mapView', class: "toggle-node", disabled: this._layerIds?.length === 0, icon: "browser-map", id: "browser-map-action", onClick: () => { this.appLayout = "mapView"; }, text: "" }), index.h("calcite-tooltip", { placement: "right", "reference-element": "browser-map-action" }, index.h("span", null, this._translations.mapView)), index.h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), slot: "actions-end", text: "" }), index.h("calcite-tooltip", { placement: "bottom", "reference-element": id }, index.h("span", null, tooltip))));
|
528
540
|
}
|
541
|
+
/**
|
542
|
+
* Show delete dialog
|
543
|
+
*
|
544
|
+
* @returns node that will support delete or keep of the features
|
545
|
+
* @protected
|
546
|
+
*/
|
547
|
+
_deleteModal() {
|
548
|
+
return (index.h("delete-dialog", { id: "deleteDialogId", ids: this._deleteIds, layer: this._layer, locale: this.locale, onDeleteDialogClose: () => this._deleteDialogOpen = false, open: this._deleteDialogOpen }));
|
549
|
+
}
|
529
550
|
/**
|
530
551
|
* Show filter component in modal
|
531
552
|
*
|
@@ -0,0 +1,131 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
'use strict';
|
7
|
+
|
8
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
9
|
+
|
10
|
+
const index = require('./index-4b68e4b4.js');
|
11
|
+
const locale = require('./locale-339b55f0.js');
|
12
|
+
require('./esri-loader-08dc41bd.js');
|
13
|
+
require('./_commonjsHelpers-baf43783.js');
|
14
|
+
|
15
|
+
const deleteDialogCss = ":host{display:block}.delete-modal{position:fixed}";
|
16
|
+
const DeleteDialogStyle0 = deleteDialogCss;
|
17
|
+
|
18
|
+
const DeleteDialog = class {
|
19
|
+
constructor(hostRef) {
|
20
|
+
index.registerInstance(this, hostRef);
|
21
|
+
this.editsComplete = index.createEvent(this, "editsComplete", 7);
|
22
|
+
this.deleteDialogClose = index.createEvent(this, "deleteDialogClose", 7);
|
23
|
+
this.ids = [];
|
24
|
+
this.layer = undefined;
|
25
|
+
this.locale = undefined;
|
26
|
+
this.open = false;
|
27
|
+
this._isDeleting = false;
|
28
|
+
this._translations = undefined;
|
29
|
+
}
|
30
|
+
get el() { return index.getElement(this); }
|
31
|
+
//--------------------------------------------------------------------------
|
32
|
+
//
|
33
|
+
// Properties (protected)
|
34
|
+
//
|
35
|
+
//--------------------------------------------------------------------------
|
36
|
+
//--------------------------------------------------------------------------
|
37
|
+
//
|
38
|
+
// Watch handlers
|
39
|
+
//
|
40
|
+
//--------------------------------------------------------------------------
|
41
|
+
/**
|
42
|
+
* Fetch translations when the locale is updated
|
43
|
+
*/
|
44
|
+
async localeWatchHandler() {
|
45
|
+
// to support url param and language switcher
|
46
|
+
this.el.lang = this.locale;
|
47
|
+
await this._getTranslations();
|
48
|
+
}
|
49
|
+
//--------------------------------------------------------------------------
|
50
|
+
//
|
51
|
+
// Methods (public)
|
52
|
+
//
|
53
|
+
//--------------------------------------------------------------------------
|
54
|
+
//--------------------------------------------------------------------------
|
55
|
+
//
|
56
|
+
// Events (public)
|
57
|
+
//
|
58
|
+
//--------------------------------------------------------------------------
|
59
|
+
/**
|
60
|
+
* Emitted on demand when features have been deleted
|
61
|
+
*/
|
62
|
+
editsComplete;
|
63
|
+
/**
|
64
|
+
* Emitted on demand when features have been deleted
|
65
|
+
*/
|
66
|
+
deleteDialogClose;
|
67
|
+
//--------------------------------------------------------------------------
|
68
|
+
//
|
69
|
+
// Functions (lifecycle)
|
70
|
+
//
|
71
|
+
//--------------------------------------------------------------------------
|
72
|
+
/**
|
73
|
+
* StencilJS: Called once just after the component is first connected to the DOM.
|
74
|
+
*
|
75
|
+
* @returns Promise when complete
|
76
|
+
*/
|
77
|
+
async componentWillLoad() {
|
78
|
+
await this._getTranslations();
|
79
|
+
}
|
80
|
+
/**
|
81
|
+
* Renders the component.
|
82
|
+
*/
|
83
|
+
render() {
|
84
|
+
const confirmMessage = this.ids.length === 1 ? this._translations?.confirmSingle :
|
85
|
+
this._translations?.confirmMultiple;
|
86
|
+
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))));
|
87
|
+
}
|
88
|
+
//--------------------------------------------------------------------------
|
89
|
+
//
|
90
|
+
// Functions (protected)
|
91
|
+
//
|
92
|
+
//--------------------------------------------------------------------------
|
93
|
+
/**
|
94
|
+
* Delete the currently selected features
|
95
|
+
*/
|
96
|
+
async _deleteFeatures() {
|
97
|
+
this._isDeleting = true;
|
98
|
+
const deleteFeatures = this.ids.map((objectId) => {
|
99
|
+
return { objectId };
|
100
|
+
});
|
101
|
+
await this.layer.applyEdits({
|
102
|
+
deleteFeatures
|
103
|
+
});
|
104
|
+
this._isDeleting = false;
|
105
|
+
this._close();
|
106
|
+
this.editsComplete.emit("delete");
|
107
|
+
}
|
108
|
+
/**
|
109
|
+
* Set the alertOpen member to false when the alert is closed
|
110
|
+
*/
|
111
|
+
_close() {
|
112
|
+
this.open = false;
|
113
|
+
this.deleteDialogClose.emit();
|
114
|
+
}
|
115
|
+
/**
|
116
|
+
* Fetches the component's translations
|
117
|
+
*
|
118
|
+
* @returns Promise when complete
|
119
|
+
* @protected
|
120
|
+
*/
|
121
|
+
async _getTranslations() {
|
122
|
+
const messages = await locale.getLocaleComponentStrings(this.el);
|
123
|
+
this._translations = messages[0];
|
124
|
+
}
|
125
|
+
static get watchers() { return {
|
126
|
+
"locale": ["localeWatchHandler"]
|
127
|
+
}; }
|
128
|
+
};
|
129
|
+
DeleteDialog.style = DeleteDialogStyle0;
|
130
|
+
|
131
|
+
exports.delete_dialog = DeleteDialog;
|