@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
|
@@ -21103,7 +21103,7 @@ const SpatialRef = class {
|
|
|
21103
21103
|
* Renders the component.
|
|
21104
21104
|
*/
|
|
21105
21105
|
render() {
|
|
21106
|
-
return (index.h(index.Host, { key: '
|
|
21106
|
+
return (index.h(index.Host, { key: '0ca21876510da4276c6fd31885eed7dc15db70ad' }, index.h("div", { key: '90ff94d67604a66f20d30276a1b573affccf5eb2' }, index.h("calcite-input", { key: '35e207303270345e457406e26689f58bf5387d43', disabled: this.disabled, id: "calcite-sr-search", onKeyUp: (evt) => this._searchInputKeyDown(evt), placeholder: this._translations.spatialReferencePlaceholder }), index.h("calcite-tree", { key: '0b73019247c134d0cfcdf8e84544622907a40a80', id: "calcite-sr-tree", slot: "children" }, this._getTreeContent()))));
|
|
21107
21107
|
}
|
|
21108
21108
|
//--------------------------------------------------------------------------
|
|
21109
21109
|
//
|
|
@@ -23,10 +23,15 @@ import { loadModules } from "../../utils/loadModules";
|
|
|
23
23
|
import { getAllLayers, getLayerOrTable } from "../../utils/mapViewUtils";
|
|
24
24
|
export class CreateFeature {
|
|
25
25
|
constructor() {
|
|
26
|
+
/**
|
|
27
|
+
* boolean: Flag to maintain form submission using submit button
|
|
28
|
+
*/
|
|
29
|
+
this._isSubmitBtnClicked = false;
|
|
26
30
|
this.mapView = undefined;
|
|
27
31
|
this.selectedLayerId = undefined;
|
|
28
32
|
this.customizeSubmit = false;
|
|
29
33
|
this.searchConfiguration = undefined;
|
|
34
|
+
this._editorLoading = false;
|
|
30
35
|
this.showSearchWidget = undefined;
|
|
31
36
|
}
|
|
32
37
|
//--------------------------------------------------------------------------
|
|
@@ -35,13 +40,25 @@ export class CreateFeature {
|
|
|
35
40
|
//
|
|
36
41
|
//--------------------------------------------------------------------------
|
|
37
42
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
43
|
+
* Called each time the mapView prop is changed.
|
|
44
|
+
*/
|
|
40
45
|
async mapViewWatchHandler() {
|
|
41
46
|
await this.mapView.when(async () => {
|
|
42
47
|
await this.init();
|
|
43
48
|
});
|
|
44
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* When _editorLoading is true the container node will be hidden while starting the create workflow
|
|
52
|
+
*/
|
|
53
|
+
async _editorLoadingWatchHandler(v) {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
if (v) {
|
|
56
|
+
(_a = this._container) === null || _a === void 0 ? void 0 : _a.classList.add("display-none");
|
|
57
|
+
await this.startCreate();
|
|
58
|
+
(_b = this._container) === null || _b === void 0 ? void 0 : _b.classList.remove("display-none");
|
|
59
|
+
this._editorLoading = false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
45
62
|
//--------------------------------------------------------------------------
|
|
46
63
|
//
|
|
47
64
|
// Methods (public)
|
|
@@ -62,6 +79,7 @@ export class CreateFeature {
|
|
|
62
79
|
*/
|
|
63
80
|
async submit() {
|
|
64
81
|
if (this._editor) {
|
|
82
|
+
this._isSubmitBtnClicked = true;
|
|
65
83
|
this._editor.viewModel.featureFormViewModel.submit();
|
|
66
84
|
}
|
|
67
85
|
}
|
|
@@ -88,7 +106,9 @@ export class CreateFeature {
|
|
|
88
106
|
*/
|
|
89
107
|
render() {
|
|
90
108
|
const showSearchWidget = this.showSearchWidget ? '' : 'display-none';
|
|
91
|
-
|
|
109
|
+
const loaderClass = this._editorLoading ? "" : "display-none";
|
|
110
|
+
const featureFormClass = this._editorLoading ? "display-none" : "";
|
|
111
|
+
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" })));
|
|
92
112
|
}
|
|
93
113
|
//--------------------------------------------------------------------------
|
|
94
114
|
//
|
|
@@ -124,11 +144,13 @@ export class CreateFeature {
|
|
|
124
144
|
* @protected
|
|
125
145
|
*/
|
|
126
146
|
async createEditorWidget() {
|
|
147
|
+
var _a;
|
|
127
148
|
if (this._editor) {
|
|
128
149
|
this._editor.destroy();
|
|
129
150
|
}
|
|
130
151
|
const layerInfos = [];
|
|
131
|
-
|
|
152
|
+
this._container = document.createElement("div");
|
|
153
|
+
(_a = this._container) === null || _a === void 0 ? void 0 : _a.classList.add("display-none");
|
|
132
154
|
const allMapLayers = await getAllLayers(this.mapView);
|
|
133
155
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
134
156
|
allMapLayers.forEach(async (eachLayer) => {
|
|
@@ -147,9 +169,9 @@ export class CreateFeature {
|
|
|
147
169
|
visibleElements: {
|
|
148
170
|
snappingControls: false
|
|
149
171
|
},
|
|
150
|
-
container
|
|
172
|
+
container: this._container
|
|
151
173
|
});
|
|
152
|
-
this.el.appendChild(
|
|
174
|
+
this.el.appendChild(this._container);
|
|
153
175
|
//Add handle to watch if attachments are added/edited
|
|
154
176
|
const attachmentHandle = this.reactiveUtils.watch(() => this._editor.viewModel.state, (state) => {
|
|
155
177
|
if (state === 'adding-attachment' || state === 'editing-attachment') {
|
|
@@ -168,13 +190,14 @@ export class CreateFeature {
|
|
|
168
190
|
const handle = this.reactiveUtils.watch(() => this._editor.viewModel.featureTemplatesViewModel.state, (state) => {
|
|
169
191
|
if (state === 'ready') {
|
|
170
192
|
this.progressStatus.emit(0.5);
|
|
171
|
-
|
|
193
|
+
this._editorLoading = true;
|
|
172
194
|
}
|
|
173
195
|
});
|
|
174
196
|
this._editor.viewModel.addHandles(handle);
|
|
175
197
|
//Add handle to watch editor viewmodel state and then show the search widget
|
|
176
198
|
const formHandle = this.reactiveUtils.watch(() => this._editor.viewModel.state, (state) => {
|
|
177
199
|
if (state === 'creating-features') {
|
|
200
|
+
this._editorLoading = true;
|
|
178
201
|
this.showSearchWidget = true;
|
|
179
202
|
}
|
|
180
203
|
});
|
|
@@ -185,36 +208,39 @@ export class CreateFeature {
|
|
|
185
208
|
* @protected
|
|
186
209
|
*/
|
|
187
210
|
async startCreate() {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
this.
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
211
|
+
return new Promise((resolve, reject) => {
|
|
212
|
+
var _a;
|
|
213
|
+
if ((_a = this._editor.viewModel.featureTemplatesViewModel.items) === null || _a === void 0 ? void 0 : _a.length) {
|
|
214
|
+
const items = this._editor.viewModel.featureTemplatesViewModel.items[0].get("items");
|
|
215
|
+
//once the feature template is selected handle the event for formSubmit and sketch complete
|
|
216
|
+
//also, hide the headers and footer in the editor as we will be showing our own submit and cancel button
|
|
217
|
+
this._editor.viewModel.featureTemplatesViewModel.on('select', () => {
|
|
218
|
+
this.progressStatus.emit(0.75);
|
|
219
|
+
setTimeout(() => {
|
|
220
|
+
//on form submit
|
|
221
|
+
this._editor.viewModel.featureFormViewModel.on('submit', this.submitted.bind(this));
|
|
222
|
+
//on sketch complete emit the event
|
|
223
|
+
this._editor.viewModel.sketchViewModel.on("create", (evt) => {
|
|
224
|
+
if (evt.state === "complete") {
|
|
225
|
+
this.showSearchWidget = false;
|
|
226
|
+
this.progressStatus.emit(1);
|
|
227
|
+
this.drawComplete.emit();
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
this.hideEditorsElements().then(() => {
|
|
231
|
+
resolve({});
|
|
232
|
+
}, e => reject(e));
|
|
233
|
+
}, 700);
|
|
234
|
+
});
|
|
235
|
+
//if only one feature template then directly start geometry creation for that
|
|
236
|
+
//else allow feature template selection to user
|
|
237
|
+
if (items.length === 1) {
|
|
238
|
+
this._editor.viewModel.featureTemplatesViewModel.select(items[0]);
|
|
239
|
+
}
|
|
240
|
+
//hides the header and footer elements in editor widget
|
|
241
|
+
void this.hideEditorsElements();
|
|
214
242
|
}
|
|
215
|
-
|
|
216
|
-
this.hideEditorsElements();
|
|
217
|
-
}
|
|
243
|
+
});
|
|
218
244
|
}
|
|
219
245
|
/**
|
|
220
246
|
* Display search widget to search location
|
|
@@ -249,7 +275,7 @@ export class CreateFeature {
|
|
|
249
275
|
if (this._editor.viewModel.sketchViewModel.createGraphic && pointGeometry) {
|
|
250
276
|
this._editor.viewModel.sketchViewModel.createGraphic.set('geometry', pointGeometry);
|
|
251
277
|
this._editor.viewModel.sketchViewModel.complete();
|
|
252
|
-
this.hideEditorsElements();
|
|
278
|
+
void this.hideEditorsElements();
|
|
253
279
|
}
|
|
254
280
|
}, 100);
|
|
255
281
|
}
|
|
@@ -308,22 +334,21 @@ export class CreateFeature {
|
|
|
308
334
|
* Hides the elements of editor widget
|
|
309
335
|
* @protected
|
|
310
336
|
*/
|
|
311
|
-
hideEditorsElements() {
|
|
337
|
+
async hideEditorsElements() {
|
|
338
|
+
var _a;
|
|
312
339
|
if (!this.customizeSubmit) {
|
|
313
340
|
return;
|
|
314
341
|
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
});
|
|
326
|
-
}, 700);
|
|
342
|
+
await this.timeout(700);
|
|
343
|
+
//hides the header and footer on the featureForm
|
|
344
|
+
(_a = this.el.querySelector('.esri-editor').querySelectorAll('calcite-flow-item')) === null || _a === void 0 ? void 0 : _a.forEach((flowItem) => {
|
|
345
|
+
var _a, _b, _c, _d, _e;
|
|
346
|
+
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');
|
|
347
|
+
//hide the header
|
|
348
|
+
(_d = article === null || article === void 0 ? void 0 : article.querySelector('header')) === null || _d === void 0 ? void 0 : _d.setAttribute('style', 'display: none');
|
|
349
|
+
//hide the footer
|
|
350
|
+
(_e = article === null || article === void 0 ? void 0 : article.querySelector('footer')) === null || _e === void 0 ? void 0 : _e.setAttribute('style', 'display: none');
|
|
351
|
+
});
|
|
327
352
|
}
|
|
328
353
|
/**
|
|
329
354
|
* On creation of feature emit the event that the feature is created
|
|
@@ -334,11 +359,13 @@ export class CreateFeature {
|
|
|
334
359
|
var _a;
|
|
335
360
|
//return if any attribute is invalid , focus will be shifted to the invalid attribute in feature form
|
|
336
361
|
if (evt.invalid.length) {
|
|
362
|
+
this._isSubmitBtnClicked = false;
|
|
337
363
|
return;
|
|
338
364
|
}
|
|
339
365
|
//Submit only when valid attributes
|
|
340
366
|
//emit success or fail based on the result
|
|
341
|
-
if (evt.valid.length) {
|
|
367
|
+
if (evt.valid.length && this._isSubmitBtnClicked) {
|
|
368
|
+
this._isSubmitBtnClicked = false;
|
|
342
369
|
try {
|
|
343
370
|
await this._editor.activeWorkflow.commit();
|
|
344
371
|
//throw errors if any failures
|
|
@@ -357,6 +384,14 @@ export class CreateFeature {
|
|
|
357
384
|
this.success.emit();
|
|
358
385
|
}
|
|
359
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* call setTimeout in Promise wrapper
|
|
389
|
+
* @param delay The time, in milliseconds that the timer should wait before the promise is resolved
|
|
390
|
+
* @protected
|
|
391
|
+
*/
|
|
392
|
+
timeout(delay) {
|
|
393
|
+
return new Promise(resolve => setTimeout(resolve, delay));
|
|
394
|
+
}
|
|
360
395
|
static get is() { return "create-feature"; }
|
|
361
396
|
static get originalStyleUrls() {
|
|
362
397
|
return {
|
|
@@ -450,6 +485,7 @@ export class CreateFeature {
|
|
|
450
485
|
}
|
|
451
486
|
static get states() {
|
|
452
487
|
return {
|
|
488
|
+
"_editorLoading": {},
|
|
453
489
|
"showSearchWidget": {}
|
|
454
490
|
};
|
|
455
491
|
}
|
|
@@ -585,6 +621,9 @@ export class CreateFeature {
|
|
|
585
621
|
return [{
|
|
586
622
|
"propName": "mapView",
|
|
587
623
|
"methodName": "mapViewWatchHandler"
|
|
624
|
+
}, {
|
|
625
|
+
"propName": "_editorLoading",
|
|
626
|
+
"methodName": "_editorLoadingWatchHandler"
|
|
588
627
|
}];
|
|
589
628
|
}
|
|
590
629
|
}
|
|
@@ -22,6 +22,10 @@ import { Host, h } from "@stencil/core";
|
|
|
22
22
|
import { loadModules } from "../../utils/loadModules";
|
|
23
23
|
export class CreateRelatedFeature {
|
|
24
24
|
constructor() {
|
|
25
|
+
/**
|
|
26
|
+
* boolean: Flag to maintain form submission using submit button
|
|
27
|
+
*/
|
|
28
|
+
this._isSubmitBtnClicked = false;
|
|
25
29
|
this.mapView = undefined;
|
|
26
30
|
this.table = undefined;
|
|
27
31
|
this.selectedFeature = undefined;
|
|
@@ -58,6 +62,7 @@ export class CreateRelatedFeature {
|
|
|
58
62
|
*/
|
|
59
63
|
async submit() {
|
|
60
64
|
if (this._editor) {
|
|
65
|
+
this._isSubmitBtnClicked = true;
|
|
61
66
|
this._editor.viewModel.featureFormViewModel.submit();
|
|
62
67
|
}
|
|
63
68
|
}
|
|
@@ -95,7 +100,7 @@ export class CreateRelatedFeature {
|
|
|
95
100
|
this.reactiveUtils = reactiveUtils;
|
|
96
101
|
}
|
|
97
102
|
render() {
|
|
98
|
-
return (h(Host, { key: '
|
|
103
|
+
return (h(Host, { key: 'c8516898db79b35b7fba909810afdc56b0602ebd' }));
|
|
99
104
|
}
|
|
100
105
|
/**
|
|
101
106
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
|
@@ -225,11 +230,13 @@ export class CreateRelatedFeature {
|
|
|
225
230
|
var _a;
|
|
226
231
|
//return if any attribute is invalid , focus will be shifted to the invalid attribute in feature form
|
|
227
232
|
if (evt.invalid.length) {
|
|
233
|
+
this._isSubmitBtnClicked = false;
|
|
228
234
|
return;
|
|
229
235
|
}
|
|
230
236
|
//Submit only when valid attributes
|
|
231
237
|
//emit success or fail based on the result
|
|
232
|
-
if (evt.valid.length) {
|
|
238
|
+
if (evt.valid.length && this._isSubmitBtnClicked) {
|
|
239
|
+
this._isSubmitBtnClicked = false;
|
|
233
240
|
try {
|
|
234
241
|
await this._editor.activeWorkflow.commit();
|
|
235
242
|
//throw errors if any failures
|
|
@@ -202,7 +202,7 @@ export class CrowdsourceManager {
|
|
|
202
202
|
render() {
|
|
203
203
|
// only avoid border when we have a header color that is not white
|
|
204
204
|
const borderClass = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "";
|
|
205
|
-
return (h(Host, { key: '
|
|
205
|
+
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())));
|
|
206
206
|
}
|
|
207
207
|
/**
|
|
208
208
|
* Called after each render
|
|
@@ -118,7 +118,7 @@ export class CrowdsourceReporter {
|
|
|
118
118
|
*/
|
|
119
119
|
render() {
|
|
120
120
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
|
121
|
-
return (h(Host, { key: '
|
|
121
|
+
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()));
|
|
122
122
|
}
|
|
123
123
|
//--------------------------------------------------------------------------
|
|
124
124
|
//
|
|
@@ -788,8 +788,9 @@ export class CrowdsourceReporter {
|
|
|
788
788
|
*/
|
|
789
789
|
reduceToConfiguredLayers(hash) {
|
|
790
790
|
return Object.keys(hash).reduce((prev, cur) => {
|
|
791
|
+
var _a;
|
|
791
792
|
// check if reporting options exists consider the visible prop if else just check the supports Add
|
|
792
|
-
const showLayer = this.reportingOptions ? this._getLayersConfig(cur).visible
|
|
793
|
+
const showLayer = this.reportingOptions ? (_a = this._getLayersConfig(cur)) === null || _a === void 0 ? void 0 : _a.visible
|
|
793
794
|
: hash[cur].supportsAdd;
|
|
794
795
|
if (showLayer) {
|
|
795
796
|
prev.push(cur);
|
|
@@ -871,7 +872,7 @@ export class CrowdsourceReporter {
|
|
|
871
872
|
const featureSet = await queryFeaturesByID([Number(this.objectId)], layer, [], true, this.mapView.spatialReference);
|
|
872
873
|
if (featureSet.length) {
|
|
873
874
|
//update the selectedFeature
|
|
874
|
-
this.
|
|
875
|
+
await this.setSelectedFeatures(featureSet);
|
|
875
876
|
//if featureDetails not open then add it to the list else just reInit flowItems which will update details with newly selected features
|
|
876
877
|
// eslint-disable-next-line unicorn/prefer-ternary
|
|
877
878
|
if (this._flowItems.length && this._flowItems[this._flowItems.length - 1] !== "feature-details") {
|
|
@@ -880,7 +881,6 @@ export class CrowdsourceReporter {
|
|
|
880
881
|
else {
|
|
881
882
|
this._flowItems = [...this._flowItems];
|
|
882
883
|
}
|
|
883
|
-
await this.highlightOnMap(featureSet[0]);
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
886
|
}
|
|
@@ -41,7 +41,7 @@ export class DeductCalculator {
|
|
|
41
41
|
* Renders the component.
|
|
42
42
|
*/
|
|
43
43
|
render() {
|
|
44
|
-
return (h(Host, { key: '
|
|
44
|
+
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())));
|
|
45
45
|
}
|
|
46
46
|
//--------------------------------------------------------------------------
|
|
47
47
|
//
|
|
@@ -72,7 +72,7 @@ export class DeleteButton {
|
|
|
72
72
|
* Renders the component.
|
|
73
73
|
*/
|
|
74
74
|
render() {
|
|
75
|
-
return (h(Host, { key: '
|
|
75
|
+
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()));
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
|
@@ -109,7 +109,7 @@ export class DeleteButton {
|
|
|
109
109
|
_deleteMessage() {
|
|
110
110
|
const confirmMessage = this.ids.length === 1 ? this._translations.confirmSingle :
|
|
111
111
|
this._translations.confirmMultiple;
|
|
112
|
-
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)));
|
|
112
|
+
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)));
|
|
113
113
|
}
|
|
114
114
|
/**
|
|
115
115
|
* Delete the currently selected features
|
|
@@ -111,7 +111,7 @@ export class EditCard {
|
|
|
111
111
|
!this.graphics[0].layer.editingEnabled : true;
|
|
112
112
|
const tableNodeClass = this._editorLoading ? "display-none" : "position-absolute";
|
|
113
113
|
const loadingClass = this._editorLoading ? "" : "display-none";
|
|
114
|
-
return (h(Host, { key: '
|
|
114
|
+
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" })))));
|
|
115
115
|
}
|
|
116
116
|
//--------------------------------------------------------------------------
|
|
117
117
|
//
|
|
@@ -56,7 +56,7 @@ export class FeatureComments {
|
|
|
56
56
|
//
|
|
57
57
|
//--------------------------------------------------------------------------
|
|
58
58
|
render() {
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: '70ab7bb863463c41fa2291412f8da6d602e9a94d' }, h("slot", { key: '7266d385e0fc9341baf651a5dcab13b7ba361163' })));
|
|
60
60
|
}
|
|
61
61
|
static get is() { return "feature-comments"; }
|
|
62
62
|
static get encapsulation() { return "shadow"; }
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
.buttons-container{
|
|
6
6
|
align-items: center;
|
|
7
7
|
display: flex;
|
|
8
|
-
padding:
|
|
8
|
+
padding: 4px;
|
|
9
9
|
color: var(--calcite-color-text-1) !important;
|
|
10
10
|
background-color: var(--calcite-color-foreground-1) !important;
|
|
11
11
|
border-block-start: 1px solid var(--calcite-color-border-3);
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
.comment-btn{
|
|
16
16
|
display: flex;
|
|
17
|
-
gap:
|
|
18
|
-
font-size: var(--calcite-font-size--
|
|
17
|
+
gap: 10px;
|
|
18
|
+
font-size: var(--calcite-font-size--1);
|
|
19
19
|
align-items: center;
|
|
20
|
-
padding:
|
|
20
|
+
padding: 7px 0.75rem;
|
|
21
21
|
}
|
|
@@ -39,6 +39,7 @@ export class FeatureDetails {
|
|
|
39
39
|
this._isLikeBtnClicked = false;
|
|
40
40
|
this._isDislikeBtnClicked = false;
|
|
41
41
|
this._relatedFeaturesOIDs = undefined;
|
|
42
|
+
this._updating = false;
|
|
42
43
|
}
|
|
43
44
|
//--------------------------------------------------------------------------
|
|
44
45
|
//
|
|
@@ -110,12 +111,12 @@ export class FeatureDetails {
|
|
|
110
111
|
var _a, _b, _c, _d, _e;
|
|
111
112
|
//When related features found show comments list of only those features else comments list will be empty
|
|
112
113
|
const commentsListWhereClause = ((_a = this._relatedFeaturesOIDs) === null || _a === void 0 ? void 0 : _a.length) > 0 ? `objectId in(${this._relatedFeaturesOIDs})` : '1=0';
|
|
113
|
-
return (h("calcite-panel", { key: '
|
|
114
|
-
h("div", { key: '
|
|
115
|
-
h("div", { key: '
|
|
116
|
-
h("calcite-button", { key: '
|
|
117
|
-
h("calcite-button", { key: '
|
|
118
|
-
h("feature-list", { key: '
|
|
114
|
+
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) &&
|
|
115
|
+
h("div", { key: 'aa65adf8d8b6a059d5e9d0e74a1896eb20c84eaf', class: "buttons-container" }, this._commentsAvailable &&
|
|
116
|
+
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 &&
|
|
117
|
+
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 &&
|
|
118
|
+
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 &&
|
|
119
|
+
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 })));
|
|
119
120
|
}
|
|
120
121
|
/**
|
|
121
122
|
* Load esri javascript api modules
|
|
@@ -272,7 +273,6 @@ export class FeatureDetails {
|
|
|
272
273
|
* @protected
|
|
273
274
|
*/
|
|
274
275
|
onLikeButtonClick() {
|
|
275
|
-
this.loadingStatus.emit(true);
|
|
276
276
|
if (this._isDislikeBtnClicked && this.reportingOptions[this._selectedGraphic.layer.id].dislike) {
|
|
277
277
|
this.onDislikeButtonClick();
|
|
278
278
|
}
|
|
@@ -290,7 +290,6 @@ export class FeatureDetails {
|
|
|
290
290
|
* @protected
|
|
291
291
|
*/
|
|
292
292
|
onDislikeButtonClick() {
|
|
293
|
-
this.loadingStatus.emit(true);
|
|
294
293
|
if (this._isLikeBtnClicked && this.reportingOptions[this._selectedGraphic.layer.id].like) {
|
|
295
294
|
this.onLikeButtonClick();
|
|
296
295
|
}
|
|
@@ -312,6 +311,7 @@ export class FeatureDetails {
|
|
|
312
311
|
async updateFeaturesLikeDislikeField(fieldName, buttonClicked) {
|
|
313
312
|
const attributesToUpdate = {};
|
|
314
313
|
const selectedLayer = this._selectedGraphic.layer;
|
|
314
|
+
this._updating = true;
|
|
315
315
|
//Increment the value if button is clicked or else decrement it
|
|
316
316
|
const selectFeatureAttr = this._selectedGraphic;
|
|
317
317
|
if (buttonClicked) {
|
|
@@ -335,9 +335,9 @@ export class FeatureDetails {
|
|
|
335
335
|
}
|
|
336
336
|
//store the like dislike value for the current selected graphic in local storage
|
|
337
337
|
this.setInLocalStorage();
|
|
338
|
-
this.
|
|
338
|
+
this._updating = false;
|
|
339
339
|
}, (err) => {
|
|
340
|
-
this.
|
|
340
|
+
this._updating = false;
|
|
341
341
|
console.log(err);
|
|
342
342
|
});
|
|
343
343
|
}
|
|
@@ -490,7 +490,8 @@ export class FeatureDetails {
|
|
|
490
490
|
"_commentsAvailable": {},
|
|
491
491
|
"_isLikeBtnClicked": {},
|
|
492
492
|
"_isDislikeBtnClicked": {},
|
|
493
|
-
"_relatedFeaturesOIDs": {}
|
|
493
|
+
"_relatedFeaturesOIDs": {},
|
|
494
|
+
"_updating": {}
|
|
494
495
|
};
|
|
495
496
|
}
|
|
496
497
|
static get events() {
|
|
@@ -56,7 +56,7 @@ export class FeatureFormFlowItem {
|
|
|
56
56
|
//
|
|
57
57
|
//--------------------------------------------------------------------------
|
|
58
58
|
render() {
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: '32113dda304b2f7179d0275f04987e69ce386959' }, h("slot", { key: '358d5ea7a03cc7da16e98a92391cf74dfe9fa89b' })));
|
|
60
60
|
}
|
|
61
61
|
static get is() { return "feature-form-flow-item"; }
|
|
62
62
|
static get encapsulation() { return "shadow"; }
|
|
@@ -103,9 +103,9 @@ export class FeatureList {
|
|
|
103
103
|
* Renders the component.
|
|
104
104
|
*/
|
|
105
105
|
render() {
|
|
106
|
-
return (h("calcite-panel", { key: '
|
|
107
|
-
h("calcite-notice", { key: '
|
|
108
|
-
h("div", { key: '
|
|
106
|
+
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 &&
|
|
107
|
+
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 &&
|
|
108
|
+
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 }))));
|
|
109
109
|
}
|
|
110
110
|
//--------------------------------------------------------------------------
|
|
111
111
|
//
|
|
@@ -56,7 +56,7 @@ export class FeaturesFlowItem {
|
|
|
56
56
|
//
|
|
57
57
|
//--------------------------------------------------------------------------
|
|
58
58
|
render() {
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: 'eb455611b9248308ef11de0f2b03cb35bbc77e5b' }, h("slot", { key: 'f9829297423e86f028c1415e6c7d27c0967b9e8e' })));
|
|
60
60
|
}
|
|
61
61
|
static get is() { return "features-flow-item"; }
|
|
62
62
|
static get encapsulation() { return "shadow"; }
|
|
@@ -57,7 +57,7 @@ export class FloorFilter {
|
|
|
57
57
|
return this._initModules();
|
|
58
58
|
}
|
|
59
59
|
render() {
|
|
60
|
-
return (h(Host, { key: '
|
|
60
|
+
return (h(Host, { key: '98769446b20d8a9432b571b5653abbc6613bdfe5' }, h("div", { key: '6606a2593fec1885fc02b07a168bdea43e7f864a', ref: (el) => { this._floorFilterElement = el; } })));
|
|
61
61
|
}
|
|
62
62
|
//--------------------------------------------------------------------------
|
|
63
63
|
//
|