@esri/solutions-components 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. package/dist/cjs/buffer-tools_4.cjs.entry.js +1 -1
  2. package/dist/cjs/calcite-combobox_6.cjs.entry.js +74 -52
  3. package/dist/cjs/calcite-input-text_4.cjs.entry.js +9 -9
  4. package/dist/cjs/card-manager_3.cjs.entry.js +36 -29
  5. package/dist/cjs/crowdsource-manager.cjs.entry.js +2 -2
  6. package/dist/cjs/{downloadUtils-6d4e269f.js → downloadUtils-4aadf4b0.js} +4 -3
  7. package/dist/cjs/edit-card_2.cjs.entry.js +11 -6
  8. package/dist/cjs/{index.es-fc923796.js → index.es-17db3b89.js} +2 -2
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{mapViewUtils-efc49df7.js → mapViewUtils-77a1ff88.js} +48 -6
  11. package/dist/cjs/public-notification.cjs.entry.js +3 -3
  12. package/dist/cjs/{publicNotificationStore-cd1a32c3.js → publicNotificationStore-ec1bdd2d.js} +5 -1
  13. package/dist/cjs/solutions-components.cjs.js +1 -1
  14. package/dist/collection/components/card-manager/card-manager.js +8 -8
  15. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +2 -2
  16. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +1 -1
  17. package/dist/collection/components/edit-card/edit-card.css +1 -1
  18. package/dist/collection/components/edit-card/edit-card.js +7 -1
  19. package/dist/collection/components/info-card/info-card.js +4 -5
  20. package/dist/collection/components/layer-table/layer-table.js +34 -27
  21. package/dist/collection/components/map-layer-picker/map-layer-picker.js +110 -54
  22. package/dist/collection/components/map-select-tools/map-select-tools.js +5 -5
  23. package/dist/collection/components/refine-selection/refine-selection.js +3 -3
  24. package/dist/collection/demos/crowdsource-manager.html +31 -16
  25. package/dist/collection/utils/downloadUtils.js +2 -1
  26. package/dist/collection/utils/downloadUtils.ts +1 -1
  27. package/dist/collection/utils/interfaces.ts +6 -5
  28. package/dist/collection/utils/mapViewUtils.js +44 -5
  29. package/dist/collection/utils/mapViewUtils.ts +52 -7
  30. package/dist/collection/utils/publicNotificationStore.js +5 -1
  31. package/dist/collection/utils/publicNotificationStore.ts +5 -1
  32. package/dist/components/card-manager2.js +5 -5
  33. package/dist/components/crowdsource-manager.js +2 -2
  34. package/dist/components/downloadUtils.js +2 -1
  35. package/dist/components/edit-card2.js +7 -1
  36. package/dist/components/info-card2.js +4 -5
  37. package/dist/components/layer-table2.js +33 -26
  38. package/dist/components/map-layer-picker2.js +78 -54
  39. package/dist/components/map-select-tools2.js +5 -5
  40. package/dist/components/mapViewUtils.js +45 -6
  41. package/dist/components/publicNotificationStore.js +5 -1
  42. package/dist/components/refine-selection2.js +3 -3
  43. package/dist/esm/buffer-tools_4.entry.js +1 -1
  44. package/dist/esm/calcite-combobox_6.entry.js +74 -52
  45. package/dist/esm/calcite-input-text_4.entry.js +9 -9
  46. package/dist/esm/card-manager_3.entry.js +36 -29
  47. package/dist/esm/crowdsource-manager.entry.js +2 -2
  48. package/dist/esm/{downloadUtils-1092cb0f.js → downloadUtils-3b5f85d9.js} +4 -3
  49. package/dist/esm/edit-card_2.entry.js +11 -6
  50. package/dist/esm/{index.es-08a48fdd.js → index.es-bb9196f6.js} +2 -2
  51. package/dist/esm/loader.js +1 -1
  52. package/dist/esm/{mapViewUtils-a787c6a8.js → mapViewUtils-55ea1e10.js} +45 -6
  53. package/dist/esm/public-notification.entry.js +3 -3
  54. package/dist/esm/{publicNotificationStore-c36d95bf.js → publicNotificationStore-6ef555f3.js} +5 -1
  55. package/dist/esm/solutions-components.js +1 -1
  56. package/dist/solutions-components/demos/crowdsource-manager.html +31 -16
  57. package/dist/solutions-components/{p-841a5f97.entry.js → p-03179924.entry.js} +1 -1
  58. package/dist/solutions-components/{p-a29ba58a.js → p-477ae127.js} +2 -2
  59. package/dist/solutions-components/p-4af3f843.js +36 -0
  60. package/dist/solutions-components/{p-5b260e5f.js → p-6015e2ee.js} +1 -1
  61. package/dist/solutions-components/{p-ad60a547.js → p-9807924d.js} +3 -3
  62. package/dist/solutions-components/{p-781480c2.entry.js → p-a56f965e.entry.js} +1 -1
  63. package/dist/solutions-components/{p-5a6ca63b.entry.js → p-cdc0bb97.entry.js} +6 -6
  64. package/dist/solutions-components/{p-6305f474.entry.js → p-d3fd28e9.entry.js} +1 -1
  65. package/dist/solutions-components/p-d83da8a0.entry.js +11 -0
  66. package/dist/solutions-components/p-d875f38c.entry.js +6 -0
  67. package/dist/solutions-components/p-ef235c88.entry.js +6 -0
  68. package/dist/solutions-components/solutions-components.esm.js +1 -1
  69. package/dist/solutions-components/utils/downloadUtils.ts +1 -1
  70. package/dist/solutions-components/utils/interfaces.ts +6 -5
  71. package/dist/solutions-components/utils/mapViewUtils.ts +52 -7
  72. package/dist/solutions-components/utils/publicNotificationStore.ts +5 -1
  73. package/dist/types/components/card-manager/card-manager.d.ts +2 -2
  74. package/dist/types/components/edit-card/edit-card.d.ts +6 -2
  75. package/dist/types/components/layer-table/layer-table.d.ts +4 -4
  76. package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +34 -19
  77. package/dist/types/components.d.ts +22 -6
  78. package/dist/types/utils/interfaces.d.ts +4 -3
  79. package/dist/types/utils/mapViewUtils.d.ts +22 -5
  80. package/dist/types/utils/publicNotificationStore.d.ts +2 -0
  81. package/package.json +1 -1
  82. package/dist/solutions-components/p-0641aa9b.js +0 -36
  83. package/dist/solutions-components/p-74a2d025.entry.js +0 -6
  84. package/dist/solutions-components/p-a62c1b3c.entry.js +0 -6
  85. package/dist/solutions-components/p-ccf5c0ff.entry.js +0 -11
@@ -167,9 +167,9 @@ export interface IValueChange {
167
167
  }
168
168
 
169
169
  /**
170
- * Layer id and title key value pair
170
+ * Layer or table id and title key value pair
171
171
  */
172
- export interface ILayerHash {
172
+ export interface IMapItemHash {
173
173
  [key: string]: string;
174
174
  }
175
175
 
@@ -453,7 +453,8 @@ export interface IExportInfos {
453
453
  }
454
454
 
455
455
  export interface IExportInfo {
456
- ids: number[],
457
- layerView: __esri.FeatureLayerView
458
- selectionSetNames: string[]
456
+ ids: number[];
457
+ layer?: __esri.FeatureLayer;
458
+ layerView?: __esri.FeatureLayerView;
459
+ selectionSetNames: string[];
459
460
  }
@@ -40,6 +40,24 @@ export async function getMapLayerHash(mapView) {
40
40
  });
41
41
  return layerHash;
42
42
  }
43
+ /**
44
+ * Gets the table names from the current map
45
+ *
46
+ * @param mapView the map view to fetch the table names from
47
+ *
48
+ * @returns Promise resolving with an array of table names
49
+ *
50
+ */
51
+ export async function getMapTableHash(mapView) {
52
+ let tableHash = {};
53
+ await mapView.when(() => {
54
+ tableHash = mapView.map.allTables.toArray().reduce((prev, cur) => {
55
+ prev[cur.id] = cur.title;
56
+ return prev;
57
+ }, {});
58
+ });
59
+ return tableHash;
60
+ }
43
61
  /**
44
62
  * Gets the layer names from the current map
45
63
  *
@@ -60,6 +78,25 @@ export async function getMapLayerIds(mapView) {
60
78
  });
61
79
  return layerIds;
62
80
  }
81
+ /**
82
+ * Gets the table names from the current map
83
+ *
84
+ * @param mapView the map view to fetch the table names from
85
+ *
86
+ * @returns Promise resolving with an array of table names
87
+ *
88
+ */
89
+ export async function getMapTableIds(mapView) {
90
+ // TODO...seems like its the same as the hash...see if I can remove this
91
+ let tableIds = [];
92
+ await mapView.when(() => {
93
+ tableIds = mapView.map.allTables.toArray().reduce((prev, cur) => {
94
+ prev.push(cur.id);
95
+ return prev;
96
+ }, []);
97
+ });
98
+ return tableIds;
99
+ }
63
100
  /**
64
101
  * Get a layer view by id
65
102
  *
@@ -69,8 +106,8 @@ export async function getMapLayerIds(mapView) {
69
106
  * @returns Promise resolving with the fetched layer view
70
107
  *
71
108
  */
72
- export async function getMapLayerView(mapView, id) {
73
- const layer = await getMapLayer(mapView, id);
109
+ export async function getFeatureLayerView(mapView, id) {
110
+ const layer = await getLayer(mapView, id);
74
111
  return layer ? await mapView.whenLayerView(layer) : undefined;
75
112
  }
76
113
  /**
@@ -82,10 +119,13 @@ export async function getMapLayerView(mapView, id) {
82
119
  * @returns Promise resolving with the fetched layer
83
120
  *
84
121
  */
85
- export async function getMapLayer(mapView, id) {
122
+ export async function getLayer(mapView, id) {
86
123
  let layers = [];
87
124
  await mapView.when(() => {
88
- layers = mapView.map.allLayers.toArray().filter((l) => {
125
+ layers = [
126
+ ...mapView.map.allLayers.toArray(),
127
+ ...mapView.map.allTables.toArray()
128
+ ].filter((l) => {
89
129
  return l.id === id;
90
130
  });
91
131
  });
@@ -100,7 +140,6 @@ export async function getMapLayer(mapView, id) {
100
140
  * @param updateExtent optional (default false) boolean to indicate if we should zoom to the extent
101
141
  *
102
142
  * @returns Promise resolving with the highlight handle
103
- *
104
143
  */
105
144
  export async function highlightFeatures(ids, layerView, mapView, updateExtent = false) {
106
145
  if (updateExtent) {
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  import { queryExtent } from "./queryUtils";
18
- import { EWorkflowType, ILayerHash, ISelectionSet } from "./interfaces";
18
+ import { EWorkflowType, IMapItemHash, ISelectionSet } from "./interfaces";
19
19
 
20
20
  /**
21
21
  * Gets the layer names from the current map
@@ -27,7 +27,7 @@ import { EWorkflowType, ILayerHash, ISelectionSet } from "./interfaces";
27
27
  */
28
28
  export async function getMapLayerHash(
29
29
  mapView: __esri.MapView
30
- ): Promise<ILayerHash> {
30
+ ): Promise<IMapItemHash> {
31
31
  let layerHash = {};
32
32
  await mapView.when(() => {
33
33
  layerHash = mapView.map.allLayers.toArray().reduce((prev, cur) => {
@@ -40,6 +40,27 @@ export async function getMapLayerHash(
40
40
  return layerHash;
41
41
  }
42
42
 
43
+ /**
44
+ * Gets the table names from the current map
45
+ *
46
+ * @param mapView the map view to fetch the table names from
47
+ *
48
+ * @returns Promise resolving with an array of table names
49
+ *
50
+ */
51
+ export async function getMapTableHash(
52
+ mapView: __esri.MapView
53
+ ): Promise<IMapItemHash> {
54
+ let tableHash = {};
55
+ await mapView.when(() => {
56
+ tableHash = mapView.map.allTables.toArray().reduce((prev, cur) => {
57
+ prev[cur.id] = cur.title;
58
+ return prev;
59
+ }, {});
60
+ });
61
+ return tableHash;
62
+ }
63
+
43
64
  /**
44
65
  * Gets the layer names from the current map
45
66
  *
@@ -63,6 +84,28 @@ export async function getMapLayerIds(
63
84
  return layerIds;
64
85
  }
65
86
 
87
+ /**
88
+ * Gets the table names from the current map
89
+ *
90
+ * @param mapView the map view to fetch the table names from
91
+ *
92
+ * @returns Promise resolving with an array of table names
93
+ *
94
+ */
95
+ export async function getMapTableIds(
96
+ mapView: __esri.MapView
97
+ ): Promise<string[]> {
98
+ // TODO...seems like its the same as the hash...see if I can remove this
99
+ let tableIds = [];
100
+ await mapView.when(() => {
101
+ tableIds = mapView.map.allTables.toArray().reduce((prev, cur) => {
102
+ prev.push(cur.id);
103
+ return prev;
104
+ }, []);
105
+ });
106
+ return tableIds;
107
+ }
108
+
66
109
  /**
67
110
  * Get a layer view by id
68
111
  *
@@ -72,11 +115,11 @@ export async function getMapLayerIds(
72
115
  * @returns Promise resolving with the fetched layer view
73
116
  *
74
117
  */
75
- export async function getMapLayerView(
118
+ export async function getFeatureLayerView(
76
119
  mapView: __esri.MapView,
77
120
  id: string
78
121
  ): Promise<__esri.FeatureLayerView> {
79
- const layer = await getMapLayer(mapView, id);
122
+ const layer = await getLayer(mapView, id);
80
123
  return layer ? await mapView.whenLayerView(layer) : undefined;
81
124
  }
82
125
 
@@ -89,13 +132,16 @@ export async function getMapLayerView(
89
132
  * @returns Promise resolving with the fetched layer
90
133
  *
91
134
  */
92
- export async function getMapLayer(
135
+ export async function getLayer(
93
136
  mapView: __esri.MapView,
94
137
  id: string
95
138
  ): Promise<__esri.FeatureLayer> {
96
139
  let layers = [];
97
140
  await mapView.when(() => {
98
- layers = mapView.map.allLayers.toArray().filter((l) => {
141
+ layers = [
142
+ ...mapView.map.allLayers.toArray(),
143
+ ...mapView.map.allTables.toArray()
144
+ ].filter((l) => {
99
145
  return l.id === id;
100
146
  });
101
147
  });
@@ -111,7 +157,6 @@ export async function getMapLayer(
111
157
  * @param updateExtent optional (default false) boolean to indicate if we should zoom to the extent
112
158
  *
113
159
  * @returns Promise resolving with the highlight handle
114
- *
115
160
  */
116
161
  export async function highlightFeatures(
117
162
  ids: number[],
@@ -22,10 +22,14 @@ import { createStore } from "@stencil/store";
22
22
  const { state, onChange } = createStore({
23
23
  // List of layers added and managed by the component
24
24
  managedLayers: [],
25
+ // List of tables added and managed by the component
26
+ managedTables: [],
25
27
  // Handle[]: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#Handle
26
28
  highlightHandles: [],
27
- // ILayerHash title: id lookup to be used across components
29
+ // IMapItemHash title: id lookup to be used across components
28
30
  layerNameHash: {},
31
+ // IMapItemHash title: id lookup to be used across components
32
+ tableNameHash: {},
29
33
  // remove all handles
30
34
  removeHandles: () => {
31
35
  state.highlightHandles.forEach(h => h === null || h === void 0 ? void 0 : h.remove());
@@ -19,10 +19,14 @@ import { createStore } from "@stencil/store";
19
19
  const { state, onChange } = createStore({
20
20
  // List of layers added and managed by the component
21
21
  managedLayers: [],
22
+ // List of tables added and managed by the component
23
+ managedTables: [],
22
24
  // Handle[]: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#Handle
23
25
  highlightHandles: [],
24
- // ILayerHash title: id lookup to be used across components
26
+ // IMapItemHash title: id lookup to be used across components
25
27
  layerNameHash: {},
28
+ // IMapItemHash title: id lookup to be used across components
29
+ tableNameHash: {},
26
30
  // remove all handles
27
31
  removeHandles: () => {
28
32
  state.highlightHandles.forEach(h => h?.remove());
@@ -6,7 +6,7 @@
6
6
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
7
7
  import { g as getLocaleComponentStrings } from './locale.js';
8
8
  import { q as queryFeaturesByID } from './queryUtils.js';
9
- import { a as getMapLayerView } from './mapViewUtils.js';
9
+ import { a as getLayer } from './mapViewUtils.js';
10
10
  import { d as defineCustomElement$a } from './alert.js';
11
11
  import { d as defineCustomElement$9 } from './button.js';
12
12
  import { d as defineCustomElement$8 } from './chip.js';
@@ -24,7 +24,7 @@ const CardManager = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
24
24
  constructor() {
25
25
  super();
26
26
  this.__registerHost();
27
- this.layerView = undefined;
27
+ this.layer = undefined;
28
28
  this.mapView = undefined;
29
29
  this._cardLoading = false;
30
30
  this._graphics = undefined;
@@ -52,7 +52,7 @@ const CardManager = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
52
52
  const ids = evt.detail;
53
53
  this._cardLoading = true;
54
54
  // only query if we have some ids...query with no ids will result in all features being returned
55
- const featureSet = ids.length > 0 ? await queryFeaturesByID(ids, this.layerView.layer, [], false, this.mapView.spatialReference) : [];
55
+ const featureSet = ids.length > 0 ? await queryFeaturesByID(ids, this.layer, [], false, this.mapView.spatialReference) : [];
56
56
  this._graphics = featureSet;
57
57
  this._cardLoading = false;
58
58
  }
@@ -61,7 +61,7 @@ const CardManager = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
61
61
  */
62
62
  async layerSelectionChange(evt) {
63
63
  const id = evt.detail[0];
64
- this.layerView = await getMapLayerView(this.mapView, id);
64
+ this.layer = await getLayer(this.mapView, id);
65
65
  }
66
66
  //--------------------------------------------------------------------------
67
67
  //
@@ -103,7 +103,7 @@ const CardManager = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
103
103
  get el() { return this; }
104
104
  static get style() { return cardManagerCss; }
105
105
  }, [0, "card-manager", {
106
- "layerView": [16],
106
+ "layer": [16],
107
107
  "mapView": [16],
108
108
  "_cardLoading": [32],
109
109
  "_graphics": [32],
@@ -42,7 +42,7 @@ import { d as defineCustomElement$4 } from './map-card2.js';
42
42
  import { d as defineCustomElement$3 } from './map-layer-picker2.js';
43
43
  import { d as defineCustomElement$2 } from './map-tools2.js';
44
44
 
45
- const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px}.padding-1{padding:1rem}.padding-1-2{padding:0.5rem}.header-title{display:flex;float:left}.header-controls-label{display:flex;float:right}.header-controls{height:50px}.img-background{background-repeat:no-repeat;background-size:100% 100%;width:38px;height:26px}.grid-background{background-image:url('../../assets/data/images/grid.png')}.vertical-background{background-image:url('../../assets/data/images/horizontal.png')}.horizontal-background{background-image:url('../../assets/data/images/vertical.png')}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.background-transparent{background-color:transparent}.display-flex{display:flex}.header-text{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);padding-inline:0.75rem;padding-block:0.875rem;line-height:1.25rem}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-ui-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 0.5rem)}.adjusted-height-100{height:calc(100% - 1rem)}.icon-color{--calcite-ui-icon-color:var(--calcite-ui-brand)}.icon{cursor:pointer}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2)}.display-none{display:none}";
45
+ const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px}.padding-1{padding:1rem}.padding-1-2{padding:0.5rem}.header-title{display:flex;float:left}.header-controls-label{display:flex;float:right}.header-controls{height:50px}.img-background{background-repeat:no-repeat;background-size:100% 100%;width:38px;height:26px}.grid-background{background-image:url('../../assets/data/images/grid.png')}.horizontal-background{background-image:url('../../assets/data/images/horizontal.png')}.vertical-background{background-image:url('../../assets/data/images/vertical.png')}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.background-transparent{background-color:transparent}.display-flex{display:flex}.header-text{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);padding-inline:0.75rem;padding-block:0.875rem;line-height:1.25rem}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-ui-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 0.5rem)}.adjusted-height-100{height:calc(100% - 1rem)}.icon-color{--calcite-ui-icon-color:var(--calcite-ui-brand)}.icon{cursor:pointer}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2)}.display-none{display:none}";
46
46
 
47
47
  const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
48
48
  constructor() {
@@ -98,7 +98,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
98
98
  * Renders the component.
99
99
  */
100
100
  render() {
101
- return (h(Host, null, h("calcite-shell", null, h("calcite-panel", { class: "width-full height-full", heading: this._translations.header }, h("div", { class: "display-flex", slot: "header-actions-end" }, h("div", { class: "display-flex action-center" }, h("calcite-icon", { class: "icon icon-color", icon: "information", id: "app-information-icon", scale: "s" }), h("calcite-popover", { closable: true, label: "", referenceElement: "app-information-icon" }, h("span", { class: "tooltip-message" }, this._translations.appInfo))), h("div", { class: "header-text" }, this._translations.layout), this._getAction("grid-background", ELayoutMode.GRID, this._translations.grid), this._getAction("horizontal-background", ELayoutMode.VERTICAL, this._translations.vertical), this._getAction("vertical-background", ELayoutMode.HORIZONTAL, this._translations.horizontal)), this._getBody(this._layoutMode, this._panelOpen)))));
101
+ return (h(Host, null, h("calcite-shell", null, h("calcite-panel", { class: "width-full height-full", heading: this._translations.header }, h("div", { class: "display-flex", slot: "header-actions-end" }, h("div", { class: "display-flex action-center" }, h("calcite-icon", { class: "icon icon-color", icon: "information", id: "app-information-icon", scale: "s" }), h("calcite-popover", { closable: true, label: "", referenceElement: "app-information-icon" }, h("span", { class: "tooltip-message" }, this._translations.appInfo))), h("div", { class: "header-text" }, this._translations.layout), this._getAction("grid-background", ELayoutMode.GRID, this._translations.grid), this._getAction("vertical-background", ELayoutMode.VERTICAL, this._translations.vertical), this._getAction("horizontal-background", ELayoutMode.HORIZONTAL, this._translations.horizontal)), this._getBody(this._layoutMode, this._panelOpen)))));
102
102
  }
103
103
  //--------------------------------------------------------------------------
104
104
  //
@@ -2708,8 +2708,9 @@ function _getSelectionSetNames(exportInfos, id = /.+/) {
2708
2708
  async function consolidateLabels(exportInfos, formatUsingLayerPopup = true, includeHeaderNames = false, isCSVExport = false) {
2709
2709
  const labelRequests = [];
2710
2710
  Object.keys(exportInfos).forEach(k => {
2711
+ var _a;
2711
2712
  const labelInfo = exportInfos[k];
2712
- labelRequests.push(_prepareLabels(labelInfo.layerView.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames));
2713
+ labelRequests.push(_prepareLabels(((_a = labelInfo.layerView) === null || _a === void 0 ? void 0 : _a.layer) || labelInfo.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames));
2713
2714
  if (isCSVExport) {
2714
2715
  // add the layer id as a temp value separator that we can use to split values for CSV export
2715
2716
  labelRequests.push(Promise.resolve([[k]]));
@@ -129,9 +129,10 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
129
129
  },
130
130
  container
131
131
  });
132
- if (this._editHandle && this._attachmentHandle) {
132
+ if (this._editHandle && this._attachmentHandle && this._activeWorkflowHandle) {
133
133
  this._editHandle.remove();
134
134
  this._attachmentHandle.remove();
135
+ this._activeWorkflowHandle.remove();
135
136
  }
136
137
  this._attachmentHandle = this.reactiveUtils.when(() => this._editor.viewModel.state === "adding-attachment" || this._editor.viewModel.state === "editing-attachment", () => {
137
138
  this._shouldClose = false;
@@ -146,6 +147,11 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
146
147
  this._shouldClose = true;
147
148
  }
148
149
  });
150
+ this._activeWorkflowHandle = this.reactiveUtils.watch(() => { var _a; return (_a = this._editor.viewModel.activeWorkflow) === null || _a === void 0 ? void 0 : _a.activeWorkflow; }, (activeWorkflow) => {
151
+ if ((activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.type) === "update-table-record" || (activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.type) === "create-features") {
152
+ this._shouldClose = false;
153
+ }
154
+ });
149
155
  // had issues with destroy before adding like this
150
156
  this._editContainer.appendChild(container);
151
157
  }
@@ -130,14 +130,13 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
130
130
  visibleElements: {
131
131
  actionBar: false,
132
132
  closeButton: false,
133
- heading: false
133
+ heading: true
134
134
  },
135
- view: this.mapView
135
+ viewModel: {
136
+ view: this.mapView
137
+ }
136
138
  });
137
139
  }
138
- else {
139
- this._features.view = this.mapView;
140
- }
141
140
  }
142
141
  /**
143
142
  * Set the alertOpen member to false when the alert is closed
@@ -6,7 +6,7 @@
6
6
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
7
7
  import { l as loadModules } from './loadModules.js';
8
8
  import { g as getLocaleComponentStrings } from './locale.js';
9
- import { b as getMapLayerIds, a as getMapLayerView } from './mapViewUtils.js';
9
+ import { b as getMapLayerIds, a as getLayer } from './mapViewUtils.js';
10
10
  import { q as queryFeaturesByID, a as queryAllIds } from './queryUtils.js';
11
11
  import { d as downloadCSV } from './downloadUtils.js';
12
12
  import { d as defineCustomElement$n } from './action.js';
@@ -57,7 +57,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
57
57
  this.mapView = undefined;
58
58
  this._alertOpen = false;
59
59
  this._fetchingData = false;
60
- this._layerView = undefined;
60
+ this._layer = undefined;
61
61
  this._selectedIndexes = [];
62
62
  this._showOnlySelected = false;
63
63
  this._translations = undefined;
@@ -73,7 +73,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
73
73
  async mapViewWatchHandler() {
74
74
  this._fetchingData = true;
75
75
  const mapLayerIds = await getMapLayerIds(this.mapView);
76
- this._layerView = await getMapLayerView(this.mapView, mapLayerIds[0]);
76
+ this._layer = await getLayer(this.mapView, mapLayerIds[0]);
77
77
  this._resetTable();
78
78
  this.reactiveUtils.on(() => this.mapView, "click", (event) => {
79
79
  void this._mapClicked(event);
@@ -83,7 +83,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
83
83
  /**
84
84
  * watch for changes in layer view and verify if it has editing enabled
85
85
  */
86
- async _layerViewWatchHandler() {
86
+ async _layerWatchHandler() {
87
87
  this._fetchingData = true;
88
88
  this._resetTable();
89
89
  this._fetchingData = false;
@@ -120,7 +120,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
120
120
  * Renders the component.
121
121
  */
122
122
  render() {
123
- if (!this._layerView) {
123
+ if (!this._layer) {
124
124
  return null;
125
125
  }
126
126
  const tableNodeClass = this._fetchingData ? "display-none" : "";
@@ -155,8 +155,8 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
155
155
  */
156
156
  _getTableControlRow(slot) {
157
157
  const featuresSelected = this._selectedIndexes.length > 0;
158
- return (h("div", { class: "display-flex table-border height-51", slot: slot }, h("calcite-action-bar", { expandDisabled: true, expanded: true, layout: "horizontal" }, h("div", { class: "border-end" }, h("map-layer-picker", { appearance: "transparent", mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChanged(evt), placeholderIcon: "layers", scale: "l", type: "dropdown" })), h("calcite-action", { appearance: "solid", disabled: !featuresSelected, icon: "magnifying-glass", id: "magnifying-glass", label: this._translations.zoom, onClick: () => this._zoom(), text: this._translations.zoom, textEnabled: true }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "magnifying-glass" }, h("span", null, this._translations.zoom)), h("calcite-action", { appearance: "solid", icon: "filter", id: "filter", onClick: () => this._filter(), text: this._translations.filters, "text-enabled": "true", textEnabled: true }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "filter" }, h("span", null, this._translations.filters)), h("calcite-action", { appearance: "solid", disabled: !featuresSelected, id: "trash", onClick: () => this._delete(), text: "" }, h("calcite-button", { appearance: "transparent", iconStart: "trash", kind: "danger" }, this._translations.delete)), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "trash" }, h("span", null, this._translations.delete))), h("calcite-dropdown", null, h("calcite-action", { appearance: "solid", label: "", slot: "trigger", text: "" }, h("calcite-button", { appearance: "transparent", iconEnd: "chevron-down", kind: "neutral" }, this._translations.more)), h("calcite-dropdown-group", { "selection-mode": "none" }, h("calcite-dropdown-item", { iconStart: "list-check-all", onClick: () => this._selectAll() }, this._translations.selectAll), h("calcite-dropdown-item", { iconStart: "selected-items-filter", onClick: () => this._showSelected() }, this._showOnlySelected ? this._translations.showAll :
159
- this._translations.showSelected), h("calcite-dropdown-item", { iconStart: "erase", onClick: () => this._clearSelection() }, this._translations.clearSelection), h("calcite-dropdown-item", { iconStart: "refresh", onClick: () => this._switchSelected() }, this._translations.switchSelected), h("calcite-dropdown-item", { iconStart: "refresh", onClick: () => this._refresh() }, this._translations.refresh), h("calcite-dropdown-item", { iconStart: "export", onClick: () => void this._exportToCSV() }, this._translations.exportCSV)))));
158
+ return (h("div", { class: "display-flex table-border height-51", slot: slot }, h("calcite-action-bar", { expandDisabled: true, expanded: true, layout: "horizontal" }, h("div", { class: "border-end" }, h("map-layer-picker", { appearance: "transparent", mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChanged(evt), placeholderIcon: "layers", scale: "l", type: "dropdown" })), h("calcite-action", { appearance: "solid", disabled: !featuresSelected, icon: "magnifying-glass", id: "magnifying-glass", label: this._translations.zoom, onClick: () => this._zoom(), text: this._translations.zoom, textEnabled: true }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "magnifying-glass" }, h("span", null, this._translations.zoom)), h("calcite-action", { appearance: "solid", icon: "filter", id: "filter", onClick: () => this._filter(), text: this._translations.filters, "text-enabled": "true", textEnabled: true }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "filter" }, h("span", null, this._translations.filters)), h("calcite-action", { appearance: "solid", disabled: !featuresSelected, id: "trash", onClick: () => this._delete(), text: "" }, h("calcite-button", { appearance: "transparent", iconStart: "trash", kind: "danger" }, this._translations.delete)), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "trash" }, h("span", null, this._translations.delete)), h("calcite-action", { appearance: "solid", disabled: !featuresSelected, icon: "erase", id: "erase", onClick: () => this._clearSelection(), text: this._translations.clearSelection, "text-enabled": "true", textEnabled: true }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "erase" }, h("span", null, this._translations.clearSelection))), h("calcite-dropdown", null, h("calcite-action", { appearance: "solid", label: "", slot: "trigger", text: "" }, h("calcite-button", { appearance: "transparent", iconEnd: "chevron-down", kind: "neutral" }, this._translations.more)), h("calcite-dropdown-group", { "selection-mode": "none" }, h("calcite-dropdown-item", { iconStart: "list-check-all", onClick: () => this._selectAll() }, this._translations.selectAll), h("calcite-dropdown-item", { iconStart: "selected-items-filter", onClick: () => this._toggleShowSelected() }, this._showOnlySelected ? this._translations.showAll :
159
+ this._translations.showSelected), h("calcite-dropdown-item", { iconStart: "refresh", onClick: () => this._switchSelected() }, this._translations.switchSelected), h("calcite-dropdown-item", { iconStart: "refresh", onClick: () => this._refresh() }, this._translations.refresh), h("calcite-dropdown-item", { iconStart: "export", onClick: () => void this._exportToCSV() }, this._translations.exportCSV)))));
160
160
  }
161
161
  /**
162
162
  * Initialize the FeatureTable
@@ -164,10 +164,9 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
164
164
  * @returns void
165
165
  */
166
166
  _getTable(node) {
167
- var _a;
168
- if ((_a = this._layerView) === null || _a === void 0 ? void 0 : _a.layer) {
167
+ if (this._layer) {
169
168
  this._table = new this.FeatureTable({
170
- layer: this._layerView.layer,
169
+ layer: this._layer,
171
170
  view: this.mapView,
172
171
  //editingEnabled: this._editEnabled,
173
172
  highlightOnRowSelectEnabled: true,
@@ -180,6 +179,14 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
180
179
  });
181
180
  this._table.highlightIds.on("change", () => {
182
181
  this._selectedIndexes = this._table.highlightIds.toArray();
182
+ if (this._showOnlySelected) {
183
+ if (this._selectedIndexes.length > 0) {
184
+ this._table.filterBySelection();
185
+ }
186
+ else {
187
+ this._toggleShowSelected();
188
+ }
189
+ }
183
190
  this.featureSelectionChange.emit(this._selectedIndexes);
184
191
  });
185
192
  }
@@ -190,10 +197,11 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
190
197
  * @returns void
191
198
  */
192
199
  _resetTable() {
193
- var _a;
194
- if (((_a = this._layerView) === null || _a === void 0 ? void 0 : _a.layer) && this._table) {
195
- this._table.layer = this._layerView.layer;
196
- this._editEnabled = this._layerView.layer.editingEnabled;
200
+ if (this._layer && this._table) {
201
+ this._clearSelection();
202
+ this.featureSelectionChange.emit(this._selectedIndexes);
203
+ this._table.layer = this._layer;
204
+ this._editEnabled = this._layer.editingEnabled;
197
205
  this._table.view = this.mapView;
198
206
  this._table.editingEnabled = this._editEnabled;
199
207
  this._table.clearSelectionFilter();
@@ -207,7 +215,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
207
215
  */
208
216
  async _mapClicked(evt) {
209
217
  const opts = {
210
- include: this._layerView.layer
218
+ include: this._layer
211
219
  };
212
220
  const hitTestResult = await this.mapView.hitTest(evt.screenPoint, opts);
213
221
  if (hitTestResult.results.length > 0) {
@@ -252,7 +260,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
252
260
  *
253
261
  * @returns void
254
262
  */
255
- _showSelected() {
263
+ _toggleShowSelected() {
256
264
  this._showOnlySelected = !this._showOnlySelected;
257
265
  if (this._showOnlySelected) {
258
266
  this._table.filterBySelection();
@@ -297,10 +305,10 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
297
305
  async _exportToCSV() {
298
306
  const exportInfos = {};
299
307
  const ids = this._table.highlightIds.toArray();
300
- exportInfos[this._layerView.layer.id] = {
308
+ exportInfos[this._layer.id] = {
301
309
  selectionSetNames: [],
302
310
  ids,
303
- layerView: this._layerView
311
+ layer: this._layer
304
312
  };
305
313
  void downloadCSV(exportInfos, false, // formatUsingLayerPopup
306
314
  true);
@@ -335,7 +343,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
335
343
  this._alertMessage = this._translations.confirm;
336
344
  this._alertKind = "danger";
337
345
  this._alertActionFunction = () => {
338
- void this._layerView.layer.applyEdits({
346
+ void this._layer.applyEdits({
339
347
  deleteFeatures: this._table.highlightIds.toArray()
340
348
  });
341
349
  this._alertOpen = false;
@@ -366,15 +374,14 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
366
374
  * @returns a promise that will resolve when the operation is complete
367
375
  */
368
376
  async _layerSelectionChanged(evt) {
369
- var _a;
370
377
  const id = evt.detail[0];
371
- if (id !== ((_a = this._layerView) === null || _a === void 0 ? void 0 : _a.layer.id) || this._allIds.length === 0) {
378
+ if (id !== this._layer.id || this._allIds.length === 0) {
372
379
  this._fetchingData = true;
373
380
  this._table.highlightIds.removeAll();
374
- this._layerView = await getMapLayerView(this.mapView, id);
375
- this._allIds = await queryAllIds(this._layerView.layer);
381
+ this._layer = await getLayer(this.mapView, id);
382
+ this._allIds = await queryAllIds(this._layer);
376
383
  this._selectedIndexes = [];
377
- this._table.layer = this._layerView.layer;
384
+ this._table.layer = this._layer;
378
385
  this._table.render();
379
386
  this._fetchingData = false;
380
387
  }
@@ -392,14 +399,14 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
392
399
  get el() { return this; }
393
400
  static get watchers() { return {
394
401
  "mapView": ["mapViewWatchHandler"],
395
- "_layerView": ["_layerViewWatchHandler"]
402
+ "_layer": ["_layerWatchHandler"]
396
403
  }; }
397
404
  static get style() { return layerTableCss; }
398
405
  }, [0, "layer-table", {
399
406
  "mapView": [16],
400
407
  "_alertOpen": [32],
401
408
  "_fetchingData": [32],
402
- "_layerView": [32],
409
+ "_layer": [32],
403
410
  "_selectedIndexes": [32],
404
411
  "_showOnlySelected": [32],
405
412
  "_translations": [32],