@esri/solutions-components 0.11.17 → 0.11.18
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/card-manager_3.cjs.entry.js +116 -137
- package/dist/cjs/create-feature_4.cjs.entry.js +55 -9
- package/dist/cjs/create-related-feature_3.cjs.entry.js +1 -1
- package/dist/cjs/crowdsource-manager.cjs.entry.js +32 -19
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +1 -1
- package/dist/cjs/{downloadUtils-88ec0e88.js → downloadUtils-9abff913.js} +1 -1
- package/dist/cjs/feature-list.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-layer-picker.cjs.entry.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
- package/dist/cjs/{mapViewUtils-319df9ec.js → mapViewUtils-4ea7216c.js} +0 -44
- package/dist/cjs/{popupUtils-ca1127aa.js → popupUtils-fc7557da.js} +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +2 -2
- package/dist/cjs/solution-item-accordion.cjs.entry.js +6 -3
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/assets/t9n/crowdsource-manager/resources.json +4 -1
- package/dist/collection/assets/t9n/crowdsource-manager/resources_en.json +4 -1
- package/dist/collection/components/card-manager/card-manager.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +23 -0
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +32 -18
- package/dist/collection/components/info-card/info-card.js +88 -7
- package/dist/collection/components/layer-table/layer-table.js +147 -137
- package/dist/collection/components/solution-item-accordion/solution-item-accordion.js +11 -4
- package/dist/components/card-manager2.js +1 -1
- package/dist/components/crowdsource-manager.js +33 -19
- package/dist/components/info-card2.js +54 -6
- package/dist/components/layer-table2.js +116 -136
- package/dist/components/map-select-tools2.js +1 -1
- package/dist/components/queryUtils.js +1 -43
- package/dist/components/refine-selection2.js +1 -1
- package/dist/components/solution-item-accordion.js +6 -3
- package/dist/esm/card-manager_3.entry.js +116 -137
- package/dist/esm/create-feature_4.entry.js +55 -9
- package/dist/esm/create-related-feature_3.entry.js +1 -1
- package/dist/esm/crowdsource-manager.entry.js +32 -19
- package/dist/esm/crowdsource-reporter.entry.js +1 -1
- package/dist/esm/{downloadUtils-22a8f2d8.js → downloadUtils-36d854d2.js} +1 -1
- package/dist/esm/feature-list.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-layer-picker.entry.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +2 -2
- package/dist/esm/{mapViewUtils-a854e298.js → mapViewUtils-9da9be1c.js} +1 -43
- package/dist/esm/{popupUtils-1314cb13.js → popupUtils-64d25cb0.js} +1 -1
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solution-item-accordion.entry.js +6 -3
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/assets/t9n/crowdsource-manager/resources.json +4 -1
- package/dist/solutions-components/assets/t9n/crowdsource-manager/resources_en.json +4 -1
- package/dist/solutions-components/{p-43d9bb7d.entry.js → p-055706e3.entry.js} +1 -1
- package/dist/solutions-components/{p-8ea0a36a.entry.js → p-06970873.entry.js} +1 -1
- package/dist/solutions-components/{p-bf2598f8.entry.js → p-3c43839b.entry.js} +1 -1
- package/dist/solutions-components/{p-4f514c6d.js → p-6eab9d1f.js} +1 -1
- package/dist/solutions-components/{p-a003600b.entry.js → p-72ae3bf0.entry.js} +1 -1
- package/dist/solutions-components/p-777ed6b0.entry.js +6 -0
- package/dist/solutions-components/{p-5ea1e18b.entry.js → p-8b5c3c9f.entry.js} +1 -1
- package/dist/solutions-components/{p-1fe3577a.entry.js → p-a44815ea.entry.js} +1 -1
- package/dist/solutions-components/p-b1bd3028.entry.js +6 -0
- package/dist/solutions-components/{p-3c3aecdd.js → p-d0d21a1f.js} +1 -1
- package/dist/solutions-components/{p-952da957.js → p-dcd2f00b.js} +2 -2
- package/dist/solutions-components/{p-bc2548ba.entry.js → p-e2270562.entry.js} +1 -1
- package/dist/solutions-components/p-e90c0e26.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components_commit.txt +6 -6
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +11 -7
- package/dist/types/components/info-card/info-card.d.ts +16 -0
- package/dist/types/components/layer-table/layer-table.d.ts +32 -21
- package/dist/types/components/solution-item-accordion/solution-item-accordion.d.ts +1 -1
- package/dist/types/components.d.ts +19 -2
- package/dist/types/preact.d.ts +2 -1
- package/package.json +1 -1
- package/dist/solutions-components/p-87919d6d.entry.js +0 -6
- package/dist/solutions-components/p-b37be371.entry.js +0 -6
- package/dist/solutions-components/p-ce8377c6.entry.js +0 -6
@@ -26,7 +26,7 @@ import { d as defineCustomElement$4 } from './map-picker2.js';
|
|
26
26
|
import { d as defineCustomElement$3 } from './map-search2.js';
|
27
27
|
import { d as defineCustomElement$2 } from './map-tools2.js';
|
28
28
|
|
29
|
-
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}.filter-content-space{--calcite-dialog-content-space:0px}";
|
29
|
+
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}.filter-content-space{--calcite-dialog-content-space:0px}.background-dark{background:var(--calcite-color-background)}.filter-extent-container{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.filter-modal-buttons{display:flex;padding:12px;gap:10px}.filter-extent-message{align-items:center;display:flex;gap:5px}";
|
30
30
|
const CrowdsourceManagerStyle0 = crowdsourceManagerCss;
|
31
31
|
|
32
32
|
const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceManager extends HTMLElement {
|
@@ -282,6 +282,10 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
282
282
|
* boolean: if true panel will be in loading state
|
283
283
|
*/
|
284
284
|
_isLoading = true;
|
285
|
+
/**
|
286
|
+
* boolean: if true map extent filter is applied
|
287
|
+
*/
|
288
|
+
_mapExtentFilterChecked;
|
285
289
|
//--------------------------------------------------------------------------
|
286
290
|
//
|
287
291
|
// Properties (protected)
|
@@ -348,6 +352,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
348
352
|
*/
|
349
353
|
appLayoutWatchHandler(newAppLayout, oldAppLayout) {
|
350
354
|
if (newAppLayout !== oldAppLayout) {
|
355
|
+
this._layerTable.validateTableUpdate(newAppLayout === 'splitView');
|
351
356
|
this._setActiveLayout(newAppLayout);
|
352
357
|
// update the layer if table selected while switching to map view
|
353
358
|
if (this.appLayout === "mapView" && this._layer?.isTable) {
|
@@ -433,6 +438,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
433
438
|
}
|
434
439
|
this._layer = layer;
|
435
440
|
this._initLayerExpressions();
|
441
|
+
this._handleFilterListReset();
|
436
442
|
this._isLoading = false;
|
437
443
|
});
|
438
444
|
}
|
@@ -469,7 +475,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
469
475
|
render() {
|
470
476
|
// only avoid border when we have a header color that is not white
|
471
477
|
const borderClass = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "";
|
472
|
-
return (h(Host, { key: '
|
478
|
+
return (h(Host, { key: 'ad9bee93d8478b4bdbfe93716471d3270c274b35' }, h("calcite-shell", { key: '2a8a2d5c316238db649fff0b769e0c578d395391', class: "position-relative" }, h("calcite-panel", { key: '15c1e4159de917fdd60412bf588857157af4431c', class: `width-full height-full ${borderClass}`, loading: this._isLoading }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter()), this._filterModal(), this._deleteModal()));
|
473
479
|
}
|
474
480
|
/**
|
475
481
|
* Called after each render
|
@@ -750,6 +756,20 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
750
756
|
_deleteModal() {
|
751
757
|
return (h("delete-dialog", { id: "deleteDialogId", ids: this._deleteIds, layer: this._layer, locale: this.locale, onDeleteDialogClose: () => this._deleteDialogOpen = false, open: this._deleteDialogOpen }));
|
752
758
|
}
|
759
|
+
/**
|
760
|
+
* Shows the map extent filter
|
761
|
+
* @returns map extent filter
|
762
|
+
* @protected
|
763
|
+
*/
|
764
|
+
_mapExtentFilter() {
|
765
|
+
const showButtons = this._layerExpressions?.length === 0;
|
766
|
+
return (h("calcite-panel", null, h("div", null, h("calcite-block", { class: this.theme === "dark" ? "background-dark" : "", heading: '', "menu-placement": 'bottom-end', open: true }, h("div", { class: "filter-extent-container" }, h("div", { class: "filter-extent-message" }, h("span", null, this._translations.filterByExtentMsg, " "), h("calcite-icon", { icon: "information", id: "filter-message-info", scale: "s" }), h("calcite-tooltip", { overlayPositioning: "fixed", placement: "top", "reference-element": "filter-message-info" }, this._translations.filterByExtentTooltipMsg)), h("calcite-switch", { checked: this._mapExtentFilterChecked, onCalciteSwitchChange: (e) => {
|
767
|
+
const active = e.target.checked || this._filterList?.filterCount > 0;
|
768
|
+
void this._layerTable.filterUpdate(active, e.target.checked);
|
769
|
+
this._mapExtentFilterChecked = e.target.checked;
|
770
|
+
}, scale: "m" }))), showButtons &&
|
771
|
+
h("div", { class: "filter-modal-buttons", slot: "footer" }, h("calcite-button", { appearance: "outline", onClick: this._handleFilterListReset.bind(this), width: "full" }, this._translations.Resetfilter), h("calcite-button", { onClick: this._closeFilter.bind(this), width: "full" }, this._translations.close)))));
|
772
|
+
}
|
753
773
|
/**
|
754
774
|
* Show filter component in modal
|
755
775
|
*
|
@@ -757,10 +777,12 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
757
777
|
* @protected
|
758
778
|
*/
|
759
779
|
_filterModal() {
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
780
|
+
const showFilterModal = this._layerExpressions?.length > 0;
|
781
|
+
return (h("calcite-dialog", { class: "filter-content-space", heading: this._translations?.filter?.replace("{{title}}", this._layer?.title), id: "solutions-filter-dialog", kind: "brand", modal: true, onCalciteDialogClose: () => void this._closeFilter(), open: this._filterOpen, widthScale: "s" }, this._mapExtentFilter(), showFilterModal && h("instant-apps-filter-list", { autoUpdateUrl: false, closeBtn: true, closeBtnOnClick: async () => this._closeFilter(), comboboxOverlayPositioning: "fixed", layerExpressions: this._layerExpressions, onFilterListReset: this._handleFilterListReset.bind(this), onFilterUpdate: async () => {
|
782
|
+
const active = this._filterList.filterCount > 0 || this._mapExtentFilterChecked;
|
783
|
+
await this._layerTable?.filterUpdate(active);
|
784
|
+
await this._mapCard.updateFilterState(active);
|
785
|
+
}, ref: (el) => this._filterList = el, view: this._mapView, zoomBtn: false })));
|
764
786
|
}
|
765
787
|
/**
|
766
788
|
* Store any filters for the current layer.
|
@@ -771,7 +793,6 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
771
793
|
_initLayerExpressions() {
|
772
794
|
const layerExpressions = this._mapInfo?.filterConfig?.layerExpressions;
|
773
795
|
this._layerExpressions = layerExpressions ? layerExpressions.filter((exp) => exp.id === this._layer?.id) : [];
|
774
|
-
this._filterList.layerExpressions = this._layerExpressions;
|
775
796
|
this._layerExpressions.filter(lyrExp => {
|
776
797
|
return lyrExp.expressions.filter(exp => exp.active).length > 0;
|
777
798
|
}).length > 0;
|
@@ -785,11 +806,13 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
785
806
|
this._filterOpen = !this._filterOpen;
|
786
807
|
}
|
787
808
|
/**
|
788
|
-
* Reset the
|
809
|
+
* Reset the applied filters
|
789
810
|
*
|
790
811
|
* @protected
|
791
812
|
*/
|
792
813
|
_handleFilterListReset() {
|
814
|
+
this._mapExtentFilterChecked = false;
|
815
|
+
void this._mapCard.resetFilter();
|
793
816
|
void this._layerTable.filterReset();
|
794
817
|
}
|
795
818
|
/**
|
@@ -803,16 +826,6 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
803
826
|
void this._layerTable.closeFilter();
|
804
827
|
}
|
805
828
|
}
|
806
|
-
/**
|
807
|
-
* Update the filter state
|
808
|
-
*
|
809
|
-
* @protected
|
810
|
-
*/
|
811
|
-
async _updateFilter() {
|
812
|
-
const active = this._filterList.filterCount > 0;
|
813
|
-
await this._layerTable?.filterUpdate(active);
|
814
|
-
await this._mapCard.updateFilterState(active);
|
815
|
-
}
|
816
829
|
/**
|
817
830
|
* Update the component layout when its size changes
|
818
831
|
*
|
@@ -1010,7 +1023,8 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
1010
1023
|
"_filterOpen": [32],
|
1011
1024
|
"_showInformationHeader": [32],
|
1012
1025
|
"_layerIds": [32],
|
1013
|
-
"_isLoading": [32]
|
1026
|
+
"_isLoading": [32],
|
1027
|
+
"_mapExtentFilterChecked": [32]
|
1014
1028
|
}, [[8, "featureSelectionChange", "featureSelectionChange"], [8, "popupClosed", "popupClosed"], [8, "layoutChanged", "layoutChanged"], [8, "mapChanged", "mapChanged"], [8, "layerSelectionChange", "layerSelectionChange"], [8, "showDelete", "showDelete"], [8, "idsFound", "idsFound"]], {
|
1015
1029
|
"appLayout": ["appLayoutWatchHandler"],
|
1016
1030
|
"enableZoom": ["enableZoomWatchHandler"],
|
@@ -19,6 +19,7 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
19
19
|
super();
|
20
20
|
this.__registerHost();
|
21
21
|
this.popupClosed = createEvent(this, "popupClosed", 7);
|
22
|
+
this.clearSelection = createEvent(this, "clearSelection", 7);
|
22
23
|
this.selectionChanged = createEvent(this, "selectionChanged", 7);
|
23
24
|
}
|
24
25
|
get el() { return this; }
|
@@ -67,6 +68,10 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
67
68
|
* string: Set the position of the feature info
|
68
69
|
*/
|
69
70
|
position = 'absolute';
|
71
|
+
/**
|
72
|
+
* boolean: If true show close button on the feature info
|
73
|
+
*/
|
74
|
+
showCloseBtn = false;
|
70
75
|
//--------------------------------------------------------------------------
|
71
76
|
//
|
72
77
|
// State (internal)
|
@@ -99,6 +104,10 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
99
104
|
* All UI strings should be defined here.
|
100
105
|
*/
|
101
106
|
_translations;
|
107
|
+
/**
|
108
|
+
* boolean: When true user has been navigated to related feature
|
109
|
+
*/
|
110
|
+
_navigatedToRelatedFeature;
|
102
111
|
//--------------------------------------------------------------------------
|
103
112
|
//
|
104
113
|
// Properties (protected)
|
@@ -134,6 +143,10 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
134
143
|
* esri/core/reactiveUtils: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html
|
135
144
|
*/
|
136
145
|
reactiveUtils;
|
146
|
+
/**
|
147
|
+
* __esri.Graphic: Related feature selected from the features widget
|
148
|
+
*/
|
149
|
+
_relatedFeature;
|
137
150
|
//--------------------------------------------------------------------------
|
138
151
|
//
|
139
152
|
// Watch handlers
|
@@ -143,6 +156,14 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
143
156
|
* Watch for changes to the graphic and update the feature widget
|
144
157
|
*/
|
145
158
|
async graphicsWatchHandler() {
|
159
|
+
// if user has been navigated to related record and graphics is changed then close the feature widget and then set graphics to avoid blank popup issue
|
160
|
+
// https://github.com/Esri/solutions-components/issues/1113
|
161
|
+
if (this._navigatedToRelatedFeature && this._features) {
|
162
|
+
this._features.clear();
|
163
|
+
this._features.close();
|
164
|
+
this._count = "";
|
165
|
+
this._navigatedToRelatedFeature = false;
|
166
|
+
}
|
146
167
|
await this.setGraphics();
|
147
168
|
}
|
148
169
|
/**
|
@@ -233,6 +254,10 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
233
254
|
* Emitted on demand when the popup is closed
|
234
255
|
*/
|
235
256
|
popupClosed;
|
257
|
+
/**
|
258
|
+
* Emitted on demand when close button is clicked
|
259
|
+
*/
|
260
|
+
clearSelection;
|
236
261
|
/**
|
237
262
|
* Emitted on demand when the selected index changes
|
238
263
|
*/
|
@@ -259,7 +284,10 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
259
284
|
* Refresh the info-card graphics
|
260
285
|
*/
|
261
286
|
async refreshGraphics(evt) {
|
262
|
-
|
287
|
+
// if if user is not navigated to related feature then only update the graphics otherwise the related feature will shown instead of selected feature
|
288
|
+
if (!this._navigatedToRelatedFeature) {
|
289
|
+
this.graphics = [...evt.detail];
|
290
|
+
}
|
263
291
|
}
|
264
292
|
//--------------------------------------------------------------------------
|
265
293
|
//
|
@@ -293,13 +321,16 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
293
321
|
const featureNodeClass = this.isLoading || this._editRecordOpen ? "visibility-hidden" : "position-absolute";
|
294
322
|
const editClass = !this.isLoading && this._editRecordOpen ? "position-absolute" : "display-none";
|
295
323
|
const editButtonClass = (!this.isLoading && this._editRecordOpen) || this._showListView ? "display-none" : "";
|
296
|
-
const nextBackDisabled = this._features?.features?.length < 2;
|
324
|
+
const nextBackDisabled = this._features?.features?.length < 2 || this._navigatedToRelatedFeature;
|
297
325
|
const nextBackClass = this.isMobile ? "display-none" : "";
|
298
326
|
const id = this._features?.selectedFeature?.getObjectId();
|
299
327
|
const ids = parseInt(id?.toString(), 10) > -1 ? [id] : [];
|
300
328
|
const deleteEnabled = this._layer?.editingEnabled && this._layer?.capabilities?.operations?.supportsDelete;
|
301
|
-
|
302
|
-
|
329
|
+
// if user has navigated to the related feature then pass the related feature to the graphics
|
330
|
+
const graphics = this._relatedFeature ? [this._relatedFeature] : this.graphics;
|
331
|
+
const selectedFeatureIndex = this._navigatedToRelatedFeature ? 0 : this._features?.selectedFeatureIndex;
|
332
|
+
return (h(Host, { key: '9f75eb2e7aba944474e85c34b2abe23982629558' }, h("calcite-shell", { key: '748f9e50cd3aa7a52dd7910b171c0d7f54d09203', style: { position: this.position } }, this._getHeader(), h("calcite-loader", { key: 'feced4d4a66df36958644436acaa53ddabdfc02a', class: loadingClass, label: this._translations.fetchingData }), h("div", { key: '3bb912c80d610a21a5e283c6bd19ab0c63023c45', class: "esri-widget feature-node " + featureNodeClass, id: this._featuresNodeId }), h("div", { key: '479dcbda08f837b32bd19ed7f40856f081e92a6e', class: `${editButtonClass} width-100`, slot: "footer" }, this.allowEditing &&
|
333
|
+
h("div", { key: 'dd78b02ba8506c391aada6c5233691ec9babcfbe', class: "display-flex top-border padding-1-2" }, h("calcite-button", { key: 'c5a807609c60151a433fa9c0055fbfdf20b2935f', appearance: "solid", id: "solutions-edit", onClick: () => this._openEditRecord(), width: "full" }, this._translations.edit), this.isMobile && deleteEnabled ? (h("delete-button", { class: "padding-inline-start-1 width-100", id: "solutions-delete", ids: ids, layer: this._layer, locale: this.locale, onEditsComplete: () => this._closePopup() })) : undefined, h("calcite-tooltip", { key: 'a4cd4c77e982e23675ec9eaf08e2135de6c83b65', placement: "bottom", "reference-element": "solutions-edit" }, h("span", { key: '22533608996d1c87b9b04e339506ec01176379b0' }, this._translations.edit)), this.isMobile && deleteEnabled ? (h("calcite-tooltip", { placement: "bottom", "reference-element": "solutions-delete" }, h("span", null, this._translations.delete))) : undefined), this.paginationEnabled && !nextBackDisabled && h("div", { key: '183ff7da57a06de8f5419edf5973f18b41c46097', class: `display-flex padding-1-2 button-container top-border ${nextBackClass}` }, h("div", { key: '77e59229d1d516ccdc8f7c5be2f89a5ad9d5004b' }, h("calcite-button", { key: '4b6a6f1f85e9199e14d626ba66b6b319283d0c32', appearance: 'transparent', disabled: nextBackDisabled, iconFlipRtl: "both", iconStart: "chevron-left", id: "solutions-back", onClick: () => this._back(), width: "full" }), h("calcite-tooltip", { key: '7056c5cb3c790c804194f09f2586864a28dce5e1', placement: "top", "reference-element": "solutions-back" }, h("span", { key: '923fc5425a9faced6952a1b9acff9b7d0f3da286' }, this._translations.back))), h("calcite-action", { key: 'a34bfb4ae71a91373fd476e7b704a6a2f8f23157', class: 'pagination-action', iconFlipRtl: true, onClick: () => this._toggleListView(), scale: "s", text: "", textEnabled: true }, h("span", { key: '101a0fa592af65b540123c835e9031a18671ad8b', class: "pagination-count" }, this._count)), h("div", { key: 'c4f88f464a3091dfc77578470de4f42d05b9f5c7' }, h("calcite-button", { key: 'e4e35e539f0c7e01a31e0047db545d4d334ef2d8', appearance: "transparent", disabled: nextBackDisabled, iconFlipRtl: "both", iconStart: "chevron-right", id: "solutions-next", onClick: () => this._next(), width: "full" }), h("calcite-tooltip", { key: '40244ecf5566fde448b311272d2ee00d70bc531a', placement: "top", "reference-element": "solutions-next" }, h("span", { key: 'db01e2a2b9da9a80f9a25caf49bf8beb872e6ad9' }, this._translations.next))))), h("edit-card", { key: 'cfa193b01b67f7709ea6a491caa0c647c536e9e3', class: editClass, enableEditGeometry: this.enableEditGeometry, graphicIndex: selectedFeatureIndex, graphics: graphics, locale: this.locale, mapView: this.mapView, open: this._editRecordOpen }), h("calcite-alert", { key: '709fd6d681d32a03fcf5fba959e81a0153676e26', icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { key: 'bbdd9cc98fcda8ffba294a4322f08468072f6aef', slot: "title" }, this._translations.editDisabled), h("div", { key: 'd07e32e9cd54cc82ff005e7e696e13e1b8bdaa4e', slot: "message" }, this._translations.enableEditing)))));
|
303
334
|
}
|
304
335
|
//--------------------------------------------------------------------------
|
305
336
|
//
|
@@ -359,7 +390,7 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
359
390
|
container: this._featuresNodeId,
|
360
391
|
visibleElements: {
|
361
392
|
actionBar: false,
|
362
|
-
closeButton:
|
393
|
+
closeButton: this.showCloseBtn,
|
363
394
|
heading: !this.isMobile
|
364
395
|
}
|
365
396
|
});
|
@@ -375,11 +406,26 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
375
406
|
this.selectionChanged.emit({ selectedFeature: [this._features.selectedFeature], selectedFeatureIndex: this._features.selectedFeatureIndex });
|
376
407
|
}
|
377
408
|
});
|
409
|
+
this.reactiveUtils.watch(() => this._features.selectedDrillInFeature, (f) => {
|
410
|
+
if (f) {
|
411
|
+
this._relatedFeature = f;
|
412
|
+
this._navigatedToRelatedFeature = true;
|
413
|
+
}
|
414
|
+
else {
|
415
|
+
this._relatedFeature = null;
|
416
|
+
this._navigatedToRelatedFeature = false;
|
417
|
+
}
|
418
|
+
});
|
419
|
+
// get the info card node element and emit clear selection while clicking the close button
|
420
|
+
const infoCard = this.el.querySelector('#' + this._featuresNodeId);
|
421
|
+
infoCard.addEventListener('calciteFlowItemClose', () => {
|
422
|
+
this.clearSelection.emit();
|
423
|
+
});
|
378
424
|
}
|
379
425
|
else {
|
380
426
|
this._features.view = this.mapView;
|
381
427
|
this._features.visibleElements.actionBar = false;
|
382
|
-
this._features.visibleElements.closeButton =
|
428
|
+
this._features.visibleElements.closeButton = this.showCloseBtn;
|
383
429
|
this._features.visibleElements.heading = !this.isMobile;
|
384
430
|
}
|
385
431
|
}) : Promise.resolve();
|
@@ -483,12 +529,14 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
483
529
|
"locale": [1],
|
484
530
|
"paginationEnabled": [4, "pagination-enabled"],
|
485
531
|
"position": [1],
|
532
|
+
"showCloseBtn": [4, "show-close-btn"],
|
486
533
|
"_alertOpen": [32],
|
487
534
|
"_count": [32],
|
488
535
|
"_editRecordOpen": [32],
|
489
536
|
"_mobileTitle": [32],
|
490
537
|
"_showListView": [32],
|
491
538
|
"_translations": [32],
|
539
|
+
"_navigatedToRelatedFeature": [32],
|
492
540
|
"getSelectedFeature": [64],
|
493
541
|
"refresh": [64],
|
494
542
|
"back": [64],
|