@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
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment } from '@stencil/core/internal/client';
|
|
7
7
|
import { l as loadModules } from './loadModules.js';
|
|
8
8
|
import { a as getAllLayers, g as getLayerOrTable } from './mapViewUtils.js';
|
|
9
|
+
import { d as defineCustomElement$1 } from './loader.js';
|
|
9
10
|
|
|
10
11
|
const createFeatureCss = ":host{display:block}.esri-editor__panel-toolbar{display:none !important}.esri-editor__update-actions{display:none !important}.esri-editor__panel-content{padding-block:0px !important}.esri-editor .esri-item-list__group__header{display:none !important}.esri-editor__panel-content__section .esri-widget__heading{display:none !important}.esri-editor .esri-item-list__filter-container--sticky{padding-block:0px !important;padding-inline:10px !important}.search-widget{width:92% !important;margin:5px 0 20px 14px}.display-none{display:none !important}";
|
|
11
12
|
const CreateFeatureStyle0 = createFeatureCss;
|
|
@@ -19,10 +20,15 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
|
19
20
|
this.drawComplete = createEvent(this, "drawComplete", 7);
|
|
20
21
|
this.editingAttachment = createEvent(this, "editingAttachment", 7);
|
|
21
22
|
this.progressStatus = createEvent(this, "progressStatus", 7);
|
|
23
|
+
/**
|
|
24
|
+
* boolean: Flag to maintain form submission using submit button
|
|
25
|
+
*/
|
|
26
|
+
this._isSubmitBtnClicked = false;
|
|
22
27
|
this.mapView = undefined;
|
|
23
28
|
this.selectedLayerId = undefined;
|
|
24
29
|
this.customizeSubmit = false;
|
|
25
30
|
this.searchConfiguration = undefined;
|
|
31
|
+
this._editorLoading = false;
|
|
26
32
|
this.showSearchWidget = undefined;
|
|
27
33
|
}
|
|
28
34
|
//--------------------------------------------------------------------------
|
|
@@ -31,13 +37,25 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
|
31
37
|
//
|
|
32
38
|
//--------------------------------------------------------------------------
|
|
33
39
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
40
|
+
* Called each time the mapView prop is changed.
|
|
41
|
+
*/
|
|
36
42
|
async mapViewWatchHandler() {
|
|
37
43
|
await this.mapView.when(async () => {
|
|
38
44
|
await this.init();
|
|
39
45
|
});
|
|
40
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* When _editorLoading is true the container node will be hidden while starting the create workflow
|
|
49
|
+
*/
|
|
50
|
+
async _editorLoadingWatchHandler(v) {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
if (v) {
|
|
53
|
+
(_a = this._container) === null || _a === void 0 ? void 0 : _a.classList.add("display-none");
|
|
54
|
+
await this.startCreate();
|
|
55
|
+
(_b = this._container) === null || _b === void 0 ? void 0 : _b.classList.remove("display-none");
|
|
56
|
+
this._editorLoading = false;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
41
59
|
//--------------------------------------------------------------------------
|
|
42
60
|
//
|
|
43
61
|
// Methods (public)
|
|
@@ -58,6 +76,7 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
|
58
76
|
*/
|
|
59
77
|
async submit() {
|
|
60
78
|
if (this._editor) {
|
|
79
|
+
this._isSubmitBtnClicked = true;
|
|
61
80
|
this._editor.viewModel.featureFormViewModel.submit();
|
|
62
81
|
}
|
|
63
82
|
}
|
|
@@ -84,7 +103,9 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
|
84
103
|
*/
|
|
85
104
|
render() {
|
|
86
105
|
const showSearchWidget = this.showSearchWidget ? '' : 'display-none';
|
|
87
|
-
|
|
106
|
+
const loaderClass = this._editorLoading ? "" : "display-none";
|
|
107
|
+
const featureFormClass = this._editorLoading ? "display-none" : "";
|
|
108
|
+
return (h(Fragment, { key: '2e790defdd5592fed729853888ee06143c95c84d' }, h("calcite-loader", { key: 'a0f1de0064ea80305d4aaf83f78939c0236c955a', class: loaderClass, label: "", scale: "s" }), h("div", { key: '1af391d6d7fd0dffa2e8e4b43905f8081a5f9820', class: featureFormClass, id: "feature-form" }), h("div", { key: '88d12115c3c2e0d34a5d6fd8895fb60cec6e9b5d', class: `search-widget ${showSearchWidget} ${featureFormClass}`, id: "search-widget-ref" })));
|
|
88
109
|
}
|
|
89
110
|
//--------------------------------------------------------------------------
|
|
90
111
|
//
|
|
@@ -120,11 +141,13 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
|
120
141
|
* @protected
|
|
121
142
|
*/
|
|
122
143
|
async createEditorWidget() {
|
|
144
|
+
var _a;
|
|
123
145
|
if (this._editor) {
|
|
124
146
|
this._editor.destroy();
|
|
125
147
|
}
|
|
126
148
|
const layerInfos = [];
|
|
127
|
-
|
|
149
|
+
this._container = document.createElement("div");
|
|
150
|
+
(_a = this._container) === null || _a === void 0 ? void 0 : _a.classList.add("display-none");
|
|
128
151
|
const allMapLayers = await getAllLayers(this.mapView);
|
|
129
152
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
130
153
|
allMapLayers.forEach(async (eachLayer) => {
|
|
@@ -143,9 +166,9 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
|
143
166
|
visibleElements: {
|
|
144
167
|
snappingControls: false
|
|
145
168
|
},
|
|
146
|
-
container
|
|
169
|
+
container: this._container
|
|
147
170
|
});
|
|
148
|
-
this.el.appendChild(
|
|
171
|
+
this.el.appendChild(this._container);
|
|
149
172
|
//Add handle to watch if attachments are added/edited
|
|
150
173
|
const attachmentHandle = this.reactiveUtils.watch(() => this._editor.viewModel.state, (state) => {
|
|
151
174
|
if (state === 'adding-attachment' || state === 'editing-attachment') {
|
|
@@ -164,13 +187,14 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
|
164
187
|
const handle = this.reactiveUtils.watch(() => this._editor.viewModel.featureTemplatesViewModel.state, (state) => {
|
|
165
188
|
if (state === 'ready') {
|
|
166
189
|
this.progressStatus.emit(0.5);
|
|
167
|
-
|
|
190
|
+
this._editorLoading = true;
|
|
168
191
|
}
|
|
169
192
|
});
|
|
170
193
|
this._editor.viewModel.addHandles(handle);
|
|
171
194
|
//Add handle to watch editor viewmodel state and then show the search widget
|
|
172
195
|
const formHandle = this.reactiveUtils.watch(() => this._editor.viewModel.state, (state) => {
|
|
173
196
|
if (state === 'creating-features') {
|
|
197
|
+
this._editorLoading = true;
|
|
174
198
|
this.showSearchWidget = true;
|
|
175
199
|
}
|
|
176
200
|
});
|
|
@@ -181,36 +205,39 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
|
181
205
|
* @protected
|
|
182
206
|
*/
|
|
183
207
|
async startCreate() {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
this.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
return new Promise((resolve, reject) => {
|
|
209
|
+
var _a;
|
|
210
|
+
if ((_a = this._editor.viewModel.featureTemplatesViewModel.items) === null || _a === void 0 ? void 0 : _a.length) {
|
|
211
|
+
const items = this._editor.viewModel.featureTemplatesViewModel.items[0].get("items");
|
|
212
|
+
//once the feature template is selected handle the event for formSubmit and sketch complete
|
|
213
|
+
//also, hide the headers and footer in the editor as we will be showing our own submit and cancel button
|
|
214
|
+
this._editor.viewModel.featureTemplatesViewModel.on('select', () => {
|
|
215
|
+
this.progressStatus.emit(0.75);
|
|
216
|
+
setTimeout(() => {
|
|
217
|
+
//on form submit
|
|
218
|
+
this._editor.viewModel.featureFormViewModel.on('submit', this.submitted.bind(this));
|
|
219
|
+
//on sketch complete emit the event
|
|
220
|
+
this._editor.viewModel.sketchViewModel.on("create", (evt) => {
|
|
221
|
+
if (evt.state === "complete") {
|
|
222
|
+
this.showSearchWidget = false;
|
|
223
|
+
this.progressStatus.emit(1);
|
|
224
|
+
this.drawComplete.emit();
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
this.hideEditorsElements().then(() => {
|
|
228
|
+
resolve({});
|
|
229
|
+
}, e => reject(e));
|
|
230
|
+
}, 700);
|
|
231
|
+
});
|
|
232
|
+
//if only one feature template then directly start geometry creation for that
|
|
233
|
+
//else allow feature template selection to user
|
|
234
|
+
if (items.length === 1) {
|
|
235
|
+
this._editor.viewModel.featureTemplatesViewModel.select(items[0]);
|
|
236
|
+
}
|
|
237
|
+
//hides the header and footer elements in editor widget
|
|
238
|
+
void this.hideEditorsElements();
|
|
210
239
|
}
|
|
211
|
-
|
|
212
|
-
this.hideEditorsElements();
|
|
213
|
-
}
|
|
240
|
+
});
|
|
214
241
|
}
|
|
215
242
|
/**
|
|
216
243
|
* Display search widget to search location
|
|
@@ -245,7 +272,7 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
|
245
272
|
if (this._editor.viewModel.sketchViewModel.createGraphic && pointGeometry) {
|
|
246
273
|
this._editor.viewModel.sketchViewModel.createGraphic.set('geometry', pointGeometry);
|
|
247
274
|
this._editor.viewModel.sketchViewModel.complete();
|
|
248
|
-
this.hideEditorsElements();
|
|
275
|
+
void this.hideEditorsElements();
|
|
249
276
|
}
|
|
250
277
|
}, 100);
|
|
251
278
|
}
|
|
@@ -304,22 +331,21 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
|
304
331
|
* Hides the elements of editor widget
|
|
305
332
|
* @protected
|
|
306
333
|
*/
|
|
307
|
-
hideEditorsElements() {
|
|
334
|
+
async hideEditorsElements() {
|
|
335
|
+
var _a;
|
|
308
336
|
if (!this.customizeSubmit) {
|
|
309
337
|
return;
|
|
310
338
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
});
|
|
322
|
-
}, 700);
|
|
339
|
+
await this.timeout(700);
|
|
340
|
+
//hides the header and footer on the featureForm
|
|
341
|
+
(_a = this.el.querySelector('.esri-editor').querySelectorAll('calcite-flow-item')) === null || _a === void 0 ? void 0 : _a.forEach((flowItem) => {
|
|
342
|
+
var _a, _b, _c, _d, _e;
|
|
343
|
+
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');
|
|
344
|
+
//hide the header
|
|
345
|
+
(_d = article === null || article === void 0 ? void 0 : article.querySelector('header')) === null || _d === void 0 ? void 0 : _d.setAttribute('style', 'display: none');
|
|
346
|
+
//hide the footer
|
|
347
|
+
(_e = article === null || article === void 0 ? void 0 : article.querySelector('footer')) === null || _e === void 0 ? void 0 : _e.setAttribute('style', 'display: none');
|
|
348
|
+
});
|
|
323
349
|
}
|
|
324
350
|
/**
|
|
325
351
|
* On creation of feature emit the event that the feature is created
|
|
@@ -330,11 +356,13 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
|
330
356
|
var _a;
|
|
331
357
|
//return if any attribute is invalid , focus will be shifted to the invalid attribute in feature form
|
|
332
358
|
if (evt.invalid.length) {
|
|
359
|
+
this._isSubmitBtnClicked = false;
|
|
333
360
|
return;
|
|
334
361
|
}
|
|
335
362
|
//Submit only when valid attributes
|
|
336
363
|
//emit success or fail based on the result
|
|
337
|
-
if (evt.valid.length) {
|
|
364
|
+
if (evt.valid.length && this._isSubmitBtnClicked) {
|
|
365
|
+
this._isSubmitBtnClicked = false;
|
|
338
366
|
try {
|
|
339
367
|
await this._editor.activeWorkflow.commit();
|
|
340
368
|
//throw errors if any failures
|
|
@@ -353,9 +381,18 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
|
353
381
|
this.success.emit();
|
|
354
382
|
}
|
|
355
383
|
}
|
|
384
|
+
/**
|
|
385
|
+
* call setTimeout in Promise wrapper
|
|
386
|
+
* @param delay The time, in milliseconds that the timer should wait before the promise is resolved
|
|
387
|
+
* @protected
|
|
388
|
+
*/
|
|
389
|
+
timeout(delay) {
|
|
390
|
+
return new Promise(resolve => setTimeout(resolve, delay));
|
|
391
|
+
}
|
|
356
392
|
get el() { return this; }
|
|
357
393
|
static get watchers() { return {
|
|
358
|
-
"mapView": ["mapViewWatchHandler"]
|
|
394
|
+
"mapView": ["mapViewWatchHandler"],
|
|
395
|
+
"_editorLoading": ["_editorLoadingWatchHandler"]
|
|
359
396
|
}; }
|
|
360
397
|
static get style() { return CreateFeatureStyle0; }
|
|
361
398
|
}, [0, "create-feature", {
|
|
@@ -363,23 +400,30 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
|
363
400
|
"selectedLayerId": [1, "selected-layer-id"],
|
|
364
401
|
"customizeSubmit": [4, "customize-submit"],
|
|
365
402
|
"searchConfiguration": [16],
|
|
403
|
+
"_editorLoading": [32],
|
|
366
404
|
"showSearchWidget": [32],
|
|
367
405
|
"close": [64],
|
|
368
406
|
"submit": [64]
|
|
369
407
|
}, undefined, {
|
|
370
|
-
"mapView": ["mapViewWatchHandler"]
|
|
408
|
+
"mapView": ["mapViewWatchHandler"],
|
|
409
|
+
"_editorLoading": ["_editorLoadingWatchHandler"]
|
|
371
410
|
}]);
|
|
372
411
|
function defineCustomElement() {
|
|
373
412
|
if (typeof customElements === "undefined") {
|
|
374
413
|
return;
|
|
375
414
|
}
|
|
376
|
-
const components = ["create-feature"];
|
|
415
|
+
const components = ["create-feature", "calcite-loader"];
|
|
377
416
|
components.forEach(tagName => { switch (tagName) {
|
|
378
417
|
case "create-feature":
|
|
379
418
|
if (!customElements.get(tagName)) {
|
|
380
419
|
customElements.define(tagName, CreateFeature);
|
|
381
420
|
}
|
|
382
421
|
break;
|
|
422
|
+
case "calcite-loader":
|
|
423
|
+
if (!customElements.get(tagName)) {
|
|
424
|
+
defineCustomElement$1();
|
|
425
|
+
}
|
|
426
|
+
break;
|
|
383
427
|
} });
|
|
384
428
|
}
|
|
385
429
|
defineCustomElement();
|
|
@@ -16,6 +16,10 @@ const CreateRelatedFeature = /*@__PURE__*/ proxyCustomElement(class CreateRelate
|
|
|
16
16
|
this.success = createEvent(this, "success", 7);
|
|
17
17
|
this.fail = createEvent(this, "fail", 7);
|
|
18
18
|
this.isActionPending = createEvent(this, "isActionPending", 7);
|
|
19
|
+
/**
|
|
20
|
+
* boolean: Flag to maintain form submission using submit button
|
|
21
|
+
*/
|
|
22
|
+
this._isSubmitBtnClicked = false;
|
|
19
23
|
this.mapView = undefined;
|
|
20
24
|
this.table = undefined;
|
|
21
25
|
this.selectedFeature = undefined;
|
|
@@ -52,6 +56,7 @@ const CreateRelatedFeature = /*@__PURE__*/ proxyCustomElement(class CreateRelate
|
|
|
52
56
|
*/
|
|
53
57
|
async submit() {
|
|
54
58
|
if (this._editor) {
|
|
59
|
+
this._isSubmitBtnClicked = true;
|
|
55
60
|
this._editor.viewModel.featureFormViewModel.submit();
|
|
56
61
|
}
|
|
57
62
|
}
|
|
@@ -89,7 +94,7 @@ const CreateRelatedFeature = /*@__PURE__*/ proxyCustomElement(class CreateRelate
|
|
|
89
94
|
this.reactiveUtils = reactiveUtils;
|
|
90
95
|
}
|
|
91
96
|
render() {
|
|
92
|
-
return (h(Host, { key: '
|
|
97
|
+
return (h(Host, { key: 'c8516898db79b35b7fba909810afdc56b0602ebd' }));
|
|
93
98
|
}
|
|
94
99
|
/**
|
|
95
100
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
|
@@ -219,11 +224,13 @@ const CreateRelatedFeature = /*@__PURE__*/ proxyCustomElement(class CreateRelate
|
|
|
219
224
|
var _a;
|
|
220
225
|
//return if any attribute is invalid , focus will be shifted to the invalid attribute in feature form
|
|
221
226
|
if (evt.invalid.length) {
|
|
227
|
+
this._isSubmitBtnClicked = false;
|
|
222
228
|
return;
|
|
223
229
|
}
|
|
224
230
|
//Submit only when valid attributes
|
|
225
231
|
//emit success or fail based on the result
|
|
226
|
-
if (evt.valid.length) {
|
|
232
|
+
if (evt.valid.length && this._isSubmitBtnClicked) {
|
|
233
|
+
this._isSubmitBtnClicked = false;
|
|
227
234
|
try {
|
|
228
235
|
await this._editor.activeWorkflow.commit();
|
|
229
236
|
//throw errors if any failures
|
|
@@ -252,7 +252,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
|
252
252
|
render() {
|
|
253
253
|
// only avoid border when we have a header color that is not white
|
|
254
254
|
const borderClass = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "";
|
|
255
|
-
return (h(Host, { key: '
|
|
255
|
+
return (h(Host, { key: '9624c9a65dfde0984d1abdc8ed78f709d58874f3' }, h("calcite-shell", { key: '0b54737e19b7ab1b17a1841b7b83267515a5de51', class: "position-relative" }, h("calcite-panel", { key: 'aea71b81bd854548f921920cb6dc259d8441a2b2', class: `width-full height-full ${borderClass}` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter())));
|
|
256
256
|
}
|
|
257
257
|
/**
|
|
258
258
|
* Called after each render
|
|
@@ -156,7 +156,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
156
156
|
*/
|
|
157
157
|
render() {
|
|
158
158
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
|
159
|
-
return (h(Host, { key: '
|
|
159
|
+
return (h(Host, { key: '119bb8b1c9115dca4e15c45ddd8e7fbed500b4d7' }, this._reportSubmitted && h("calcite-alert", { key: 'ef85c61fb5c9eaac9391c1e37494ef5e4244dadb', "auto-close": true, class: themeClass + " report-submitted-msg", icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, h("div", { key: '616a75103a227cf1b50d9e43fea129afc3fee4f9', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { key: '2faf9a9729bf90b87e044bfe8958571735f2cbf5', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { key: '66cdf81166042ff4efddd4cc5801d790463d75fc', slot: "title" }, this._translations.error), h("div", { key: 'ad289b06742d2159d6fcfbdc42ecc9fb6d81f362', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && h("calcite-alert", { key: '27aee542bfd2cae8972035d17167407b35b5eb76', "auto-close": true, class: 'report-submitted ' + themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._commentSubmitted = false; }, open: true, placement: "top" }, h("div", { key: '70a8a21de05b00d409adb226d6393817f7514930', slot: "message" }, this._translations.commentSubmittedMsg)), this._addingCommentFailed && h("calcite-alert", { key: '107ab01eca03500faeb4db5a2ac0e9dc7261e6fc', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, h("div", { key: '31e6fba8c28489f87897a13ebb4e7b8956452191', slot: "title" }, this._translations.error), h("div", { key: '6f0868946ef6e04490ba1e0806a03e26c756760b', slot: "message" }, this._translations.addingCommentFailedMsg)), h("div", { key: 'e169b7b466023010d45151ca9b7dfb900d8d7f9f' }, h("calcite-shell", { key: '72899b8eff6622233224df91223ee5d59539905b', "content-behind": true }, this._getReporter())), this.filterModal()));
|
|
160
160
|
}
|
|
161
161
|
//--------------------------------------------------------------------------
|
|
162
162
|
//
|
|
@@ -826,8 +826,9 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
826
826
|
*/
|
|
827
827
|
reduceToConfiguredLayers(hash) {
|
|
828
828
|
return Object.keys(hash).reduce((prev, cur) => {
|
|
829
|
+
var _a;
|
|
829
830
|
// check if reporting options exists consider the visible prop if else just check the supports Add
|
|
830
|
-
const showLayer = this.reportingOptions ? this._getLayersConfig(cur).visible
|
|
831
|
+
const showLayer = this.reportingOptions ? (_a = this._getLayersConfig(cur)) === null || _a === void 0 ? void 0 : _a.visible
|
|
831
832
|
: hash[cur].supportsAdd;
|
|
832
833
|
if (showLayer) {
|
|
833
834
|
prev.push(cur);
|
|
@@ -909,7 +910,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
909
910
|
const featureSet = await queryFeaturesByID([Number(this.objectId)], layer, [], true, this.mapView.spatialReference);
|
|
910
911
|
if (featureSet.length) {
|
|
911
912
|
//update the selectedFeature
|
|
912
|
-
this.
|
|
913
|
+
await this.setSelectedFeatures(featureSet);
|
|
913
914
|
//if featureDetails not open then add it to the list else just reInit flowItems which will update details with newly selected features
|
|
914
915
|
// eslint-disable-next-line unicorn/prefer-ternary
|
|
915
916
|
if (this._flowItems.length && this._flowItems[this._flowItems.length - 1] !== "feature-details") {
|
|
@@ -918,7 +919,6 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
918
919
|
else {
|
|
919
920
|
this._flowItems = [...this._flowItems];
|
|
920
921
|
}
|
|
921
|
-
await this.highlightOnMap(featureSet[0]);
|
|
922
922
|
}
|
|
923
923
|
}
|
|
924
924
|
}
|
|
@@ -874,7 +874,7 @@ const DeductCalculator = /*@__PURE__*/ proxyCustomElement(class DeductCalculator
|
|
|
874
874
|
* Renders the component.
|
|
875
875
|
*/
|
|
876
876
|
render() {
|
|
877
|
-
return (h(Host, { key: '
|
|
877
|
+
return (h(Host, { key: '7c12073b99b009ce413082df1ea7f7ba57a24d89' }, h("div", { key: '35ad62ab6a2fe9efb8e32c262d562c213ce067aa', class: "label-display" }, h("calcite-label", { key: '5f4b84e4639538ebc8c6172def2a9c4b2703621f', class: "label-display" }, "Density %", this._getDensityInput()), h("calcite-label", { key: 'b3c9bf873945871c456e97a7c6ce71ce820f37c5', class: "label-display" }, "Type", this._getTypeInput()), h("calcite-label", { key: '57d3b49c4b2a1f103fb197e29913e244731c507f', class: "label-display" }, "Severity", this._getSeverityInput())), h("div", { key: '1194dccf269b5c42248f4e4eed188bcc89aa4cb5' }, this._getCalculateInput())));
|
|
878
878
|
}
|
|
879
879
|
//--------------------------------------------------------------------------
|
|
880
880
|
//
|
|
@@ -12,7 +12,7 @@ import { d as defineCustomElement$3 } from './loader.js';
|
|
|
12
12
|
import { d as defineCustomElement$2 } from './modal.js';
|
|
13
13
|
import { d as defineCustomElement$1 } from './scrim.js';
|
|
14
14
|
|
|
15
|
-
const deleteButtonCss = ":host{display:block}";
|
|
15
|
+
const deleteButtonCss = ":host{display:block}.delete-modal{position:fixed}";
|
|
16
16
|
const DeleteButtonStyle0 = deleteButtonCss;
|
|
17
17
|
|
|
18
18
|
const DeleteButton = /*@__PURE__*/ proxyCustomElement(class DeleteButton extends HTMLElement {
|
|
@@ -71,7 +71,7 @@ const DeleteButton = /*@__PURE__*/ proxyCustomElement(class DeleteButton extends
|
|
|
71
71
|
* Renders the component.
|
|
72
72
|
*/
|
|
73
73
|
render() {
|
|
74
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: '87e080ea4203ab7fcb1313d8fa57a3d5c5d37885' }, this.buttonType === "button" ? (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()))) : (h("calcite-action", { appearance: "solid", compact: true, disabled: !this._deleteEndabled, id: this.icon, onClick: () => this._delete(), scale: "s", text: this._translations.delete }, h("calcite-button", { appearance: "transparent", iconStart: this.icon, kind: "danger" }, this._translations.delete))), this._deleteMessage()));
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
77
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
|
@@ -108,7 +108,7 @@ const DeleteButton = /*@__PURE__*/ proxyCustomElement(class DeleteButton extends
|
|
|
108
108
|
_deleteMessage() {
|
|
109
109
|
const confirmMessage = this.ids.length === 1 ? this._translations.confirmSingle :
|
|
110
110
|
this._translations.confirmMultiple;
|
|
111
|
-
return (h("calcite-modal", { "aria-labelledby": "modal-title", kind: "danger", onCalciteModalClose: () => this._deleteClosed(), open: this._confirmDelete }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, this._translations.deleteFeature), h("div", { slot: "content" }, confirmMessage), h("calcite-button", { appearance: "outline", kind: "danger", onClick: () => this._deleteClosed(), slot: "secondary", width: "full" }, this._translations.cancel), h("calcite-button", { kind: "danger", loading: this._isDeleting, onClick: () => void this._deleteFeatures(), slot: "primary", width: "full" }, this._translations.delete)));
|
|
111
|
+
return (h("calcite-modal", { "aria-labelledby": "modal-title", class: "delete-modal", kind: "danger", onCalciteModalClose: () => this._deleteClosed(), open: this._confirmDelete }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, this._translations.deleteFeature), h("div", { slot: "content" }, confirmMessage), h("calcite-button", { appearance: "outline", kind: "danger", onClick: () => this._deleteClosed(), slot: "secondary", width: "full" }, this._translations.cancel), h("calcite-button", { kind: "danger", loading: this._isDeleting, onClick: () => void this._deleteFeatures(), slot: "primary", width: "full" }, this._translations.delete)));
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
114
|
* Delete the currently selected features
|
|
@@ -108,7 +108,7 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
|
108
108
|
!this.graphics[0].layer.editingEnabled : true;
|
|
109
109
|
const tableNodeClass = this._editorLoading ? "display-none" : "position-absolute";
|
|
110
110
|
const loadingClass = this._editorLoading ? "" : "display-none";
|
|
111
|
-
return (h(Host, { key: '
|
|
111
|
+
return (h(Host, { key: '80acdd7d9b9441be28664ab60b7ad5d19c633bdd' }, h("div", { key: 'c8e41f2f7f3d5fcc4f49dd42b1f530c9e422cc8a', class: "position-absolute" }, editDisabled ? (h("calcite-notice", { kind: "warning", open: true, slot: "content-top", width: "full" }, h("div", { slot: "message" }, this._translations.enableEditing))) : undefined, h("div", { key: '4b93fef902254d2a55e997bccdb4e16ee67c3c75', class: "position-absolute" }, h("div", { key: '1794c5c246ab90b2915a15a15077ae7d82ec567c', class: tableNodeClass, id: "feature-form", ref: (el) => this._editContainer = el }), h("calcite-loader", { key: '001162f8ae947cae915de33c16a116efd7795f75', class: loadingClass, label: "", scale: "s" })))));
|
|
112
112
|
}
|
|
113
113
|
//--------------------------------------------------------------------------
|
|
114
114
|
//
|
|
@@ -50,7 +50,7 @@ const FeatureComments$1 = /*@__PURE__*/ proxyCustomElement(class FeatureComments
|
|
|
50
50
|
//
|
|
51
51
|
//--------------------------------------------------------------------------
|
|
52
52
|
render() {
|
|
53
|
-
return (h(Host, { key: '
|
|
53
|
+
return (h(Host, { key: '70ab7bb863463c41fa2291412f8da6d602e9a94d' }, h("slot", { key: '7266d385e0fc9341baf651a5dcab13b7ba361163' })));
|
|
54
54
|
}
|
|
55
55
|
get el() { return this; }
|
|
56
56
|
static get style() { return FeatureCommentsStyle0; }
|
|
@@ -33,7 +33,7 @@ import { d as defineCustomElement$3 } from './edit-card2.js';
|
|
|
33
33
|
import { d as defineCustomElement$2 } from './feature-list2.js';
|
|
34
34
|
import { d as defineCustomElement$1 } from './info-card2.js';
|
|
35
35
|
|
|
36
|
-
const featureDetailsCss = ":host{display:block}.buttons-container{align-items:center;display:flex;padding:
|
|
36
|
+
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}";
|
|
37
37
|
const FeatureDetailsStyle0 = featureDetailsCss;
|
|
38
38
|
|
|
39
39
|
const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails extends HTMLElement {
|
|
@@ -59,6 +59,7 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
|
59
59
|
this._isLikeBtnClicked = false;
|
|
60
60
|
this._isDislikeBtnClicked = false;
|
|
61
61
|
this._relatedFeaturesOIDs = undefined;
|
|
62
|
+
this._updating = false;
|
|
62
63
|
}
|
|
63
64
|
//--------------------------------------------------------------------------
|
|
64
65
|
//
|
|
@@ -130,12 +131,12 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
|
130
131
|
var _a, _b, _c, _d, _e;
|
|
131
132
|
//When related features found show comments list of only those features else comments list will be empty
|
|
132
133
|
const commentsListWhereClause = ((_a = this._relatedFeaturesOIDs) === null || _a === void 0 ? void 0 : _a.length) > 0 ? `objectId in(${this._relatedFeaturesOIDs})` : '1=0';
|
|
133
|
-
return (h("calcite-panel", { key: '
|
|
134
|
-
h("div", { key: '
|
|
135
|
-
h("div", { key: '
|
|
136
|
-
h("calcite-button", { key: '
|
|
137
|
-
h("calcite-button", { key: '
|
|
138
|
-
h("feature-list", { key: '
|
|
134
|
+
return (h("calcite-panel", { key: 'e42bbf7e4070b03c43aec1bf47c442b65cd35731', "full-height": true }, 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) &&
|
|
135
|
+
h("div", { key: 'aa65adf8d8b6a059d5e9d0e74a1896eb20c84eaf', class: "buttons-container" }, this._commentsAvailable &&
|
|
136
|
+
h("div", { key: '09dd5da4932a9a0526b413592d25469087eaf4c9', class: "comment-btn" }, h("span", { key: '48f7080ace69de3589aa4f3b199eb25e53f61110' }, this._relatedFeaturesOIDs.length), h("calcite-icon", { key: 'f524b4d66a0a6427dda6a7a93e9dc362fe7337fc', icon: "speech-bubble", scale: 's' })), this._likeFieldAvailable &&
|
|
137
|
+
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 &&
|
|
138
|
+
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 &&
|
|
139
|
+
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 })));
|
|
139
140
|
}
|
|
140
141
|
/**
|
|
141
142
|
* Load esri javascript api modules
|
|
@@ -292,7 +293,6 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
|
292
293
|
* @protected
|
|
293
294
|
*/
|
|
294
295
|
onLikeButtonClick() {
|
|
295
|
-
this.loadingStatus.emit(true);
|
|
296
296
|
if (this._isDislikeBtnClicked && this.reportingOptions[this._selectedGraphic.layer.id].dislike) {
|
|
297
297
|
this.onDislikeButtonClick();
|
|
298
298
|
}
|
|
@@ -310,7 +310,6 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
|
310
310
|
* @protected
|
|
311
311
|
*/
|
|
312
312
|
onDislikeButtonClick() {
|
|
313
|
-
this.loadingStatus.emit(true);
|
|
314
313
|
if (this._isLikeBtnClicked && this.reportingOptions[this._selectedGraphic.layer.id].like) {
|
|
315
314
|
this.onLikeButtonClick();
|
|
316
315
|
}
|
|
@@ -332,6 +331,7 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
|
332
331
|
async updateFeaturesLikeDislikeField(fieldName, buttonClicked) {
|
|
333
332
|
const attributesToUpdate = {};
|
|
334
333
|
const selectedLayer = this._selectedGraphic.layer;
|
|
334
|
+
this._updating = true;
|
|
335
335
|
//Increment the value if button is clicked or else decrement it
|
|
336
336
|
const selectFeatureAttr = this._selectedGraphic;
|
|
337
337
|
if (buttonClicked) {
|
|
@@ -355,9 +355,9 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
|
355
355
|
}
|
|
356
356
|
//store the like dislike value for the current selected graphic in local storage
|
|
357
357
|
this.setInLocalStorage();
|
|
358
|
-
this.
|
|
358
|
+
this._updating = false;
|
|
359
359
|
}, (err) => {
|
|
360
|
-
this.
|
|
360
|
+
this._updating = false;
|
|
361
361
|
console.log(err);
|
|
362
362
|
});
|
|
363
363
|
}
|
|
@@ -422,6 +422,7 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
|
422
422
|
"_isLikeBtnClicked": [32],
|
|
423
423
|
"_isDislikeBtnClicked": [32],
|
|
424
424
|
"_relatedFeaturesOIDs": [32],
|
|
425
|
+
"_updating": [32],
|
|
425
426
|
"refresh": [64],
|
|
426
427
|
"back": [64],
|
|
427
428
|
"next": [64],
|
|
@@ -50,7 +50,7 @@ const FeatureFormFlowItem$1 = /*@__PURE__*/ proxyCustomElement(class FeatureForm
|
|
|
50
50
|
//
|
|
51
51
|
//--------------------------------------------------------------------------
|
|
52
52
|
render() {
|
|
53
|
-
return (h(Host, { key: '
|
|
53
|
+
return (h(Host, { key: '32113dda304b2f7179d0275f04987e69ce386959' }, h("slot", { key: '358d5ea7a03cc7da16e98a92391cf74dfe9fa89b' })));
|
|
54
54
|
}
|
|
55
55
|
get el() { return this; }
|
|
56
56
|
static get style() { return FeatureFormFlowItemStyle0; }
|
|
@@ -25,7 +25,7 @@ import { d as defineCustomElement$3 } from './progress.js';
|
|
|
25
25
|
import { d as defineCustomElement$2 } from './scrim.js';
|
|
26
26
|
import { d as defineCustomElement$1 } from './stack.js';
|
|
27
27
|
|
|
28
|
-
const featureListCss = ":host{display:block}.width-full{width:100%}.pagination{display:flex;justify-content:center}.error-msg{padding:10px;width:calc(100% - 20px)}.feature-list-popup-title{font-weight:500;padding:10px 12px}.feature-list-popup-title-small{font-size:small;padding:10px 12px}";
|
|
28
|
+
const featureListCss = ":host{display:block}.width-full{width:100%}.pagination{display:flex;justify-content:center}.error-msg{padding:10px;width:calc(100% - 20px)}.feature-list-popup-title{font-weight:500;padding:10px 12px;white-space:pre-line}.feature-list-popup-title-small{font-size:small;padding:10px 12px;white-space:pre-line}";
|
|
29
29
|
const FeatureListStyle0 = featureListCss;
|
|
30
30
|
|
|
31
31
|
const FeatureList = /*@__PURE__*/ proxyCustomElement(class FeatureList extends HTMLElement {
|
|
@@ -111,9 +111,9 @@ const FeatureList = /*@__PURE__*/ proxyCustomElement(class FeatureList extends H
|
|
|
111
111
|
* Renders the component.
|
|
112
112
|
*/
|
|
113
113
|
render() {
|
|
114
|
-
return (h("calcite-panel", { key: '
|
|
115
|
-
h("calcite-notice", { key: '
|
|
116
|
-
h("div", { key: '
|
|
114
|
+
return (h("calcite-panel", { key: '3d7b707a73bb6c4d566515e50cf2baa155e60816', "full-height": true, "full-width": true }, this._isLoading && h("calcite-loader", { key: '50294111fb6c1e52e727b03e54ca83fc498ca3b9', label: "", scale: "m" }), this.showErrorWhenNoFeatures && this._featureItems.length === 0 && !this._isLoading &&
|
|
115
|
+
h("calcite-notice", { key: '8dd48fc33e2a9825a95b0d0d50424baf431fed55', class: "error-msg", icon: "feature-details", kind: "info", open: true }, h("div", { key: '6ff0dc700cdf40fe6929a9777bca8ebc6325f1ed', slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), h("calcite-list", { key: '2412a7b41ab87bfee803460bdea0395ca609d55a', "selection-appearance": "border", "selection-mode": "none" }, !this._isLoading && this._featureItems.length > 0 && this._featureItems), this._featuresCount > this.pageSize &&
|
|
116
|
+
h("div", { key: '4216b02c264cf88472082f1c6f3cd466bd77d166', class: "width-full", slot: "footer" }, h("calcite-pagination", { key: '2bb39768d0fbd0d863b075b0e2e6b750c5f7c2a1', class: "pagination", "full-width": true, onCalcitePaginationChange: this.pageChanged.bind(this), "page-size": this.pageSize, ref: el => this._pagination = el, "start-item": "1", "total-items": this._featuresCount }))));
|
|
117
117
|
}
|
|
118
118
|
//--------------------------------------------------------------------------
|
|
119
119
|
//
|
|
@@ -50,7 +50,7 @@ const FeaturesFlowItem$1 = /*@__PURE__*/ proxyCustomElement(class FeaturesFlowIt
|
|
|
50
50
|
//
|
|
51
51
|
//--------------------------------------------------------------------------
|
|
52
52
|
render() {
|
|
53
|
-
return (h(Host, { key: '
|
|
53
|
+
return (h(Host, { key: 'eb455611b9248308ef11de0f2b03cb35bbc77e5b' }, h("slot", { key: 'f9829297423e86f028c1415e6c7d27c0967b9e8e' })));
|
|
54
54
|
}
|
|
55
55
|
get el() { return this; }
|
|
56
56
|
static get style() { return FeaturesFlowItemStyle0; }
|
|
@@ -52,7 +52,7 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
|
|
|
52
52
|
return this._initModules();
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: '98769446b20d8a9432b571b5653abbc6613bdfe5' }, h("div", { key: '6606a2593fec1885fc02b07a168bdea43e7f864a', ref: (el) => { this._floorFilterElement = el; } })));
|
|
56
56
|
}
|
|
57
57
|
//--------------------------------------------------------------------------
|
|
58
58
|
//
|