@esri/solutions-components 0.7.0 → 0.7.1

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 (196) hide show
  1. package/dist/assets/t9n/feature-comments/resources.json +3 -0
  2. package/dist/assets/t9n/feature-comments/resources_en.json +3 -0
  3. package/dist/assets/t9n/feature-form-flow-item/resources.json +3 -0
  4. package/dist/assets/t9n/feature-form-flow-item/resources_en.json +3 -0
  5. package/dist/assets/t9n/layer-table/resources.json +2 -1
  6. package/dist/assets/t9n/layer-table/resources_en.json +2 -1
  7. package/dist/assets/t9n/list-flow-item/resources.json +3 -0
  8. package/dist/assets/t9n/list-flow-item/resources_en.json +3 -0
  9. package/dist/assets/t9n/location-flow-item/resources.json +3 -0
  10. package/dist/assets/t9n/location-flow-item/resources_en.json +3 -0
  11. package/dist/assets/t9n/share-item/resources.json +3 -0
  12. package/dist/assets/t9n/share-item/resources_en.json +3 -0
  13. package/dist/cjs/{list-item.cjs.entry.js → arcgis-login.cjs.entry.js} +4 -19
  14. package/dist/cjs/basemap-gallery_7.cjs.entry.js +13 -9
  15. package/dist/cjs/calcite-action_2.cjs.entry.js +61 -392
  16. package/dist/cjs/calcite-alert_3.cjs.entry.js +21 -3
  17. package/dist/cjs/calcite-combobox_6.cjs.entry.js +32 -8
  18. package/dist/cjs/calcite-popover.cjs.entry.js +418 -0
  19. package/dist/cjs/card-manager_3.cjs.entry.js +154 -18
  20. package/dist/cjs/crowdsource-manager.cjs.entry.js +24 -2
  21. package/dist/cjs/crowdsource-reporter.cjs.entry.js +45 -6
  22. package/dist/cjs/{downloadUtils-e3e595e9.js → downloadUtils-9c4fde54.js} +2 -2
  23. package/dist/cjs/feature-comments.cjs.entry.js +60 -0
  24. package/dist/cjs/feature-form-flow-item.cjs.entry.js +60 -0
  25. package/dist/cjs/features-flow-item.cjs.entry.js +60 -0
  26. package/dist/cjs/{index.es-047537b5.js → index.es-d208a6d6.js} +2 -2
  27. package/dist/cjs/list-flow-item.cjs.entry.js +60 -0
  28. package/dist/cjs/loader.cjs.js +1 -1
  29. package/dist/cjs/location-flow-item.cjs.entry.js +60 -0
  30. package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
  31. package/dist/cjs/{mapViewUtils-f7bbc35b.js → mapViewUtils-bab83c90.js} +21 -0
  32. package/dist/cjs/public-notification.cjs.entry.js +2 -2
  33. package/dist/cjs/refine-results-flow-item.cjs.entry.js +60 -0
  34. package/dist/cjs/share-item.cjs.entry.js +60 -0
  35. package/dist/cjs/solutions-components.cjs.js +1 -1
  36. package/dist/collection/collection-manifest.json +8 -1
  37. package/dist/collection/components/{list-item/list-item.js → arcgis-login/arcgis-login.js} +4 -19
  38. package/dist/collection/components/arcgis-login/test/arcgis-login.e2e.js +29 -0
  39. package/dist/collection/components/arcgis-login/test/arcgis-login.spec.js +37 -0
  40. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +118 -2
  41. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +294 -6
  42. package/dist/collection/components/feature-comments/feature-comments.css +19 -0
  43. package/dist/collection/components/feature-comments/feature-comments.js +74 -0
  44. package/dist/collection/components/feature-comments/test/feature-comments.e2e.js +29 -0
  45. package/dist/collection/components/feature-comments/test/feature-comments.spec.js +37 -0
  46. package/dist/collection/components/feature-form-flow-item/feature-form-flow-item.css +19 -0
  47. package/dist/collection/components/feature-form-flow-item/feature-form-flow-item.js +74 -0
  48. package/dist/collection/components/feature-form-flow-item/test/feature-form-flow-item.e2e.js +29 -0
  49. package/dist/collection/components/feature-form-flow-item/test/feature-form-flow-item.spec.js +37 -0
  50. package/dist/collection/components/features-flow-item/features-flow-item.css +19 -0
  51. package/dist/collection/components/features-flow-item/features-flow-item.js +74 -0
  52. package/dist/collection/components/features-flow-item/test/features-flow-item.e2e.js +29 -0
  53. package/dist/collection/components/features-flow-item/test/features-flow-item.spec.js +37 -0
  54. package/dist/collection/components/info-card/info-card.js +21 -2
  55. package/dist/collection/components/layer-table/layer-table.js +199 -10
  56. package/dist/collection/components/list-flow-item/list-flow-item.css +19 -0
  57. package/dist/collection/components/list-flow-item/list-flow-item.js +74 -0
  58. package/dist/collection/components/list-flow-item/test/list-flow-item.e2e.js +29 -0
  59. package/dist/collection/components/list-flow-item/test/list-flow-item.spec.js +37 -0
  60. package/dist/collection/components/location-flow-item/location-flow-item.css +19 -0
  61. package/dist/collection/components/location-flow-item/location-flow-item.js +74 -0
  62. package/dist/collection/components/location-flow-item/test/location-flow-item.e2e.js +29 -0
  63. package/dist/collection/components/location-flow-item/test/location-flow-item.spec.js +37 -0
  64. package/dist/collection/components/map-card/map-card.js +38 -7
  65. package/dist/collection/components/map-layer-picker/map-layer-picker.js +49 -7
  66. package/dist/collection/components/map-picker/map-picker.js +37 -9
  67. package/dist/collection/components/refine-results-flow-item/refine-results-flow-item.css +19 -0
  68. package/dist/collection/components/refine-results-flow-item/refine-results-flow-item.js +74 -0
  69. package/dist/collection/components/refine-results-flow-item/test/refine-results-flow-item.e2e.js +29 -0
  70. package/dist/collection/components/refine-results-flow-item/test/refine-results-flow-item.spec.js +37 -0
  71. package/dist/collection/components/share-item/share-item.css +19 -0
  72. package/dist/collection/components/share-item/share-item.js +74 -0
  73. package/dist/collection/components/share-item/test/share-item.e2e.js +29 -0
  74. package/dist/collection/components/share-item/test/share-item.spec.js +37 -0
  75. package/dist/collection/demos/crowdsource-reporter.html +56 -15
  76. package/dist/collection/utils/interfaces.ts +5 -0
  77. package/dist/collection/utils/queryUtils.js +20 -0
  78. package/dist/collection/utils/queryUtils.ts +26 -0
  79. package/dist/components/arcgis-login.d.ts +11 -0
  80. package/dist/components/arcgis-login.js +75 -0
  81. package/dist/components/calcite-list-item.js +1 -1
  82. package/dist/components/card-manager2.js +7 -1
  83. package/dist/components/crowdsource-manager.js +32 -3
  84. package/dist/components/crowdsource-reporter.js +61 -7
  85. package/dist/components/feature-comments.d.ts +11 -0
  86. package/dist/components/feature-comments.js +75 -0
  87. package/dist/components/feature-form-flow-item.d.ts +11 -0
  88. package/dist/components/feature-form-flow-item.js +75 -0
  89. package/dist/components/features-flow-item.d.ts +11 -0
  90. package/dist/components/features-flow-item.js +75 -0
  91. package/dist/components/info-card2.js +28 -3
  92. package/dist/components/layer-table2.js +138 -10
  93. package/dist/components/list-flow-item.d.ts +11 -0
  94. package/dist/components/list-flow-item.js +75 -0
  95. package/dist/components/list-item.js +425 -55
  96. package/dist/components/location-flow-item.d.ts +11 -0
  97. package/dist/components/location-flow-item.js +75 -0
  98. package/dist/components/map-card2.js +22 -8
  99. package/dist/components/map-layer-picker2.js +32 -7
  100. package/dist/components/map-picker2.js +16 -11
  101. package/dist/components/map-select-tools2.js +1 -1
  102. package/dist/components/public-notification.js +1 -1
  103. package/dist/components/queryUtils.js +21 -1
  104. package/dist/components/refine-results-flow-item.d.ts +11 -0
  105. package/dist/components/refine-results-flow-item.js +75 -0
  106. package/dist/components/refine-selection2.js +2 -2
  107. package/dist/components/{list-item.d.ts → share-item.d.ts} +4 -4
  108. package/dist/components/share-item.js +75 -0
  109. package/dist/esm/{list-item.entry.js → arcgis-login.entry.js} +4 -19
  110. package/dist/esm/basemap-gallery_7.entry.js +13 -9
  111. package/dist/esm/calcite-action_2.entry.js +63 -394
  112. package/dist/esm/calcite-alert_3.entry.js +21 -3
  113. package/dist/esm/calcite-combobox_6.entry.js +32 -8
  114. package/dist/esm/calcite-popover.entry.js +414 -0
  115. package/dist/esm/card-manager_3.entry.js +154 -18
  116. package/dist/esm/crowdsource-manager.entry.js +24 -2
  117. package/dist/esm/crowdsource-reporter.entry.js +45 -6
  118. package/dist/esm/{downloadUtils-8fbd1347.js → downloadUtils-b84a6f55.js} +2 -2
  119. package/dist/esm/feature-comments.entry.js +56 -0
  120. package/dist/esm/feature-form-flow-item.entry.js +56 -0
  121. package/dist/esm/features-flow-item.entry.js +56 -0
  122. package/dist/esm/{index.es-b6705ce7.js → index.es-0d4698c7.js} +2 -2
  123. package/dist/esm/list-flow-item.entry.js +56 -0
  124. package/dist/esm/loader.js +1 -1
  125. package/dist/esm/location-flow-item.entry.js +56 -0
  126. package/dist/esm/map-select-tools_3.entry.js +2 -2
  127. package/dist/esm/{mapViewUtils-1e2befd7.js → mapViewUtils-88f363b6.js} +21 -1
  128. package/dist/esm/public-notification.entry.js +2 -2
  129. package/dist/esm/refine-results-flow-item.entry.js +56 -0
  130. package/dist/esm/share-item.entry.js +56 -0
  131. package/dist/esm/solutions-components.js +1 -1
  132. package/dist/solutions-components/demos/crowdsource-reporter.html +56 -15
  133. package/dist/solutions-components/{p-072680a5.js → p-214d41c3.js} +2 -2
  134. package/dist/solutions-components/p-28657abb.entry.js +11 -0
  135. package/dist/solutions-components/p-31b66bc3.entry.js +6 -0
  136. package/dist/solutions-components/{p-0123207d.entry.js → p-34737944.entry.js} +1 -1
  137. package/dist/solutions-components/{p-13d0424a.entry.js → p-3ced939f.entry.js} +1 -1
  138. package/dist/solutions-components/p-3dfbf45e.entry.js +6 -0
  139. package/dist/solutions-components/{p-092fd5d9.js → p-3ee78186.js} +1 -1
  140. package/dist/solutions-components/{p-7f793144.entry.js → p-4327c361.entry.js} +1 -1
  141. package/dist/solutions-components/p-455f4ed8.entry.js +17 -0
  142. package/dist/solutions-components/p-478fc7cb.entry.js +6 -0
  143. package/dist/solutions-components/p-4aafb627.js +36 -0
  144. package/dist/solutions-components/p-58562dda.entry.js +6 -0
  145. package/dist/solutions-components/{p-f367db61.entry.js → p-81503752.entry.js} +1 -1
  146. package/dist/solutions-components/{p-c90671e1.entry.js → p-9d54d7a0.entry.js} +4 -4
  147. package/dist/solutions-components/p-a5d70d3a.entry.js +6 -0
  148. package/dist/solutions-components/p-bd62df52.entry.js +6 -0
  149. package/dist/solutions-components/{p-ca780ab8.entry.js → p-d6f51bea.entry.js} +2 -2
  150. package/dist/solutions-components/p-e6371690.entry.js +6 -0
  151. package/dist/solutions-components/p-e7aad23d.entry.js +6 -0
  152. package/dist/solutions-components/p-ed95f634.entry.js +6 -0
  153. package/dist/solutions-components/p-fd08afb5.entry.js +6 -0
  154. package/dist/solutions-components/solutions-components.esm.js +1 -1
  155. package/dist/solutions-components/utils/interfaces.ts +5 -0
  156. package/dist/solutions-components/utils/queryUtils.ts +26 -0
  157. package/dist/types/components/{list-item/list-item.d.ts → arcgis-login/arcgis-login.d.ts} +2 -9
  158. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +36 -0
  159. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +73 -0
  160. package/dist/types/components/feature-comments/feature-comments.d.ts +19 -0
  161. package/dist/types/components/feature-form-flow-item/feature-form-flow-item.d.ts +19 -0
  162. package/dist/types/components/features-flow-item/features-flow-item.d.ts +19 -0
  163. package/dist/types/components/info-card/info-card.d.ts +8 -0
  164. package/dist/types/components/layer-table/layer-table.d.ts +77 -2
  165. package/dist/types/components/list-flow-item/list-flow-item.d.ts +19 -0
  166. package/dist/types/components/location-flow-item/location-flow-item.d.ts +19 -0
  167. package/dist/types/components/map-card/map-card.d.ts +12 -0
  168. package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +15 -2
  169. package/dist/types/components/map-picker/map-picker.d.ts +1 -4
  170. package/dist/types/components/refine-results-flow-item/refine-results-flow-item.d.ts +19 -0
  171. package/dist/types/components/share-item/share-item.d.ts +19 -0
  172. package/dist/types/components.d.ts +301 -9
  173. package/dist/types/preact.d.ts +15 -1
  174. package/dist/types/utils/interfaces.d.ts +4 -0
  175. package/dist/types/utils/queryUtils.d.ts +9 -0
  176. package/package.json +1 -1
  177. package/dist/assets/t9n/config-buffer-tools/resources.json +0 -12
  178. package/dist/assets/t9n/config-buffer-tools/resources_en.json +0 -12
  179. package/dist/assets/t9n/config-draw-tools/resources.json +0 -10
  180. package/dist/assets/t9n/config-draw-tools/resources_en.json +0 -10
  181. package/dist/assets/t9n/config-layer-picker/resources.json +0 -3
  182. package/dist/assets/t9n/config-layer-picker/resources_en.json +0 -3
  183. package/dist/assets/t9n/config-pdf-download/resources.json +0 -6
  184. package/dist/assets/t9n/config-pdf-download/resources_en.json +0 -6
  185. package/dist/cjs/calcite-loader.cjs.entry.js +0 -80
  186. package/dist/components/list-item2.js +0 -460
  187. package/dist/esm/calcite-loader.entry.js +0 -76
  188. package/dist/solutions-components/p-11cb7b04.entry.js +0 -6
  189. package/dist/solutions-components/p-45cf4f67.entry.js +0 -6
  190. package/dist/solutions-components/p-4807b2a1.js +0 -36
  191. package/dist/solutions-components/p-557a1912.entry.js +0 -6
  192. package/dist/solutions-components/p-68735975.entry.js +0 -6
  193. package/dist/solutions-components/p-ec830ecb.entry.js +0 -23
  194. /package/dist/assets/t9n/{list-item → arcgis-login}/resources.json +0 -0
  195. /package/dist/assets/t9n/{list-item → arcgis-login}/resources_en.json +0 -0
  196. /package/dist/collection/components/{list-item/list-item.css → arcgis-login/arcgis-login.css} +0 -0
@@ -22,7 +22,7 @@ import { Host, h } from "@stencil/core";
22
22
  import { loadModules } from "../../utils/loadModules";
23
23
  import { getLocaleComponentStrings } from "../../utils/locale";
24
24
  import { getLayerOrTable, goToSelection } from "../../utils/mapViewUtils";
25
- import { queryAllIds } from "../../utils/queryUtils";
25
+ import { queryAllIds, queryFeaturesByGlobalID } from "../../utils/queryUtils";
26
26
  import * as downloadUtils from "../../utils/downloadUtils";
27
27
  export class LayerTable {
28
28
  constructor() {
@@ -30,6 +30,14 @@ export class LayerTable {
30
30
  * number[]: A list of all IDs for the current layer
31
31
  */
32
32
  this._allIds = [];
33
+ /**
34
+ * boolean: When true the default global id provided via url param has been honored and should now be ignored
35
+ */
36
+ this._defaultGlobalIdHonored = false;
37
+ /**
38
+ * boolean: When true the default OID provided via url param has been honored and should now be ignored
39
+ */
40
+ this._defaultOidHonored = false;
33
41
  /**
34
42
  * bool: When true the table is being sorted
35
43
  */
@@ -45,7 +53,11 @@ export class LayerTable {
45
53
  this.onTableNodeCreate = (node) => {
46
54
  this._tableNode = node;
47
55
  };
56
+ this.defaultLayerId = undefined;
57
+ this.defaultGlobalId = undefined;
58
+ this.defaultOid = undefined;
48
59
  this.enableAutoRefresh = undefined;
60
+ this.enableColumnReorder = true;
49
61
  this.enableCSV = undefined;
50
62
  this.enableInlineEdit = undefined;
51
63
  this.enableZoom = undefined;
@@ -60,6 +72,7 @@ export class LayerTable {
60
72
  this._isDeleting = false;
61
73
  this._layer = undefined;
62
74
  this._selectedIndexes = [];
75
+ this._showHideOpen = false;
63
76
  this._showOnlySelected = false;
64
77
  this._sortActive = false;
65
78
  this._translations = undefined;
@@ -220,6 +233,7 @@ export class LayerTable {
220
233
  */
221
234
  async componentDidLoad() {
222
235
  this._resizeObserver.observe(this._toolbar);
236
+ document.onclick = (e) => this._handleDocumentClick(e);
223
237
  }
224
238
  /**
225
239
  * Called after the component is rendered
@@ -274,7 +288,7 @@ export class LayerTable {
274
288
  * @returns The dom node that contains the controls
275
289
  */
276
290
  _getActionBar() {
277
- return (h("calcite-action-bar", { expandDisabled: true, expanded: true, id: this._getId("bar"), layout: "horizontal" }, h("div", { class: "border-end", id: "solutions-map-layer-picker-container" }, h("map-layer-picker", { appearance: "transparent", mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChanged(evt), onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, placeholderIcon: "layers", scale: "l", showTables: true, type: "dropdown" })), this._getActions()));
291
+ return (h("calcite-action-bar", { expandDisabled: true, expanded: true, id: this._getId("bar"), layout: "horizontal" }, h("div", { class: "border-end", id: "solutions-map-layer-picker-container" }, h("map-layer-picker", { appearance: "transparent", defaultLayerId: this.defaultLayerId, mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChanged(evt), onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, placeholderIcon: "layers", scale: "l", showTables: true, type: "dropdown" })), this._getActions()));
278
292
  }
279
293
  /**
280
294
  * Get the actions that are used for various interactions with the table
@@ -287,11 +301,33 @@ export class LayerTable {
287
301
  if (cur && !cur.isOverflow) {
288
302
  prev.push(cur.isDanger ?
289
303
  this._getDangerAction(cur.icon, cur.label, cur.func, cur.disabled) :
290
- this._getAction(cur.icon, cur.label, cur.func, cur.disabled));
304
+ cur.isSublist ? (h("calcite-dropdown", { closeOnSelectDisabled: true, id: this._getId(cur.icon), onCalciteDropdownBeforeClose: () => this._forceShowHide(), ref: (el) => this._showHideDropdown = el }, this._getAction(this._showHideOpen ? "chevron-down" : cur.icon, cur.label, cur.func, cur.disabled, "trigger"), this._showHideOpen ? this._getFieldlist() : undefined)) :
305
+ this._getAction(cur.icon, cur.label, cur.func, cur.disabled));
291
306
  }
292
307
  return prev;
293
308
  }, []);
294
309
  }
310
+ /**
311
+ * Get the list of fields as dropdown items and store the current selected state so
312
+ * we can show/hide the appropriate fields
313
+ *
314
+ * @returns Node with the fields as dropdown items
315
+ */
316
+ _getFieldlist() {
317
+ return this._columnsInfo ? (h("calcite-dropdown-group", { "selection-mode": "multiple" }, Object.keys(this._columnsInfo).map(k => {
318
+ const selected = this._columnsInfo[k];
319
+ return (h("calcite-dropdown-item", { id: k, onClick: (e) => {
320
+ const target = e.target;
321
+ this._columnsInfo[target.id] = target.selected;
322
+ if (!target.selected) {
323
+ this._table.hideColumn(target.id);
324
+ }
325
+ else {
326
+ this._table.showColumn(target.id);
327
+ }
328
+ }, selected: selected }, k));
329
+ }))) : undefined;
330
+ }
295
331
  /**
296
332
  * Update actions enabled prop based on number of selected indexes
297
333
  *
@@ -380,7 +416,14 @@ export class LayerTable {
380
416
  label: this._translations.exportCSV,
381
417
  disabled: featuresEmpty,
382
418
  isOverflow: false
383
- } : undefined];
419
+ } : undefined, {
420
+ icon: this._showHideOpen ? "chevron-down" : "chevron-right",
421
+ func: () => this._toggleShowHide(),
422
+ label: this._translations.showHideColumns,
423
+ disabled: false,
424
+ isOverflow: false,
425
+ isSublist: true
426
+ }];
384
427
  this._defaultVisibleToolSizeInfos = undefined;
385
428
  }
386
429
  /**
@@ -531,9 +574,9 @@ export class LayerTable {
531
574
  */
532
575
  _getDropdown(id) {
533
576
  const dropdownItems = this._getDropdownItems();
534
- return dropdownItems.length > 0 ? (h("calcite-dropdown", { disabled: this._layer === undefined, id: "solutions-more" }, h("calcite-action", { appearance: "solid", id: id, label: "", slot: "trigger", text: "" }, h("calcite-button", { appearance: "transparent", iconEnd: "chevron-down", kind: "neutral" }, this._translations.more)), h("calcite-dropdown-group", { "selection-mode": "none" }, dropdownItems.map(item => {
535
- return (h("calcite-dropdown-item", { iconStart: item.icon, onClick: item.func }, item.label));
536
- })))) : undefined;
577
+ return dropdownItems.length > 0 ? (h("calcite-dropdown", { closeOnSelectDisabled: true, disabled: this._layer === undefined, id: "solutions-more", onCalciteDropdownBeforeClose: () => this._forceShowHide(), ref: (el) => this._moreDropdown = el }, h("calcite-action", { appearance: "solid", id: id, label: "", onClick: () => this._closeShowHide(), slot: "trigger", text: "" }, h("calcite-button", { appearance: "transparent", iconEnd: "chevron-down", kind: "neutral" }, this._translations.more)), h("calcite-dropdown-group", { "selection-mode": "none" }, dropdownItems.map(item => {
578
+ return (h("calcite-dropdown-item", { iconStart: item.isSublist && this._showHideOpen ? "chevron-down" : item.icon, id: "solutions-subset-list", onClick: item.func }, item.label));
579
+ })), this._showHideOpen ? this._getFieldlist() : undefined)) : undefined;
537
580
  }
538
581
  /**
539
582
  * Get a list of toolInfos that should display in the dropdown
@@ -553,9 +596,9 @@ export class LayerTable {
553
596
  *
554
597
  * @returns VNode The node representing the DOM element that will contain the action
555
598
  */
556
- _getAction(icon, label, func, disabled) {
599
+ _getAction(icon, label, func, disabled, slot) {
557
600
  const _disabled = this._layer === undefined ? true : disabled;
558
- return (h("div", { class: "display-flex", id: this._getId(icon) }, h("calcite-action", { appearance: "solid", disabled: _disabled, icon: icon, id: icon, label: label, onClick: func, text: label, textEnabled: true }), this._getToolTip("", "bottom", icon, label)));
601
+ return (h("div", { class: "display-flex", id: this._getId(icon), slot: slot }, h("calcite-action", { appearance: "solid", disabled: _disabled, icon: icon, id: icon, label: label, onClick: func, text: label, textEnabled: true }), this._getToolTip("", "bottom", icon, label)));
559
602
  }
560
603
  /**
561
604
  * Get a tooltip
@@ -608,6 +651,7 @@ export class LayerTable {
608
651
  autoRefreshEnabled: this.enableAutoRefresh,
609
652
  layer: this._layer,
610
653
  view: this.mapView,
654
+ columnReorderingEnabled: this.enableColumnReorder,
611
655
  editingEnabled: this._editEnabled && this.enableInlineEdit,
612
656
  highlightEnabled: true,
613
657
  multiSortEnabled: false,
@@ -621,6 +665,7 @@ export class LayerTable {
621
665
  container: node
622
666
  });
623
667
  });
668
+ this._initColumnsInfo();
624
669
  this._checkEditEnabled();
625
670
  await this._table.when(() => {
626
671
  this._table.highlightIds.on("change", () => {
@@ -667,14 +712,53 @@ export class LayerTable {
667
712
  this._checkEditEnabled();
668
713
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
669
714
  this._initToolInfos();
670
- await this._table.when(() => {
715
+ await this._table.when(async () => {
716
+ var _a, _b;
671
717
  this._table.highlightIds.removeAll();
672
718
  this._table.clearSelectionFilter();
719
+ this._initColumnsInfo();
720
+ if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1) {
721
+ this._selectDefaultFeature(this.defaultOid);
722
+ this._defaultOidHonored = true;
723
+ }
724
+ if (!this._defaultGlobalIdHonored && ((_b = this.defaultGlobalId) === null || _b === void 0 ? void 0 : _b.length) > 0) {
725
+ const features = await queryFeaturesByGlobalID(this.defaultGlobalId, this._layer);
726
+ const oids = (features === null || features === void 0 ? void 0 : features.length) > 0 ? features.map(f => f.getObjectId()) : undefined;
727
+ if (oids) {
728
+ this._selectDefaultFeature(oids);
729
+ }
730
+ this._defaultGlobalIdHonored = true;
731
+ }
673
732
  });
674
733
  this._showOnlySelected = false;
675
734
  this._sortActive = false;
676
735
  await this._sortTable();
677
736
  }
737
+ /**
738
+ * Store the column names and current hidden status to support show/hide of columns
739
+ *
740
+ * @returns void
741
+ */
742
+ _initColumnsInfo() {
743
+ this._columnsInfo = this._table.columns.reduce((prev, cur) => {
744
+ prev[cur.name] = !cur.hidden;
745
+ return prev;
746
+ }, {});
747
+ }
748
+ /**
749
+ * Select the feature that was specified via url params
750
+ *
751
+ * @returns void
752
+ */
753
+ _selectDefaultFeature(oids) {
754
+ if (oids.length > 0) {
755
+ this._table.highlightIds.addMany(oids);
756
+ void this._table.when(() => {
757
+ const i = this._table.viewModel.getObjectIdIndex(oids[0]);
758
+ this._table.viewModel.scrollToIndex(i);
759
+ });
760
+ }
761
+ }
678
762
  /**
679
763
  * Verify edit capabilities of the layer
680
764
  *
@@ -701,6 +785,45 @@ export class LayerTable {
701
785
  }
702
786
  }
703
787
  }
788
+ /**
789
+ * Open show/hide dropdown
790
+ */
791
+ _forceShowHide() {
792
+ if (this._showHideDropdown) {
793
+ this._showHideDropdown.open = this._showHideOpen;
794
+ }
795
+ if (this._moreDropdown) {
796
+ this._moreDropdown.open = this._showHideOpen;
797
+ }
798
+ }
799
+ /**
800
+ * Toggle show/hide dropdown
801
+ */
802
+ _toggleShowHide() {
803
+ this._showHideOpen = !this._showHideOpen;
804
+ }
805
+ /**
806
+ * Open show/hide dropdown
807
+ */
808
+ _closeShowHide() {
809
+ this._showHideOpen = false;
810
+ }
811
+ /**
812
+ * Close show/hide dropdown when the user clicks outside of it
813
+ */
814
+ _handleDocumentClick(e) {
815
+ var _a;
816
+ const id = (_a = e.target) === null || _a === void 0 ? void 0 : _a.id;
817
+ if (this._showHideOpen && Object.keys(this._columnsInfo).indexOf(id) < 0 && id !== "solutions-subset-list" && id !== "chevron-right") {
818
+ this._closeShowHide();
819
+ if (this._moreDropdown) {
820
+ this._moreDropdown.open = false;
821
+ }
822
+ if (this._showHideDropdown) {
823
+ this._showHideDropdown.open = false;
824
+ }
825
+ }
826
+ }
704
827
  /**
705
828
  * Show delete confirmation message
706
829
  *
@@ -946,6 +1069,53 @@ export class LayerTable {
946
1069
  }
947
1070
  static get properties() {
948
1071
  return {
1072
+ "defaultLayerId": {
1073
+ "type": "string",
1074
+ "mutable": false,
1075
+ "complexType": {
1076
+ "original": "string",
1077
+ "resolved": "string",
1078
+ "references": {}
1079
+ },
1080
+ "required": false,
1081
+ "optional": false,
1082
+ "docs": {
1083
+ "tags": [],
1084
+ "text": "string: when provided this layer ID will be used when the app loads"
1085
+ },
1086
+ "attribute": "default-layer-id",
1087
+ "reflect": false
1088
+ },
1089
+ "defaultGlobalId": {
1090
+ "type": "unknown",
1091
+ "mutable": false,
1092
+ "complexType": {
1093
+ "original": "string[]",
1094
+ "resolved": "string[]",
1095
+ "references": {}
1096
+ },
1097
+ "required": false,
1098
+ "optional": false,
1099
+ "docs": {
1100
+ "tags": [],
1101
+ "text": "string: Global ID of the feature to select"
1102
+ }
1103
+ },
1104
+ "defaultOid": {
1105
+ "type": "unknown",
1106
+ "mutable": false,
1107
+ "complexType": {
1108
+ "original": "number[]",
1109
+ "resolved": "number[]",
1110
+ "references": {}
1111
+ },
1112
+ "required": false,
1113
+ "optional": false,
1114
+ "docs": {
1115
+ "tags": [],
1116
+ "text": "number: when provided this will be used to select a feature in the table by default"
1117
+ }
1118
+ },
949
1119
  "enableAutoRefresh": {
950
1120
  "type": "boolean",
951
1121
  "mutable": false,
@@ -963,6 +1133,24 @@ export class LayerTable {
963
1133
  "attribute": "enable-auto-refresh",
964
1134
  "reflect": false
965
1135
  },
1136
+ "enableColumnReorder": {
1137
+ "type": "boolean",
1138
+ "mutable": false,
1139
+ "complexType": {
1140
+ "original": "boolean",
1141
+ "resolved": "boolean",
1142
+ "references": {}
1143
+ },
1144
+ "required": false,
1145
+ "optional": false,
1146
+ "docs": {
1147
+ "tags": [],
1148
+ "text": "boolean: when true the layer table will support drag/drop of columns to adjust order"
1149
+ },
1150
+ "attribute": "enable-column-reorder",
1151
+ "reflect": false,
1152
+ "defaultValue": "true"
1153
+ },
966
1154
  "enableCSV": {
967
1155
  "type": "boolean",
968
1156
  "mutable": false,
@@ -1116,6 +1304,7 @@ export class LayerTable {
1116
1304
  "_isDeleting": {},
1117
1305
  "_layer": {},
1118
1306
  "_selectedIndexes": {},
1307
+ "_showHideOpen": {},
1119
1308
  "_showOnlySelected": {},
1120
1309
  "_sortActive": {},
1121
1310
  "_translations": {}
@@ -0,0 +1,19 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ :host {
18
+ display: block;
19
+ }
@@ -0,0 +1,74 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ /** @license
7
+ * Copyright 2022 Esri
8
+ *
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+ import { Host, h } from "@stencil/core";
22
+ export class ListFlowItem {
23
+ //--------------------------------------------------------------------------
24
+ //
25
+ // Properties (public)
26
+ //
27
+ //--------------------------------------------------------------------------
28
+ //--------------------------------------------------------------------------
29
+ //
30
+ // State (internal)
31
+ //
32
+ //--------------------------------------------------------------------------
33
+ //--------------------------------------------------------------------------
34
+ //
35
+ // Properties (protected)
36
+ //
37
+ //--------------------------------------------------------------------------
38
+ //--------------------------------------------------------------------------
39
+ //
40
+ // Watch handlers
41
+ //
42
+ //--------------------------------------------------------------------------
43
+ //--------------------------------------------------------------------------
44
+ //
45
+ // Methods (public)
46
+ //
47
+ //--------------------------------------------------------------------------
48
+ //--------------------------------------------------------------------------
49
+ //
50
+ // Events (public)
51
+ //
52
+ //--------------------------------------------------------------------------
53
+ //--------------------------------------------------------------------------
54
+ //
55
+ // Functions (lifecycle)
56
+ //
57
+ //--------------------------------------------------------------------------
58
+ render() {
59
+ return (h(Host, null, h("slot", null)));
60
+ }
61
+ static get is() { return "list-flow-item"; }
62
+ static get encapsulation() { return "shadow"; }
63
+ static get originalStyleUrls() {
64
+ return {
65
+ "$": ["list-flow-item.css"]
66
+ };
67
+ }
68
+ static get styleUrls() {
69
+ return {
70
+ "$": ["list-flow-item.css"]
71
+ };
72
+ }
73
+ static get elementRef() { return "el"; }
74
+ }
@@ -0,0 +1,29 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ /** @license
7
+ * Copyright 2022 Esri
8
+ *
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+ import { newE2EPage } from "@stencil/core/testing";
22
+ xdescribe('list-flow-item', () => {
23
+ it('renders', async () => {
24
+ const page = await newE2EPage();
25
+ await page.setContent('<list-flow-item></list-flow-item>');
26
+ const element = await page.find('list-flow-item');
27
+ expect(element).toHaveClass('hydrated');
28
+ });
29
+ });
@@ -0,0 +1,37 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ /** @license
7
+ * Copyright 2022 Esri
8
+ *
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+ import { newSpecPage } from "@stencil/core/testing";
22
+ import { ListFlowItem } from "../list-flow-item";
23
+ xdescribe('list-flow-item', () => {
24
+ it('renders', async () => {
25
+ const page = await newSpecPage({
26
+ components: [ListFlowItem],
27
+ html: `<list-flow-item></list-flow-item>`,
28
+ });
29
+ expect(page.root).toEqualHtml(`
30
+ <list-flow-item>
31
+ <mock:shadow-root>
32
+ <slot></slot>
33
+ </mock:shadow-root>
34
+ </list-flow-item>
35
+ `);
36
+ });
37
+ });
@@ -0,0 +1,19 @@
1
+ /** @license
2
+ * Copyright 2022 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ :host {
18
+ display: block;
19
+ }
@@ -0,0 +1,74 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ /** @license
7
+ * Copyright 2022 Esri
8
+ *
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+ import { Host, h } from "@stencil/core";
22
+ export class LocationFlowItem {
23
+ //--------------------------------------------------------------------------
24
+ //
25
+ // Properties (public)
26
+ //
27
+ //--------------------------------------------------------------------------
28
+ //--------------------------------------------------------------------------
29
+ //
30
+ // State (internal)
31
+ //
32
+ //--------------------------------------------------------------------------
33
+ //--------------------------------------------------------------------------
34
+ //
35
+ // Properties (protected)
36
+ //
37
+ //--------------------------------------------------------------------------
38
+ //--------------------------------------------------------------------------
39
+ //
40
+ // Watch handlers
41
+ //
42
+ //--------------------------------------------------------------------------
43
+ //--------------------------------------------------------------------------
44
+ //
45
+ // Methods (public)
46
+ //
47
+ //--------------------------------------------------------------------------
48
+ //--------------------------------------------------------------------------
49
+ //
50
+ // Events (public)
51
+ //
52
+ //--------------------------------------------------------------------------
53
+ //--------------------------------------------------------------------------
54
+ //
55
+ // Functions (lifecycle)
56
+ //
57
+ //--------------------------------------------------------------------------
58
+ render() {
59
+ return (h(Host, null, h("slot", null)));
60
+ }
61
+ static get is() { return "location-flow-item"; }
62
+ static get encapsulation() { return "shadow"; }
63
+ static get originalStyleUrls() {
64
+ return {
65
+ "$": ["location-flow-item.css"]
66
+ };
67
+ }
68
+ static get styleUrls() {
69
+ return {
70
+ "$": ["location-flow-item.css"]
71
+ };
72
+ }
73
+ static get elementRef() { return "el"; }
74
+ }
@@ -0,0 +1,29 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ /** @license
7
+ * Copyright 2022 Esri
8
+ *
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+ import { newE2EPage } from "@stencil/core/testing";
22
+ xdescribe('location-flow-item', () => {
23
+ it('renders', async () => {
24
+ const page = await newE2EPage();
25
+ await page.setContent('<location-flow-item></location-flow-item>');
26
+ const element = await page.find('location-flow-item');
27
+ expect(element).toHaveClass('hydrated');
28
+ });
29
+ });
@@ -0,0 +1,37 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ /** @license
7
+ * Copyright 2022 Esri
8
+ *
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+ import { newSpecPage } from "@stencil/core/testing";
22
+ import { LocationFlowItem } from "../location-flow-item";
23
+ xdescribe('location-flow-item', () => {
24
+ it('renders', async () => {
25
+ const page = await newSpecPage({
26
+ components: [LocationFlowItem],
27
+ html: `<location-flow-item></location-flow-item>`,
28
+ });
29
+ expect(page.root).toEqualHtml(`
30
+ <location-flow-item>
31
+ <mock:shadow-root>
32
+ <slot></slot>
33
+ </mock:shadow-root>
34
+ </location-flow-item>
35
+ `);
36
+ });
37
+ });