@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.
Files changed (73) hide show
  1. package/dist/cjs/card-manager_3.cjs.entry.js +116 -137
  2. package/dist/cjs/create-feature_4.cjs.entry.js +55 -9
  3. package/dist/cjs/create-related-feature_3.cjs.entry.js +1 -1
  4. package/dist/cjs/crowdsource-manager.cjs.entry.js +32 -19
  5. package/dist/cjs/crowdsource-reporter.cjs.entry.js +1 -1
  6. package/dist/cjs/{downloadUtils-88ec0e88.js → downloadUtils-9abff913.js} +1 -1
  7. package/dist/cjs/feature-list.cjs.entry.js +3 -3
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/map-layer-picker.cjs.entry.js +1 -1
  10. package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
  11. package/dist/cjs/{mapViewUtils-319df9ec.js → mapViewUtils-4ea7216c.js} +0 -44
  12. package/dist/cjs/{popupUtils-ca1127aa.js → popupUtils-fc7557da.js} +1 -1
  13. package/dist/cjs/public-notification.cjs.entry.js +2 -2
  14. package/dist/cjs/solution-item-accordion.cjs.entry.js +6 -3
  15. package/dist/cjs/solutions-components.cjs.js +1 -1
  16. package/dist/collection/assets/t9n/crowdsource-manager/resources.json +4 -1
  17. package/dist/collection/assets/t9n/crowdsource-manager/resources_en.json +4 -1
  18. package/dist/collection/components/card-manager/card-manager.js +1 -1
  19. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +23 -0
  20. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +32 -18
  21. package/dist/collection/components/info-card/info-card.js +88 -7
  22. package/dist/collection/components/layer-table/layer-table.js +147 -137
  23. package/dist/collection/components/solution-item-accordion/solution-item-accordion.js +11 -4
  24. package/dist/components/card-manager2.js +1 -1
  25. package/dist/components/crowdsource-manager.js +33 -19
  26. package/dist/components/info-card2.js +54 -6
  27. package/dist/components/layer-table2.js +116 -136
  28. package/dist/components/map-select-tools2.js +1 -1
  29. package/dist/components/queryUtils.js +1 -43
  30. package/dist/components/refine-selection2.js +1 -1
  31. package/dist/components/solution-item-accordion.js +6 -3
  32. package/dist/esm/card-manager_3.entry.js +116 -137
  33. package/dist/esm/create-feature_4.entry.js +55 -9
  34. package/dist/esm/create-related-feature_3.entry.js +1 -1
  35. package/dist/esm/crowdsource-manager.entry.js +32 -19
  36. package/dist/esm/crowdsource-reporter.entry.js +1 -1
  37. package/dist/esm/{downloadUtils-22a8f2d8.js → downloadUtils-36d854d2.js} +1 -1
  38. package/dist/esm/feature-list.entry.js +3 -3
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/esm/map-layer-picker.entry.js +1 -1
  41. package/dist/esm/map-select-tools_3.entry.js +2 -2
  42. package/dist/esm/{mapViewUtils-a854e298.js → mapViewUtils-9da9be1c.js} +1 -43
  43. package/dist/esm/{popupUtils-1314cb13.js → popupUtils-64d25cb0.js} +1 -1
  44. package/dist/esm/public-notification.entry.js +2 -2
  45. package/dist/esm/solution-item-accordion.entry.js +6 -3
  46. package/dist/esm/solutions-components.js +1 -1
  47. package/dist/solutions-components/assets/t9n/crowdsource-manager/resources.json +4 -1
  48. package/dist/solutions-components/assets/t9n/crowdsource-manager/resources_en.json +4 -1
  49. package/dist/solutions-components/{p-43d9bb7d.entry.js → p-055706e3.entry.js} +1 -1
  50. package/dist/solutions-components/{p-8ea0a36a.entry.js → p-06970873.entry.js} +1 -1
  51. package/dist/solutions-components/{p-bf2598f8.entry.js → p-3c43839b.entry.js} +1 -1
  52. package/dist/solutions-components/{p-4f514c6d.js → p-6eab9d1f.js} +1 -1
  53. package/dist/solutions-components/{p-a003600b.entry.js → p-72ae3bf0.entry.js} +1 -1
  54. package/dist/solutions-components/p-777ed6b0.entry.js +6 -0
  55. package/dist/solutions-components/{p-5ea1e18b.entry.js → p-8b5c3c9f.entry.js} +1 -1
  56. package/dist/solutions-components/{p-1fe3577a.entry.js → p-a44815ea.entry.js} +1 -1
  57. package/dist/solutions-components/p-b1bd3028.entry.js +6 -0
  58. package/dist/solutions-components/{p-3c3aecdd.js → p-d0d21a1f.js} +1 -1
  59. package/dist/solutions-components/{p-952da957.js → p-dcd2f00b.js} +2 -2
  60. package/dist/solutions-components/{p-bc2548ba.entry.js → p-e2270562.entry.js} +1 -1
  61. package/dist/solutions-components/p-e90c0e26.entry.js +6 -0
  62. package/dist/solutions-components/solutions-components.esm.js +1 -1
  63. package/dist/solutions-components_commit.txt +6 -6
  64. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +11 -7
  65. package/dist/types/components/info-card/info-card.d.ts +16 -0
  66. package/dist/types/components/layer-table/layer-table.d.ts +32 -21
  67. package/dist/types/components/solution-item-accordion/solution-item-accordion.d.ts +1 -1
  68. package/dist/types/components.d.ts +19 -2
  69. package/dist/types/preact.d.ts +2 -1
  70. package/package.json +1 -1
  71. package/dist/solutions-components/p-87919d6d.entry.js +0 -6
  72. package/dist/solutions-components/p-b37be371.entry.js +0 -6
  73. 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
- this.graphics = [...evt.detail];
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
- return (h(Host, { key: '66070d48134f89d9cf132572fe1adf790b6d3ec6' }, h("calcite-shell", { key: 'b77248dce176df940d8b0c347154b73738a5576d', style: { position: this.position } }, this._getHeader(), h("calcite-loader", { key: 'c1638ca8320a0ae12a9ccd1fd8841efde4236ba5', class: loadingClass, label: this._translations.fetchingData }), h("div", { key: 'cf5ee3be5c0ea3be36205dcf7c0747461802a5f1', class: "esri-widget feature-node " + featureNodeClass, id: this._featuresNodeId }), h("div", { key: '6fbfa6947fa0fdb1b14a03217da60f07ecff2e1b', class: `${editButtonClass} width-100`, slot: "footer" }, this.allowEditing &&
309
- h("div", { key: 'fdcb078c3b3f183b06dc3a48d27fee46e3a4fffa', class: "display-flex top-border padding-1-2" }, h("calcite-button", { key: '7193bec80a40f353d24e5d327d99d94a2c5ff356', 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: '228a9691edd916a5d644cb19db24898cdf7cab3b', placement: "bottom", "reference-element": "solutions-edit" }, h("span", { key: '5c696df370bcf230d3fc06523ec3cb9d96f2fe2b' }, 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: 'e1b829a888913af6a9d777a2df0d65571ac3bec1', class: `display-flex padding-1-2 button-container top-border ${nextBackClass}` }, h("div", { key: '8746737a103266efe64a8f80c2359f9e170586d5' }, h("calcite-button", { key: 'ac6fc23dc2831608cc9c86fe384c0a927cd7d7ac', appearance: 'transparent', disabled: nextBackDisabled, iconFlipRtl: "both", iconStart: "chevron-left", id: "solutions-back", onClick: () => this._back(), width: "full" }), h("calcite-tooltip", { key: 'd4a1e2753c35e97064ca66d5c30deccd532fb158', placement: "top", "reference-element": "solutions-back" }, h("span", { key: 'caae32b5e32a0d89265293beccef157d227a7600' }, this._translations.back))), h("calcite-action", { key: 'a87f344a06896ad86886815254979793b057e4cd', class: 'pagination-action', iconFlipRtl: true, onClick: () => this._toggleListView(), scale: "s", text: "", textEnabled: true }, h("span", { key: '6e6f84ebedb2540edb485fa0789fe8ea67e7188f', class: "pagination-count" }, this._count)), h("div", { key: '6acf22348a508c921865bb4c7e531f9a826a8eed' }, h("calcite-button", { key: 'f1d763e1747cff7e0b6bec08ec4fade3d1582379', appearance: "transparent", disabled: nextBackDisabled, iconFlipRtl: "both", iconStart: "chevron-right", id: "solutions-next", onClick: () => this._next(), width: "full" }), h("calcite-tooltip", { key: 'def93e3d1f19b4e6eb3e54c5fbd918fed118cc0c', placement: "top", "reference-element": "solutions-next" }, h("span", { key: 'cb9b90a5b3129861b7f58fd0271c6120893dfd53' }, this._translations.next))))), h("edit-card", { key: '524819a6dc64775b88b22aaf24445fd5ebdeae24', class: editClass, enableEditGeometry: this.enableEditGeometry, graphicIndex: this._features?.selectedFeatureIndex, graphics: this.graphics, locale: this.locale, mapView: this.mapView, open: this._editRecordOpen }), h("calcite-alert", { key: '394c3b416a5dc94381c8b93afd3308121fbebd81', icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { key: 'f4868bf3b710d91ed7e3f1e34b846bd408febac0', slot: "title" }, this._translations.editDisabled), h("div", { key: '457b7d0c76bfac52340bec73f5d1d2abbd10f25a', slot: "message" }, this._translations.enableEditing)))));
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: false,
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 = false;
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",