@esri/solutions-components 0.11.17 → 0.11.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/card-manager_3.cjs.entry.js +116 -137
- package/dist/cjs/create-feature_4.cjs.entry.js +55 -9
- package/dist/cjs/create-related-feature_3.cjs.entry.js +1 -1
- package/dist/cjs/crowdsource-manager.cjs.entry.js +32 -19
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +1 -1
- package/dist/cjs/{downloadUtils-88ec0e88.js → downloadUtils-9abff913.js} +1 -1
- package/dist/cjs/feature-list.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-layer-picker.cjs.entry.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
- package/dist/cjs/{mapViewUtils-319df9ec.js → mapViewUtils-4ea7216c.js} +0 -44
- package/dist/cjs/{popupUtils-ca1127aa.js → popupUtils-fc7557da.js} +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +2 -2
- package/dist/cjs/solution-item-accordion.cjs.entry.js +6 -3
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/assets/t9n/crowdsource-manager/resources.json +4 -1
- package/dist/collection/assets/t9n/crowdsource-manager/resources_en.json +4 -1
- package/dist/collection/components/card-manager/card-manager.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +23 -0
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +32 -18
- package/dist/collection/components/info-card/info-card.js +88 -7
- package/dist/collection/components/layer-table/layer-table.js +147 -137
- package/dist/collection/components/solution-item-accordion/solution-item-accordion.js +11 -4
- package/dist/components/card-manager2.js +1 -1
- package/dist/components/crowdsource-manager.js +33 -19
- package/dist/components/info-card2.js +54 -6
- package/dist/components/layer-table2.js +116 -136
- package/dist/components/map-select-tools2.js +1 -1
- package/dist/components/queryUtils.js +1 -43
- package/dist/components/refine-selection2.js +1 -1
- package/dist/components/solution-item-accordion.js +6 -3
- package/dist/esm/card-manager_3.entry.js +116 -137
- package/dist/esm/create-feature_4.entry.js +55 -9
- package/dist/esm/create-related-feature_3.entry.js +1 -1
- package/dist/esm/crowdsource-manager.entry.js +32 -19
- package/dist/esm/crowdsource-reporter.entry.js +1 -1
- package/dist/esm/{downloadUtils-22a8f2d8.js → downloadUtils-36d854d2.js} +1 -1
- package/dist/esm/feature-list.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-layer-picker.entry.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +2 -2
- package/dist/esm/{mapViewUtils-a854e298.js → mapViewUtils-9da9be1c.js} +1 -43
- package/dist/esm/{popupUtils-1314cb13.js → popupUtils-64d25cb0.js} +1 -1
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solution-item-accordion.entry.js +6 -3
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/assets/t9n/crowdsource-manager/resources.json +4 -1
- package/dist/solutions-components/assets/t9n/crowdsource-manager/resources_en.json +4 -1
- package/dist/solutions-components/{p-43d9bb7d.entry.js → p-055706e3.entry.js} +1 -1
- package/dist/solutions-components/{p-8ea0a36a.entry.js → p-06970873.entry.js} +1 -1
- package/dist/solutions-components/{p-bf2598f8.entry.js → p-3c43839b.entry.js} +1 -1
- package/dist/solutions-components/{p-4f514c6d.js → p-6eab9d1f.js} +1 -1
- package/dist/solutions-components/{p-a003600b.entry.js → p-72ae3bf0.entry.js} +1 -1
- package/dist/solutions-components/p-777ed6b0.entry.js +6 -0
- package/dist/solutions-components/{p-5ea1e18b.entry.js → p-8b5c3c9f.entry.js} +1 -1
- package/dist/solutions-components/{p-1fe3577a.entry.js → p-a44815ea.entry.js} +1 -1
- package/dist/solutions-components/p-b1bd3028.entry.js +6 -0
- package/dist/solutions-components/{p-3c3aecdd.js → p-d0d21a1f.js} +1 -1
- package/dist/solutions-components/{p-952da957.js → p-dcd2f00b.js} +2 -2
- package/dist/solutions-components/{p-bc2548ba.entry.js → p-e2270562.entry.js} +1 -1
- package/dist/solutions-components/p-e90c0e26.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components_commit.txt +6 -6
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +11 -7
- package/dist/types/components/info-card/info-card.d.ts +16 -0
- package/dist/types/components/layer-table/layer-table.d.ts +32 -21
- package/dist/types/components/solution-item-accordion/solution-item-accordion.d.ts +1 -1
- package/dist/types/components.d.ts +19 -2
- package/dist/types/preact.d.ts +2 -1
- package/package.json +1 -1
- package/dist/solutions-components/p-87919d6d.entry.js +0 -6
- package/dist/solutions-components/p-b37be371.entry.js +0 -6
- package/dist/solutions-components/p-ce8377c6.entry.js +0 -6
@@ -74,6 +74,10 @@ export class InfoCard {
|
|
74
74
|
* string: Set the position of the feature info
|
75
75
|
*/
|
76
76
|
position = 'absolute';
|
77
|
+
/**
|
78
|
+
* boolean: If true show close button on the feature info
|
79
|
+
*/
|
80
|
+
showCloseBtn = false;
|
77
81
|
//--------------------------------------------------------------------------
|
78
82
|
//
|
79
83
|
// State (internal)
|
@@ -106,6 +110,10 @@ export class InfoCard {
|
|
106
110
|
* All UI strings should be defined here.
|
107
111
|
*/
|
108
112
|
_translations;
|
113
|
+
/**
|
114
|
+
* boolean: When true user has been navigated to related feature
|
115
|
+
*/
|
116
|
+
_navigatedToRelatedFeature;
|
109
117
|
//--------------------------------------------------------------------------
|
110
118
|
//
|
111
119
|
// Properties (protected)
|
@@ -141,6 +149,10 @@ export class InfoCard {
|
|
141
149
|
* esri/core/reactiveUtils: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html
|
142
150
|
*/
|
143
151
|
reactiveUtils;
|
152
|
+
/**
|
153
|
+
* __esri.Graphic: Related feature selected from the features widget
|
154
|
+
*/
|
155
|
+
_relatedFeature;
|
144
156
|
//--------------------------------------------------------------------------
|
145
157
|
//
|
146
158
|
// Watch handlers
|
@@ -150,6 +162,14 @@ export class InfoCard {
|
|
150
162
|
* Watch for changes to the graphic and update the feature widget
|
151
163
|
*/
|
152
164
|
async graphicsWatchHandler() {
|
165
|
+
// if user has been navigated to related record and graphics is changed then close the feature widget and then set graphics to avoid blank popup issue
|
166
|
+
// https://github.com/Esri/solutions-components/issues/1113
|
167
|
+
if (this._navigatedToRelatedFeature && this._features) {
|
168
|
+
this._features.clear();
|
169
|
+
this._features.close();
|
170
|
+
this._count = "";
|
171
|
+
this._navigatedToRelatedFeature = false;
|
172
|
+
}
|
153
173
|
await this.setGraphics();
|
154
174
|
}
|
155
175
|
/**
|
@@ -240,6 +260,10 @@ export class InfoCard {
|
|
240
260
|
* Emitted on demand when the popup is closed
|
241
261
|
*/
|
242
262
|
popupClosed;
|
263
|
+
/**
|
264
|
+
* Emitted on demand when close button is clicked
|
265
|
+
*/
|
266
|
+
clearSelection;
|
243
267
|
/**
|
244
268
|
* Emitted on demand when the selected index changes
|
245
269
|
*/
|
@@ -266,7 +290,10 @@ export class InfoCard {
|
|
266
290
|
* Refresh the info-card graphics
|
267
291
|
*/
|
268
292
|
async refreshGraphics(evt) {
|
269
|
-
|
293
|
+
// if if user is not navigated to related feature then only update the graphics otherwise the related feature will shown instead of selected feature
|
294
|
+
if (!this._navigatedToRelatedFeature) {
|
295
|
+
this.graphics = [...evt.detail];
|
296
|
+
}
|
270
297
|
}
|
271
298
|
//--------------------------------------------------------------------------
|
272
299
|
//
|
@@ -300,13 +327,16 @@ export class InfoCard {
|
|
300
327
|
const featureNodeClass = this.isLoading || this._editRecordOpen ? "visibility-hidden" : "position-absolute";
|
301
328
|
const editClass = !this.isLoading && this._editRecordOpen ? "position-absolute" : "display-none";
|
302
329
|
const editButtonClass = (!this.isLoading && this._editRecordOpen) || this._showListView ? "display-none" : "";
|
303
|
-
const nextBackDisabled = this._features?.features?.length < 2;
|
330
|
+
const nextBackDisabled = this._features?.features?.length < 2 || this._navigatedToRelatedFeature;
|
304
331
|
const nextBackClass = this.isMobile ? "display-none" : "";
|
305
332
|
const id = this._features?.selectedFeature?.getObjectId();
|
306
333
|
const ids = parseInt(id?.toString(), 10) > -1 ? [id] : [];
|
307
334
|
const deleteEnabled = this._layer?.editingEnabled && this._layer?.capabilities?.operations?.supportsDelete;
|
308
|
-
|
309
|
-
|
335
|
+
// if user has navigated to the related feature then pass the related feature to the graphics
|
336
|
+
const graphics = this._relatedFeature ? [this._relatedFeature] : this.graphics;
|
337
|
+
const selectedFeatureIndex = this._navigatedToRelatedFeature ? 0 : this._features?.selectedFeatureIndex;
|
338
|
+
return (h(Host, { key: '9f75eb2e7aba944474e85c34b2abe23982629558' }, h("calcite-shell", { key: '748f9e50cd3aa7a52dd7910b171c0d7f54d09203', style: { position: this.position } }, this._getHeader(), h("calcite-loader", { key: 'feced4d4a66df36958644436acaa53ddabdfc02a', class: loadingClass, label: this._translations.fetchingData }), h("div", { key: '3bb912c80d610a21a5e283c6bd19ab0c63023c45', class: "esri-widget feature-node " + featureNodeClass, id: this._featuresNodeId }), h("div", { key: '479dcbda08f837b32bd19ed7f40856f081e92a6e', class: `${editButtonClass} width-100`, slot: "footer" }, this.allowEditing &&
|
339
|
+
h("div", { key: 'dd78b02ba8506c391aada6c5233691ec9babcfbe', class: "display-flex top-border padding-1-2" }, h("calcite-button", { key: 'c5a807609c60151a433fa9c0055fbfdf20b2935f', appearance: "solid", id: "solutions-edit", onClick: () => this._openEditRecord(), width: "full" }, this._translations.edit), this.isMobile && deleteEnabled ? (h("delete-button", { class: "padding-inline-start-1 width-100", id: "solutions-delete", ids: ids, layer: this._layer, locale: this.locale, onEditsComplete: () => this._closePopup() })) : undefined, h("calcite-tooltip", { key: 'a4cd4c77e982e23675ec9eaf08e2135de6c83b65', placement: "bottom", "reference-element": "solutions-edit" }, h("span", { key: '22533608996d1c87b9b04e339506ec01176379b0' }, this._translations.edit)), this.isMobile && deleteEnabled ? (h("calcite-tooltip", { placement: "bottom", "reference-element": "solutions-delete" }, h("span", null, this._translations.delete))) : undefined), this.paginationEnabled && !nextBackDisabled && h("div", { key: '183ff7da57a06de8f5419edf5973f18b41c46097', class: `display-flex padding-1-2 button-container top-border ${nextBackClass}` }, h("div", { key: '77e59229d1d516ccdc8f7c5be2f89a5ad9d5004b' }, h("calcite-button", { key: '4b6a6f1f85e9199e14d626ba66b6b319283d0c32', appearance: 'transparent', disabled: nextBackDisabled, iconFlipRtl: "both", iconStart: "chevron-left", id: "solutions-back", onClick: () => this._back(), width: "full" }), h("calcite-tooltip", { key: '7056c5cb3c790c804194f09f2586864a28dce5e1', placement: "top", "reference-element": "solutions-back" }, h("span", { key: '923fc5425a9faced6952a1b9acff9b7d0f3da286' }, this._translations.back))), h("calcite-action", { key: 'a34bfb4ae71a91373fd476e7b704a6a2f8f23157', class: 'pagination-action', iconFlipRtl: true, onClick: () => this._toggleListView(), scale: "s", text: "", textEnabled: true }, h("span", { key: '101a0fa592af65b540123c835e9031a18671ad8b', class: "pagination-count" }, this._count)), h("div", { key: 'c4f88f464a3091dfc77578470de4f42d05b9f5c7' }, h("calcite-button", { key: 'e4e35e539f0c7e01a31e0047db545d4d334ef2d8', appearance: "transparent", disabled: nextBackDisabled, iconFlipRtl: "both", iconStart: "chevron-right", id: "solutions-next", onClick: () => this._next(), width: "full" }), h("calcite-tooltip", { key: '40244ecf5566fde448b311272d2ee00d70bc531a', placement: "top", "reference-element": "solutions-next" }, h("span", { key: 'db01e2a2b9da9a80f9a25caf49bf8beb872e6ad9' }, this._translations.next))))), h("edit-card", { key: 'cfa193b01b67f7709ea6a491caa0c647c536e9e3', class: editClass, enableEditGeometry: this.enableEditGeometry, graphicIndex: selectedFeatureIndex, graphics: graphics, locale: this.locale, mapView: this.mapView, open: this._editRecordOpen }), h("calcite-alert", { key: '709fd6d681d32a03fcf5fba959e81a0153676e26', icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { key: 'bbdd9cc98fcda8ffba294a4322f08468072f6aef', slot: "title" }, this._translations.editDisabled), h("div", { key: 'd07e32e9cd54cc82ff005e7e696e13e1b8bdaa4e', slot: "message" }, this._translations.enableEditing)))));
|
310
340
|
}
|
311
341
|
//--------------------------------------------------------------------------
|
312
342
|
//
|
@@ -366,7 +396,7 @@ export class InfoCard {
|
|
366
396
|
container: this._featuresNodeId,
|
367
397
|
visibleElements: {
|
368
398
|
actionBar: false,
|
369
|
-
closeButton:
|
399
|
+
closeButton: this.showCloseBtn,
|
370
400
|
heading: !this.isMobile
|
371
401
|
}
|
372
402
|
});
|
@@ -382,11 +412,26 @@ export class InfoCard {
|
|
382
412
|
this.selectionChanged.emit({ selectedFeature: [this._features.selectedFeature], selectedFeatureIndex: this._features.selectedFeatureIndex });
|
383
413
|
}
|
384
414
|
});
|
415
|
+
this.reactiveUtils.watch(() => this._features.selectedDrillInFeature, (f) => {
|
416
|
+
if (f) {
|
417
|
+
this._relatedFeature = f;
|
418
|
+
this._navigatedToRelatedFeature = true;
|
419
|
+
}
|
420
|
+
else {
|
421
|
+
this._relatedFeature = null;
|
422
|
+
this._navigatedToRelatedFeature = false;
|
423
|
+
}
|
424
|
+
});
|
425
|
+
// get the info card node element and emit clear selection while clicking the close button
|
426
|
+
const infoCard = this.el.querySelector('#' + this._featuresNodeId);
|
427
|
+
infoCard.addEventListener('calciteFlowItemClose', () => {
|
428
|
+
this.clearSelection.emit();
|
429
|
+
});
|
385
430
|
}
|
386
431
|
else {
|
387
432
|
this._features.view = this.mapView;
|
388
433
|
this._features.visibleElements.actionBar = false;
|
389
|
-
this._features.visibleElements.closeButton =
|
434
|
+
this._features.visibleElements.closeButton = this.showCloseBtn;
|
390
435
|
this._features.visibleElements.heading = !this.isMobile;
|
391
436
|
}
|
392
437
|
}) : Promise.resolve();
|
@@ -686,6 +731,26 @@ export class InfoCard {
|
|
686
731
|
"attribute": "position",
|
687
732
|
"reflect": false,
|
688
733
|
"defaultValue": "'absolute'"
|
734
|
+
},
|
735
|
+
"showCloseBtn": {
|
736
|
+
"type": "boolean",
|
737
|
+
"mutable": false,
|
738
|
+
"complexType": {
|
739
|
+
"original": "boolean",
|
740
|
+
"resolved": "boolean",
|
741
|
+
"references": {}
|
742
|
+
},
|
743
|
+
"required": false,
|
744
|
+
"optional": true,
|
745
|
+
"docs": {
|
746
|
+
"tags": [],
|
747
|
+
"text": "boolean: If true show close button on the feature info"
|
748
|
+
},
|
749
|
+
"getter": false,
|
750
|
+
"setter": false,
|
751
|
+
"attribute": "show-close-btn",
|
752
|
+
"reflect": false,
|
753
|
+
"defaultValue": "false"
|
689
754
|
}
|
690
755
|
};
|
691
756
|
}
|
@@ -696,7 +761,8 @@ export class InfoCard {
|
|
696
761
|
"_editRecordOpen": {},
|
697
762
|
"_mobileTitle": {},
|
698
763
|
"_showListView": {},
|
699
|
-
"_translations": {}
|
764
|
+
"_translations": {},
|
765
|
+
"_navigatedToRelatedFeature": {}
|
700
766
|
};
|
701
767
|
}
|
702
768
|
static get events() {
|
@@ -715,6 +781,21 @@ export class InfoCard {
|
|
715
781
|
"resolved": "void",
|
716
782
|
"references": {}
|
717
783
|
}
|
784
|
+
}, {
|
785
|
+
"method": "clearSelection",
|
786
|
+
"name": "clearSelection",
|
787
|
+
"bubbles": true,
|
788
|
+
"cancelable": true,
|
789
|
+
"composed": true,
|
790
|
+
"docs": {
|
791
|
+
"tags": [],
|
792
|
+
"text": "Emitted on demand when close button is clicked"
|
793
|
+
},
|
794
|
+
"complexType": {
|
795
|
+
"original": "void",
|
796
|
+
"resolved": "void",
|
797
|
+
"references": {}
|
798
|
+
}
|
718
799
|
}, {
|
719
800
|
"method": "selectionChanged",
|
720
801
|
"name": "selectionChanged",
|