@arcgis/map-components 5.2.0-next.95 → 5.2.0-next.97
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/22TB66OC.js +2 -0
- package/dist/cdn/{GIQDIWW4.js → 22VFTYTN.js} +1 -1
- package/dist/cdn/367Z3TKY.js +2 -0
- package/dist/cdn/{AY2PVEY5.js → 3AIQYNSA.js} +1 -1
- package/dist/cdn/{QTGJ2TIJ.js → 454H3MLO.js} +1 -1
- package/dist/cdn/{FRAZUJ7K.js → 4MSBOUHQ.js} +1 -1
- package/dist/cdn/{SK4OCYH7.js → 4YU2AF7S.js} +1 -1
- package/dist/cdn/5FWT3N7B.js +2 -0
- package/dist/cdn/6KYWLAYH.js +2 -0
- package/dist/cdn/6SEM26SM.js +2 -0
- package/dist/cdn/6ZE7BJTS.js +2 -0
- package/dist/cdn/72HH6FSN.js +2 -0
- package/dist/cdn/{SSJBKHEN.js → 77NK4UBY.js} +1 -1
- package/dist/cdn/{LPB2JMJ5.js → 7F2DXC54.js} +1 -1
- package/dist/cdn/{Y56FOEA4.js → A3KD2UAY.js} +1 -1
- package/dist/cdn/AJBOKAK6.js +2 -0
- package/dist/cdn/{2HYRTMJ6.js → AOBYM5ZK.js} +1 -1
- package/dist/cdn/{MXYWUI34.js → ASVNFERZ.js} +1 -1
- package/dist/cdn/AZ6IOGGT.js +2 -0
- package/dist/cdn/{PWY44JI6.js → B4KOVXN3.js} +1 -1
- package/dist/cdn/{7TTSWTGP.js → BHENVS42.js} +1 -1
- package/dist/cdn/BOPKJR3D.js +2 -0
- package/dist/cdn/{K2FKS4AS.js → BZGHEINJ.js} +1 -1
- package/dist/cdn/{VHHRBGXN.js → CJLML2XS.js} +1 -1
- package/dist/cdn/CKO4VE36.js +2 -0
- package/dist/cdn/{2F6NRCC5.js → DVGE5VPK.js} +1 -1
- package/dist/cdn/{I3VQ46FA.js → EAQV7AZQ.js} +1 -1
- package/dist/cdn/EDGLEFG3.js +2 -0
- package/dist/cdn/{CEMBX25Q.js → EXIPQBCY.js} +1 -1
- package/dist/cdn/FCNNRX3Q.js +2 -0
- package/dist/cdn/FCVLHRLJ.js +2 -0
- package/dist/cdn/G743AW46.js +2 -0
- package/dist/cdn/{XZGU6TR6.js → GGKOLSCH.js} +1 -1
- package/dist/cdn/{3CHIGFZL.js → GLMK45AB.js} +1 -1
- package/dist/cdn/H7KG55LR.js +2 -0
- package/dist/cdn/{S5XIZ2L4.js → HXNLIDLQ.js} +1 -1
- package/dist/cdn/{7ZZWKH2U.js → IPT3YBSG.js} +2 -2
- package/dist/cdn/{UAGCCYQB.js → IXDLJKJA.js} +1 -1
- package/dist/cdn/{B5FTF7WR.js → J624KHFL.js} +1 -1
- package/dist/cdn/{G2BLA5NQ.js → JAQYZZRT.js} +1 -1
- package/dist/cdn/{KZPPV365.js → JMYDF3AT.js} +1 -1
- package/dist/cdn/L4DWZT4V.js +2 -0
- package/dist/cdn/{XAZNEI2W.js → LCG5BEEY.js} +1 -1
- package/dist/cdn/{VWV6XWSU.js → LW6SRLBI.js} +1 -1
- package/dist/cdn/{5SVULVBJ.js → MAILUSIQ.js} +1 -1
- package/dist/cdn/N2RLGXGJ.js +2 -0
- package/dist/cdn/NRT2ZCWC.js +2 -0
- package/dist/cdn/{HOKDRJ4R.js → NSUQXUWH.js} +1 -1
- package/dist/cdn/{V42KBFW7.js → OCAPESF3.js} +1 -1
- package/dist/cdn/{F3JDX4A7.js → OMEJFPK7.js} +1 -1
- package/dist/cdn/P2JBFLSB.js +2 -0
- package/dist/cdn/{D6BWGR3Z.js → P5CQYFPA.js} +1 -1
- package/dist/cdn/R5GMCIAH.js +2 -0
- package/dist/cdn/{AKNAVXKD.js → RC7BSNQ3.js} +1 -1
- package/dist/cdn/{O6CGTOAO.js → S7JDLOX2.js} +1 -1
- package/dist/cdn/SA4IYYIE.js +2 -0
- package/dist/cdn/{QD3GVN2C.js → SDY4E3WA.js} +1 -1
- package/dist/cdn/{CJ536VHT.js → SGU4TP7V.js} +1 -1
- package/dist/cdn/TDGEDT35.js +2 -0
- package/dist/cdn/{66PT52ED.js → TZEAPNBI.js} +1 -1
- package/dist/cdn/{CA5LXWO6.js → UOZG2EH7.js} +1 -1
- package/dist/cdn/{GMSIYMNC.js → UPJTKQR3.js} +1 -1
- package/dist/cdn/{2JLMOWRT.js → VULA5TJD.js} +1 -1
- package/dist/cdn/VZXCU47M.js +2 -0
- package/dist/cdn/{FRSROWP4.js → W6IFUQTQ.js} +1 -1
- package/dist/cdn/{SVJ7AEMP.js → WAFRMU5C.js} +1 -1
- package/dist/cdn/WLGR4IHZ.js +2 -0
- package/dist/cdn/{CX3OZJEH.js → WMK7RLBA.js} +1 -1
- package/dist/cdn/{4FVOBVTD.js → YEN7K65V.js} +2 -2
- package/dist/cdn/YVQJ4XD4.js +2 -0
- package/dist/cdn/{FZDURX2Y.js → YWOTHCBH.js} +1 -1
- package/dist/cdn/{N5VJ4SAX.js → ZCRUGROJ.js} +1 -1
- package/dist/cdn/{VT2IDAHB.js → ZUWNZX6G.js} +1 -1
- package/dist/cdn/assets/layer-list-next/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/selection-list/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/video-player/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/esri-main.js +1 -1
- package/dist/chunks/layer-list-utils.js +23 -17
- package/dist/chunks/slots.js +1 -1
- package/dist/chunks/svgUtils.js +1 -1
- package/dist/chunks/univariateUtils.js +1 -1
- package/dist/chunks/utils2.js +66 -50
- package/dist/chunks/utils3.js +50 -13
- package/dist/chunks/utils4.js +13 -45
- package/dist/chunks/utils5.js +51 -0
- package/dist/components/arcgis-aggregated-features/customElement.js +7 -7
- package/dist/components/arcgis-area-measurement-2d/customElement.d.ts +21 -0
- package/dist/components/arcgis-area-measurement-2d/customElement.js +5 -5
- package/dist/components/arcgis-area-measurement-3d/customElement.d.ts +16 -0
- package/dist/components/arcgis-area-measurement-3d/customElement.js +10 -10
- package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +5 -6
- package/dist/components/arcgis-basemap-layer-list-next/customElement.js +6 -5
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +11 -1
- package/dist/components/arcgis-catalog-layer-list-next/customElement.js +1 -1
- package/dist/components/arcgis-catalog-layer-list-next/types.d.ts +2 -2
- package/dist/components/arcgis-direct-line-measurement-3d/customElement.d.ts +18 -0
- package/dist/components/arcgis-direct-line-measurement-3d/customElement.js +1 -1
- package/dist/components/arcgis-distance-measurement-2d/customElement.d.ts +19 -0
- package/dist/components/arcgis-distance-measurement-2d/customElement.js +5 -5
- package/dist/components/arcgis-feature/customElement.js +27 -27
- package/dist/components/arcgis-feature-attachments/customElement.js +73 -60
- package/dist/components/arcgis-feature-next/customElement.d.ts +7 -0
- package/dist/components/arcgis-feature-next/customElement.js +12 -12
- package/dist/components/arcgis-feature-relationship/customElement.js +54 -45
- package/dist/components/arcgis-features-next/customElement.d.ts +7 -0
- package/dist/components/arcgis-features-next/customElement.js +16 -16
- package/dist/components/arcgis-layer-list-item-indicator/customElement.js +6 -6
- package/dist/components/arcgis-layer-list-item-panel/customElement.js +20 -16
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +41 -9
- package/dist/components/arcgis-layer-list-next/customElement.js +49 -45
- package/dist/components/arcgis-layer-list-next/layer-list-item/customElement.js +134 -10
- package/dist/components/arcgis-layer-list-next/types.d.ts +5 -0
- package/dist/components/arcgis-legend-card-color-ramp/customElement.js +1 -1
- package/dist/components/arcgis-legend-card-element/customElement.js +1 -1
- package/dist/components/arcgis-legend-card-size-ramp/customElement.js +1 -1
- package/dist/components/arcgis-legend-classic-color-ramp/customElement.js +1 -1
- package/dist/components/arcgis-legend-classic-element/customElement.js +1 -1
- package/dist/components/arcgis-legend-classic-size-ramp/customElement.js +1 -1
- package/dist/components/arcgis-legend-spike-ramp/customElement.js +1 -1
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer/customElement.js +1 -1
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer-zoom/customElement.js +1 -1
- package/dist/components/arcgis-popup/customElement.d.ts +7 -0
- package/dist/components/arcgis-popup/customElement.js +15 -15
- package/dist/components/arcgis-print-dpi-input/customElement.js +1 -1
- package/dist/components/arcgis-print-export-button/customElement.js +1 -1
- package/dist/components/arcgis-print-format-select/customElement.js +1 -1
- package/dist/components/arcgis-print-main-panel/customElement.js +1 -1
- package/dist/components/arcgis-print-template-select/customElement.js +1 -1
- package/dist/components/arcgis-print-template-selector/customElement.js +1 -1
- package/dist/components/arcgis-scene/customElement.d.ts +2 -2
- package/dist/components/arcgis-selection-list/customElement.d.ts +421 -0
- package/dist/components/arcgis-selection-list/customElement.js +279 -0
- package/dist/components/arcgis-selection-list/index.d.ts +1 -0
- package/dist/components/arcgis-selection-list/index.js +16 -0
- package/dist/components/arcgis-selection-list/types.d.ts +85 -0
- package/dist/components/arcgis-table-list-next/customElement.js +5 -5
- package/dist/components/arcgis-utility-network-aggregated-geometry-result-item/customElement.d.ts +2 -1
- package/dist/components/arcgis-utility-network-elements-result-item/customElement.d.ts +1 -1
- package/dist/components/arcgis-utility-network-elements-result-item/customElement.js +2 -2
- package/dist/components/arcgis-utility-network-trace-analysis-next/customElement.d.ts +11 -0
- package/dist/components/arcgis-utility-network-trace-analysis-next/customElement.js +76 -78
- package/dist/components/arcgis-utility-network-trace-results-next/customElement.d.ts +10 -4
- package/dist/components/arcgis-utility-network-trace-results-next/customElement.js +17 -25
- package/dist/components/arcgis-video-player/customElement.d.ts +3 -0
- package/dist/components/arcgis-video-player/customElement.js +1 -1
- package/dist/components/arcgis-video-player-slider/customElement.js +9 -9
- package/dist/components/arcgis-volume-measurement/customElement.d.ts +37 -0
- package/dist/components/arcgis-volume-measurement/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 +10 -0
- package/dist/loader.js +15 -14
- package/dist/types/lumina.d.ts +19 -12
- package/dist/types/preact.d.ts +20 -12
- package/dist/types/react.d.ts +21 -12
- package/dist/types/stencil.d.ts +19 -12
- package/dist/utils/layer-list-utils.d.ts +1 -1
- package/package.json +7 -7
- package/dist/cdn/2GDWXNYN.js +0 -2
- package/dist/cdn/376WTHOL.js +0 -2
- package/dist/cdn/4YFREAQ2.js +0 -2
- package/dist/cdn/A6Z7H75I.js +0 -2
- package/dist/cdn/CDMVB72W.js +0 -2
- package/dist/cdn/D5TJRWW3.js +0 -2
- package/dist/cdn/ECXHREHJ.js +0 -2
- package/dist/cdn/FIIA3N5X.js +0 -2
- package/dist/cdn/FY6IGGPV.js +0 -2
- package/dist/cdn/G7HOUS4O.js +0 -2
- package/dist/cdn/HF3GCBAI.js +0 -2
- package/dist/cdn/HISWL3K3.js +0 -2
- package/dist/cdn/HPLMTKLF.js +0 -2
- package/dist/cdn/JKOIMKKL.js +0 -2
- package/dist/cdn/JOPAUFUX.js +0 -2
- package/dist/cdn/LDDAJOTV.js +0 -2
- package/dist/cdn/LKCX5SXM.js +0 -2
- package/dist/cdn/LMNH2RHA.js +0 -2
- package/dist/cdn/MBFY4GDJ.js +0 -2
- package/dist/cdn/PI55I5L7.js +0 -2
- package/dist/cdn/S3QMZKDY.js +0 -2
- package/dist/cdn/XQH6U57U.js +0 -2
- package/dist/cdn/YDP5A3EP.js +0 -2
- package/dist/cdn/ZSDNX326.js +0 -2
- package/dist/chunks/layer-list-item.js +0 -181
- /package/dist/cdn/{WKBILCAY.js → 2ZG7S6GM.js} +0 -0
- /package/dist/cdn/{4WURS3DM.js → 3VWL4SN7.js} +0 -0
- /package/dist/cdn/{4GIRSQMC.js → 4F6FNH6V.js} +0 -0
- /package/dist/cdn/{KYWZUC6M.js → 4J6DMRVO.js} +0 -0
- /package/dist/cdn/{FVZJPOWC.js → 5OBSJYCP.js} +0 -0
- /package/dist/cdn/{5CB7FWG6.js → 657KH5W3.js} +0 -0
- /package/dist/cdn/{ESYSNSNH.js → 6B4ROFUM.js} +0 -0
- /package/dist/cdn/{RKXHWHFR.js → 6RT7GRX4.js} +0 -0
- /package/dist/cdn/{3ZXNGXHC.js → 7DI2ZSB3.js} +0 -0
- /package/dist/cdn/{4AEFZEGM.js → 7JKYXV7H.js} +0 -0
- /package/dist/cdn/{NDWLSQ4W.js → 7NO3F7GQ.js} +0 -0
- /package/dist/cdn/{4KYPBCNM.js → AA2HLLIM.js} +0 -0
- /package/dist/cdn/{BU5HRIOW.js → ADZF7IHV.js} +0 -0
- /package/dist/cdn/{B4RNNO6A.js → B6JLKBMG.js} +0 -0
- /package/dist/cdn/{ZOGRVFHK.js → D2FVI5JG.js} +0 -0
- /package/dist/cdn/{HW5YYDPC.js → D5LP3DJA.js} +0 -0
- /package/dist/cdn/{OJOQP2IU.js → DNQGXWL3.js} +0 -0
- /package/dist/cdn/{QU5PA5MZ.js → DSPV4EIK.js} +0 -0
- /package/dist/cdn/{FV7FUSTO.js → E3AEBH36.js} +0 -0
- /package/dist/cdn/{2EDZ2LNR.js → FRGVEQAZ.js} +0 -0
- /package/dist/cdn/{ZXEH6MEU.js → G7DHB4QN.js} +0 -0
- /package/dist/cdn/{MGILHYX4.js → GJAC7GKP.js} +0 -0
- /package/dist/cdn/{G42D353L.js → GLZMKGGW.js} +0 -0
- /package/dist/cdn/{WRKX7F2G.js → H3RDAWS7.js} +0 -0
- /package/dist/cdn/{YFM2SKWI.js → HDYBFSI5.js} +0 -0
- /package/dist/cdn/{NGQUETWM.js → HH4A44WX.js} +0 -0
- /package/dist/cdn/{5EU3QVP7.js → HRTVHZHG.js} +0 -0
- /package/dist/cdn/{7427KHVF.js → IU63DGNP.js} +0 -0
- /package/dist/cdn/{O3SPKYBG.js → J3KTKVLP.js} +0 -0
- /package/dist/cdn/{BV52G5DA.js → JHF7SGKM.js} +0 -0
- /package/dist/cdn/{GLKTAVV5.js → JU4MCJPU.js} +0 -0
- /package/dist/cdn/{77ZD2RFI.js → KVIE42LT.js} +0 -0
- /package/dist/cdn/{W2UZH6QI.js → LG3G4BFF.js} +0 -0
- /package/dist/cdn/{VDTRRLON.js → MDTNPISF.js} +0 -0
- /package/dist/cdn/{XYRTRBXU.js → OO4SKY7C.js} +0 -0
- /package/dist/cdn/{SNX6WY7J.js → OTTKYEPK.js} +0 -0
- /package/dist/cdn/{J4VKIBXE.js → QH4RNPEX.js} +0 -0
- /package/dist/cdn/{IHWFNEBS.js → QJBQ3JLC.js} +0 -0
- /package/dist/cdn/{KG3HVAZY.js → SE4NXMGA.js} +0 -0
- /package/dist/cdn/{AZWQWNTK.js → SOOVHYLT.js} +0 -0
- /package/dist/cdn/{KMNELKA3.js → T5QDEAAE.js} +0 -0
- /package/dist/cdn/{W2YB27M6.js → TKEBTPPA.js} +0 -0
- /package/dist/cdn/{6URW6H47.js → TTBQBEDS.js} +0 -0
- /package/dist/cdn/{BIKEUMV7.js → VFHHDNXC.js} +0 -0
- /package/dist/cdn/{QZHFPTSI.js → X2MAQDWV.js} +0 -0
- /package/dist/cdn/{LGNLLGA6.js → YWQU6EBN.js} +0 -0
|
@@ -1,112 +1,125 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as k } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as I, html as a } from "lit";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import _ from "@arcgis/core/rest/query/support/AttachmentInfo.js";
|
|
5
|
+
import L from "@arcgis/core/rest/support/AttachmentQuery.js";
|
|
6
|
+
import z from "@arcgis/core/core/Collection.js";
|
|
7
7
|
import b from "@arcgis/core/core/Error.js";
|
|
8
|
-
import { LitElement as
|
|
9
|
-
import {
|
|
8
|
+
import { LitElement as S, nothing as p, safeClassMap as w, safeStyleMap as v } from "@arcgis/lumina";
|
|
9
|
+
import { bypassReadOnly as P } from "@arcgis/lumina/controllers";
|
|
10
|
+
import { classes as A } from "@arcgis/toolkit/dom";
|
|
10
11
|
import { g as u } from "../../chunks/feature-utils.js";
|
|
11
|
-
import { watch as
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
return
|
|
12
|
+
import { watch as C } from "@arcgis/core/core/reactiveUtils.js";
|
|
13
|
+
function $(i) {
|
|
14
|
+
const t = i.toLowerCase();
|
|
15
|
+
return t === "image/bmp" || t === "image/emf" || t === "image/exif" || t === "image/gif" || t === "image/x-icon" || t === "image/jpeg" || t === "image/png" || t === "image/tiff" || t === "image/x-wmf";
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function y(i) {
|
|
17
18
|
return i ? i === "text/plain" ? "file-text" : i === "application/pdf" ? "file-pdf" : i === "text/csv" ? "file-csv" : i === "application/gpx+xml" ? "file-gpx" : i === "application/x-dwf" ? "file-cad" : i === "application/postscript" || i === "application/json" || i === "text/xml" || i === "model/vrml" ? "file-code" : i === "application/x-zip-compressed" || i === "application/x-7z-compressed" || i === "application/x-gzip" || i === "application/x-tar" || i === "application/x-gtar" || i === "application/x-bzip2" || i === "application/gzip" || i === "application/x-compress" || i === "application/x-apple-diskimage" || i === "application/x-rar-compressed" || i === "application/zip" ? "file-zip" : i.includes("image/") ? "file-image" : i.includes("audio/") ? "file-sound" : i.includes("video/") ? "file-video" : i.includes("msexcel") || i.includes("ms-excel") || i.includes("spreadsheetml") ? "file-excel" : i.includes("msword") || i.includes("ms-word") || i.includes("wordprocessingml") ? "file-word" : i.includes("powerpoint") || i.includes("presentationml") ? "file-report" : "file" : "file";
|
|
18
19
|
}
|
|
19
|
-
const
|
|
20
|
-
class R extends
|
|
20
|
+
const j = I`:host([empty]){display:none}.item-link{display:flex;flex-grow:1;color:var(--calcite-color-text-3)}.item-link:visited,.item-link:hover,.item-link:focus-visible,.item-link:active{color:var(--calcite-color-text-1)}.item-link img{max-width:100%;max-height:100%;object-fit:contain}.item-link--list{align-items:center;justify-content:center;width:64px;max-height:64px;overflow:hidden;border-radius:var(--calcite-corner-radius-sm)}.item-link--list img{border-radius:var(--calcite-corner-radius-sm)}.item-link--list-icon{border:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.item-link--list calcite-icon{margin:var(--calcite-spacing-lg)}.item-link--preview{align-items:center;justify-content:center}.item-link--preview calcite-icon{margin-block:var(--calcite-spacing-lg)}.item-description{text-align:center;word-wrap:break-word;word-break:break-word}calcite-link{--calcite-link-text-color: var(--calcite-color-text-3);padding-inline:var(--calcite-spacing-sm);word-wrap:break-word;word-break:break-word}calcite-card{width:100%}`, E = z.ofType(_);
|
|
21
|
+
class R extends S {
|
|
21
22
|
constructor() {
|
|
22
|
-
super(...arguments), this.
|
|
23
|
+
super(...arguments), this._attachmentLayer = null, this._supportsImageOrientation = window?.CSS?.supports("image-orientation", "from-image"), this.hideSection = !1, this._attachmentInfos = new E(), this.headingLevel = 2, this.hidePreviewImageAttachmentName = !1, this.empty = !1;
|
|
23
24
|
}
|
|
24
25
|
static {
|
|
25
|
-
this.properties = { effectiveDisplayType: 16, getAttachmentsPromise: 16, hideSection: 16, supportsResizeAttachments: 16, attachmentKeywords: 0, attachmentTypes: 0, description: 1, displayType: 1, graphic: 0, heading: 1, messages: 0, orderByFields: 0, headingLevel: 9, hidePreviewImageAttachmentName: 5 };
|
|
26
|
+
this.properties = { effectiveDisplayType: 16, getAttachmentsPromise: 16, hideSection: 16, _attachmentInfos: 16, _hasContent: 16, supportsResizeAttachments: 16, attachmentKeywords: 0, attachmentTypes: 0, description: 1, displayType: 1, graphic: 0, heading: 1, messages: 0, orderByFields: 0, headingLevel: 9, hidePreviewImageAttachmentName: 5, empty: 39 };
|
|
26
27
|
}
|
|
27
28
|
static {
|
|
28
|
-
this.styles =
|
|
29
|
+
this.styles = j;
|
|
29
30
|
}
|
|
30
31
|
get _supportsTypeWildcard() {
|
|
31
|
-
const { graphic:
|
|
32
|
-
if (!
|
|
32
|
+
const { graphic: t } = this;
|
|
33
|
+
if (!t)
|
|
33
34
|
return !1;
|
|
34
|
-
const
|
|
35
|
-
return
|
|
35
|
+
const e = u(t);
|
|
36
|
+
return e?.loaded && "capabilities" in e && e.capabilities && "attachment" in e.capabilities && e.capabilities.attachment && "supportsResize" in e.capabilities.attachment && e.capabilities.attachment.supportsTypeWildcard || !1;
|
|
36
37
|
}
|
|
37
38
|
get effectiveDisplayType() {
|
|
38
|
-
const { displayType:
|
|
39
|
-
return !
|
|
39
|
+
const { displayType: t } = this;
|
|
40
|
+
return !t || t === "auto" ? this.supportsResizeAttachments ? "preview" : "list" : t;
|
|
41
|
+
}
|
|
42
|
+
get _hasContent() {
|
|
43
|
+
return this._attachmentInfos.length > 0 || !!this.graphic && this.getAttachmentsPromise !== null;
|
|
40
44
|
}
|
|
41
45
|
get supportsResizeAttachments() {
|
|
42
|
-
const { graphic:
|
|
43
|
-
if (!
|
|
46
|
+
const { graphic: t } = this;
|
|
47
|
+
if (!t)
|
|
44
48
|
return !1;
|
|
45
|
-
const
|
|
46
|
-
return
|
|
49
|
+
const e = u(t);
|
|
50
|
+
return e?.loaded && "capabilities" in e && e.capabilities && "attachment" in e.capabilities && e.capabilities.attachment && "supportsResize" in e.capabilities.attachment && e.capabilities.attachment.supportsResize || !1;
|
|
47
51
|
}
|
|
48
52
|
loaded() {
|
|
49
53
|
this.manager.onLifecycle(() => [
|
|
50
|
-
|
|
54
|
+
C(() => this.graphic, () => this.graphicChanged(), { initial: !0 })
|
|
51
55
|
]);
|
|
52
56
|
}
|
|
53
57
|
async getAttachments() {
|
|
54
|
-
const { _attachmentLayer:
|
|
55
|
-
if (!
|
|
58
|
+
const { _attachmentLayer: t, _attachmentInfos: e, orderByFields: o, attachmentTypes: m, attachmentKeywords: s, _supportsTypeWildcard: g } = this;
|
|
59
|
+
if (!t || typeof t.queryAttachments != "function")
|
|
56
60
|
throw new b("invalid-layer", "getAttachments(): A valid layer is required.");
|
|
57
|
-
const
|
|
58
|
-
if (typeof
|
|
61
|
+
const h = this.graphic?.getObjectId();
|
|
62
|
+
if (typeof h != "number")
|
|
59
63
|
throw new b("invalid-object-id", "getAttachments(): Numeric object id is required");
|
|
60
|
-
const r = o?.map((n) => `${n.field} ${n.order === "descending" ? "DESC" : "ASC"}`), f = new
|
|
61
|
-
objectIds: [
|
|
64
|
+
const r = o?.map((n) => `${n.field} ${n.order === "descending" ? "DESC" : "ASC"}`), f = new L({
|
|
65
|
+
objectIds: [h],
|
|
62
66
|
returnMetadata: !0,
|
|
63
67
|
orderByFields: r,
|
|
64
68
|
attachmentTypes: g ? m?.filter(Boolean).map((n) => `${n}/*`) : void 0,
|
|
65
69
|
keywords: s
|
|
66
|
-
}), c = [],
|
|
67
|
-
this.getAttachmentsPromise =
|
|
68
|
-
const l = await
|
|
69
|
-
|
|
70
|
+
}), c = [], d = t.queryAttachments(f).then((n) => n[h] || c).catch(() => c);
|
|
71
|
+
this.getAttachmentsPromise = d, this._setEmpty(!1);
|
|
72
|
+
const l = await d;
|
|
73
|
+
e.destroyAll(), l.length && e.addMany(l), this.getAttachmentsPromise = null, this._setEmpty(!this._hasContent);
|
|
74
|
+
}
|
|
75
|
+
_setEmpty(t) {
|
|
76
|
+
P(() => this.empty = t);
|
|
70
77
|
}
|
|
71
78
|
setAttachmentLayer() {
|
|
72
|
-
const { graphic:
|
|
73
|
-
this._attachmentLayer =
|
|
79
|
+
const { graphic: t } = this, e = u(t);
|
|
80
|
+
this._attachmentLayer = e ? e.type === "scene" && e.associatedLayer != null ? e.associatedLayer : e : null;
|
|
74
81
|
}
|
|
75
82
|
graphicChanged() {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
if (!this.graphic) {
|
|
84
|
+
this._attachmentInfos.destroyAll(), this.getAttachmentsPromise = null, this._setEmpty(!0);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
this.setAttachmentLayer(), this.getAttachments().catch(() => {
|
|
88
|
+
this._attachmentInfos.destroyAll(), this.getAttachmentsPromise = null, this._setEmpty(!0);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
getCSSTransform(t) {
|
|
92
|
+
const { orientationInfo: e } = t;
|
|
93
|
+
return !this._supportsImageOrientation && e ? [
|
|
94
|
+
e.rotation ? `rotate(${e.rotation}deg)` : "",
|
|
95
|
+
e.mirrored ? "scaleX(-1)" : ""
|
|
83
96
|
].join(" ") : "";
|
|
84
97
|
}
|
|
85
98
|
render() {
|
|
86
|
-
return a`<div class="root"
|
|
99
|
+
return a`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this.renderAttachments()}</div>`;
|
|
87
100
|
}
|
|
88
|
-
renderAttachmentsList(
|
|
89
|
-
return a`<calcite-list .loading=${!!this.getAttachmentsPromise} .label=${this.messages?.componentLabel ?? ""} interaction-mode=static selection-mode=none>${
|
|
101
|
+
renderAttachmentsList(t) {
|
|
102
|
+
return a`<calcite-list .loading=${!!this.getAttachmentsPromise} .label=${this.messages?.componentLabel ?? ""} interaction-mode=static selection-mode=none>${t.toArray().filter(Boolean).map((e) => this.renderAttachmentListItem(e))}</calcite-list>`;
|
|
90
103
|
}
|
|
91
|
-
renderAttachmentsPreview(
|
|
92
|
-
return a`<calcite-card-group .label=${this.messages?.componentLabel ?? ""}>${this.getAttachmentsPromise ? a`<calcite-card loading></calcite-card>` :
|
|
104
|
+
renderAttachmentsPreview(t) {
|
|
105
|
+
return a`<calcite-card-group .label=${this.messages?.componentLabel ?? ""}>${this.getAttachmentsPromise ? a`<calcite-card loading></calcite-card>` : t.toArray().filter(Boolean).map((e) => this.renderAttachmentPreviewItem(e))}</calcite-card-group>`;
|
|
93
106
|
}
|
|
94
107
|
renderAttachments() {
|
|
95
|
-
const { effectiveDisplayType:
|
|
96
|
-
return
|
|
108
|
+
const { effectiveDisplayType: t, _attachmentInfos: e } = this;
|
|
109
|
+
return t === "preview" ? this.renderAttachmentsPreview(e) : this.renderAttachmentsList(e);
|
|
97
110
|
}
|
|
98
|
-
renderAttachmentListItem(
|
|
99
|
-
const { supportsResizeAttachments:
|
|
111
|
+
renderAttachmentListItem(t) {
|
|
112
|
+
const { supportsResizeAttachments: e } = this, { contentType: o, name: m, url: s, size: g } = t, h = 64, r = m || this.messages?.noTitle, f = y(o), c = this.getCSSTransform(t), d = c ? { transform: c, "image-orientation": "none" } : {}, l = e && $(o), n = a`<a class=${w(A("item-link", "item-link--list", {
|
|
100
113
|
"item-link--list-icon": !l
|
|
101
|
-
}))} slot=content-start href=${s ?? void 0 ??
|
|
102
|
-
return a`<calcite-list-item .label=${r}>${n}${
|
|
114
|
+
}))} slot=content-start href=${s ?? void 0 ?? p} rel=noreferrer target=_blank>${l ? a`<img alt=${m ?? p} src=${`${s}${s?.includes("?") ? "&" : "?"}w=${h}&s=${g}`} style=${v(d)} title=${m ?? p}>` : a`<calcite-icon .icon=${f}></calcite-icon>`}</a>`, x = a`<calcite-link slot=content .href=${s ?? void 0} rel=noreferrer target=_blank>${r}</calcite-link>`;
|
|
115
|
+
return a`<calcite-list-item .label=${r}>${n}${x}</calcite-list-item>`;
|
|
103
116
|
}
|
|
104
|
-
renderAttachmentPreviewItem(
|
|
105
|
-
const { supportsResizeAttachments:
|
|
117
|
+
renderAttachmentPreviewItem(t) {
|
|
118
|
+
const { supportsResizeAttachments: e } = this, { contentType: o, name: m, url: s, size: g } = t, h = 225, r = m || this.messages?.noTitle, f = y(o), c = this.getCSSTransform(t), d = c ? { transform: c, "image-orientation": "none" } : {}, l = e && $(o), n = a`<a class=${w(A("item-link", "item-link--preview"))} slot=thumbnail href=${s ?? void 0 ?? p} rel=noreferrer target=_blank aria-label=${r ?? p} title=${r ?? p}>${l ? a`<img alt=${r ?? p} src=${`${s}${s?.includes("?") ? "&" : "?"}w=${h}&s=${g}`} style=${v(d)}>` : a`<calcite-icon scale=l .icon=${f}></calcite-icon>`}</a>`;
|
|
106
119
|
return a`<calcite-card .label=${r}>${n}${this.hidePreviewImageAttachmentName && l ? null : a`<span class="item-description" slot=description>${r}</span>`}</calcite-card>`;
|
|
107
120
|
}
|
|
108
121
|
}
|
|
109
|
-
|
|
122
|
+
k("arcgis-feature-attachments", R);
|
|
110
123
|
export {
|
|
111
124
|
R as ArcgisFeatureAttachments
|
|
112
125
|
};
|
|
@@ -134,6 +134,13 @@ export abstract class ArcgisFeatureNext extends LitElement {
|
|
|
134
134
|
* @default false
|
|
135
135
|
*/
|
|
136
136
|
accessor hideCustomContent: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Indicates whether to hide relationship content when there are no relationship items to display.
|
|
139
|
+
*
|
|
140
|
+
* @default false
|
|
141
|
+
* @since 5.2
|
|
142
|
+
*/
|
|
143
|
+
accessor hideEmptyRelationshipContent: boolean;
|
|
137
144
|
/**
|
|
138
145
|
* Indicates whether to hide [expression content](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) within the component.
|
|
139
146
|
*
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as $ } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as
|
|
4
|
-
import { ref as
|
|
3
|
+
import { css as y, html as r } from "lit";
|
|
4
|
+
import { ref as w } from "lit/directives/ref.js";
|
|
5
5
|
import { u as I } from "../../chunks/useT9n.js";
|
|
6
6
|
import { classes as M } from "@arcgis/toolkit/dom";
|
|
7
|
-
import { usePropertyChange as
|
|
8
|
-
import { m as
|
|
7
|
+
import { usePropertyChange as C } from "@arcgis/lumina/controllers";
|
|
8
|
+
import { m as x } from "../../chunks/useViewModel.js";
|
|
9
9
|
import { LitElement as b, createEvent as F, nothing as _, safeClassMap as L } from "@arcgis/lumina";
|
|
10
10
|
import { substitute as T } from "@arcgis/core/intl.js";
|
|
11
11
|
import { renderingSanitizer as A } from "@arcgis/core/applications/Components/sanitizerUtils.js";
|
|
12
|
-
import { c as R, g as
|
|
12
|
+
import { c as R, g as E, d as D, e as V, b as d, i as k, f as B } from "../../chunks/feature-utils.js";
|
|
13
13
|
import N from "@arcgis/core/core/Collection.js";
|
|
14
14
|
import { watch as H } from "@arcgis/core/core/reactiveUtils.js";
|
|
15
15
|
import { stripHTML as P } from "@arcgis/core/applications/Components/stringUtils.js";
|
|
16
16
|
import Z from "@arcgis/core/popup/FeatureContent.js";
|
|
17
|
-
const z =
|
|
17
|
+
const z = y`:host{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1);--calcite-color-background: var(--calcite-color-foreground-1)}.root{flex:1 1 auto}.root calcite-icon{box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.content-element{margin-bottom:var(--calcite-spacing-lg);padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column}.content-element[empty]{display:none}.content-element:not([empty]):only-child,.content-element:not([empty]):last-child{margin-bottom:var(--calcite-spacing-xxs)}.last-edited-info{padding-top:var(--calcite-spacing-xs);font-size:var(--calcite-font-size-sm)}`, U = x(Z);
|
|
18
18
|
class S extends b {
|
|
19
19
|
constructor() {
|
|
20
|
-
super(...arguments), this.messages = I(), this._rootFlowNode = null, this.internalFlowItems = new N(), this.flowType = "feature", this.viewModel = U(this), this.view = this.viewModel.view, this.icon = "icon", this.isFeatureFromTable = this.viewModel.isFeatureFromTable, this.graphic = this.viewModel.graphic, this.defaultPopupTemplateEnabled = this.viewModel.defaultPopupTemplateEnabled, this.headingLevel = 2, this.spatialReference = this.viewModel.spatialReference, this.timeZone = this.viewModel.timeZone, this.heading = this.viewModel.heading, this.map = this.viewModel.map, this.chartAnimationDisabled = this.viewModel.abilities.chartAnimation, this.hideHeading = !1, this.hideContent = !1, this.hideAttachmentsContent = !1, this.hideCustomContent = !1, this.hideExpressionContent = !1, this.hideFieldsContent = !1, this.hideMediaContent = !1, this.showRelationshipContent = !1, this.hideTextContent = !1, this.showUtilityNetworkContent = !1, this.hideLastEditedInfo = !1, this.autoDestroyDisabled = !1, this.location = this.viewModel.location, this.state = this.viewModel.state, this.arcgisPropertyChange =
|
|
20
|
+
super(...arguments), this.messages = I(), this._rootFlowNode = null, this.internalFlowItems = new N(), this.flowType = "feature", this.viewModel = U(this), this.view = this.viewModel.view, this.icon = "icon", this.isFeatureFromTable = this.viewModel.isFeatureFromTable, this.graphic = this.viewModel.graphic, this.defaultPopupTemplateEnabled = this.viewModel.defaultPopupTemplateEnabled, this.headingLevel = 2, this.spatialReference = this.viewModel.spatialReference, this.timeZone = this.viewModel.timeZone, this.heading = this.viewModel.heading, this.map = this.viewModel.map, this.chartAnimationDisabled = this.viewModel.abilities.chartAnimation, this.hideHeading = !1, this.hideContent = !1, this.hideAttachmentsContent = !1, this.hideEmptyRelationshipContent = !1, this.hideCustomContent = !1, this.hideExpressionContent = !1, this.hideFieldsContent = !1, this.hideMediaContent = !1, this.showRelationshipContent = !1, this.hideTextContent = !1, this.showUtilityNetworkContent = !1, this.hideLastEditedInfo = !1, this.autoDestroyDisabled = !1, this.location = this.viewModel.location, this.state = this.viewModel.state, this.arcgisPropertyChange = C()("flowItems", "state"), this.arcgisReady = F();
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
23
|
-
this.properties = { popupTemplate: 16, sourceLayer: 16, fieldInfoMap: 16, values: 16, globalValues: 16, internalFlowItems: 16, flowType: 1, viewModel: 0, view: 0, flowItems: 0, referenceElement: 1, icon: 1, isFeatureFromTable: 36, graphic: 0, defaultPopupTemplateEnabled: 5, headingLevel: 9, spatialReference: 0, timeZone: 1, heading: 0, map: 0, chartAnimationDisabled: 5, hideHeading: 5, hideContent: 5, hideAttachmentsContent: 5, hideCustomContent: 5, hideExpressionContent: 5, hideFieldsContent: 5, hideMediaContent: 5, showRelationshipContent: 5, hideTextContent: 5, showUtilityNetworkContent: 5, hideLastEditedInfo: 5, autoDestroyDisabled: 5, messageOverrides: 0, label: 1, location: 0, state: 32 };
|
|
23
|
+
this.properties = { popupTemplate: 16, sourceLayer: 16, fieldInfoMap: 16, values: 16, globalValues: 16, internalFlowItems: 16, flowType: 1, viewModel: 0, view: 0, flowItems: 0, referenceElement: 1, icon: 1, isFeatureFromTable: 36, graphic: 0, defaultPopupTemplateEnabled: 5, headingLevel: 9, spatialReference: 0, timeZone: 1, heading: 0, map: 0, chartAnimationDisabled: 5, hideHeading: 5, hideContent: 5, hideAttachmentsContent: 5, hideEmptyRelationshipContent: 5, hideCustomContent: 5, hideExpressionContent: 5, hideFieldsContent: 5, hideMediaContent: 5, showRelationshipContent: 5, hideTextContent: 5, showUtilityNetworkContent: 5, hideLastEditedInfo: 5, autoDestroyDisabled: 5, messageOverrides: 0, label: 1, location: 0, state: 32 };
|
|
24
24
|
}
|
|
25
25
|
static {
|
|
26
26
|
this.styles = z;
|
|
@@ -29,10 +29,10 @@ class S extends b {
|
|
|
29
29
|
return R(this.graphic, this.defaultPopupTemplateEnabled) ?? void 0;
|
|
30
30
|
}
|
|
31
31
|
get sourceLayer() {
|
|
32
|
-
return
|
|
32
|
+
return E(this.graphic);
|
|
33
33
|
}
|
|
34
34
|
get fieldInfoMap() {
|
|
35
|
-
return
|
|
35
|
+
return D(V(this.popupTemplate), this.sourceLayer);
|
|
36
36
|
}
|
|
37
37
|
get values() {
|
|
38
38
|
return this.graphic?.attributes ?? {};
|
|
@@ -192,7 +192,7 @@ class S extends b {
|
|
|
192
192
|
layer: o,
|
|
193
193
|
text: e.description
|
|
194
194
|
});
|
|
195
|
-
return r`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} class="content-element" .flowItems=${this.flowItems ?? this.internalFlowItems} .description=${v} .layer=${o} .map=${this.map ?? void 0} .displayCount=${l} .graphic=${a ?? void 0} .heading=${m} .headingLevel=${this.headingLevel} .messages=${this.messages} .orderByFields=${c ?? void 0} .relationshipId=${h ?? void 0} .spatialReference=${this.spatialReference ?? void 0} .timeZone=${this.timeZone ?? void 0} use-feature-next-flow-item .values=${f} .view=${u ?? void 0}></arcgis-feature-relationship>`;
|
|
195
|
+
return r`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} class="content-element" .flowItems=${this.flowItems ?? this.internalFlowItems} .description=${v} .layer=${o} .map=${this.map ?? void 0} .displayCount=${l} .graphic=${a ?? void 0} .heading=${m} .headingLevel=${this.headingLevel} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .messages=${this.messages} .orderByFields=${c ?? void 0} .relationshipId=${h ?? void 0} .spatialReference=${this.spatialReference ?? void 0} .timeZone=${this.timeZone ?? void 0} use-feature-next-flow-item .values=${f} .view=${u ?? void 0}></arcgis-feature-relationship>`;
|
|
196
196
|
}
|
|
197
197
|
_renderAssociation(e) {
|
|
198
198
|
const { fieldInfoMap: t, globalValues: i, graphic: a, messages: s, sourceLayer: o, values: n } = this, l = d({
|
|
@@ -252,7 +252,7 @@ class S extends b {
|
|
|
252
252
|
}
|
|
253
253
|
_renderContentContainer() {
|
|
254
254
|
const { flowItems: e, hideContent: t, internalFlowItems: i, headingLevel: a, state: s, messages: o, heading: n, hideHeading: l } = this, c = t ? null : r`<div class="main">${[this._renderContent(), this._renderLastEditInfo()]}</div>`, h = o.returnToInitialFeature ?? "";
|
|
255
|
-
return e ? c : r`<calcite-flow ${
|
|
255
|
+
return e ? c : r`<calcite-flow ${w(this._storeRootFlowNode)}><calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} .loading=${s === "loading"} .headingLevel=${a} .heading=${l ? void 0 : P(n)} .selected=${!i.length}>${!l && n ? r`<div slot=heading><div .innerHTML=${A.sanitize(n ?? "") ?? ""}></div></div>` : null}${c}</calcite-flow-item>${i.toArray().map((p, u) => r`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} @calciteFlowItemBack=${(f) => {
|
|
256
256
|
f.preventDefault(), this._handleDrillInBackClick();
|
|
257
257
|
}} .loading=${s === "loading"} .headingLevel=${a} .selected=${u === i.length - 1}><calcite-action icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${h} title=${h ?? _}></calcite-action>${p}</calcite-flow-item>`)}</calcite-flow>`;
|
|
258
258
|
}
|
|
@@ -2,35 +2,36 @@
|
|
|
2
2
|
import { c as H } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as k, html as o } from "lit";
|
|
4
4
|
import { debounce as A } from "@arcgis/toolkit/function";
|
|
5
|
-
import { LitElement as K, renderElement as q, safeClassMap as
|
|
6
|
-
import { templateHasKey as
|
|
5
|
+
import { LitElement as K, renderElement as q, safeClassMap as D } from "@arcgis/lumina";
|
|
6
|
+
import { templateHasKey as x, stripHTML as N } from "@arcgis/core/applications/Components/stringUtils.js";
|
|
7
7
|
import { renderingSanitizer as O } from "@arcgis/core/applications/Components/sanitizerUtils.js";
|
|
8
8
|
import { isRelatableFeatureSupportedLayer as W, findRelatedLayer as Z } from "@arcgis/core/applications/Components/featureUtils.js";
|
|
9
9
|
import { substitute as z, formatNumber as V } from "@arcgis/core/intl.js";
|
|
10
|
-
import { watch as
|
|
10
|
+
import { watch as g, on as G } from "@arcgis/core/core/reactiveUtils.js";
|
|
11
11
|
import { o as J } from "../../chunks/feature-utils.js";
|
|
12
12
|
import M from "@arcgis/core/core/Collection.js";
|
|
13
13
|
import S from "@arcgis/core/rest/support/RelationshipQuery.js";
|
|
14
|
-
import { ignoreAbortErrors as
|
|
14
|
+
import { ignoreAbortErrors as R } from "@arcgis/core/core/promiseUtils.js";
|
|
15
15
|
import { classes as Q } from "@arcgis/toolkit/dom";
|
|
16
16
|
import { createRef as U, ref as X } from "lit/directives/ref.js";
|
|
17
17
|
import Y from "@arcgis/core/popup/FeatureContent.js";
|
|
18
|
-
import { g as
|
|
19
|
-
|
|
18
|
+
import { g as L } from "../../chunks/async-utils.js";
|
|
19
|
+
import { bypassReadOnly as ee } from "@arcgis/lumina/controllers";
|
|
20
|
+
const te = k`:host{position:relative;flex:1 1 auto}:host([empty]){display:none}.list{min-height:var(--calcite-spacing-xxxl)}.list-item-hidden{display:none}.feature-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-spacing-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none}`, re = (h) => {
|
|
20
21
|
const e = [];
|
|
21
22
|
if (h.formTemplate) {
|
|
22
23
|
const { description: t, title: r } = h.formTemplate;
|
|
23
24
|
h.fields?.forEach((i) => {
|
|
24
|
-
const s = r &&
|
|
25
|
+
const s = r && x(r, i.name), a = t && x(t, i.name);
|
|
25
26
|
(s || a) && e.push(i.name);
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
return e;
|
|
29
30
|
}, P = 100;
|
|
30
|
-
function
|
|
31
|
+
function ie(h) {
|
|
31
32
|
return typeof h == "string" && h.trim().length > 0;
|
|
32
33
|
}
|
|
33
|
-
class
|
|
34
|
+
class se extends K {
|
|
34
35
|
constructor() {
|
|
35
36
|
super(...arguments), this._increaseFeaturePage = () => {
|
|
36
37
|
const { state: e, showAllEnabled: t, relatedFeatures: r, featuresPerPage: i, featurePage: s } = this;
|
|
@@ -51,26 +52,26 @@ class ie extends K {
|
|
|
51
52
|
}, this._queryController = async () => {
|
|
52
53
|
this._cancelQuery();
|
|
53
54
|
const e = new AbortController();
|
|
54
|
-
this._queryAbortController = e, await
|
|
55
|
+
this._queryAbortController = e, await R(this._query()), this._queryAbortController === e && (this._queryAbortController = null);
|
|
55
56
|
}, this._queryFeatureCountController = async () => {
|
|
56
57
|
this._loaded = !1, this._cancelQueryFeatureCount();
|
|
57
58
|
const e = new AbortController();
|
|
58
|
-
this._queryFeatureCountAbortController = e, await
|
|
59
|
+
this._queryFeatureCountAbortController = e, await R(this._queryFeatureCount()), this._queryFeatureCountAbortController === e && (this._queryFeatureCountAbortController = null), this._loaded = !0;
|
|
59
60
|
}, this._queryPageController = async () => {
|
|
60
61
|
const e = new AbortController();
|
|
61
|
-
this._queryPageAbortController = e, await
|
|
62
|
-
}, this._queryDebounced = A(this._queryController,
|
|
62
|
+
this._queryPageAbortController = e, await R(this._queryPage()), this._queryPageAbortController === e && (this._queryPageAbortController = null);
|
|
63
|
+
}, this._queryDebounced = A(this._queryController, L(P)), this._queryFeatureCountDebounced = A(this._queryFeatureCountController, L(P)), this._queryPageDebounced = A(this._queryPageController, L(P)), this._query = async () => {
|
|
63
64
|
const { _queryAbortController: e, relatedFeatures: t } = this;
|
|
64
65
|
!this.featureCount || this.relatedLayer?.type === "subtype-group" && !this.activeCategory || (this.relatedFeatureViewModels.destroyAll(), this.featurePage = 1, t.destroyAll(), t.addMany(this._sliceFeatures(await this._queryRelatedFeatures({ signal: e?.signal }))));
|
|
65
66
|
}, this._addFlowItem = (e) => {
|
|
66
67
|
e && this.flowItems?.push(e);
|
|
67
|
-
}, this._relatedFeatureIntersectionObserverNode = U(), this.relatedFeatures = new M(), this._queryAbortController = null, this._queryPageAbortController = null, this._queryFeatureCountAbortController = null, this.featureCount = 0, this._loaded = !1, this.relatedFeatureViewModels = new M(), this.autoDestroyDisabled = !1, this.featuresPerPage = 10, this.useFeatureNextFlowItem = !1, this.flowType = "feature-relationship", this.headingLevel = 2, this.hideHeading = !1, this.hideDescription = !1, this.showAllEnabled = !1;
|
|
68
|
+
}, this._relatedFeatureIntersectionObserverNode = U(), this.relatedFeatures = new M(), this._queryAbortController = null, this._queryPageAbortController = null, this._queryFeatureCountAbortController = null, this.featureCount = 0, this._loaded = !1, this.relatedFeatureViewModels = new M(), this.autoDestroyDisabled = !1, this.featuresPerPage = 10, this.useFeatureNextFlowItem = !1, this.flowType = "feature-relationship", this.headingLevel = 2, this.hideHeading = !1, this.hideDescription = !1, this.hideEmptyRelationshipContent = !1, this.empty = !1, this.showAllEnabled = !1;
|
|
68
69
|
}
|
|
69
70
|
static {
|
|
70
|
-
this.properties = { allCategories: 16, _queryAbortController: 16, _queryPageAbortController: 16, _queryFeatureCountAbortController: 16, featureCount: 16, _loaded: 16, canLoad: 16, canQuery: 16, displayShowAllButton: 16, displayListItems: 16, categories: 16, itemDescriptionFieldName: 16, relatedFeatureViewModels: 16, state: 16, autoDestroyDisabled: 5, allItemsDescription: 32, featurePage: 9, featuresPerPage: 9, flowItems: 0, useFeatureNextFlowItem: 5, flowType: 1, headingLevel: 9, messages: 0, heading: 1, description: 1, values: 0, activeCategory: 0, hideHeading: 5, hideDescription: 5, displayCount: 9, graphic: 0, layer: 0, map: 0, view: 0, spatialReference: 0, timeZone: 1, orderByFields: 0, relationshipId: 9, showAllEnabled: 5, label: 3 };
|
|
71
|
+
this.properties = { allCategories: 16, _queryAbortController: 16, _queryPageAbortController: 16, _queryFeatureCountAbortController: 16, featureCount: 16, _loaded: 16, canLoad: 16, canQuery: 16, displayShowAllButton: 16, displayListItems: 16, categories: 16, itemDescriptionFieldName: 16, relatedFeatureViewModels: 16, state: 16, autoDestroyDisabled: 5, allItemsDescription: 32, featurePage: 9, featuresPerPage: 9, flowItems: 0, useFeatureNextFlowItem: 5, flowType: 1, headingLevel: 9, messages: 0, heading: 1, description: 1, values: 0, activeCategory: 0, hideHeading: 5, hideDescription: 5, hideEmptyRelationshipContent: 5, empty: 39, displayCount: 9, graphic: 0, layer: 0, map: 0, view: 0, spatialReference: 0, timeZone: 1, orderByFields: 0, relationshipId: 9, showAllEnabled: 5, label: 3 };
|
|
71
72
|
}
|
|
72
73
|
static {
|
|
73
|
-
this.styles =
|
|
74
|
+
this.styles = te;
|
|
74
75
|
}
|
|
75
76
|
get orderByFieldsFixedCasing() {
|
|
76
77
|
const { orderByFields: e, relatedLayer: t } = this;
|
|
@@ -163,6 +164,10 @@ class ie extends K {
|
|
|
163
164
|
set heading(e) {
|
|
164
165
|
this._heading = e;
|
|
165
166
|
}
|
|
167
|
+
get _empty() {
|
|
168
|
+
const { displayListItems: e, hideEmptyRelationshipContent: t, state: r } = this;
|
|
169
|
+
return t && r === "ready" && !e;
|
|
170
|
+
}
|
|
166
171
|
get displayCount() {
|
|
167
172
|
return this._displayCount ?? 3;
|
|
168
173
|
}
|
|
@@ -174,7 +179,7 @@ class ie extends K {
|
|
|
174
179
|
}
|
|
175
180
|
loaded() {
|
|
176
181
|
this.manager.onLifecycle(() => [
|
|
177
|
-
|
|
182
|
+
g(() => [
|
|
178
183
|
this.displayCount,
|
|
179
184
|
this.graphic,
|
|
180
185
|
this.layer,
|
|
@@ -188,14 +193,18 @@ class ie extends K {
|
|
|
188
193
|
this.featureCount,
|
|
189
194
|
this.activeCategory
|
|
190
195
|
], () => this._queryDebounced(), { initial: !0 }),
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
196
|
+
g(() => [this.featurePage, this.showAllEnabled], () => this._queryPageDebounced()),
|
|
197
|
+
g(() => [this.layer, this.relationshipId, this.objectId, this.canQuery, this.activeCategory], () => this._queryFeatureCountDebounced(), { initial: !0 }),
|
|
198
|
+
g(() => [this.state, this.showAllEnabled, this._relatedFeatureIntersectionObserverNode], () => this._handleRelatedFeatureObserverChange()),
|
|
199
|
+
g(() => [this.displayListItems, this.hideEmptyRelationshipContent, this.state], () => this._setEmpty(this._empty), { initial: !0 }),
|
|
194
200
|
G(() => this.relatedFeatures, "change", () => this._setRelatedFeaturesViewModels())
|
|
195
201
|
]), this.manager.onDestroy(() => {
|
|
196
202
|
this.relatedFeatureViewModels.destroyAll(), this.relatedFeatures.destroyAll(), this._cancelQuery(), this._cancelQueryFeatureCount(), this._cancelQueryPage(), this._unobserveRelatedFeatureObserver();
|
|
197
203
|
});
|
|
198
204
|
}
|
|
205
|
+
_setEmpty(e) {
|
|
206
|
+
ee(() => this.empty = e);
|
|
207
|
+
}
|
|
199
208
|
async _queryFeatureCount() {
|
|
200
209
|
const { layer: e, relatedLayer: t } = this;
|
|
201
210
|
await e?.load(), await t?.load();
|
|
@@ -206,27 +215,27 @@ class ie extends K {
|
|
|
206
215
|
}
|
|
207
216
|
if (t?.type === "subtype-group" && !i) {
|
|
208
217
|
if (this.featureCount = 0, this.relatedFeatureViewModels.destroyAll(), this.featurePage = 1, this.relatedFeatures.destroyAll(), n && d != null) {
|
|
209
|
-
const { default:
|
|
218
|
+
const { default: F } = await import("@arcgis/core/smartMapping/statistics/uniqueValues.js"), { uniqueValueInfos: w } = await F({
|
|
210
219
|
layer: t,
|
|
211
220
|
sqlWhere: `${n} = '${d}'`,
|
|
212
221
|
field: t.subtypeField ?? void 0,
|
|
213
222
|
signal: r?.signal
|
|
214
|
-
}), v = w.map(({ count: c, value:
|
|
215
|
-
const
|
|
216
|
-
return
|
|
223
|
+
}), v = w.map(({ count: c, value: p }) => {
|
|
224
|
+
const f = t.subtypes?.find((I) => I.code === p)?.name;
|
|
225
|
+
return p != null && f ? {
|
|
217
226
|
count: c,
|
|
218
|
-
value:
|
|
219
|
-
name:
|
|
227
|
+
value: p,
|
|
228
|
+
name: f
|
|
220
229
|
} : void 0;
|
|
221
230
|
}).filter((c) => c != null);
|
|
222
231
|
this.allCategories = v;
|
|
223
232
|
}
|
|
224
233
|
return;
|
|
225
234
|
}
|
|
226
|
-
const { historicMoment:
|
|
235
|
+
const { historicMoment: m, gdbVersion: C } = e, _ = new S({
|
|
227
236
|
cacheHint: b,
|
|
228
|
-
gdbVersion:
|
|
229
|
-
historicMoment:
|
|
237
|
+
gdbVersion: C,
|
|
238
|
+
historicMoment: m,
|
|
230
239
|
relationshipId: l,
|
|
231
240
|
returnGeometry: !1,
|
|
232
241
|
objectIds: [a],
|
|
@@ -249,21 +258,21 @@ class ie extends K {
|
|
|
249
258
|
!r || t < 2 || !s || this.relatedLayer?.type === "subtype-group" && !this.activeCategory || e.addMany(await this._queryRelatedFeatures({ signal: i?.signal }));
|
|
250
259
|
}
|
|
251
260
|
async _queryRelatedFeatures(e) {
|
|
252
|
-
const { displayCount: t, featureCount: r, featurePage: i, featuresPerPage: s, layer: a, orderByFieldsFixedCasing: n, relatedLayer: l, relatedLayerKeyFields: d, relationshipId: b, showAllEnabled:
|
|
261
|
+
const { displayCount: t, featureCount: r, featurePage: i, featuresPerPage: s, layer: a, orderByFieldsFixedCasing: n, relatedLayer: l, relatedLayerKeyFields: d, relationshipId: b, showAllEnabled: m, supportsCacheHint: C } = this, { canQuery: _, objectId: y } = this;
|
|
253
262
|
if (!_ || !a || !l || y == null)
|
|
254
263
|
return [];
|
|
255
|
-
const
|
|
264
|
+
const F = m ? ((i - 1) * s + r) % r : 0, w = m ? s : t, v = l.objectIdField, c = "subtypeField" in l ? l.subtypeField : void 0, p = [
|
|
256
265
|
...n.map((u) => u.field),
|
|
257
|
-
...
|
|
266
|
+
...re(l),
|
|
258
267
|
...d,
|
|
259
268
|
v,
|
|
260
269
|
c
|
|
261
|
-
].filter(
|
|
262
|
-
orderByFields:
|
|
263
|
-
start:
|
|
270
|
+
].filter(ie), f = n.map((u) => `${u.field} ${u.order}`), { historicMoment: I, gdbVersion: T } = a, j = new S({
|
|
271
|
+
orderByFields: f,
|
|
272
|
+
start: F,
|
|
264
273
|
num: w,
|
|
265
|
-
outFields:
|
|
266
|
-
cacheHint:
|
|
274
|
+
outFields: p,
|
|
275
|
+
cacheHint: C,
|
|
267
276
|
historicMoment: I,
|
|
268
277
|
gdbVersion: T,
|
|
269
278
|
relationshipId: b,
|
|
@@ -274,8 +283,8 @@ class ie extends K {
|
|
|
274
283
|
signal: e?.signal
|
|
275
284
|
}))[y]?.features || [];
|
|
276
285
|
return l.type === "subtype-group" && c ? $.forEach((u) => {
|
|
277
|
-
const B = u.attributes[c],
|
|
278
|
-
u.sourceLayer =
|
|
286
|
+
const B = u.attributes[c], E = l.findSublayerForSubtypeCode?.(B);
|
|
287
|
+
u.sourceLayer = E, u.layer = E;
|
|
279
288
|
}) : $.forEach((u) => {
|
|
280
289
|
u.sourceLayer = l, u.layer = l;
|
|
281
290
|
}), $;
|
|
@@ -288,11 +297,11 @@ class ie extends K {
|
|
|
288
297
|
const { flowItems: t } = this;
|
|
289
298
|
if (!t)
|
|
290
299
|
return;
|
|
291
|
-
const r = this.useFeatureNextFlowItem ? q(o`<arcgis-feature-next .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${this.flowType} .graphic=${e.graphic} .map=${this.map} show-relationship-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-next>`) : q(o`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${this.flowType} .graphic=${e.graphic} .map=${this.map} show-relationship-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature>`);
|
|
300
|
+
const r = this.useFeatureNextFlowItem ? q(o`<arcgis-feature-next .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${this.flowType} .graphic=${e.graphic} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .map=${this.map} show-relationship-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-next>`) : q(o`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${this.flowType} .graphic=${e.graphic} .map=${this.map} show-relationship-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature>`);
|
|
292
301
|
this._addFlowItem(r);
|
|
293
302
|
}
|
|
294
303
|
_addRelationshipFlowItem({ showAllEnabled: e = !1, activeCategory: t }) {
|
|
295
|
-
this._addFlowItem(q(o`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} .messages=${this.messages} .activeCategory=${t} .displayCount=${this.displayCount} .flowItems=${this.flowItems} .flowType=${this.flowType} .graphic=${this.graphic} .heading=${this.heading} hide-description .showAllEnabled=${e} hide-heading .layer=${this.layer} .map=${this.map} .orderByFields=${this.orderByFields} .relationshipId=${this.relationshipId} .spatialReference=${this.spatialReference} .useFeatureNextFlowItem=${this.useFeatureNextFlowItem} .values=${this.values} .view=${this.view}></arcgis-feature-relationship>`));
|
|
304
|
+
this._addFlowItem(q(o`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} .messages=${this.messages} .activeCategory=${t} .displayCount=${this.displayCount} .flowItems=${this.flowItems} .flowType=${this.flowType} .graphic=${this.graphic} .heading=${this.heading} hide-description .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .showAllEnabled=${e} hide-heading .layer=${this.layer} .map=${this.map} .orderByFields=${this.orderByFields} .relationshipId=${this.relationshipId} .spatialReference=${this.spatialReference} .useFeatureNextFlowItem=${this.useFeatureNextFlowItem} .values=${this.values} .view=${this.view}></arcgis-feature-relationship>`));
|
|
296
305
|
}
|
|
297
306
|
_showAllRecords() {
|
|
298
307
|
const { flowItems: e } = this;
|
|
@@ -353,7 +362,7 @@ class ie extends K {
|
|
|
353
362
|
...r,
|
|
354
363
|
...i?.global
|
|
355
364
|
}, l = (t && n?.[t]) ?? "";
|
|
356
|
-
return o`<calcite-list-item class=${
|
|
365
|
+
return o`<calcite-list-item class=${D(Q("list-item", { "list-item-hidden": s === "loading" }))} .description=${N(l.toString())} .label=${N(a)} @calciteListItemSelect=${() => this._selectRecord(e)}><div slot=heading><div .innerHTML=${O.sanitize(a ?? "") ?? ""}></div></div><div slot=description><div .innerHTML=${O.sanitize(l ?? "") ?? ""}></div></div>${this._renderChevronIconNode()}</calcite-list-item>`;
|
|
357
366
|
}
|
|
358
367
|
_renderShowAllListItem() {
|
|
359
368
|
return this.displayShowAllButton ? o`<calcite-list-item .description=${this.allItemsDescription} .label=${this.messages?.showAll} @calciteListItemSelect=${() => this._showAllRecords()}>${this._renderShowAllIconNode()}</calcite-list-item>` : null;
|
|
@@ -370,7 +379,7 @@ class ie extends K {
|
|
|
370
379
|
}
|
|
371
380
|
_renderRelatedFeatures() {
|
|
372
381
|
const { displayListItems: e } = this, { state: t } = this;
|
|
373
|
-
return o`<div class=${
|
|
382
|
+
return o`<div class=${D(Q("list", {
|
|
374
383
|
"list-querying": t === "querying"
|
|
375
384
|
}))}>${e ? this._renderList() : t === "ready" ? this._renderNoRelatedFeaturesMessage() : null}${this._renderStickyLoading()}${this._renderFeatureObserver()}</div>`;
|
|
376
385
|
}
|
|
@@ -378,7 +387,7 @@ class ie extends K {
|
|
|
378
387
|
return o`<calcite-notice icon=exclamation-mark-triangle kind=danger open scale=s width=full><div slot=message>${this.messages?.relationshipNotFound}</div></calcite-notice>`;
|
|
379
388
|
}
|
|
380
389
|
}
|
|
381
|
-
H("arcgis-feature-relationship",
|
|
390
|
+
H("arcgis-feature-relationship", se);
|
|
382
391
|
export {
|
|
383
|
-
|
|
392
|
+
se as ArcgisFeatureRelationship
|
|
384
393
|
};
|
|
@@ -265,6 +265,13 @@ export abstract class ArcgisFeaturesNext extends LitElement {
|
|
|
265
265
|
* @default false
|
|
266
266
|
*/
|
|
267
267
|
accessor hideCustomContent: boolean | undefined;
|
|
268
|
+
/**
|
|
269
|
+
* Indicates whether to hide relationship content when there are no relationship items to display.
|
|
270
|
+
*
|
|
271
|
+
* @default false
|
|
272
|
+
* @since 5.2
|
|
273
|
+
*/
|
|
274
|
+
accessor hideEmptyRelationshipContent: boolean;
|
|
268
275
|
/**
|
|
269
276
|
* Indicates whether to hide [expression content](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) within the component.
|
|
270
277
|
*
|