@arcgis/map-components 5.1.0-next.60 → 5.1.0-next.62
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/{BLKKPXDO.js → 277YGNPQ.js} +1 -1
- package/dist/cdn/{YOBLHGZK.js → 2OYSX637.js} +1 -1
- package/dist/cdn/{BDL7JHSJ.js → 2QO5XYXC.js} +1 -1
- package/dist/cdn/{Q33VTX4M.js → 2TP43ZJT.js} +1 -1
- package/dist/cdn/{76OGK6BJ.js → 34N6NVCA.js} +1 -1
- package/dist/cdn/{43AAIXLC.js → 3IMMSP7K.js} +1 -1
- package/dist/cdn/{6BSFBUM6.js → 3LHUEYZM.js} +1 -1
- package/dist/cdn/{RTWUAZET.js → 3QUBDSPU.js} +1 -1
- package/dist/cdn/{F76SAKGH.js → 3RCS4AK2.js} +1 -1
- package/dist/cdn/{6NTYMNLN.js → 3VBTMG7C.js} +1 -1
- package/dist/cdn/{6G6M4M5S.js → 43C5DIH5.js} +1 -1
- package/dist/cdn/{UMBRQNGS.js → 47JFG5FU.js} +1 -1
- package/dist/cdn/{6QUGJX3I.js → 4JJPFWBJ.js} +1 -1
- package/dist/cdn/4KLZDEYJ.js +2 -0
- package/dist/cdn/{MDUFAELV.js → 4WXHSJS4.js} +1 -1
- package/dist/cdn/{6ORHT4GS.js → 4Y32ZA4A.js} +1 -1
- package/dist/cdn/54VXNFQ4.js +2 -0
- package/dist/cdn/{CTFHP4WA.js → 55JQXQSW.js} +1 -1
- package/dist/cdn/{JTOVZZIK.js → 5ABSWG4I.js} +1 -1
- package/dist/cdn/{EWOBALV7.js → 5JNFAIJ6.js} +1 -1
- package/dist/cdn/5RELUUK7.js +2 -0
- package/dist/cdn/{RFJ2A4C5.js → 5VYGY5I2.js} +1 -1
- package/dist/cdn/{IFWIELXX.js → 64LRQ74J.js} +1 -1
- package/dist/cdn/{7KAQ36QW.js → 6FU5MMYZ.js} +1 -1
- package/dist/cdn/6GBJ7BZY.js +2 -0
- package/dist/cdn/{4QDDVY23.js → 6HLZ37OL.js} +1 -1
- package/dist/cdn/{SNQ2FGIZ.js → 6V5OS3F6.js} +1 -1
- package/dist/cdn/{4YOGEANW.js → 76JRCRDK.js} +1 -1
- package/dist/cdn/76LZPCRF.js +2 -0
- package/dist/cdn/{DJP36K3Y.js → 76MRQR3N.js} +1 -1
- package/dist/cdn/{TTXSJRX5.js → 7BWFZ4B2.js} +1 -1
- package/dist/cdn/{LNY6JB4T.js → 7EJRQZ4J.js} +1 -1
- package/dist/cdn/{HOO4XLPB.js → 7IOKJUW4.js} +1 -1
- package/dist/cdn/{RSBGBKYW.js → 7JI6J4N6.js} +1 -1
- package/dist/cdn/{6MNOO7S3.js → 7QLMRDBI.js} +1 -1
- package/dist/cdn/{2W3VBU7J.js → 7RXSOZQ7.js} +1 -1
- package/dist/cdn/{QSNY7PKS.js → 7YSD6HNU.js} +1 -1
- package/dist/cdn/{HSAVWAGS.js → AO4UV75O.js} +1 -1
- package/dist/cdn/{FBHD2ZEY.js → ASV42UM4.js} +1 -1
- package/dist/cdn/{AHYVOMEG.js → B3MJD74A.js} +1 -1
- package/dist/cdn/{LPD2FPBE.js → BFIXVV5U.js} +1 -1
- package/dist/cdn/BGYE2RYH.js +2 -0
- package/dist/cdn/{RPNWPXQM.js → BIJOBOZ4.js} +1 -1
- package/dist/cdn/{OSSSLPDH.js → BJ3FGQD7.js} +1 -1
- package/dist/cdn/{AMDRLSC6.js → BTDF2LF7.js} +1 -1
- package/dist/cdn/{4C65FPRR.js → BVQJEN6O.js} +1 -1
- package/dist/cdn/{323UBCSA.js → C2T4S7R6.js} +1 -1
- package/dist/cdn/{KB5J5TKR.js → C3MEDREM.js} +1 -1
- package/dist/cdn/C4G7PUW6.js +2 -0
- package/dist/cdn/{PV4EVFZL.js → C4TTO7TK.js} +1 -1
- package/dist/cdn/{3NIIEYZ3.js → CAS4WOLY.js} +1 -1
- package/dist/cdn/CGKNN7O3.js +2 -0
- package/dist/cdn/{A3PNX3GL.js → CVBW7J23.js} +1 -1
- package/dist/cdn/{IUI2SSE7.js → CYX7ZCTI.js} +1 -1
- package/dist/cdn/{GL2CGH7O.js → CZP57LZN.js} +1 -1
- package/dist/cdn/{BLFJJQQ3.js → DBZ3TUNH.js} +1 -1
- package/dist/cdn/{VVTVZ23C.js → DOAUTR3P.js} +1 -1
- package/dist/cdn/{QUZN3WEI.js → DSN53CZZ.js} +1 -1
- package/dist/cdn/{AK3LR5KN.js → DWTMIKGK.js} +1 -1
- package/dist/cdn/EA45GZ5F.js +2 -0
- package/dist/cdn/{EYBE3ZBK.js → EQ7PMY6V.js} +1 -1
- package/dist/cdn/{WGW42I4K.js → EYEWDNE5.js} +1 -1
- package/dist/cdn/{ZEKJESMA.js → F234D4MB.js} +1 -1
- package/dist/cdn/{HH5RW37I.js → F37IC6GS.js} +1 -1
- package/dist/cdn/{KXHRLYKD.js → F5UMXASB.js} +1 -1
- package/dist/cdn/{EYQYDFFT.js → GCFS62KM.js} +1 -1
- package/dist/cdn/{3RBPQIY2.js → GGFRRU24.js} +1 -1
- package/dist/cdn/GONQF4NL.js +2 -0
- package/dist/cdn/{N2AXFVQB.js → GTGN4N7C.js} +1 -1
- package/dist/cdn/GW3E4WBW.js +2 -0
- package/dist/cdn/{NWE4GWG6.js → HW4WLKS3.js} +1 -1
- package/dist/cdn/{X4JK3J5H.js → HX43LUFZ.js} +1 -1
- package/dist/cdn/{BLXKBUSY.js → I76WQDAB.js} +1 -1
- package/dist/cdn/{EYT725LZ.js → J2NNVVQJ.js} +1 -1
- package/dist/cdn/{7E7AM2OJ.js → JEBIHMOV.js} +1 -1
- package/dist/cdn/{7LBICZSN.js → JESWR7QG.js} +1 -1
- package/dist/cdn/{QIHCQOKX.js → JZZSQAW2.js} +1 -1
- package/dist/cdn/{OHDHHNIY.js → K4WPBHLB.js} +1 -1
- package/dist/cdn/KMHTPOUS.js +3 -0
- package/dist/cdn/{CWQLKJFC.js → KMPRGO2N.js} +1 -1
- package/dist/cdn/KSGWOMMH.js +2 -0
- package/dist/cdn/{MZENIHK3.js → LMYZFAFF.js} +1 -1
- package/dist/cdn/LTEIJYVA.js +2 -0
- package/dist/cdn/{JCLR7GTA.js → LUAKM4MG.js} +1 -1
- package/dist/cdn/{UCJK3GTY.js → M3SO3XES.js} +1 -1
- package/dist/cdn/{TG7WC3X6.js → MI222VBR.js} +1 -1
- package/dist/cdn/{GIBM773H.js → MOFI6L4O.js} +1 -1
- package/dist/cdn/{T5A2YHUT.js → MP4O7I6K.js} +1 -1
- package/dist/cdn/{O3CBEPSE.js → MRBYVJ5U.js} +1 -1
- package/dist/cdn/{4TP652AL.js → MX7NGEWP.js} +1 -1
- package/dist/cdn/{YT45OEI2.js → N3KVIOWL.js} +1 -1
- package/dist/cdn/{L4P6QUAJ.js → NADAEZJB.js} +1 -1
- package/dist/cdn/{7J2JZ2SZ.js → NJWMNFLG.js} +1 -1
- package/dist/cdn/{JDAMFTUY.js → OBKENUMK.js} +1 -1
- package/dist/cdn/{IJICMS5G.js → OK7S4W2T.js} +1 -1
- package/dist/cdn/{FMAT4CW4.js → OM6N42EA.js} +1 -1
- package/dist/cdn/{J2UAHEHR.js → OQNW6YMY.js} +1 -1
- package/dist/cdn/{XRXXGGKZ.js → PBTWS5ZO.js} +1 -1
- package/dist/cdn/PLPEGT56.js +2 -0
- package/dist/cdn/{TY7DGFDV.js → PM4BDQTV.js} +1 -1
- package/dist/cdn/{SVFZT7GR.js → PMSDTN4F.js} +1 -1
- package/dist/cdn/{2RITORYK.js → PP4XRJ4B.js} +1 -1
- package/dist/cdn/{AE6R5TA3.js → PZD2JLT5.js} +1 -1
- package/dist/cdn/{A2Y4QEYJ.js → QG6R7I4M.js} +1 -1
- package/dist/cdn/QHIBDCFD.js +2 -0
- package/dist/cdn/{RISMNCOT.js → QPPSIZAB.js} +1 -1
- package/dist/cdn/{HNQPE3FT.js → QVKAKMZA.js} +1 -1
- package/dist/cdn/{HJ3OTVSP.js → QVQPUYUA.js} +1 -1
- package/dist/cdn/{ZBPKNJD3.js → QWJMM65P.js} +1 -1
- package/dist/cdn/{X6YUOAIF.js → R2ZIHQ6C.js} +1 -1
- package/dist/cdn/{HKAKOHQC.js → RFFRNLP2.js} +1 -1
- package/dist/cdn/{RKWOCAIO.js → RLNU7CIG.js} +1 -1
- package/dist/cdn/{DRVFBFOW.js → RWZCNZXX.js} +1 -1
- package/dist/cdn/{4XLVCJ6P.js → SCFLK46L.js} +1 -1
- package/dist/cdn/{4YBNCIDF.js → SYWVHWVX.js} +1 -1
- package/dist/cdn/{GZ7R6ON7.js → TFYHLT7G.js} +1 -1
- package/dist/cdn/{7OM5OVLK.js → TGSCLA2C.js} +1 -1
- package/dist/cdn/{NMZDLL4M.js → TNCVNE6F.js} +1 -1
- package/dist/cdn/{23KLANNA.js → TWV3S4Z7.js} +1 -1
- package/dist/cdn/{QZFSCUU6.js → U3OC5CUW.js} +1 -1
- package/dist/cdn/{IUZTQ4PQ.js → U4CA3PYG.js} +1 -1
- package/dist/cdn/{WPHAAGQP.js → UCS4WK2U.js} +1 -1
- package/dist/cdn/{ZOCF3BGK.js → UO4R7CWA.js} +1 -1
- package/dist/cdn/{AEX2GVOA.js → UOEUBKDF.js} +1 -1
- package/dist/cdn/{AZ6KIV47.js → UVO7OQB6.js} +1 -1
- package/dist/cdn/{OXM4YQGO.js → UX2LYYGS.js} +1 -1
- package/dist/cdn/UXODIEBA.js +2 -0
- package/dist/cdn/{R2SRU7YZ.js → V3QXCAYX.js} +1 -1
- package/dist/cdn/{IS2PGNSH.js → V4KC76CR.js} +1 -1
- package/dist/cdn/{5VOKWJYK.js → VFOUXVUC.js} +1 -1
- package/dist/cdn/{NJX4DH3C.js → VHLUJNCP.js} +1 -1
- package/dist/cdn/{XJ7YGYPW.js → VY2CZNYM.js} +1 -1
- package/dist/cdn/{EAKRGXQC.js → W3ELN5AQ.js} +1 -1
- package/dist/cdn/{3D475OQN.js → W3EWLBL6.js} +1 -1
- package/dist/cdn/{H5TVMXUR.js → W7CYIQUT.js} +1 -1
- package/dist/cdn/{CXQ47WC4.js → WNDNGPC6.js} +1 -1
- package/dist/cdn/{AIUHMRPO.js → WP44MHA5.js} +1 -1
- package/dist/cdn/{DLDEDYSE.js → WU4OO2CE.js} +1 -1
- package/dist/cdn/{RRZZQHHA.js → XCN5IIIA.js} +1 -1
- package/dist/cdn/{2VAAAVLC.js → XCSLXGGT.js} +1 -1
- package/dist/cdn/{ZBIHLQ6H.js → XIBJIKAX.js} +1 -1
- package/dist/cdn/{ATCF2HG3.js → XQW7SSDL.js} +1 -1
- package/dist/cdn/XSRRD3ET.js +2 -0
- package/dist/cdn/{SMEJ4YAT.js → Y56BNGW6.js} +1 -1
- package/dist/cdn/YGFBOUJG.js +2 -0
- package/dist/cdn/{E23LKC2A.js → YJJZFGLZ.js} +1 -1
- package/dist/cdn/{RTB2XKDJ.js → YM46E2DT.js} +1 -1
- package/dist/cdn/{PCBKRI33.js → YMG6MCNY.js} +1 -1
- package/dist/cdn/{3FQKWB7C.js → YWIQ2K5S.js} +1 -1
- package/dist/cdn/{DJGZ4YG5.js → YXIRQ6K2.js} +1 -1
- package/dist/cdn/{PUKUYV7Z.js → Z4AZUIMN.js} +1 -1
- package/dist/cdn/{M2MXC4LH.js → Z57TNQ4S.js} +1 -1
- package/dist/cdn/{77HK7ZGB.js → Z7TYJCE5.js} +1 -1
- package/dist/cdn/{23REZ2B2.js → ZTERN4BN.js} +1 -1
- package/dist/cdn/{3F72VWYL.js → ZUMTQ5P7.js} +1 -1
- package/dist/cdn/assets/layer-list-new/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/action-utils.js +2 -2
- package/dist/chunks/component-utils.js +69 -76
- package/dist/chunks/feature-utils.js +10 -12
- package/dist/chunks/globalCss.js +1 -0
- package/dist/chunks/layer-list-item-indicator.js +55 -0
- package/dist/chunks/layer-list-utils.js +112 -0
- package/dist/chunks/slots.js +1 -1
- package/dist/chunks/svgUtils.js +1 -1
- package/dist/chunks/univariateUtils.js +1 -1
- package/dist/chunks/utils.js +7 -85
- package/dist/chunks/utils2.js +84 -45
- package/dist/chunks/utils3.js +51 -0
- package/dist/components/arcgis-catalog-layer-list/customElement.d.ts +8 -1
- package/dist/components/arcgis-catalog-layer-list/customElement.js +2 -2
- package/dist/components/arcgis-compass/customElement.d.ts +14 -8
- package/dist/components/arcgis-compass/customElement.js +75 -21
- package/dist/components/arcgis-directional-pad/customElement.js +37 -44
- package/dist/components/arcgis-feature-media/customElement.js +172 -199
- package/dist/components/arcgis-feature-relationship/customElement.js +1 -1
- package/dist/components/arcgis-features/customElement.js +25 -22
- package/dist/components/arcgis-layer-list/customElement.js +15 -15
- package/dist/components/arcgis-layer-list-item-indicator/customElement.js +11 -0
- package/dist/components/arcgis-layer-list-item-indicator/index.js +2 -0
- package/dist/components/arcgis-layer-list-item-panel/customElement.js +74 -0
- package/dist/components/arcgis-layer-list-item-panel/index.js +2 -0
- package/dist/components/arcgis-layer-list-new/customElement.d.ts +302 -0
- package/dist/components/arcgis-layer-list-new/customElement.js +253 -0
- package/dist/components/arcgis-layer-list-new/index.d.ts +1 -0
- package/dist/components/arcgis-layer-list-new/index.js +10 -0
- package/dist/components/arcgis-layer-list-new/layer-list-item/customElement.js +139 -0
- package/dist/components/{arcgis-layer-list-item → arcgis-layer-list-new/layer-list-item}/index.js +6 -5
- 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-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-table-list/customElement.d.ts +11 -4
- package/dist/components/arcgis-table-list/customElement.js +11 -11
- package/dist/components/arcgis-utility-network-trace-results/customElement.js +29 -26
- 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 +6 -4
- package/dist/types/lumina.d.ts +11 -2
- package/dist/types/preact.d.ts +12 -2
- package/dist/types/react.d.ts +13 -2
- package/dist/types/stencil.d.ts +11 -2
- package/dist/utils/action-utils.d.ts +1 -0
- package/dist/utils/layer-list-utils.d.ts +12 -0
- package/package.json +4 -4
- package/dist/cdn/BDQN2SGF.js +0 -2
- package/dist/cdn/EHZW6UXL.js +0 -2
- package/dist/cdn/J5IZSPU4.js +0 -2
- package/dist/cdn/MGOKVOUR.js +0 -2
- package/dist/cdn/MSYERWRZ.js +0 -2
- package/dist/cdn/O4KTJ2LP.js +0 -2
- package/dist/cdn/O5TDDX7K.js +0 -2
- package/dist/cdn/ON57EB3S.js +0 -2
- package/dist/cdn/PDSZXTW2.js +0 -2
- package/dist/cdn/QOL55WND.js +0 -2
- package/dist/cdn/SUWCCBWL.js +0 -2
- package/dist/cdn/VQLAZAPA.js +0 -2
- package/dist/cdn/XCGJZDIU.js +0 -3
- package/dist/cdn/YMPJFJHK.js +0 -2
- package/dist/cdn/ZCCTN4B7.js +0 -2
- package/dist/chunks/layer-list.js +0 -6
- package/dist/components/arcgis-layer-list-item/customElement.js +0 -287
- /package/dist/cdn/{IHLNIYVE.js → BJQE4ISL.js} +0 -0
- /package/dist/cdn/{TZUYWT6D.js → KYU6MBFA.js} +0 -0
package/dist/chunks/utils.js
CHANGED
|
@@ -1,90 +1,12 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return t;
|
|
2
|
+
function a(e) {
|
|
3
|
+
const { x: t, y: n, width: r, height: i } = e.getBoundingClientRect();
|
|
4
|
+
return { x: t + r / 2, y: n + i / 2 };
|
|
6
5
|
}
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
return;
|
|
10
|
-
if (typeof t == "number")
|
|
11
|
-
return t;
|
|
12
|
-
if (typeof t == "string")
|
|
13
|
-
return s(t);
|
|
14
|
-
if ("value" in t || "unit" in t)
|
|
15
|
-
return o(r.dotValue ?? "", t);
|
|
16
|
-
if ("colorName" in t && "bandName" in t) {
|
|
17
|
-
const n = r[t.colorName], a = r[t.bandName] || t.bandName;
|
|
18
|
-
return `${n}: ${a}`;
|
|
19
|
-
}
|
|
20
|
-
if ("showCount" in t)
|
|
21
|
-
return t.showCount ? r.clusterCountTitle : void 0;
|
|
22
|
-
let e = null;
|
|
23
|
-
return d(t, i) ? e = t.ratioPercentTotal ? "showRatioPercentTotal" : t.ratioPercent ? "showRatioPercent" : t.ratio ? "showRatio" : t.normField ? "showNormField" : t.field ? "showField" : null : c(t, i) && (e = t.normField ? "showNormField" : t.normByPct ? "showNormPct" : t.field ? "showField" : null), e ? o(e === "showField" ? "{field}" : r[e] ?? "", {
|
|
24
|
-
field: t.field,
|
|
25
|
-
normField: t.normField
|
|
26
|
-
}) : void 0;
|
|
27
|
-
}
|
|
28
|
-
function c(r, t) {
|
|
29
|
-
return !t;
|
|
30
|
-
}
|
|
31
|
-
function h(r, t) {
|
|
32
|
-
if (!r.title || typeof r.title == "string")
|
|
33
|
-
return r.title;
|
|
34
|
-
const i = r.type === "color-ramp" || r.type === "opacity-ramp", e = r.title, n = u(t, e, i);
|
|
35
|
-
return c(e, i) && e.title ? `${e.title} (${n})` : n;
|
|
36
|
-
}
|
|
37
|
-
const m = /^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/iu;
|
|
38
|
-
function y(r, t, i) {
|
|
39
|
-
switch (t) {
|
|
40
|
-
case "heatmap-ramp":
|
|
41
|
-
return (i[r.label] || r.label) ?? null;
|
|
42
|
-
case "stretch-ramp":
|
|
43
|
-
const e = "value" in r ? r.value : void 0, n = r.label ? i[r.label] : "";
|
|
44
|
-
return n ? `${n}: ${typeof e == "string" ? e : l(e ?? 0, {
|
|
45
|
-
style: "decimal",
|
|
46
|
-
notation: e?.toString().toLowerCase().includes("e") ? "scientific" : "standard"
|
|
47
|
-
})}` : "";
|
|
48
|
-
default:
|
|
49
|
-
return r.label ?? null;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
function w(r, t) {
|
|
53
|
-
return !!(t && t === "Stretched" && "version" in r && typeof r.version == "number" && r.version >= 10.3 && r.declaredClass === "esri.layers.ImageryLayer");
|
|
54
|
-
}
|
|
55
|
-
function N(r) {
|
|
56
|
-
return r ? r / 72 * 96 : 0;
|
|
57
|
-
}
|
|
58
|
-
function b(r) {
|
|
59
|
-
return r ? r * 72 / 96 : 0;
|
|
60
|
-
}
|
|
61
|
-
function v(r) {
|
|
62
|
-
if (typeof r == "string") {
|
|
63
|
-
const t = r.match(m);
|
|
64
|
-
if (t) {
|
|
65
|
-
const i = Number(t[1]), e = t[3]?.toLowerCase(), n = r.startsWith("-"), a = e === "px" ? b(i) : i;
|
|
66
|
-
return n ? -a : a;
|
|
67
|
-
}
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
return r;
|
|
71
|
-
}
|
|
72
|
-
function L(r, t) {
|
|
73
|
-
const i = u(r, t, !1), e = i ? r.previewTemplateAriaLabel : r.previewAriaLabel;
|
|
74
|
-
return o(e ?? "", { label: i });
|
|
75
|
-
}
|
|
76
|
-
function F(r, t) {
|
|
77
|
-
if (!t || !r)
|
|
78
|
-
return;
|
|
79
|
-
(r.querySelector("svg") ?? r.querySelector("canvas") ?? r).setAttribute("aria-label", t);
|
|
6
|
+
function c(e) {
|
|
7
|
+
return e?.spatialReference?.isWebMercator || e?.spatialReference?.isGeographic || !1;
|
|
80
8
|
}
|
|
81
9
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
u as c,
|
|
85
|
-
L as g,
|
|
86
|
-
w as i,
|
|
87
|
-
N as p,
|
|
88
|
-
F as s,
|
|
89
|
-
v as t
|
|
10
|
+
c,
|
|
11
|
+
a as f
|
|
90
12
|
};
|
package/dist/chunks/utils2.js
CHANGED
|
@@ -1,51 +1,90 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { formatNumber as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
["letter-ansi-a-landscape", "ansi-a-landscape"],
|
|
9
|
-
["letter-ansi-a-portrait", "ansi-a-portrait"],
|
|
10
|
-
["tabloid-ansi-b-landscape", "ansi-b-landscape"],
|
|
11
|
-
["tabloid-ansi-b-portrait", "ansi-b-portrait"]
|
|
12
|
-
]), u = /^https:\/\/([a-z\d-]+)(\.maps([^.]*))?\.arcgis\.com/iu;
|
|
13
|
-
function f(a) {
|
|
14
|
-
if (!a)
|
|
15
|
-
return;
|
|
16
|
-
const t = a.layoutTemplateInfo;
|
|
2
|
+
import { substitute as o, formatNumber as l } from "@arcgis/core/intl.js";
|
|
3
|
+
import { stripHTML as s } from "@arcgis/core/applications/Components/stringUtils.js";
|
|
4
|
+
function d(r, t) {
|
|
5
|
+
return t;
|
|
6
|
+
}
|
|
7
|
+
function u(r, t, i) {
|
|
17
8
|
if (!t)
|
|
18
9
|
return;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
10
|
+
if (typeof t == "number")
|
|
11
|
+
return t;
|
|
12
|
+
if (typeof t == "string")
|
|
13
|
+
return s(t);
|
|
14
|
+
if ("value" in t || "unit" in t)
|
|
15
|
+
return o(r.dotValue ?? "", t);
|
|
16
|
+
if ("colorName" in t && "bandName" in t) {
|
|
17
|
+
const n = r[t.colorName], a = r[t.bandName] || t.bandName;
|
|
18
|
+
return `${n}: ${a}`;
|
|
19
|
+
}
|
|
20
|
+
if ("showCount" in t)
|
|
21
|
+
return t.showCount ? r.clusterCountTitle : void 0;
|
|
22
|
+
let e = null;
|
|
23
|
+
return d(t, i) ? e = t.ratioPercentTotal ? "showRatioPercentTotal" : t.ratioPercent ? "showRatioPercent" : t.ratio ? "showRatio" : t.normField ? "showNormField" : t.field ? "showField" : null : c(t, i) && (e = t.normField ? "showNormField" : t.normByPct ? "showNormPct" : t.field ? "showField" : null), e ? o(e === "showField" ? "{field}" : r[e] ?? "", {
|
|
24
|
+
field: t.field,
|
|
25
|
+
normField: t.normField
|
|
26
|
+
}) : void 0;
|
|
27
|
+
}
|
|
28
|
+
function c(r, t) {
|
|
29
|
+
return !t;
|
|
30
|
+
}
|
|
31
|
+
function h(r, t) {
|
|
32
|
+
if (!r.title || typeof r.title == "string")
|
|
33
|
+
return r.title;
|
|
34
|
+
const i = r.type === "color-ramp" || r.type === "opacity-ramp", e = r.title, n = u(t, e, i);
|
|
35
|
+
return c(e, i) && e.title ? `${e.title} (${n})` : n;
|
|
36
|
+
}
|
|
37
|
+
const m = /^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/iu;
|
|
38
|
+
function y(r, t, i) {
|
|
39
|
+
switch (t) {
|
|
40
|
+
case "heatmap-ramp":
|
|
41
|
+
return (i[r.label] || r.label) ?? null;
|
|
42
|
+
case "stretch-ramp":
|
|
43
|
+
const e = "value" in r ? r.value : void 0, n = r.label ? i[r.label] : "";
|
|
44
|
+
return n ? `${n}: ${typeof e == "string" ? e : l(e ?? 0, {
|
|
45
|
+
style: "decimal",
|
|
46
|
+
notation: e?.toString().toLowerCase().includes("e") ? "scientific" : "standard"
|
|
47
|
+
})}` : "";
|
|
48
|
+
default:
|
|
49
|
+
return r.label ?? null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function w(r, t) {
|
|
53
|
+
return !!(t && t === "Stretched" && "version" in r && typeof r.version == "number" && r.version >= 10.3 && r.declaredClass === "esri.layers.ImageryLayer");
|
|
54
|
+
}
|
|
55
|
+
function N(r) {
|
|
56
|
+
return r ? r / 72 * 96 : 0;
|
|
57
|
+
}
|
|
58
|
+
function b(r) {
|
|
59
|
+
return r ? r * 72 / 96 : 0;
|
|
60
|
+
}
|
|
61
|
+
function v(r) {
|
|
62
|
+
if (typeof r == "string") {
|
|
63
|
+
const t = r.match(m);
|
|
64
|
+
if (t) {
|
|
65
|
+
const i = Number(t[1]), e = t[3]?.toLowerCase(), n = r.startsWith("-"), a = e === "px" ? b(i) : i;
|
|
66
|
+
return n ? -a : a;
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
return r;
|
|
71
|
+
}
|
|
72
|
+
function L(r, t) {
|
|
73
|
+
const i = u(r, t, !1), e = i ? r.previewTemplateAriaLabel : r.previewAriaLabel;
|
|
74
|
+
return o(e ?? "", { label: i });
|
|
75
|
+
}
|
|
76
|
+
function F(r, t) {
|
|
77
|
+
if (!t || !r)
|
|
78
|
+
return;
|
|
79
|
+
(r.querySelector("svg") ?? r.querySelector("canvas") ?? r).setAttribute("aria-label", t);
|
|
43
80
|
}
|
|
44
81
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
82
|
+
y as a,
|
|
83
|
+
h as b,
|
|
84
|
+
u as c,
|
|
85
|
+
L as g,
|
|
86
|
+
w as i,
|
|
87
|
+
N as p,
|
|
88
|
+
F as s,
|
|
89
|
+
v as t
|
|
51
90
|
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import { formatNumber as i } from "@arcgis/core/intl.js";
|
|
3
|
+
const p = /* @__PURE__ */ new Map([
|
|
4
|
+
["a3-landscape", "a3-landscape"],
|
|
5
|
+
["a3-portrait", "a3-portrait"],
|
|
6
|
+
["a4-landscape", "a4-landscape"],
|
|
7
|
+
["a4-portrait", "a4-portrait"],
|
|
8
|
+
["letter-ansi-a-landscape", "ansi-a-landscape"],
|
|
9
|
+
["letter-ansi-a-portrait", "ansi-a-portrait"],
|
|
10
|
+
["tabloid-ansi-b-landscape", "ansi-b-landscape"],
|
|
11
|
+
["tabloid-ansi-b-portrait", "ansi-b-portrait"]
|
|
12
|
+
]), u = /^https:\/\/([a-z\d-]+)(\.maps([^.]*))?\.arcgis\.com/iu;
|
|
13
|
+
function f(a) {
|
|
14
|
+
if (!a)
|
|
15
|
+
return;
|
|
16
|
+
const t = a.layoutTemplateInfo;
|
|
17
|
+
if (!t)
|
|
18
|
+
return;
|
|
19
|
+
const [e, n] = t.pageSize;
|
|
20
|
+
return `${i(e)} × ${i(n)} ${a.pageUnits}`;
|
|
21
|
+
}
|
|
22
|
+
function d(a, t) {
|
|
23
|
+
const { label: e, layout: n, layoutItem: o } = a, r = n && !o && t[n] ? t[n] : null;
|
|
24
|
+
return r || ((e ?? n ?? o?.id)?.replaceAll("_", " ") ?? t.untitled);
|
|
25
|
+
}
|
|
26
|
+
function g(a) {
|
|
27
|
+
return p.get(a);
|
|
28
|
+
}
|
|
29
|
+
const b = /* @__PURE__ */ new Map([
|
|
30
|
+
["AIX", "aix"],
|
|
31
|
+
["EPS", "eps"],
|
|
32
|
+
["GIF", "gif"],
|
|
33
|
+
["JPG", "jpg"],
|
|
34
|
+
["PDF", "pdf"],
|
|
35
|
+
["PNG32", "png32"],
|
|
36
|
+
["PNG8", "png8"],
|
|
37
|
+
["SVG", "svg"],
|
|
38
|
+
["SVGZ", "svgz"],
|
|
39
|
+
["TIFF", "tiff"]
|
|
40
|
+
]), s = "map-only";
|
|
41
|
+
function m(a) {
|
|
42
|
+
return a?.toLowerCase() === s;
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
f as a,
|
|
46
|
+
g as b,
|
|
47
|
+
b as f,
|
|
48
|
+
d as g,
|
|
49
|
+
m as i,
|
|
50
|
+
u as r
|
|
51
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
|
-
import type ListItem from "@arcgis/core/widgets/LayerList/ListItem.js";
|
|
3
2
|
import type Collection from "@arcgis/core/core/Collection.js";
|
|
3
|
+
import type ListItem from "@arcgis/core/widgets/LayerList/ListItem.js";
|
|
4
4
|
import type CatalogLayer from "@arcgis/core/layers/CatalogLayer.js";
|
|
5
5
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
6
6
|
import type { ArcgisReferenceElement, IconName } from "../types.js";
|
|
7
|
+
import type { TableSupportedLayers } from "../../utils/layer-list-utils.js";
|
|
7
8
|
import type { LayerListViewModelTriggerActionEvent } from "@arcgis/core/widgets/LayerList/LayerListViewModel.js";
|
|
8
9
|
import type { MapViewOrSceneView } from "@arcgis/core/views/MapViewOrSceneView.js";
|
|
9
10
|
import type { FilterPredicate, ListItemModifier, VisibilityAppearance } from "@arcgis/core/widgets/LayerList/types.js";
|
|
@@ -174,6 +175,8 @@ export abstract class ArcgisCatalogLayerList extends LitElement {
|
|
|
174
175
|
* @since 4.11
|
|
175
176
|
*/
|
|
176
177
|
accessor label: string;
|
|
178
|
+
/** @internal */
|
|
179
|
+
accessor layerTablesEnabled: Collection<TableSupportedLayers>;
|
|
177
180
|
/**
|
|
178
181
|
* A function that executes each time a [ListItem](https://developers.arcgis.com/javascript/latest/references/core/widgets/LayerList/ListItem/) is created.
|
|
179
182
|
* Use this function to add actions and panels to list items, and to override
|
|
@@ -213,6 +216,10 @@ export abstract class ArcgisCatalogLayerList extends LitElement {
|
|
|
213
216
|
* ```
|
|
214
217
|
*/
|
|
215
218
|
accessor minFilterItems: number;
|
|
219
|
+
/** @internal */
|
|
220
|
+
accessor onCatalogOpen: (item: ListItem) => void;
|
|
221
|
+
/** @internal */
|
|
222
|
+
accessor onTablesOpen: (item: ListItem) => void;
|
|
216
223
|
/**
|
|
217
224
|
* By assigning the `id` attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.
|
|
218
225
|
*
|
|
@@ -10,10 +10,10 @@ import { u as n } from "../../chunks/useCloseEvent.js";
|
|
|
10
10
|
const c = l`@keyframes esri-basemap-slide{0%{opacity:0;margin-top:0;margin-left:0}75%{opacity:0;margin-top:0;margin-left:0}to{opacity:1;margin-top:5px;margin-left:5px}}@keyframes esri-docking-animation{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes popup-intro-animation-down{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translate(0)}}@keyframes popup-intro-animation-up{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translate(0)}}@supports (-ms-ime-align: auto){.esri-slider__anchor:focus{outline:1px dotted #000}}@keyframes esri-spinner--start-animation{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes esri-spinner--finish-animation{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0)}}@keyframes esri-spinner--rotate-animation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(prefers-reduced-motion){.esri-utility-network-trace__reset-prompt{animation:none!important}}@media(prefers-reduced-motion){.esri-popup--aligned-top-center,.esri-popup--aligned-top-left,.esri-popup--aligned-top-right,.esri-popup--aligned-bottom-center,.esri-popup--aligned-bottom-left,.esri-popup--aligned-bottom-right,.esri-popup--is-docked{animation:none!important}}@media(prefers-reduced-motion:reduce){.esri-fov-overlay{animation:none!important}}@keyframes esri-fade-in-down{0%{opacity:0;transform:translateY(-5px)}25%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translate(0)}}@keyframes esri-fade-in-up{0%{opacity:0;transform:translateY(5px)}25%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translate(0)}}@keyframes esri-fade-in{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes esri-fade-in-scale{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes looping-progresss-bar-ani{0%{width:0;left:0}20%{width:20%;left:0}80%{width:20%;left:80%}to{width:0;left:100%}}@keyframes esri-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes panel-advance{0%{opacity:0;transform:translate(50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-retreat{0%{opacity:0;transform:translate(-50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-advance--rtl{0%{opacity:0;transform:translate(-50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-retreat--rtl{0%{opacity:0;transform:translate(50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}.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)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-catalog-layer-list{display:flex;width:100%}.esri-catalog-layer-list__filter-no-results{padding:var(--calcite-spacing-md) 15px}.esri-catalog-layer-list__item{--calcite-list-item-icon-center: 8.5px}.esri-catalog-layer-list__item-table-icon{margin-inline-end:0}.esri-catalog-layer-list__item-action-image{text-align:center;background-position:50%;background-repeat:no-repeat;background-size:contain;flex:0 0 var(--calcite-spacing-xl);width:var(--calcite-spacing-xl);height:var(--calcite-spacing-xl);font-size:var(--calcite-font-size)}.esri-catalog-layer-list__action-menu .esri-catalog-layer-list__action-group{display:none}.esri-catalog-layer-list__action-menu[open] .esri-catalog-layer-list__action-group{display:flex}.esri-catalog-layer-list__visible-icon{visibility:hidden}.esri-catalog-layer-list__item--active:hover>.esri-catalog-layer-list__visible-toggle>.esri-catalog-layer-list__visible-icon,.esri-catalog-layer-list__item--active:focus>.esri-catalog-layer-list__visible-toggle>.esri-catalog-layer-list__visible-icon,.esri-catalog-layer-list__item--active:focus-within>.esri-catalog-layer-list__visible-toggle>.esri-catalog-layer-list__visible-icon{visibility:visible}.esri-catalog-layer-list__status-indicator{visibility:hidden;color:var(--calcite-color-text-1);margin-inline:0}.esri-catalog-layer-list__publishing{visibility:visible;color:var(--calcite-color-transparent-tint);transform-origin:var(--calcite-list-item-icon-center) var(--calcite-list-item-icon-center);animation:2s infinite esri-catalog-layer-list__publishing-anim}.esri-catalog-layer-list__updating{visibility:visible;animation:2s infinite esri-catalog-layer-list__updating-anim}.esri-catalog-layer-list__connection-status{visibility:visible;color:var(--calcite-color-status-danger);width:var(--calcite-spacing-xl);height:var(--calcite-spacing-xl);margin-inline:7px}.esri-catalog-layer-list__connection-status--connected{color:var(--calcite-color-status-success-press)}.esri-catalog-layer-list__item-content-bottom{margin:var(--calcite-spacing-md) 15px}.esri-catalog-layer-list__item-content-bottom .esri-legend__service{padding:0 0 var(--calcite-spacing-md)}.esri-catalog-layer-list__item-message{margin:var(--calcite-spacing-md) 15px}@keyframes esri-catalog-layer-list__updating-anim{0%,40%{color:var(--calcite-color-foreground-1)}50%,80%{color:var(--calcite-color-brand)}to{color:var(--calcite-color-foreground-1)}}@keyframes esri-catalog-layer-list__publishing-anim{0%,20%{transform:rotate(45deg)}80%,to{transform:rotate(135deg)}}`, d = s(r);
|
|
11
11
|
class g extends a {
|
|
12
12
|
constructor() {
|
|
13
|
-
super(...arguments), this.widget = d(this), this.viewModel = this.widget.viewModel, this.arcgisClose = n(this), this.view = this.widget.view, this.autoDestroyDisabled = !1, this.catalogLayer = this.widget.catalogLayer, this.closed = !1, this.collapsed = this.widget.collapsed, this.filterPlaceholder = this.widget.filterPlaceholder, this.filterPredicate = this.widget.filterPredicate, this.filterText = this.widget.filterText, this.headingLevel = this.widget.headingLevel, this.hideStatusIndicators = this.widget.visibleElements.statusIndicators, this.icon = this.widget.icon, this.label = this.widget.label, this.listItemCreatedFunction = this.widget.listItemCreatedFunction, this.minFilterItems = this.widget.minFilterItems, this.selectedItems = this.widget.selectedItems, this.selectionMode = this.widget.selectionMode, this.showCloseButton = this.widget.visibleElements.closeButton, this.showCollapseButton = this.widget.visibleElements.collapseButton, this.showErrors = this.widget.visibleElements.errors, this.showFilter = this.widget.visibleElements.filter, this.showHeading = this.widget.visibleElements.heading, this.showTemporaryLayerIndicators = this.widget.visibleElements.temporaryLayerIndicators, this.state = this.viewModel.state, this.visibilityAppearance = this.widget.visibilityAppearance, this.arcgisPropertyChange = i()("state"), this.arcgisReady = o(), this.arcgisTriggerAction = t(() => this.widget, "trigger-action");
|
|
13
|
+
super(...arguments), this.widget = d(this), this.viewModel = this.widget.viewModel, this.arcgisClose = n(this), this.view = this.widget.view, this.autoDestroyDisabled = !1, this.catalogLayer = this.widget.catalogLayer, this.closed = !1, this.collapsed = this.widget.collapsed, this.filterPlaceholder = this.widget.filterPlaceholder, this.filterPredicate = this.widget.filterPredicate, this.filterText = this.widget.filterText, this.headingLevel = this.widget.headingLevel, this.hideStatusIndicators = this.widget.visibleElements.statusIndicators, this.icon = this.widget.icon, this.label = this.widget.label, this.listItemCreatedFunction = this.widget.listItemCreatedFunction, this.layerTablesEnabled = this.widget.layerTablesEnabled, this.minFilterItems = this.widget.minFilterItems, this.onCatalogOpen = this.widget.onCatalogOpen, this.onTablesOpen = this.widget.onTablesOpen, this.selectedItems = this.widget.selectedItems, this.selectionMode = this.widget.selectionMode, this.showCloseButton = this.widget.visibleElements.closeButton, this.showCollapseButton = this.widget.visibleElements.collapseButton, this.showErrors = this.widget.visibleElements.errors, this.showFilter = this.widget.visibleElements.filter, this.showHeading = this.widget.visibleElements.heading, this.showTemporaryLayerIndicators = this.widget.visibleElements.temporaryLayerIndicators, this.state = this.viewModel.state, this.visibilityAppearance = this.widget.visibilityAppearance, this.arcgisPropertyChange = i()("state"), this.arcgisReady = o(), this.arcgisTriggerAction = t(() => this.widget, "trigger-action");
|
|
14
14
|
}
|
|
15
15
|
static {
|
|
16
|
-
this.properties = { view: 0, autoDestroyDisabled: 5, catalogItems: 32, catalogLayer: 0, closed: 5, collapsed: 7, filterPlaceholder: 1, filterPredicate: 0, filterText: 1, headingLevel: 9, hideStatusIndicators: 5, icon: 1, label: 1, listItemCreatedFunction: 0, minFilterItems: 9, referenceElement: 1, selectedItems: 0, selectionMode: 1, showCloseButton: 5, showCollapseButton: 5, showErrors: 5, showFilter: 5, showHeading: 5, showTemporaryLayerIndicators: 5, state: 32, visibilityAppearance: 1 };
|
|
16
|
+
this.properties = { view: 0, autoDestroyDisabled: 5, catalogItems: 32, catalogLayer: 0, closed: 5, collapsed: 7, filterPlaceholder: 1, filterPredicate: 0, filterText: 1, headingLevel: 9, hideStatusIndicators: 5, icon: 1, label: 1, listItemCreatedFunction: 0, layerTablesEnabled: 0, minFilterItems: 9, onCatalogOpen: 0, onTablesOpen: 0, referenceElement: 1, selectedItems: 0, selectionMode: 1, showCloseButton: 5, showCollapseButton: 5, showErrors: 5, showFilter: 5, showHeading: 5, showTemporaryLayerIndicators: 5, state: 32, visibilityAppearance: 1 };
|
|
17
17
|
}
|
|
18
18
|
static {
|
|
19
19
|
this.styles = c;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type MapView from "@arcgis/core/views/MapView.js";
|
|
3
|
+
import type SceneView from "@arcgis/core/views/SceneView.js";
|
|
2
4
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
-
import type { ArcgisReferenceElement, IconName } from "../types.js";
|
|
5
|
+
import type { ArcgisReferenceElement, GoToOverride, IconName } from "../types.js";
|
|
4
6
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
5
|
-
import type { MapViewOrSceneView } from "@arcgis/core/views/MapViewOrSceneView.js";
|
|
6
|
-
import type { GoToOverride } from "@arcgis/core/widgets/support/types.js";
|
|
7
|
-
import type { Axes } from "@arcgis/core/widgets/types.js";
|
|
8
|
-
import type { CompassViewModelState } from "@arcgis/core/widgets/Compass/CompassViewModel.js";
|
|
9
7
|
import type { Button as Button } from "@esri/calcite-components/components/calcite-button";
|
|
10
8
|
|
|
11
9
|
/**
|
|
@@ -38,7 +36,7 @@ export abstract class ArcgisCompass extends LitElement {
|
|
|
38
36
|
* };
|
|
39
37
|
* ```
|
|
40
38
|
*/
|
|
41
|
-
accessor goToOverride: GoToOverride |
|
|
39
|
+
accessor goToOverride: GoToOverride | undefined;
|
|
42
40
|
/**
|
|
43
41
|
* Icon displayed in the component's button.
|
|
44
42
|
*
|
|
@@ -81,12 +79,12 @@ export abstract class ArcgisCompass extends LitElement {
|
|
|
81
79
|
*
|
|
82
80
|
* @default "disabled"
|
|
83
81
|
*/
|
|
84
|
-
get state():
|
|
82
|
+
get state(): CompassState;
|
|
85
83
|
/**
|
|
86
84
|
* The view associated with the component.
|
|
87
85
|
* > **Note:** The recommended approach is to fully migrate applications to use map and scene components and avoid using MapView and SceneView directly. However, if you are migrating a large application from widgets to components, you might prefer a more gradual transition. To support this use case, the SDK includes this `view` property which connects a component to a MapView or SceneView. Ultimately, once migration is complete, the arcgis-compass component will be associated with a map or scene component rather than using the `view` property.
|
|
88
86
|
*/
|
|
89
|
-
accessor view:
|
|
87
|
+
accessor view: MapView | SceneView | undefined;
|
|
90
88
|
/**
|
|
91
89
|
* Specifies the size of the component.
|
|
92
90
|
*
|
|
@@ -104,4 +102,12 @@ export abstract class ArcgisCompass extends LitElement {
|
|
|
104
102
|
arcgisPropertyChange: ArcgisCompass["arcgisPropertyChange"]["detail"];
|
|
105
103
|
arcgisReady: ArcgisCompass["arcgisReady"]["detail"];
|
|
106
104
|
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type CompassState = "compass" | "disabled" | "rotation";
|
|
108
|
+
|
|
109
|
+
export interface Axes {
|
|
110
|
+
x?: number;
|
|
111
|
+
y?: number;
|
|
112
|
+
z?: number;
|
|
107
113
|
}
|
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { usePropertyChange as
|
|
2
|
+
import { c as r } from "../../chunks/runtime.js";
|
|
3
|
+
import { getGoToDuration as n } from "@arcgis/core/applications/Components/navigationDuration.js";
|
|
4
|
+
import { watch as e } from "@arcgis/core/core/reactiveUtils.js";
|
|
5
|
+
import { LitElement as c, createEvent as l, nothing as o, safeClassMap as h, safeStyleMap as d } from "@arcgis/lumina";
|
|
6
|
+
import { usePropertyChange as u } from "@arcgis/lumina/controllers";
|
|
7
7
|
import { classes as m } from "@arcgis/toolkit/dom";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
import { css as g, html as p } from "lit";
|
|
9
|
+
import { u as v } from "../../chunks/useT9n.js";
|
|
10
|
+
import { u as f } from "../../chunks/useView.js";
|
|
11
|
+
import { g as w } from "../../chunks/globalCss.js";
|
|
12
|
+
import { c as y } from "../../chunks/utils.js";
|
|
13
|
+
import { c as s } from "../../chunks/goTo.js";
|
|
14
|
+
const x = g`.arcgis-button{--calcite-icon-color: var(--calcite-color-text-3);--calcite-button-background-color: var(--calcite-color-foreground-1);color:var(--calcite-color-text-3);line-height:var(--calcite-font-line-height-relative-tight);display:flex;flex-flow:column;cursor:pointer;background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);:hover{--calcite-icon-color: var(--calcite-color-text-1);--calcite-button-background-color: var(--calcite-color-transparent-hover)}}:host{calcite-button{width:var(--calcite-spacing-xxxl);height:var(--calcite-spacing-xxxl)}}:host([visual-scale="l"]){calcite-button{width:calc(var(--calcite-spacing-xxxl) + var(--calcite-spacing-md));height:calc(var(--calcite-spacing-xxxl) + var(--calcite-spacing-md))}}:host([visual-scale="s"]){calcite-button{width:var(--calcite-spacing-xxl);height:var(--calcite-spacing-xxl)}}.root{border-radius:50%;box-shadow:var(--arcgis-internal-box-shadow, none)}.icon-container{justify-content:center;display:flex;position:absolute;transform:translate(-50%,-50%)}.icon-container:dir(rtl){transform:translate(50%,-50%)}`;
|
|
15
|
+
class b extends c {
|
|
13
16
|
constructor() {
|
|
14
|
-
super(...arguments), this.
|
|
17
|
+
super(...arguments), this._hasInitializedOrientation = !1, this._hasInitializedState = !1, this._lastState = "disabled", this.messages = v(), this._orientation = {
|
|
18
|
+
x: 0,
|
|
19
|
+
y: 0,
|
|
20
|
+
z: 0
|
|
21
|
+
}, this.view = f(this), this.autoDestroyDisabled = !1, this.visualScale = "m", this.arcgisPropertyChange = u()("state", "orientation"), this.arcgisReady = l();
|
|
15
22
|
}
|
|
16
23
|
static {
|
|
17
|
-
this.properties = { view: 0, autoDestroyDisabled: 5, goToOverride: 0, icon: 3, label: 1, messageOverrides: 0, orientation: 32, referenceElement: 1, state: 32, visualScale: 3 };
|
|
24
|
+
this.properties = { _orientation: 16, view: 0, autoDestroyDisabled: 5, canShowNorth: 32, goToOverride: 0, icon: 3, label: 1, messageOverrides: 0, orientation: 32, referenceElement: 1, state: 32, visualScale: 3 };
|
|
18
25
|
}
|
|
19
26
|
static {
|
|
20
|
-
this.styles =
|
|
27
|
+
this.styles = x;
|
|
28
|
+
}
|
|
29
|
+
get canShowNorth() {
|
|
30
|
+
return y(this.view);
|
|
21
31
|
}
|
|
22
32
|
get icon() {
|
|
23
33
|
return this._icon ?? (this.state === "rotation" ? "arrow-up" : "compass-needle");
|
|
@@ -25,24 +35,68 @@ class b extends l {
|
|
|
25
35
|
set icon(t) {
|
|
26
36
|
this._icon = t;
|
|
27
37
|
}
|
|
38
|
+
get orientation() {
|
|
39
|
+
return this._orientation;
|
|
40
|
+
}
|
|
41
|
+
get state() {
|
|
42
|
+
return !this.view?.ready || this.view.type === "2d" && !this.view.constraints.rotationEnabled ? "disabled" : this.canShowNorth ? "compass" : "rotation";
|
|
43
|
+
}
|
|
28
44
|
async destroy() {
|
|
29
45
|
await this.manager.destroy();
|
|
30
46
|
}
|
|
31
47
|
async reset() {
|
|
32
|
-
this
|
|
48
|
+
const { view: t } = this;
|
|
49
|
+
t?.ready && (t?.type === "2d" ? s({
|
|
50
|
+
target: { rotation: 0 },
|
|
51
|
+
options: { animationMode: "always", duration: n() }
|
|
52
|
+
}, t, this.goToOverride) : s({ target: { heading: 0 } }, t, this.goToOverride));
|
|
53
|
+
}
|
|
54
|
+
updated(t) {
|
|
55
|
+
t.has("_orientation") && (this._hasInitializedOrientation ? this.arcgisPropertyChange.emit({ name: "orientation" }) : this._hasInitializedOrientation = !0);
|
|
56
|
+
const i = this.state;
|
|
57
|
+
this._hasInitializedState ? i !== this._lastState && this.arcgisPropertyChange.emit({ name: "state" }) : this._hasInitializedState = !0, this._lastState = i;
|
|
58
|
+
}
|
|
59
|
+
loaded() {
|
|
60
|
+
if (!this.view) {
|
|
61
|
+
this.manager.onLifecycle(() => [
|
|
62
|
+
e(() => this.view?.ready, () => {
|
|
63
|
+
this._watchRotationOrCamera();
|
|
64
|
+
}, { once: !0 })
|
|
65
|
+
]);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
this._watchRotationOrCamera();
|
|
69
|
+
}
|
|
70
|
+
_watchRotationOrCamera() {
|
|
71
|
+
if (!this.view)
|
|
72
|
+
return;
|
|
73
|
+
const t = [];
|
|
74
|
+
this.view.type === "2d" ? t.push(e(() => this.view?.rotation, (i) => this._updateForRotation(i), { initial: !0 })) : t.push(e(() => this.view?.camera, (i) => this._updateForCamera(i), { initial: !0 })), this.manager.onLifecycle(() => t);
|
|
75
|
+
}
|
|
76
|
+
_updateForRotation(t) {
|
|
77
|
+
t != null && (this._orientation = {
|
|
78
|
+
z: t
|
|
79
|
+
});
|
|
33
80
|
}
|
|
34
|
-
|
|
35
|
-
|
|
81
|
+
_updateForCamera(t) {
|
|
82
|
+
if (!t)
|
|
83
|
+
return;
|
|
84
|
+
const i = -t.heading;
|
|
85
|
+
this._orientation = {
|
|
86
|
+
x: 0,
|
|
87
|
+
y: 0,
|
|
88
|
+
z: i
|
|
89
|
+
};
|
|
36
90
|
}
|
|
37
91
|
render() {
|
|
38
|
-
const { messages: t, icon:
|
|
39
|
-
return
|
|
92
|
+
const { messages: t, icon: i } = this;
|
|
93
|
+
return p`<div class=${h(m("root", w.arcgisButton))}><calcite-button .disabled=${this.state === "disabled"} kind=neutral .label=${t.reset} @click=${this.reset} round .scale=${this.visualScale} title=${t.reset ?? o}><div aria-hidden=true class="icon-container" title=${t.reset ?? o}><calcite-icon .scale=${this.visualScale} .icon=${i} style=${d(_(this.orientation))}></calcite-icon></div></calcite-button></div>`;
|
|
40
94
|
}
|
|
41
95
|
}
|
|
42
|
-
const
|
|
43
|
-
transform: `rotateZ(${
|
|
96
|
+
const _ = (a) => ({
|
|
97
|
+
transform: `rotateZ(${a.z}deg)`
|
|
44
98
|
});
|
|
45
|
-
|
|
99
|
+
r("arcgis-compass", b);
|
|
46
100
|
export {
|
|
47
101
|
b as ArcgisCompass
|
|
48
102
|
};
|