@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
@@ -0,0 +1,75 @@
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
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
7
+
8
+ const featureFormFlowItemCss = ":host{display:block}";
9
+
10
+ const FeatureFormFlowItem$1 = /*@__PURE__*/ proxyCustomElement(class FeatureFormFlowItem extends HTMLElement {
11
+ constructor() {
12
+ super();
13
+ this.__registerHost();
14
+ this.__attachShadow();
15
+ }
16
+ //--------------------------------------------------------------------------
17
+ //
18
+ // Properties (public)
19
+ //
20
+ //--------------------------------------------------------------------------
21
+ //--------------------------------------------------------------------------
22
+ //
23
+ // State (internal)
24
+ //
25
+ //--------------------------------------------------------------------------
26
+ //--------------------------------------------------------------------------
27
+ //
28
+ // Properties (protected)
29
+ //
30
+ //--------------------------------------------------------------------------
31
+ //--------------------------------------------------------------------------
32
+ //
33
+ // Watch handlers
34
+ //
35
+ //--------------------------------------------------------------------------
36
+ //--------------------------------------------------------------------------
37
+ //
38
+ // Methods (public)
39
+ //
40
+ //--------------------------------------------------------------------------
41
+ //--------------------------------------------------------------------------
42
+ //
43
+ // Events (public)
44
+ //
45
+ //--------------------------------------------------------------------------
46
+ //--------------------------------------------------------------------------
47
+ //
48
+ // Functions (lifecycle)
49
+ //
50
+ //--------------------------------------------------------------------------
51
+ render() {
52
+ return (h(Host, null, h("slot", null)));
53
+ }
54
+ get el() { return this; }
55
+ static get style() { return featureFormFlowItemCss; }
56
+ }, [1, "feature-form-flow-item"]);
57
+ function defineCustomElement$1() {
58
+ if (typeof customElements === "undefined") {
59
+ return;
60
+ }
61
+ const components = ["feature-form-flow-item"];
62
+ components.forEach(tagName => { switch (tagName) {
63
+ case "feature-form-flow-item":
64
+ if (!customElements.get(tagName)) {
65
+ customElements.define(tagName, FeatureFormFlowItem$1);
66
+ }
67
+ break;
68
+ } });
69
+ }
70
+ defineCustomElement$1();
71
+
72
+ const FeatureFormFlowItem = FeatureFormFlowItem$1;
73
+ const defineCustomElement = defineCustomElement$1;
74
+
75
+ export { FeatureFormFlowItem, defineCustomElement };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface FeaturesFlowItem extends Components.FeaturesFlowItem, HTMLElement {}
4
+ export const FeaturesFlowItem: {
5
+ prototype: FeaturesFlowItem;
6
+ new (): FeaturesFlowItem;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,75 @@
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
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
7
+
8
+ const featuresFlowItemCss = ":host{display:block}";
9
+
10
+ const FeaturesFlowItem$1 = /*@__PURE__*/ proxyCustomElement(class FeaturesFlowItem extends HTMLElement {
11
+ constructor() {
12
+ super();
13
+ this.__registerHost();
14
+ this.__attachShadow();
15
+ }
16
+ //--------------------------------------------------------------------------
17
+ //
18
+ // Properties (public)
19
+ //
20
+ //--------------------------------------------------------------------------
21
+ //--------------------------------------------------------------------------
22
+ //
23
+ // State (internal)
24
+ //
25
+ //--------------------------------------------------------------------------
26
+ //--------------------------------------------------------------------------
27
+ //
28
+ // Properties (protected)
29
+ //
30
+ //--------------------------------------------------------------------------
31
+ //--------------------------------------------------------------------------
32
+ //
33
+ // Watch handlers
34
+ //
35
+ //--------------------------------------------------------------------------
36
+ //--------------------------------------------------------------------------
37
+ //
38
+ // Methods (public)
39
+ //
40
+ //--------------------------------------------------------------------------
41
+ //--------------------------------------------------------------------------
42
+ //
43
+ // Events (public)
44
+ //
45
+ //--------------------------------------------------------------------------
46
+ //--------------------------------------------------------------------------
47
+ //
48
+ // Functions (lifecycle)
49
+ //
50
+ //--------------------------------------------------------------------------
51
+ render() {
52
+ return (h(Host, null, h("slot", null)));
53
+ }
54
+ get el() { return this; }
55
+ static get style() { return featuresFlowItemCss; }
56
+ }, [1, "features-flow-item"]);
57
+ function defineCustomElement$1() {
58
+ if (typeof customElements === "undefined") {
59
+ return;
60
+ }
61
+ const components = ["features-flow-item"];
62
+ components.forEach(tagName => { switch (tagName) {
63
+ case "features-flow-item":
64
+ if (!customElements.get(tagName)) {
65
+ customElements.define(tagName, FeaturesFlowItem$1);
66
+ }
67
+ break;
68
+ } });
69
+ }
70
+ defineCustomElement$1();
71
+
72
+ const FeaturesFlowItem = FeaturesFlowItem$1;
73
+ const defineCustomElement = defineCustomElement$1;
74
+
75
+ export { FeaturesFlowItem, defineCustomElement };
@@ -6,6 +6,7 @@
6
6
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
7
7
  import { g as getLocaleComponentStrings } from './locale.js';
8
8
  import { l as loadModules } from './loadModules.js';
9
+ import { d as defineCustomElement$a } from './action.js';
9
10
  import { d as defineCustomElement$9 } from './alert.js';
10
11
  import { d as defineCustomElement$8 } from './button.js';
11
12
  import { d as defineCustomElement$7 } from './chip.js';
@@ -30,6 +31,7 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
30
31
  this._alertOpen = false;
31
32
  this._count = "";
32
33
  this._editRecordOpen = false;
34
+ this._showListView = false;
33
35
  this._translations = undefined;
34
36
  }
35
37
  //--------------------------------------------------------------------------
@@ -106,9 +108,9 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
106
108
  const loadingClass = this.isLoading ? "" : "display-none";
107
109
  const featureNodeClass = this.isLoading || this._editRecordOpen ? "display-none" : "position-absolute";
108
110
  const editClass = !this.isLoading && this._editRecordOpen ? "position-absolute" : "display-none";
109
- const editButtonClass = !this.isLoading && this._editRecordOpen ? "display-none" : "";
111
+ const editButtonClass = (!this.isLoading && this._editRecordOpen) || this._showListView ? "display-none" : "";
110
112
  const nextBackDisabled = ((_b = (_a = this._features) === null || _a === void 0 ? void 0 : _a.features) === null || _b === void 0 ? void 0 : _b.length) < 2;
111
- return (h(Host, null, h("calcite-shell", null, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} width-100`, slot: "footer" }, h("div", { class: "display-flex top-border padding-1-2" }, h("calcite-button", { appearance: "solid", "icon-start": "pencil", id: "solutions-edit", onClick: () => this._openEditRecord(), width: "full" }, this._translations.edit), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "solutions-edit" }, h("span", null, this._translations.edit))), h("div", { class: "display-flex padding-1-2 button-container top-border" }, h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", disabled: nextBackDisabled, id: "solutions-back", onClick: () => this._back(), width: "full" }, this._translations.back), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, h("span", null, this._translations.back))), h("div", null, this._getCount()), h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", disabled: nextBackDisabled, id: "solutions-next", onClick: () => this._next(), width: "full" }, this._translations.next), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-next" }, h("span", null, this._translations.next))))), h("edit-card", { class: editClass, graphicIndex: (_c = this._features) === null || _c === void 0 ? void 0 : _c.selectedFeatureIndex, graphics: this.graphics, mapView: this.mapView, open: this._editRecordOpen }), h("calcite-alert", { icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { slot: "title" }, this._translations.editDisabled), h("div", { slot: "message" }, this._translations.enableEditing)))));
113
+ return (h(Host, null, h("calcite-shell", null, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} width-100`, slot: "footer" }, h("div", { class: "display-flex top-border padding-1-2" }, h("calcite-button", { appearance: "solid", "icon-start": "pencil", id: "solutions-edit", onClick: () => this._openEditRecord(), width: "full" }, this._translations.edit), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "solutions-edit" }, h("span", null, this._translations.edit))), h("div", { class: "display-flex padding-1-2 button-container top-border" }, h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", disabled: nextBackDisabled, id: "solutions-back", onClick: () => this._back(), width: "full" }, this._translations.back), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, h("span", null, this._translations.back))), h("div", null, h("calcite-action", { icon: "list", onClick: () => this._toggleListView(), scale: "s", text: this._getCount(), textEnabled: true })), h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", disabled: nextBackDisabled, id: "solutions-next", onClick: () => this._next(), width: "full" }, this._translations.next), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-next" }, h("span", null, this._translations.next))))), h("edit-card", { class: editClass, graphicIndex: (_c = this._features) === null || _c === void 0 ? void 0 : _c.selectedFeatureIndex, graphics: this.graphics, mapView: this.mapView, open: this._editRecordOpen }), h("calcite-alert", { icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { slot: "title" }, this._translations.editDisabled), h("div", { slot: "message" }, this._translations.enableEditing)))));
112
114
  }
113
115
  //--------------------------------------------------------------------------
114
116
  //
@@ -149,6 +151,11 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
149
151
  heading: true
150
152
  }
151
153
  });
154
+ this.reactiveUtils.watch(() => this._features.viewModel.featureMenuOpen, (isOpen) => {
155
+ if (!isOpen) {
156
+ this._showListView = isOpen;
157
+ }
158
+ });
152
159
  if (this.zoomAndScrollToSelected) {
153
160
  this.reactiveUtils.watch(() => this._features.selectedFeatureIndex, (i) => {
154
161
  if (i > -1) {
@@ -222,6 +229,18 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
222
229
  .replace("{{index}}", index)
223
230
  .replace("{{total}}", total);
224
231
  }
232
+ /**
233
+ * Toggle the visibility of the features list view
234
+ */
235
+ _toggleListView() {
236
+ this._showListView = !this._showListView;
237
+ const i = this._features.selectedFeatureIndex;
238
+ this._features.open({
239
+ features: this.graphics,
240
+ featureMenuOpen: this._showListView
241
+ });
242
+ this._features.selectedFeatureIndex = i;
243
+ }
225
244
  /**
226
245
  * Fetches the component's translations
227
246
  *
@@ -246,6 +265,7 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
246
265
  "_alertOpen": [32],
247
266
  "_count": [32],
248
267
  "_editRecordOpen": [32],
268
+ "_showListView": [32],
249
269
  "_translations": [32],
250
270
  "getSelectedFeature": [64]
251
271
  }, [[8, "closeEdit", "closeEdit"]], {
@@ -256,13 +276,18 @@ function defineCustomElement() {
256
276
  if (typeof customElements === "undefined") {
257
277
  return;
258
278
  }
259
- const components = ["info-card", "calcite-alert", "calcite-button", "calcite-chip", "calcite-icon", "calcite-loader", "calcite-notice", "calcite-shell", "calcite-tooltip", "edit-card"];
279
+ const components = ["info-card", "calcite-action", "calcite-alert", "calcite-button", "calcite-chip", "calcite-icon", "calcite-loader", "calcite-notice", "calcite-shell", "calcite-tooltip", "edit-card"];
260
280
  components.forEach(tagName => { switch (tagName) {
261
281
  case "info-card":
262
282
  if (!customElements.get(tagName)) {
263
283
  customElements.define(tagName, InfoCard);
264
284
  }
265
285
  break;
286
+ case "calcite-action":
287
+ if (!customElements.get(tagName)) {
288
+ defineCustomElement$a();
289
+ }
290
+ break;
266
291
  case "calcite-alert":
267
292
  if (!customElements.get(tagName)) {
268
293
  defineCustomElement$9();
@@ -7,7 +7,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
7
7
  import { l as loadModules } from './loadModules.js';
8
8
  import { g as getLocaleComponentStrings } from './locale.js';
9
9
  import { b as goToSelection, g as getLayerOrTable } from './mapViewUtils.js';
10
- import { b as queryAllIds } from './queryUtils.js';
10
+ import { b as queryAllIds, c as queryFeaturesByGlobalID } from './queryUtils.js';
11
11
  import { d as downloadCSV } from './downloadUtils.js';
12
12
  import { d as defineCustomElement$n } from './action.js';
13
13
  import { d as defineCustomElement$m } from './action-bar.js';
@@ -45,6 +45,14 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
45
45
  * number[]: A list of all IDs for the current layer
46
46
  */
47
47
  this._allIds = [];
48
+ /**
49
+ * boolean: When true the default global id provided via url param has been honored and should now be ignored
50
+ */
51
+ this._defaultGlobalIdHonored = false;
52
+ /**
53
+ * boolean: When true the default OID provided via url param has been honored and should now be ignored
54
+ */
55
+ this._defaultOidHonored = false;
48
56
  /**
49
57
  * bool: When true the table is being sorted
50
58
  */
@@ -60,7 +68,11 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
60
68
  this.onTableNodeCreate = (node) => {
61
69
  this._tableNode = node;
62
70
  };
71
+ this.defaultLayerId = undefined;
72
+ this.defaultGlobalId = undefined;
73
+ this.defaultOid = undefined;
63
74
  this.enableAutoRefresh = undefined;
75
+ this.enableColumnReorder = true;
64
76
  this.enableCSV = undefined;
65
77
  this.enableInlineEdit = undefined;
66
78
  this.enableZoom = undefined;
@@ -75,6 +87,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
75
87
  this._isDeleting = false;
76
88
  this._layer = undefined;
77
89
  this._selectedIndexes = [];
90
+ this._showHideOpen = false;
78
91
  this._showOnlySelected = false;
79
92
  this._sortActive = false;
80
93
  this._translations = undefined;
@@ -235,6 +248,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
235
248
  */
236
249
  async componentDidLoad() {
237
250
  this._resizeObserver.observe(this._toolbar);
251
+ document.onclick = (e) => this._handleDocumentClick(e);
238
252
  }
239
253
  /**
240
254
  * Called after the component is rendered
@@ -289,7 +303,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
289
303
  * @returns The dom node that contains the controls
290
304
  */
291
305
  _getActionBar() {
292
- 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()));
306
+ 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()));
293
307
  }
294
308
  /**
295
309
  * Get the actions that are used for various interactions with the table
@@ -302,11 +316,33 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
302
316
  if (cur && !cur.isOverflow) {
303
317
  prev.push(cur.isDanger ?
304
318
  this._getDangerAction(cur.icon, cur.label, cur.func, cur.disabled) :
305
- this._getAction(cur.icon, cur.label, cur.func, cur.disabled));
319
+ 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)) :
320
+ this._getAction(cur.icon, cur.label, cur.func, cur.disabled));
306
321
  }
307
322
  return prev;
308
323
  }, []);
309
324
  }
325
+ /**
326
+ * Get the list of fields as dropdown items and store the current selected state so
327
+ * we can show/hide the appropriate fields
328
+ *
329
+ * @returns Node with the fields as dropdown items
330
+ */
331
+ _getFieldlist() {
332
+ return this._columnsInfo ? (h("calcite-dropdown-group", { "selection-mode": "multiple" }, Object.keys(this._columnsInfo).map(k => {
333
+ const selected = this._columnsInfo[k];
334
+ return (h("calcite-dropdown-item", { id: k, onClick: (e) => {
335
+ const target = e.target;
336
+ this._columnsInfo[target.id] = target.selected;
337
+ if (!target.selected) {
338
+ this._table.hideColumn(target.id);
339
+ }
340
+ else {
341
+ this._table.showColumn(target.id);
342
+ }
343
+ }, selected: selected }, k));
344
+ }))) : undefined;
345
+ }
310
346
  /**
311
347
  * Update actions enabled prop based on number of selected indexes
312
348
  *
@@ -395,7 +431,14 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
395
431
  label: this._translations.exportCSV,
396
432
  disabled: featuresEmpty,
397
433
  isOverflow: false
398
- } : undefined];
434
+ } : undefined, {
435
+ icon: this._showHideOpen ? "chevron-down" : "chevron-right",
436
+ func: () => this._toggleShowHide(),
437
+ label: this._translations.showHideColumns,
438
+ disabled: false,
439
+ isOverflow: false,
440
+ isSublist: true
441
+ }];
399
442
  this._defaultVisibleToolSizeInfos = undefined;
400
443
  }
401
444
  /**
@@ -546,9 +589,9 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
546
589
  */
547
590
  _getDropdown(id) {
548
591
  const dropdownItems = this._getDropdownItems();
549
- 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 => {
550
- return (h("calcite-dropdown-item", { iconStart: item.icon, onClick: item.func }, item.label));
551
- })))) : undefined;
592
+ 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 => {
593
+ return (h("calcite-dropdown-item", { iconStart: item.isSublist && this._showHideOpen ? "chevron-down" : item.icon, id: "solutions-subset-list", onClick: item.func }, item.label));
594
+ })), this._showHideOpen ? this._getFieldlist() : undefined)) : undefined;
552
595
  }
553
596
  /**
554
597
  * Get a list of toolInfos that should display in the dropdown
@@ -568,9 +611,9 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
568
611
  *
569
612
  * @returns VNode The node representing the DOM element that will contain the action
570
613
  */
571
- _getAction(icon, label, func, disabled) {
614
+ _getAction(icon, label, func, disabled, slot) {
572
615
  const _disabled = this._layer === undefined ? true : disabled;
573
- 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)));
616
+ 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)));
574
617
  }
575
618
  /**
576
619
  * Get a tooltip
@@ -623,6 +666,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
623
666
  autoRefreshEnabled: this.enableAutoRefresh,
624
667
  layer: this._layer,
625
668
  view: this.mapView,
669
+ columnReorderingEnabled: this.enableColumnReorder,
626
670
  editingEnabled: this._editEnabled && this.enableInlineEdit,
627
671
  highlightEnabled: true,
628
672
  multiSortEnabled: false,
@@ -636,6 +680,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
636
680
  container: node
637
681
  });
638
682
  });
683
+ this._initColumnsInfo();
639
684
  this._checkEditEnabled();
640
685
  await this._table.when(() => {
641
686
  this._table.highlightIds.on("change", () => {
@@ -682,14 +727,53 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
682
727
  this._checkEditEnabled();
683
728
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
684
729
  this._initToolInfos();
685
- await this._table.when(() => {
730
+ await this._table.when(async () => {
731
+ var _a, _b;
686
732
  this._table.highlightIds.removeAll();
687
733
  this._table.clearSelectionFilter();
734
+ this._initColumnsInfo();
735
+ if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1) {
736
+ this._selectDefaultFeature(this.defaultOid);
737
+ this._defaultOidHonored = true;
738
+ }
739
+ if (!this._defaultGlobalIdHonored && ((_b = this.defaultGlobalId) === null || _b === void 0 ? void 0 : _b.length) > 0) {
740
+ const features = await queryFeaturesByGlobalID(this.defaultGlobalId, this._layer);
741
+ const oids = (features === null || features === void 0 ? void 0 : features.length) > 0 ? features.map(f => f.getObjectId()) : undefined;
742
+ if (oids) {
743
+ this._selectDefaultFeature(oids);
744
+ }
745
+ this._defaultGlobalIdHonored = true;
746
+ }
688
747
  });
689
748
  this._showOnlySelected = false;
690
749
  this._sortActive = false;
691
750
  await this._sortTable();
692
751
  }
752
+ /**
753
+ * Store the column names and current hidden status to support show/hide of columns
754
+ *
755
+ * @returns void
756
+ */
757
+ _initColumnsInfo() {
758
+ this._columnsInfo = this._table.columns.reduce((prev, cur) => {
759
+ prev[cur.name] = !cur.hidden;
760
+ return prev;
761
+ }, {});
762
+ }
763
+ /**
764
+ * Select the feature that was specified via url params
765
+ *
766
+ * @returns void
767
+ */
768
+ _selectDefaultFeature(oids) {
769
+ if (oids.length > 0) {
770
+ this._table.highlightIds.addMany(oids);
771
+ void this._table.when(() => {
772
+ const i = this._table.viewModel.getObjectIdIndex(oids[0]);
773
+ this._table.viewModel.scrollToIndex(i);
774
+ });
775
+ }
776
+ }
693
777
  /**
694
778
  * Verify edit capabilities of the layer
695
779
  *
@@ -716,6 +800,45 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
716
800
  }
717
801
  }
718
802
  }
803
+ /**
804
+ * Open show/hide dropdown
805
+ */
806
+ _forceShowHide() {
807
+ if (this._showHideDropdown) {
808
+ this._showHideDropdown.open = this._showHideOpen;
809
+ }
810
+ if (this._moreDropdown) {
811
+ this._moreDropdown.open = this._showHideOpen;
812
+ }
813
+ }
814
+ /**
815
+ * Toggle show/hide dropdown
816
+ */
817
+ _toggleShowHide() {
818
+ this._showHideOpen = !this._showHideOpen;
819
+ }
820
+ /**
821
+ * Open show/hide dropdown
822
+ */
823
+ _closeShowHide() {
824
+ this._showHideOpen = false;
825
+ }
826
+ /**
827
+ * Close show/hide dropdown when the user clicks outside of it
828
+ */
829
+ _handleDocumentClick(e) {
830
+ var _a;
831
+ const id = (_a = e.target) === null || _a === void 0 ? void 0 : _a.id;
832
+ if (this._showHideOpen && Object.keys(this._columnsInfo).indexOf(id) < 0 && id !== "solutions-subset-list" && id !== "chevron-right") {
833
+ this._closeShowHide();
834
+ if (this._moreDropdown) {
835
+ this._moreDropdown.open = false;
836
+ }
837
+ if (this._showHideDropdown) {
838
+ this._showHideDropdown.open = false;
839
+ }
840
+ }
841
+ }
719
842
  /**
720
843
  * Show delete confirmation message
721
844
  *
@@ -961,7 +1084,11 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
961
1084
  }; }
962
1085
  static get style() { return layerTableCss; }
963
1086
  }, [0, "layer-table", {
1087
+ "defaultLayerId": [1, "default-layer-id"],
1088
+ "defaultGlobalId": [16],
1089
+ "defaultOid": [16],
964
1090
  "enableAutoRefresh": [4, "enable-auto-refresh"],
1091
+ "enableColumnReorder": [4, "enable-column-reorder"],
965
1092
  "enableCSV": [4, "enable-c-s-v"],
966
1093
  "enableInlineEdit": [4, "enable-inline-edit"],
967
1094
  "enableZoom": [4, "enable-zoom"],
@@ -976,6 +1103,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
976
1103
  "_isDeleting": [32],
977
1104
  "_layer": [32],
978
1105
  "_selectedIndexes": [32],
1106
+ "_showHideOpen": [32],
979
1107
  "_showOnlySelected": [32],
980
1108
  "_sortActive": [32],
981
1109
  "_translations": [32]
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface ListFlowItem extends Components.ListFlowItem, HTMLElement {}
4
+ export const ListFlowItem: {
5
+ prototype: ListFlowItem;
6
+ new (): ListFlowItem;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,75 @@
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
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
7
+
8
+ const listFlowItemCss = ":host{display:block}";
9
+
10
+ const ListFlowItem$1 = /*@__PURE__*/ proxyCustomElement(class ListFlowItem extends HTMLElement {
11
+ constructor() {
12
+ super();
13
+ this.__registerHost();
14
+ this.__attachShadow();
15
+ }
16
+ //--------------------------------------------------------------------------
17
+ //
18
+ // Properties (public)
19
+ //
20
+ //--------------------------------------------------------------------------
21
+ //--------------------------------------------------------------------------
22
+ //
23
+ // State (internal)
24
+ //
25
+ //--------------------------------------------------------------------------
26
+ //--------------------------------------------------------------------------
27
+ //
28
+ // Properties (protected)
29
+ //
30
+ //--------------------------------------------------------------------------
31
+ //--------------------------------------------------------------------------
32
+ //
33
+ // Watch handlers
34
+ //
35
+ //--------------------------------------------------------------------------
36
+ //--------------------------------------------------------------------------
37
+ //
38
+ // Methods (public)
39
+ //
40
+ //--------------------------------------------------------------------------
41
+ //--------------------------------------------------------------------------
42
+ //
43
+ // Events (public)
44
+ //
45
+ //--------------------------------------------------------------------------
46
+ //--------------------------------------------------------------------------
47
+ //
48
+ // Functions (lifecycle)
49
+ //
50
+ //--------------------------------------------------------------------------
51
+ render() {
52
+ return (h(Host, null, h("slot", null)));
53
+ }
54
+ get el() { return this; }
55
+ static get style() { return listFlowItemCss; }
56
+ }, [1, "list-flow-item"]);
57
+ function defineCustomElement$1() {
58
+ if (typeof customElements === "undefined") {
59
+ return;
60
+ }
61
+ const components = ["list-flow-item"];
62
+ components.forEach(tagName => { switch (tagName) {
63
+ case "list-flow-item":
64
+ if (!customElements.get(tagName)) {
65
+ customElements.define(tagName, ListFlowItem$1);
66
+ }
67
+ break;
68
+ } });
69
+ }
70
+ defineCustomElement$1();
71
+
72
+ const ListFlowItem = ListFlowItem$1;
73
+ const defineCustomElement = defineCustomElement$1;
74
+
75
+ export { ListFlowItem, defineCustomElement };