@esri/solutions-components 5.1.0-next.172 → 5.1.0-next.174

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.
@@ -9,13 +9,13 @@ import { p as L } from "../../chunks/queryUtils.js";
9
9
  import P from "@arcgis/core/form/ExpressionInfo.js";
10
10
  import F from "@arcgis/core/layers/FeatureLayer.js";
11
11
  import C from "@arcgis/core/form/elements/FieldElement.js";
12
- import $ from "@arcgis/core/form/FormTemplate.js";
13
- import S from "@arcgis/core/views/MapView.js";
12
+ import S from "@arcgis/core/form/FormTemplate.js";
13
+ import $ from "@arcgis/core/views/MapView.js";
14
14
  import V from "@arcgis/core/Graphic.js";
15
15
  import * as f from "@arcgis/core/core/reactiveUtils.js";
16
- import * as T from "@arcgis/core/rest/locator.js";
16
+ import * as R from "@arcgis/core/rest/locator.js";
17
17
  import b from "@arcgis/core/request.js";
18
- import * as R from "exifr";
18
+ import * as T from "exifr";
19
19
  import U from "@arcgis/core/geometry/Point.js";
20
20
  import z from "@arcgis/core/geometry/SpatialReference.js";
21
21
  const H = M`@layer{:host{display:block}.hide-editor-toolbar .esri-editor__panel-toolbar{display:none!important}.esri-editor__panel-content{padding-block:0px!important}.esri-editor .esri-item-list__group__header,.esri-editor__panel-content__section .esri-widget__heading{display:none!important}.esri-editor .esri-item-list__filter-container--sticky{padding-block:0px!important;padding-inline:10px!important}.search-widget{width:92%!important;margin:5px 14px 20px}.display-none{display:none!important}.hide-map{height:1%!important;visibility:hidden;position:static!important}.show-map{padding:10px!important;position:absolute!important;bottom:0;height:auto!important;width:calc(100% - 22px)}.notice-msg{padding:10px;width:calc(100% - 20px)}.edit-location-btn{margin:5px;display:flex}.esri-editor__panel-content{padding-block:10px!important}.image-preview-container{padding:10px}.esri-editor{height:auto!important}.height-fit-content{height:fit-content!important}.content-container{padding:1.5rem}.instruction-text{margin-bottom:1.5rem;font-size:1rem}.selected-card{border:2px solid var(--calcite-ui-brand)}.upload-img-footer-container{width:100%;gap:5px;display:grid}.info-container{display:flex;align-items:center;gap:6px;margin-bottom:10px}.info-container calcite-icon{--calcite-icon-color: var(--calcite-color-brand)}.info-container span{font-size:12px;color:var(--calcite-ui-text-3)}.padding-10{padding:10px}.report-selection-container{display:flex;flex-direction:column;padding:10px;--calcite-card-border-color: var(--calcite-color-border-1)}.pb-12{padding-bottom:12px!important}.pt-0{padding-top:0!important}.pt-15{padding-top:15px!important}.option-description-container{display:flex;align-items:center;gap:6px}.cursor-pointer{cursor:pointer;padding:6px 0}.card-body-content{display:flex;flex-direction:row;align-items:center;padding:10px 5px;gap:15px}.text-stack{display:flex;flex-direction:column;gap:2px}.option-title{font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-1);font-size:var(--calcite-font-size--1)}.option-description{color:var(--calcite-ui-text-3);font-size:var(--calcite-font-size--1)}.action-footer{display:flex;justify-content:center;margin-top:16px}.analysis-wrapper{display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center;margin:auto}.analyzing-icon{--calcite-icon-color: var(--calcite-color-brand);animation:sparkle 2s infinite ease-in-out}.adjusted-height{height:30px!important;min-height:auto!important}@keyframes sparkle{0%,to{transform:scale(1)}50%{transform:scale(1.5)}}@media only screen and (max-width:600px){.esri-editor__panel-content{padding-block:0!important;min-height:0!important}}}`, _ = "geocodedLocation", D = `Extract the address from the user's message and return it in JSON format '{"address":"<address>"}'. If no address is found, return null.`;
@@ -84,7 +84,7 @@ class N extends E {
84
84
  try {
85
85
  await e.save();
86
86
  } catch (t) {
87
- if (this._awaitingLayerEdits = !1, this._pendingAttachmentUpload = !1, t?.name === "AbortError")
87
+ if (this._awaitingLayerEdits = !1, this._pendingAttachmentUpload = !1, t?.name === "AbortError" || t?.name === "missing-parameters")
88
88
  return;
89
89
  this._onFail(t);
90
90
  return;
@@ -131,13 +131,13 @@ class N extends E {
131
131
  const l = this._aiAnalysisInfo?.results?.filter((u) => !u.success && u.key !== _), p = l?.length ? !0 : this._analysisFailed, m = this._getAnalysisErrorMessage(l?.length), g = this._aiAnalysisInfo?.canUseAI && ["chooseReportType", "analyzingImage", "analyzingMessage", "imageUpload", "messageInput"].includes(this._currentPage);
132
132
  return this._inValidGeometryDrawn ? n = this.reportingAreaMessage || this._translations.reportOutsideAreaMessage : this._currentPage === "drawing" || this._currentPage === "editing" ? n = this._translations.provideLocationMsg : this._currentPage === "featureForm" ? n = this._aiAnalysisInfo?.results?.filter((u) => u.success).length ? this._analysisMode === "text" ? this._translations.textReviewMsg : this._translations.formReviewMsg : this._translations.provideDetailsMsg : s && (n = this._translations.enableFeatureTemplatesMessage), o`${p && o`<calcite-alert auto-close icon=x-octagon kind=danger label @calciteAlertClose=${() => {
133
133
  this._analysisFailed = !1;
134
- }} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${m}</div></calcite-alert>` || ""}${g && o`<calcite-panel>${this._currentPage === "chooseReportType" && this._getReportTypePage() || ""}${this._currentPage === "imageUpload" && this._aiImageExtractionPage() || ""}${this._currentPage === "messageInput" && this._aiTextExtractionPage() || ""}${this._currentPage === "analyzingImage" && this._getAnalyzingImagePage() || ""}${this._currentPage === "analyzingMessage" && this._getAnalyzingMessagePage() || ""}</calcite-panel>` || ""}${!g && o`${r && o`<calcite-notice class="notice-msg" .icon=${a} .kind=${i} open ${h(this._calciteNotice)}><div slot=message .innerHTML=${n ?? ""} ${h(this._guidingMessageRefNode)}></div></calcite-notice>` || ""}${this._selectedImageBase64 && this._currentPage === "featureForm" && o`<div class="image-preview-container"><calcite-label>${this._translations.photo}</calcite-label><img class="width-full" src=${this._selectedImageBase64 ?? y}></div>` || ""}<calcite-loader class=${v(e)} label scale=s></calcite-loader>${this._currentPage === "featureForm" && this.isMobile && o`<calcite-button appearance=transparent class="edit-location-btn" icon-start=pin @click=${this.editLocation}>${this._translations.editLocationLabel}</calcite-button>` || ""}${this._showSearchComponent && this._updatedMapView && this._selectedLayer && this._getSearchComponent() || ""}${this._updatedMapView && this._selectedLayer && this._getEditor() || ""}` || ""}<div class=${v(t)} ${h(this._mapViewContainer)}></div>`;
134
+ }} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${m}</div></calcite-alert>` || ""}${g && o`<calcite-panel>${this._currentPage === "chooseReportType" && this._getReportTypePage() || ""}${this._currentPage === "imageUpload" && this._aiImageExtractionPage() || ""}${this._currentPage === "messageInput" && this._aiTextExtractionPage() || ""}${this._currentPage === "analyzingImage" && this._getAnalyzingImagePage() || ""}${this._currentPage === "analyzingMessage" && this._getAnalyzingMessagePage() || ""}</calcite-panel>` || ""}${!g && o`${r && o`<calcite-notice class="notice-msg" .icon=${a} .kind=${i} open ${h(this._calciteNotice)}><div slot=message .innerHTML=${n ?? ""} ${h(this._guidingMessageRefNode)}></div></calcite-notice>` || ""}${this._selectedImageBase64 && this._currentPage === "featureForm" && o`<div class="image-preview-container"><calcite-label>${this._translations.photo}</calcite-label><img class="width-full" src=${this._selectedImageBase64 ?? y}></div>` || ""}<calcite-loader class=${v(e)} label scale=s></calcite-loader>${this._currentPage === "featureForm" && this.isMobile && o`<calcite-button appearance=transparent class="edit-location-btn" icon-start=pin @click=${this.editLocation}>${this._translations.editLocationLabel}</calcite-button>` || ""}${this._showSearchComponent && this._updatedMapView && this._selectedLayer && this._getSearchComponent() || ""}${this._getEditor()}` || ""}<div class=${v(t)} ${h(this._mapViewContainer)}></div>`;
135
135
  }
136
136
  async init() {
137
137
  this.mapView && this.selectedLayerId && (this._updatedMapView = this.mapView, await (this.isMobile && this.updateMapPosition ? this.createMobileMapView() : this._loadLayerInfos()));
138
138
  }
139
139
  async createMobileMapView() {
140
- this._mapViewContainer.value && this.mapView && (this._mapViewContainer.value.classList.add("hide-map"), await new S({
140
+ this._mapViewContainer.value && this.mapView && (this._mapViewContainer.value.classList.add("hide-map"), await new $({
141
141
  map: this.mapView.map,
142
142
  container: this._mapViewContainer.value,
143
143
  zoom: this.mapView.zoom,
@@ -161,7 +161,11 @@ class N extends E {
161
161
  updateEnabled: !1,
162
162
  deleteEnabled: !1
163
163
  });
164
- })), this._layerInfos = e;
164
+ })), this._layerInfos = e, await this._initEditor();
165
+ }
166
+ async _initEditor() {
167
+ const e = this._editor.value;
168
+ e && (await e.componentOnReady(), e.view = this._updatedMapView, e.layerInfos = this._layerInfos, e.hideEditFeaturesSection = !0, e.hideSettingsMenu = !this.enableSnapping, e.hideSketch = !this.showSketchWidgets || this._selectedLayer?.geometryType === "point", e.hideSnappingControlsElementsEnabledToggle = !this.enableSnapping);
165
169
  }
166
170
  _attachEditsListener(e) {
167
171
  this._attachedEditsLayerId === e.id && this._layerEditsHandler || (this._layerEditsHandler?.remove(), this._attachedEditsLayerId = e.id, this._layerEditsHandler = e.on("edits", this._onLayerEdits));
@@ -195,7 +199,7 @@ class N extends E {
195
199
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), t());
196
200
  }
197
201
  _getEditor() {
198
- return o`<arcgis-editor class=height-fit-content .view=${this._updatedMapView} .layerInfos=${this._layerInfos} hide-edit-features-section .hideSettingsMenu=${!this.enableSnapping} .hideSketch=${!this.showSketchWidgets || this._selectedLayer?.geometryType === "point"} .hideSnappingControlsElementsEnabledToggle=${!this.enableSnapping} @arcgisReady=${this._onEditorComponentReady} @arcgisPropertyChange=${this._onEditorPropertyChange} @arcgisSketchUpdate=${this._onSketchUpdate} ${h(this._editor)}></arcgis-editor>`;
202
+ return o`<arcgis-editor class=height-fit-content @arcgisReady=${this._onEditorComponentReady} @arcgisPropertyChange=${this._onEditorPropertyChange} @arcgisSketchUpdate=${this._onSketchUpdate} ${h(this._editor)}></arcgis-editor>`;
199
203
  }
200
204
  _getSearchComponent() {
201
205
  const e = this._currentPage === "drawing" || this._currentPage === "editing" ? "" : "display-none", t = this.searchConfiguration && this._updatedMapView ? this._getSearchConfig(this.searchConfiguration, this._updatedMapView) : void 0;
@@ -244,7 +248,7 @@ class N extends E {
244
248
  l.onloadend = () => r(l.result), l.onerror = n, this._inputImageForAI.value && l.readAsDataURL(i);
245
249
  });
246
250
  if (this.enablePhotoLocation) {
247
- const r = await R.gps(i);
251
+ const r = await T.gps(i);
248
252
  if (r?.longitude && r.latitude && this.mapView?.spatialReference) {
249
253
  const n = new U({
250
254
  longitude: r.longitude,
@@ -274,7 +278,7 @@ class N extends E {
274
278
  }
275
279
  this._currentPage = "loading", await this.init();
276
280
  } catch (i) {
277
- i.name === "AbortError" ? console.error("Aborted", i) : (this._analysisFailed = !0, console.error("Analyzing failed", i)), this._resetAIAnalysisInfo(), this.init();
281
+ i?.name === "AbortError" ? console.error("Aborted", i) : (this._analysisFailed = !0, console.error("Analyzing failed", i)), this._resetAIAnalysisInfo(), this.init();
278
282
  }
279
283
  }
280
284
  async _analyzeMessage() {
@@ -310,7 +314,7 @@ class N extends E {
310
314
  }
311
315
  this._currentPage = "loading", await this.init();
312
316
  } catch (r) {
313
- r.name === "AbortError" ? console.error("Aborted", r) : (this._analysisFailed = !0, console.error("Analyzing failed", r)), this._resetAIAnalysisInfo(), this.init();
317
+ r?.name === "AbortError" ? console.error("Aborted", r) : (this._analysisFailed = !0, console.error("Analyzing failed", r)), this._resetAIAnalysisInfo(), this.init();
314
318
  }
315
319
  }
316
320
  _resetAIAnalysisInfo() {
@@ -365,21 +369,19 @@ class N extends E {
365
369
  async _onEditorPropertyChange() {
366
370
  const e = this._editor.value;
367
371
  e?.state && (this._drawingHandler || (this._drawingHandler = f.watch(() => e.state, async (t) => {
368
- const i = this._editor.value?.activeWorkflow;
369
- t === "creating-features" && i?.formViewModel?.status === "not-loaded" && (this._mapViewContainer.value?.classList.replace("hide-map", "show-map"), this._selectedLayer && !this._selectedLayer.isTable && (this._currentPage = "drawing", this.progressStatus.emit(50), i?.sketchViewModel?.createGraphic && this._aiAnalysisInfo?.location && (await this._goToAndWaitForStationary({ center: this._aiAnalysisInfo.location }), this._selectedLayer.geometryType === "point" && await this._initializeSketchPoint(this._aiAnalysisInfo.location.clone()))), this.isMobile && this._adjustPanelContentHeight(), this._searchRef.value && await this._searchRef.value.setFocus()), t === "adding-attachment" || t === "editing-attachment" ? (this._addingAttachment = !0, this.editingAttachment.emit(!0)) : this._addingAttachment && (this.editingAttachment.emit(!1), this._addingAttachment = !1);
370
- })), this._featureFormHandler || (this._featureFormHandler = f.watch(() => e.activeWorkflow?.formViewModel?.status, (t) => {
371
- if (t === "loaded" && this._currentPage !== "editing")
372
- this._mapViewContainer.value?.classList?.replace("show-map", "hide-map"), setTimeout(() => {
373
- this._setFloorLevel(this.floorLevel), this._aiAnalysisInfo?.results && this._setAttributeValuesFromAIAnalysis();
374
- }, 500), !this.allowMultipleCreation && this._editor.value?.activeWorkflow && (this._editor.value.activeWorkflow.data.creationInfo.maxFeatures = 1), this._currentPage = "featureForm", this.progressStatus.emit(100), this.drawComplete.emit(!1);
375
- else if (t === "not-loaded" && this.allowMultipleCreation && this._currentPage !== "editing") {
376
- this._currentPage = "drawingMultipleFeatures";
377
- const i = this._updatedMapView, a = e.activeWorkflow;
378
- i && !i.activeTool && a?.sketchViewModel && this._selectedLayer?.geometryType && a.sketchViewModel.create(this._selectedLayer.geometryType);
372
+ const i = this._editor.value?.activeWorkflow, a = i?.formViewModel;
373
+ if (t === "creating-features" && (a?.status === "not-loaded" || a?.state === "disabled") && (this._mapViewContainer.value?.classList.replace("hide-map", "show-map"), this._selectedLayer && !this._selectedLayer.isTable && (this._currentPage = "drawing", this.progressStatus.emit(50), i?.sketchViewModel?.createGraphic && this._aiAnalysisInfo?.location && (await this._goToAndWaitForStationary({ center: this._aiAnalysisInfo.location }), this._selectedLayer.geometryType === "point" && await this._initializeSketchPoint(this._aiAnalysisInfo.location.clone()))), this.isMobile && this._adjustPanelContentHeight(), this._searchRef.value && await this._searchRef.value.setFocus()), t === "adding-attachment" || t === "editing-attachment" ? (this._addingAttachment = !0, this.editingAttachment.emit(!0)) : this._addingAttachment && (this.editingAttachment.emit(!1), this._addingAttachment = !1), !this._featureFormHandler) {
374
+ const r = this._editor.value?.activeWorkflow?.formViewModel;
375
+ this._featureFormHandler = f.watch(() => r?.status !== void 0 ? r?.status : r?.state, (n) => {
376
+ this._currentPage !== "editing" && (n === "loaded" || n === "ready") ? (this._mapViewContainer.value?.classList?.replace("show-map", "hide-map"), setTimeout(() => {
377
+ this._setFloorLevel(this.floorLevel), this._aiAnalysisInfo?.results && this._setAttributeValuesFromAIAnalysis();
378
+ }, 500), !this.allowMultipleCreation && this._editor.value?.activeWorkflow && (this._editor.value.activeWorkflow.data.creationInfo.maxFeatures = 1), this._currentPage = "featureForm", this.progressStatus.emit(100), this.drawComplete.emit(!1)) : this.allowMultipleCreation && this._currentPage !== "editing" && (n === "not-loaded" || n === "disabled") && (this._currentPage = "drawingMultipleFeatures");
379
+ });
379
380
  }
380
- })), this.allowMultipleCreation && e.activeWorkflow && (this._activeFeatureCountHandler || (this._activeFeatureCountHandler = f.watch(() => e.activeWorkflow?.data?.viewModel?.activeFeatureCount, (t) => {
381
- t === 0 && (this._currentPage = "drawing"), this.activeFeatureCountChange.emit(t);
382
- }))), await this.hideEditorsElements());
381
+ this.allowMultipleCreation && e.activeWorkflow && (this._activeFeatureCountHandler || (this._activeFeatureCountHandler = f.watch(() => e.activeWorkflow?.data?.viewModel?.activeFeatureCount, (s) => {
382
+ s === 0 && (this._currentPage = "drawing"), this.activeFeatureCountChange.emit(s);
383
+ })));
384
+ })), await this.hideEditorsElements());
383
385
  }
384
386
  _adjustPanelContentHeight() {
385
387
  setTimeout(() => {
@@ -425,7 +427,12 @@ class N extends E {
425
427
  state: "complete",
426
428
  toolEventInfo: null,
427
429
  type: "create"
428
- }), await t.sketchViewModel.update(a);
430
+ });
431
+ try {
432
+ await t.sketchViewModel.update(a);
433
+ } catch (s) {
434
+ console.error("Error updating sketch with new geometry", s), s?.name === "AbortError" && console.error("Aborted", s);
435
+ }
429
436
  }
430
437
  _getSearchConfig(e, t) {
431
438
  const i = e?.sources;
@@ -462,7 +469,7 @@ class N extends E {
462
469
  const a = t.fields.find((s) => s.name === i);
463
470
  if (a && !t?.formTemplate) {
464
471
  const r = this._editor.value?.activeWorkflow?.formViewModel;
465
- r && (await r.setValueForFieldName?.(a.name, e, r.features), a.editable = !1);
472
+ r.status === "loaded" ? await r.setValueForFieldName?.(a.name, e, r.features) : r.state === "ready" && r.setValue?.(a.name, e), a.editable = !1;
466
473
  } else if (t.formTemplate && this.formElements) {
467
474
  const s = new P({
468
475
  expression: `'${e}'`,
@@ -483,7 +490,7 @@ class N extends E {
483
490
  this._updatedMapView?.map.editableLayers.forEach((n) => {
484
491
  const l = this.formElements.orgElements, p = this.formElements.orgExpressionInfos, m = [...l];
485
492
  if (m.push(r), n.type === "feature") {
486
- const g = n, u = new $({
493
+ const g = n, u = new S({
487
494
  title: g?.formTemplate?.title,
488
495
  description: g?.formTemplate?.description,
489
496
  elements: m,
@@ -498,7 +505,7 @@ class N extends E {
498
505
  _setAttributeValuesFromAIAnalysis() {
499
506
  this._aiAnalysisInfo?.results && this._aiAnalysisInfo.results.forEach((e) => {
500
507
  const i = this._editor?.value?.activeWorkflow?.formViewModel;
501
- i && e.key && e.key !== _ && e.success && i.setValueForFieldName(e.key, e.value, i.features);
508
+ i && e.key && e.key !== _ && e.success && (i.status === "loaded" ? i.setValueForFieldName?.(e.key, e.value, i.features) : i.state === "ready" && i.setValue?.(e.key, e.value));
502
509
  });
503
510
  }
504
511
  _getImageExtractionData() {
@@ -538,7 +545,7 @@ class N extends E {
538
545
  async _geocodeExtractedAddress(e, t) {
539
546
  if (!(!this.mapView?.spatialReference || !e))
540
547
  try {
541
- const a = (await T.addressToLocations(t.url, {
548
+ const a = (await R.addressToLocations(t.url, {
542
549
  location: this.mapView.center,
543
550
  address: { [t.singleLineFieldName]: e },
544
551
  outSpatialReference: this.mapView.spatialReference,
@@ -2,19 +2,23 @@
2
2
  import { c as m } from "../../chunks/runtime.js";
3
3
  import { css as f, html as d } from "lit";
4
4
  import { u as p } from "../../chunks/useT9n.js";
5
- import { LitElement as b, createEvent as n, noShadowRoot as g, safeClassMap as w } from "@arcgis/lumina";
5
+ import { LitElement as g, createEvent as n, noShadowRoot as b, safeClassMap as w } from "@arcgis/lumina";
6
6
  import { createRef as y, ref as _ } from "lit-html/directives/ref.js";
7
7
  import * as h from "@arcgis/core/core/reactiveUtils.js";
8
8
  const v = f`@layer{:host{display:block}.hide-editor-toolbar .esri-editor__panel-toolbar,.display-none{display:none!important}.esri-editor__panel-content{padding-block:10px!important}.notice-msg{padding:10px;width:calc(100% - 20px)}}`;
9
- class k extends b {
9
+ class k extends g {
10
10
  constructor() {
11
11
  super(...arguments), this.customizeSubmit = !1, this.enableSnapping = !1, this.showGuidingMsg = !0, this._editorLoading = !1, this._translations = p({ name: "create-related-feature", blocking: !0 }), this._addingAttachment = !1, this._editor = y(), this._isSubmitBtnClicked = !1, this.success = n(), this.fail = n(), this.isActionPending = n(), this.formReady = n(), this._onEditorPropertyChange = () => {
12
- const e = this._editor.value;
13
- e && (h.watch(() => e.state, (t) => {
14
- t === "adding-attachment" || t === "editing-attachment" ? (this._addingAttachment = !0, this.isActionPending.emit(!0)) : this._addingAttachment && (this.isActionPending.emit(!1), this._addingAttachment = !1);
15
- }), h.watch(() => e.activeWorkflow?.formViewModel?.status, (t) => {
16
- t === "loaded" && this.formReady.emit();
17
- }));
12
+ const t = this._editor.value;
13
+ if (t) {
14
+ h.watch(() => t.state, (e) => {
15
+ e === "adding-attachment" || e === "editing-attachment" ? (this._addingAttachment = !0, this.isActionPending.emit(!0)) : this._addingAttachment && (this.isActionPending.emit(!1), this._addingAttachment = !1);
16
+ });
17
+ const i = t.activeWorkflow?.formViewModel;
18
+ h.watch(() => i?.status !== "undefined" ? i.status : i.state, (e) => {
19
+ (e === "loaded" || e === "ready") && this.formReady.emit();
20
+ });
21
+ }
18
22
  };
19
23
  }
20
24
  static {
@@ -24,14 +28,14 @@ class k extends b {
24
28
  this.styles = v;
25
29
  }
26
30
  static {
27
- this.shadowRootOptions = g;
31
+ this.shadowRootOptions = b;
28
32
  }
29
33
  async submit() {
30
34
  this._editor.value?.activeWorkflow && (this._isSubmitBtnClicked = !0, this._editor.value.activeWorkflow?.formViewModel?.submit());
31
35
  }
32
36
  render() {
33
- const e = this._editorLoading ? "" : "display-none";
34
- return d`${this.showGuidingMsg && d`<calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.provideDetailsMsg}</div></calcite-notice>` || ""}<calcite-loader class=${w(e)} .label=${this._translations.loading} scale=s></calcite-loader>${this.mapView && this._getEditor() || ""}`;
37
+ const t = this._editorLoading ? "" : "display-none";
38
+ return d`${this.showGuidingMsg && d`<calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.provideDetailsMsg}</div></calcite-notice>` || ""}<calcite-loader class=${w(t)} .label=${this._translations.loading} scale=s></calcite-loader>${this.mapView && this._getEditor() || ""}`;
35
39
  }
36
40
  disconnectedCallback() {
37
41
  super.disconnectedCallback(), this._editor.value && this._editor.value.destroy();
@@ -40,16 +44,16 @@ class k extends b {
40
44
  return d`<arcgis-editor .view=${this.mapView} hide-edit-features-section .hideSettingsMenu=${!this.enableSnapping} hide-sketch .hideSnappingControlsElementsEnabledToggle=${!this.enableSnapping} @arcgisReady=${this._startCreate} @arcgisPropertyChange=${this._onEditorPropertyChange} ${_(this._editor)}></arcgis-editor>`;
41
45
  }
42
46
  async _startCreate() {
43
- const e = this.selectedFeature?.layer, t = this.table;
44
- if (e.relationships && t?.relationships && this.selectedFeature && t.templates) {
45
- const i = e.relationships[0], s = t.relationships.find((o) => e.layerId === o.relatedTableId), a = Number(this.selectedFeature.getObjectId());
47
+ const t = this.selectedFeature?.layer, i = this.table;
48
+ if (t.relationships && i?.relationships && this.selectedFeature && i.templates) {
49
+ const e = t.relationships[0], s = i.relationships.find((o) => t.layerId === o.relatedTableId), a = Number(this.selectedFeature.getObjectId());
46
50
  if (!Number.isNaN(a) && s) {
47
- const r = (await e.queryFeatures({
51
+ const r = (await t.queryFeatures({
48
52
  objectIds: [a],
49
- outFields: [e.objectIdField, i.keyField]
50
- })).features[0], l = t.templates[0], u = {
51
- attributeOverrides: this.makeAttributesForRelatedFeature(r, i, s),
52
- layer: t,
53
+ outFields: [t.objectIdField, e.keyField]
54
+ })).features[0], l = i.templates[0], u = {
55
+ attributeOverrides: this.makeAttributesForRelatedFeature(r, e, s),
56
+ layer: i,
53
57
  template: l
54
58
  };
55
59
  await this._editor.value?.startCreateFeaturesWorkflowAtFeatureCreation(u), await this.hideEditorsElements();
@@ -61,50 +65,50 @@ class k extends b {
61
65
  async hideEditorsElements() {
62
66
  if (!this.customizeSubmit)
63
67
  return;
64
- await this.timeout(700), this.el.querySelector("arcgis-editor")?.shadowRoot?.querySelectorAll("calcite-flow-item")?.forEach((t) => {
65
- const i = t.shadowRoot?.querySelector("calcite-panel")?.shadowRoot?.querySelector("article");
66
- i?.querySelector("header")?.setAttribute("style", "display: none"), i?.querySelector("footer")?.setAttribute("style", "display: none");
68
+ await this.timeout(700), this.el.querySelector("arcgis-editor")?.shadowRoot?.querySelectorAll("calcite-flow-item")?.forEach((i) => {
69
+ const e = i.shadowRoot?.querySelector("calcite-panel")?.shadowRoot?.querySelector("article");
70
+ e?.querySelector("header")?.setAttribute("style", "display: none"), e?.querySelector("footer")?.setAttribute("style", "display: none");
67
71
  });
68
72
  }
69
- makeAttributesForRelatedFeature(e, t, i) {
70
- const s = t.keyField;
73
+ makeAttributesForRelatedFeature(t, i, e) {
74
+ const s = i.keyField;
71
75
  let a;
72
- e.attributes.hasOwnProperty(s) ? a = e.getAttribute(s) : e.attributes.hasOwnProperty(s.toLowerCase()) ? a = e.getAttribute(s.toLowerCase()) : e.attributes.hasOwnProperty(s.toUpperCase()) && (a = e.getAttribute(s.toUpperCase()));
73
- let o = i.keyField;
76
+ t.attributes.hasOwnProperty(s) ? a = t.getAttribute(s) : t.attributes.hasOwnProperty(s.toLowerCase()) ? a = t.getAttribute(s.toLowerCase()) : t.attributes.hasOwnProperty(s.toUpperCase()) && (a = t.getAttribute(s.toUpperCase()));
77
+ let o = e.keyField;
74
78
  const r = this.table?.fields.find((l) => l.name.toLocaleLowerCase() === o.toLocaleLowerCase());
75
79
  if (r)
76
80
  return o = r.name, {
77
81
  [o]: a
78
82
  };
79
83
  }
80
- async submitted(e) {
81
- if (e.results[0]?.invalidFields.length || e.results[0]?.invalidAttachmentElementIds.length) {
84
+ async submitted(t) {
85
+ if (t?.invalid?.length || t?.results?.[0]?.invalidFields?.length || t?.results?.[0]?.invalidAttachmentElementIds?.length) {
82
86
  this._isSubmitBtnClicked = !1;
83
87
  return;
84
88
  }
85
- if (this._isSubmitBtnClicked) {
89
+ if (t?.valid?.length ? t.valid.length && this._isSubmitBtnClicked : this._isSubmitBtnClicked) {
86
90
  this._isSubmitBtnClicked = !1;
87
91
  try {
88
92
  if (this._editor.value?.activeWorkflow) {
89
93
  await this._editor.value.activeWorkflow.commit();
90
- const t = this._editor.value.activeWorkflow.data?.viewModel?.failures;
91
- if (t?.length) {
92
- t.some((i) => {
93
- if (i.error)
94
- throw i.error;
94
+ const e = this._editor.value.activeWorkflow?.failures?.length ? this._editor.value.activeWorkflow.failures : this._editor.value.activeWorkflow?.data?.viewModel?.failures;
95
+ if (e?.length) {
96
+ e.some((s) => {
97
+ if (s.error)
98
+ throw s.error;
95
99
  });
96
100
  return;
97
101
  }
98
102
  }
99
- } catch (t) {
100
- this.fail.emit(t);
103
+ } catch (e) {
104
+ this.fail.emit(e);
101
105
  return;
102
106
  }
103
107
  this.success.emit();
104
108
  }
105
109
  }
106
- async timeout(e) {
107
- return await new Promise((t) => setTimeout(t, e));
110
+ async timeout(t) {
111
+ return await new Promise((i) => setTimeout(i, t));
108
112
  }
109
113
  }
110
114
  m("create-related-feature", k);
@@ -5,7 +5,7 @@ import { defineCustomElements as v } from "@arcgis/instant-apps-components/dist/
5
5
  import { u as C } from "../../chunks/useT9n.js";
6
6
  import { css as I, html as s, nothing as L } from "lit";
7
7
  import { createRef as c, ref as u } from "lit-html/directives/ref.js";
8
- import { LitElement as M, createEvent as _, noShadowRoot as x, safeClassMap as f, safeStyleMap as T } from "@arcgis/lumina";
8
+ import { LitElement as M, createEvent as _, noShadowRoot as x, safeClassMap as b, safeStyleMap as T } from "@arcgis/lumina";
9
9
  import { setupViewFocusKeyboardWatcher as S } from "templates-common-library/functionality/keyboardUtils";
10
10
  const F = I`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-surface-2)}.padding-1-2{padding:.5rem}.display-flex{display:flex}.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}.z-index-2{z-index:2!important}.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-color-border-3)}.border-top{border-top:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.position-absolute{position:absolute}.position-sticky{position:sticky}.height-50{height:50%}.top-51{top:51px}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-51{height:calc(100% - 51px)}.display-none{display:none!important}.adjusted-height-50_25{height:calc(50% + 25px)}.display-grid{display:grid}.padding-inline-start-75{padding-inline-start:.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button,.esri-floor-filter__level-button,.esri-floor-filter__browse-button{width:40px!important;height:40px!important}.position-absolute-0{position:absolute;inset:0}.visibility-hidden{visibility:hidden;height:0px}.border-width-0{border-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;margin:100px 0;z-index:1}.left-0{left:0}.right-0{right:0}.floating-container .floating-button{box-shadow:0 10px 25px #5c5d5e99;-webkit-transform:translatey(5px);transform:translatey(5px);-webkit-transition:all .3s;transition:all .3s}.z-index-0{z-index:0!important}.z-index-1{z-index:1!important}.filter-content-space{--calcite-dialog-content-space: 0px}.background-dark{background:var(--calcite-color-surface-1)}.filter-extent-container{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.filter-modal-buttons{display:flex;padding:12px;gap:10px}.filter-extent-message{align-items:center;display:flex;gap:5px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`;
11
11
  class V extends M {
@@ -83,7 +83,7 @@ class V extends M {
83
83
  }
84
84
  render() {
85
85
  const e = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "", t = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light", i = this._translations.invalidWebMapMsg?.replace("{{web_map}}", this._mapInfo?.name || "");
86
- return s`${this._showInvalidMapAlert && s`<calcite-alert auto-close class=${f(t)} icon=check-circle kind=danger label @calciteAlertClose=${() => {
86
+ return s`${this._showInvalidMapAlert && s`<calcite-alert auto-close class=${b(t)} icon=check-circle kind=danger label @calciteAlertClose=${() => {
87
87
  this._showInvalidMapAlert = !1;
88
88
  }} open placement=top><div slot=message>${i}</div></calcite-alert>` || ""}<calcite-shell class="position-relative"><calcite-panel class=${`width-full height-full ${e}`} .loading=${this._isLoading}>${this._getBody(this._layoutMode, this._panelOpen, this._hideTable)}</calcite-panel>${this._getFooter()}</calcite-shell>${this._filterModal()}${!this._isMobile && this._deleteModal() || ""}`;
89
89
  }
@@ -172,8 +172,8 @@ class V extends M {
172
172
  }} .pasteEnabled=${this._pasteEnabled} .selectedFeaturesIds=${this._layerTable.value?.selectedIds} .selectingFeatureFromMap=${this.appLayout === "mapView"} .showCopyPasteActions=${this._showCopyPasteActions} .showSketchWidgets=${l?.geometryType !== "point"} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected}></card-manager></div>`;
173
173
  }
174
174
  _getTable(e, t, i) {
175
- const a = this.appLayout === "mapView", l = this.appLayout === "tableView", o = i && this._isMobile ? "visibility-hidden" : a ? "display-none" : "", r = a ? "height-full width-full z-index-0" : "display-none", h = this._getTableSizeClass(e, t), n = e === "HORIZONTAL" ? "horizontal" : "vertical", d = e === "HORIZONTAL" ? "header" : "panel-start", p = this.defaultWebmap && this.defaultLayer, m = this._isMobile ? "border-top" : "", b = this.defaultGlobalId ? this.defaultGlobalId?.indexOf(",") > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId] : void 0, g = this.defaultOid ? this.defaultOid?.indexOf(",") > -1 ? this.defaultOid.split(",").map((y) => Number.parseInt(y, 10)) : [Number.parseInt(this.defaultOid, 10)] : void 0;
176
- return s`<calcite-shell class=${`${h} ${m} border-bottom z-index-1`}>${this._isMobile ? void 0 : s`<calcite-action-bar class="border-sides" expand-disabled .layout=${n} slot=${d ?? L}>${this.getActions(e, t)}</calcite-action-bar>`}<div class=${`width-full height-full position-relative z-index-0 ${o}`}><layer-table .appLayout=${this.appLayout} .defaultGlobalId=${p ? b : void 0} .defaultLayerId=${p ? this.defaultLayer : ""} .defaultOid=${p && !b ? g : void 0} .enableAutoRefresh=${this.enableAutoRefresh} .enableCSV=${this.enableCSV} .enableColumnReorder=${this.enableColumnReorder} .enableInlineEdit=${this?._mapInfo?.enableInlineEdit} .enableTableAutosave=${this._mapInfo?.enableTableAutosave !== void 0 ? this._mapInfo?.enableTableAutosave : !0} .enableShare=${this.enableShare} .featureSelectionMode=${this.featureSelectionMode} .honorMapFieldSettings=${this.honorMapFieldSettings} .isMobile=${this._isMobile} .mapHidden=${l} .mapInfo=${this._mapInfo} .mapView=${this?._mapView} .pasteEnabled=${this._pasteEnabled} .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showNewestFirst=${this.showNewestFirst} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected} .zoomToScale=${this.zoomToScale} .showCopyPasteActions=${this._showCopyPasteActions} .layerIds=${this._layerIds} ${u(this._layerTable)}></layer-table></div><div class=${f(r)} id=full-map-view></div></calcite-shell>`;
175
+ const a = this.appLayout === "mapView", l = this.appLayout === "tableView", o = i && this._isMobile ? "visibility-hidden" : a ? "display-none" : "", r = a ? "height-full width-full z-index-0" : "display-none", h = this._getTableSizeClass(e, t), n = e === "HORIZONTAL" ? "horizontal" : "vertical", d = e === "HORIZONTAL" ? "header" : "panel-start", p = this.defaultWebmap && this.defaultLayer, m = this._isMobile ? "border-top" : "", f = this.defaultGlobalId ? this.defaultGlobalId?.indexOf(",") > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId] : void 0, g = this.defaultOid ? this.defaultOid?.indexOf(",") > -1 ? this.defaultOid.split(",").map((y) => Number.parseInt(y, 10)) : [Number.parseInt(this.defaultOid, 10)] : void 0;
176
+ return s`<calcite-shell class=${`${h} ${m} border-bottom z-index-1`}>${this._isMobile ? void 0 : s`<calcite-action-bar class="border-sides" expand-disabled .layout=${n} slot=${d ?? L}>${this.getActions(e, t)}</calcite-action-bar>`}<div class=${`width-full height-full position-relative z-index-0 ${o}`}><layer-table .appLayout=${this.appLayout} .defaultGlobalId=${p ? f : void 0} .defaultLayerId=${p ? this.defaultLayer : ""} .defaultOid=${p && !f ? g : void 0} .enableAutoRefresh=${this.enableAutoRefresh} .enableCSV=${this.enableCSV} .enableColumnReorder=${this.enableColumnReorder} .enableInlineEdit=${this?._mapInfo?.enableInlineEdit} .enableTableAutosave=${this._mapInfo?.enableTableAutosave !== void 0 ? this._mapInfo?.enableTableAutosave : !0} .enableShare=${this.enableShare} .featureSelectionMode=${this.featureSelectionMode} .honorMapFieldSettings=${this.honorMapFieldSettings} .isMobile=${this._isMobile} .mapHidden=${l} .mapInfo=${this._mapInfo} .mapView=${this?._mapView} .pasteEnabled=${this._pasteEnabled} .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showNewestFirst=${this.showNewestFirst} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected} .zoomToScale=${this.zoomToScale} .showCopyPasteActions=${this._showCopyPasteActions} .layerIds=${this._layerIds} ${u(this._layerTable)}></layer-table></div><div class=${b(r)} id=full-map-view></div></calcite-shell>`;
177
177
  }
178
178
  getActions(e, t) {
179
179
  const i = this._getDividerIcon(e, t), a = t ? this._translations.close : this._translations.open, l = "toggle-layout";
@@ -191,7 +191,7 @@ class V extends M {
191
191
  }
192
192
  _mapExtentFilter() {
193
193
  const e = this._layerExpressions?.length === 0;
194
- return s`<calcite-panel><div><calcite-block class=${f(this.theme === "dark" ? "background-dark" : "")} heading menu-placement=bottom-end open><div class="filter-extent-container"><div class="filter-extent-message"><span>${this._translations.filterByExtentMsg}</span><calcite-icon icon=information id=filter-message-info scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top reference-element=filter-message-info>${this._translations.filterByExtentTooltipMsg}</calcite-tooltip></div><calcite-switch .checked=${this._mapExtentFilterChecked} @calciteSwitchChange=${(t) => {
194
+ return s`<calcite-panel><div><calcite-block class=${b(this.theme === "dark" ? "background-dark" : "")} heading menu-placement=bottom-end open><div class="filter-extent-container"><div class="filter-extent-message"><span>${this._translations.filterByExtentMsg}</span><calcite-icon icon=information id=filter-message-info scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top reference-element=filter-message-info>${this._translations.filterByExtentTooltipMsg}</calcite-tooltip></div><calcite-switch .checked=${this._mapExtentFilterChecked} @calciteSwitchChange=${(t) => {
195
195
  const a = !!(t.target.checked || this._filterList.value?.filterCount && this._filterList.value?.filterCount > 0);
196
196
  this._layerTable.value && this._layerTable.value?.filterUpdate(a, t.target.checked), this._mapCard.value && this._mapCard.value?.updateFilterState(a), this._mapExtentFilterChecked = t.target.checked;
197
197
  }} scale=m></calcite-switch></div></calcite-block>${e && s`<div class="filter-modal-buttons" slot=footer><calcite-button appearance=outline @click=${this._handleFilterListReset} width=full>${this._translations.Resetfilter}</calcite-button><calcite-button @click=${this._closeFilter} width=full>${this._translations.close}</calcite-button></div>` || ""}</div></calcite-panel>`;
@@ -218,7 +218,7 @@ class V extends M {
218
218
  this._filterOpen = !this._filterOpen;
219
219
  }
220
220
  _handleFilterListReset() {
221
- this._mapExtentFilterChecked = !1, this._mapCard.value && this._mapCard.value.resetFilter(), this._layerTable.value && this._layerTable.value._filterActive && this._layerTable.value.filterReset();
221
+ this._mapExtentFilterChecked = !1, this._mapCard.value && this._mapCard.value.resetFilter(), this._layerTable.value && this._layerTable.value?.isFilterActive() && this._layerTable.value.filterReset();
222
222
  }
223
223
  async _closeFilter() {
224
224
  this._filterOpen && (this._filterOpen = !1, this._layerTable.value && this._layerTable.value.closeFilter());
@@ -210,6 +210,8 @@ export abstract class LayerTable extends LitElement {
210
210
  * @param keepTableUpdatingOnMapExtentChange
211
211
  */
212
212
  filterUpdate(filterActive: boolean, keepTableUpdatingOnMapExtentChange?: boolean): Promise<void>;
213
+ /** Returns true when any table filter is active */
214
+ isFilterActive(): boolean;
213
215
  /** refresh the feature table */
214
216
  refresh(): Promise<void>;
215
217
  /**
@@ -14,8 +14,8 @@ import $ from "@arcgis/core/widgets/FeatureTable.js";
14
14
  import * as p from "@arcgis/core/core/reactiveUtils.js";
15
15
  import D from "@arcgis/core/rest/support/RelationshipQuery.js";
16
16
  import w from "@arcgis/core/widgets/FeatureTable/support/TableTemplate.js";
17
- const M = C`@layer{:host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.display-none{display:none}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51-px{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=rtl] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-surface-1)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none!important}vaadin-grid-cell-content{font-size:14px!important;color:var(--calcite-color-text-3)!important}.absolute-right{position:absolute;right:0;left:unset}html[dir=rtl] .absolute-right{left:0;right:unset}.disabled{cursor:default!important;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.actions-end{height:50px!important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-dialog-content-space: 0}.esri-feature-table__table-container{height:100%}.search-container{background-color:var(--calcite-color-surface-2)!important}.search{--calcite-color-border-input: var(--calcite-color-border-3);width:60%;padding:10px}.delete-red{--calcite-icon-color: var(--calcite-color-status-danger);--calcite-color-text-1: var(--calcite-color-status-danger);--calcite-color-text-3: var(--calcite-color-status-danger)}.label-override{white-space:nowrap}.padding-start-1-4{padding-inline-start:.5rem}.panel-header-override{--calcite-panel-header-content-space: 0px}.danger-label-color{color:var(--calcite-color-status-danger)}.danger-icon-color{--calcite-icon-color: var(--calcite-color-status-danger)}.width-51{width:51px}.height-51{height:51px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`;
18
- class V extends A {
17
+ const V = C`@layer{:host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.display-none{display:none}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51-px{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=rtl] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-surface-1)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none!important}vaadin-grid-cell-content{font-size:14px!important;color:var(--calcite-color-text-3)!important}.absolute-right{position:absolute;right:0;left:unset}html[dir=rtl] .absolute-right{left:0;right:unset}.disabled{cursor:default!important;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.actions-end{height:50px!important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-dialog-content-space: 0}.esri-feature-table__table-container{height:100%}.search-container{background-color:var(--calcite-color-surface-2)!important}.search{--calcite-color-border-input: var(--calcite-color-border-3);width:60%;padding:10px}.delete-red{--calcite-icon-color: var(--calcite-color-status-danger);--calcite-color-text-1: var(--calcite-color-status-danger);--calcite-color-text-3: var(--calcite-color-status-danger)}.label-override{white-space:nowrap}.padding-start-1-4{padding-inline-start:.5rem}.panel-header-override{--calcite-panel-header-content-space: 0px}.danger-label-color{color:var(--calcite-color-status-danger)}.danger-icon-color{--calcite-icon-color: var(--calcite-color-status-danger)}.width-51{width:51px}.height-51{height:51px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`;
18
+ class M extends A {
19
19
  constructor() {
20
20
  super(), this.defaultGlobalId = [], this.defaultLayerId = "", this.defaultOid = [], this.enableAutoRefresh = !1, this.enableColumnReorder = !0, this.enableCSV = !1, this.enableInlineEdit = !1, this.enableShare = !1, this.enableTableAutosave = !0, this.featureSelectionMode = "multiple", this.selectedRelatedIds = [], this.honorMapFieldSettings = !1, this.isMobile = !1, this.mapHidden = !1, this.showOnlyUpdatableLayers = !1, this.selectedIds = [], this.shareIncludeEmbed = !1, this.shareIncludeSocial = !1, this.showNewestFirst = !1, this.zoomAndScrollToSelected = !1, this.pasteEnabled = !1, this.showCopyPasteActions = !1, this.layerIds = [], this._allIds = [], this._configLayerOrderDefined = !1, this._csvExporting = !1, this._fetchingData = !1, this._hideTable = !1, this._filterActive = !1, this._selectAllActive = !1, this._showHideOpen = !1, this._showOnlySelected = !1, this._toolInfos = [], this._translations = O({ name: "layer-table", blocking: !0 }), this._fullTextSearchInfo = [], this._searchPlaceHolder = "", this._size = 0, this._queryingData = !1, this._editEnabled = !1, this._enabledLayerIds = [], this._defaultGlobalIdHonored = !1, this._defaultOidHonored = !1, this._deleteEnabled = !1, this._floorExpression = "", this._floorField = "", this._floorLevel = "", this._loaded = !1, this._shareNode = y(), this._toolbar = y(), this._searchExpression = "", this._skipEditCheck = !1, this._tempSelectedIds = [], this._outOFExtentOids = [], this._shouldUpdateTableOnExtentChange = !0, this._creatingFeature = !1, this._searchNode = y(), this._layerEditsHandles = [], this._pastedFeaturesIds = [], this._shouldSelectCreatedFeatures = !1, this.columnReorder = o(), this.featureSelectionChange = o(), this.toggleFilter = o(), this.showDelete = o(), this.relatedRecordToggled = o(), this.editMultipleFeatures = o(), this.copyFeatures = o(), this.pasteFeatures = o(), this.featuresAdded = o(), this.initCreateComponent = o(), this.requestLayerSelectionChange = o(), this.beforeFeatureSelectionChange = o(), this.continueEditing = o(), this.createFeatureEditorInitialized = (e) => {
21
21
  this._createFeatureEditor = e.detail;
@@ -27,7 +27,7 @@ class V extends A {
27
27
  this.properties = { appLayout: 1, defaultGlobalId: 0, defaultLayerId: 1, defaultOid: 0, enableAutoRefresh: 5, enableColumnReorder: 5, enableCSV: 5, enableInlineEdit: 5, enableShare: 5, enableTableAutosave: 5, featureSelectionMode: 1, selectedRelatedIds: 0, honorMapFieldSettings: 5, isMobile: 5, mapHidden: 5, mapInfo: 0, mapView: 0, showOnlyUpdatableLayers: 5, selectedIds: 0, shareIncludeEmbed: 5, shareIncludeSocial: 5, showNewestFirst: 5, zoomAndScrollToSelected: 5, zoomToScale: 9, pasteEnabled: 5, showCopyPasteActions: 5, layerIds: 0, _allIds: 16, _configLayerOrderDefined: 16, _csvExporting: 16, _fetchingData: 16, _hideTable: 16, _filterActive: 16, _layer: 16, _selectAllActive: 16, _showHideOpen: 16, _showOnlySelected: 16, _toolInfos: 16, _translations: 16, _fullTextSearchInfo: 16, _searchPlaceHolder: 16, _size: 16, _queryingData: 16 };
28
28
  }
29
29
  static {
30
- this.styles = M;
30
+ this.styles = V;
31
31
  }
32
32
  static {
33
33
  this.shadowRootOptions = H;
@@ -115,6 +115,9 @@ class V extends A {
115
115
  async filterUpdate(e, t) {
116
116
  await this._handleFilterUpdate(e), t ? (this._shouldUpdateTableOnExtentChange = !0, this._handleTableOnMapExtent()) : t === !1 && (this._table && (this._table.filterGeometry = void 0), this._filterByExtentHandle?.remove(), this._filterByExtentHandle = void 0, await this._updateAllIds());
117
117
  }
118
+ isFilterActive() {
119
+ return this._filterActive;
120
+ }
118
121
  async validateTableUpdate(e) {
119
122
  this._shouldUpdateTableOnExtentChange = e;
120
123
  }
@@ -234,7 +237,7 @@ class V extends A {
234
237
  const a = this._layer?.createQuery();
235
238
  a.fullText = this._fullTextSearchInfo, s = this._layer ? await this._layer.queryObjectIds(a) : [], i && t?.length && (s = s.filter((l) => t.includes(l))), await this._updateSearchDefinitionExpression(s?.length ? s : [-1]);
236
239
  }
237
- i && s?.length && (this._showOnlySelected = !0, this._table?.highlightIds.addMany(s.reverse())), this._selectedLayerView ? await p.once(() => !this._selectedLayerView.updating) : await new Promise((a) => setTimeout(a, 800)), this._allIds = await this.queryAllIds(), this.selectedIds = this.selectedIds.filter((a) => this._allIds.indexOf(a) > -1), await this._refresh(!1, !0);
240
+ i && s?.length && (this._showOnlySelected = !0, this._table?.highlightIds.addMany(s.reverse())), this._selectedLayerView && this._selectedLayerView.updating ? await p.once(() => !this._selectedLayerView.updating) : await new Promise((a) => setTimeout(a, 800)), this._allIds = await this.queryAllIds(), this.selectedIds = this.selectedIds.filter((a) => this._allIds.indexOf(a) > -1), await this._refresh(!1, !0);
238
241
  }
239
242
  _clearSearchDefinitionExpression() {
240
243
  const e = this._layer?.definitionExpression;
@@ -629,7 +632,7 @@ class V extends A {
629
632
  tempHighlightOnHover(e) {
630
633
  if (this._removeTempHighlight(), this._selectedLayerView) {
631
634
  const t = e.feature;
632
- this._temporaryFeatureHandle = this._selectedLayerView?.highlight([t], { name: "temporary" });
635
+ t && (this._temporaryFeatureHandle = this._selectedLayerView?.highlight([t], { name: "temporary" }));
633
636
  }
634
637
  }
635
638
  _removeTempHighlight() {
@@ -952,7 +955,7 @@ class V extends A {
952
955
  }));
953
956
  }
954
957
  }
955
- E("layer-table", V);
958
+ E("layer-table", M);
956
959
  export {
957
- V as LayerTable
960
+ M as LayerTable
958
961
  };