@esri/solutions-components 5.1.9 → 5.1.11
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.
- package/dist/cdn/{43YKRNKI.js → 2AH3XLSP.js} +1 -1
- package/dist/cdn/{JNOGAEXB.js → 2BTYCY73.js} +1 -1
- package/dist/cdn/{J5DI6W2N.js → 2GTM4OM5.js} +1 -1
- package/dist/cdn/{JM43IA64.js → 2MNK2M2M.js} +1 -1
- package/dist/cdn/{O2ZMLQLY.js → 2PTMXOMF.js} +1 -1
- package/dist/cdn/2Q4QB7TO.js +2 -0
- package/dist/cdn/{YHUNM3ES.js → 2TOUVQE2.js} +1 -1
- package/dist/cdn/{T3X5BVYI.js → 3BNJMNCD.js} +1 -1
- package/dist/cdn/{6KHHA7ET.js → 3J3AZRUR.js} +1 -1
- package/dist/cdn/{QR7AGTVX.js → 3J64FXVL.js} +1 -1
- package/dist/cdn/{UXJNVZH3.js → 3Q6BLEUW.js} +1 -1
- package/dist/cdn/{QFWRIUYF.js → 3ZNW2HIP.js} +1 -1
- package/dist/cdn/{52J62T7V.js → 4AONNWHB.js} +1 -1
- package/dist/cdn/{L5L3TDXI.js → 4QVVEETV.js} +1 -1
- package/dist/cdn/{4V7HH2XL.js → 5C7DC2SL.js} +2 -2
- package/dist/cdn/{EZ22DA3V.js → 5GWQZCK5.js} +1 -1
- package/dist/cdn/{2YFWT6SU.js → 5KYL2NR6.js} +1 -1
- package/dist/cdn/{K6GIAY74.js → 5OHUBPLI.js} +1 -1
- package/dist/cdn/{VTZ2FBGR.js → 5UOHLES7.js} +1 -1
- package/dist/cdn/{5NE2PG7T.js → 5Z4SUP7T.js} +1 -1
- package/dist/cdn/{HWCK2XEE.js → 6CHMTQ7X.js} +1 -1
- package/dist/cdn/{C5KDPY7R.js → 6DJOSQ7E.js} +1 -1
- package/dist/cdn/{3Z7PSG2Z.js → 6JW66HJW.js} +1 -1
- package/dist/cdn/{YQAOQ4I5.js → 6OEAB4NL.js} +1 -1
- package/dist/cdn/6OHUYDZC.js +2 -0
- package/dist/cdn/{LGQ44ECD.js → 6PS3XLRH.js} +1 -1
- package/dist/cdn/{QZMH4W4Z.js → 6R6R4TFH.js} +1 -1
- package/dist/cdn/{TD7SFGUM.js → 732AAGGJ.js} +1 -1
- package/dist/cdn/{57T6QZVX.js → 7BC75SVD.js} +1 -1
- package/dist/cdn/{TJITWU6N.js → 7HYQYHMK.js} +1 -1
- package/dist/cdn/{7QCABQZ6.js → 7SZGYR22.js} +1 -1
- package/dist/cdn/{IPC2CPKX.js → 7TAWNPBZ.js} +1 -1
- package/dist/cdn/7YPSCUDA.js +2 -0
- package/dist/cdn/{CQGQN2TV.js → ABPDYKOZ.js} +1 -1
- package/dist/cdn/ACTGIDKO.js +4 -0
- package/dist/cdn/{YKTUCUBB.js → AK6SGWFY.js} +1 -1
- package/dist/cdn/{XUB3XMNL.js → AKPQCVFU.js} +1 -1
- package/dist/cdn/{V47LDU4W.js → B56TSN42.js} +1 -1
- package/dist/cdn/{OXBSR2GJ.js → BAAVBUK6.js} +1 -1
- package/dist/cdn/{JPSRN4DX.js → BG7E5RJ7.js} +1 -1
- package/dist/cdn/{75TUYUTC.js → BOTOPHKQ.js} +1 -1
- package/dist/cdn/{2LZPT5IU.js → C5NGEPGX.js} +1 -1
- package/dist/cdn/{YM4U4HSN.js → CMCDRXVO.js} +1 -1
- package/dist/cdn/COSMV4TW.js +2 -0
- package/dist/cdn/CTCWANBA.js +2 -0
- package/dist/cdn/{SHQFXQEI.js → D53I5PX3.js} +1 -1
- package/dist/cdn/{ICF6TK25.js → D7BCH5JY.js} +1 -1
- package/dist/cdn/{OOAEKJVZ.js → DBJOFIGI.js} +1 -1
- package/dist/cdn/{ANULNCMK.js → DBRM6W63.js} +1 -1
- package/dist/cdn/{F5LJOYCE.js → DC4XE3RK.js} +1 -1
- package/dist/cdn/{ZZDKPDBC.js → DCKMZWHU.js} +1 -1
- package/dist/cdn/{3HJQVMVA.js → E2LHNWJK.js} +1 -1
- package/dist/cdn/{BSTYVL47.js → EACWQKLG.js} +1 -1
- package/dist/cdn/EXPBVOCZ.js +2 -0
- package/dist/cdn/{I5RH3SMR.js → FETSFCBL.js} +1 -1
- package/dist/cdn/{ENZHHOJ7.js → FM47F4IP.js} +1 -1
- package/dist/cdn/{S457JO4S.js → FY72EUAV.js} +1 -1
- package/dist/cdn/{CH5MVYSV.js → GCSG5D4A.js} +1 -1
- package/dist/cdn/{GCMCJCKC.js → GDBULXEH.js} +1 -1
- package/dist/cdn/{MGVCKIJR.js → GG6W2UKU.js} +1 -1
- package/dist/cdn/GMBKLZ7L.js +2 -0
- package/dist/cdn/{TQNUZXY7.js → GNE54PDA.js} +1 -1
- package/dist/cdn/{LWFCQVAF.js → GSEA4VV7.js} +1 -1
- package/dist/cdn/{7UIZ4CHO.js → H3NTIWHD.js} +1 -1
- package/dist/cdn/{M5KRKVWX.js → HXRZFGOY.js} +1 -1
- package/dist/cdn/{VISPGPA4.js → IYMK3E6M.js} +1 -1
- package/dist/cdn/{SNS7ULJL.js → JMYTCCTQ.js} +1 -1
- package/dist/cdn/{ZLE4IOVJ.js → JSHNQPGP.js} +1 -1
- package/dist/cdn/{EIKMNNKT.js → JYU3PWGS.js} +1 -1
- package/dist/cdn/{LMDZGYKJ.js → JZZLKETM.js} +1 -1
- package/dist/cdn/{LIJMT47Z.js → K4LUU652.js} +1 -1
- package/dist/cdn/{E3HDJT34.js → KMN7UYCS.js} +1 -1
- package/dist/cdn/{ED6AH2PK.js → KOIR626Q.js} +1 -1
- package/dist/cdn/{HGS2FKKH.js → KPD6SAOC.js} +1 -1
- package/dist/cdn/L3DICS7J.js +2 -0
- package/dist/cdn/{L3562WZD.js → LEF6LYRH.js} +1 -1
- package/dist/cdn/{4NCCPMS4.js → LFBK5LL3.js} +1 -1
- package/dist/cdn/{Y6F2Q2IG.js → LT6TNRF6.js} +1 -1
- package/dist/cdn/{S746S2MB.js → LTOKLDCW.js} +1 -1
- package/dist/cdn/{IBCMFLIE.js → M2RKXX76.js} +1 -1
- package/dist/cdn/{DP4OPIT5.js → M6KMGWHY.js} +112 -112
- package/dist/cdn/{5OQZPASB.js → MDBRPVIW.js} +1 -1
- package/dist/cdn/{LO665ISJ.js → MIEA46UR.js} +1 -1
- package/dist/cdn/{BND3A2OZ.js → MPOW6X2Q.js} +1 -1
- package/dist/cdn/{7UE56XOX.js → MXX6VR25.js} +1 -1
- package/dist/cdn/{L7TEA5TZ.js → N6RHZQIZ.js} +1 -1
- package/dist/cdn/{EXY5RLXE.js → NFLDV2BR.js} +1 -1
- package/dist/cdn/{SRLIVQ6X.js → NJQV2ASV.js} +1 -1
- package/dist/cdn/{ZDI3N2OD.js → NT2KAJ24.js} +1 -1
- package/dist/cdn/NTFCCNHZ.js +2 -0
- package/dist/cdn/{7HYJFLXW.js → NYLOU7ZM.js} +1 -1
- package/dist/cdn/OBCQW5HQ.js +2 -0
- package/dist/cdn/{4A4Q5XKV.js → OIGQMEOA.js} +1 -1
- package/dist/cdn/{BONAMRMY.js → OPBYN6K6.js} +1 -1
- package/dist/cdn/{QAEVL4U7.js → OQUU2BPX.js} +1 -1
- package/dist/cdn/{LWR26G4J.js → P42EMHKE.js} +1 -1
- package/dist/cdn/{FS7FVQDT.js → P5XPWB3Q.js} +1 -1
- package/dist/cdn/{FGGIPGDI.js → PFI2WBBU.js} +1 -1
- package/dist/cdn/{2HJRP4YH.js → Q3MOIT4E.js} +1 -1
- package/dist/cdn/{G4YCA5LI.js → QAVOSU5J.js} +1 -1
- package/dist/cdn/{VXX3B7YL.js → QBQZPRIE.js} +1 -1
- package/dist/cdn/{DCKKIGYR.js → QQL4IXXC.js} +1 -1
- package/dist/cdn/{GKFV3JW3.js → RGK67WAK.js} +1 -1
- package/dist/cdn/{DKRMJ36A.js → RN7VHNTN.js} +1 -1
- package/dist/cdn/{JLCTNW2C.js → RPYS2BGE.js} +1 -1
- package/dist/cdn/{OZDB5YY2.js → S2E4VZKV.js} +1 -1
- package/dist/cdn/{TR5AKPVO.js → S5QUASO4.js} +1 -1
- package/dist/cdn/{3XAAZTJA.js → SO6FENAY.js} +1 -1
- package/dist/cdn/{E34Q6C2W.js → TCPO7PEE.js} +1 -1
- package/dist/cdn/{NG2CVRTW.js → TM3HQUQN.js} +1 -1
- package/dist/cdn/{ERWLWJIO.js → TPQU557H.js} +1 -1
- package/dist/cdn/{KGBFQGUJ.js → TWCRSSGO.js} +1 -1
- package/dist/cdn/{TK3A24QH.js → U2J33BNN.js} +1 -1
- package/dist/cdn/UA54WQWK.js +358 -0
- package/dist/cdn/{2ZQRTDK5.js → UCUB4NM7.js} +1 -1
- package/dist/cdn/{F6NWGNZJ.js → USBGSJAW.js} +1 -1
- package/dist/cdn/{4L27DHES.js → V6TC7O53.js} +1 -1
- package/dist/cdn/{6SYHI5LX.js → VBPF56MA.js} +1 -1
- package/dist/cdn/{RWY5Q73N.js → VINK2SLZ.js} +1 -1
- package/dist/cdn/{C6EJEJWX.js → VMM72GMK.js} +1 -1
- package/dist/cdn/{KQDSVI6B.js → VXTI3UUR.js} +1 -1
- package/dist/cdn/WDSHKWCQ.js +2 -0
- package/dist/cdn/{S4XZYAD2.js → WMEGJGIX.js} +1 -1
- package/dist/cdn/WMM6XQNF.js +2 -0
- package/dist/cdn/WPDKKXGG.js +7 -0
- package/dist/cdn/WRO2YCVL.js +2 -0
- package/dist/cdn/{5N5QVENA.js → WSDTBHMX.js} +1 -1
- package/dist/cdn/{SYICEAAE.js → X67AT4PH.js} +1 -1
- package/dist/cdn/{CL4PUHWY.js → XGRQ65AI.js} +1 -1
- package/dist/cdn/{SCW34IBZ.js → XIQUZ5FD.js} +1 -1
- package/dist/cdn/{FEL5KG4V.js → XT7FRIZE.js} +1 -1
- package/dist/cdn/{MH2V4WCB.js → YDYRX5L6.js} +1 -1
- package/dist/cdn/{YEZYIZPC.js → YQ6MHPLB.js} +1 -1
- package/dist/cdn/{RW5CVFGB.js → YQI2AE2N.js} +1 -1
- package/dist/cdn/{A4NF2XR3.js → Z35NON2P.js} +1 -1
- package/dist/cdn/{7NZ2NPMW.js → Z7SEICRM.js} +1 -1
- package/dist/cdn/{GBMRG64H.js → ZDXFFQJI.js} +1 -1
- package/dist/cdn/{S2AFRT4L.js → ZJP5YPZW.js} +1 -1
- package/dist/cdn/ZRHDQGYH.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/components/layer-table/customElement.js +121 -81
- package/dist/components/map-card/customElement.js +29 -24
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +5 -5
- package/package.json +1 -1
- package/dist/cdn/25QMR32G.js +0 -2
- package/dist/cdn/2MZRQABM.js +0 -2
- package/dist/cdn/33FWCY5E.js +0 -2
- package/dist/cdn/5OYR35BZ.js +0 -2
- package/dist/cdn/7FDAEW5F.js +0 -2
- package/dist/cdn/BZKTCNTW.js +0 -2
- package/dist/cdn/CJ3EZE7U.js +0 -2
- package/dist/cdn/CM6YNMT4.js +0 -2
- package/dist/cdn/EBLWFMVE.js +0 -2
- package/dist/cdn/EJ6VMKGC.js +0 -2
- package/dist/cdn/IADXB53D.js +0 -2
- package/dist/cdn/K5U7JUDU.js +0 -7
- package/dist/cdn/MHIPYZ7A.js +0 -2
- package/dist/cdn/MYG3QFAR.js +0 -2
- package/dist/cdn/R3A6KBAA.js +0 -2
- package/dist/cdn/RUN4GUL3.js +0 -2
- package/dist/cdn/UQWARS7N.js +0 -351
- package/dist/cdn/YVWFYZTI.js +0 -4
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { e as I, g as T, c as
|
|
2
|
+
import { c as v } from "../../chunks/runtime.js";
|
|
3
|
+
import { e as I, g as T, c as E } from "../../chunks/mapViewUtils.js";
|
|
4
4
|
import { b as F } from "../../chunks/queryUtils.js";
|
|
5
5
|
import { d as x } from "../../chunks/downloadUtils.js";
|
|
6
6
|
import { b } from "../../chunks/interfaces.js";
|
|
7
7
|
import { defineCustomElements as S } from "@arcgis/instant-apps-components/loader";
|
|
8
8
|
import { u as O } from "../../chunks/useT9n.js";
|
|
9
|
-
import { css as C, html as c, nothing as
|
|
9
|
+
import { css as C, html as c, nothing as p } from "lit";
|
|
10
10
|
import { createRef as y, ref as g } from "lit-html/directives/ref.js";
|
|
11
11
|
import { LitElement as A, createEvent as o, noShadowRoot as H, safeClassMap as m } from "@arcgis/lumina";
|
|
12
12
|
import { f as L } from "../../chunks/helpers.js";
|
|
13
13
|
import $ from "@arcgis/core/widgets/FeatureTable.js";
|
|
14
|
-
import * as
|
|
14
|
+
import * as u 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
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
18
|
class M extends A {
|
|
19
19
|
constructor() {
|
|
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._isAddingListeners = !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) => {
|
|
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._highlightedKey = "", this._highlightGeneration = 0, this._tempSelectedIds = [], this._outOFExtentOids = [], this._shouldUpdateTableOnExtentChange = !0, this._creatingFeature = !1, this._searchNode = y(), this._layerEditsHandles = [], this._pastedFeaturesIds = [], this._shouldSelectCreatedFeatures = !1, this._isAddingListeners = !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;
|
|
22
22
|
}, this.createFeatureEditorClosed = () => {
|
|
23
23
|
this._createFeatureEditor = void 0;
|
|
@@ -68,22 +68,32 @@ class M extends A {
|
|
|
68
68
|
this._configLayerOrderDefined = "configLayerOrder" in (this.mapInfo?.layerOptions || {}), this._enabledLayerIds = L(this.mapInfo?.layerOptions?.layers || [], this.mapInfo?.layerOptions?.configLayerOrder), this._table && (this._resetColumnTemplates(), this._sortTable(), await this._initToolInfos());
|
|
69
69
|
}
|
|
70
70
|
async mapViewWatchHandler() {
|
|
71
|
-
this._mapClickHandle && this._mapClickHandle.remove(), this.mapView
|
|
72
|
-
{
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
{
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
71
|
+
if (this._mapClickHandle && this._mapClickHandle.remove(), this.mapView) {
|
|
72
|
+
this._floorExpression = "", this._searchExpression = "", this._updateShareUrl(), this._mapClickHandle = u.on(() => this.mapView, "click", (t) => {
|
|
73
|
+
this._creatingFeature || this._mapClicked(t);
|
|
74
|
+
});
|
|
75
|
+
const e = this.mapView;
|
|
76
|
+
(async () => {
|
|
77
|
+
try {
|
|
78
|
+
await e.when(), e.updating && await u.once(() => !e.updating);
|
|
79
|
+
} catch {
|
|
80
|
+
}
|
|
81
|
+
this.mapView === e && (e.highlights = [
|
|
82
|
+
{
|
|
83
|
+
name: "default",
|
|
84
|
+
color: "#00FFFF"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "current-selection",
|
|
88
|
+
color: "#ff00ff"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "temporary",
|
|
92
|
+
color: "#FFFF00"
|
|
93
|
+
}
|
|
94
|
+
]);
|
|
95
|
+
})();
|
|
96
|
+
}
|
|
87
97
|
}
|
|
88
98
|
async _layerWatchHandler() {
|
|
89
99
|
if (this._hideTable = !1, this._fetchingData = !0, !this._layer) {
|
|
@@ -149,9 +159,9 @@ class M extends A {
|
|
|
149
159
|
if (s.rowHighlightIds.length && s.rowHighlightIds.removeAll(), s.rowHighlightIds.add(i), this._highlightFeatures(i), this.zoomAndScrollToSelected && s && this.mapView) {
|
|
150
160
|
const a = s.viewModel.getObjectIdIndex(i);
|
|
151
161
|
s.scrollToIndex(a);
|
|
152
|
-
const l = t.layer,
|
|
153
|
-
let
|
|
154
|
-
|
|
162
|
+
const l = t.layer, h = this.mapView.allLayerViews.toArray();
|
|
163
|
+
let r;
|
|
164
|
+
h.some(async (n) => n.layer.title === l?.title && n.layer.type === "feature" ? (r = n, this.mapView && await I([i], r, this.mapView, !0, void 0, this.zoomToScale), !0) : !1);
|
|
155
165
|
}
|
|
156
166
|
}
|
|
157
167
|
async beforeLayerSelectionChange(e) {
|
|
@@ -210,10 +220,10 @@ class M extends A {
|
|
|
210
220
|
await this._initToolInfos();
|
|
211
221
|
}
|
|
212
222
|
render() {
|
|
213
|
-
const e = this._fetchingData || this._hideTable ? "display-none" : "height-full", t = this._fetchingData ? "" : "display-none", i = this._queryingData ? "" : "display-none", s = this._size.toString(), a = this.selectedIds.length.toString(), l = this.isMobile ? "height-full" : "height-full-adjusted",
|
|
214
|
-
return this._validateActiveActions(), c`<div><calcite-scrim class=${m(i)} .loading=${this._queryingData}></calcite-scrim><calcite-shell><div class=${`width-full ${l}`}><calcite-panel class="height-full width-full panel-header-override">${this._getMapLayerPicker("header-actions-start")}${!this.isMobile && c`${this._getTableControlRow("header-content")}${this._getActionsEnd("header-actions-end")}` || ""}${
|
|
215
|
-
this._searchTextChanged(
|
|
216
|
-
}} .placeholder=${this._searchPlaceHolder} title=${this._searchPlaceHolder ??
|
|
223
|
+
const e = this._fetchingData || this._hideTable ? "display-none" : "height-full", t = this._fetchingData ? "" : "display-none", i = this._queryingData ? "" : "display-none", s = this._size.toString(), a = this.selectedIds.length.toString(), l = this.isMobile ? "height-full" : "height-full-adjusted", h = this._canShowFullTextSearch();
|
|
224
|
+
return this._validateActiveActions(), c`<div><calcite-scrim class=${m(i)} .loading=${this._queryingData}></calcite-scrim><calcite-shell><div class=${`width-full ${l}`}><calcite-panel class="height-full width-full panel-header-override">${this._getMapLayerPicker("header-actions-start")}${!this.isMobile && c`${this._getTableControlRow("header-content")}${this._getActionsEnd("header-actions-end")}` || ""}${h && c`<div class="search-container border-bottom"><calcite-input class=search clearable icon=search @calciteInputChange=${(r) => {
|
|
225
|
+
this._searchTextChanged(r);
|
|
226
|
+
}} .placeholder=${this._searchPlaceHolder} title=${this._searchPlaceHolder ?? p} type=search ${g(this._searchNode)}></calcite-input></div>` || ""}<calcite-loader class=${m(t)} .label=${this._translations.fetchingData} scale=l></calcite-loader><div class=${m(e)} ${g(this.onTableNodeCreate)}></div></calcite-panel></div>${this.isMobile ? void 0 : c`<div class="bottom-left text-color height-19" id=solutions-selected-count-div>${(this._translations.recordsTotal?.replace("{{total-number-of-records}}", s) + " | " + this._translations.recordsSelected.replace("{{selected-number-of-records}}", a)).replace("{{total}}", s).replace("{{selected}}", a)}</div>`}</calcite-shell></div>`;
|
|
217
227
|
}
|
|
218
228
|
updated() {
|
|
219
229
|
this._table && this.updateRelatedAttachmentColumns();
|
|
@@ -237,7 +247,7 @@ class M extends A {
|
|
|
237
247
|
const a = this._layer?.createQuery();
|
|
238
248
|
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]);
|
|
239
249
|
}
|
|
240
|
-
i && s?.length && (this._showOnlySelected = !0, this._table?.highlightIds.addMany(s.reverse())), this._selectedLayerView && this._selectedLayerView.updating ? await
|
|
250
|
+
i && s?.length && (this._showOnlySelected = !0, this._table?.highlightIds.addMany(s.reverse())), this._selectedLayerView && this._selectedLayerView.updating ? await u.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);
|
|
241
251
|
}
|
|
242
252
|
_clearSearchDefinitionExpression() {
|
|
243
253
|
const e = this._layer?.definitionExpression;
|
|
@@ -277,7 +287,7 @@ class M extends A {
|
|
|
277
287
|
}
|
|
278
288
|
_getMapLayerPicker(e) {
|
|
279
289
|
const t = this.isMobile ? "display-none" : "";
|
|
280
|
-
return c`<div class=${`border-end ${t}`} id=solutions-map-layer-picker-container slot=${e ??
|
|
290
|
+
return c`<div class=${`border-end ${t}`} id=solutions-map-layer-picker-container slot=${e ?? p}><map-layer-picker appearance=transparent .configLayerOrderDefined=${this._configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} display=inline-flex .enabledLayerIds=${this._enabledLayerIds} height=50 .isMobile=${this.isMobile} .mapView=${this.mapView} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} placeholder-icon=layers scale=l .selectedIds=${this._layer ? [this._layer?.id] : []} show-single-layer-as-label show-tables type=dropdown></map-layer-picker></div>`;
|
|
281
291
|
}
|
|
282
292
|
_getLayerOption(e) {
|
|
283
293
|
let t;
|
|
@@ -286,13 +296,13 @@ class M extends A {
|
|
|
286
296
|
_getActionsEnd(e) {
|
|
287
297
|
const t = this._relatedFeatureTable ? this._relatedFeatureTable.layer : this._layer, i = this._relatedFeatureTable || this._table;
|
|
288
298
|
let s = this._getLayerOption(t?.id || "");
|
|
289
|
-
return c`<div class="display-flex" slot=${e ??
|
|
299
|
+
return c`<div class="display-flex" slot=${e ?? p}><field-selection .configExtraFields=${s?.extraFields} .layer=${t} .mapView=${this.mapView} .table=${i} .tableRef=${this.el}></field-selection>${this.enableShare && !this.isMobile ? this._getShare("share") : void 0}</div>`;
|
|
290
300
|
}
|
|
291
301
|
_getTableControlRow(e) {
|
|
292
|
-
return c`<div class=${"height-51-px width-full display-flex"} slot=${e ??
|
|
302
|
+
return c`<div class=${"height-51-px width-full display-flex"} slot=${e ?? p} ${g(this._toolbar)}>${this._getActionBar()}</div>`;
|
|
293
303
|
}
|
|
294
304
|
_getActionBar() {
|
|
295
|
-
return c`<calcite-action-bar class=width-full expand-disabled id=${this._getId("bar") ??
|
|
305
|
+
return c`<calcite-action-bar class=width-full expand-disabled id=${this._getId("bar") ?? p} layout=horizontal><calcite-action-group>${this.isMobile ? void 0 : this._getActions()}</calcite-action-group></calcite-action-bar>`;
|
|
296
306
|
}
|
|
297
307
|
_getActions() {
|
|
298
308
|
return this._toolInfos?.reduce((e, t) => (t && e.push(t.isDanger ? this._getDangerAction(t.icon, t.label, t.func, t.disabled) : this._getAction(t.active, t.icon, t.indicator, t.label, t.func, t.disabled, !!t.loading, t.toolTip)), e), []);
|
|
@@ -310,7 +320,7 @@ class M extends A {
|
|
|
310
320
|
});
|
|
311
321
|
}
|
|
312
322
|
async _initToolInfos() {
|
|
313
|
-
const e = this._getIds().length > 0, t = this._relatedFeatureTable ? this._relatedFeatureTable.layer.isTable : this._layer?.isTable, i = this.featureSelectionMode === "multiple" && this._layer?.capabilities?.operations.supportsUpdate, s = this._getSelectedIds().length < 2 || this._getSelectedIds().length > b, a = !this.mapHidden && !t, l = !this._relatedFeatureTable && (!this._layer?.isTable || this._hasFilterExpressions()),
|
|
323
|
+
const e = this._getIds().length > 0, t = this._relatedFeatureTable ? this._relatedFeatureTable.layer.isTable : this._layer?.isTable, i = this.featureSelectionMode === "multiple" && this._layer?.capabilities?.operations.supportsUpdate, s = this._getSelectedIds().length < 2 || this._getSelectedIds().length > b, a = !this.mapHidden && !t, l = !this._relatedFeatureTable && (!this._layer?.isTable || this._hasFilterExpressions()), h = this._featuresEmpty(), r = this.featureSelectionMode === "single";
|
|
314
324
|
let n = this.enableCSV;
|
|
315
325
|
if (this._relatedFeatureTable) {
|
|
316
326
|
const f = await this._queryRelatedFeatures();
|
|
@@ -386,21 +396,21 @@ class M extends A {
|
|
|
386
396
|
func: () => this._toggleShowSelected(),
|
|
387
397
|
disabled: !e,
|
|
388
398
|
toolTip: this._showOnlySelected ? this._translations.showAll : this._translations.showSelected
|
|
389
|
-
}), !
|
|
399
|
+
}), !r && !this._relatedFeatureTable && d.push({
|
|
390
400
|
active: !1,
|
|
391
401
|
icon: "list-check-all",
|
|
392
402
|
indicator: !1,
|
|
393
403
|
func: async () => await this._selectAll(),
|
|
394
404
|
label: this._translations.selectAll,
|
|
395
|
-
disabled:
|
|
405
|
+
disabled: h,
|
|
396
406
|
toolTip: this._translations.selectAll
|
|
397
|
-
}), !
|
|
407
|
+
}), !r && !this._relatedFeatureTable && d.push({
|
|
398
408
|
active: !1,
|
|
399
409
|
icon: "compare",
|
|
400
410
|
indicator: !1,
|
|
401
411
|
func: async () => await this._switchSelected(),
|
|
402
412
|
label: this._translations.switchSelected,
|
|
403
|
-
disabled:
|
|
413
|
+
disabled: h,
|
|
404
414
|
toolTip: this._translations.switchSelected
|
|
405
415
|
}), d.push({
|
|
406
416
|
active: !1,
|
|
@@ -421,7 +431,7 @@ class M extends A {
|
|
|
421
431
|
},
|
|
422
432
|
label: this._translations.exportCSV,
|
|
423
433
|
loading: this._csvExporting,
|
|
424
|
-
disabled:
|
|
434
|
+
disabled: h,
|
|
425
435
|
toolTip: this._translations.exportCSV
|
|
426
436
|
}), this._toolInfos = [...d];
|
|
427
437
|
}
|
|
@@ -438,10 +448,10 @@ class M extends A {
|
|
|
438
448
|
if (!s)
|
|
439
449
|
continue;
|
|
440
450
|
const a = s.on("edits", async (l) => {
|
|
441
|
-
const
|
|
442
|
-
if (
|
|
451
|
+
const h = Array.isArray(l?.addedFeatures) ? l.addedFeatures : [], r = Array.isArray(l?.updatedFeatures) ? l.updatedFeatures : [];
|
|
452
|
+
if (h.length === 0 && r.length === 0)
|
|
443
453
|
return;
|
|
444
|
-
const n =
|
|
454
|
+
const n = h.map((_) => _.objectId).filter((_) => _ != null), d = r.map((_) => _.objectId).filter((_) => _ != null);
|
|
445
455
|
if (n.length === 0 && d.length === 0)
|
|
446
456
|
return;
|
|
447
457
|
const f = this._layer?.id;
|
|
@@ -487,9 +497,9 @@ class M extends A {
|
|
|
487
497
|
const t = this._layer?.id;
|
|
488
498
|
return this.mapInfo?.filterConfig?.layerExpressions && t !== void 0 && (e = this.mapInfo.filterConfig.layerExpressions.filter((i) => i.id === t)), e.length > 0;
|
|
489
499
|
}
|
|
490
|
-
_getAction(e, t, i, s, a, l,
|
|
500
|
+
_getAction(e, t, i, s, a, l, h, r) {
|
|
491
501
|
const n = this._layer === void 0 ? !0 : l;
|
|
492
|
-
return c`<calcite-action .active=${e} .disabled=${n} .icon=${t} .id=${`layer-table-${t}`} .indicator=${i} .label=${s} .loading=${
|
|
502
|
+
return c`<calcite-action .active=${e} .disabled=${n} .icon=${t} .id=${`layer-table-${t}`} .indicator=${i} .label=${s} .loading=${h} @click=${a} text text-enabled><div class="display-flex"><span class="label-override padding-start-1-4">${s}</span></div></calcite-action>${this._getToolTip("auto", `layer-table-${t}`, r)}`;
|
|
493
503
|
}
|
|
494
504
|
_showDelete() {
|
|
495
505
|
this.showDelete.emit({
|
|
@@ -497,7 +507,7 @@ class M extends A {
|
|
|
497
507
|
});
|
|
498
508
|
}
|
|
499
509
|
_getShare(e) {
|
|
500
|
-
return c`<div id=${this._getId(e) ??
|
|
510
|
+
return c`<div id=${this._getId(e) ?? p}><instant-apps-social-share class="height-51 width-51 display-flex" .embed=${this.shareIncludeEmbed} flip-rtl popover-button-icon-scale=s scale=m share-button-color=neutral share-button-type=action .socialMedia=${this.shareIncludeSocial} .view=${this.mapView} ${g(this._shareNode)}></instant-apps-social-share>${this._getToolTip("bottom", e, this._translations.share)}</div>`;
|
|
501
511
|
}
|
|
502
512
|
_updateShareUrl() {
|
|
503
513
|
const e = this._shareNode.value?.shareUrl;
|
|
@@ -552,9 +562,9 @@ class M extends A {
|
|
|
552
562
|
}), await this._table?.when(() => {
|
|
553
563
|
this._table?.viewModel.addHandles(this._table.highlightIds.on("change", (i) => {
|
|
554
564
|
this._handleOnChange(i);
|
|
555
|
-
})), this._table?.viewModel.addHandles(this._table.on("cell-pointerover", this.tempHighlightOnHover.bind(this))), this._table?.viewModel.addHandles(this._table.on("cell-pointerout", this._removeTempHighlight.bind(this))), this._table?.viewModel.addHandles(this._table.on("column-reorder", this._handleColumnReorder.bind(this))), this.listenOn(this._tableNode, "mouseleave", this._removeTempHighlight), this._table?.viewModel.addHandles(
|
|
565
|
+
})), this._table?.viewModel.addHandles(this._table.on("cell-pointerover", this.tempHighlightOnHover.bind(this))), this._table?.viewModel.addHandles(this._table.on("cell-pointerout", this._removeTempHighlight.bind(this))), this._table?.viewModel.addHandles(this._table.on("column-reorder", this._handleColumnReorder.bind(this))), this.listenOn(this._tableNode, "mouseleave", this._removeTempHighlight), this._table?.viewModel.addHandles(u.watch(() => this._table.size, (i) => {
|
|
556
566
|
this._size = i;
|
|
557
|
-
})),
|
|
567
|
+
})), u?.watch(
|
|
558
568
|
() => this._table?.relatedTable,
|
|
559
569
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
560
570
|
async (i) => {
|
|
@@ -641,21 +651,30 @@ class M extends A {
|
|
|
641
651
|
}
|
|
642
652
|
tempHighlightOnHover(e) {
|
|
643
653
|
if (this._removeTempHighlight(), this._selectedLayerView) {
|
|
644
|
-
const t = e.feature;
|
|
645
|
-
|
|
654
|
+
const t = e.feature, i = t ? Number(t.getObjectId()) : NaN;
|
|
655
|
+
Number.isNaN(i) || (this._temporaryFeatureHandle = this._selectedLayerView?.highlight([i], { name: "temporary" }));
|
|
646
656
|
}
|
|
647
657
|
}
|
|
648
658
|
_removeTempHighlight() {
|
|
649
659
|
this._temporaryFeatureHandle && this._temporaryFeatureHandle.remove();
|
|
650
660
|
}
|
|
651
|
-
_highlightFeatures(e) {
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
661
|
+
async _highlightFeatures(e) {
|
|
662
|
+
const t = this.selectedIds.length > 0 ? `${e ?? ""}|${[...this.selectedIds].sort((s, a) => Number(s) - Number(a)).join(",")}` : "";
|
|
663
|
+
if (t !== "" && t === this._highlightedKey && this._currentFeatureHighlightHandle)
|
|
664
|
+
return;
|
|
665
|
+
this._highlightedKey = t;
|
|
666
|
+
const i = ++this._highlightGeneration;
|
|
667
|
+
if (this._clearHighlights(), this.selectedIds.length > 0 && this._selectedLayerView) {
|
|
668
|
+
if (this._selectedLayerView.updating && await u.once(() => !this._selectedLayerView?.updating), i !== this._highlightGeneration || this.selectedIds.length === 0 || !this._selectedLayerView)
|
|
669
|
+
return;
|
|
670
|
+
if (this._currentFeatureHighlightHandle = this._selectedLayerView.highlight([e], { name: "current-selection" }), this.selectedIds.length > 1) {
|
|
671
|
+
const s = this.selectedIds.filter((a) => a !== e);
|
|
672
|
+
this._defaultFeaturesHandle = this._selectedLayerView.highlight(s, { name: "default" });
|
|
673
|
+
}
|
|
655
674
|
}
|
|
656
675
|
}
|
|
657
676
|
_clearHighlights() {
|
|
658
|
-
this._removeTempHighlight(), this._currentFeatureHighlightHandle && this._currentFeatureHighlightHandle.remove(), this._defaultFeaturesHandle && this._defaultFeaturesHandle.remove();
|
|
677
|
+
this._removeTempHighlight(), this._currentFeatureHighlightHandle && (this._currentFeatureHighlightHandle.remove(), this._currentFeatureHighlightHandle = void 0), this._defaultFeaturesHandle && (this._defaultFeaturesHandle.remove(), this._defaultFeaturesHandle = void 0);
|
|
659
678
|
}
|
|
660
679
|
_resetColumnTemplates() {
|
|
661
680
|
if (this._layer) {
|
|
@@ -683,7 +702,7 @@ class M extends A {
|
|
|
683
702
|
} else this._table && (this._table.view = this.mapView, this._table.layer = this._layer);
|
|
684
703
|
await this._initLayerRefresh(), this._checkEditEnabled(this._layer), this._table && (this._table.editingEnabled = this._editEnabled && this.enableInlineEdit, this._table.autoSaveEnabled = this.enableTableAutosave, await this._table.when(), setTimeout(() => {
|
|
685
704
|
this._loaded || this.finishLoading();
|
|
686
|
-
}, 1e3), await
|
|
705
|
+
}, 1e3), await u.once(() => this._table?.state === "loaded").then(async () => {
|
|
687
706
|
await this.finishLoading();
|
|
688
707
|
}));
|
|
689
708
|
}
|
|
@@ -726,7 +745,28 @@ class M extends A {
|
|
|
726
745
|
}), this._columnsInfo = e ? e.reduce((a, l) => (a[l] = t[l], a), {}) : t;
|
|
727
746
|
}
|
|
728
747
|
async _selectDefaultFeature(e) {
|
|
729
|
-
e.length > 0
|
|
748
|
+
if (e.length > 0) {
|
|
749
|
+
try {
|
|
750
|
+
await this.mapView?.when(), this._layer && this.mapView && await this.mapView.whenLayerView(this._layer), await this._whenMapSettled();
|
|
751
|
+
} catch {
|
|
752
|
+
}
|
|
753
|
+
this._table?.highlightIds.addMany(e);
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
async _whenMapSettled(e = 400, t = 8e3) {
|
|
757
|
+
const i = this.mapView;
|
|
758
|
+
if (!i)
|
|
759
|
+
return;
|
|
760
|
+
const s = Date.now() + t;
|
|
761
|
+
let a = 0;
|
|
762
|
+
for (; Date.now() < s; ) {
|
|
763
|
+
if (!i.updating && i.stationary) {
|
|
764
|
+
if (a === 0 && (a = Date.now()), Date.now() - a >= e)
|
|
765
|
+
return;
|
|
766
|
+
} else
|
|
767
|
+
a = 0;
|
|
768
|
+
await new Promise((h) => setTimeout(h, 100));
|
|
769
|
+
}
|
|
730
770
|
}
|
|
731
771
|
_checkEditEnabled(e) {
|
|
732
772
|
this._editEnabled = !!(e?.editingEnabled && e?.capabilities?.operations.supportsUpdate), this._deleteEnabled = !!(e?.editingEnabled && e?.capabilities?.operations.supportsDelete);
|
|
@@ -749,7 +789,7 @@ class M extends A {
|
|
|
749
789
|
this._filterActive = e, this._updateShareUrl(), await this._searchFullText();
|
|
750
790
|
}
|
|
751
791
|
_handleTableOnMapExtent() {
|
|
752
|
-
this._table && (this._filterByExtentHandle =
|
|
792
|
+
this._table && (this._filterByExtentHandle = u.when(
|
|
753
793
|
() => this.mapView?.stationary,
|
|
754
794
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
755
795
|
async () => {
|
|
@@ -789,13 +829,13 @@ class M extends A {
|
|
|
789
829
|
this._table?.highlightIds.removeAll();
|
|
790
830
|
const l = s[0].graphic.getObjectId();
|
|
791
831
|
if (l) {
|
|
792
|
-
const
|
|
793
|
-
|
|
832
|
+
const h = this._table?.highlightIds.indexOf(l);
|
|
833
|
+
h !== void 0 && h < 0 && this._table?.highlightIds.add(l);
|
|
794
834
|
}
|
|
795
835
|
} else
|
|
796
836
|
s.forEach((a) => {
|
|
797
|
-
const l = Number(a.graphic.getObjectId()),
|
|
798
|
-
|
|
837
|
+
const l = Number(a.graphic.getObjectId()), h = this._table?.highlightIds.indexOf(l);
|
|
838
|
+
h && h < 0 && l && this._table?.highlightIds.add(l);
|
|
799
839
|
});
|
|
800
840
|
this._showOnlySelected && this._table && (this._table.filterBySelectionEnabled = !0);
|
|
801
841
|
}
|
|
@@ -823,10 +863,10 @@ class M extends A {
|
|
|
823
863
|
if (this._relatedFeatureTable?.tableParent && this._relatedFeatureTable.highlightIds.length === 0) {
|
|
824
864
|
const l = this._relatedFeatureTable.tableParent.highlightIds?.getItemAt(0);
|
|
825
865
|
if (l !== void 0) {
|
|
826
|
-
const
|
|
827
|
-
|
|
828
|
-
n.attributes &&
|
|
829
|
-
}), i =
|
|
866
|
+
const h = await this._queryRelatedFeatures(), r = [];
|
|
867
|
+
h && h[l]?.features && (h[l].features.forEach((n) => {
|
|
868
|
+
n.attributes && r.push(n.attributes[e.objectIdField]);
|
|
869
|
+
}), i = r.length > 0 ? r : []);
|
|
830
870
|
}
|
|
831
871
|
}
|
|
832
872
|
t[e.id] = {
|
|
@@ -837,10 +877,10 @@ class M extends A {
|
|
|
837
877
|
const s = this._relatedFeatureTable ?? this._table;
|
|
838
878
|
if (!s)
|
|
839
879
|
return;
|
|
840
|
-
const a = s && s.columns.toArray().reduce((l,
|
|
841
|
-
if (!
|
|
842
|
-
const
|
|
843
|
-
|
|
880
|
+
const a = s && s.columns.toArray().reduce((l, h) => {
|
|
881
|
+
if (!h.hidden) {
|
|
882
|
+
const r = h?.name || h?.fieldName;
|
|
883
|
+
r && l.push(r.toLocaleLowerCase());
|
|
844
884
|
}
|
|
845
885
|
return l;
|
|
846
886
|
}, []);
|
|
@@ -859,13 +899,13 @@ class M extends A {
|
|
|
859
899
|
), this._updateToolInfoLoading("export", !1), this._csvExporting = !1;
|
|
860
900
|
}
|
|
861
901
|
async _queryRelatedFeatures() {
|
|
862
|
-
const e = this._relatedFeatureTable ? this._relatedFeatureTable ? this._relatedFeatureTable.layer : this._relatedFeatureTable.tableParent?.layer : this._layer, t = this._relatedFeatureTable?.tableParent?.highlightIds?.items[0], i = this._relatedFeatureTable?.tableParent?.layer, s = e?.relationships?.find((
|
|
902
|
+
const e = this._relatedFeatureTable ? this._relatedFeatureTable ? this._relatedFeatureTable.layer : this._relatedFeatureTable.tableParent?.layer : this._layer, t = this._relatedFeatureTable?.tableParent?.highlightIds?.items[0], i = this._relatedFeatureTable?.tableParent?.layer, s = e?.relationships?.find((h) => i.relationships?.some((r) => r.id === h.id)), a = new D({
|
|
863
903
|
objectIds: [t],
|
|
864
904
|
outFields: ["*"],
|
|
865
905
|
relationshipId: s?.id
|
|
866
906
|
});
|
|
867
|
-
return t && a && await i.queryRelatedFeatures(a).catch(async (
|
|
868
|
-
console.error(
|
|
907
|
+
return t && a && await i.queryRelatedFeatures(a).catch(async (h) => {
|
|
908
|
+
console.error(h);
|
|
869
909
|
});
|
|
870
910
|
}
|
|
871
911
|
_updateToolInfoLoading(e, t) {
|
|
@@ -909,7 +949,7 @@ class M extends A {
|
|
|
909
949
|
this._fetchingData = !0, await this._clearSearchText();
|
|
910
950
|
const i = this.mapView && await T(this.mapView, t);
|
|
911
951
|
i && await i.when(async () => {
|
|
912
|
-
this._selectedLayerView = !i.isTable && this.mapView ? await
|
|
952
|
+
this._selectedLayerView = !i.isTable && this.mapView ? await E(this.mapView, i.id) : null, this._table && this._table?.viewModel?.attachmentsViewOptions?.objectId && this._table.viewModel.hideAttachmentsView(), this._shouldUpdateTableOnExtentChange = !0, this._layer = i, await this._initToolInfos(), this._getFullTextSearchInfo();
|
|
913
953
|
});
|
|
914
954
|
}
|
|
915
955
|
this._creatingFeature = !1, this._fetchingData = !1;
|
|
@@ -919,9 +959,9 @@ class M extends A {
|
|
|
919
959
|
const a = this._layer?.attributeTableTemplate?.elements;
|
|
920
960
|
let l = [];
|
|
921
961
|
a?.length > 0 && this.honorMapFieldSettings && (l = a.map((n) => n.fieldName));
|
|
922
|
-
const
|
|
923
|
-
let
|
|
924
|
-
return t && (
|
|
962
|
+
const h = s?.fields && s?.fieldOrder ? s.fieldOrder.filter((n) => s?.fields && s.fields.indexOf(n) > -1) : l.length > 0 ? l : void 0;
|
|
963
|
+
let r;
|
|
964
|
+
return t && (r = t.reduce((n, d) => {
|
|
925
965
|
const f = {
|
|
926
966
|
type: "field",
|
|
927
967
|
fieldName: d.name,
|
|
@@ -929,13 +969,13 @@ class M extends A {
|
|
|
929
969
|
menuConfig: this._getMenuConfig(d.name)
|
|
930
970
|
};
|
|
931
971
|
return s && s.fields && s?.fields?.length > 0 ? s.fields.indexOf(d.name) > -1 && n.push(f) : l.length > 0 ? l.indexOf(d.name) > -1 && n.push(f) : n.push(f), n;
|
|
932
|
-
}, [])),
|
|
972
|
+
}, [])), r ? h ? r?.sort(this._sortFields.bind(this, h)) : r : [];
|
|
933
973
|
}
|
|
934
974
|
updateRelatedAttachmentColumns() {
|
|
935
975
|
let e = this._getLayerOption(this._layer?.id || ""), t = this.hasAttachmentsEnabled(this._layer), i = !0;
|
|
936
|
-
const s = "attachments", a = (e?.extraFields || []).reduce((
|
|
937
|
-
a && (t = l && t, i = a.related.length > 0, this._table?.columns.forEach((
|
|
938
|
-
|
|
976
|
+
const s = "attachments", a = (e?.extraFields || []).reduce((h, r) => (r.startsWith("related:") ? h.related.push(r.split("related:")[1]) : h.extra.push(r), h), { related: [], extra: [] }), l = a.extra.some((h) => h.toLowerCase() === s);
|
|
977
|
+
a && (t = l && t, i = a.related.length > 0, this._table?.columns.forEach((h) => {
|
|
978
|
+
h.fieldName.startsWith("EsriFeatureTableRelationshipColumn") && (h.hidden = !a.related.some((r) => r.toLowerCase() === (h.effectiveLabel || "").toLowerCase())), h.fieldName.startsWith("EsriFeatureTableAttachmentsColumn") && (h.hidden = !a.extra.some((r) => r.toLowerCase() === h.effectiveLabel.toLowerCase()));
|
|
939
979
|
})), this._table.relatedRecordsEnabled = i, this._table.attachmentsEnabled = t;
|
|
940
980
|
}
|
|
941
981
|
getFieldLabel(e, t) {
|
|
@@ -965,7 +1005,7 @@ class M extends A {
|
|
|
965
1005
|
}));
|
|
966
1006
|
}
|
|
967
1007
|
}
|
|
968
|
-
|
|
1008
|
+
v("layer-table", M);
|
|
969
1009
|
export {
|
|
970
1010
|
M as LayerTable
|
|
971
1011
|
};
|
|
@@ -28,7 +28,7 @@ class W extends $ {
|
|
|
28
28
|
}
|
|
29
29
|
willUpdate(e) {
|
|
30
30
|
if (e.has("appLayout") && this.appLayoutWatchHandler(), e.has("mapView") && this.mapViewWatchHandler(), e.has("mapInfo") && this.mapInfoWatchHandler(), e.has("selectedFeaturesIds") && this.selectedFeaturesIdsWatchHandler(), e.has("pasteEnabled") && this.hasUpdated) {
|
|
31
|
-
const i = this._toolInfos.find((
|
|
31
|
+
const i = this._toolInfos.find((s) => s.icon === "paste-with-attribute");
|
|
32
32
|
i && (i.disabled = !this.pasteEnabled);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -73,8 +73,8 @@ class W extends $ {
|
|
|
73
73
|
}));
|
|
74
74
|
}
|
|
75
75
|
render() {
|
|
76
|
-
const e = this.hide ? "visibility-hidden-1" : "", i = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light",
|
|
77
|
-
return this._handleMapVisibility(), this._validateActiveActions(), l`<calcite-panel class="height-full width-full panel-header-override">${this._getMapLayerPicker()}${this._getHeaderActions()}<div slot=header-actions-end>${this.enableShare && this.isMapLayout ? this._getShare("share") : void 0}</div><calcite-progress class=${f(t)} value=0></calcite-progress><div class=${`${e} ${
|
|
76
|
+
const e = this.hide ? "visibility-hidden-1" : "", i = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light", s = "height-full", t = this.isMapLayout ? "" : "display-none", a = this._isValidWebMap ? "" : "hidden", h = this.isMobile ? "" : "hidden", o = this.enableMapPicker && this.mapInfos.length > 1, n = this.enableMapLayerPicker && this._layerIds.length > 1;
|
|
77
|
+
return this._handleMapVisibility(), this._validateActiveActions(), l`<calcite-panel class="height-full width-full panel-header-override">${this._getMapLayerPicker()}${this._getHeaderActions()}<div slot=header-actions-end>${this.enableShare && this.isMapLayout ? this._getShare("share") : void 0}</div><calcite-progress class=${f(t)} value=0></calcite-progress><div class=${`${e} ${s}`}><div class="height-full" ${d(this._mapDiv)}><arcgis-map id=${this.mapComponentId ?? c} class="height-full" ${d(this._mapComponent)}></arcgis-map></div></div>${l`<map-tools style=${`visibility: ${a}`} .basemapConfig=${this.basemapConfig} class=${`box-shadow ${i} ${a}`} .configLayerOrderDefined=${this._configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSingleExpand=${this.enableSingleExpand} .enableSelectionTool=${this.enableSelectionTool} .isMobile=${this.isMobile} .parentComponentHeight=${this._mapDivHeight} .parentComponentWidth=${this._mapDivWidth} .zoomToolsSize=${this.zoomToolsSize} layout=horizontal .mapView=${this.mapView} .mapWidgetsSize=${this.mapWidgetsSize} .position=${this.mapWidgetsPosition} .selectedFeaturesIds=${this.selectedFeaturesIds} .selectedLayer=${this.selectedLayer} .searchConfiguration=${this._searchConfiguration} .stackTools=${this.stackTools} .toolOrder=${this.mapToolsOrder} .visibilityIcon=${this.visibilityIcon} ${d(this._mapTools)}></map-tools><map-tools style=${`visibility: ${h}`} class=${`box-shadow ${i} ${h}`} .configLayerOrderDefined=${this._configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} .enabledLayerIds=${this._enabledLayerIds} .enableMapLayerPicker=${n} .enableMapPicker=${o} .isMobile=${this.isMobile} .zoomToolsSize=${this.zoomToolsSize} layout=vertical .mapInfos=${this.mapInfos} .mapView=${this.mapView} .mapWidgetsSize=${this.mapWidgetsSize} .parentComponentHeight=${this._mapDivHeight} .position=${this.mobileMapWidgetsPosition} .selectedLayer=${this.selectedLayer} .selectedWebMapId=${this._selectedWebMapId} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} .stackTools=${this.stackTools} .toolOrder=${this.mobileToolsOrder} ${d(this._mobMapTools)}></map-tools>`}</calcite-panel>`;
|
|
78
78
|
}
|
|
79
79
|
updated() {
|
|
80
80
|
this._mapDivHeight = this._mapDiv.value?.offsetHeight ?? 0, document.onclick = (e) => this._handleDocumentClick(e);
|
|
@@ -83,20 +83,23 @@ class W extends $ {
|
|
|
83
83
|
this._mapDiv.value && this._mapSizeObserver?.observe(this._mapDiv.value), this._updateShareUrl();
|
|
84
84
|
}
|
|
85
85
|
async _loadMap(e) {
|
|
86
|
-
const i = !this._defaultWebmapHonored && this.defaultWebmapId,
|
|
87
|
-
this._webMapInfo = i &&
|
|
88
|
-
const
|
|
89
|
-
if (this._loadedId !==
|
|
86
|
+
const i = !this._defaultWebmapHonored && this.defaultWebmapId, s = this.mapInfos?.filter((o) => o.id === this.defaultWebmapId), t = JSON.stringify(e) !== JSON.stringify(this._webMapInfo);
|
|
87
|
+
this._webMapInfo = i && s ? s[0] : !e?.id && this.mapInfos.length > 0 ? this.mapInfos[0] : e;
|
|
88
|
+
const a = this._webMapInfo.id, h = i && e?.id === this.defaultWebmapId;
|
|
89
|
+
if (this._loadedId !== a && !i || h) {
|
|
90
|
+
if (this._loadingMapId === a)
|
|
91
|
+
return;
|
|
92
|
+
this._loadingMapId = a;
|
|
90
93
|
const o = new T({
|
|
91
|
-
portalItem: { id:
|
|
94
|
+
portalItem: { id: a }
|
|
92
95
|
});
|
|
93
96
|
try {
|
|
94
97
|
if (o && await o.load(), this.appProxies && o && await y(o, S, this.appProxies), this._mapComponent.value || await this.updateComplete, !this._mapComponent.value)
|
|
95
98
|
throw new Error("Map component is not available.");
|
|
96
|
-
this._mapComponent.value.map = o, this._mapComponent.value.resizeAlign = "center", await this._mapComponent.value.viewOnReady(), this.mapView = this._mapComponent.value.view, this._loadedId =
|
|
99
|
+
this._mapComponent.value.map = o, this._mapComponent.value.resizeAlign = "center", await this._mapComponent.value.viewOnReady(), this.mapView = this._mapComponent.value.view, this._loadedId = a, this._searchConfiguration = this._webMapInfo.searchConfiguration, this.beforeMapChanged.emit(), this.mapView && await this.mapView.when(async () => {
|
|
97
100
|
if (this.mapView) {
|
|
98
101
|
this._mapDivWidth = this._mapDiv.value && this._mapDiv.value.offsetWidth, this._mapTools.value && this.mapView.ui.add(this._mapTools.value, { position: this.mapWidgetsPosition, index: this.mapWidgetsIndex }), this._mobMapTools.value && this.mapView.ui.add(this._mobMapTools.value, { position: this.mobileMapWidgetsPosition, index: this.mapWidgetsIndex }), this._defaultWebmapHonored = h ? !0 : this._defaultWebmapHonored, this._isValidWebMap = !0, this.mapChanged.emit({
|
|
99
|
-
id:
|
|
102
|
+
id: a,
|
|
100
103
|
mapView: this.mapView,
|
|
101
104
|
isValid: !0
|
|
102
105
|
}), this.isMobile || document.getElementsByClassName("esri-zoom")[0]?.classList.remove("display-none");
|
|
@@ -106,24 +109,26 @@ class W extends $ {
|
|
|
106
109
|
});
|
|
107
110
|
} catch (n) {
|
|
108
111
|
if (n.name !== "view:goto-interrupted") {
|
|
109
|
-
console.error(n), this._loadedId =
|
|
110
|
-
id:
|
|
112
|
+
console.error(n), this._loadedId = a, this._isValidWebMap = !1, this.mapChanged.emit({
|
|
113
|
+
id: a,
|
|
111
114
|
mapView: void 0,
|
|
112
115
|
isValid: !1
|
|
113
116
|
}), document.getElementsByClassName("esri-zoom")[0]?.classList.add("display-none");
|
|
114
117
|
return;
|
|
115
118
|
}
|
|
119
|
+
} finally {
|
|
120
|
+
this._loadingMapId = void 0;
|
|
116
121
|
}
|
|
117
|
-
} else i ? (this._defaultWebmapHonored = !0, this._mapPicker.value && this._mapPicker.value.setMapByID(
|
|
118
|
-
id:
|
|
122
|
+
} else i ? (this._defaultWebmapHonored = !0, this._mapPicker.value && this._mapPicker.value.setMapByID(a)) : t && this.mapView && (this._searchConfiguration = this._webMapInfo.searchConfiguration, this.beforeMapChanged.emit(), this.mapChanged.emit({
|
|
123
|
+
id: a,
|
|
119
124
|
mapView: this.mapView,
|
|
120
125
|
isValid: !0
|
|
121
126
|
}));
|
|
122
127
|
this._updateShareUrl();
|
|
123
128
|
}
|
|
124
129
|
_getMapLayerPicker() {
|
|
125
|
-
const e = this.isMapLayout ? "header-actions-start" : "", i = this.mapInfos?.length > 1 ? "" : "display-none",
|
|
126
|
-
return l`${!this.isMobile && l`<div slot=${e ?? c}><map-picker class=${`${i} ${
|
|
130
|
+
const e = this.isMapLayout ? "header-actions-start" : "", i = this.mapInfos?.length > 1 ? "" : "display-none", s = this.isMapLayout ? "height-0" : "width-full", t = "display-flex", a = this.isMapLayout ? "" : "display-none";
|
|
131
|
+
return l`${!this.isMobile && l`<div slot=${e ?? c}><map-picker class=${`${i} ${s}`} id=map-picker .isMapLayout=${this.isMapLayout} .mapInfos=${this.mapInfos} .selectedWebMapId=${this._selectedWebMapId} ${d(this._mapPicker)}></map-picker></div>` || ""}<div slot=header-actions-start class=${`mapView-header display-flex ${a}`} id=solutions-map-layer-picker-container><div class=${`border-end ${t}`}>${this.mapView && l`<map-layer-picker appearance=transparent .configLayerOrderDefined=${this._configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} display=inline-flex .enabledLayerIds=${this._enabledLayerIds} height=50 .isMobile=${this.isMobile} .mapView=${this.mapView} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} placeholder-icon=layers scale=l .selectedIds=${this.selectedLayer ? [this.selectedLayer.id] : []} show-single-layer-as-label show-tables show-tables-disabled type=dropdown ${d(this._mapLayerPicker)}></map-layer-picker>` || ""}</div></div>`;
|
|
127
132
|
}
|
|
128
133
|
_getHeaderActions() {
|
|
129
134
|
return l`<div slot=header-content><calcite-action-bar class=${f("display-flex")} expand-disabled expanded id=${this._getId("bar") ?? c} layout=horizontal><calcite-action-group>${this.isMapLayout ? this._getTools() : void 0}</calcite-action-group></calcite-action-bar></div>`;
|
|
@@ -141,7 +146,7 @@ class W extends $ {
|
|
|
141
146
|
this._loadedId ? i.searchParams.set("webmap", this._loadedId) : i.searchParams.delete("webmap"), this.selectedLayer?.id ? i.searchParams.set("layer", this.selectedLayer.id) : i.searchParams.delete("layer"), this.selectedFeaturesIds?.length > 0 ? i.searchParams.set("oid", this.selectedFeaturesIds.join(",")) : i.searchParams.delete("oid"), this.appLayout && i.searchParams.set("applayout", this.appLayout), this._shareNode && (this._shareNode.autoUpdateShareUrl = !1, this._shareNode.shareUrl = i.href);
|
|
142
147
|
}
|
|
143
148
|
_initToolInfos() {
|
|
144
|
-
const e = this.selectedFeaturesIds.length > 0, i = this.selectedFeaturesIds.length < 2 || this.selectedFeaturesIds.length > m,
|
|
149
|
+
const e = this.selectedFeaturesIds.length > 0, i = this.selectedFeaturesIds.length < 2 || this.selectedFeaturesIds.length > m, s = this.featureSelectionMode === "multiple" && this.selectedLayer?.capabilities?.operations.supportsUpdate, t = [];
|
|
145
150
|
t.push({
|
|
146
151
|
active: !1,
|
|
147
152
|
icon: "filter",
|
|
@@ -162,7 +167,7 @@ class W extends $ {
|
|
|
162
167
|
},
|
|
163
168
|
disabled: !e,
|
|
164
169
|
toolTip: this._translations.zoom
|
|
165
|
-
}),
|
|
170
|
+
}), s && t.push({
|
|
166
171
|
active: !1,
|
|
167
172
|
icon: "pencil",
|
|
168
173
|
indicator: !1,
|
|
@@ -217,9 +222,9 @@ class W extends $ {
|
|
|
217
222
|
}
|
|
218
223
|
}
|
|
219
224
|
_validateEnabledActions() {
|
|
220
|
-
const e = this.selectedFeaturesIds.length > 0, i = this.selectedFeaturesIds.length < 2 || this.selectedFeaturesIds.length > m,
|
|
225
|
+
const e = this.selectedFeaturesIds.length > 0, i = this.selectedFeaturesIds.length < 2 || this.selectedFeaturesIds.length > m, s = ["zoom-to-object", "pencil", "erase", "copy"];
|
|
221
226
|
this._toolInfos?.forEach((t) => {
|
|
222
|
-
t &&
|
|
227
|
+
t && s.indexOf(t.icon) > -1 && (t.disabled = t.icon === "pencil" ? i : !e, t.toolTip = t.icon === "pencil" ? this.selectedFeaturesIds.length > m ? this._translations.featureEditLimitNotice : this._translations.editMultiple : t.toolTip);
|
|
223
228
|
});
|
|
224
229
|
}
|
|
225
230
|
_handleDocumentClick(e) {
|
|
@@ -237,12 +242,12 @@ class W extends $ {
|
|
|
237
242
|
_getTools() {
|
|
238
243
|
return this._toolInfos?.reduce((e, i) => (i && e.push(this._getAction(i.active, i.icon, i.indicator, i.label, i.func, i.disabled, i.loading, i.toolTip)), e), []);
|
|
239
244
|
}
|
|
240
|
-
_getToolTip(e, i,
|
|
241
|
-
return l`<calcite-tooltip .placement=${e} .referenceElement=${i}><span>${
|
|
245
|
+
_getToolTip(e, i, s) {
|
|
246
|
+
return l`<calcite-tooltip .placement=${e} .referenceElement=${i}><span>${s}</span></calcite-tooltip>`;
|
|
242
247
|
}
|
|
243
|
-
_getAction(e, i,
|
|
248
|
+
_getAction(e, i, s, t, a, h, o, n) {
|
|
244
249
|
const u = this.selectedLayer === void 0 ? !0 : h;
|
|
245
|
-
return l`<calcite-action .active=${e} .disabled=${u} .icon=${i} .id=${`map-${i}`} .indicator=${
|
|
250
|
+
return l`<calcite-action .active=${e} .disabled=${u} .icon=${i} .id=${`map-${i}`} .indicator=${s} .label=${t} .loading=${o} @click=${a} .text=${t} text-enabled></calcite-action>${this._getToolTip("auto", `map-${i}`, n)}`;
|
|
246
251
|
}
|
|
247
252
|
_getId(e) {
|
|
248
253
|
return `solutions-action-${e}`;
|