@esri/solutions-components 0.8.29 → 0.8.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/dist/cjs/basemap-gallery_7.cjs.entry.js +65 -40
  2. package/dist/cjs/calcite-alert_4.cjs.entry.js +1 -1
  3. package/dist/cjs/calcite-flow_6.cjs.entry.js +58 -34
  4. package/dist/cjs/crowdsource-reporter.cjs.entry.js +2 -2
  5. package/dist/cjs/feature-list.cjs.entry.js +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{popupUtils-e3fa775b.js → popupUtils-9ca69f8c.js} +1 -1
  8. package/dist/cjs/solutions-components.cjs.js +1 -1
  9. package/dist/collection/components/create-feature/create-feature.js +13 -8
  10. package/dist/collection/components/create-related-feature/create-related-feature.css +4 -0
  11. package/dist/collection/components/create-related-feature/create-related-feature.js +52 -26
  12. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +4 -0
  13. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +1 -1
  14. package/dist/collection/components/floor-filter/floor-filter.js +66 -39
  15. package/dist/collection/utils/popupUtils.js +1 -1
  16. package/dist/collection/utils/popupUtils.ts +1 -1
  17. package/dist/components/create-feature2.js +13 -8
  18. package/dist/components/create-related-feature2.js +57 -30
  19. package/dist/components/crowdsource-reporter.js +2 -2
  20. package/dist/components/floor-filter2.js +67 -41
  21. package/dist/components/popupUtils.js +1 -1
  22. package/dist/esm/basemap-gallery_7.entry.js +65 -40
  23. package/dist/esm/calcite-alert_4.entry.js +1 -1
  24. package/dist/esm/calcite-flow_6.entry.js +58 -34
  25. package/dist/esm/crowdsource-reporter.entry.js +2 -2
  26. package/dist/esm/feature-list.entry.js +1 -1
  27. package/dist/esm/loader.js +1 -1
  28. package/dist/esm/{popupUtils-17193415.js → popupUtils-8efd3cde.js} +1 -1
  29. package/dist/esm/solutions-components.js +1 -1
  30. package/dist/solutions-components/p-2455bcb0.js +21 -0
  31. package/dist/solutions-components/{p-bb90a138.entry.js → p-3365a6de.entry.js} +2 -2
  32. package/dist/solutions-components/p-4ae34862.entry.js +17 -0
  33. package/dist/solutions-components/{p-16fb8296.entry.js → p-628874a6.entry.js} +1 -1
  34. package/dist/solutions-components/{p-2f7bfd8d.entry.js → p-90c3bc54.entry.js} +1 -1
  35. package/dist/solutions-components/p-a0616647.entry.js +6 -0
  36. package/dist/solutions-components/solutions-components.esm.js +1 -1
  37. package/dist/solutions-components/utils/popupUtils.ts +1 -1
  38. package/dist/types/components/create-feature/create-feature.d.ts +1 -1
  39. package/dist/types/components/create-related-feature/create-related-feature.d.ts +19 -1
  40. package/dist/types/components/floor-filter/floor-filter.d.ts +23 -1
  41. package/package.json +1 -1
  42. package/dist/solutions-components/p-2e23ac2c.js +0 -21
  43. package/dist/solutions-components/p-327577d1.entry.js +0 -6
  44. package/dist/solutions-components/p-c21a6940.entry.js +0 -17
@@ -32,7 +32,7 @@ export class CreateFeature {
32
32
  this.customizeSubmit = false;
33
33
  this.searchConfiguration = undefined;
34
34
  this._editorLoading = false;
35
- this.showSearchWidget = undefined;
35
+ this._showSearchWidget = undefined;
36
36
  }
37
37
  //--------------------------------------------------------------------------
38
38
  //
@@ -105,10 +105,10 @@ export class CreateFeature {
105
105
  * Renders the component.
106
106
  */
107
107
  render() {
108
- const showSearchWidget = this.showSearchWidget ? '' : 'display-none';
108
+ const showSearchWidget = this._showSearchWidget ? '' : 'display-none';
109
109
  const loaderClass = this._editorLoading ? "" : "display-none";
110
110
  const featureFormClass = this._editorLoading ? "display-none" : "";
111
- return (h(Fragment, { key: '2e790defdd5592fed729853888ee06143c95c84d' }, h("calcite-loader", { key: 'a0f1de0064ea80305d4aaf83f78939c0236c955a', class: loaderClass, label: "", scale: "s" }), h("div", { key: '1af391d6d7fd0dffa2e8e4b43905f8081a5f9820', class: featureFormClass, id: "feature-form" }), h("div", { key: '88d12115c3c2e0d34a5d6fd8895fb60cec6e9b5d', class: `search-widget ${showSearchWidget} ${featureFormClass}`, id: "search-widget-ref" })));
111
+ return (h(Fragment, { key: 'a4ccd565a52a4cde4e76439629425f19bd4c222e' }, h("calcite-loader", { key: '30e8a3753985a734dd7cba461f26691b51f49ab9', class: loaderClass, label: "", scale: "s" }), h("div", { key: '0845f1fa85a21b578fd18200b43d4a77c34e6808', class: featureFormClass, id: "feature-form" }), h("div", { key: 'af74b6337f5a0dcfdbd552145c88eae5282a3307', class: `search-widget ${showSearchWidget} ${featureFormClass}`, id: "search-widget-ref" })));
112
112
  }
113
113
  //--------------------------------------------------------------------------
114
114
  //
@@ -198,7 +198,7 @@ export class CreateFeature {
198
198
  const formHandle = this.reactiveUtils.watch(() => this._editor.viewModel.state, (state) => {
199
199
  if (state === 'creating-features') {
200
200
  this._editorLoading = true;
201
- this.showSearchWidget = true;
201
+ this._showSearchWidget = true;
202
202
  }
203
203
  });
204
204
  this._editor.viewModel.addHandles(formHandle);
@@ -222,11 +222,12 @@ export class CreateFeature {
222
222
  //on sketch complete emit the event
223
223
  this._editor.viewModel.sketchViewModel.on("create", (evt) => {
224
224
  if (evt.state === "complete") {
225
- this.showSearchWidget = false;
225
+ this._showSearchWidget = false;
226
226
  this.progressStatus.emit(1);
227
227
  this.drawComplete.emit();
228
228
  }
229
229
  });
230
+ //hides the header and footer elements in editor widget
230
231
  this.hideEditorsElements().then(() => {
231
232
  resolve({});
232
233
  }, e => reject(e));
@@ -237,8 +238,12 @@ export class CreateFeature {
237
238
  if (items.length === 1) {
238
239
  this._editor.viewModel.featureTemplatesViewModel.select(items[0]);
239
240
  }
240
- //hides the header and footer elements in editor widget
241
- void this.hideEditorsElements();
241
+ const resolvePromise = items.length > 1;
242
+ this.hideEditorsElements().then(() => {
243
+ if (resolvePromise) {
244
+ resolve({});
245
+ }
246
+ }, e => resolvePromise && reject(e));
242
247
  }
243
248
  });
244
249
  }
@@ -486,7 +491,7 @@ export class CreateFeature {
486
491
  static get states() {
487
492
  return {
488
493
  "_editorLoading": {},
489
- "showSearchWidget": {}
494
+ "_showSearchWidget": {}
490
495
  };
491
496
  }
492
497
  static get events() {
@@ -5,4 +5,8 @@
5
5
  /* Override to hide Editor settings panel collapsible */
6
6
  .esri-editor__panel-toolbar {
7
7
  display: none !important;
8
+ }
9
+
10
+ .display-none {
11
+ display: none !important;
8
12
  }
@@ -18,7 +18,7 @@
18
18
  * See the License for the specific language governing permissions and
19
19
  * limitations under the License.
20
20
  */
21
- import { Host, h } from "@stencil/core";
21
+ import { h } from "@stencil/core";
22
22
  import { loadModules } from "../../utils/loadModules";
23
23
  export class CreateRelatedFeature {
24
24
  constructor() {
@@ -30,6 +30,7 @@ export class CreateRelatedFeature {
30
30
  this.table = undefined;
31
31
  this.selectedFeature = undefined;
32
32
  this.customizeSubmit = false;
33
+ this._editorLoading = false;
33
34
  }
34
35
  //--------------------------------------------------------------------------
35
36
  //
@@ -44,6 +45,18 @@ export class CreateRelatedFeature {
44
45
  await this.init();
45
46
  });
46
47
  }
48
+ /**
49
+ * When _editorLoading is true the container node will be hidden while starting the create workflow
50
+ */
51
+ async _editorLoadingWatchHandler(v) {
52
+ var _a, _b;
53
+ if (v) {
54
+ (_a = this._container) === null || _a === void 0 ? void 0 : _a.classList.add("display-none");
55
+ await this.startCreate();
56
+ (_b = this._container) === null || _b === void 0 ? void 0 : _b.classList.remove("display-none");
57
+ this._editorLoading = false;
58
+ }
59
+ }
47
60
  //--------------------------------------------------------------------------
48
61
  //
49
62
  // Methods (public)
@@ -100,7 +113,8 @@ export class CreateRelatedFeature {
100
113
  this.reactiveUtils = reactiveUtils;
101
114
  }
102
115
  render() {
103
- return (h(Host, { key: 'c8516898db79b35b7fba909810afdc56b0602ebd' }));
116
+ const loaderClass = this._editorLoading ? "" : "display-none";
117
+ return (h("calcite-loader", { key: 'a8fd1e83a4a9614779be19a11e6028b3a402cbd2', class: loaderClass, label: "", scale: "s" }));
104
118
  }
105
119
  /**
106
120
  * StencilJS: Called once just after the component is fully loaded and the first render() occurs.
@@ -113,29 +127,24 @@ export class CreateRelatedFeature {
113
127
  * @protected
114
128
  */
115
129
  async createEditorWidget() {
130
+ var _a;
116
131
  if (this._editor) {
117
132
  this._editor.destroy();
118
133
  }
119
- const container = document.createElement("div");
134
+ this._container = document.createElement("div");
135
+ (_a = this._container) === null || _a === void 0 ? void 0 : _a.classList.add("display-none");
120
136
  this._editor = new this.Editor({
121
137
  view: this.mapView,
122
138
  visibleElements: {
123
139
  snappingControls: false
124
140
  },
125
- container
141
+ container: this._container
126
142
  });
127
- this.el.appendChild(container);
128
- //Add handle to watch featureFormViewModel ready state and hide the editor elements
129
- const hideElementHandle = this.reactiveUtils.watch(() => { var _a; return (_a = this._editor.viewModel.featureFormViewModel) === null || _a === void 0 ? void 0 : _a.state; }, (state) => {
130
- if (state === 'ready') {
131
- this.hideEditorsElements();
132
- }
133
- });
134
- this._editor.viewModel.addHandles(hideElementHandle);
143
+ this.el.appendChild(this._container);
135
144
  //Add handle to watch featureTemplatesViewModel ready state and then start the creation
136
145
  const handle = this.reactiveUtils.watch(() => this._editor.viewModel.featureTemplatesViewModel.state, (state) => {
137
146
  if (state === 'ready') {
138
- void this.startCreate();
147
+ this._editorLoading = true;
139
148
  }
140
149
  });
141
150
  this._editor.viewModel.addHandles(handle);
@@ -176,6 +185,8 @@ export class CreateRelatedFeature {
176
185
  template,
177
186
  };
178
187
  await this._editor.startCreateFeaturesWorkflowAtFeatureCreation(creationInfo);
188
+ //hides the header and footer elements in editor widget
189
+ await this.hideEditorsElements();
179
190
  // Emit an event to show submit cancel buttons
180
191
  this.isActionPending.emit(false);
181
192
  this._editor.viewModel.featureFormViewModel.on('submit', this.submitted.bind(this));
@@ -184,22 +195,21 @@ export class CreateRelatedFeature {
184
195
  * Hides the elements of editor widget
185
196
  * @protected
186
197
  */
187
- hideEditorsElements() {
198
+ async hideEditorsElements() {
199
+ var _a, _b;
188
200
  if (!this.customizeSubmit) {
189
201
  return;
190
202
  }
191
- setTimeout(() => {
192
- var _a;
193
- //hides the header and footer on the featureForm
194
- (_a = this.el.querySelector('.esri-editor').querySelectorAll('calcite-flow-item')) === null || _a === void 0 ? void 0 : _a.forEach((flowItem) => {
195
- var _a, _b, _c, _d, _e;
196
- const article = (_c = (_b = (_a = flowItem.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('calcite-panel')) === null || _b === void 0 ? void 0 : _b.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('article');
197
- //hide the header
198
- (_d = article === null || article === void 0 ? void 0 : article.querySelector('header')) === null || _d === void 0 ? void 0 : _d.setAttribute('style', 'display: none');
199
- //hide the footer
200
- (_e = article === null || article === void 0 ? void 0 : article.querySelector('footer')) === null || _e === void 0 ? void 0 : _e.setAttribute('style', 'display: none');
201
- });
202
- }, 700);
203
+ await this.timeout(700);
204
+ //hides the header and footer on the featureForm
205
+ (_b = (_a = this.el.querySelector('.esri-editor')) === null || _a === void 0 ? void 0 : _a.querySelectorAll('calcite-flow-item')) === null || _b === void 0 ? void 0 : _b.forEach((flowItem) => {
206
+ var _a, _b, _c, _d, _e;
207
+ const article = (_c = (_b = (_a = flowItem.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('calcite-panel')) === null || _b === void 0 ? void 0 : _b.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('article');
208
+ //hide the header
209
+ (_d = article === null || article === void 0 ? void 0 : article.querySelector('header')) === null || _d === void 0 ? void 0 : _d.setAttribute('style', 'display: none');
210
+ //hide the footer
211
+ (_e = article === null || article === void 0 ? void 0 : article.querySelector('footer')) === null || _e === void 0 ? void 0 : _e.setAttribute('style', 'display: none');
212
+ });
203
213
  }
204
214
  /**
205
215
  * Makes attributes for related feature
@@ -255,6 +265,14 @@ export class CreateRelatedFeature {
255
265
  this.success.emit();
256
266
  }
257
267
  }
268
+ /**
269
+ * call setTimeout in Promise wrapper
270
+ * @param delay The time, in milliseconds that the timer should wait before the promise is resolved
271
+ * @protected
272
+ */
273
+ timeout(delay) {
274
+ return new Promise(resolve => setTimeout(resolve, delay));
275
+ }
258
276
  static get is() { return "create-related-feature"; }
259
277
  static get originalStyleUrls() {
260
278
  return {
@@ -348,6 +366,11 @@ export class CreateRelatedFeature {
348
366
  }
349
367
  };
350
368
  }
369
+ static get states() {
370
+ return {
371
+ "_editorLoading": {}
372
+ };
373
+ }
351
374
  static get events() {
352
375
  return [{
353
376
  "method": "success",
@@ -444,6 +467,9 @@ export class CreateRelatedFeature {
444
467
  return [{
445
468
  "propName": "mapView",
446
469
  "methodName": "mapViewWatchHandler"
470
+ }, {
471
+ "propName": "_editorLoading",
472
+ "methodName": "_editorLoadingWatchHandler"
447
473
  }];
448
474
  }
449
475
  }
@@ -79,3 +79,7 @@
79
79
  position: absolute;
80
80
  z-index: 1000;
81
81
  }
82
+
83
+ .share-node {
84
+ display: flex;
85
+ }
@@ -580,7 +580,7 @@ export class CrowdsourceReporter {
580
580
  getFeatureDetailsFlowItem() {
581
581
  var _a;
582
582
  const showCommentBtn = ((_a = this._getLayersConfig(this._selectedLayerId)) === null || _a === void 0 ? void 0 : _a.comment) && this._selectedLayer.relationships.length > 0;
583
- return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("instant-apps-social-share", { autoUpdateShareUrl: false, embed: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, removePopoverOffset: true, scale: "s", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), this._selectedFeature.length > 1 && this.getFeaturesPagination(), h("calcite-panel", null, h("feature-details", { class: 'full-height', graphics: this._selectedFeature, layerItemsHash: this._layerItemsHash, mapView: this.mapView, onCommentSelect: this.onCommentSelectFromList.bind(this), onFeatureSelectionChange: this.selectionChanged.bind(this), onLoadingStatus: (evt) => void this.updatingFeatureDetails(evt.detail), ref: el => this._featureDetails = el, reportingOptions: this.reportingOptions }), showCommentBtn &&
583
+ return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("instant-apps-social-share", { autoUpdateShareUrl: false, class: "share-node", embed: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, removePopoverOffset: true, scale: "m", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), this._selectedFeature.length > 1 && this.getFeaturesPagination(), h("calcite-panel", null, h("feature-details", { class: 'full-height', graphics: this._selectedFeature, layerItemsHash: this._layerItemsHash, mapView: this.mapView, onCommentSelect: this.onCommentSelectFromList.bind(this), onFeatureSelectionChange: this.selectionChanged.bind(this), onLoadingStatus: (evt) => void this.updatingFeatureDetails(evt.detail), ref: el => this._featureDetails = el, reportingOptions: this.reportingOptions }), showCommentBtn &&
584
584
  h("calcite-button", { appearance: "solid", onClick: () => this._flowItems = [...this._flowItems, "add-comment"], slot: "footer", width: "full" }, this._translations.comment))));
585
585
  }
586
586
  /**
@@ -31,23 +31,22 @@ export class FloorFilter {
31
31
  // Watch handlers
32
32
  //
33
33
  //--------------------------------------------------------------------------
34
+ /**
35
+ * Watch for changes to the mapView and re-init the floor filter
36
+ */
34
37
  async mapViewWatchHandler() {
35
- console.log("mapViewWatchHandler FF");
36
- const webMap = this.mapView.map;
37
- await webMap.when(() => {
38
- console.log("webMap.when FF");
39
- if (this.floorFilterWidget) {
40
- this.floorFilterWidget.destroy();
41
- this.floorFilterWidget = undefined;
42
- console.log("floorFilterWidget destroyed");
43
- }
44
- if (this._floorFilterElement) {
45
- this._floorFilterElement.remove();
46
- this._floorFilterElement = document.createElement("div");
47
- console.log("this._floorFilterElement created");
48
- }
49
- this._initFloorFilter(this.mapView, webMap);
50
- });
38
+ await this._initFloorFilter(this.mapView);
39
+ }
40
+ /**
41
+ * Watch for changes to the enabled property and re-init or destroy the floor filter
42
+ */
43
+ async enabledWatchHandler() {
44
+ if (this.enabled) {
45
+ await this._initFloorFilter(this.mapView);
46
+ }
47
+ else if (!this.enabled) {
48
+ this._destroyWidget();
49
+ }
51
50
  }
52
51
  //--------------------------------------------------------------------------
53
52
  //
@@ -60,8 +59,11 @@ export class FloorFilter {
60
59
  async componentWillLoad() {
61
60
  return this._initModules();
62
61
  }
62
+ /**
63
+ * Renders the component.
64
+ */
63
65
  render() {
64
- return (h(Host, { key: 'df3c419f3eaf30590c44c4919f0eeddfc333b81d' }, h("div", { key: '8496099f3bc35f34db6e47f73870ead9144df0a4', ref: (el) => { this._floorFilterElement = el; } })));
66
+ return (h(Host, { key: 'c80a8d46fb48f3789d9fa09c2400faad49e2e236' }, h("div", { key: '82919a3ba061a17c8aeaa0d2f6f4f13bc428b519', ref: (el) => { this._floorFilterElement = el; } })));
65
67
  }
66
68
  //--------------------------------------------------------------------------
67
69
  //
@@ -83,32 +85,54 @@ export class FloorFilter {
83
85
  this.FloorFilter = FloorFilter;
84
86
  this.reactiveUtils = reactiveUtils;
85
87
  }
88
+ /**
89
+ * Destroy the widget and remove the containing element if it exists
90
+ *
91
+ * @protected
92
+ */
93
+ _destroyWidget() {
94
+ if (this.floorFilterWidget) {
95
+ this.floorFilterWidget.destroy();
96
+ this.floorFilterWidget = undefined;
97
+ }
98
+ if (this._floorFilterElement) {
99
+ this._floorFilterElement.remove();
100
+ }
101
+ }
102
+ /**
103
+ * Destroy the widget and remove the containing element then re-create the container element
104
+ *
105
+ * @protected
106
+ */
107
+ _initContainer() {
108
+ this._destroyWidget();
109
+ this._floorFilterElement = document.createElement("div");
110
+ }
86
111
  /**
87
112
  * Initialize the floor filter or reset the current view if it already exists
88
113
  */
89
- _initFloorFilter(view, webMap) {
90
- var _a, _b, _c;
91
- console.log("_initFloorFilter");
92
- console.log(`view: ${view}`);
93
- console.log(`this.enabled: ${this.enabled}`);
94
- console.log(`this.FloorFilter: ${this.FloorFilter}`);
95
- console.log(`webMap?.floorInfo: ${webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo}`);
114
+ async _initFloorFilter(view) {
115
+ const webMap = view === null || view === void 0 ? void 0 : view.map;
96
116
  if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
97
- this.floorFilterWidget = new this.FloorFilter({
98
- container: this._floorFilterElement,
99
- view
100
- });
101
- (_a = this._facilityHandle) === null || _a === void 0 ? void 0 : _a.remove();
102
- this._facilityHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.facility, (facility) => {
103
- this.facilityChanged.emit(facility);
104
- });
105
- (_b = this._levelHandle) === null || _b === void 0 ? void 0 : _b.remove();
106
- this._levelHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.level, (level) => {
107
- this.levelChanged.emit(level);
108
- });
109
- (_c = this._siteHandle) === null || _c === void 0 ? void 0 : _c.remove();
110
- this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
111
- this.siteChanged.emit(site);
117
+ this._initContainer();
118
+ await webMap.when(() => {
119
+ var _a, _b, _c;
120
+ this.floorFilterWidget = new this.FloorFilter({
121
+ container: this._floorFilterElement,
122
+ view
123
+ });
124
+ (_a = this._facilityHandle) === null || _a === void 0 ? void 0 : _a.remove();
125
+ this._facilityHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.facility, (facility) => {
126
+ this.facilityChanged.emit(facility);
127
+ });
128
+ (_b = this._levelHandle) === null || _b === void 0 ? void 0 : _b.remove();
129
+ this._levelHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.level, (level) => {
130
+ this.levelChanged.emit(level);
131
+ });
132
+ (_c = this._siteHandle) === null || _c === void 0 ? void 0 : _c.remove();
133
+ this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
134
+ this.siteChanged.emit(site);
135
+ });
112
136
  });
113
137
  }
114
138
  }
@@ -238,6 +262,9 @@ export class FloorFilter {
238
262
  return [{
239
263
  "propName": "mapView",
240
264
  "methodName": "mapViewWatchHandler"
265
+ }, {
266
+ "propName": "enabled",
267
+ "methodName": "enabledWatchHandler"
241
268
  }];
242
269
  }
243
270
  }
@@ -68,7 +68,7 @@ export class PopupUtils {
68
68
  const fieldInfo = layer.popupTemplate.fieldInfos.find((fInfo) => fInfo.fieldName.toLowerCase() === field.name.toLowerCase());
69
69
  //format the attribute value
70
70
  const formattedAttributeValue = _prepareAttributeValue(attributeValue, field.type, field.domain, fieldInfo === null || fieldInfo === void 0 ? void 0 : fieldInfo.format, this.intl);
71
- attributes[`{${field.name.toUpperCase()}}`] = formattedAttributeValue;
71
+ attributes[`{${field.name.toUpperCase()}}`] = formattedAttributeValue !== null && formattedAttributeValue !== void 0 ? formattedAttributeValue : attributeValue;
72
72
  });
73
73
  }
74
74
  return popupTitle === null || popupTitle === void 0 ? void 0 : popupTitle.replace(/{.*?}/g, (placeholder) => {
@@ -80,7 +80,7 @@ export class PopupUtils {
80
80
  const fieldInfo = layer.popupTemplate.fieldInfos.find((fInfo) => fInfo.fieldName.toLowerCase() === field.name.toLowerCase());
81
81
  //format the attribute value
82
82
  const formattedAttributeValue = _prepareAttributeValue(attributeValue, field.type, field.domain, fieldInfo?.format, this.intl);
83
- attributes[`{${field.name.toUpperCase()}}`] = formattedAttributeValue;
83
+ attributes[`{${field.name.toUpperCase()}}`] = formattedAttributeValue ?? attributeValue;
84
84
  })
85
85
  }
86
86
 
@@ -29,7 +29,7 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
29
29
  this.customizeSubmit = false;
30
30
  this.searchConfiguration = undefined;
31
31
  this._editorLoading = false;
32
- this.showSearchWidget = undefined;
32
+ this._showSearchWidget = undefined;
33
33
  }
34
34
  //--------------------------------------------------------------------------
35
35
  //
@@ -102,10 +102,10 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
102
102
  * Renders the component.
103
103
  */
104
104
  render() {
105
- const showSearchWidget = this.showSearchWidget ? '' : 'display-none';
105
+ const showSearchWidget = this._showSearchWidget ? '' : 'display-none';
106
106
  const loaderClass = this._editorLoading ? "" : "display-none";
107
107
  const featureFormClass = this._editorLoading ? "display-none" : "";
108
- return (h(Fragment, { key: '2e790defdd5592fed729853888ee06143c95c84d' }, h("calcite-loader", { key: 'a0f1de0064ea80305d4aaf83f78939c0236c955a', class: loaderClass, label: "", scale: "s" }), h("div", { key: '1af391d6d7fd0dffa2e8e4b43905f8081a5f9820', class: featureFormClass, id: "feature-form" }), h("div", { key: '88d12115c3c2e0d34a5d6fd8895fb60cec6e9b5d', class: `search-widget ${showSearchWidget} ${featureFormClass}`, id: "search-widget-ref" })));
108
+ return (h(Fragment, { key: 'a4ccd565a52a4cde4e76439629425f19bd4c222e' }, h("calcite-loader", { key: '30e8a3753985a734dd7cba461f26691b51f49ab9', class: loaderClass, label: "", scale: "s" }), h("div", { key: '0845f1fa85a21b578fd18200b43d4a77c34e6808', class: featureFormClass, id: "feature-form" }), h("div", { key: 'af74b6337f5a0dcfdbd552145c88eae5282a3307', class: `search-widget ${showSearchWidget} ${featureFormClass}`, id: "search-widget-ref" })));
109
109
  }
110
110
  //--------------------------------------------------------------------------
111
111
  //
@@ -195,7 +195,7 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
195
195
  const formHandle = this.reactiveUtils.watch(() => this._editor.viewModel.state, (state) => {
196
196
  if (state === 'creating-features') {
197
197
  this._editorLoading = true;
198
- this.showSearchWidget = true;
198
+ this._showSearchWidget = true;
199
199
  }
200
200
  });
201
201
  this._editor.viewModel.addHandles(formHandle);
@@ -219,11 +219,12 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
219
219
  //on sketch complete emit the event
220
220
  this._editor.viewModel.sketchViewModel.on("create", (evt) => {
221
221
  if (evt.state === "complete") {
222
- this.showSearchWidget = false;
222
+ this._showSearchWidget = false;
223
223
  this.progressStatus.emit(1);
224
224
  this.drawComplete.emit();
225
225
  }
226
226
  });
227
+ //hides the header and footer elements in editor widget
227
228
  this.hideEditorsElements().then(() => {
228
229
  resolve({});
229
230
  }, e => reject(e));
@@ -234,8 +235,12 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
234
235
  if (items.length === 1) {
235
236
  this._editor.viewModel.featureTemplatesViewModel.select(items[0]);
236
237
  }
237
- //hides the header and footer elements in editor widget
238
- void this.hideEditorsElements();
238
+ const resolvePromise = items.length > 1;
239
+ this.hideEditorsElements().then(() => {
240
+ if (resolvePromise) {
241
+ resolve({});
242
+ }
243
+ }, e => resolvePromise && reject(e));
239
244
  }
240
245
  });
241
246
  }
@@ -401,7 +406,7 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
401
406
  "customizeSubmit": [4, "customize-submit"],
402
407
  "searchConfiguration": [16],
403
408
  "_editorLoading": [32],
404
- "showSearchWidget": [32],
409
+ "_showSearchWidget": [32],
405
410
  "close": [64],
406
411
  "submit": [64]
407
412
  }, undefined, {