@esri/solutions-components 0.8.24 → 0.8.26
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 +6 -6
- package/dist/cjs/buffer-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-alert_4.cjs.entry.js +6 -6
- package/dist/cjs/calcite-dropdown-group_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-flow_6.cjs.entry.js +108 -65
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +7 -7
- package/dist/cjs/card-manager_3.cjs.entry.js +2 -2
- package/dist/cjs/crowdsource-manager.cjs.entry.js +1 -1
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +4 -4
- package/dist/cjs/deduct-calculator.cjs.entry.js +1 -1
- package/dist/cjs/feature-comments.cjs.entry.js +1 -1
- package/dist/cjs/feature-form-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/feature-list.cjs.entry.js +4 -4
- package/dist/cjs/features-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/layout-manager.cjs.entry.js +1 -1
- package/dist/cjs/list-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/location-flow-item.cjs.entry.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/refine-results-flow-item.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-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/create-feature/create-feature.js +90 -51
- package/dist/collection/components/create-related-feature/create-related-feature.js +9 -2
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +1 -1
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +4 -4
- package/dist/collection/components/deduct-calculator/deduct-calculator.js +1 -1
- package/dist/collection/components/delete-button/delete-button.css +4 -0
- package/dist/collection/components/delete-button/delete-button.js +2 -2
- package/dist/collection/components/edit-card/edit-card.js +1 -1
- package/dist/collection/components/feature-comments/feature-comments.js +1 -1
- package/dist/collection/components/feature-details/feature-details.css +4 -4
- package/dist/collection/components/feature-details/feature-details.js +12 -11
- package/dist/collection/components/feature-form-flow-item/feature-form-flow-item.js +1 -1
- package/dist/collection/components/feature-list/feature-list.css +2 -0
- package/dist/collection/components/feature-list/feature-list.js +3 -3
- package/dist/collection/components/features-flow-item/features-flow-item.js +1 -1
- package/dist/collection/components/floor-filter/floor-filter.js +1 -1
- package/dist/collection/components/info-card/info-card.js +2 -2
- package/dist/collection/components/json-editor/json-editor.js +1 -1
- package/dist/collection/components/layer-table/layer-table.js +1 -1
- package/dist/collection/components/layout-manager/layout-manager.js +1 -1
- package/dist/collection/components/list-flow-item/list-flow-item.js +1 -1
- package/dist/collection/components/location-flow-item/location-flow-item.js +1 -1
- 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-results-flow-item/refine-results-flow-item.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-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/components/create-feature2.js +98 -54
- package/dist/components/create-related-feature2.js +9 -2
- package/dist/components/crowdsource-manager.js +1 -1
- package/dist/components/crowdsource-reporter.js +4 -4
- package/dist/components/deduct-calculator2.js +1 -1
- package/dist/components/delete-button2.js +3 -3
- package/dist/components/edit-card2.js +1 -1
- package/dist/components/feature-comments.js +1 -1
- package/dist/components/feature-details2.js +12 -11
- package/dist/components/feature-form-flow-item.js +1 -1
- package/dist/components/feature-list2.js +4 -4
- package/dist/components/features-flow-item.js +1 -1
- package/dist/components/floor-filter2.js +1 -1
- package/dist/components/info-card2.js +2 -2
- package/dist/components/json-editor2.js +1 -1
- package/dist/components/layer-table2.js +1 -1
- package/dist/components/layout-manager.js +1 -1
- package/dist/components/list-flow-item.js +1 -1
- package/dist/components/location-flow-item.js +1 -1
- 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-results-flow-item.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-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-ref2.js +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +6 -6
- package/dist/esm/buffer-tools_3.entry.js +1 -1
- package/dist/esm/calcite-alert_4.entry.js +6 -6
- package/dist/esm/calcite-dropdown-group_2.entry.js +1 -1
- package/dist/esm/calcite-flow_6.entry.js +108 -65
- package/dist/esm/calcite-shell-panel_14.entry.js +7 -7
- package/dist/esm/card-manager_3.entry.js +2 -2
- package/dist/esm/crowdsource-manager.entry.js +1 -1
- package/dist/esm/crowdsource-reporter.entry.js +4 -4
- package/dist/esm/deduct-calculator.entry.js +1 -1
- package/dist/esm/feature-comments.entry.js +1 -1
- package/dist/esm/feature-form-flow-item.entry.js +1 -1
- package/dist/esm/feature-list.entry.js +4 -4
- package/dist/esm/features-flow-item.entry.js +1 -1
- package/dist/esm/layout-manager.entry.js +1 -1
- package/dist/esm/list-flow-item.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/location-flow-item.entry.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/refine-results-flow-item.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-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-2c044250.entry.js → p-053be79f.entry.js} +2 -2
- package/dist/solutions-components/{p-1ff9eb95.entry.js → p-05b3a5d9.entry.js} +1 -1
- package/dist/solutions-components/p-0d17246a.entry.js +6 -0
- package/dist/solutions-components/{p-b3160299.entry.js → p-1e915546.entry.js} +1 -1
- package/dist/solutions-components/{p-97e343df.entry.js → p-1f4b174f.entry.js} +1 -1
- package/dist/solutions-components/p-27e9ea86.entry.js +6 -0
- package/dist/solutions-components/{p-72317f8e.entry.js → p-296375d3.entry.js} +2 -2
- package/dist/solutions-components/{p-af4be4ce.entry.js → p-2a6db6e8.entry.js} +1 -1
- package/dist/solutions-components/p-4870be89.entry.js +6 -0
- package/dist/solutions-components/p-51b5ac05.entry.js +6 -0
- package/dist/solutions-components/{p-1251dcc6.entry.js → p-66722851.entry.js} +1 -1
- package/dist/solutions-components/{p-f35cc7ae.entry.js → p-81747268.entry.js} +1 -1
- package/dist/solutions-components/{p-84a5d221.entry.js → p-92eadd14.entry.js} +1 -1
- package/dist/solutions-components/{p-fc665a1a.entry.js → p-96c901b4.entry.js} +1 -1
- package/dist/solutions-components/p-9cfc59dd.entry.js +6 -0
- package/dist/solutions-components/{p-16730f05.entry.js → p-b656b73e.entry.js} +1 -1
- package/dist/solutions-components/{p-8c500fd7.entry.js → p-bfdabb9d.entry.js} +1 -1
- package/dist/solutions-components/p-c5becad1.entry.js +6 -0
- package/dist/solutions-components/{p-102b1f94.entry.js → p-cb20ba34.entry.js} +1 -1
- package/dist/solutions-components/p-cd694107.entry.js +17 -0
- package/dist/solutions-components/p-e1662e32.entry.js +6 -0
- package/dist/solutions-components/p-eda6994e.entry.js +6 -0
- package/dist/solutions-components/{p-bf57dbfd.entry.js → p-edcc1f23.entry.js} +1 -1
- package/dist/solutions-components/p-f7b791a8.entry.js +6 -0
- package/dist/solutions-components/p-fac36b42.entry.js +6 -0
- package/dist/solutions-components/{p-33845a79.entry.js → p-fd28754c.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/create-feature/create-feature.d.ts +25 -3
- package/dist/types/components/create-related-feature/create-related-feature.d.ts +4 -0
- package/dist/types/components/feature-details/feature-details.d.ts +4 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-28c6906c.entry.js +0 -6
- package/dist/solutions-components/p-3470c0f7.entry.js +0 -6
- package/dist/solutions-components/p-3fae9775.entry.js +0 -6
- package/dist/solutions-components/p-71de367b.entry.js +0 -6
- package/dist/solutions-components/p-8a81f3c7.entry.js +0 -6
- package/dist/solutions-components/p-aa06f4d1.entry.js +0 -6
- package/dist/solutions-components/p-b76b5310.entry.js +0 -6
- package/dist/solutions-components/p-c047a6fc.entry.js +0 -6
- package/dist/solutions-components/p-cbf0dada.entry.js +0 -17
- package/dist/solutions-components/p-e78be59a.entry.js +0 -6
- package/dist/solutions-components/p-e9176a44.entry.js +0 -6
|
@@ -162,7 +162,7 @@ const FloorFilter = class {
|
|
|
162
162
|
return this._initModules();
|
|
163
163
|
}
|
|
164
164
|
render() {
|
|
165
|
-
return (index.h(index.Host, { key: '
|
|
165
|
+
return (index.h(index.Host, { key: '98769446b20d8a9432b571b5653abbc6613bdfe5' }, index.h("div", { key: '6606a2593fec1885fc02b07a168bdea43e7f864a', ref: (el) => { this._floorFilterElement = el; } })));
|
|
166
166
|
}
|
|
167
167
|
//--------------------------------------------------------------------------
|
|
168
168
|
//
|
|
@@ -255,7 +255,7 @@ const MapFullscreen = class {
|
|
|
255
255
|
* Renders the component.
|
|
256
256
|
*/
|
|
257
257
|
render() {
|
|
258
|
-
return (index.h(index.Host, { key: '
|
|
258
|
+
return (index.h(index.Host, { key: '943217d26f3cf5861c165c3300ba24736ce8f7dc' }, index.h("div", { key: '6c76ebf6e63dab19f24d776cd27cd86b74ea93d0', class: "fullscreen-widget", ref: (el) => { this._fullscreenElement = el; } })));
|
|
259
259
|
}
|
|
260
260
|
/**
|
|
261
261
|
* StencilJS: Called just after the component updates.
|
|
@@ -361,7 +361,7 @@ const MapLegend = class {
|
|
|
361
361
|
* StencilJS: Renders the component.
|
|
362
362
|
*/
|
|
363
363
|
render() {
|
|
364
|
-
return (index.h(index.Host, { key: '
|
|
364
|
+
return (index.h(index.Host, { key: 'bdd3b848bec1aec6f8c7676f8bab5e9463b16064' }, index.h("div", { key: 'd7bb217db6971758ef8774d19d6ac5cfa94a0ddc', ref: (el) => { this._legendElement = el; } })));
|
|
365
365
|
}
|
|
366
366
|
/**
|
|
367
367
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
|
@@ -479,7 +479,7 @@ const MapPicker = class {
|
|
|
479
479
|
* Renders the component.
|
|
480
480
|
*/
|
|
481
481
|
render() {
|
|
482
|
-
return (index.h(index.Host, { key: '
|
|
482
|
+
return (index.h(index.Host, { key: '86994e2c4d87809c1508b073c3af1c0975c2d81d' }, this._getToolbar(), this._getMapNameList(this._mapListExpanded)));
|
|
483
483
|
}
|
|
484
484
|
/**
|
|
485
485
|
* Called once after the component has loaded
|
|
@@ -638,7 +638,7 @@ const MapSearch = class {
|
|
|
638
638
|
* Renders the component.
|
|
639
639
|
*/
|
|
640
640
|
render() {
|
|
641
|
-
return (index.h(index.Host, { key: '
|
|
641
|
+
return (index.h(index.Host, { key: '5036a89c6a686b2486ff88dffd06f0bed1ea510e' }, index.h("div", { key: '4c5ede4d9877ff0ca0f16706c99aba354df21fd1', class: "search-widget", ref: (el) => { this._searchElement = el; } })));
|
|
642
642
|
}
|
|
643
643
|
//--------------------------------------------------------------------------
|
|
644
644
|
//
|
|
@@ -903,7 +903,7 @@ const MapTools = class {
|
|
|
903
903
|
const toolMarginClass = this.enableSingleExpand ? "margin-top-1-2" : "";
|
|
904
904
|
const toolOrder = this.toolOrder ? this.toolOrder : ["legend", "search", "fullscreen", "floorfilter"];
|
|
905
905
|
const shadowClass = this.stackTools ? "box-shadow" : "";
|
|
906
|
-
return (index.h(index.Host, { key: '
|
|
906
|
+
return (index.h(index.Host, { key: 'a1557491ffd833bed11843dbe1bd040a9d2d6b15' }, index.h("div", { key: '8866b3bc6e05fa75605b078e1a3deecaf6392024', class: containerClass }, this.enableSingleExpand ? (index.h("div", { class: "box-shadow" }, this._getActionGroup(toggleIcon, false, expandTip, () => this._toggleTools()))) : undefined, index.h("div", { key: '6a4e62ad1afcca39365aa965ffabedf8933051d4', class: `${toolMarginClass} ${shadowClass} ${toolsClass}` }, this._getMapWidgets(toolOrder))), index.h("basemap-gallery", { key: '4edade9536c0912a89f6a9335ae05ae46669e14d', basemapConfig: this.basemapConfig, class: basemapClass, mapView: this.mapView, ref: (el) => { this._basemapElement = el; } }), index.h("map-search", { key: '046d02c1927def025294645c6e855906fabd30aa', class: searchClass, mapView: this.mapView, ref: (el) => { this._searchElement = el; }, resultGraphicEnabled: true, searchConfiguration: this.searchConfiguration }), index.h("map-legend", { key: '54575e31073bdc68b611939eb0e619e4479b26f3', class: legendClass, mapView: this.mapView, ref: (el) => { this._legendElement = el; } }), index.h("map-fullscreen", { key: '9a54a22e12c372dd85717f83cf31b4ace80489eb', class: fullscreenClass, mapView: this.mapView, onFullscreenStateChange: (evt) => this._fullscreenStateChange(evt.detail), ref: (el) => { this._fullscreenElement = el; } }), index.h("floor-filter", { key: 'ffadf501a03186ed6f2fec8754cd758faea5b4dd', class: floorFilterClass, enabled: this.enableFloorFilter, mapView: this.mapView, ref: (el) => { this._floorFilterElement = el; } })));
|
|
907
907
|
}
|
|
908
908
|
//--------------------------------------------------------------------------
|
|
909
909
|
//
|
|
@@ -420,7 +420,7 @@ const MapDrawTools = class {
|
|
|
420
420
|
"border" : "border esri-widget esri-sketch__panel";
|
|
421
421
|
const undoRedoClass = this.drawMode === interfaces.EDrawMode.SKETCH ?
|
|
422
422
|
"display-none" : "esri-widget esri-sketch__panel border-left esri-sketch__section";
|
|
423
|
-
return (index.h(index.Host, { key: '
|
|
423
|
+
return (index.h(index.Host, { key: '1f9544ac97df4b51337260e1bb7cf3b5d923fa03' }, index.h("div", { key: 'eca20834d2eacf3cc4a30e6ecf15a2f8d894cb8f', class: containerClass }, index.h("div", { key: '32bbaf5a03251c035821880231acb894a452b8dd', ref: (el) => { this._sketchElement = el; } }), index.h("div", { key: 'cd446419c2b7d347711a48851baec46f24d20375', class: undoRedoClass }, index.h("calcite-action", { key: '03ce63c7805c1cc1b63e78336ba624199eef3336', disabled: !this.undoEnabled, icon: "undo", onClick: () => this._undo(), scale: "s", text: this._translations.undo }), index.h("calcite-action", { key: '0d688389277586163c589561865ab7778021ac10', disabled: !this.redoEnabled, icon: "redo", onClick: () => this._redo(), scale: "s", text: this._translations.redo })))));
|
|
424
424
|
}
|
|
425
425
|
//--------------------------------------------------------------------------
|
|
426
426
|
//
|
|
@@ -329,7 +329,7 @@ const Alert = class {
|
|
|
329
329
|
};
|
|
330
330
|
Alert.style = CalciteAlertStyle0;
|
|
331
331
|
|
|
332
|
-
const deleteButtonCss = ":host{display:block}";
|
|
332
|
+
const deleteButtonCss = ":host{display:block}.delete-modal{position:fixed}";
|
|
333
333
|
const DeleteButtonStyle0 = deleteButtonCss;
|
|
334
334
|
|
|
335
335
|
const DeleteButton = class {
|
|
@@ -386,7 +386,7 @@ const DeleteButton = class {
|
|
|
386
386
|
* Renders the component.
|
|
387
387
|
*/
|
|
388
388
|
render() {
|
|
389
|
-
return (index.h(index.Host, { key: '
|
|
389
|
+
return (index.h(index.Host, { key: '87e080ea4203ab7fcb1313d8fa57a3d5c5d37885' }, 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()));
|
|
390
390
|
}
|
|
391
391
|
/**
|
|
392
392
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
|
@@ -423,7 +423,7 @@ const DeleteButton = class {
|
|
|
423
423
|
_deleteMessage() {
|
|
424
424
|
const confirmMessage = this.ids.length === 1 ? this._translations.confirmSingle :
|
|
425
425
|
this._translations.confirmMultiple;
|
|
426
|
-
return (index.h("calcite-modal", { "aria-labelledby": "modal-title", kind: "danger", onCalciteModalClose: () => this._deleteClosed(), open: this._confirmDelete }, index.h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, this._translations.deleteFeature), index.h("div", { slot: "content" }, confirmMessage), index.h("calcite-button", { appearance: "outline", kind: "danger", onClick: () => this._deleteClosed(), slot: "secondary", width: "full" }, this._translations.cancel), index.h("calcite-button", { kind: "danger", loading: this._isDeleting, onClick: () => void this._deleteFeatures(), slot: "primary", width: "full" }, this._translations.delete)));
|
|
426
|
+
return (index.h("calcite-modal", { "aria-labelledby": "modal-title", class: "delete-modal", kind: "danger", onCalciteModalClose: () => this._deleteClosed(), open: this._confirmDelete }, index.h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, this._translations.deleteFeature), index.h("div", { slot: "content" }, confirmMessage), index.h("calcite-button", { appearance: "outline", kind: "danger", onClick: () => this._deleteClosed(), slot: "secondary", width: "full" }, this._translations.cancel), index.h("calcite-button", { kind: "danger", loading: this._isDeleting, onClick: () => void this._deleteFeatures(), slot: "primary", width: "full" }, this._translations.delete)));
|
|
427
427
|
}
|
|
428
428
|
/**
|
|
429
429
|
* Delete the currently selected features
|
|
@@ -560,7 +560,7 @@ const EditCard = class {
|
|
|
560
560
|
!this.graphics[0].layer.editingEnabled : true;
|
|
561
561
|
const tableNodeClass = this._editorLoading ? "display-none" : "position-absolute";
|
|
562
562
|
const loadingClass = this._editorLoading ? "" : "display-none";
|
|
563
|
-
return (index.h(index.Host, { key: '
|
|
563
|
+
return (index.h(index.Host, { key: '80acdd7d9b9441be28664ab60b7ad5d19c633bdd' }, index.h("div", { key: 'c8e41f2f7f3d5fcc4f49dd42b1f530c9e422cc8a', class: "position-absolute" }, editDisabled ? (index.h("calcite-notice", { kind: "warning", open: true, slot: "content-top", width: "full" }, index.h("div", { slot: "message" }, this._translations.enableEditing))) : undefined, index.h("div", { key: '4b93fef902254d2a55e997bccdb4e16ee67c3c75', class: "position-absolute" }, index.h("div", { key: '1794c5c246ab90b2915a15a15077ae7d82ec567c', class: tableNodeClass, id: "feature-form", ref: (el) => this._editContainer = el }), index.h("calcite-loader", { key: '001162f8ae947cae915de33c16a116efd7795f75', class: loadingClass, label: "", scale: "s" })))));
|
|
564
564
|
}
|
|
565
565
|
//--------------------------------------------------------------------------
|
|
566
566
|
//
|
|
@@ -842,8 +842,8 @@ const InfoCard = class {
|
|
|
842
842
|
const id = (_d = (_c = this._features) === null || _c === void 0 ? void 0 : _c.selectedFeature) === null || _d === void 0 ? void 0 : _d.getObjectId();
|
|
843
843
|
const ids = parseInt(id === null || id === void 0 ? void 0 : id.toString(), 10) > -1 ? [id] : [];
|
|
844
844
|
const deleteEnabled = ((_e = this._layer) === null || _e === void 0 ? void 0 : _e.editingEnabled) && ((_h = (_g = (_f = this._layer) === null || _f === void 0 ? void 0 : _f.capabilities) === null || _g === void 0 ? void 0 : _g.operations) === null || _h === void 0 ? void 0 : _h.supportsDelete);
|
|
845
|
-
return (index.h(index.Host, { key: '
|
|
846
|
-
index.h("div", { key: '
|
|
845
|
+
return (index.h(index.Host, { key: 'ac9c78b064154a666a50e7e8540f13bd541c4d37' }, index.h("calcite-shell", { key: 'e12b6fd8ac5f92282899edceb5818764fb543301', style: { position: this.position } }, this._getHeader(), index.h("calcite-loader", { key: 'e73db3c6f71cddf497cb20e1f59e9f1d8b1ecdd6', class: loadingClass, label: this._translations.fetchingData }), index.h("div", { key: 'ab1913d90206219978d425a45f312da3e73bcca8', class: "esri-widget feature-node " + featureNodeClass, id: this._featuresNodeId }), index.h("div", { key: '67242dfb2b219e71a135c88d9d5e2fd40b083226', class: `${editButtonClass} width-100`, slot: "footer" }, this.allowEditing &&
|
|
846
|
+
index.h("div", { key: '25ee3d9374a5ce97c4fcd672b1f78315d1294719', class: "display-flex top-border padding-1-2" }, index.h("calcite-button", { key: '840e3b4ae075fbfd7836f2757128e2cfe9f267e3', appearance: "solid", id: "solutions-edit", onClick: () => this._openEditRecord(), width: "full" }, this._translations.edit), this.isMobile && deleteEnabled ? (index.h("delete-button", { class: "padding-inline-start-1 width-100", id: "solutions-delete", ids: ids, layer: this._layer, onEditsComplete: () => this._closePopup() })) : undefined, index.h("calcite-tooltip", { key: '747436c3815e94976c2838777a26185c9cb7ab28', placement: "bottom", "reference-element": "solutions-edit" }, index.h("span", { key: 'd40dbe85eddaf99acc522f305960ce59c16a8b1f' }, this._translations.edit)), this.isMobile ? (index.h("calcite-tooltip", { placement: "bottom", "reference-element": "solutions-delete" }, index.h("span", null, this._translations.delete))) : undefined), this.paginationEnabled && !nextBackDisabled && index.h("div", { key: '9a1b1e5d7e4432f6b2cd80f77a49f50b1910117f', class: `display-flex padding-1-2 button-container top-border ${nextBackClass}` }, index.h("div", { key: '9b6fd66023b514ff996107ade3af93415f1353f1' }, index.h("calcite-button", { key: '823bcbe1a3b592344972e6ef39fd5088ab6197fa', appearance: 'transparent', disabled: nextBackDisabled, iconStart: "chevron-left", id: "solutions-back", onClick: () => this._back(), width: "full" }), index.h("calcite-tooltip", { key: 'f547487c9eae179e0c65015a24432c936de2ceca', placement: "top", "reference-element": "solutions-back" }, index.h("span", { key: 'f6f352416103008acc20238efe7e7714fca8d05e' }, this._translations.back))), index.h("calcite-action", { key: '799e06b8af5df338b920ddc578fa349de469e786', class: 'pagination-action', onClick: () => this._toggleListView(), scale: "s", text: "", textEnabled: true }, index.h("span", { key: 'adee5b6b5149dbb4c1d6136c1314db89a04e8913', class: "pagination-count" }, this._count)), index.h("div", { key: '87f181c53ad1806a9831d01b54fdd51434a5a4c2' }, index.h("calcite-button", { key: 'a4612a6f0d9b6a9412e60022599cba536cd4f623', appearance: "transparent", disabled: nextBackDisabled, iconStart: "chevron-right", id: "solutions-next", onClick: () => this._next(), width: "full" }), index.h("calcite-tooltip", { key: '613849a34a568fe8df2abe8b1813070cb7a54633', placement: "top", "reference-element": "solutions-next" }, index.h("span", { key: '35a2e621ce4b3bccb2b859e961db1065d619b2d9' }, this._translations.next))))), index.h("edit-card", { key: 'a2054fc21fc09dbffc47e1a7617a4b91b29d26fd', class: editClass, graphicIndex: (_j = this._features) === null || _j === void 0 ? void 0 : _j.selectedFeatureIndex, graphics: this.graphics, mapView: this.mapView, open: this._editRecordOpen }), index.h("calcite-alert", { key: 'ec0fd6540b21987c80fe2035efa96d197c1e6cec', icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, index.h("div", { key: '721a363423ec61a9645b003a7d53849137fe1b82', slot: "title" }, this._translations.editDisabled), index.h("div", { key: '143e9ff06f5363682e8b9e1976fdbfdd1b56f2a9', slot: "message" }, this._translations.enableEditing)))));
|
|
847
847
|
}
|
|
848
848
|
//--------------------------------------------------------------------------
|
|
849
849
|
//
|
|
@@ -171,7 +171,7 @@ const MapLayerPicker = class {
|
|
|
171
171
|
const id = "map-layer-picker";
|
|
172
172
|
let style = this.height > 0 ? { "height": `${this.height.toString()}px` } : {};
|
|
173
173
|
style = Object.assign(Object.assign({}, style), { "display": this.display });
|
|
174
|
-
return (index.h(index.Host, { key: '
|
|
174
|
+
return (index.h(index.Host, { key: 'a96e93924530d926c5e10dd2f7212f3f8c1cbe3c' }, index.h("div", { key: '4b96a73e43e86c31291e4ac60eb15976b01de6a2', class: "map-layer-picker-container", style: style }, index.h("div", { key: 'e75c61d8ce0853814dd3903b9e1952cc613b6fbb', class: "map-layer-picker", style: style }, !this._hasValidLayers ? this._getInvalidPlaceholder() :
|
|
175
175
|
!this._hasMultipleLayers && this.showSingleLayerAsLabel ? this._getSingleLayerPlaceholder() :
|
|
176
176
|
this.type === "combobox" ? this._getCombobox(id) :
|
|
177
177
|
this.type === "select" ? this._getSelect(id) : this._getDropdown(id)))));
|
|
@@ -351,10 +351,15 @@ const CreateFeature = class {
|
|
|
351
351
|
this.drawComplete = index.createEvent(this, "drawComplete", 7);
|
|
352
352
|
this.editingAttachment = index.createEvent(this, "editingAttachment", 7);
|
|
353
353
|
this.progressStatus = index.createEvent(this, "progressStatus", 7);
|
|
354
|
+
/**
|
|
355
|
+
* boolean: Flag to maintain form submission using submit button
|
|
356
|
+
*/
|
|
357
|
+
this._isSubmitBtnClicked = false;
|
|
354
358
|
this.mapView = undefined;
|
|
355
359
|
this.selectedLayerId = undefined;
|
|
356
360
|
this.customizeSubmit = false;
|
|
357
361
|
this.searchConfiguration = undefined;
|
|
362
|
+
this._editorLoading = false;
|
|
358
363
|
this.showSearchWidget = undefined;
|
|
359
364
|
}
|
|
360
365
|
//--------------------------------------------------------------------------
|
|
@@ -363,13 +368,25 @@ const CreateFeature = class {
|
|
|
363
368
|
//
|
|
364
369
|
//--------------------------------------------------------------------------
|
|
365
370
|
/**
|
|
366
|
-
|
|
367
|
-
|
|
371
|
+
* Called each time the mapView prop is changed.
|
|
372
|
+
*/
|
|
368
373
|
async mapViewWatchHandler() {
|
|
369
374
|
await this.mapView.when(async () => {
|
|
370
375
|
await this.init();
|
|
371
376
|
});
|
|
372
377
|
}
|
|
378
|
+
/**
|
|
379
|
+
* When _editorLoading is true the container node will be hidden while starting the create workflow
|
|
380
|
+
*/
|
|
381
|
+
async _editorLoadingWatchHandler(v) {
|
|
382
|
+
var _a, _b;
|
|
383
|
+
if (v) {
|
|
384
|
+
(_a = this._container) === null || _a === void 0 ? void 0 : _a.classList.add("display-none");
|
|
385
|
+
await this.startCreate();
|
|
386
|
+
(_b = this._container) === null || _b === void 0 ? void 0 : _b.classList.remove("display-none");
|
|
387
|
+
this._editorLoading = false;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
373
390
|
//--------------------------------------------------------------------------
|
|
374
391
|
//
|
|
375
392
|
// Methods (public)
|
|
@@ -390,6 +407,7 @@ const CreateFeature = class {
|
|
|
390
407
|
*/
|
|
391
408
|
async submit() {
|
|
392
409
|
if (this._editor) {
|
|
410
|
+
this._isSubmitBtnClicked = true;
|
|
393
411
|
this._editor.viewModel.featureFormViewModel.submit();
|
|
394
412
|
}
|
|
395
413
|
}
|
|
@@ -416,7 +434,9 @@ const CreateFeature = class {
|
|
|
416
434
|
*/
|
|
417
435
|
render() {
|
|
418
436
|
const showSearchWidget = this.showSearchWidget ? '' : 'display-none';
|
|
419
|
-
|
|
437
|
+
const loaderClass = this._editorLoading ? "" : "display-none";
|
|
438
|
+
const featureFormClass = this._editorLoading ? "display-none" : "";
|
|
439
|
+
return (index.h(index.Fragment, { key: '2e790defdd5592fed729853888ee06143c95c84d' }, index.h("calcite-loader", { key: 'a0f1de0064ea80305d4aaf83f78939c0236c955a', class: loaderClass, label: "", scale: "s" }), index.h("div", { key: '1af391d6d7fd0dffa2e8e4b43905f8081a5f9820', class: featureFormClass, id: "feature-form" }), index.h("div", { key: '88d12115c3c2e0d34a5d6fd8895fb60cec6e9b5d', class: `search-widget ${showSearchWidget} ${featureFormClass}`, id: "search-widget-ref" })));
|
|
420
440
|
}
|
|
421
441
|
//--------------------------------------------------------------------------
|
|
422
442
|
//
|
|
@@ -452,11 +472,13 @@ const CreateFeature = class {
|
|
|
452
472
|
* @protected
|
|
453
473
|
*/
|
|
454
474
|
async createEditorWidget() {
|
|
475
|
+
var _a;
|
|
455
476
|
if (this._editor) {
|
|
456
477
|
this._editor.destroy();
|
|
457
478
|
}
|
|
458
479
|
const layerInfos = [];
|
|
459
|
-
|
|
480
|
+
this._container = document.createElement("div");
|
|
481
|
+
(_a = this._container) === null || _a === void 0 ? void 0 : _a.classList.add("display-none");
|
|
460
482
|
const allMapLayers = await mapViewUtils.getAllLayers(this.mapView);
|
|
461
483
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
462
484
|
allMapLayers.forEach(async (eachLayer) => {
|
|
@@ -475,9 +497,9 @@ const CreateFeature = class {
|
|
|
475
497
|
visibleElements: {
|
|
476
498
|
snappingControls: false
|
|
477
499
|
},
|
|
478
|
-
container
|
|
500
|
+
container: this._container
|
|
479
501
|
});
|
|
480
|
-
this.el.appendChild(
|
|
502
|
+
this.el.appendChild(this._container);
|
|
481
503
|
//Add handle to watch if attachments are added/edited
|
|
482
504
|
const attachmentHandle = this.reactiveUtils.watch(() => this._editor.viewModel.state, (state) => {
|
|
483
505
|
if (state === 'adding-attachment' || state === 'editing-attachment') {
|
|
@@ -496,13 +518,14 @@ const CreateFeature = class {
|
|
|
496
518
|
const handle = this.reactiveUtils.watch(() => this._editor.viewModel.featureTemplatesViewModel.state, (state) => {
|
|
497
519
|
if (state === 'ready') {
|
|
498
520
|
this.progressStatus.emit(0.5);
|
|
499
|
-
|
|
521
|
+
this._editorLoading = true;
|
|
500
522
|
}
|
|
501
523
|
});
|
|
502
524
|
this._editor.viewModel.addHandles(handle);
|
|
503
525
|
//Add handle to watch editor viewmodel state and then show the search widget
|
|
504
526
|
const formHandle = this.reactiveUtils.watch(() => this._editor.viewModel.state, (state) => {
|
|
505
527
|
if (state === 'creating-features') {
|
|
528
|
+
this._editorLoading = true;
|
|
506
529
|
this.showSearchWidget = true;
|
|
507
530
|
}
|
|
508
531
|
});
|
|
@@ -513,36 +536,39 @@ const CreateFeature = class {
|
|
|
513
536
|
* @protected
|
|
514
537
|
*/
|
|
515
538
|
async startCreate() {
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
this.
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
539
|
+
return new Promise((resolve, reject) => {
|
|
540
|
+
var _a;
|
|
541
|
+
if ((_a = this._editor.viewModel.featureTemplatesViewModel.items) === null || _a === void 0 ? void 0 : _a.length) {
|
|
542
|
+
const items = this._editor.viewModel.featureTemplatesViewModel.items[0].get("items");
|
|
543
|
+
//once the feature template is selected handle the event for formSubmit and sketch complete
|
|
544
|
+
//also, hide the headers and footer in the editor as we will be showing our own submit and cancel button
|
|
545
|
+
this._editor.viewModel.featureTemplatesViewModel.on('select', () => {
|
|
546
|
+
this.progressStatus.emit(0.75);
|
|
547
|
+
setTimeout(() => {
|
|
548
|
+
//on form submit
|
|
549
|
+
this._editor.viewModel.featureFormViewModel.on('submit', this.submitted.bind(this));
|
|
550
|
+
//on sketch complete emit the event
|
|
551
|
+
this._editor.viewModel.sketchViewModel.on("create", (evt) => {
|
|
552
|
+
if (evt.state === "complete") {
|
|
553
|
+
this.showSearchWidget = false;
|
|
554
|
+
this.progressStatus.emit(1);
|
|
555
|
+
this.drawComplete.emit();
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
this.hideEditorsElements().then(() => {
|
|
559
|
+
resolve({});
|
|
560
|
+
}, e => reject(e));
|
|
561
|
+
}, 700);
|
|
562
|
+
});
|
|
563
|
+
//if only one feature template then directly start geometry creation for that
|
|
564
|
+
//else allow feature template selection to user
|
|
565
|
+
if (items.length === 1) {
|
|
566
|
+
this._editor.viewModel.featureTemplatesViewModel.select(items[0]);
|
|
567
|
+
}
|
|
568
|
+
//hides the header and footer elements in editor widget
|
|
569
|
+
void this.hideEditorsElements();
|
|
542
570
|
}
|
|
543
|
-
|
|
544
|
-
this.hideEditorsElements();
|
|
545
|
-
}
|
|
571
|
+
});
|
|
546
572
|
}
|
|
547
573
|
/**
|
|
548
574
|
* Display search widget to search location
|
|
@@ -577,7 +603,7 @@ const CreateFeature = class {
|
|
|
577
603
|
if (this._editor.viewModel.sketchViewModel.createGraphic && pointGeometry) {
|
|
578
604
|
this._editor.viewModel.sketchViewModel.createGraphic.set('geometry', pointGeometry);
|
|
579
605
|
this._editor.viewModel.sketchViewModel.complete();
|
|
580
|
-
this.hideEditorsElements();
|
|
606
|
+
void this.hideEditorsElements();
|
|
581
607
|
}
|
|
582
608
|
}, 100);
|
|
583
609
|
}
|
|
@@ -636,22 +662,21 @@ const CreateFeature = class {
|
|
|
636
662
|
* Hides the elements of editor widget
|
|
637
663
|
* @protected
|
|
638
664
|
*/
|
|
639
|
-
hideEditorsElements() {
|
|
665
|
+
async hideEditorsElements() {
|
|
666
|
+
var _a;
|
|
640
667
|
if (!this.customizeSubmit) {
|
|
641
668
|
return;
|
|
642
669
|
}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
});
|
|
654
|
-
}, 700);
|
|
670
|
+
await this.timeout(700);
|
|
671
|
+
//hides the header and footer on the featureForm
|
|
672
|
+
(_a = this.el.querySelector('.esri-editor').querySelectorAll('calcite-flow-item')) === null || _a === void 0 ? void 0 : _a.forEach((flowItem) => {
|
|
673
|
+
var _a, _b, _c, _d, _e;
|
|
674
|
+
const article = (_c = (_b = (_a = flowItem.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('calcite-panel')) === null || _b === void 0 ? void 0 : _b.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('article');
|
|
675
|
+
//hide the header
|
|
676
|
+
(_d = article === null || article === void 0 ? void 0 : article.querySelector('header')) === null || _d === void 0 ? void 0 : _d.setAttribute('style', 'display: none');
|
|
677
|
+
//hide the footer
|
|
678
|
+
(_e = article === null || article === void 0 ? void 0 : article.querySelector('footer')) === null || _e === void 0 ? void 0 : _e.setAttribute('style', 'display: none');
|
|
679
|
+
});
|
|
655
680
|
}
|
|
656
681
|
/**
|
|
657
682
|
* On creation of feature emit the event that the feature is created
|
|
@@ -662,11 +687,13 @@ const CreateFeature = class {
|
|
|
662
687
|
var _a;
|
|
663
688
|
//return if any attribute is invalid , focus will be shifted to the invalid attribute in feature form
|
|
664
689
|
if (evt.invalid.length) {
|
|
690
|
+
this._isSubmitBtnClicked = false;
|
|
665
691
|
return;
|
|
666
692
|
}
|
|
667
693
|
//Submit only when valid attributes
|
|
668
694
|
//emit success or fail based on the result
|
|
669
|
-
if (evt.valid.length) {
|
|
695
|
+
if (evt.valid.length && this._isSubmitBtnClicked) {
|
|
696
|
+
this._isSubmitBtnClicked = false;
|
|
670
697
|
try {
|
|
671
698
|
await this._editor.activeWorkflow.commit();
|
|
672
699
|
//throw errors if any failures
|
|
@@ -685,9 +712,18 @@ const CreateFeature = class {
|
|
|
685
712
|
this.success.emit();
|
|
686
713
|
}
|
|
687
714
|
}
|
|
715
|
+
/**
|
|
716
|
+
* call setTimeout in Promise wrapper
|
|
717
|
+
* @param delay The time, in milliseconds that the timer should wait before the promise is resolved
|
|
718
|
+
* @protected
|
|
719
|
+
*/
|
|
720
|
+
timeout(delay) {
|
|
721
|
+
return new Promise(resolve => setTimeout(resolve, delay));
|
|
722
|
+
}
|
|
688
723
|
get el() { return index.getElement(this); }
|
|
689
724
|
static get watchers() { return {
|
|
690
|
-
"mapView": ["mapViewWatchHandler"]
|
|
725
|
+
"mapView": ["mapViewWatchHandler"],
|
|
726
|
+
"_editorLoading": ["_editorLoadingWatchHandler"]
|
|
691
727
|
}; }
|
|
692
728
|
};
|
|
693
729
|
CreateFeature.style = CreateFeatureStyle0;
|
|
@@ -701,6 +737,10 @@ const CreateRelatedFeature = class {
|
|
|
701
737
|
this.success = index.createEvent(this, "success", 7);
|
|
702
738
|
this.fail = index.createEvent(this, "fail", 7);
|
|
703
739
|
this.isActionPending = index.createEvent(this, "isActionPending", 7);
|
|
740
|
+
/**
|
|
741
|
+
* boolean: Flag to maintain form submission using submit button
|
|
742
|
+
*/
|
|
743
|
+
this._isSubmitBtnClicked = false;
|
|
704
744
|
this.mapView = undefined;
|
|
705
745
|
this.table = undefined;
|
|
706
746
|
this.selectedFeature = undefined;
|
|
@@ -737,6 +777,7 @@ const CreateRelatedFeature = class {
|
|
|
737
777
|
*/
|
|
738
778
|
async submit() {
|
|
739
779
|
if (this._editor) {
|
|
780
|
+
this._isSubmitBtnClicked = true;
|
|
740
781
|
this._editor.viewModel.featureFormViewModel.submit();
|
|
741
782
|
}
|
|
742
783
|
}
|
|
@@ -774,7 +815,7 @@ const CreateRelatedFeature = class {
|
|
|
774
815
|
this.reactiveUtils = reactiveUtils;
|
|
775
816
|
}
|
|
776
817
|
render() {
|
|
777
|
-
return (index.h(index.Host, { key: '
|
|
818
|
+
return (index.h(index.Host, { key: 'c8516898db79b35b7fba909810afdc56b0602ebd' }));
|
|
778
819
|
}
|
|
779
820
|
/**
|
|
780
821
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
|
@@ -904,11 +945,13 @@ const CreateRelatedFeature = class {
|
|
|
904
945
|
var _a;
|
|
905
946
|
//return if any attribute is invalid , focus will be shifted to the invalid attribute in feature form
|
|
906
947
|
if (evt.invalid.length) {
|
|
948
|
+
this._isSubmitBtnClicked = false;
|
|
907
949
|
return;
|
|
908
950
|
}
|
|
909
951
|
//Submit only when valid attributes
|
|
910
952
|
//emit success or fail based on the result
|
|
911
|
-
if (evt.valid.length) {
|
|
953
|
+
if (evt.valid.length && this._isSubmitBtnClicked) {
|
|
954
|
+
this._isSubmitBtnClicked = false;
|
|
912
955
|
try {
|
|
913
956
|
await this._editor.activeWorkflow.commit();
|
|
914
957
|
//throw errors if any failures
|
|
@@ -934,7 +977,7 @@ const CreateRelatedFeature = class {
|
|
|
934
977
|
};
|
|
935
978
|
CreateRelatedFeature.style = CreateRelatedFeatureStyle0;
|
|
936
979
|
|
|
937
|
-
const featureDetailsCss = ":host{display:block}.buttons-container{align-items:center;display:flex;padding:
|
|
980
|
+
const featureDetailsCss = ":host{display:block}.buttons-container{align-items:center;display:flex;padding:4px;color:var(--calcite-color-text-1) !important;background-color:var(--calcite-color-foreground-1) !important;border-block-start:1px solid var(--calcite-color-border-3);border-block-end:1px solid var(--calcite-color-border-3)}.comment-btn{display:flex;gap:10px;font-size:var(--calcite-font-size--1);align-items:center;padding:7px 0.75rem}";
|
|
938
981
|
const FeatureDetailsStyle0 = featureDetailsCss;
|
|
939
982
|
|
|
940
983
|
const FeatureDetails = class {
|
|
@@ -959,6 +1002,7 @@ const FeatureDetails = class {
|
|
|
959
1002
|
this._isLikeBtnClicked = false;
|
|
960
1003
|
this._isDislikeBtnClicked = false;
|
|
961
1004
|
this._relatedFeaturesOIDs = undefined;
|
|
1005
|
+
this._updating = false;
|
|
962
1006
|
}
|
|
963
1007
|
//--------------------------------------------------------------------------
|
|
964
1008
|
//
|
|
@@ -1030,12 +1074,12 @@ const FeatureDetails = class {
|
|
|
1030
1074
|
var _a, _b, _c, _d, _e;
|
|
1031
1075
|
//When related features found show comments list of only those features else comments list will be empty
|
|
1032
1076
|
const commentsListWhereClause = ((_a = this._relatedFeaturesOIDs) === null || _a === void 0 ? void 0 : _a.length) > 0 ? `objectId in(${this._relatedFeaturesOIDs})` : '1=0';
|
|
1033
|
-
return (index.h("calcite-panel", { key: '
|
|
1034
|
-
index.h("div", { key: '
|
|
1035
|
-
index.h("div", { key: '
|
|
1036
|
-
index.h("calcite-button", { key: '
|
|
1037
|
-
index.h("calcite-button", { key: '
|
|
1038
|
-
index.h("feature-list", { key: '
|
|
1077
|
+
return (index.h("calcite-panel", { key: 'e42bbf7e4070b03c43aec1bf47c442b65cd35731', "full-height": true }, index.h("info-card", { key: 'f44099e2f8f87edbc656700e65daeb1bf934d41c', allowEditing: false, graphics: this.graphics, highlightEnabled: false, isLoading: false, isMobile: false, mapView: this.mapView, onSelectionChanged: (e) => { this.featureSelectionChange.emit(e.detail); }, paginationEnabled: false, position: "relative", ref: el => this._infoCard = el }), (this._likeFieldAvailable || this._dislikeFieldAvailable || this._commentsAvailable) &&
|
|
1078
|
+
index.h("div", { key: 'aa65adf8d8b6a059d5e9d0e74a1896eb20c84eaf', class: "buttons-container" }, this._commentsAvailable &&
|
|
1079
|
+
index.h("div", { key: '09dd5da4932a9a0526b413592d25469087eaf4c9', class: "comment-btn" }, index.h("span", { key: '48f7080ace69de3589aa4f3b199eb25e53f61110' }, this._relatedFeaturesOIDs.length), index.h("calcite-icon", { key: 'f524b4d66a0a6427dda6a7a93e9dc362fe7337fc', icon: "speech-bubble", scale: 's' })), this._likeFieldAvailable &&
|
|
1080
|
+
index.h("calcite-button", { key: '278a685b13f7ae2a37cb649a0933006104fa7b9f', appearance: "transparent", iconEnd: "thumbs-up", kind: this._isLikeBtnClicked ? "brand" : "neutral", loading: this._updating, onClick: this.onLikeButtonClick.bind(this), scale: 'm' }, (_c = (_b = this._likeCount) !== null && _b !== void 0 ? _b : this._selectedGraphic.attributes[this._likeField]) !== null && _c !== void 0 ? _c : 0), this._dislikeFieldAvailable &&
|
|
1081
|
+
index.h("calcite-button", { key: '7010b6ef352be7c587d7ca49fe3b8411aeb163c6', appearance: "transparent", iconEnd: "thumbs-down", kind: this._isDislikeBtnClicked ? "brand" : "neutral", loading: this._updating, onClick: this.onDislikeButtonClick.bind(this), scale: 'm' }, (_e = (_d = this._disLikeCount) !== null && _d !== void 0 ? _d : this._selectedGraphic.attributes[this._dislikeField]) !== null && _e !== void 0 ? _e : 0)), this.relatedTableId && this._commentsAvailable &&
|
|
1082
|
+
index.h("feature-list", { key: '526614c384fa627057a18528c1bd4aaf2b9c70d8', class: "height-full", mapView: this.mapView, onFeatureSelect: (e) => { this.commentSelect.emit(e.detail); }, pageSize: 5, ref: el => this._commentsList = el, selectedLayerId: this.relatedTableId, showErrorWhenNoFeatures: false, showInitialLoading: false, textSize: "small", whereClause: commentsListWhereClause })));
|
|
1039
1083
|
}
|
|
1040
1084
|
/**
|
|
1041
1085
|
* Load esri javascript api modules
|
|
@@ -1192,7 +1236,6 @@ const FeatureDetails = class {
|
|
|
1192
1236
|
* @protected
|
|
1193
1237
|
*/
|
|
1194
1238
|
onLikeButtonClick() {
|
|
1195
|
-
this.loadingStatus.emit(true);
|
|
1196
1239
|
if (this._isDislikeBtnClicked && this.reportingOptions[this._selectedGraphic.layer.id].dislike) {
|
|
1197
1240
|
this.onDislikeButtonClick();
|
|
1198
1241
|
}
|
|
@@ -1210,7 +1253,6 @@ const FeatureDetails = class {
|
|
|
1210
1253
|
* @protected
|
|
1211
1254
|
*/
|
|
1212
1255
|
onDislikeButtonClick() {
|
|
1213
|
-
this.loadingStatus.emit(true);
|
|
1214
1256
|
if (this._isLikeBtnClicked && this.reportingOptions[this._selectedGraphic.layer.id].like) {
|
|
1215
1257
|
this.onLikeButtonClick();
|
|
1216
1258
|
}
|
|
@@ -1232,6 +1274,7 @@ const FeatureDetails = class {
|
|
|
1232
1274
|
async updateFeaturesLikeDislikeField(fieldName, buttonClicked) {
|
|
1233
1275
|
const attributesToUpdate = {};
|
|
1234
1276
|
const selectedLayer = this._selectedGraphic.layer;
|
|
1277
|
+
this._updating = true;
|
|
1235
1278
|
//Increment the value if button is clicked or else decrement it
|
|
1236
1279
|
const selectFeatureAttr = this._selectedGraphic;
|
|
1237
1280
|
if (buttonClicked) {
|
|
@@ -1255,9 +1298,9 @@ const FeatureDetails = class {
|
|
|
1255
1298
|
}
|
|
1256
1299
|
//store the like dislike value for the current selected graphic in local storage
|
|
1257
1300
|
this.setInLocalStorage();
|
|
1258
|
-
this.
|
|
1301
|
+
this._updating = false;
|
|
1259
1302
|
}, (err) => {
|
|
1260
|
-
this.
|
|
1303
|
+
this._updating = false;
|
|
1261
1304
|
console.log(err);
|
|
1262
1305
|
});
|
|
1263
1306
|
}
|