@esri/solutions-components 0.7.21 → 0.7.23
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/assets/t9n/public-notification/resources.json +2 -3
- package/dist/assets/t9n/public-notification/resources_en.json +2 -3
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +11 -12
- package/dist/cjs/calcite-alert_3.cjs.entry.js +23 -13
- package/dist/cjs/card-manager_3.cjs.entry.js +124 -91
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/edit-card/edit-card.js +23 -13
- package/dist/collection/components/floor-filter/floor-filter.js +28 -12
- package/dist/collection/components/layer-table/layer-table.js +130 -91
- package/dist/collection/components/public-notification/public-notification.js +1 -1
- package/dist/collection/demos/crowdsource-manager.html +13 -0
- package/dist/components/edit-card2.js +23 -13
- package/dist/components/floor-filter2.js +12 -13
- package/dist/components/layer-table2.js +125 -92
- package/dist/components/public-notification.js +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +11 -12
- package/dist/esm/calcite-alert_3.entry.js +23 -13
- package/dist/esm/card-manager_3.entry.js +124 -91
- package/dist/esm/loader.js +1 -1
- package/dist/esm/public-notification.entry.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-manager.html +13 -0
- package/dist/solutions-components/p-04f05bc5.entry.js +6 -0
- package/dist/solutions-components/{p-d3085b7a.entry.js → p-bacc9b0d.entry.js} +1 -1
- package/dist/solutions-components/{p-a40a1eab.entry.js → p-c634d047.entry.js} +1 -1
- package/dist/solutions-components/p-eff7f407.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/edit-card/edit-card.d.ts +2 -1
- package/dist/types/components/floor-filter/floor-filter.d.ts +13 -0
- package/dist/types/components/layer-table/layer-table.d.ts +19 -3
- package/dist/types/components.d.ts +19 -0
- package/dist/types/preact.d.ts +3 -1
- package/package.json +2 -2
- package/dist/solutions-components/p-5302f406.entry.js +0 -6
- package/dist/solutions-components/p-704da348.entry.js +0 -6
@@ -259,8 +259,11 @@ const LayerTable = class {
|
|
259
259
|
* watch for changes in layer view and verify if it has editing enabled
|
260
260
|
*/
|
261
261
|
async _layerWatchHandler() {
|
262
|
+
var _a, _b;
|
262
263
|
this._fetchingData = true;
|
263
264
|
this._definitionExpression = this._layer.definitionExpression;
|
265
|
+
this._floorField = (_b = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.floorInfo) === null || _b === void 0 ? void 0 : _b.floorField;
|
266
|
+
this._updateFloorDefinitionExpression();
|
264
267
|
await this._resetTable();
|
265
268
|
this._updateShareUrl();
|
266
269
|
this._initLayerExpressions();
|
@@ -324,14 +327,19 @@ const LayerTable = class {
|
|
324
327
|
}
|
325
328
|
/**
|
326
329
|
* Refresh the table when edits are completed
|
327
|
-
*
|
328
330
|
*/
|
329
331
|
async editsComplete() {
|
330
332
|
await this._refresh();
|
331
333
|
}
|
332
334
|
/**
|
333
|
-
* Refresh the table when
|
334
|
-
|
335
|
+
* Refresh the table when floor filter level is changed
|
336
|
+
*/
|
337
|
+
async levelChanged(evt) {
|
338
|
+
this._floorLevel = evt.detail;
|
339
|
+
this._updateFloorDefinitionExpression();
|
340
|
+
}
|
341
|
+
/**
|
342
|
+
* Refresh the table when
|
335
343
|
*/
|
336
344
|
noLayersFound() {
|
337
345
|
this._layer = undefined;
|
@@ -526,93 +534,105 @@ const LayerTable = class {
|
|
526
534
|
const featuresSelected = this._featuresSelected();
|
527
535
|
const featuresEmpty = this._featuresEmpty();
|
528
536
|
const hasFilterExpressions = this._hasFilterExpressions();
|
529
|
-
this.
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
537
|
+
if (this._translations) {
|
538
|
+
this._toolInfos = [{
|
539
|
+
active: false,
|
540
|
+
icon: "zoom-to-object",
|
541
|
+
indicator: false,
|
542
|
+
label: this._translations.zoom,
|
543
|
+
func: () => this._zoom(),
|
544
|
+
disabled: !featuresSelected,
|
545
|
+
isOverflow: false
|
546
|
+
},
|
547
|
+
hasFilterExpressions ? {
|
548
|
+
active: false,
|
549
|
+
icon: "filter",
|
550
|
+
indicator: false,
|
551
|
+
label: this._translations.filters,
|
552
|
+
func: () => this._toggleFilter(),
|
553
|
+
disabled: false,
|
554
|
+
isOverflow: false
|
555
|
+
} : undefined,
|
556
|
+
this._deleteEnabled ? {
|
557
|
+
active: false,
|
558
|
+
icon: "trash",
|
559
|
+
indicator: false,
|
560
|
+
label: this._translations.delete,
|
561
|
+
func: () => this._delete(),
|
562
|
+
disabled: !featuresSelected,
|
563
|
+
isDanger: true,
|
564
|
+
isOverflow: false
|
565
|
+
} : undefined, {
|
566
|
+
active: false,
|
567
|
+
icon: "erase",
|
568
|
+
indicator: false,
|
569
|
+
label: this._translations.clearSelection,
|
570
|
+
func: () => this._clearSelection(),
|
571
|
+
disabled: !featuresSelected,
|
572
|
+
isOverflow: false
|
573
|
+
}, {
|
574
|
+
active: false,
|
575
|
+
icon: "selected-items-filter",
|
576
|
+
indicator: false,
|
577
|
+
label: this._showOnlySelected ? this._translations.showAll : this._translations.showSelected,
|
578
|
+
func: () => this._toggleShowSelected(),
|
579
|
+
disabled: !featuresSelected,
|
580
|
+
isOverflow: false
|
581
|
+
}, {
|
582
|
+
active: false,
|
583
|
+
icon: "list-check-all",
|
584
|
+
indicator: false,
|
585
|
+
func: () => this._selectAll(),
|
586
|
+
label: this._translations.selectAll,
|
587
|
+
disabled: featuresEmpty,
|
588
|
+
isOverflow: false
|
589
|
+
}, {
|
590
|
+
active: false,
|
591
|
+
icon: "compare",
|
592
|
+
indicator: false,
|
593
|
+
func: () => this._switchSelected(),
|
594
|
+
label: this._translations.switchSelected,
|
595
|
+
disabled: featuresEmpty,
|
596
|
+
isOverflow: false
|
597
|
+
}, {
|
598
|
+
active: false,
|
599
|
+
icon: "refresh",
|
600
|
+
indicator: false,
|
601
|
+
func: () => this._refresh(),
|
602
|
+
label: this._translations.refresh,
|
603
|
+
disabled: false,
|
604
|
+
isOverflow: false
|
605
|
+
},
|
606
|
+
this.enableCSV ? {
|
607
|
+
active: false,
|
608
|
+
icon: "export",
|
609
|
+
indicator: false,
|
610
|
+
func: () => void this._exportToCSV(),
|
611
|
+
label: this._translations.exportCSV,
|
612
|
+
disabled: featuresEmpty,
|
613
|
+
isOverflow: false
|
614
|
+
} : undefined, {
|
615
|
+
active: false,
|
616
|
+
icon: this._showHideOpen ? "chevron-down" : "chevron-right",
|
617
|
+
indicator: false,
|
618
|
+
func: () => this._toggleShowHide(),
|
619
|
+
label: this._translations.showHideColumns,
|
620
|
+
disabled: false,
|
621
|
+
isOverflow: false,
|
622
|
+
isSublist: true
|
623
|
+
}];
|
624
|
+
this._defaultVisibleToolSizeInfos = undefined;
|
625
|
+
}
|
626
|
+
}
|
627
|
+
/**
|
628
|
+
* Applies a definition expression when floor field and level are available
|
629
|
+
*
|
630
|
+
* @returns boolean
|
631
|
+
*/
|
632
|
+
_updateFloorDefinitionExpression() {
|
633
|
+
if (this._floorField && this._floorLevel) {
|
634
|
+
this._layer.definitionExpression = `${this._floorField} = '${this._floorLevel}'`;
|
635
|
+
}
|
616
636
|
}
|
617
637
|
/**
|
618
638
|
* Returns true when one ore more features are selected
|
@@ -823,12 +843,21 @@ const LayerTable = class {
|
|
823
843
|
if ((_b = this.mapInfo) === null || _b === void 0 ? void 0 : _b.id) {
|
824
844
|
urlObj.searchParams.set("webmap", this.mapInfo.id);
|
825
845
|
}
|
846
|
+
else {
|
847
|
+
urlObj.searchParams.delete("webmap");
|
848
|
+
}
|
826
849
|
if ((_c = this._layer) === null || _c === void 0 ? void 0 : _c.id) {
|
827
850
|
urlObj.searchParams.set("layer", this._layer.id);
|
828
851
|
}
|
852
|
+
else {
|
853
|
+
urlObj.searchParams.delete("layer");
|
854
|
+
}
|
829
855
|
if (((_d = this._selectedIndexes) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
830
856
|
urlObj.searchParams.set("oid", this._selectedIndexes.join(","));
|
831
857
|
}
|
858
|
+
else {
|
859
|
+
urlObj.searchParams.delete("oid");
|
860
|
+
}
|
832
861
|
if (this._filterActive) {
|
833
862
|
const filter = JSON.parse(this._filterList.urlParams.get("filter"));
|
834
863
|
const layerExpressions = this._filterList.layerExpressions.map(layerExp => {
|
@@ -842,7 +871,11 @@ const LayerTable = class {
|
|
842
871
|
});
|
843
872
|
urlObj.searchParams.set("filter", JSON.stringify(layerExpressions));
|
844
873
|
}
|
874
|
+
else {
|
875
|
+
urlObj.searchParams.delete("filter");
|
876
|
+
}
|
845
877
|
this._shareNode.shareUrl = urlObj.href;
|
878
|
+
history.pushState(history.state, document.title, urlObj.href);
|
846
879
|
}
|
847
880
|
/**
|
848
881
|
* Get a tooltip
|
@@ -1162,7 +1195,7 @@ const LayerTable = class {
|
|
1162
1195
|
*/
|
1163
1196
|
_filterModal() {
|
1164
1197
|
var _a, _b, _c;
|
1165
|
-
return (h("calcite-modal", { "aria-labelledby": "modal-title", class: "modal", kind: "brand", onCalciteModalClose: async () => this._closeFilter(), open: this._filterOpen, widthScale: "s" }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, (_b = (_a = this._translations) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.replace("{{title}}", (_c = this._layer) === null || _c === void 0 ? void 0 : _c.title)), h("div", { slot: "content" }, h("instant-apps-filter-list", { autoUpdateUrl:
|
1198
|
+
return (h("calcite-modal", { "aria-labelledby": "modal-title", class: "modal", kind: "brand", onCalciteModalClose: async () => this._closeFilter(), open: this._filterOpen, widthScale: "s" }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, (_b = (_a = this._translations) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.replace("{{title}}", (_c = this._layer) === null || _c === void 0 ? void 0 : _c.title)), h("div", { slot: "content" }, h("instant-apps-filter-list", { autoUpdateUrl: true, closeBtn: true, closeBtnOnClick: async () => this._closeFilter(), layerExpressions: this._layerExpressions, onFilterListReset: () => this._handleFilterListReset(), onFilterUpdate: () => this._handleFilterUpdate(), ref: (el) => this._filterList = el, view: this.mapView, zoomBtn: false }))));
|
1166
1199
|
}
|
1167
1200
|
/**
|
1168
1201
|
* Reset the filter active prop
|