@arcgis/map-components 5.2.0-next.121 → 5.2.0-next.122
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/{Q6LQ5BUX.js → 34E7N7GU.js} +1 -1
- package/dist/cdn/{WC2DVIUW.js → 3E36QFXG.js} +2 -2
- package/dist/cdn/3FRV7BIJ.js +2 -0
- package/dist/cdn/{Z4FIADPO.js → 3TR7QOHP.js} +1 -1
- package/dist/cdn/464EB67Q.js +2 -0
- package/dist/cdn/{W5B2F2LI.js → 4DENNWA5.js} +1 -1
- package/dist/cdn/{24SNB22W.js → 5IFQI7ML.js} +1 -1
- package/dist/cdn/{JMWMN4DG.js → 5SLLYIWJ.js} +1 -1
- package/dist/cdn/{7QH5PIWM.js → 6EQW3YHG.js} +1 -1
- package/dist/cdn/{ALEBI75Z.js → AXFCL6D2.js} +1 -1
- package/dist/cdn/{FR7ARNMJ.js → B4QA6HTE.js} +1 -1
- package/dist/cdn/CCFGYVBQ.js +2 -0
- package/dist/cdn/{LM6RYRCS.js → CNYKQYK2.js} +1 -1
- package/dist/cdn/E4JAHCCG.js +2 -0
- package/dist/cdn/{JD562WMM.js → EDMWGUZ2.js} +1 -1
- package/dist/cdn/{HGCKG3CA.js → EEHSPW4M.js} +1 -1
- package/dist/cdn/{FAFDJABP.js → ESAIFZ6N.js} +1 -1
- package/dist/cdn/{GPIHHNP7.js → F46CTQWP.js} +1 -1
- package/dist/cdn/F5LP5CU2.js +2 -0
- package/dist/cdn/FKCRBOFP.js +2 -0
- package/dist/cdn/{DAPKG4DY.js → G3KYGRHM.js} +1 -1
- package/dist/cdn/{Y3Y3AB5L.js → G4HKU5PR.js} +1 -1
- package/dist/cdn/{Y5Q3Q4GW.js → GIOUZTHM.js} +1 -1
- package/dist/cdn/{4DWURRQB.js → GLH5GJZC.js} +1 -1
- package/dist/cdn/{3VBI4PPT.js → H3CCHIXN.js} +1 -1
- package/dist/cdn/{ACIG6774.js → HH5GEJCC.js} +1 -1
- package/dist/cdn/{VFSWB7LJ.js → IWOKTFPQ.js} +1 -1
- package/dist/cdn/{UA5FRNJG.js → J4BQSA3J.js} +1 -1
- package/dist/cdn/{5E2DZJWK.js → JBGNMAZ7.js} +1 -1
- package/dist/cdn/{OPLR5W7O.js → JSYLRK26.js} +1 -1
- package/dist/cdn/{5FBX5V2M.js → KHHVCV55.js} +1 -1
- package/dist/cdn/{LBJMKYT2.js → KM2GXXBO.js} +1 -1
- package/dist/cdn/{ESISPXFF.js → KRYDKCJG.js} +1 -1
- package/dist/cdn/{46ZZWK6X.js → KY3ND2AY.js} +1 -1
- package/dist/cdn/KYWVUIH5.js +2 -0
- package/dist/cdn/{7KWX2CED.js → LAY2RKKS.js} +1 -1
- package/dist/cdn/LV5KLLVW.js +2 -0
- package/dist/cdn/{QNHJY7QE.js → M3EXGLNJ.js} +1 -1
- package/dist/cdn/{TOBWMRET.js → M3EZM5X5.js} +1 -1
- package/dist/cdn/{2JMMBI2U.js → MV2EKVMR.js} +1 -1
- package/dist/cdn/{3EYHGXI5.js → PLTLRYBF.js} +1 -1
- package/dist/cdn/PR6OAZWA.js +2 -0
- package/dist/cdn/{UNP7N3DO.js → PUYZDQHZ.js} +1 -1
- package/dist/cdn/{BFVEHL3M.js → PYP3U5W5.js} +1 -1
- package/dist/cdn/{JOOXDIS7.js → Q4AJYCNY.js} +1 -1
- package/dist/cdn/{HH4T6PVP.js → QMQV37ML.js} +1 -1
- package/dist/cdn/QXVHT3RD.js +5 -0
- package/dist/cdn/{UXUG6DBJ.js → R7E5VLXC.js} +1 -1
- package/dist/cdn/{IZ7UWAQP.js → RJSFDOIW.js} +1 -1
- package/dist/cdn/{VSJ3MYSY.js → RKAZH2LM.js} +1 -1
- package/dist/cdn/{5IQQ6P2J.js → RU7PGLLB.js} +1 -1
- package/dist/cdn/{4W6PAHFY.js → S62FQUEJ.js} +1 -1
- package/dist/cdn/S7T2NPCW.js +2 -0
- package/dist/cdn/{NK74ZCP7.js → SXQRPAPL.js} +1 -1
- package/dist/cdn/{MU54WQG6.js → TILA2OKK.js} +1 -1
- package/dist/cdn/TJDMX7ZL.js +2 -0
- package/dist/cdn/TMJX7DFH.js +2 -0
- package/dist/cdn/TZHXSIXK.js +2 -0
- package/dist/cdn/US6PRR7S.js +2 -0
- package/dist/cdn/VSH4WLRS.js +2 -0
- package/dist/cdn/X6EQMX6U.js +2 -0
- package/dist/cdn/{XP4IZ2KQ.js → YRZRKOE3.js} +1 -1
- package/dist/cdn/YZ55QJUM.js +2 -0
- package/dist/cdn/ZUAZUUTW.js +2 -0
- package/dist/cdn/assets/feature-form-next/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/feature-form-next/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/selection-list/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/selection-toolbar/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/utility-network-trace-results/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/layer-utils.js +48 -44
- package/dist/chunks/slots.js +1 -1
- package/dist/components/arcgis-expand/customElement.d.ts +9 -0
- package/dist/components/arcgis-expand/customElement.js +27 -27
- package/dist/components/arcgis-exploratory-analysis/customElement.js +46 -46
- package/dist/components/arcgis-feature-form-utility-network-association-list/customElement.js +1 -1
- package/dist/components/arcgis-feature-templates/customElement.js +1 -1
- package/dist/components/arcgis-fullscreen/customElement.js +9 -10
- package/dist/components/arcgis-legend-card-element/customElement.js +26 -26
- package/dist/components/arcgis-link-chart/customElement.d.ts +9 -0
- package/dist/components/arcgis-link-chart/customElement.js +11 -11
- package/dist/components/arcgis-map/customElement.d.ts +9 -0
- package/dist/components/arcgis-map/customElement.js +2 -2
- package/dist/components/arcgis-paste/customElement.js +1 -1
- package/dist/components/arcgis-scale-bar/customElement.js +8 -8
- package/dist/components/arcgis-scene/customElement.d.ts +9 -0
- package/dist/components/arcgis-scene/customElement.js +6 -6
- package/dist/components/arcgis-selection-list/customElement.d.ts +33 -12
- package/dist/components/arcgis-selection-list/customElement.js +79 -63
- package/dist/components/arcgis-selection-toolbar/customElement.d.ts +42 -2
- package/dist/components/arcgis-selection-toolbar/customElement.js +60 -37
- package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.d.ts +18 -3
- package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.js +63 -53
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +11 -3
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +107 -53
- package/dist/components/arcgis-utility-network-trace-analysis/index.js +1 -0
- package/dist/components/arcgis-utility-network-trace-analysis/types.d.ts +5 -1
- package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.d.ts +19 -11
- package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.js +124 -110
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.d.ts +29 -0
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.js +31 -17
- package/dist/components/arcgis-utility-network-trace-locations/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +63 -14
- package/dist/components/arcgis-utility-network-trace-results/customElement.js +245 -55
- package/dist/components/arcgis-utility-network-trace-results/index.js +1 -2
- package/dist/components/arcgis-utility-network-trace-results-pane/customElement.js +7 -7
- package/dist/components/arcgis-utility-network-validate-network-topology/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/loader.js +10 -10
- package/dist/types/lumina.d.ts +14 -9
- package/dist/types/preact.d.ts +14 -9
- package/dist/types/react.d.ts +14 -9
- package/dist/types/stencil.d.ts +14 -9
- package/package.json +7 -7
- package/dist/cdn/4FADGEJD.js +0 -2
- package/dist/cdn/A2FK4TED.js +0 -2
- package/dist/cdn/BOEHQXPR.js +0 -2
- package/dist/cdn/C2HB2U6P.js +0 -2
- package/dist/cdn/CRWARUC7.js +0 -2
- package/dist/cdn/GC4D3K6B.js +0 -2
- package/dist/cdn/GJZCVU6G.js +0 -5
- package/dist/cdn/GYTTYWIC.js +0 -2
- package/dist/cdn/JGHPNDIO.js +0 -2
- package/dist/cdn/JRFQGFRL.js +0 -2
- package/dist/cdn/MRC7R44N.js +0 -2
- package/dist/cdn/MT6BTCFR.js +0 -2
- package/dist/cdn/OYD6YL32.js +0 -2
- package/dist/cdn/QD7ELNLS.js +0 -2
- package/dist/cdn/RVJTWRVG.js +0 -2
- package/dist/cdn/TBSKBHHL.js +0 -2
- package/dist/cdn/TIDNGXMD.js +0 -2
- package/dist/cdn/Z44GSKHZ.js +0 -2
- package/dist/cdn/ZB6W452H.js +0 -2
- /package/dist/cdn/{ZU6D3YMF.js → 27MP6TEF.js} +0 -0
- /package/dist/cdn/{3XRSSDOC.js → 3JCF73F4.js} +0 -0
- /package/dist/cdn/{RLTZHJ26.js → 3XEPXV4Q.js} +0 -0
- /package/dist/cdn/{IMINWWQN.js → 43IOCYG5.js} +0 -0
- /package/dist/cdn/{HMZDI4HQ.js → 45JO7F4Y.js} +0 -0
- /package/dist/cdn/{232VF5GS.js → 4W35GLNO.js} +0 -0
- /package/dist/cdn/{7HQJTIYO.js → 5CER2N5T.js} +0 -0
- /package/dist/cdn/{33AEAI5T.js → 5M56ZA46.js} +0 -0
- /package/dist/cdn/{W6X34YBZ.js → 6NWR2Z4F.js} +0 -0
- /package/dist/cdn/{KMODOE6H.js → 7FVXPOAG.js} +0 -0
- /package/dist/cdn/{2PRRRGTC.js → AYJQLWX4.js} +0 -0
- /package/dist/cdn/{HJP2DQC3.js → AZ73DBU3.js} +0 -0
- /package/dist/cdn/{CQW2542N.js → B4CANXID.js} +0 -0
- /package/dist/cdn/{HLHFT3VN.js → BEFZSVBT.js} +0 -0
- /package/dist/cdn/{55Q2U4HS.js → BIWQEPK4.js} +0 -0
- /package/dist/cdn/{N5NLF7RI.js → BLYJE76S.js} +0 -0
- /package/dist/cdn/{2Q7J34UP.js → CESFJ6AD.js} +0 -0
- /package/dist/cdn/{5ZZ7JN5X.js → COKGOKO2.js} +0 -0
- /package/dist/cdn/{7Y65HW7Z.js → D3LYSFXK.js} +0 -0
- /package/dist/cdn/{FZATLDJD.js → EAM45WZP.js} +0 -0
- /package/dist/cdn/{6VBFCBUV.js → EDTGV4YF.js} +0 -0
- /package/dist/cdn/{62XRQDSI.js → FMBY3L4S.js} +0 -0
- /package/dist/cdn/{TKC3X6S6.js → GQ6SYNZS.js} +0 -0
- /package/dist/cdn/{YUZAZ3CJ.js → H4FH2RBM.js} +0 -0
- /package/dist/cdn/{P3MLJ7YL.js → I5ZESLWO.js} +0 -0
- /package/dist/cdn/{MM6LPGBW.js → KO7RD6SS.js} +0 -0
- /package/dist/cdn/{2LEEKX4J.js → LQ76PRWK.js} +0 -0
- /package/dist/cdn/{CTHAODQE.js → MUWOF7W4.js} +0 -0
- /package/dist/cdn/{G5DB24SO.js → OCLOCCB6.js} +0 -0
- /package/dist/cdn/{2UG26OVP.js → OJXNUBIA.js} +0 -0
- /package/dist/cdn/{ANRJPTRX.js → OUXE3CSQ.js} +0 -0
- /package/dist/cdn/{AKKV6RKF.js → PXAY7IM4.js} +0 -0
- /package/dist/cdn/{4PMOT2RS.js → QMYL4UM7.js} +0 -0
- /package/dist/cdn/{UCFBAQVW.js → QPFX5XH3.js} +0 -0
- /package/dist/cdn/{EGN54PEX.js → RFSBZHJD.js} +0 -0
- /package/dist/cdn/{4TZLBS5N.js → RYYBMDGS.js} +0 -0
- /package/dist/cdn/{CDGKQKVU.js → T2DT5I33.js} +0 -0
- /package/dist/cdn/{EJ5KLAEE.js → UINNR6FV.js} +0 -0
- /package/dist/cdn/{KWL3F4UP.js → UPZVIKOH.js} +0 -0
- /package/dist/cdn/{KXCLNNE5.js → VCRVQMYT.js} +0 -0
- /package/dist/cdn/{COSLSZXO.js → VWN2LORT.js} +0 -0
- /package/dist/cdn/{3NKJ4HFO.js → XAMLHDWZ.js} +0 -0
- /package/dist/cdn/{N43ZQ4C7.js → ZWN6DXNO.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import d from"./HIFWGQCW.js";import{a as c}from"./UNPUCYYB.js";import b from"./
|
|
2
|
+
import d from"./HIFWGQCW.js";import{a as c}from"./UNPUCYYB.js";import b from"./TMJX7DFH.js";import{a as w}from"./5JADSW57.js";import"./XSCEZHHS.js";import"./UVNNXZHK.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{Q as g,T as h,V as y,a as f,b as a}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([{stripHTML:_},{formatNumber:F,substitute:b},{h:u},$])=>{var v=f`:host{position:relative;flex:1 1 auto}.list-item--hidden{display:none}.feature-observer{bottom:var(--calcite-spacing-xxl);position:relative;text-align:center;z-index:2}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.notice-container{margin-bottom:var(--calcite-spacing-xs)}`,A="nested",m=class extends ${constructor(){super(...arguments),this._messagesFeature=w({name:"feature",blocking:!0}),this.autoDestroyDisabled=!1,this.displayCount=3,this.useFeatureNextFlowItem=!1,this.flowType="feature-utility-network-association-type"}static{this.properties={autoDestroyDisabled:5,description:1,displayCount:9,flowItems:0,useFeatureNextFlowItem:5,flowType:1,heading:1,map:0,messageOverrides:0,referenceElement:1,spatialReference:0,timeZone:1,view:0}}static{this.styles=v}async destroy(){await this.manager.destroy()}_featureViewModelMatch(e,t){let i=e.graphic,s=i?.layer,o=null;u(s)&&s.parent?o=s.parent.globalIdField??null:s&&"globalIdField"in s&&(o=s.globalIdField);let r=o?i?.getAttribute(o):null,l=t.graphic,n=l?.layer,d=null;u(n)&&n.parent?d=n.parent.globalIdField??null:n&&"globalIdField"in n&&(d=n.globalIdField);let p=d?l?.getAttribute(d):null;return!!(r&&p&&r===p)}_findFlowItem(e){return this.flowItems?.findIndex(t=>{if(t.flowType!=="feature-association")return!1;let i=t.viewModel;return this._featureViewModelMatch(i,e)})??-1}_formatPercentAlong(e){let{percentAlong:t}=e;return t==null?"":F(t,{style:"percent",maximumFractionDigits:2})}async _handleFeatureClick(e,t,i){let{flowItems:s}=this;if(e){s?.destroyAll();return}if(t<0||!s){await this._selectAssociation(i);return}for(;s.length>t+1;)s.pop()}_isConnectivityAssociation(e){let{associationType:t}=e;return t==="connectivity"||t==="junction-junction-connectivity"||t==="junction-edge-from-connectivity"||t==="junction-edge-midspan-connectivity"||t==="junction-edge-to-connectivity"}_isConnectivityMidspanAssociation(e){return e.associationType==="junction-edge-midspan-connectivity"}_isParentFeature(e){let t=this.flowItems?.getItemAt(0);if(!t)return!1;let i=t.parentFeatureViewModel;return this._featureViewModelMatch(i,e)}async _selectAssociation(e){let{flowItems:t}=this;if(!t)return;let i=this.useFeatureNextFlowItem?h(c(this.parentFeatureViewModel,a`<arcgis-feature-next .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${"feature-association"} .graphic=${e.graphic} .map=${this.map} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} show-utility-network-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-next>`)):h(c(this.parentFeatureViewModel,a`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${"feature-association"} .graphic=${e.graphic} .map=${this.map} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} show-utility-network-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature>`));t.push(i)}_showAllAssociations(e){let{flowItems:t,description:i}=this;if(!t||!e)return;this.showAllEnabled=!0;let s=e?.title??"";t.push(h(a`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this.associationViewModels} .description=${i} .flowItems=${t} .flowType=${this.flowType} .heading=${s} .messageOverrides=${this.messageOverrides} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .selectedLayer=${e} .showAllEnabled=${this.showAllEnabled} .useFeatureNextFlowItem=${this.useFeatureNextFlowItem}></arcgis-feature-utility-network-association-list>`))}render(){let{associationViewModels:e,state:t}=this,i=this.selectedLayer?.title??this._messagesFeature.noTitle??"";return a`<div class="root">${t==="loading"||t==="querying"?this._renderLoading():a`<calcite-list .displayMode=${A} .filterEnabled=${this.showAllEnabled&&!!this.selectedLayer} .filterLabel=${this._messages.associationFilterPlaceholder} .filterPlaceholder=${this._messages.associationFilterPlaceholder} .label=${i}>${this.showAllEnabled&&this.selectedLayer?a`${this._renderFeatureCountWarning()}${this._renderAssociatedFeatureListPage()}${this._renderFeatureObserver()}`:Array.from(e.keys(),s=>this._renderTypeList(s))}</calcite-list>`}</div>`}_renderAssociatedFeature(e){let{featureViewModel:t,title:i}=e,s=this.state==="loading",o=this._findFlowItem(t),r=o<0&&this._isParentFeature(t),l=r||o>=0,n=`associated-feature-${e.association.globalId}`;return a`<calcite-list-item class=${g(s?"list-item--hidden":"")} .description=${_(e.terminalName??"")} .label=${_(i)} @calciteListItemSelect=${async()=>await this._handleFeatureClick(r,o,t)}>${this._isConnectivityAssociation(e.association)?this._renderConnectivityIcon(e.association.associationType,n):null}${this._isConnectivityMidspanAssociation(e.association)?a`<calcite-chip .label=${this._formatPercentAlong(e.association)} scale=s slot=content-end>${this._formatPercentAlong(e.association)}</calcite-chip>`:null}${this._renderChevronIconNode(l)}</calcite-list-item>`}_renderAssociatedFeatureList(e){return e.toArray().map(t=>this._renderAssociatedFeature(t))}_renderAssociatedFeatureListPage(){let e=this.associationViewModels.get(this.selectedLayer).slice(0,this.endIndex);return[...this._renderTooltips(e),...this._renderAssociatedFeatureList(e)]}_renderChevronIconNode(e){return a`<calcite-icon flip-rtl .icon=${e?"move-up":"chevron-right"} scale=s slot=content-end></calcite-icon>`}_renderItemTooltip(e){let{tooltipReferenceMap:t}=this,i=`associated-feature-${e.association.globalId}`;return this._isConnectivityAssociation(e.association)?a`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(i)}>${this.getConnectivityTooltip(e.association.associationType)}</calcite-tooltip>`:null}_renderTypeList(e){let{displayCount:t}=this,i=this.associationViewModels.get(e),s=i.slice(0,t),o=s.length<i.length,r=b(this._messagesFeature.numberRecords??"",{number:i.length.toString()}),l=this._messagesFeature.showAll??"";return c("show-all",a`<calcite-list-item expanded .label=${e.title} .value=${e.id}><calcite-chip .label=${String(i.length)} scale=s slot=content-end>${i.length}</calcite-chip><calcite-list .group=${e.id} .label=${e.title??""}>${[this._renderTooltips(s),this._renderAssociatedFeatureList(s)]}${o?c("show-all-item",a`<calcite-list-item .description=${r} .label=${l} @calciteListItemSelect=${()=>this._showAllAssociations(e)}><calcite-icon icon=list scale=s slot=content-end></calcite-icon></calcite-list-item>`):null}</calcite-list></calcite-list-item>`)}_renderTooltips(e){return e.toArray().map(t=>this._renderItemTooltip(t))}};y("arcgis-feature-utility-network-association-list",m);return m},"applications/Components/stringUtils","intl",b,d)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import l from"./
|
|
2
|
+
import l from"./34E7N7GU.js";import{a as G}from"./JCRPP54Z.js";import k from"./CNYKQYK2.js";import j from"./Q4AJYCNY.js";import{a as A,b as x,c as B,g as R}from"./FCNNRX3Q.js";import{a as U}from"./HMAZQNBW.js";import{a as w}from"./UNPUCYYB.js";import i from"./EDMWGUZ2.js";import g from"./TMJX7DFH.js";import f from"./YG4HDEP3.js";import"./VJVKFKSG.js";import e from"./ILBDNJQP.js";import{a as T}from"./5JADSW57.js";import{a as m}from"./JD74LG7K.js";import d from"./4SLCQ6RS.js";import c from"./4FBTH6YD.js";import b from"./KORK4WZ7.js";import{h as D}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import a from"./GNASFNLA.js";import"./QUZTFUWM.js";import{b as F}from"./XPEGBUNJ.js";import"./XURWCCLX.js";import{A as y,M as C,N as $,O as M,Q as p,S as E,V as L,b as o,w as h}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([j,{watch:b,on:q},V,,,,N,P,,,,,,{a:O,b:S,c:k}])=>{var _=G,H="nested",J=P(V),v=class extends M{constructor(){super(...arguments),this._lastDragDetail=null,this._rootGroupUid=`table-${y()}`,this._rootListRef=C(),this._selectedDragItemLayerUid=null,this.messages=T(),this.viewModel=J(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let a=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=this._getItem(e);if(!l||!("sortable"in l)||!l.sortable)return!1;let c=this._getItem(t),d=this._getLayerType(t),n=this._getItem(i),g=this._getLayerType(i),I=!!d&&!!g&&d===g,u={selected:l,from:c,to:n},f=t?.group,r=i?.group;return f&&r&&typeof a=="function"?a(u):I},this._onPanelOpen=()=>{this.requestUpdate()},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this.autoDestroyDisabled=!1,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideStatusIndicators=!1,this.icon="table",this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.listModeDisabled=this.viewModel.listModeDisabled,this.map=this.viewModel.map,this.minDragEnabledItems=B,this.minFilterItems=x,this.selectedItems=new j,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.showFilter=!1,this.showHeading=!1,this.showTemporaryTableIndicators=!1,this.tables=this.viewModel.tables,this.arcgisClose=h(),this.arcgisFilterChange=h(),this.arcgisPropertyChange=D()("state"),this.arcgisReady=h(),this.arcgisSelectedItemsChange=h(),this.arcgisTableItemsChanged=h(),this.arcgisTriggerAction=N(()=>this.viewModel,"trigger-action")}static{this.properties={_visibleItems:16,_openedPanelItems:16,_dragEnabled:16,_filterEnabled:16,autoDestroyDisabled:5,closed:5,collapsed:7,dragEnabled:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideStatusIndicators:5,icon:1,label:1,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listItemCreatedFunction:0,listModeDisabled:5,map:0,messageOverrides:0,minDragEnabledItems:9,minFilterItems:9,referenceElement:1,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showErrors:5,showFilter:5,showHeading:5,showTemporaryTableIndicators:5,state:32,tableItems:32,tables:0,view:0}}static{this.styles=[k,S]}get _visibleItems(){return this.tableItems?.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleItems.filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _dragEnabled(){return this.viewModel.totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this.viewModel.totalItems>=this.minFilterItems&&this.showFilter}get state(){return this.viewModel.state}get tableItems(){return this.viewModel.tableItems}async destroy(){await this.manager.destroy()}willUpdate(e){e.has("map")&&(this.viewModel.map=this.map),e.has("tables")&&(this.viewModel.tables=this.tables),e.has("listItemCreatedFunction")&&(this.viewModel.listItemCreatedFunction=this.listItemCreatedFunction)}loaded(){this.manager.onLifecycle(()=>[b(()=>this.view?.map,e=>{this.map||(this.viewModel.map=e)},{initial:!0}),q(()=>this.viewModel.tableItems,"change",()=>{R(this.selectedItems),this.arcgisTableItemsChanged.emit(),this.requestUpdate()},{initial:!0}),q(()=>this.selectedItems,"change",()=>this.arcgisSelectedItemsChange.emit()),b(()=>[this.viewModel.state,this.viewModel.totalItems],()=>this.requestUpdate(),{initial:!0}),b(()=>[this.filterPredicate,this._rootListRef.value],()=>this._setFilterPredicate())])}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}_getItem(e){if(e?.tagName.toLowerCase()==="calcite-list-item")return e.value;let t=e?.getAttribute("data-item");return t?this._findItemByUid(t):null}_findItemByUid(e){let t=this.tableItems?.toArray()??[];for(;t.length;){let i=t.shift();if(i){if(i.uid===e)return i;t.push(...i.children?.toArray()??[])}}return null}_getLayerType(e){return e?.getAttribute("data-layer-type")??null}_setFilterPredicate(){let e=this._rootListRef.value;e&&(e.filterPredicate=this.filterPredicate?t=>{let i=this._getItem(t);return i?this.filterPredicate(i):!1}:void 0)}_handlePanelFlowItemBack(e){e.open=!1}_sortTablesToIds(e,t){e?.sort((i,s)=>{let a=i.uid!=null?t.indexOf(i.uid):-1,l=s.uid!=null?t.indexOf(s.uid):-1;return a>l?-1:a<l?1:0})}_handleCalciteListDragEnd(e){let{fromEl:t,dragEl:i,oldIndex:s}=e;s==null||!t||!i||t.insertBefore(i,t.children[s])}_onCalciteListOrderChange(e){let{_lastDragDetail:t}=this,{toEl:i,fromEl:s,dragEl:a,newIndex:l}=e,c=t?.newIndex===l&&t?.dragEl===a&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||c)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=a.value;let d=Array.from(s.children).filter(n=>n?.matches("calcite-list-item")).map(n=>n.value.layer?.uid??"");this._sortTablesToIds(this.viewModel.tables,d)}_handleCalciteListChange(e){let{selectionMode:t,selectedItems:i}=this;if(t==="none")return;let s=e.target.selectedItems.map(a=>this._getItem(a)).filter(Boolean);i.removeAll(),i.addMany(s)}_handleFlowItemClose(){this.closed=!0,this.arcgisClose.emit(),this.autoDestroyDisabled||this.destroy()}render(){let{state:e}=this,t={[m.hidden]:e==="loading",[m.disabled]:e==="disabled"};return o`<div class=${p(F(m.widget,m.panel,t))}>${this._renderItems()}</div>`}_renderNoItemsMessage(){return o`<div slot=message>${this.messages.noItemsToDisplay}</div>`}_renderNoItems(){return this.hideNoItemsNotice?null:o`<div class=${p(_.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`}_renderPanelFlowItems(){return U(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,a=()=>this._handlePanelFlowItemBack(i);return o`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${t===this._openedPanelItems.length-1} @calciteFlowItemBack=${l=>{l.preventDefault(),a()}}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${a} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}_renderItems(){let{collapsed:e,_visibleItems:t,_filterEnabled:i,_rootGroupUid:s,showCloseButton:a,showCollapseButton:l,showHeading:c,_dragEnabled:d,selectionMode:n,filterText:g,filterPlaceholder:I,messages:u}=this,f=[o`<calcite-flow-item .closable=${a} .closed=${this.closed} .collapsed=${e} .collapsible=${l} .heading=${c?this.label??u.componentLabel:void 0} .headingLevel=${this.headingLevel} .selected=${!this._openedPanelItems.length} @calciteFlowItemClose=${()=>this._handleFlowItemClose()}>${t?.length?o`<calcite-list .canPull=${r=>this._canMove(r,"pull")} .canPut=${r=>this._canMove(r,"put")} data-layer-type=${s??E} .displayMode=${H} .dragEnabled=${d} .filterEnabled=${i} .filterPlaceholder=${I} .filterProps=${A} .filterText=${i?g:""} .group=${s} .label=${this.label??u.componentLabel} selection-appearance=border .selectionMode=${n} @calciteListChange=${this._handleCalciteListChange} @calciteListDragEnd=${r=>this._handleCalciteListDragEnd(r.detail)} @calciteListFilter=${r=>{this.filterText=r.currentTarget?.filterText??"",this.arcgisFilterChange.emit()}} @calciteListOrderChange=${r=>this._onCalciteListOrderChange(r.detail)} ${$(this._rootListRef)}>${t.toArray().map(r=>this._renderItem(r))}${i&&!this.hideNoFilterResultsNotice?o`<div class=${p(_.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`:null}</calcite-list>`:this._renderNoItems()}</calcite-flow-item>`,this._renderPanelFlowItems()];return this.closed?null:w("root-flow",o`<calcite-flow>${f}</calcite-flow>`)}_renderItem(e){return w(e.uid,O({canMove:this._canMove,css:_,displayMode:H,dragEnabled:this.dragEnabled,hideStatusIndicators:this.hideStatusIndicators,item:e,itemType:"table",listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,showErrors:this.showErrors,showFilter:this.showFilter,showTemporaryTableIndicators:this.showTemporaryTableIndicators,handleAction:(t,i)=>this._onTriggerAction(t,i),handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,view:this.view}))}};L("arcgis-table-list-next",v);return v},"core/Collection","core/reactiveUtils","layers/list/TableItemCollection",a,b,c,d,e,f,g,i,j,k,l)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import b from"./
|
|
2
|
+
import b from"./EDMWGUZ2.js";import a from"./YG4HDEP3.js";export default $arcgis.t(([{isZoomScreenSize:m},{c:g},{d:u}])=>{function q(e){if(e.icon)return e.icon;if(!("image"in e&&e.image)&&!e.className)return"question"}function M(e){return e?{backgroundImage:`url(${e})`}:{}}function v(e){let{selectedFeature:r,location:o,view:t}=e;return t?r??o??null:null}function b(e){return"browseClusterEnabled"in e&&"featureMenuOpen"in e}function h(e){return"aggregatedFeaturesEnabled"in e}async function E(e,r,o){let{location:t,selectedFeature:a,view:i,zoomFactor:n}=e;await o?.viewModel?.updateGeometry();let s=o?.graphic,l=s?.geometry?s:v(e);if(!i||!l)throw new Error("Cannot zoom to location without a target and view.");let w=i.scale/n,c=s?.geometry??e.selectedFeature?.geometry??t,d=c?.type==="point"&&await m(s??a,i);r.active=!0,r.disabled=!0;try{await e.zoomTo({target:{target:l,scale:d?w:void 0}})}catch(f){if(g(f))return;throw new Error("Could not zoom to the location of the graphic.")}finally{r.active=!1,r.disabled=!1,d&&e.location!==c&&(e.location=c)}}async function p(e,r){let o=await e.whenLayerView(u(r)),t=o.createQuery(),a=r.getObjectId();return t.aggregateIds=a!=null?[a]:[],[o,t]}async function y(e,r){let{selectedFeature:o,view:t}=e;if(t?.type!=="2d")throw new Error("zoomToAggregate:invalid-view: View must be 2d MapView.");if(!o?.isAggregate)throw new Error("zoomToAggregate:invalid-selectedFeature: Selected feature must represent an aggregate graphic.");let[a,i]=await p(t,o);r.active=!0,r.disabled=!0;let{extent:n}=await a.queryExtent(i);n&&await e.zoomTo({target:n}),r.active=!1,r.disabled=!1}var T=async(e,r)=>{if(!e)throw new Error("trigger-action:missing-arguments: Event has no action");let{disabled:o,id:t}=e;if(!t)throw new Error("trigger-action:invalid-action: action.id is missing");if(o)throw new Error("trigger-action:invalid-action: Action is disabled");if(t==="zoom-to-feature")return await E(r,e).catch(a=>{if(!g(a))throw a});if(t==="zoom-to-aggregated-features")return await y(r,e);if(t==="browse-clustered-features"){if(!b(r))throw new Error("trigger-action:invalid-view-model: browse-clustered-features requires FeaturesViewModel.");r.browseClusterEnabled=!r.browseClusterEnabled,r.featureMenuOpen=r.browseClusterEnabled;return}if(t==="browse-aggregated-features"){if(!h(r))throw new Error("trigger-action:invalid-view-model: browse-aggregated-features requires FeatureContentCollection.");r.aggregatedFeaturesEnabled=!r.aggregatedFeaturesEnabled;return}if(t==="remove-selected-feature"){r.open=!1;let{selectedFeature:a}=r;if(!a)throw new Error("trigger-action:missing-selected-feature: Cannot remove selected feature without a selected feature.");let i=u(a);i?i.remove(a):r.view?.graphics.remove(a)}};return{a:q,b:M,c:E,d:T}},"applications/Components/actionUtils",a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{E as g,d as l,i as R,k as m,ka as f}from"./
|
|
2
|
+
import{E as g,d as l,i as R,k as m,ka as f}from"./TZHXSIXK.js";import{a as o}from"./T2DT5I33.js";import{g as u}from"./6NWR2Z4F.js";var n=class extends g{constructor(){super(...arguments),this.ix=0,this.iy=0,this._generator=f()}_getTooltipPoint(){let s=this.get("tooltipX"),t=this.get("tooltipY"),r=0,a=0;u(s)&&(r=s),u(t)&&(a=t);let e=this.get("radius",0),i=this.get("innerRadius",0),d=this.get("dRadius",0),h=this.get("dInnerRadius",0);return e+=d,i+=h,i<0&&(i=e+i),s instanceof o&&(r=this.ix*(i+(e-i)*s.value)),t instanceof o&&(a=this.iy*(i+(e-i)*t.value)),this.get("arc")>=360&&i==0&&(r=0,a=0),{x:r,y:a}}_beforeChanged(){super._beforeChanged(),(this.isDirty("radius")||this.isDirty("arc")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("dRadius")||this.isDirty("dInnerRadius")||this.isDirty("cornerRadius")||this.isDirty("shiftRadius"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let s=this.get("startAngle",0),t=this.get("arc",0),r=this._generator;t<0&&(s=s+t,t=t*-1),t>.1&&r.cornerRadius(this.get("cornerRadius",0)),r.context(this._display);let a=this.get("radius",0),e=this.get("innerRadius",0),i=this.get("dRadius",0),d=this.get("dInnerRadius",0);a+=i,e+=d,e<0&&(e=a+e),r({innerRadius:e,outerRadius:a,startAngle:(s+90)*l,endAngle:(s+t+90)*l});let h=s+t/2;this.ix=m(h),this.iy=R(h);let c=this.get("shiftRadius",0);this._setCRaw("dx",this.ix*c),this._setCRaw("dy",this.iy*c),this.markDirtyPosition()}}};n.className="Slice";n.classNames=g.classNames.concat([n.className]);export{n as a};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import d from"./SKNX46RX.js";import c from"./YU5BTZEI.js";import{a as w}from"./OCZ5FM6Y.js";import{a as u}from"./JD74LG7K.js";import"./QUZTFUWM.js";import{b as r}from"./XPEGBUNJ.js";import"./XURWCCLX.js";import{O as _,Q as n,R as b,S as p,V as L,a as k,b as a}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([v,{a:f,b:z},{b:F,e:$,f:E}])=>{var I=k`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.section{word-break:break-word;word-wrap:break-word;padding:var(--calcite-space-sm) var(--calcite-space-md);min-width:250px;max-width:500px;overflow:auto;font-size:var(--calcite-font-size-sm)}.carousel-title-container{margin-bottom:var(--calcite-space-sm)}.carousel-title{margin:0}.section-title{font-weight:var(--calcite-font-weight-regular)}.layer-caption{padding:var(--calcite-space-2xs) 0;margin:0;font-weight:var(--calcite-font-weight-regular)}.imagery-layer-stretched-image{display:block;margin-bottom:-2px}.image-label{padding-inline-start:var(--calcite-space-xs)}.label-element{margin:.1em;padding:.5em 1em;min-width:2em;min-height:1em;text-align:center;display:flex;align-items:center;justify-content:center;flex:1}.layer-row{display:flex;align-items:center}.symbol{display:block;margin:auto}.pie-chart-ramp-preview{display:flex;justify-content:center}.relationship-container{display:flex;flex-direction:column}.relationship-container .layer-row{padding-bottom:.5em}.relationship-container .layer-row:last-child{padding-bottom:0}.container{display:flex;gap:var(--calcite-space-sm);flex-wrap:wrap}.background-styles-container{display:flex;flex-wrap:wrap}:host([stacked]) .container{display:table}:host([stacked]) .symbol-row{display:table-row;width:100%}:host([stacked]) .symbol-row:not(:last-child) .label-cell,:host([stacked]) .symbol-row:not(:last-child) .symbol-cell{padding-bottom:var(--calcite-space-xs)}:host([stacked]) .label-cell{display:table-cell;vertical-align:middle}:host([stacked]) .symbol-cell{display:table-cell;vertical-align:middle;text-align:center}:host([stacked]) .symbol-cell div{display:flex;align-items:center;justify-content:center}`;function C(h){return h?h.r*.299+h.g*.587+h.b*.114>=127:void 0}var x=class extends _{constructor(){super(...arguments),this.stacked=!1,this.headingLevel=3}static{this.properties={cssEffectFilter:1,stacked:7,activeLayerInfo:0,headingLevel:9,layer:0,legendElement:0,messages:0}}static{this.styles=I}_getBackgroundStyles(e){let i=e.symbol,t=i.color,l=!!t?.a,s="outline"in i?i.outline:null,c=!!s?.color?.a,o=l&&t?new v([t.r,t.g,t.b,t.a*this.layer.opacity]):new v([255,255,255,0]),d=c&&s.color?new v([s.color.r,s.color.g,s.color.b,s.color.a*this.layer.opacity]):new v([255,255,255,0]),m=C(e.symbol.color)??!0,g=m?"black":"white",y=m?"rgba(255, 255, 255, .6)":"rgba(0, 0, 0, .6)";return{background:l?o.toCss(!0):"none",color:g,textShadow:`-1px -1px 0 ${y},
|
|
3
|
+
1px -1px 0 ${y},
|
|
4
|
+
-1px 1px 0 ${y},
|
|
5
|
+
1px 1px 0 ${y}`,border:c?`1px solid ${d.toCss(!0)}`:"none",filter:this.cssEffectFilter??""}}render(){let e=this._renderLegendElement(),i=this.activeLayerInfo.legendElements.includes(this.legendElement),t=z(this.legendElement,this.messages),l=this.stacked&&i?a`<div class="carousel-title-container">${w({class:r("carousel-title",u.heading),level:this.headingLevel,children:this.activeLayerInfo.title})}${t?a`<p class="layer-caption">${t}</p>`:null}</div>`:t?w({class:r("section-title",u.heading),level:this.headingLevel,children:t}):null;return a`<section class="section" role=tabpanel tabindex=0>${l}${e}</section>`}_renderLegendElement(){switch(this.legendElement.type){case"symbol-table":return this._renderSymbolTable(this.legendElement);case"size-ramp":return a`<arcgis-legend-card-size-ramp .hasIndicators=${this.stacked} .legendElement=${this.legendElement} .messages=${this.messages} .opacity=${this.layer.opacity}></arcgis-legend-card-size-ramp>`;case"color-ramp":case"opacity-ramp":case"heatmap-ramp":case"stretch-ramp":return a`<arcgis-legend-card-color-ramp .cssEffectFilter=${this.cssEffectFilter} .legendElement=${this.legendElement} .messages=${this.messages} .opacity=${this.layer.opacity}></arcgis-legend-card-color-ramp>`;case"relationship-ramp":return a`<arcgis-legend-relationship-ramp .cssEffectFilter=${this.cssEffectFilter} .legendElement=${this.legendElement} .opacity=${this.layer.opacity} .messages=${this.messages}></arcgis-legend-relationship-ramp>`;case"pie-chart-ramp":{let{preview:e}=this.legendElement;return E(e,this.messages.previewPieChartAriaLabel),a`<div class="pie-chart-ramp-preview">${e}</div>`}case"univariate-above-and-below-ramp":return a`<arcgis-legend-card-univariate-above-and-below-ramp .cssEffectFilter=${this.cssEffectFilter} .legendElement=${this.legendElement} .messages=${this.messages} .opacity=${this.layer.opacity}></arcgis-legend-card-univariate-above-and-below-ramp>`;case"univariate-color-size-ramp":return a`<arcgis-legend-card-univariate-color-size-ramp .cssEffectFilter=${this.cssEffectFilter} .legendElement=${this.legendElement} .messages=${this.messages} .opacity=${this.layer.opacity}></arcgis-legend-card-univariate-color-size-ramp>`;default:return null}}_renderSymbolTable(e){let i=e.infos.map(s=>this._renderElementInfo(s,e.legendType)).filter(Boolean);if(!i.length)return null;let t=e.infos.some(s=>"symbol"in s&&s.symbol?.type.includes("simple-fill")),l=this.activeLayerInfo.legendElements.some(({type:s})=>s==="relationship-ramp")?"relationship-container":t?"background-styles-container":"container";return a`<div class=${n(l)}>${i}</div>`}_renderElementInfo(e,i){let{layer:t}=this,l="label"in e?e.label:null;if("type"in e&&e.type)return a`<arcgis-legend-card-element .activeLayerInfo=${this.activeLayerInfo} .cssEffectFilter=${this.cssEffectFilter} .headingLevel=${this.headingLevel} .layer=${t} .legendElement=${e} .messages=${this.messages} .stacked=${this.stacked}></arcgis-legend-card-element>`;if(!("preview"in e&&e.preview)&&!("src"in e&&e.src))return null;let s=F(t,i),c=f(this.messages,l,!1)||"";if("src"in e&&e.src){let o={"symbol-cell":this.stacked};return a`<div class=${n(r("layer-row",{"symbol-row":this.stacked}))}><div class=${n(r(o))}>${this._renderImage(e,t,s)}</div><div class=${n(r("image-label",{"label-cell":this.stacked}))}>${c}</div></div>`}if("symbol"in e&&e.preview){if(!e.symbol?.type.includes("simple-fill")){if(!e.label)return a`<div>${e.preview}</div>`;let o={"symbol-cell":this.stacked},{preview:d}=e,m="previewAriaLabel"in e?e.previewAriaLabel:null,g="label"in e?f(this.messages,e.label,!1):null;return E(d,$(this.messages,m||g)),a`<div class=${n(r("layer-row",{"symbol-row":this.stacked}))}><div class=${n(r(o))}>${d}</div><div class=${n(r("image-label",{"label-cell":this.stacked}))}>${c}</div></div>`}return a`<div class="layer-row"><div class="label-element" style=${b(this._getBackgroundStyles(e))}>${c}</div></div>`}return null}_renderImage(e,i,t){let{previewAriaLabel:l,src:s,opacity:c}=e,o=f(this.messages,e.label,!1),d={"imagery-layer-stretched-image":t,symbol:!t},m={opacity:`${c??i.opacity}`},g=$(this.messages,l||o);return a`<img alt=${g??p} .ariaLabel=${g} class=${n(r(d))} height=${e.height??void 0??p} src=${s??p} style=${b(m)} width=${e.width??void 0??p}>`}};L("arcgis-legend-card-element",x);return x},"Color",c,d)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import k from"./C2HB2U6P.js";import j from"./YG4HDEP3.js";import"./VJVKFKSG.js";import{a as $}from"./5JADSW57.js";import i from"./KORK4WZ7.js";import"./XSCEZHHS.js";import"./UVNNXZHK.js";import e from"./GNASFNLA.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{A as w,O as x,S as g,V as f,a as b,b as a,o as c,q as h,w as d}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([{getOwningPortalUrl:C,hasUserTypeExtension:I},{on:E,watch:T,whenOnce:L},D,{getVersioningStates:q},,{a:_},{a:k,b:l,c:N,d:V},{d:v}])=>{var B=b`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}calcite-block{margin:0;border-bottom:none}calcite-combobox{margin-bottom:var(--calcite-spacing-sm)}calcite-icon{width:32px}`,p={noDirtyAreasInExtent:-2147208940,operationOnlyAllowedByOwner:-2147217144,cannotAcquireVersionLockV10:-2147217146,cannotAcquireVersionLockV11:-2147220947},m=class extends x{constructor(){super(...arguments),this._messages=$({blocking:!0}),this.#o=`unvnt_${w()}`,this.disabled=!1,this.disableExecuteOnDefaultVersion=!1,this.extentToValidate="current",this.hideUtilityNetworkSelect=!1,this.state={type:"disabled"},this.view=_(this),this.arcgisReady=d(),this.arcgisValidateNetworkTopologyEnd=d(),this.arcgisValidateNetworkTopologyStart=d()}static{this.properties={beforeValidateNetworkTopologyStart:0,disabled:5,disableExecuteOnDefaultVersion:5,extentToValidate:1,hideUtilityNetworkSelect:5,label:1,messageOverrides:0,referenceElement:1,result:0,state:0,utilityNetwork:0,view:0}}static{this.styles=B}get#n(){return`${this.#o}_execute-action`}get#r(){return this._messages.actions.validateTopology+(this.extentToValidate==="current"?` ${this._messages.input.selectExtent.options.currentExtent.toLowerCase()}`:` ${this._messages.input.selectExtent.options.entireExtent.toLowerCase()}`)}get#h(){return this.#a.isDefault}get#d(){return this.#a?.currentVersionInfo?.access==="protected"}get#g(){return this.#i?.privileges?.includes("features:user:manageVersions")??!1}get#p(){let e=this.#a?.currentVersionInfo?.versionIdentifier.name;return e?.substring(0,e.lastIndexOf("."))?.toUpperCase()===this.#i?.username?.toUpperCase()}#i;#s;#o;#e;get#a(){return this.#l?.find(e=>e.featureServiceUrl===this.utilityNetwork?.featureServiceUrl)}#l;async load(){this.manager.onLifecycle(()=>[E(()=>this.view?.map?.allLayers,"change",e=>{let t=e.added.concat(e.removed);this.#c(t)&&this.#t()}),E(()=>this.view?.map?.utilityNetworks,"change",()=>{this.#t()}),T(()=>this.utilityNetwork?.gdbVersion,()=>{L(()=>this.utilityNetwork?.gdbVersion===this.#a?.currentVersionInfo?.versionIdentifier.name).then(()=>{this.#t()})}),T(()=>this.view,()=>{this.#t()},{initial:!0})])}#c(e){let t=this.utilityNetwork?.networkSystemLayers.dirtyAreasLayerUrl;if(t)return e.find(i=>v(i)&&`${i.url}/${i.layerId}`===t)}async#u(){try{if(this.result=void 0,!this.view){this.state={type:"error-disable-component",message:this._messages.errors.noView};return}if(!this.utilityNetwork){this.state={type:"error-disable-component",message:this._messages.errors.noUtilityNetworks};return}this.beforeValidateNetworkTopologyStart&&await this.beforeValidateNetworkTopologyStart();let{view:e,utilityNetwork:t}=this;if(!e){this.state={type:"error-disable-component",message:this._messages.errors.noView};return}if(!t){this.state={type:"error-disable-component",message:this._messages.errors.noUtilityNetwork},c("warn",this,h("utilityNetwork"));return}if(this.arcgisValidateNetworkTopologyStart.emit().defaultPrevented){c("info",this,this._messages.info.validateCanceled);return}this.state={type:"executing"};let i={outSpatialReference:e.spatialReference?.clone()||null,validateArea:this.extentToValidate==="current"||!t.fullExtent?e.extent.clone():t.fullExtent.clone()};this.result=await t.validateTopology(i),this.state={type:"success",message:this._messages.status.success}}catch(e){let{_messages:{errors:{cannotAcquireVersionLock:t,noDirtyAreasInExtent:i,operationOnlyAllowedByOwner:o}}}=this;this.result=void 0;let r=e,s=r.details?.raw?.extendedCode,n=r.message||this._messages.info.validateCanceled;switch(s){case p.noDirtyAreasInExtent:n=i;break;case p.cannotAcquireVersionLockV10:case p.cannotAcquireVersionLockV11:n=t;break;case p.operationOnlyAllowedByOwner:n=o;break}this.state={type:"error-info",message:n}}finally{this.arcgisValidateNetworkTopologyEnd.emit()}}async#t(){this.#s?.abort();let e=V(async t=>{this.state={type:"loading"},this.result=void 0;let{view:i}=this;if(!i){this.utilityNetwork=void 0,this.state={type:"error-disable-component",message:this._messages.errors.noView},c("warn",this,h("view"));return}if(i.type!=="2d"){this.utilityNetwork=void 0,this.state={type:"error-disable-component",message:this._messages.errors.sceneViewNotSupported};return}let o=i.map;await o.load({signal:t}),l(t);let r=o.utilityNetworks??null;if(!r?.length){this.utilityNetwork=void 0,this.state={type:"error-disable-component",message:this._messages.errors.noUtilityNetworks};return}let s=this.utilityNetwork;if((!s||!r.find(O=>O.id===s?.id))&&(s=r.getItemAt(0)),!s){this.state={type:"error-disable-component",message:this._messages.errors.noUtilityNetworks},c("warn",this,h("utilityNetwork"));return}await s.load({signal:t}),l(t);let n=(Number(s.sourceJSON.currentVersion)||0)<=11.1?"utilityNetwork":"advediting",A=await C(s.layerUrl,{signal:t})??void 0;l(t);let u=new D({url:A});await u.load({signal:t}),l(t),this.#i=u.user;let U=this.#i?.username??"",S=await I(u,U,n);if(l(t),this.#e=r,this.utilityNetwork=s,!S){this.state=n==="advediting"?{type:"error-disable-execute",message:this._messages.errors.noAdvancedEditingUserTypeExtension}:{type:"error-disable-execute",message:this._messages.errors.noUtilityNetworkServiceUserTypeExtension};return}let y=this.#c(o.allLayers.toArray());if(!y){this.state={type:"error-disable-execute",message:this._messages.errors.noDirtyAreasLayer};return}if(await y.load({signal:t}),l(t),this.#l=await q(this.view,!1),this.#h&&this.disableExecuteOnDefaultVersion){this.state={type:"error-disable-execute",message:this._messages.errors.operationDisabledOnDefaultVersion};return}if(this.#d&&!this.#p&&!this.#g){this.state={type:"error-disable-execute",message:this._messages.errors.operationOnlyAllowedByOwner};return}this.state={type:"ready"}});this.#s=e;try{await e.promise}catch(t){if(N(t))return;this.state={type:"error-disable-execute",message:this._messages.errors.utilityNetworkLoadFailed},k(t,this,this.state.message)}finally{this.#s===e&&(this.#s=void 0)}}_renderExtentToValidateCombobox(){if(this.state.type!=="error-disable-component")return a`<calcite-combobox .disabled=${this.disabled||this.state.type==="disabled"||this.state.type==="executing"} .label=${this._messages.input.selectExtent.label} .labelText=${this._messages.input.selectExtent.label} selection-mode=single-persist @calciteComboboxChange=${e=>{this.extentToValidate=e.target.value}}><calcite-combobox-item .heading=${this._messages.input.selectExtent.options.currentExtent} .selected=${this.extentToValidate==="current"} value=current></calcite-combobox-item><calcite-combobox-item .heading=${this._messages.input.selectExtent.options.entireExtent} .selected=${this.extentToValidate==="entire"} value=entire></calcite-combobox-item></calcite-combobox>`}_renderInfoNotice(){if(this.state.type==="error-disable-component"||this.state.type==="error-disable-execute"||this.state.type==="error-info"||this.state.type==="success")return a`<calcite-notice .closable=${this.state.type==="error-info"||this.state.type==="success"} .kind=${this.state.type==="success"?"success":"warning"} open scale=s width=full @calciteNoticeClose=${()=>this.state={type:"ready"}}><div slot=message>${this.state.message}</div></calcite-notice>`}_renderStatusIcon(){let e=`${this.#o}_status-icon`;switch(this.state.type){case"error-disable-component":case"error-disable-execute":case"error-info":return a`<calcite-icon icon=exclamation-mark-triangle id=${e??g} scale=s slot=actions-end></calcite-icon>`;case"executing":return a`<calcite-action loading disabled slot=actions-end .text=${this._messages.status.executing}></calcite-action>`;case"success":return a`<calcite-icon icon=check-circle id=${e??g} scale=s slot=actions-end></calcite-icon>`;default:return a`<calcite-icon icon=blank scale=m slot=actions-end></calcite-icon>`}}_renderUtilityNetworkCombobox(){if(!(!this.#e||this.#e?.length===1||this.state.type==="error-disable-component"||this.hideUtilityNetworkSelect))return a`<calcite-combobox .disabled=${this.state.type==="executing"} .label=${this._messages.input.selectUtilityNetwork.label} .labelText=${this._messages.input.selectUtilityNetwork.label} selection-mode=single-persist @calciteComboboxChange=${e=>{let t=e.target.value;this.utilityNetwork=this.#e?.find(i=>i.id===t),this.#t()}}>${this.#e.map(e=>a`<calcite-combobox-item .heading=${e.title} .selected=${e===this.utilityNetwork} .value=${e.id}></calcite-combobox-item>`)}</calcite-combobox>`}_renderValidateNetworkTopologyAction(){if(this.state.type!=="error-disable-component")return a`<calcite-action .disabled=${this.disabled||this.state.type==="disabled"||this.state.type==="error-disable-execute"||this.state.type==="executing"} icon=play-f id=${this.#n??g} .label=${this.#r} slot=actions-end .text=${this.#r} @click=${this.#u}></calcite-action>`}_renderValidateNetworkTopologyActionTooltip(){if(this.state.type!=="error-disable-component")return a`<calcite-tooltip .referenceElement=${this.#n}><span>${this.#r}</span></calcite-tooltip>`}render(){let e=this._renderStatusIcon(),t=this._renderValidateNetworkTopologyAction(),i=this._renderValidateNetworkTopologyActionTooltip(),o=this._renderUtilityNetworkCombobox(),r=this._renderExtentToValidateCombobox(),s=this._renderInfoNotice();return a`<calcite-panel .loading=${this.state.type==="loading"}><calcite-block expandable expanded .heading=${this.label}>${e}${t}${o}${r}${s}</calcite-block>${i}</calcite-panel>`}};f("arcgis-utility-network-validate-network-topology",m);return m},"applications/Components/featureUtils","core/reactiveUtils","portal/Portal","versionManagement/utils",e,i,j,k)
|
|
2
|
+
import k from"./TMJX7DFH.js";import j from"./YG4HDEP3.js";import"./VJVKFKSG.js";import{a as $}from"./5JADSW57.js";import i from"./KORK4WZ7.js";import"./XSCEZHHS.js";import"./UVNNXZHK.js";import e from"./GNASFNLA.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{A as w,O as x,S as g,V as f,a as b,b as a,o as c,q as h,w as d}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([{getOwningPortalUrl:C,hasUserTypeExtension:I},{on:E,watch:T,whenOnce:L},D,{getVersioningStates:q},,{a:_},{a:k,b:l,c:N,d:V},{e:v}])=>{var B=b`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}calcite-block{margin:0;border-bottom:none}calcite-combobox{margin-bottom:var(--calcite-spacing-sm)}calcite-icon{width:32px}`,p={noDirtyAreasInExtent:-2147208940,operationOnlyAllowedByOwner:-2147217144,cannotAcquireVersionLockV10:-2147217146,cannotAcquireVersionLockV11:-2147220947},m=class extends x{constructor(){super(...arguments),this._messages=$({blocking:!0}),this.#o=`unvnt_${w()}`,this.disabled=!1,this.disableExecuteOnDefaultVersion=!1,this.extentToValidate="current",this.hideUtilityNetworkSelect=!1,this.state={type:"disabled"},this.view=_(this),this.arcgisReady=d(),this.arcgisValidateNetworkTopologyEnd=d(),this.arcgisValidateNetworkTopologyStart=d()}static{this.properties={beforeValidateNetworkTopologyStart:0,disabled:5,disableExecuteOnDefaultVersion:5,extentToValidate:1,hideUtilityNetworkSelect:5,label:1,messageOverrides:0,referenceElement:1,result:0,state:0,utilityNetwork:0,view:0}}static{this.styles=B}get#n(){return`${this.#o}_execute-action`}get#r(){return this._messages.actions.validateTopology+(this.extentToValidate==="current"?` ${this._messages.input.selectExtent.options.currentExtent.toLowerCase()}`:` ${this._messages.input.selectExtent.options.entireExtent.toLowerCase()}`)}get#h(){return this.#a.isDefault}get#d(){return this.#a?.currentVersionInfo?.access==="protected"}get#g(){return this.#i?.privileges?.includes("features:user:manageVersions")??!1}get#p(){let e=this.#a?.currentVersionInfo?.versionIdentifier.name;return e?.substring(0,e.lastIndexOf("."))?.toUpperCase()===this.#i?.username?.toUpperCase()}#i;#s;#o;#e;get#a(){return this.#l?.find(e=>e.featureServiceUrl===this.utilityNetwork?.featureServiceUrl)}#l;async load(){this.manager.onLifecycle(()=>[E(()=>this.view?.map?.allLayers,"change",e=>{let t=e.added.concat(e.removed);this.#c(t)&&this.#t()}),E(()=>this.view?.map?.utilityNetworks,"change",()=>{this.#t()}),T(()=>this.utilityNetwork?.gdbVersion,()=>{L(()=>this.utilityNetwork?.gdbVersion===this.#a?.currentVersionInfo?.versionIdentifier.name).then(()=>{this.#t()})}),T(()=>this.view,()=>{this.#t()},{initial:!0})])}#c(e){let t=this.utilityNetwork?.networkSystemLayers.dirtyAreasLayerUrl;if(t)return e.find(i=>v(i)&&`${i.url}/${i.layerId}`===t)}async#u(){try{if(this.result=void 0,!this.view){this.state={type:"error-disable-component",message:this._messages.errors.noView};return}if(!this.utilityNetwork){this.state={type:"error-disable-component",message:this._messages.errors.noUtilityNetworks};return}this.beforeValidateNetworkTopologyStart&&await this.beforeValidateNetworkTopologyStart();let{view:e,utilityNetwork:t}=this;if(!e){this.state={type:"error-disable-component",message:this._messages.errors.noView};return}if(!t){this.state={type:"error-disable-component",message:this._messages.errors.noUtilityNetwork},c("warn",this,h("utilityNetwork"));return}if(this.arcgisValidateNetworkTopologyStart.emit().defaultPrevented){c("info",this,this._messages.info.validateCanceled);return}this.state={type:"executing"};let i={outSpatialReference:e.spatialReference?.clone()||null,validateArea:this.extentToValidate==="current"||!t.fullExtent?e.extent.clone():t.fullExtent.clone()};this.result=await t.validateTopology(i),this.state={type:"success",message:this._messages.status.success}}catch(e){let{_messages:{errors:{cannotAcquireVersionLock:t,noDirtyAreasInExtent:i,operationOnlyAllowedByOwner:o}}}=this;this.result=void 0;let r=e,s=r.details?.raw?.extendedCode,n=r.message||this._messages.info.validateCanceled;switch(s){case p.noDirtyAreasInExtent:n=i;break;case p.cannotAcquireVersionLockV10:case p.cannotAcquireVersionLockV11:n=t;break;case p.operationOnlyAllowedByOwner:n=o;break}this.state={type:"error-info",message:n}}finally{this.arcgisValidateNetworkTopologyEnd.emit()}}async#t(){this.#s?.abort();let e=V(async t=>{this.state={type:"loading"},this.result=void 0;let{view:i}=this;if(!i){this.utilityNetwork=void 0,this.state={type:"error-disable-component",message:this._messages.errors.noView},c("warn",this,h("view"));return}if(i.type!=="2d"){this.utilityNetwork=void 0,this.state={type:"error-disable-component",message:this._messages.errors.sceneViewNotSupported};return}let o=i.map;await o.load({signal:t}),l(t);let r=o.utilityNetworks??null;if(!r?.length){this.utilityNetwork=void 0,this.state={type:"error-disable-component",message:this._messages.errors.noUtilityNetworks};return}let s=this.utilityNetwork;if((!s||!r.find(O=>O.id===s?.id))&&(s=r.getItemAt(0)),!s){this.state={type:"error-disable-component",message:this._messages.errors.noUtilityNetworks},c("warn",this,h("utilityNetwork"));return}await s.load({signal:t}),l(t);let n=(Number(s.sourceJSON.currentVersion)||0)<=11.1?"utilityNetwork":"advediting",A=await C(s.layerUrl,{signal:t})??void 0;l(t);let u=new D({url:A});await u.load({signal:t}),l(t),this.#i=u.user;let U=this.#i?.username??"",S=await I(u,U,n);if(l(t),this.#e=r,this.utilityNetwork=s,!S){this.state=n==="advediting"?{type:"error-disable-execute",message:this._messages.errors.noAdvancedEditingUserTypeExtension}:{type:"error-disable-execute",message:this._messages.errors.noUtilityNetworkServiceUserTypeExtension};return}let y=this.#c(o.allLayers.toArray());if(!y){this.state={type:"error-disable-execute",message:this._messages.errors.noDirtyAreasLayer};return}if(await y.load({signal:t}),l(t),this.#l=await q(this.view,!1),this.#h&&this.disableExecuteOnDefaultVersion){this.state={type:"error-disable-execute",message:this._messages.errors.operationDisabledOnDefaultVersion};return}if(this.#d&&!this.#p&&!this.#g){this.state={type:"error-disable-execute",message:this._messages.errors.operationOnlyAllowedByOwner};return}this.state={type:"ready"}});this.#s=e;try{await e.promise}catch(t){if(N(t))return;this.state={type:"error-disable-execute",message:this._messages.errors.utilityNetworkLoadFailed},k(t,this,this.state.message)}finally{this.#s===e&&(this.#s=void 0)}}_renderExtentToValidateCombobox(){if(this.state.type!=="error-disable-component")return a`<calcite-combobox .disabled=${this.disabled||this.state.type==="disabled"||this.state.type==="executing"} .label=${this._messages.input.selectExtent.label} .labelText=${this._messages.input.selectExtent.label} selection-mode=single-persist @calciteComboboxChange=${e=>{this.extentToValidate=e.target.value}}><calcite-combobox-item .heading=${this._messages.input.selectExtent.options.currentExtent} .selected=${this.extentToValidate==="current"} value=current></calcite-combobox-item><calcite-combobox-item .heading=${this._messages.input.selectExtent.options.entireExtent} .selected=${this.extentToValidate==="entire"} value=entire></calcite-combobox-item></calcite-combobox>`}_renderInfoNotice(){if(this.state.type==="error-disable-component"||this.state.type==="error-disable-execute"||this.state.type==="error-info"||this.state.type==="success")return a`<calcite-notice .closable=${this.state.type==="error-info"||this.state.type==="success"} .kind=${this.state.type==="success"?"success":"warning"} open scale=s width=full @calciteNoticeClose=${()=>this.state={type:"ready"}}><div slot=message>${this.state.message}</div></calcite-notice>`}_renderStatusIcon(){let e=`${this.#o}_status-icon`;switch(this.state.type){case"error-disable-component":case"error-disable-execute":case"error-info":return a`<calcite-icon icon=exclamation-mark-triangle id=${e??g} scale=s slot=actions-end></calcite-icon>`;case"executing":return a`<calcite-action loading disabled slot=actions-end .text=${this._messages.status.executing}></calcite-action>`;case"success":return a`<calcite-icon icon=check-circle id=${e??g} scale=s slot=actions-end></calcite-icon>`;default:return a`<calcite-icon icon=blank scale=m slot=actions-end></calcite-icon>`}}_renderUtilityNetworkCombobox(){if(!(!this.#e||this.#e?.length===1||this.state.type==="error-disable-component"||this.hideUtilityNetworkSelect))return a`<calcite-combobox .disabled=${this.state.type==="executing"} .label=${this._messages.input.selectUtilityNetwork.label} .labelText=${this._messages.input.selectUtilityNetwork.label} selection-mode=single-persist @calciteComboboxChange=${e=>{let t=e.target.value;this.utilityNetwork=this.#e?.find(i=>i.id===t),this.#t()}}>${this.#e.map(e=>a`<calcite-combobox-item .heading=${e.title} .selected=${e===this.utilityNetwork} .value=${e.id}></calcite-combobox-item>`)}</calcite-combobox>`}_renderValidateNetworkTopologyAction(){if(this.state.type!=="error-disable-component")return a`<calcite-action .disabled=${this.disabled||this.state.type==="disabled"||this.state.type==="error-disable-execute"||this.state.type==="executing"} icon=play-f id=${this.#n??g} .label=${this.#r} slot=actions-end .text=${this.#r} @click=${this.#u}></calcite-action>`}_renderValidateNetworkTopologyActionTooltip(){if(this.state.type!=="error-disable-component")return a`<calcite-tooltip .referenceElement=${this.#n}><span>${this.#r}</span></calcite-tooltip>`}render(){let e=this._renderStatusIcon(),t=this._renderValidateNetworkTopologyAction(),i=this._renderValidateNetworkTopologyActionTooltip(),o=this._renderUtilityNetworkCombobox(),r=this._renderExtentToValidateCombobox(),s=this._renderInfoNotice();return a`<calcite-panel .loading=${this.state.type==="loading"}><calcite-block expandable expanded .heading=${this.label}>${e}${t}${o}${r}${s}</calcite-block>${i}</calcite-panel>`}};f("arcgis-utility-network-validate-network-topology",m);return m},"applications/Components/featureUtils","core/reactiveUtils","portal/Portal","versionManagement/utils",e,i,j,k)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import t from"./Q6LQ5BUX.js";import"./OE4E2DJY.js";import{a as g}from"./JCRPP54Z.js";import s from"./LM6RYRCS.js";import r from"./JOOXDIS7.js";import{a as j,b as q,c as z,g as F,h as J,j as K,k as Q,m,n as T}from"./FCNNRX3Q.js";import{a as H}from"./HMAZQNBW.js";import{a as b}from"./UNPUCYYB.js";import o from"./JD562WMM.js";import n from"./C2HB2U6P.js";import l from"./YG4HDEP3.js";import"./VJVKFKSG.js";import i from"./ILBDNJQP.js";import{a as k}from"./5JADSW57.js";import{a as w}from"./JD74LG7K.js";import{a as G}from"./4N7TU2OR.js";import h from"./4SLCQ6RS.js";import e from"./4FBTH6YD.js";import c from"./KORK4WZ7.js";import{h as B}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import a from"./GNASFNLA.js";import"./QUZTFUWM.js";import{b as N}from"./XPEGBUNJ.js";import"./XURWCCLX.js";import{A as P,M as L,N as f,O as R,Q as v,S as E,T as M,V as x,b as d,w as p}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([re,u,{on:A,watch:te},,,,S,U,,,,,{e:V,h:W,k:X},{a:Y,b:Z,c:ee}])=>{var ie="nested",le=U(re),O=class extends R{constructor(){super(...arguments),this._lastDragDetail=null,this._rootListRef=L(),this._layerFlowItemRef=L(),this._panelFlowItemRef=L(),this._selectedDragItemLayerUid=null,this._rootGroupUid=`operational-${P()}`,this._openedLayersController=null,this.messages=k(),this._canMove=({dragEl:e,fromEl:t,toEl:i},a)=>{let s=a==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,r=m(e,this.operationalItems);if(!r?.sortable)return!1;let l=this._resolveListContainer(t),o=this._resolveListContainer(i),n=this._getContainerItem(l),c=T(l),y=this._getContainerItem(o),_=T(o),$=!!c&&!!_&&c===_,I={selected:r,from:n,to:y},C=l?.group,h=o?.group,se=n?.layer?.type??"",ae=y?.layer?.type??"",D=new Set(["map-image","catalog","knowledge-graph"]);return C&&h&&typeof s=="function"?s(I):$&&!D.has(se)&&!D.has(ae)&&r?.layer?.type!=="sublayer"},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer)},this._clearActiveItem=()=>{this._activeItem=null},this._setCurrentActiveItem=e=>{this._activeItem=e},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(a=>a.classList?.contains(g.item)),i=m(t,this.operationalItems);this._activeItem=i},this.viewModel=le(this),this.arcgisClose=G(this),this._activeItem=null,this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.layerTablesEnabled=new u(["knowledge-graph"]),this.mapImageOptions=null,this.openedLayerLists=new u,this.tileOptions=null,this.autoDestroyDisabled=!1,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.hideCatalogLayerList=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideStatusIndicators=!1,this.icon="layers",this.layerTablesAvailable=new u(["knowledge-graph"]),this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.listModeDisabled=this.viewModel.listModeDisabled,this.minDragEnabledItems=z,this.minFilterItems=q,this.openedLayers=new u,this.operationalItems=this.viewModel.operationalItems,this.selectedItems=new u,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.showFilter=!1,this.showHeading=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.view=this.viewModel.view,this.visibilityAppearance="default",this.arcgisFilterChange=p(),this.arcgisOpenedLayersChange=p(),this.arcgisPropertyChange=B()("state"),this.arcgisReady=p(),this.arcgisSelectedItemsChange=p(),this.arcgisTriggerAction=S(()=>this.viewModel,"trigger-action")}static{this.properties={_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,_totalItems:16,_visibleItems:16,_openedPanelItems:16,_dragEnabled:16,_filterEnabled:16,layerTablesEnabled:16,mapImageOptions:16,openedLayerLists:16,tileOptions:16,_renderedOpenLayerFlowItems:16,autoDestroyDisabled:5,catalogLayerList:32,catalogOptions:0,closed:5,collapsed:5,dragEnabled:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,hideCatalogLayerList:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideStatusIndicators:5,icon:1,knowledgeGraphOptions:0,label:1,layerTablesAvailable:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listItemCreatedFunction:0,listModeDisabled:5,messageOverrides:0,minDragEnabledItems:9,minFilterItems:9,openedLayers:32,operationalItems:0,referenceElement:1,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showErrors:5,showFilter:5,showHeading:5,showTemporaryLayerIndicators:5,state:32,tableList:32,view:0,visibilityAppearance:1}}static{this.styles=[ee,Z]}get _totalItems(){return this.viewModel.operationalItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _visibleItems(){return this.operationalItems?.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleItems.flatten(e=>e.children).filter(e=>!e.hidden&&e.panel?.open&&!e.panel.disabled&&e.panel.flowEnabled&&(!W(e)||V(e)))}get _dragEnabled(){return this._totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this._totalItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){let{openedLayers:e}=this;return e.toArray().map((t,i)=>this._renderLayerFlowItem(t,i===e.length-1))}get catalogLayerList(){return this._catalogLayerList}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this._destroyOpenedLayerLists(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[A(()=>this.openedLayers,"change",()=>{this._handleOpenedLayersChange()},{initial:!0}),A(()=>this.viewModel.operationalItems,"change",()=>F(this.selectedItems),{initial:!0}),te(()=>this.operationalItems.flatten(e=>e.children).map(e=>e.uid).join(","),()=>{F(this.selectedItems),this.requestUpdate()},{initial:!0}),A(()=>this.selectedItems,"change",()=>this.arcgisSelectedItemsChange.emit()),te(()=>[this.filterPredicate,this._rootListRef.value],()=>J(this._rootListRef.value,this.filterPredicate,this.operationalItems))])}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}_resolveListContainer(e){return e?e.matches("calcite-list")?e:e.closest("calcite-list[data-item]")||(this._rootListRef.value?.contains(e)?this._rootListRef.value:null):null}_getContainerItem(e){let t=e?.getAttribute("data-item");return t?this._findItemByUid(t):null}_findItemByUid(e){let t=this.operationalItems?.toArray()??[];for(;t.length;){let i=t.shift();if(!i)continue;if(i.uid===e)return i;let a=i.children?.toArray()??[];t.push(...a)}return null}async _createFlowList(e,t){let{_layerListMap:i}=this,a=i.get(e);if(a)return a;let s=e.type==="catalog"?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||i.set(e,s),s}async _handleOpenedLayersChange(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();let a=new AbortController,{signal:s}=a;this._openedLayersController=a,e.forEach((o,n)=>{t.includes(n)||(o?.destroy?.(),e.delete(n))});let r=await Promise.all(t.map(o=>this._createFlowList(o,s)));if(s.aborted)return;i.removeAll(),i.addMany(r);let l=i.at(-1);l?"catalogLayer"in l?(this._catalogLayerList=l,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=l):(this._catalogLayerList=void 0,this._tableList=void 0),this.arcgisOpenedLayersChange.emit()}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async _createCatalogLayerList(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:a,listItemCreatedFunction:s,minFilterItems:r,selectionMode:l,visibilityAppearance:o}=this;return M(d`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??a} .listItemCreatedFunction=${i?.listItemCreatedFunction??s} .minFilterItems=${i?.minFilterItems??r} .selectionMode=${i?.selectionMode??l} .visibilityAppearance=${i?.visibilityAppearance??o} .showErrors=${i?.showErrors??this.showErrors} .showFilter=${i?.showFilter??this.showFilter} .hideStatusIndicators=${i?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} .messageOverrides=${this.messageOverrides} @arcgisReady=${n=>n.stopPropagation()} .catalogLayer=${e} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`)}_getTableListParams(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){let{headingLevel:t,selectionMode:i,dragEnabled:a}=this,s=this._getTableListParams(e);return M(d`<arcgis-table-list-next .headingLevel=${s?.headingLevel??t} .selectionMode=${s?.selectionMode??i} .dragEnabled=${s?.dragEnabled??a} .collapsed=${s?.collapsed} .filterPlaceholder=${s?.filterPlaceholder} .filterText=${s?.filterText} .icon=${s?.icon??void 0} .label=${s?.label??void 0} .listItemCreatedFunction=${s?.listItemCreatedFunction} .messageOverrides=${this.messageOverrides} .tables=${s?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${r=>r.stopPropagation()}></arcgis-table-list-next>`)}_handlePanelFlowItemBack(e){e.open=!1}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:a}){let s=this._resolveListContainer(e),r=this._resolveListContainer(t),l=m(i,this.operationalItems),o=this._getContainerItem(s),n=this._getContainerItem(r);a==null||!l||(this.viewModel.moveItem(l,n,o,a),X(this,l.uid,c=>c!==i&&this._resolveListContainer(c.parentElement)===s))}_onCalciteListDragEnd(e){let{fromEl:t,toEl:i,dragEl:a,oldIndex:s}=e;if(t!==i){a.remove();return}s==null||!t||!a||t.insertBefore(a,t.children[s])}_onCalciteListOrderChange(e){let{_lastDragDetail:t}=this,{dragEl:i,newIndex:a}=e,s=this._resolveListContainer(e.fromEl),r=this._resolveListContainer(e.toEl),l=t?.newIndex===a&&t?.dragEl===i&&t?.toEl===r&&t?.fromEl===s;if(!(!s||!r||l)){if(this._lastDragDetail={...e,fromEl:s,toEl:r},this._selectedDragItemLayerUid=i.value,s===r){let o=Array.from(s.children).filter(n=>n?.matches("calcite-list-item")).map(n=>n.value.layer?.uid??"");this._sortLayers(s,o);return}this._moveLayerFromChildList({toEl:r,fromEl:s,dragEl:i,newIndex:a})}}_sortLayers(e,t){if(e)if(e===this._rootListRef.value)K(this.el.view?.map?.layers,t);else{let i=m(e,this.operationalItems);if(!i)return;Q(i,t)}}_handleCalciteListChange(e){let{selectionMode:t,selectedItems:i}=this;if(t==="none")return;let a=e.target.selectedItems.map(s=>m(s,this.operationalItems)).filter(Boolean);i.removeAll(),i.addMany(a)}render(){let{state:e}=this,t={[w.hidden]:e==="loading",[w.disabled]:e==="disabled"};return d`<div class=${v(N(w.widget,t))}>${this._visibleItems?.length?this._renderItemTooltips():null}${this._renderItems()}</div>`}_renderItemTooltip(e){let{_tooltipReferenceMap:t,messages:i}=this;return e?d`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(e.layer?.uid??"")}>${i.layerIncompatibleTooltip}</calcite-tooltip>`:null}_renderItemTooltipNodes(e){if(e.incompatible)return this._renderItemTooltip(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this._renderItemTooltipNodes(i))??[];return t.length?t:null}_renderItemTooltips(){return this._visibleItems?.toArray().map(e=>this._renderItemTooltipNodes(e))}_renderNoItemsMessage(){return d`<div slot=message>${this.messages.noItemsToDisplay}</div>`}_renderNoItems(){return this.hideNoItemsNotice?null:d`<div class=${v(g.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`}_renderLayerFlowItem(e,t){let{messages:i,openedLayers:a}=this,s=e.title||this.messages.untitledLayer;return b(e?.uid??s,d`<calcite-flow-item data-layer-uid=${e?.uid??""??E} .description=${s} .heading=${i[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${r=>{r.preventDefault(),a.pop(),a.at(-1)&&this._layerFlowItemRef.value?.setFocus()}} ${f(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}_renderPanelFlowItems(){let{_openedPanelItems:e,openedLayers:t}=this;return H(e.toArray(),i=>i.uid,(i,a)=>{let{panel:s,title:r}=i,l=()=>this._handlePanelFlowItemBack(s);return d`<calcite-flow-item .description=${r} .heading=${s.title} .headingLevel=${this.headingLevel} .selected=${!t.length&&a===e.length-1} @calciteFlowItemBack=${o=>{o.preventDefault(),l()}} ${f(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${i} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${l} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}_renderItems(){let{collapsed:e,_visibleItems:t,_openedPanelItems:i,_filterEnabled:a,_rootGroupUid:s,showCloseButton:r,showCollapseButton:l,showHeading:o,_dragEnabled:n,selectionMode:c,filterText:y,openedLayers:_,filterPlaceholder:$,messages:I}=this,C=[d`<calcite-flow-item .closable=${r} .closed=${this.closed} .collapsed=${e} .collapsible=${l} .heading=${o?I.componentLabel:void 0} .headingLevel=${this.headingLevel} .selected=${!_.length&&!i.length} @calciteFlowItemClose=${()=>this.closed=!1}>${t?.length?d`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${h=>this._canMove(h,"pull")} .canPut=${h=>this._canMove(h,"put")} data-layer-type=${s??E} .displayMode=${ie} .dragEnabled=${n} .filterEnabled=${a} .filterPlaceholder=${$} .filterProps=${j} .filterText=${a?y:""} .group=${s} .label=${I.componentLabel} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=highlight .selectionMode=${c} @calciteListChange=${this._handleCalciteListChange} @calciteListFilter=${h=>{this.filterText=h.currentTarget?.filterText??"",this.arcgisFilterChange.emit()}} @calciteListOrderChange=${h=>this._onCalciteListOrderChange(h.detail)} @calciteListDragEnd=${h=>this._onCalciteListDragEnd(h.detail)} ${f(this._rootListRef)}>${t.toArray().map(h=>this._renderItem(h))}${a&&!this.hideNoFilterResultsNotice?d`<div class=${v(g.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`:null}</calcite-list>`:this._renderNoItems()}</calcite-flow-item>`,this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return this.closed?null:b("root-flow",d`<calcite-flow>${C}</calcite-flow>`)}_renderItem(e,t,i){return b(e.uid,Y({activeItem:this._activeItem,canMove:this._canMove,css:g,displayMode:ie,dragEnabled:this.dragEnabled,hideStatusIndicators:this.hideStatusIndicators,hideCatalogLayerList:this.hideCatalogLayerList,item:e,messages:this.messages,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,operationalItems:this.operationalItems,parent:t,parentTitles:i,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,showCloseButton:this.showCloseButton,showCollapseButton:this.showCollapseButton,showErrors:this.showErrors,showHeading:this.showHeading,showFilter:this.showFilter,clearActiveItem:this._clearActiveItem,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};x("arcgis-layer-list-next",O);return O},"layers/list/LayerItemCollection","core/Collection","core/reactiveUtils",a,c,e,h,i,l,n,o,r,s,t)
|
|
2
|
+
import t from"./34E7N7GU.js";import"./OE4E2DJY.js";import{a as g}from"./JCRPP54Z.js";import s from"./CNYKQYK2.js";import r from"./Q4AJYCNY.js";import{a as j,b as q,c as z,g as F,h as J,j as K,k as Q,m,n as T}from"./FCNNRX3Q.js";import{a as H}from"./HMAZQNBW.js";import{a as b}from"./UNPUCYYB.js";import o from"./EDMWGUZ2.js";import n from"./TMJX7DFH.js";import l from"./YG4HDEP3.js";import"./VJVKFKSG.js";import i from"./ILBDNJQP.js";import{a as k}from"./5JADSW57.js";import{a as w}from"./JD74LG7K.js";import{a as G}from"./4N7TU2OR.js";import h from"./4SLCQ6RS.js";import e from"./4FBTH6YD.js";import c from"./KORK4WZ7.js";import{h as B}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import a from"./GNASFNLA.js";import"./QUZTFUWM.js";import{b as N}from"./XPEGBUNJ.js";import"./XURWCCLX.js";import{A as P,M as L,N as f,O as R,Q as v,S as E,T as M,V as x,b as d,w as p}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([re,u,{on:A,watch:te},,,,S,U,,,,,{e:V,h:W,k:X},{a:Y,b:Z,c:ee}])=>{var ie="nested",le=U(re),O=class extends R{constructor(){super(...arguments),this._lastDragDetail=null,this._rootListRef=L(),this._layerFlowItemRef=L(),this._panelFlowItemRef=L(),this._selectedDragItemLayerUid=null,this._rootGroupUid=`operational-${P()}`,this._openedLayersController=null,this.messages=k(),this._canMove=({dragEl:e,fromEl:t,toEl:i},a)=>{let s=a==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,r=m(e,this.operationalItems);if(!r?.sortable)return!1;let l=this._resolveListContainer(t),o=this._resolveListContainer(i),n=this._getContainerItem(l),c=T(l),y=this._getContainerItem(o),_=T(o),$=!!c&&!!_&&c===_,I={selected:r,from:n,to:y},C=l?.group,h=o?.group,se=n?.layer?.type??"",ae=y?.layer?.type??"",D=new Set(["map-image","catalog","knowledge-graph"]);return C&&h&&typeof s=="function"?s(I):$&&!D.has(se)&&!D.has(ae)&&r?.layer?.type!=="sublayer"},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer)},this._clearActiveItem=()=>{this._activeItem=null},this._setCurrentActiveItem=e=>{this._activeItem=e},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(a=>a.classList?.contains(g.item)),i=m(t,this.operationalItems);this._activeItem=i},this.viewModel=le(this),this.arcgisClose=G(this),this._activeItem=null,this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.layerTablesEnabled=new u(["knowledge-graph"]),this.mapImageOptions=null,this.openedLayerLists=new u,this.tileOptions=null,this.autoDestroyDisabled=!1,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.hideCatalogLayerList=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideStatusIndicators=!1,this.icon="layers",this.layerTablesAvailable=new u(["knowledge-graph"]),this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.listModeDisabled=this.viewModel.listModeDisabled,this.minDragEnabledItems=z,this.minFilterItems=q,this.openedLayers=new u,this.operationalItems=this.viewModel.operationalItems,this.selectedItems=new u,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.showFilter=!1,this.showHeading=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.view=this.viewModel.view,this.visibilityAppearance="default",this.arcgisFilterChange=p(),this.arcgisOpenedLayersChange=p(),this.arcgisPropertyChange=B()("state"),this.arcgisReady=p(),this.arcgisSelectedItemsChange=p(),this.arcgisTriggerAction=S(()=>this.viewModel,"trigger-action")}static{this.properties={_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,_totalItems:16,_visibleItems:16,_openedPanelItems:16,_dragEnabled:16,_filterEnabled:16,layerTablesEnabled:16,mapImageOptions:16,openedLayerLists:16,tileOptions:16,_renderedOpenLayerFlowItems:16,autoDestroyDisabled:5,catalogLayerList:32,catalogOptions:0,closed:5,collapsed:5,dragEnabled:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,hideCatalogLayerList:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideStatusIndicators:5,icon:1,knowledgeGraphOptions:0,label:1,layerTablesAvailable:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listItemCreatedFunction:0,listModeDisabled:5,messageOverrides:0,minDragEnabledItems:9,minFilterItems:9,openedLayers:32,operationalItems:0,referenceElement:1,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showErrors:5,showFilter:5,showHeading:5,showTemporaryLayerIndicators:5,state:32,tableList:32,view:0,visibilityAppearance:1}}static{this.styles=[ee,Z]}get _totalItems(){return this.viewModel.operationalItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _visibleItems(){return this.operationalItems?.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleItems.flatten(e=>e.children).filter(e=>!e.hidden&&e.panel?.open&&!e.panel.disabled&&e.panel.flowEnabled&&(!W(e)||V(e)))}get _dragEnabled(){return this._totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this._totalItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){let{openedLayers:e}=this;return e.toArray().map((t,i)=>this._renderLayerFlowItem(t,i===e.length-1))}get catalogLayerList(){return this._catalogLayerList}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this._destroyOpenedLayerLists(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[A(()=>this.openedLayers,"change",()=>{this._handleOpenedLayersChange()},{initial:!0}),A(()=>this.viewModel.operationalItems,"change",()=>F(this.selectedItems),{initial:!0}),te(()=>this.operationalItems.flatten(e=>e.children).map(e=>e.uid).join(","),()=>{F(this.selectedItems),this.requestUpdate()},{initial:!0}),A(()=>this.selectedItems,"change",()=>this.arcgisSelectedItemsChange.emit()),te(()=>[this.filterPredicate,this._rootListRef.value],()=>J(this._rootListRef.value,this.filterPredicate,this.operationalItems))])}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}_resolveListContainer(e){return e?e.matches("calcite-list")?e:e.closest("calcite-list[data-item]")||(this._rootListRef.value?.contains(e)?this._rootListRef.value:null):null}_getContainerItem(e){let t=e?.getAttribute("data-item");return t?this._findItemByUid(t):null}_findItemByUid(e){let t=this.operationalItems?.toArray()??[];for(;t.length;){let i=t.shift();if(!i)continue;if(i.uid===e)return i;let a=i.children?.toArray()??[];t.push(...a)}return null}async _createFlowList(e,t){let{_layerListMap:i}=this,a=i.get(e);if(a)return a;let s=e.type==="catalog"?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||i.set(e,s),s}async _handleOpenedLayersChange(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();let a=new AbortController,{signal:s}=a;this._openedLayersController=a,e.forEach((o,n)=>{t.includes(n)||(o?.destroy?.(),e.delete(n))});let r=await Promise.all(t.map(o=>this._createFlowList(o,s)));if(s.aborted)return;i.removeAll(),i.addMany(r);let l=i.at(-1);l?"catalogLayer"in l?(this._catalogLayerList=l,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=l):(this._catalogLayerList=void 0,this._tableList=void 0),this.arcgisOpenedLayersChange.emit()}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async _createCatalogLayerList(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:a,listItemCreatedFunction:s,minFilterItems:r,selectionMode:l,visibilityAppearance:o}=this;return M(d`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??a} .listItemCreatedFunction=${i?.listItemCreatedFunction??s} .minFilterItems=${i?.minFilterItems??r} .selectionMode=${i?.selectionMode??l} .visibilityAppearance=${i?.visibilityAppearance??o} .showErrors=${i?.showErrors??this.showErrors} .showFilter=${i?.showFilter??this.showFilter} .hideStatusIndicators=${i?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} .messageOverrides=${this.messageOverrides} @arcgisReady=${n=>n.stopPropagation()} .catalogLayer=${e} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`)}_getTableListParams(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){let{headingLevel:t,selectionMode:i,dragEnabled:a}=this,s=this._getTableListParams(e);return M(d`<arcgis-table-list-next .headingLevel=${s?.headingLevel??t} .selectionMode=${s?.selectionMode??i} .dragEnabled=${s?.dragEnabled??a} .collapsed=${s?.collapsed} .filterPlaceholder=${s?.filterPlaceholder} .filterText=${s?.filterText} .icon=${s?.icon??void 0} .label=${s?.label??void 0} .listItemCreatedFunction=${s?.listItemCreatedFunction} .messageOverrides=${this.messageOverrides} .tables=${s?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${r=>r.stopPropagation()}></arcgis-table-list-next>`)}_handlePanelFlowItemBack(e){e.open=!1}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:a}){let s=this._resolveListContainer(e),r=this._resolveListContainer(t),l=m(i,this.operationalItems),o=this._getContainerItem(s),n=this._getContainerItem(r);a==null||!l||(this.viewModel.moveItem(l,n,o,a),X(this,l.uid,c=>c!==i&&this._resolveListContainer(c.parentElement)===s))}_onCalciteListDragEnd(e){let{fromEl:t,toEl:i,dragEl:a,oldIndex:s}=e;if(t!==i){a.remove();return}s==null||!t||!a||t.insertBefore(a,t.children[s])}_onCalciteListOrderChange(e){let{_lastDragDetail:t}=this,{dragEl:i,newIndex:a}=e,s=this._resolveListContainer(e.fromEl),r=this._resolveListContainer(e.toEl),l=t?.newIndex===a&&t?.dragEl===i&&t?.toEl===r&&t?.fromEl===s;if(!(!s||!r||l)){if(this._lastDragDetail={...e,fromEl:s,toEl:r},this._selectedDragItemLayerUid=i.value,s===r){let o=Array.from(s.children).filter(n=>n?.matches("calcite-list-item")).map(n=>n.value.layer?.uid??"");this._sortLayers(s,o);return}this._moveLayerFromChildList({toEl:r,fromEl:s,dragEl:i,newIndex:a})}}_sortLayers(e,t){if(e)if(e===this._rootListRef.value)K(this.el.view?.map?.layers,t);else{let i=m(e,this.operationalItems);if(!i)return;Q(i,t)}}_handleCalciteListChange(e){let{selectionMode:t,selectedItems:i}=this;if(t==="none")return;let a=e.target.selectedItems.map(s=>m(s,this.operationalItems)).filter(Boolean);i.removeAll(),i.addMany(a)}render(){let{state:e}=this,t={[w.hidden]:e==="loading",[w.disabled]:e==="disabled"};return d`<div class=${v(N(w.widget,t))}>${this._visibleItems?.length?this._renderItemTooltips():null}${this._renderItems()}</div>`}_renderItemTooltip(e){let{_tooltipReferenceMap:t,messages:i}=this;return e?d`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(e.layer?.uid??"")}>${i.layerIncompatibleTooltip}</calcite-tooltip>`:null}_renderItemTooltipNodes(e){if(e.incompatible)return this._renderItemTooltip(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this._renderItemTooltipNodes(i))??[];return t.length?t:null}_renderItemTooltips(){return this._visibleItems?.toArray().map(e=>this._renderItemTooltipNodes(e))}_renderNoItemsMessage(){return d`<div slot=message>${this.messages.noItemsToDisplay}</div>`}_renderNoItems(){return this.hideNoItemsNotice?null:d`<div class=${v(g.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`}_renderLayerFlowItem(e,t){let{messages:i,openedLayers:a}=this,s=e.title||this.messages.untitledLayer;return b(e?.uid??s,d`<calcite-flow-item data-layer-uid=${e?.uid??""??E} .description=${s} .heading=${i[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${r=>{r.preventDefault(),a.pop(),a.at(-1)&&this._layerFlowItemRef.value?.setFocus()}} ${f(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}_renderPanelFlowItems(){let{_openedPanelItems:e,openedLayers:t}=this;return H(e.toArray(),i=>i.uid,(i,a)=>{let{panel:s,title:r}=i,l=()=>this._handlePanelFlowItemBack(s);return d`<calcite-flow-item .description=${r} .heading=${s.title} .headingLevel=${this.headingLevel} .selected=${!t.length&&a===e.length-1} @calciteFlowItemBack=${o=>{o.preventDefault(),l()}} ${f(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${i} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${l} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}_renderItems(){let{collapsed:e,_visibleItems:t,_openedPanelItems:i,_filterEnabled:a,_rootGroupUid:s,showCloseButton:r,showCollapseButton:l,showHeading:o,_dragEnabled:n,selectionMode:c,filterText:y,openedLayers:_,filterPlaceholder:$,messages:I}=this,C=[d`<calcite-flow-item .closable=${r} .closed=${this.closed} .collapsed=${e} .collapsible=${l} .heading=${o?I.componentLabel:void 0} .headingLevel=${this.headingLevel} .selected=${!_.length&&!i.length} @calciteFlowItemClose=${()=>this.closed=!1}>${t?.length?d`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${h=>this._canMove(h,"pull")} .canPut=${h=>this._canMove(h,"put")} data-layer-type=${s??E} .displayMode=${ie} .dragEnabled=${n} .filterEnabled=${a} .filterPlaceholder=${$} .filterProps=${j} .filterText=${a?y:""} .group=${s} .label=${I.componentLabel} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=highlight .selectionMode=${c} @calciteListChange=${this._handleCalciteListChange} @calciteListFilter=${h=>{this.filterText=h.currentTarget?.filterText??"",this.arcgisFilterChange.emit()}} @calciteListOrderChange=${h=>this._onCalciteListOrderChange(h.detail)} @calciteListDragEnd=${h=>this._onCalciteListDragEnd(h.detail)} ${f(this._rootListRef)}>${t.toArray().map(h=>this._renderItem(h))}${a&&!this.hideNoFilterResultsNotice?d`<div class=${v(g.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`:null}</calcite-list>`:this._renderNoItems()}</calcite-flow-item>`,this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return this.closed?null:b("root-flow",d`<calcite-flow>${C}</calcite-flow>`)}_renderItem(e,t,i){return b(e.uid,Y({activeItem:this._activeItem,canMove:this._canMove,css:g,displayMode:ie,dragEnabled:this.dragEnabled,hideStatusIndicators:this.hideStatusIndicators,hideCatalogLayerList:this.hideCatalogLayerList,item:e,messages:this.messages,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,operationalItems:this.operationalItems,parent:t,parentTitles:i,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,showCloseButton:this.showCloseButton,showCollapseButton:this.showCollapseButton,showErrors:this.showErrors,showHeading:this.showHeading,showFilter:this.showFilter,clearActiveItem:this._clearActiveItem,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};x("arcgis-layer-list-next",O);return O},"layers/list/LayerItemCollection","core/Collection","core/reactiveUtils",a,c,e,h,i,l,n,o,r,s,t)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as $}from"./XEK22IDA.js";import i from"./C2HB2U6P.js";import f from"./YG4HDEP3.js";import"./VJVKFKSG.js";import e from"./ILBDNJQP.js";import{a as F}from"./5JADSW57.js";import d from"./4FBTH6YD.js";import c from"./KORK4WZ7.js";import{h as w}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import a from"./GNASFNLA.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{O as g,V as b,a as T,b as r,w as h}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([{property:l,subclass:x},B,_,{getAllStandardFeatureTemplatesForLayer:D,getTemplatesForLayers:L},{isTable:y,getEffectiveLayerCapabilities:E},{watch:v},,{a:M},,S,,{f:m,g:f}])=>{var U=T`:host{display:flex;position:relative;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.filter-no-results{padding:var(--calcite-spacing-md) var(--calcite-spacing-lg)}.root{display:flex;flex:1 1 auto;overflow:hidden auto;transition:max-height .25s ease-in-out}.root>*{width:100%;box-sizing:border-box}.feature-template-tabs{--calcite-tab-background-color: transparent}`,C=Object.defineProperty,R=Object.getOwnPropertyDescriptor,a=(t,e,i,o)=>{for(var n=o>1?void 0:o?R(e,i):e,p=t.length-1,c;p>=0;p--)(c=t[p])&&(n=(o?c(e,i,n):c(n))||n);return o&&n&&C(e,i,n),n};function I(t){switch(t){case"point":case"multipoint":case"polyline":case"polygon":case"extent":case"mesh":return t}return"noneSpecified"}var A=t=>I(t.layer.geometryType??""),s=class extends B{constructor(t){super(t),this._hasRunInitialLoad=!1,this.favoritesEnabled=!1,this.recentlyUsedEnabled=!1,this.hideTemplateDescription=!1,this.filterText="",this.recentFilterText="",this.favoritesFilterText="",this.display="grouped",this.groupBy="layer",this.hideTemplatesMode="never",this.disableTemplatesMode="never",this.sectionSortBy="system",this.templateSortBy="alphabetical",this.sharedTemplatesDisabled=!1,this.excludeTables=!1,this.favorites=new Set,this.fetchingTemplateMetaData=!1,this.recentlyUsed=[]}async handleTemplateSourceDefinitionChanged(){if(this._hasRunInitialLoad=!1,this.applicationTemplates){await this._restore();return}try{this.fetchingTemplateMetaData=!0;let t=this.activeLayers;if(await Promise.allSettled(t.map(e=>e.load())),this.sharedTemplatesDisabled){let e=[];for(let i of t){let o=D(i);o.length>0&&e.push({layer:i,templates:o})}this.mapTemplates=e;return}this.mapTemplates=await L(t,this.view,void 0,{returnVisibleTemplatesOnly:!0}),await this._restore()}catch{this.mapTemplates=[]}finally{this.fetchingTemplateMetaData=!1}}get loading(){return!this._hasRunInitialLoad||this.layers!==void 0||this.applicationTemplates!==void 0||!this.view?.ready}async addFavorite(t){this.favorites.add(t.id),this.favorites=new Set(this.favorites)}async removeFavorite(t){this.favorites.delete(t.id),this.favorites=new Set(this.favorites)}addRecent(t){if(!this.recentlyUsedEnabled)return;let e=this.recentlyUsed.filter(i=>i!==t.id);e.unshift(t.id)>20&&(e.length=20),this.recentlyUsed=e}async removeRecent(t){this.recentlyUsed=this.recentlyUsed.filter(e=>e!==t.id)}async _restore(){try{if(this.favoritesEnabled&&this.restoreFavorites){let t=await this.restoreFavorites();this.favorites=new Set(t??[])}}catch{}try{if(this.recentlyUsedEnabled&&this.restoreRecentlyUsed){let t=await this.restoreRecentlyUsed();this.recentlyUsed=t??[]}}catch{}}_sortTemplates(t){if(this.templateSortByFunction){let e=this.templateSortByFunction(t)??null;return e===null?t:e}return this.templateSortBy==="alphabetical"?t.toSorted((e,i)=>e.label.localeCompare(i.label)):t}_sortSections(t){if(this.sectionSortByFunction){let e=this.sectionSortByFunction(t);e&&(t=e)}else if(this.sectionSortBy==="alphabetical")t=t.toSorted((e,i)=>e.sectionName.localeCompare(i.sectionName));else if(this.groupBy==="geometry"&&!this.groupByFunction){let e={point:1,multipoint:2,polyline:3,polygon:4,extent:5,mesh:6,noneSpecified:7};t=t.toSorted((i,o)=>{let n=e[i.sectionName]??10,p=e[o.sectionName]??10;return n-p})}for(let e of t)e.templates=this._sortTemplates(e.templates);return t}_layerIsVisibleAtCurrentScale(t){if(!this.view)return!0;let e=t;f(t)&&(e=t.parent);let i=this.view.allLayerViews.find(o=>o.layer===e);if(!i)return!0;if(f(t)){let o=this.view.scale;if(i.visibleAtCurrentScale){let n=t.minScale,p=t.maxScale,c=!n,d=!p;return!c&&o<=n&&(c=!0),!d&&o>=p&&(d=!0),c&&d}}return i.visibleAtCurrentScale}get activeLayers(){let t=[];for(let e of this.layers??[])if(m(e))for(let i of e.sublayers)t.push(i);else t.push(e);if(this.layers===void 0||this.layers===null){for(let e of[...this.view?.map?.allLayers?.slice(0).reverse()??[],...this.excludeTables?[]:this.view?.map?.allTables?.slice(0).reverse()??[]])if(e.type==="feature"||e.type==="scene"||e.type==="geojson"||e.type==="oriented-imagery"||e.type==="knowledge-graph")t.push(e);else if(m(e))for(let i of e.sublayers)t.push(i)}return t}get selectedTemplate(){return this.allTemplates.find(t=>t.id===this.selectedTemplateId)}get effectiveTemplates(){return this.templates.map(t=>({...t,templates:t.templates.filter(e=>this.inclusionFilter(e))})).filter(t=>t.templates.length>0)}get templateList(){return this._sortTemplates(this.effectiveTemplates.flatMap(t=>t.templates))}get allTemplates(){return this._sortTemplates(this.templates.flatMap(t=>t.templates))}inclusionFilter(t){if(this.excludeTables&&y(t.layer)||this.applicationFilterFunction?.(t)===!1)return!1;let e=E(t.layer)?.operations;return e?.supportsEditing===!1&&!e?.supportsAdd?!1:y(t.layer)?!0:!(this.hideTemplatesMode==="visible"&&!t.layer.visible||this.hideTemplatesMode==="scale"&&!this._layerIsVisibleAtCurrentScale(t.layer))}get templateSetKey(){return this._sortTemplates(this.allTemplates).map(t=>t.id).join(",")}get disabledTemplates(){let t=new Set;for(let e of this.allTemplates){if(this.applicationDisabledFunction&&this.applicationDisabledFunction(e)){t.add(e);continue}if(!y(e.layer)){if(this.disableTemplatesMode==="visible"&&!e.layer.visible){t.add(e);continue}if(this.disableTemplatesMode==="scale"&&this.view&&!this._layerIsVisibleAtCurrentScale(e.layer)){t.add(e);continue}}}return t}get templates(){return this.applicationTemplates??this.organizedMapTemplates}get organizedMapTemplates(){if(this.groupByFunction||this.groupBy==="geometry"){let t=!this.groupByFunction,e=this.groupByFunction??A,i=new Map;for(let o of this.mapTemplates??[])for(let n of o.templates){let p=new _({template:n,layer:o.layer}),c=e(p);if(c!=null)if(i.has(c))i.get(c)?.templates.push(p);else{let d={sectionName:c,...t?{autoTranslate:!0}:{},templates:[p]};i.set(c,d)}}return this._sortSections(Array.from(i.values()))}return this._sortSections((this.mapTemplates??[]).map(({layer:t,templates:e})=>({sectionName:t.title??"",templates:e.map(i=>new _({layer:t,template:i}))})).filter(t=>t.templates.length>0))}get updating(){return this.fetchingTemplateMetaData}get favoriteTemplates(){let t=[];for(let e of this.effectiveTemplates)for(let i of e.templates)this.favorites.has(i.id)&&t.push(i);return t}get recentTemplates(){let t=new Map;for(let i of this.effectiveTemplates)for(let o of i.templates)t.set(o.id,o);let e=[];for(let i of this.recentlyUsed)t.has(i)&&e.push(t.get(i));return e}};a([l()],s.prototype,"loading",1);a([l()],s.prototype,"_hasRunInitialLoad",2);a([l()],s.prototype,"activeLayers",1);a([l()],s.prototype,"favoritesEnabled",2);a([l()],s.prototype,"recentlyUsedEnabled",2);a([l()],s.prototype,"hideTemplateDescription",2);a([l()],s.prototype,"filterText",2);a([l()],s.prototype,"recentFilterText",2);a([l()],s.prototype,"favoritesFilterText",2);a([l()],s.prototype,"selectedTemplateId",2);a([l()],s.prototype,"selectedTemplate",1);a([l()],s.prototype,"layers",2);a([l()],s.prototype,"restoreFavorites",2);a([l()],s.prototype,"restoreRecentlyUsed",2);a([l()],s.prototype,"applicationDisabledFunction",2);a([l()],s.prototype,"applicationFilterFunction",2);a([l()],s.prototype,"display",2);a([l()],s.prototype,"groupBy",2);a([l()],s.prototype,"hideTemplatesMode",2);a([l()],s.prototype,"disableTemplatesMode",2);a([l()],s.prototype,"groupByFunction",2);a([l()],s.prototype,"sectionSortBy",2);a([l()],s.prototype,"templateSortBy",2);a([l()],s.prototype,"sectionSortByFunction",2);a([l()],s.prototype,"templateSortByFunction",2);a([l()],s.prototype,"sharedTemplatesDisabled",2);a([l()],s.prototype,"excludeTables",2);a([l()],s.prototype,"favorites",2);a([l()],s.prototype,"effectiveTemplates",1);a([l()],s.prototype,"templateList",1);a([l()],s.prototype,"allTemplates",1);a([l()],s.prototype,"templateSetKey",1);a([l()],s.prototype,"disabledTemplates",1);a([l()],s.prototype,"templates",1);a([l()],s.prototype,"mapTemplates",2);a([l()],s.prototype,"organizedMapTemplates",1);a([l()],s.prototype,"fetchingTemplateMetaData",2);a([l()],s.prototype,"updating",1);a([l()],s.prototype,"applicationTemplates",2);a([l()],s.prototype,"favoriteTemplates",1);a([l()],s.prototype,"recentTemplates",1);a([l()],s.prototype,"recentlyUsed",2);a([l()],s.prototype,"view",2);s=a([x("components.feature-templates.FeatureTemplatesViewModel")],s);var P=S(s),u=class extends g{constructor(){super(...arguments),this._messages=F(),this.viewModel=P(this),this.favoritesEnabled=this.viewModel.favoritesEnabled,this.favorites=this.viewModel.favorites,this.restoreFavorites=this.viewModel.restoreFavorites,this.restoreRecentlyUsed=this.viewModel.restoreRecentlyUsed,this.recentlyUsed=this.viewModel.recentlyUsed,this.sharedTemplatesDisabled=this.viewModel.sharedTemplatesDisabled,this.filterText=this.viewModel.filterText,this.recentFilterText=this.viewModel.recentFilterText,this.favoritesFilterText=this.viewModel.favoritesFilterText,this.recentlyUsedEnabled=this.viewModel.recentlyUsedEnabled,this.excludeTables=this.viewModel.excludeTables,this.effectiveTemplates=this.viewModel.effectiveTemplates,this.applicationTemplates=this.viewModel.applicationTemplates,this.selectedTemplateId=this.viewModel.selectedTemplateId,this.selectedTemplate=this.viewModel.selectedTemplate,this.applicationFilterFunction=this.viewModel.applicationFilterFunction,this.applicationDisabledFunction=this.viewModel.applicationDisabledFunction,this.display=this.viewModel.display,this.groupBy=this.viewModel.groupBy,this.sectionSortBy=this.viewModel.sectionSortBy,this.templateSortBy=this.viewModel.templateSortBy,this.templateSortByFunction=this.viewModel.templateSortByFunction,this.sectionSortByFunction=this.viewModel.sectionSortByFunction,this.hideTemplatesMode=this.viewModel.hideTemplatesMode,this.disableTemplatesMode=this.viewModel.disableTemplatesMode,this.groupByFunction=this.viewModel.groupByFunction,this.hideTemplateDescription=this.viewModel.hideTemplateDescription,this.layers=this.viewModel.layers,this.view=M(this),this.autoDestroyDisabled=!1,this.updating=this.viewModel.updating,this.disabled=!1,this.showCollapseButton=!1,this.showFilter=!1,this.minRequiredFilterCount=2,this.arcgisPropertyChange=w()("effectiveTemplates","filterText","recentlyUsed","favorites"),this.arcgisReady=h(),this.arcgisTemplatesChanged=h(),this.arcgisSelectTemplate=h()}static{this.properties={favoritesEnabled:5,favorites:32,restoreFavorites:0,restoreRecentlyUsed:0,recentlyUsed:32,sharedTemplatesDisabled:5,filterText:1,recentFilterText:1,favoritesFilterText:1,recentlyUsedEnabled:5,excludeTables:5,effectiveTemplates:32,applicationTemplates:0,selectedTemplateId:1,selectedTemplate:32,applicationFilterFunction:0,applicationDisabledFunction:0,display:1,groupBy:1,sectionSortBy:1,templateSortBy:1,templateSortByFunction:0,sectionSortByFunction:0,hideTemplatesMode:1,disableTemplatesMode:1,groupByFunction:0,hideTemplateDescription:5,layers:0,view:0,referenceElement:1,autoDestroyDisabled:5,updating:32,disabled:5,showCollapseButton:5,showFilter:5,minRequiredFilterCount:9}}static{this.styles=U}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[v(()=>this.view,()=>{this.viewModel.view=this.view},{initial:!0}),v(()=>this.viewModel.templateSetKey,()=>{this.arcgisTemplatesChanged.emit()}),v(()=>[this.viewModel.activeLayers?.map(e=>e.id).join(","),this.viewModel?.applicationTemplates,this.viewModel?.sharedTemplatesDisabled],$(()=>this.viewModel.handleTemplateSourceDefinitionChanged(),10),{initial:!0})])}_handleSelectTemplate(e){this.selectedTemplateId=e.id,this.arcgisSelectTemplate.emit({template:e}),this.viewModel.addRecent(e)}_removeTemplateFromList(e,i){if(i==="favorites"){this.viewModel.removeFavorite(e);return}this.viewModel.removeRecent(e)}_renderTemplates(){return this.effectiveTemplates.length===0?r`<calcite-notice icon=list open class="filter-no-results"><div slot=message>${this._messages.noTemplates}</div></calcite-notice>`:r`<calcite-list .filterPlaceholder=${this._messages.filterPlaceholder??""} .filterText=${this.filterText} .label=${this._messages?.templates??""} .filterEnabled=${this.showFilter&&this.viewModel.templateList.length>=this.minRequiredFilterCount} selection-appearance=border selection-mode=single @calciteListFilter=${e=>{this.filterText=e.target.filterText}}>${this.display==="grouped"?this.effectiveTemplates.map(e=>r`<calcite-list-item-group .heading=${e.autoTranslate?this._messages[e.sectionName]??"":e.sectionName}>${e.templates.map(i=>r`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(i)} .label=${i.label} .selected=${i.id===this.selectedTemplateId} .description=${this.hideTemplateDescription?void 0:i.description} .value=${i.id} @calciteListItemSelect=${()=>{this._handleSelectTemplate(i)}}><arcgis-template-image slot=content-start .template=${i}></arcgis-template-image>${this._renderAddFavorite(i)}</calcite-list-item>`)}</calcite-list-item-group>`):this.viewModel.templateList.map(e=>r`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(e)} .label=${e.label} .selected=${e.id===this.selectedTemplateId} .description=${this.hideTemplateDescription?void 0:e.description} .value=${e.id} @calciteListItemSelect=${()=>{this._handleSelectTemplate(e)}}><arcgis-template-image slot=content-start .template=${e}></arcgis-template-image>${this._renderAddFavorite(e)}</calcite-list-item>`)}${this._renderFilteredEmpty()}</calcite-list>`}_renderAddFavorite(e){return this.viewModel.favoritesEnabled?r`<calcite-action slot=actions-end .icon=${this.viewModel.favorites.has(e.id)?"heart-f":"heart"} @click=${()=>{this.viewModel.favorites.has(e.id)?this.viewModel.removeFavorite(e):this.viewModel.addFavorite(e)}} .text=${this._messages.addFavorite??""}></calcite-action>`:""}_renderList(e){let i=e==="favorites"?this.viewModel.favoriteTemplates:this.viewModel.recentTemplates;return i.length===0?r`<calcite-notice icon=list open class="filter-no-results"><div slot=message>${e==="favorites"?this._messages.noFavorites:this._messages.noRecent}</div></calcite-notice>`:r`<calcite-list .filterText=${e==="favorites"?this.favoritesFilterText:this.recentFilterText} .filterPlaceholder=${this._messages.filterPlaceholder??""} .label=${(e==="favorites"?this._messages.favorites:this._messages.recent)??""} .filterEnabled=${this.showFilter} selection-appearance=border selection-mode=single @calciteListFilter=${o=>{this.filterText=o.target.filterText}}>${i.map(o=>r`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(o)} .label=${o.label} .description=${this.hideTemplateDescription?void 0:o.description} .value=${o.id} @calciteListItemSelect=${()=>{this._handleSelectTemplate(o)}}><arcgis-template-image slot=content-start .template=${o}></arcgis-template-image><calcite-action slot=actions-end icon=x @click=${()=>{this._removeTemplateFromList(o,e)}} .text=${(e==="favorites"?this._messages.removeFavorite:this._messages.removeRecent)??""}></calcite-action></calcite-list-item>`)}${this._renderFilteredEmpty()}</calcite-list>`}_renderFilteredEmpty(){return r`<calcite-notice icon=filter slot=filter-no-results open class="filter-no-results"><div slot=message>${this._messages.noMatchingTemplates}</div></calcite-notice>`}_renderContent(){return this.effectiveTemplates.length===0&&this.viewModel.loading?null:this.favoritesEnabled||this.recentlyUsedEnabled?r`<calcite-tabs class="feature-template-tabs"><calcite-tab-nav slot=title-group><calcite-tab-title icon-start=templates selected>${this._messages.templates}</calcite-tab-title>${this.recentlyUsedEnabled?r`<calcite-tab-title icon-start=clock>${this._messages.recent}</calcite-tab-title>`:""}${this.favoritesEnabled?r`<calcite-tab-title icon-start=heart>${this._messages.favorites}</calcite-tab-title>`:""}</calcite-tab-nav><calcite-tab selected>${this._renderTemplates()}</calcite-tab><calcite-tab>${this._renderList("recent")}</calcite-tab><calcite-tab>${this._renderList("favorites")}</calcite-tab></calcite-tabs>`:this._renderTemplates()}render(){return r`<div class="root">${this._renderContent()}${this.viewModel.updating||this.disabled?r`<calcite-scrim><calcite-loader scale=s label .hidden=${!this.viewModel.updating}></calcite-loader></calcite-scrim>`:null}</div>`}};b("arcgis-feature-templates",u);return u},"core/accessorSupport/decorators","core/Accessor","editing/templates/TemplateListItem","applications/Components/templateUtils","applications/Components/layerUtils","core/reactiveUtils",a,c,d,e,f,i)
|
|
2
|
+
import{a as $}from"./XEK22IDA.js";import i from"./TMJX7DFH.js";import f from"./YG4HDEP3.js";import"./VJVKFKSG.js";import e from"./ILBDNJQP.js";import{a as F}from"./5JADSW57.js";import d from"./4FBTH6YD.js";import c from"./KORK4WZ7.js";import{h as w}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import a from"./GNASFNLA.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{O as g,V as b,a as T,b as r,w as h}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([{property:l,subclass:x},B,_,{getAllStandardFeatureTemplatesForLayer:D,getTemplatesForLayers:L},{isTable:y,getEffectiveLayerCapabilities:E},{watch:v},,{a:M},,S,,{g:m,h:f}])=>{var U=T`:host{display:flex;position:relative;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.filter-no-results{padding:var(--calcite-spacing-md) var(--calcite-spacing-lg)}.root{display:flex;flex:1 1 auto;overflow:hidden auto;transition:max-height .25s ease-in-out}.root>*{width:100%;box-sizing:border-box}.feature-template-tabs{--calcite-tab-background-color: transparent}`,C=Object.defineProperty,R=Object.getOwnPropertyDescriptor,a=(t,e,i,o)=>{for(var n=o>1?void 0:o?R(e,i):e,p=t.length-1,c;p>=0;p--)(c=t[p])&&(n=(o?c(e,i,n):c(n))||n);return o&&n&&C(e,i,n),n};function I(t){switch(t){case"point":case"multipoint":case"polyline":case"polygon":case"extent":case"mesh":return t}return"noneSpecified"}var A=t=>I(t.layer.geometryType??""),s=class extends B{constructor(t){super(t),this._hasRunInitialLoad=!1,this.favoritesEnabled=!1,this.recentlyUsedEnabled=!1,this.hideTemplateDescription=!1,this.filterText="",this.recentFilterText="",this.favoritesFilterText="",this.display="grouped",this.groupBy="layer",this.hideTemplatesMode="never",this.disableTemplatesMode="never",this.sectionSortBy="system",this.templateSortBy="alphabetical",this.sharedTemplatesDisabled=!1,this.excludeTables=!1,this.favorites=new Set,this.fetchingTemplateMetaData=!1,this.recentlyUsed=[]}async handleTemplateSourceDefinitionChanged(){if(this._hasRunInitialLoad=!1,this.applicationTemplates){await this._restore();return}try{this.fetchingTemplateMetaData=!0;let t=this.activeLayers;if(await Promise.allSettled(t.map(e=>e.load())),this.sharedTemplatesDisabled){let e=[];for(let i of t){let o=D(i);o.length>0&&e.push({layer:i,templates:o})}this.mapTemplates=e;return}this.mapTemplates=await L(t,this.view,void 0,{returnVisibleTemplatesOnly:!0}),await this._restore()}catch{this.mapTemplates=[]}finally{this.fetchingTemplateMetaData=!1}}get loading(){return!this._hasRunInitialLoad||this.layers!==void 0||this.applicationTemplates!==void 0||!this.view?.ready}async addFavorite(t){this.favorites.add(t.id),this.favorites=new Set(this.favorites)}async removeFavorite(t){this.favorites.delete(t.id),this.favorites=new Set(this.favorites)}addRecent(t){if(!this.recentlyUsedEnabled)return;let e=this.recentlyUsed.filter(i=>i!==t.id);e.unshift(t.id)>20&&(e.length=20),this.recentlyUsed=e}async removeRecent(t){this.recentlyUsed=this.recentlyUsed.filter(e=>e!==t.id)}async _restore(){try{if(this.favoritesEnabled&&this.restoreFavorites){let t=await this.restoreFavorites();this.favorites=new Set(t??[])}}catch{}try{if(this.recentlyUsedEnabled&&this.restoreRecentlyUsed){let t=await this.restoreRecentlyUsed();this.recentlyUsed=t??[]}}catch{}}_sortTemplates(t){if(this.templateSortByFunction){let e=this.templateSortByFunction(t)??null;return e===null?t:e}return this.templateSortBy==="alphabetical"?t.toSorted((e,i)=>e.label.localeCompare(i.label)):t}_sortSections(t){if(this.sectionSortByFunction){let e=this.sectionSortByFunction(t);e&&(t=e)}else if(this.sectionSortBy==="alphabetical")t=t.toSorted((e,i)=>e.sectionName.localeCompare(i.sectionName));else if(this.groupBy==="geometry"&&!this.groupByFunction){let e={point:1,multipoint:2,polyline:3,polygon:4,extent:5,mesh:6,noneSpecified:7};t=t.toSorted((i,o)=>{let n=e[i.sectionName]??10,p=e[o.sectionName]??10;return n-p})}for(let e of t)e.templates=this._sortTemplates(e.templates);return t}_layerIsVisibleAtCurrentScale(t){if(!this.view)return!0;let e=t;f(t)&&(e=t.parent);let i=this.view.allLayerViews.find(o=>o.layer===e);if(!i)return!0;if(f(t)){let o=this.view.scale;if(i.visibleAtCurrentScale){let n=t.minScale,p=t.maxScale,c=!n,d=!p;return!c&&o<=n&&(c=!0),!d&&o>=p&&(d=!0),c&&d}}return i.visibleAtCurrentScale}get activeLayers(){let t=[];for(let e of this.layers??[])if(m(e))for(let i of e.sublayers)t.push(i);else t.push(e);if(this.layers===void 0||this.layers===null){for(let e of[...this.view?.map?.allLayers?.slice(0).reverse()??[],...this.excludeTables?[]:this.view?.map?.allTables?.slice(0).reverse()??[]])if(e.type==="feature"||e.type==="scene"||e.type==="geojson"||e.type==="oriented-imagery"||e.type==="knowledge-graph")t.push(e);else if(m(e))for(let i of e.sublayers)t.push(i)}return t}get selectedTemplate(){return this.allTemplates.find(t=>t.id===this.selectedTemplateId)}get effectiveTemplates(){return this.templates.map(t=>({...t,templates:t.templates.filter(e=>this.inclusionFilter(e))})).filter(t=>t.templates.length>0)}get templateList(){return this._sortTemplates(this.effectiveTemplates.flatMap(t=>t.templates))}get allTemplates(){return this._sortTemplates(this.templates.flatMap(t=>t.templates))}inclusionFilter(t){if(this.excludeTables&&y(t.layer)||this.applicationFilterFunction?.(t)===!1)return!1;let e=E(t.layer)?.operations;return e?.supportsEditing===!1&&!e?.supportsAdd?!1:y(t.layer)?!0:!(this.hideTemplatesMode==="visible"&&!t.layer.visible||this.hideTemplatesMode==="scale"&&!this._layerIsVisibleAtCurrentScale(t.layer))}get templateSetKey(){return this._sortTemplates(this.allTemplates).map(t=>t.id).join(",")}get disabledTemplates(){let t=new Set;for(let e of this.allTemplates){if(this.applicationDisabledFunction&&this.applicationDisabledFunction(e)){t.add(e);continue}if(!y(e.layer)){if(this.disableTemplatesMode==="visible"&&!e.layer.visible){t.add(e);continue}if(this.disableTemplatesMode==="scale"&&this.view&&!this._layerIsVisibleAtCurrentScale(e.layer)){t.add(e);continue}}}return t}get templates(){return this.applicationTemplates??this.organizedMapTemplates}get organizedMapTemplates(){if(this.groupByFunction||this.groupBy==="geometry"){let t=!this.groupByFunction,e=this.groupByFunction??A,i=new Map;for(let o of this.mapTemplates??[])for(let n of o.templates){let p=new _({template:n,layer:o.layer}),c=e(p);if(c!=null)if(i.has(c))i.get(c)?.templates.push(p);else{let d={sectionName:c,...t?{autoTranslate:!0}:{},templates:[p]};i.set(c,d)}}return this._sortSections(Array.from(i.values()))}return this._sortSections((this.mapTemplates??[]).map(({layer:t,templates:e})=>({sectionName:t.title??"",templates:e.map(i=>new _({layer:t,template:i}))})).filter(t=>t.templates.length>0))}get updating(){return this.fetchingTemplateMetaData}get favoriteTemplates(){let t=[];for(let e of this.effectiveTemplates)for(let i of e.templates)this.favorites.has(i.id)&&t.push(i);return t}get recentTemplates(){let t=new Map;for(let i of this.effectiveTemplates)for(let o of i.templates)t.set(o.id,o);let e=[];for(let i of this.recentlyUsed)t.has(i)&&e.push(t.get(i));return e}};a([l()],s.prototype,"loading",1);a([l()],s.prototype,"_hasRunInitialLoad",2);a([l()],s.prototype,"activeLayers",1);a([l()],s.prototype,"favoritesEnabled",2);a([l()],s.prototype,"recentlyUsedEnabled",2);a([l()],s.prototype,"hideTemplateDescription",2);a([l()],s.prototype,"filterText",2);a([l()],s.prototype,"recentFilterText",2);a([l()],s.prototype,"favoritesFilterText",2);a([l()],s.prototype,"selectedTemplateId",2);a([l()],s.prototype,"selectedTemplate",1);a([l()],s.prototype,"layers",2);a([l()],s.prototype,"restoreFavorites",2);a([l()],s.prototype,"restoreRecentlyUsed",2);a([l()],s.prototype,"applicationDisabledFunction",2);a([l()],s.prototype,"applicationFilterFunction",2);a([l()],s.prototype,"display",2);a([l()],s.prototype,"groupBy",2);a([l()],s.prototype,"hideTemplatesMode",2);a([l()],s.prototype,"disableTemplatesMode",2);a([l()],s.prototype,"groupByFunction",2);a([l()],s.prototype,"sectionSortBy",2);a([l()],s.prototype,"templateSortBy",2);a([l()],s.prototype,"sectionSortByFunction",2);a([l()],s.prototype,"templateSortByFunction",2);a([l()],s.prototype,"sharedTemplatesDisabled",2);a([l()],s.prototype,"excludeTables",2);a([l()],s.prototype,"favorites",2);a([l()],s.prototype,"effectiveTemplates",1);a([l()],s.prototype,"templateList",1);a([l()],s.prototype,"allTemplates",1);a([l()],s.prototype,"templateSetKey",1);a([l()],s.prototype,"disabledTemplates",1);a([l()],s.prototype,"templates",1);a([l()],s.prototype,"mapTemplates",2);a([l()],s.prototype,"organizedMapTemplates",1);a([l()],s.prototype,"fetchingTemplateMetaData",2);a([l()],s.prototype,"updating",1);a([l()],s.prototype,"applicationTemplates",2);a([l()],s.prototype,"favoriteTemplates",1);a([l()],s.prototype,"recentTemplates",1);a([l()],s.prototype,"recentlyUsed",2);a([l()],s.prototype,"view",2);s=a([x("components.feature-templates.FeatureTemplatesViewModel")],s);var P=S(s),u=class extends g{constructor(){super(...arguments),this._messages=F(),this.viewModel=P(this),this.favoritesEnabled=this.viewModel.favoritesEnabled,this.favorites=this.viewModel.favorites,this.restoreFavorites=this.viewModel.restoreFavorites,this.restoreRecentlyUsed=this.viewModel.restoreRecentlyUsed,this.recentlyUsed=this.viewModel.recentlyUsed,this.sharedTemplatesDisabled=this.viewModel.sharedTemplatesDisabled,this.filterText=this.viewModel.filterText,this.recentFilterText=this.viewModel.recentFilterText,this.favoritesFilterText=this.viewModel.favoritesFilterText,this.recentlyUsedEnabled=this.viewModel.recentlyUsedEnabled,this.excludeTables=this.viewModel.excludeTables,this.effectiveTemplates=this.viewModel.effectiveTemplates,this.applicationTemplates=this.viewModel.applicationTemplates,this.selectedTemplateId=this.viewModel.selectedTemplateId,this.selectedTemplate=this.viewModel.selectedTemplate,this.applicationFilterFunction=this.viewModel.applicationFilterFunction,this.applicationDisabledFunction=this.viewModel.applicationDisabledFunction,this.display=this.viewModel.display,this.groupBy=this.viewModel.groupBy,this.sectionSortBy=this.viewModel.sectionSortBy,this.templateSortBy=this.viewModel.templateSortBy,this.templateSortByFunction=this.viewModel.templateSortByFunction,this.sectionSortByFunction=this.viewModel.sectionSortByFunction,this.hideTemplatesMode=this.viewModel.hideTemplatesMode,this.disableTemplatesMode=this.viewModel.disableTemplatesMode,this.groupByFunction=this.viewModel.groupByFunction,this.hideTemplateDescription=this.viewModel.hideTemplateDescription,this.layers=this.viewModel.layers,this.view=M(this),this.autoDestroyDisabled=!1,this.updating=this.viewModel.updating,this.disabled=!1,this.showCollapseButton=!1,this.showFilter=!1,this.minRequiredFilterCount=2,this.arcgisPropertyChange=w()("effectiveTemplates","filterText","recentlyUsed","favorites"),this.arcgisReady=h(),this.arcgisTemplatesChanged=h(),this.arcgisSelectTemplate=h()}static{this.properties={favoritesEnabled:5,favorites:32,restoreFavorites:0,restoreRecentlyUsed:0,recentlyUsed:32,sharedTemplatesDisabled:5,filterText:1,recentFilterText:1,favoritesFilterText:1,recentlyUsedEnabled:5,excludeTables:5,effectiveTemplates:32,applicationTemplates:0,selectedTemplateId:1,selectedTemplate:32,applicationFilterFunction:0,applicationDisabledFunction:0,display:1,groupBy:1,sectionSortBy:1,templateSortBy:1,templateSortByFunction:0,sectionSortByFunction:0,hideTemplatesMode:1,disableTemplatesMode:1,groupByFunction:0,hideTemplateDescription:5,layers:0,view:0,referenceElement:1,autoDestroyDisabled:5,updating:32,disabled:5,showCollapseButton:5,showFilter:5,minRequiredFilterCount:9}}static{this.styles=U}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[v(()=>this.view,()=>{this.viewModel.view=this.view},{initial:!0}),v(()=>this.viewModel.templateSetKey,()=>{this.arcgisTemplatesChanged.emit()}),v(()=>[this.viewModel.activeLayers?.map(e=>e.id).join(","),this.viewModel?.applicationTemplates,this.viewModel?.sharedTemplatesDisabled],$(()=>this.viewModel.handleTemplateSourceDefinitionChanged(),10),{initial:!0})])}_handleSelectTemplate(e){this.selectedTemplateId=e.id,this.arcgisSelectTemplate.emit({template:e}),this.viewModel.addRecent(e)}_removeTemplateFromList(e,i){if(i==="favorites"){this.viewModel.removeFavorite(e);return}this.viewModel.removeRecent(e)}_renderTemplates(){return this.effectiveTemplates.length===0?r`<calcite-notice icon=list open class="filter-no-results"><div slot=message>${this._messages.noTemplates}</div></calcite-notice>`:r`<calcite-list .filterPlaceholder=${this._messages.filterPlaceholder??""} .filterText=${this.filterText} .label=${this._messages?.templates??""} .filterEnabled=${this.showFilter&&this.viewModel.templateList.length>=this.minRequiredFilterCount} selection-appearance=border selection-mode=single @calciteListFilter=${e=>{this.filterText=e.target.filterText}}>${this.display==="grouped"?this.effectiveTemplates.map(e=>r`<calcite-list-item-group .heading=${e.autoTranslate?this._messages[e.sectionName]??"":e.sectionName}>${e.templates.map(i=>r`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(i)} .label=${i.label} .selected=${i.id===this.selectedTemplateId} .description=${this.hideTemplateDescription?void 0:i.description} .value=${i.id} @calciteListItemSelect=${()=>{this._handleSelectTemplate(i)}}><arcgis-template-image slot=content-start .template=${i}></arcgis-template-image>${this._renderAddFavorite(i)}</calcite-list-item>`)}</calcite-list-item-group>`):this.viewModel.templateList.map(e=>r`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(e)} .label=${e.label} .selected=${e.id===this.selectedTemplateId} .description=${this.hideTemplateDescription?void 0:e.description} .value=${e.id} @calciteListItemSelect=${()=>{this._handleSelectTemplate(e)}}><arcgis-template-image slot=content-start .template=${e}></arcgis-template-image>${this._renderAddFavorite(e)}</calcite-list-item>`)}${this._renderFilteredEmpty()}</calcite-list>`}_renderAddFavorite(e){return this.viewModel.favoritesEnabled?r`<calcite-action slot=actions-end .icon=${this.viewModel.favorites.has(e.id)?"heart-f":"heart"} @click=${()=>{this.viewModel.favorites.has(e.id)?this.viewModel.removeFavorite(e):this.viewModel.addFavorite(e)}} .text=${this._messages.addFavorite??""}></calcite-action>`:""}_renderList(e){let i=e==="favorites"?this.viewModel.favoriteTemplates:this.viewModel.recentTemplates;return i.length===0?r`<calcite-notice icon=list open class="filter-no-results"><div slot=message>${e==="favorites"?this._messages.noFavorites:this._messages.noRecent}</div></calcite-notice>`:r`<calcite-list .filterText=${e==="favorites"?this.favoritesFilterText:this.recentFilterText} .filterPlaceholder=${this._messages.filterPlaceholder??""} .label=${(e==="favorites"?this._messages.favorites:this._messages.recent)??""} .filterEnabled=${this.showFilter} selection-appearance=border selection-mode=single @calciteListFilter=${o=>{this.filterText=o.target.filterText}}>${i.map(o=>r`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(o)} .label=${o.label} .description=${this.hideTemplateDescription?void 0:o.description} .value=${o.id} @calciteListItemSelect=${()=>{this._handleSelectTemplate(o)}}><arcgis-template-image slot=content-start .template=${o}></arcgis-template-image><calcite-action slot=actions-end icon=x @click=${()=>{this._removeTemplateFromList(o,e)}} .text=${(e==="favorites"?this._messages.removeFavorite:this._messages.removeRecent)??""}></calcite-action></calcite-list-item>`)}${this._renderFilteredEmpty()}</calcite-list>`}_renderFilteredEmpty(){return r`<calcite-notice icon=filter slot=filter-no-results open class="filter-no-results"><div slot=message>${this._messages.noMatchingTemplates}</div></calcite-notice>`}_renderContent(){return this.effectiveTemplates.length===0&&this.viewModel.loading?null:this.favoritesEnabled||this.recentlyUsedEnabled?r`<calcite-tabs class="feature-template-tabs"><calcite-tab-nav slot=title-group><calcite-tab-title icon-start=templates selected>${this._messages.templates}</calcite-tab-title>${this.recentlyUsedEnabled?r`<calcite-tab-title icon-start=clock>${this._messages.recent}</calcite-tab-title>`:""}${this.favoritesEnabled?r`<calcite-tab-title icon-start=heart>${this._messages.favorites}</calcite-tab-title>`:""}</calcite-tab-nav><calcite-tab selected>${this._renderTemplates()}</calcite-tab><calcite-tab>${this._renderList("recent")}</calcite-tab><calcite-tab>${this._renderList("favorites")}</calcite-tab></calcite-tabs>`:this._renderTemplates()}render(){return r`<div class="root">${this._renderContent()}${this.viewModel.updating||this.disabled?r`<calcite-scrim><calcite-loader scale=s label .hidden=${!this.viewModel.updating}></calcite-loader></calcite-scrim>`:null}</div>`}};b("arcgis-feature-templates",u);return u},"core/accessorSupport/decorators","core/Accessor","editing/templates/TemplateListItem","applications/Components/templateUtils","applications/Components/layerUtils","core/reactiveUtils",a,c,d,e,f,i)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{b as w,c as g}from"./
|
|
2
|
+
import{b as w,c as g}from"./VSH4WLRS.js";import{b,c as a,f}from"./XSCEZHHS.js";import{c as d,e as E}from"./XPEGBUNJ.js";import{c}from"./XURWCCLX.js";import{M as m,b as l,w as r,y as h}from"./GFTZ7EZP.js";export default $arcgis.t(([{when:v,watch:y}])=>{function _(i){return{defaultPopupTemplateEnabled:i.defaultPopupTemplateEnabled}}var P=class extends h{constructor(e){super(e),this.direction=f(),this.popupRef=m(),this.slotGroupRefs=w(),this.attributionHeight=0,this._uiContainer=null,this.component.listenOn(globalThis,"unhandledrejection",o=>{let t=o.reason;if(t?.name==="webgl:required"){let{name:p}=t;this.webGLError={name:p}}})}hostLifecycle(){return[v(()=>this.component.view.ready,()=>{this._assignDefaultPopup()}),v(()=>this.component.view.popup?.visible,()=>{this.popupElement?.open&&(this.popupElement.open=!1)}),this.component.view.on("click",[],e=>{let o=e.native;e.button!==0||o?.ctrlKey||o?.metaKey||this._handleOpenPopup(e)},-2)]}async openPopup(e){if(this._assignDefaultPopup(),this.closePopup(),this.popupElement){await this.popupElement.componentOnReady(),this.popupElement.open=!0;let{fetchFeatures:o,shouldFocus:t,title:p,featureStream:n,promises:s,...u}=e;delete e.fetchFeatures,s&&s.length>0&&Object.assign(u,{promises:s}),Object.assign(this.popupElement,u),n&&(this.popupElement.featureStream=n),p!==void 0&&(this.popupElement.heading=p),t&&await this.popupElement.setFocus(),o&&!n&&await this.popupElement.fetchFeatures()}else await this.component.view.openPopup(e)}closePopup(){this.popupElement&&(this.popupElement.open=!1),this.component.view.closePopup()}_assignDefaultPopup(){this.popupRef.value&&!this.popupElement&&(this.popupElement=this.popupRef.value,this.popupElement.referenceElement=this.component.el,this.popupElement.view=this.component.view)}handleAttributionHeightChange(e){if(!(this.attributionHeight===e||!this.component.el.shadowRoot)){if(this.attributionHeight=e,!this._uiContainer){let o=this.component.el.shadowRoot.querySelector(".arcgis-map-container-ui");this._uiContainer=o}this._uiContainer?.style.setProperty("--arcgis-internal-attribution-space-top",`${this.attributionHeight}px`)}}_maybeDisableViewPopup(){this.component.view&&(this.component.popupComponentEnabled||this.popupElement)&&(this.previousViewPopupEnabled=this.component.view.popupEnabled,this.component.view.popupEnabled=!1)}_maybeResetViewPopup(){this.component.view&&this.previousViewPopupEnabled!==void 0&&(this.component.view.popupEnabled=this.previousViewPopupEnabled,this.previousViewPopupEnabled=void 0)}async _handleOpenPopup(e){if(this._assignDefaultPopup(),!this.component.popupDisabled){this._maybeDisableViewPopup();try{if(this.popupElement){let o=this.component.view.fetchPopupFeatures({x:e.x,y:e.y},_(this.popupElement));o?await this.openPopup({location:e.mapPoint??void 0,featureStream:o}):this.popupElement.open&&this.closePopup()}}finally{this._maybeResetViewPopup()}}}_handlePopupSlotChange(e){let o=c(e.target,"arcgis-popup");!this.popupElement&&o.length?this.popupElement=o[0]:o.length||(this.popupElement=void 0)}_webGLErrorAlert(){return this.webGLError?l`<arcgis-webgl-error .errorName=${this.webGLError.name}></arcgis-webgl-error>`:null}render(){return g({direction:this.direction,popupComponentEnabled:this.component.popupComponentEnabled,slotGroupRefs:this.slotGroupRefs,handlePopupSlotChange:e=>this._handlePopupSlotChange(e),webGLErrorElement:this._webGLErrorAlert(),popupElement:this.popupRef})}};function M(i){b((e,o)=>{let t=()=>{if(i.attributionMode!=="auto")return;let p=E(i.el);i.view.attributionMode!==p&&(i.view.attributionMode=p)};o.onLifecycle(()=>(t(),d(i.el,["class"],t))),o.onUpdate(p=>{p.has("attributionMode")&&i.attributionMode==="auto"&&t()})})}var O=a((i,e)=>{let o=r();return e.onLifecycle(()=>y(()=>{let{map:t}=i;if(!t||t.destroyed)return[];let p=[];return t.loadError&&p.push(t),t.basemap?.loadError&&p.push(t.basemap),t.ground.loadError&&p.push(t.ground),[...t.allLayers,...t.allTables].forEach(n=>{n.loadError&&p.push(n)}),p},t=>{t.length&&(i.loadErrorSources=t,o.emit())})),o}),x=a((i,e)=>{let o=r();return e.onLifecycle(()=>y(()=>i.view?.readyState,t=>{(t==="map-content-error"||t==="rendering-error")&&o.emit()})),o});return{a:P,b:M,c:O,d:x}},"core/reactiveUtils")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{A as Ea,B as Ia,C as Ka,D as La,E as Ma,F as Na,G as Oa,H as Pa,I as Qa,J as Ra,K as Sa,L as Ta,M as Va,N as Wa,O as Xa,P as Ya,Q as Za,R as _a,S as $a,a as R,b as T,c as U,d as V,e as W,f as X,g as Y,h as _,i as $,j as aa,k as ba,l as ca,m as fa,n as ga,o as ha,p as ia,q as ja,r as oa,s as pa,t as qa,u as ra,v as va,w as xa,x as ya,y as za,z as Aa}from"./
|
|
2
|
+
import{A as Ea,B as Ia,C as Ka,D as La,E as Ma,F as Na,G as Oa,H as Pa,I as Qa,J as Ra,K as Sa,L as Ta,M as Va,N as Wa,O as Xa,P as Ya,Q as Za,R as _a,S as $a,a as R,b as T,c as U,d as V,e as W,f as X,g as Y,h as _,i as $,j as aa,k as ba,l as ca,m as fa,n as ga,o as ha,p as ia,q as ja,r as oa,s as pa,t as qa,u as ra,v as va,w as xa,x as ya,y as za,z as Aa}from"./KM2GXXBO.js";import{a as Fa}from"./QMQV37ML.js";import{a as da,b as ea,c as sa,d as Da}from"./GIOUZTHM.js";import{A as B,B as C,C as D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R as S,U as ka,V as la,W as ma,X as na,c as r,fa as ta,ga as ua,ha as wa,ia as Ba,ja as Ca,pa as Ga,q as s,qa as Ha,ra as Ja,sa as Ua,t,u,v,w,x,y,z as A}from"./TZHXSIXK.js";import{R as o,S as p,T as q,b as n}from"./PLTLRYBF.js";import{a,b,c,d,e}from"./T2DT5I33.js";import{E as g,L as h,N as i,O as j,P as k,Q as l,R as m,W as z,X as Z,l as f}from"./6NWR2Z4F.js";import"./H6RQVSYM.js";export{j as ArrayDisposer,D as BlendMode,ca as Bullet,ea as Button,Wa as CSVParser,$ as CanvasLayer,_ as CanvasRenderer,Ga as Chart,ga as Circle,Na as CirclePattern,q as Color,Ua as ColorSet,na as Component,fa as ConfirmButton,P as Container,m as CounterDisposer,ma as DataItem,Xa as DataProcessor,X as DateFormatter,i as Disposer,Y as DurationFormatter,sa as EditableLabel,ia as Ellipse,y as Entity,pa as Gradient,La as GrainPattern,E as Graphics,J as GridLayout,ra as HeatLegend,H as HorizontalLayout,R as InterfaceColors,Va as JSONParser,la as JsonData,S as Label,G as Layout,va as Legend,wa as Line,Oa as LinePattern,qa as LinearGradient,za as Link,ka as ListData,r as ListTemplate,ba as Modal,k as MultiDisposer,l as MutableValueDisposer,V as NumberFormatter,Za as NumericStepper,ya as OrthogonalLine,Sa as PathPattern,B as Pattern,Ta as PatternSet,a as Percent,Aa as Picture,C as PicturePattern,T as PointedRectangle,ha as Polygon,_a as ProgressPie,Ma as RadialGradient,Ca as RadialLabel,Ba as RadialText,F as Rectangle,Pa as RectanglePattern,aa as Root,da as RoundedRectangle,Da as Scrollbar,Ha as SerialChart,Ia as SerialChartContainer,ua as Series,Fa as Slice,Ea as Slider,A as Sprite,Ya as SpriteResizer,ja as Star,Qa as StarPattern,z as Template,Q as Text,K as TextFormatter,Z as Theme,Ja as Tick,W as Timezone,U as Tooltip,xa as Triangle,Ra as TrianglePattern,I as VerticalLayout,Ka as ZoomTools,oa as ZoomableContainer,v as addLicense,g as array,p as color,w as disposeAllRootElements,t as ease,N as getCustomDataValue,x as getRootById,M as getTagValue,O as getTagValueFromObject,s as math,$a as net,h as object,c as p0,d as p100,e as p50,b as percent,L as populateString,n as ready,u as registry,ta as time,f as type,o as utils};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import e from"./TMJX7DFH.js";import{a as b}from"./5JADSW57.js";import{h as G}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{A as m,M as y,N as u,O as w,S as v,V as f,a as p,b as c,n as a,o,q as h,w as d}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([C,L,$,k,S,x,{b:l,f:R}])=>{var z=p`.aggregated-geometry-container{display:flex;align-items:center;justify-content:space-between}.geometry-heading{margin:0 0 var(--calcite-spacing-xxs);font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}`,g=class extends w{constructor(){super(...arguments),this._messages=b({blocking:!0}),this.#s=`aggregated-geometry-graphics-${m()}`,this.#e=y(),this.defaultSelectionSize=12,this.emitsArcgisResultReady=!0,this.geometryGraphics=[],this.hideGraphics=!1,this.state="ready",this.graphicsColor=new C([255,255,0,.6]),this.autoDestroyDisabled=!1,this.arcgisPropertyChange=G()("defaultSelectionSize","hideGraphics","geometryGraphics","graphicsColor","state"),this.arcgisResultReady=d()}static{this.properties={defaultSelectionSize:9,emitsArcgisResultReady:32,heading:1,traceResult:0,geometryGraphics:32,hideGraphics:5,state:32,graphicsColor:0,graphicsLayer:0,view:0,autoDestroyDisabled:5}}static{this.styles=z}#s;#t;#e;clearResult(){this.#e.value&&(this.#e.value.open=!1);let{graphicsLayer:e}=this;e&&(e.removeMany(this.geometryGraphics),e===this.#t&&(this.view?.map?.remove(e),this.graphicsLayer=void 0,this.#t=void 0)),a(()=>this.geometryGraphics=[]),a(()=>this.state="ready")}async destroy(){this.clearResult(),await this.manager.destroy()}connectedCallback(){super.connectedCallback(),this.view&&this.graphicsLayer&&(l(this.view,this.graphicsLayer),this.arcgisResultReady.emit())}load(){this.traceResult&&this.#i()}willUpdate(e){if(e.has("traceResult")&&this.#i(),e.has("view")){let t=e.get("view");t?.map&&this.graphicsLayer&&t.map.remove(this.graphicsLayer),this.#i()}e.has("hideGraphics")&&this.#c(),e.has("graphicsColor")&&this.#l()}loaded(){this.traceResult&&(this.traceResult.aggregatedGeometry||o("warn",this,h("traceResult.aggregatedGeometry")),this.view?this.view.map||o("error",this,h("The property `view` was provided, but `view.map` is null. Cannot draw aggregated geometry.")):o("error",this,h("view")))}#r(e){let{line:t,multipoint:i,polygon:s}=e;a(()=>{this.geometryGraphics=[t,i,s].filter(r=>r!=null).map(r=>this.#h(r))})}#o(e){let t=this.#s,i=e.map?.findLayerById(t);return i&&R(i)?i:new $({id:t,listMode:"hide",title:t})}#h(e){return new L({geometry:e,symbol:this.#a(e)})}#a(e){let{defaultSelectionSize:t,graphicsColor:i}=this;switch(e.type){case"multipoint":return new x({color:i,size:t,outline:{color:i,width:0}});case"polygon":return new k({color:i,outline:{color:i,width:t}});case"polyline":return new S({color:i,width:t})}}#c(){this.hideGraphics?(this.graphicsLayer?.removeAll(),this.#e.value?.open&&(this.#e.value.open=!1)):this.graphicsLayer?.addMany(this.geometryGraphics)}#i(){this.clearResult();let e=()=>{a(()=>this.state="ready"),this.arcgisResultReady.emit()};if(!this.traceResult?.aggregatedGeometry||!this.view?.map){e();return}a(()=>this.state="loading"),this.graphicsLayer||(this.graphicsLayer=this.#o(this.view),this.#t=this.graphicsLayer,l(this.view,this.graphicsLayer)),this.#r(this.traceResult.aggregatedGeometry),this.hideGraphics||this.graphicsLayer.addMany(this.geometryGraphics),e()}#l(){this.geometryGraphics.forEach(e=>{let t=e.geometry;e.symbol=this.#a(t)})}render(){if(!this.traceResult?.aggregatedGeometry)return null;let{graphicsColor:e,heading:t,hideGraphics:i,_messages:s}=this;return c`${t&&c`<div class="geometry-heading">${t}</div>`||""}<div class="aggregated-geometry-container"><calcite-switch .checked=${!i} .label=${s.labels.showGraphicsToggle} label-text-end=${s.showGraphics??v} @calciteSwitchChange=${()=>this.hideGraphics=!this.hideGraphics}></calcite-switch><calcite-swatch .color=${e.toCss()} .disabled=${i} id=geometry-color-swatch .label=${s.labels.aggregatedGeometryGraphicsColor}></calcite-swatch><calcite-popover closable .heading=${s.headings.setColor} .label=${s.headings.setColor} reference-element=geometry-color-swatch ${u(this.#e)}><calcite-color-picker alpha-channel channels-disabled clearable .disabled=${i} hex-disabled saved-disabled .value=${e.toCss(!0)} @calciteColorPickerChange=${r=>{let n=r.target.value;n&&(this.graphicsColor=new C(n))}}></calcite-color-picker></calcite-popover></div>`}};f("arcgis-utility-network-trace-aggregated-geometry-result-item",g);return g},"Color","Graphic","layers/GraphicsLayer","symbols/SimpleFillSymbol","symbols/SimpleLineSymbol","symbols/SimpleMarkerSymbol",e)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{T as e}from"./
|
|
2
|
+
import{T as e}from"./PLTLRYBF.js";import"./T2DT5I33.js";import{X as t}from"./6NWR2Z4F.js";import"./H6RQVSYM.js";var r=class extends t{setupDefaultRules(){super.setupDefaultRules(),this.rule("InterfaceColors").setAll({stroke:e.fromHex(0),fill:e.fromHex(2829099),primaryButton:e.lighten(e.fromHex(6788316),-.2),primaryButtonHover:e.lighten(e.fromHex(6779356),-.2),primaryButtonDown:e.lighten(e.fromHex(6872181),-.2),primaryButtonActive:e.lighten(e.fromHex(6872182),-.2),primaryButtonText:e.fromHex(16777215),primaryButtonStroke:e.lighten(e.fromHex(6788316),-.2),secondaryButton:e.fromHex(3881787),secondaryButtonHover:e.lighten(e.fromHex(3881787),.1),secondaryButtonDown:e.lighten(e.fromHex(3881787),.15),secondaryButtonActive:e.lighten(e.fromHex(3881787),.2),secondaryButtonText:e.fromHex(12303291),secondaryButtonStroke:e.lighten(e.fromHex(3881787),-.2),grid:e.fromHex(12303291),background:e.fromHex(0),alternativeBackground:e.fromHex(16777215),text:e.fromHex(16777215),alternativeText:e.fromHex(0),disabled:e.fromHex(11382189),positive:e.fromHex(5288704),negative:e.fromHex(11730944)})}};var b=r;export{b as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{X as i}from"./
|
|
2
|
+
import{X as i}from"./6NWR2Z4F.js";import"./H6RQVSYM.js";var t=class extends i{setupDefaultRules(){super.setupDefaultRules(),this.rule("Component").setAll({interpolationDuration:600}),this.rule("Hierarchy").set("animationDuration",600),this.rule("Scrollbar").set("animationDuration",600),this.rule("Tooltip").set("animationDuration",300),this.rule("MapChart").set("animationDuration",1e3),this.rule("MapChart").set("wheelDuration",300),this.rule("Entity").setAll({stateAnimationDuration:600}),this.rule("Sprite").states.create("default",{stateAnimationDuration:600}),this.rule("Tooltip",["axis"]).setAll({animationDuration:200}),this.rule("WordCloud").set("animationDuration",500),this.rule("Polygon").set("animationDuration",600),this.rule("ArcDiagram").set("animationDuration",600)}};var n=t;export{n as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as o}from"./UNPUCYYB.js";import e from"./ILBDNJQP.js";import{a as x}from"./5JADSW57.js";import d from"./4FBTH6YD.js";import c from"./KORK4WZ7.js";import{h as C}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import b from"./GNASFNLA.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{N as I,O as y,Q as n,S as h,V as w,a as f,b as a,w as g}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([{substitute:m,formatNumber:p},{isFeatureItem:M,isLayerItem:v,isGroupLayerItem:L},S,,,,F])=>{var c={container:"container",flowItem:"flow-item",layerDropdown:"layer-dropdown",listItemFeature:"feature",listItemFeatureIcon:"feature-icon",listItemIcon:"icon",itemCount:"item-count",notice:"notice",panel:"panel"},T=f`:host{width:100%;display:flex;height:100%;flex:1 1 0;>*{align-items:center;align-self:center;width:100%;height:100%}}.root{display:flex;flex-direction:column}calcite-flow{height:100%;width:100%}.container,.flow-item,.panel{display:flex}.flow-item{overflow:auto}.flow-item[scale=s] .container{gap:var(--calcite-spacing-sm);padding:var(--calcite-spacing-sm) 0}.flow-item[scale=m] .container{gap:var(--calcite-spacing-md);padding:var(--calcite-spacing-md) 0}.flow-item[scale=l] .container{gap:var(--calcite-spacing-lg);padding:var(--calcite-spacing-lg) 0}.container{flex-direction:column;background-color:var(--calcite-color-foreground-1)}.container>*{background-color:var(--calcite-color-foreground-1)}.container>*[scale=s]{padding:0 var(--calcite-spacing-sm) 0 var(--calcite-spacing-sm);font-size:var(--calcite-font-size-sm)}.container>*[scale=m]{padding:0 var(--calcite-spacing-md) 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size-md)}.container>*[scale=l]{padding:0 var(--calcite-spacing-lg) 0 var(--calcite-spacing-lg);font-size:var(--calcite-font-size-lg)}.icon{display:flex;align-items:center;justify-content:center;min-width:var(--calcite-spacing-xxl);height:var(--calcite-spacing-xxl)}.icon span{line-height:0}.feature-icon .icon{margin-inline-start:calc(var(--calcite-spacing-lg) * -1)}calcite-chip{align-self:center;margin-inline:var(--calcite-spacing-xxs);line-height:initial}.item-count{display:flex;gap:.5em;align-items:center}`,_=F(S),$=class extends y{constructor(){super(...arguments),this.viewModel=_(this),this.messages=x(),this.#i=!1,this.#t=new WeakSet,this.#e=null,this.autoDestroyDisabled=!1,this.icon="selection",this.view=this.viewModel.view,this.displayMode="group",this.filterText=this.viewModel.filterText,this.hideChip=!1,this.hideChipCloseButton=!1,this.hideFilter=!1,this.hideFilterNotice=!1,this.hideHeader=!1,this.hideItemCloseActions=!1,this.hideItemCount=!1,this.hideItemIcons=!1,this.hideItemMenus=!1,this.hideLayerFilter=!1,this.hideMenu=!1,this.hideZoomToButton=!1,this.highlightOnHoverDisabled=!1,this.layer=this.viewModel.layer,this.maxVisibleFeatureCountPerLayer=this.viewModel.maxVisibleFeatureCountPerLayer,this.menuScale="m",this.selectionManager=this.viewModel.selectionManager,this.visualScale="s",this.arcgisClear=g(),this.arcgisPropertyChange=C()("state"),this.arcgisReady=g()}static{this.properties={hasFilterText:16,isUpdating:16,itemWithOpenMenu:16,autoDestroyDisabled:5,disabled:5,icon:1,label:1,referenceElement:1,view:0,activeLayerItem:32,afterListItemSelect:0,allLayerItems:32,count:32,displayMode:1,effectiveSelectionManager:32,filterText:1,hideChip:5,hideChipCloseButton:5,hideFilter:5,hideFilterNotice:5,hideHeader:5,hideItemCloseActions:5,hideItemCount:5,hideItemIcons:5,hideItemMenus:5,hideLayerFilter:5,hideMenu:5,hideZoomToButton:5,highlightOnHoverDisabled:5,listItemActionConfigurations:0,listItemUnavailableFunction:0,layer:0,layerItems:32,maxVisibleFeatureCountExceeded:32,maxVisibleFeatureCountPerLayer:9,menuScale:1,selectionManager:0,state:32,visibleFeatureCount:32,visibleFeatureItems:32,visibleLayerCount:32,visualScale:1}}static{this.styles=T}#i;#t;#e;get hasFilterText(){let{filterText:e}=this;return e!=null&&e!==""}get isUpdating(){return this.viewModel.isUpdating}get disabled(){return this.#i||this.state==="disabled"}set disabled(e){this.#i=e}get activeLayerItem(){return this.viewModel.activeLayerItem}get allLayerItems(){return this.viewModel.allLayerItems}get count(){return this.viewModel.effectiveCount}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get layerItems(){return this.viewModel.layerItems}get maxVisibleFeatureCountExceeded(){return this.viewModel.maxVisibleFeatureCountExceeded}get state(){return this.viewModel.state}get visibleFeatureCount(){return this.viewModel.visibleFeatureCount}get visibleFeatureItems(){return this.viewModel.visibleFeatureItems}get visibleLayerCount(){return this.viewModel.visibleLayerCount}async clear(){this.viewModel.clear()}async collapseAll(){this.viewModel.collapseAll()}async deselectItem(e){this.viewModel.deselectItem(e)}async destroy(){this.viewModel?.destroy()}async expandAll(){this.viewModel.expandAll()}async findLayerItem(e){return this.viewModel.findLayerItem(e)}async findParentItem(e){return this.viewModel.findParentItem(e)}async goToItem(e){this.viewModel.goToItem(e)}async removeFromSelection(e){this.viewModel.removeFromSelection(e)}async replace(e){this.viewModel.replace(e)}async selectItem(e){this.viewModel.selectSingleItem(e)}connectedCallback(){super.connectedCallback(),this.#e=new IntersectionObserver((e,t)=>{let{messages:s}=this;e.forEach(i=>{if(!i.isIntersecting)return;let l=i.target;if(this.#t.has(l)){t.unobserve(l);return}let d=l.getAttribute("data-thumbnail-key"),r=d?this._getFeatureItemByThumbnailKey(d):void 0;if(!r)return;this.#t.add(l);let u=r.title&&s.previewTemplateAriaLabel?m(s.previewTemplateAriaLabel,{label:r.title}):s.preview;if(r.thumbnail){l.appendChild(r.thumbnail);return}r.fetchThumbnail({ariaLabel:u}).then(b=>b&&l.appendChild(b)).catch(()=>this.#t.delete(l))})})}disconnectedCallback(){super.disconnectedCallback(),this.#e?.disconnect()}_isDropdownItemVisible(e,t){let{hidden:s,type:i}=t;return(typeof s=="function"?s({item:e}):s)?!1:!!(!i||i==="feature"&&M(e)||i==="layer"&&v(e)||i==="group"&&L(e))}_handleClearSelection(){this.clear(),this.arcgisClear.emit()}_onFeatureItemBlur(){this.highlightOnHoverDisabled||this.viewModel.removeTemporaryHighlight()}_onFeatureItemFocus(e){this.highlightOnHoverDisabled||this.viewModel.addTemporaryHighlight(e)}_closeItemMenu(e){(!e||e===this.itemWithOpenMenu)&&(this.itemWithOpenMenu=void 0)}_getFeatureItemByThumbnailKey(e){return this.viewModel.visibleFeatureItems.find(t=>t.thumbnailKey===e)}_isItemUnavailable(e){return!e.layerIsVisible||this.listItemUnavailableFunction?.({item:e})||!1}_makeObserverRef(){let e=null;return t=>{t?(e=t,this.#e?.observe(t)):e&&(this.#e?.unobserve(e),e=null)}}_afterListItemSelect(e,t){t.stopPropagation(),this._closeItemMenu(),this.afterListItemSelect?.({item:e})}_getTooltipForChip(e){let{messages:t}=this;return!t?.selectionCount||!t?.clearSelectionCount?"":this.hideChipCloseButton?m(t.selectionCount,{count:e}):m(t.clearSelectionCount,{count:e})}#n(){if(this.hideChip||this.hideHeader)return;let{count:e}=this,t=p(e),s=!this.hideChipCloseButton&&e>0;return a`<calcite-chip appearance=outline .closable=${s} .closed=${e===0} .disabled=${this.disabled} .icon=${this.maxVisibleFeatureCountExceeded?"exclamation-mark-triangle":void 0} .label=${t} .scale=${this.visualScale} slot=header-actions-end title=${this._getTooltipForChip(e)??h} @calciteChipClose=${this._handleClearSelection}>${t}</calcite-chip>`}#c(){if(this.hideHeader||this.hideMenu)return;let{menuScale:e,messages:t}=this,s=this.disabled||this.count===0;return[a`<calcite-action .disabled=${s} icon=reset .scale=${e} slot=header-menu-actions .text=${t.clear??""} text-enabled @click=${this.clear}></calcite-action>`,a`<calcite-action .disabled=${s} icon=folders .scale=${e} slot=header-menu-actions .text=${t.collapseAll??""} text-enabled @click=${this.collapseAll}></calcite-action>`]}#r(){let{layerItems:e,messages:t}=this;if(this.count===0||e.length<2||this.hideLayerFilter)return;let s=t.allLayersCount?m(t.allLayersCount,{count:e.length}):"";return a`<calcite-combobox class=${n(c.layerDropdown)} .disabled=${this.disabled} .label=${t.filterByLayer??""} overlay-positioning=fixed .placeholder=${t.filterByLayer} .scale=${this.visualScale} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{this.filterText=void 0;let l=i.selectedItems[0]?.value??void 0;this.layer=l==="all-layers"?void 0:l}}>${o("all-layers",a`<calcite-combobox-item .heading=${s} icon=layers .selected=${this.layer==null} value=all-layers></calcite-combobox-item>`)}${this.layerItems.map(i=>this.#h(i))}</calcite-combobox>`}#d(){if(!(this.hideFilter||this.count===0))return a`<calcite-input clearable .disabled=${this.disabled} icon=search .placeholder=${this.messages.filter} .scale=${this.visualScale} .value=${this.filterText} @calciteInputInput=${({target:{value:e}})=>{this.filterText=e}}></calcite-input>`}#h(e){let t=e.title||this.messages?.untitledLayer||"";return o(e.key,a`<calcite-combobox-item .heading=${t} .icon=${e.iconName} .selected=${e.layer===this.layer} .value=${e.layer}></calcite-combobox-item>`)}#m(){let{messages:e}=this;if(this.visibleFeatureCount!==0)return a`<calcite-list .disabled=${this.disabled} display-mode=nested interaction-mode=interactive .label=${e.componentLabel??""} .loading=${this.isUpdating} .scale=${this.visualScale} selection-mode=none>${this.#s(this.allLayerItems)}</calcite-list>`}#s(e){return this.activeLayerItem?this.#l(this.activeLayerItem):e.map(t=>L(t)?this.#g(t):v(t)?this.#l(t):null).filter(t=>t!=null)}#u(){if(!(this.disabled||this.visibleFeatureCount>0||this.hideFilter||this.hideFilterNotice))return a`<calcite-notice class=${n(c.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale} width=full><div slot=message>${this.messages.noMatchingFeatures}</div></calcite-notice>`}#p(e){if(this.hideItemCount)return;let{messages:t}=this,s=p(e.total),i=p(e.visibleTotal),l=t.selectionCount?m(t.selectionCount,{count:s}):void 0;return!this.hasFilterText&&e.maxVisibleFeatureCountExceeded?a`<span class=${n(c.itemCount)} slot=content-end title=${l??h}><calcite-icon icon=exclamation-mark-triangle scale=s title=${t.tooManyFeatures??h}></calcite-icon>${`${p(this.maxVisibleFeatureCountPerLayer)}+`}</span>`:a`<span class=${n(c.itemCount)} slot=content-end title=${l??h}>${i}</span>`}#a(e){if(this.hideItemMenus)return;let{messages:t}=this,s=this.itemWithOpenMenu===e,i=M(e),l=i?t.deselectFeature:v(e)?t.deselectLayer:t.deselectGroup;return[o("dropdown",a`<calcite-dropdown .open=${s} overlay-positioning=fixed placement=bottom-end .scale=${this.menuScale} slot=actions-end width=m @calciteDropdownClose=${()=>this._closeItemMenu(e)} @calciteDropdownOpen=${()=>{this.itemWithOpenMenu=e}}>${o("action",a`<calcite-action icon=ellipsis .scale=${this.visualScale} slot=trigger .text=${t.menu??""}></calcite-action>`)}${s?o("dropdown-group",a`<calcite-dropdown-group selection-mode=none>${this.hideZoomToButton?void 0:o("zoom-to",a`<calcite-dropdown-item icon-start=layer-zoom-to @calciteDropdownItemSelect=${()=>this.goToItem(e)}>${t.zoomTo}</calcite-dropdown-item>`)}${o("select-single",a`<calcite-dropdown-item icon-start=selection-filter @calciteDropdownItemSelect=${()=>this.selectItem(e)}>${i?t.onlySelectFeature:t.onlySelectThis}</calcite-dropdown-item>`)}${o("clear-selection",a`<calcite-dropdown-item icon-start=selection-x @calciteDropdownItemSelect=${()=>this.deselectItem(e)}>${l}</calcite-dropdown-item>`)}${this.listItemActionConfigurations?.map(d=>{let{disabled:r,label:u}=d;if(this._isDropdownItemVisible(e,d))return o(`custom-action-${u}`,a`<calcite-dropdown-item .disabled=${typeof r=="function"?r({item:e}):!!r} .iconStart=${d.icon??void 0} @calciteDropdownItemSelect=${()=>d.callback({item:e})}>${u}</calcite-dropdown-item>`)})}</calcite-dropdown-group>`):void 0}</calcite-dropdown>`)]}#g(e){let t=e.title||this.messages.untitledLayer;if(e.visibleTotal===0)return;let{displayMode:s}=this;return s==="layer"||s==="feature"?this.#s(e.items):o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${t} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#a(e)}${this.#s(e.items)}</calcite-list-item>`)}#l(e){if(e.visibleTotal===0||!e.visible)return;if(this.displayMode==="feature")return this.#o(e.featureItems);let{messages:t}=this,s=e.title||t.untitledLayer;return o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${s} title=${(e.layerIsVisible?void 0:t.layerIsNotVisible)??h} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#p(e)}${this.#a(e)}${this.#o(e.featureItems)}${e.maxVisibleFeatureCountExceeded?a`<calcite-notice class=${n(c.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale}><div slot=message>${t.tooManyFeatures}</div></calcite-notice>`:void 0}</calcite-list-item>`)}#o(e){return e.map(t=>this.#v(t))}#v(e){if(!e.visible)return;let{messages:t}=this,s=e.title||t.untitledFeature,i=!this.hideItemIcons&&this.displayMode!=="feature";return o(e.key,a`<calcite-list-item class=${n(i?c.listItemFeatureIcon:c.listItemFeature)} .closable=${!this.hideItemCloseActions} .label=${s} .unavailable=${this._isItemUnavailable(e)} .value=${s} @blur=${this._onFeatureItemBlur} @calciteListItemClose=${l=>{l.stopPropagation(),this.deselectItem(e)}} @calciteListItemSelect=${l=>this._afterListItemSelect(e,l)} @focus=${this._onFeatureItemFocus.bind(this,e)} @pointerenter=${this._onFeatureItemFocus.bind(this,e)} @pointerleave=${this._onFeatureItemBlur}>${this.#$(e)}${this.#a(e)}</calcite-list-item>`)}#$(e){if(!this.hideItemIcons)return o("thumbnail-container",a`<div class=${n(c.listItemIcon)} slot=content-start>${o(e.thumbnailKey,a`<span data-thumbnail-key=${e.thumbnailKey??h} ${I(this._makeObserverRef())}></span>`)}</div>`)}render(){let e=this.hideHeader?void 0:this.el.title||this.messages.selection;return a`<div><calcite-flow><calcite-flow-item class=${n(c.flowItem)} .heading=${e} .loading=${this.state==="loading"} overlay-positioning=fixed .scale=${this.visualScale} selected><calcite-panel class=${n(c.panel)} .disabled=${this.disabled} overlay-positioning=fixed .scale=${this.visualScale}><div class=${n(c.container)}>${this.#r()}${this.#d()}${this.#m()}${this.#u()}</div></calcite-panel>${this.#n()}${this.#c()}</calcite-flow-item></calcite-flow></div>`}};w("arcgis-selection-list",$);return $},"intl","widgets/support/SelectionList/selectionListUtils","widgets/support/SelectionList/SelectionListViewModel",b,c,d,e)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
export default $arcgis.t(([{queryAllJSON:s},{supportsFieldConfiguration:l},c])=>{function y(r){return r!=null&&typeof r=="object"&&"sourceLayer"in r}function g(r,e){if(!r.map)return;let{map:n}=r;n.layers.includes(e)||(n.add(e),n.reorder(e,n.layers.length-1))}function m(r,e){return r?.map?r.map.allLayers.toArray().concat(r.map.allTables.toArray()).filter(n=>e.isUtilityLayer(n)):[]}async function h(r,e,n,a=!0){let t=await s(r,e,n),u=c.fromJSON(t);return a&&u.features.forEach(i=>{i.layer=f(r)?r.findSublayerForFeature(i):r,i.origin=i.layer,y(i)&&(i.sourceLayer=i.layer)}),u}function L(r){return r!=null&&typeof r=="object"&&"type"in r&&r.type==="feature"}function A(r){return r!=null&&typeof r=="object"&&"type"in r&&r.type==="graphics"}function f(r){return r!=null&&typeof r=="object"&&"type"in r&&r.type==="subtype-group"&&"sublayers"in r}function F(r){return r?.type==="subtype-sublayer"}function j(r,e){let n=e?.type==="subtype-sublayer"?e.parent:e;return r.allLayerViews.find(a=>{let t=a.layer;return t===n||"sublayers"in t&&t.sublayers!=null&&t.sublayers.includes(n)})}function o(r){let e=r?.type;return e==="binning"||e==="cluster"}function R(r,e){if(!l(r))return;let n=e?.graphic,a=r.featureReduction;if(n){if(n.isAggregate){let t=n.origin;return t&&"featureReductionProvider"in t&&a?o(a)?a:null:void 0}return r}return e?.checkFeatureReduction&&a?o(a)?a:null:r}return{a:y,b:g,c:m,d:h,e:L,f:A,g:f,h:F,i:j,j:R}},"applications/Components/featureUtils","applications/PortalApp/layerUtils","rest/support/FeatureSet")
|