@arcgis/map-components 5.2.0-next.64 → 5.2.0-next.66
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/{5KBFECNZ.js → 6NWYETZO.js} +1 -1
- package/dist/cdn/{54DPKOI2.js → AKQ23RYL.js} +1 -1
- package/dist/cdn/{FWYUKFIR.js → AOGPP4VX.js} +1 -1
- package/dist/cdn/{RMKRRXJS.js → CDYL6VRW.js} +1 -1
- package/dist/cdn/{HRJIMMTW.js → DY6AWYYR.js} +1 -1
- package/dist/cdn/{RWDCU2CO.js → EYYH3G7B.js} +1 -1
- package/dist/cdn/{WP6ZYNAK.js → FLDPWIKO.js} +1 -1
- package/dist/cdn/{FBCMR23T.js → FUISFUR3.js} +1 -1
- package/dist/cdn/GP76UUFG.js +2 -0
- package/dist/cdn/{SHNSCLFF.js → IGORAGVE.js} +2 -2
- package/dist/cdn/{DTR5I2KQ.js → L254HFGW.js} +1 -1
- package/dist/cdn/{ARVSEV26.js → MFRZNKMQ.js} +1 -1
- package/dist/cdn/{LH246IIL.js → N34R2VNP.js} +1 -1
- package/dist/cdn/NCSFZ67G.js +2 -0
- package/dist/cdn/{34HQ4DIU.js → ORO4OWNH.js} +1 -1
- package/dist/cdn/OXJ6JBJF.js +2 -0
- package/dist/cdn/{FOHSM4R7.js → PT33LZD5.js} +1 -1
- package/dist/cdn/QGWMP6TU.js +2 -0
- package/dist/cdn/SBE47SO3.js +2 -0
- package/dist/cdn/SRNGMDBR.js +2 -0
- package/dist/cdn/{BYZRGKOW.js → U5NYFDPL.js} +1 -1
- package/dist/cdn/{VC4FPVTG.js → UAFLVW2D.js} +1 -1
- package/dist/cdn/{4IOVE754.js → UDZLCLOW.js} +1 -1
- package/dist/cdn/UJAX7TII.js +2 -0
- package/dist/cdn/XKC3DFCU.js +2 -0
- package/dist/cdn/{3K7YV4SA.js → XVUJEFQE.js} +1 -1
- package/dist/cdn/ZGGP2PLT.js +2 -0
- package/dist/cdn/ZHA4C7BC.js +2 -0
- package/dist/cdn/assets/basemap-toggle/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/selection-toolbar/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/layer-list-item.js +170 -0
- package/dist/chunks/layer-list-next.js +1 -1
- package/dist/chunks/slots.js +10 -10
- package/dist/chunks/useArcgisViewReadyError.js +28 -27
- package/dist/components/arcgis-attachments/customElement.d.ts +1 -1
- package/dist/components/arcgis-basemap-layer-list/customElement.d.ts +1 -1
- package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +8 -0
- package/dist/components/arcgis-basemap-layer-list-next/customElement.js +61 -61
- package/dist/components/arcgis-basemap-toggle/customElement.d.ts +6 -0
- package/dist/components/arcgis-basemap-toggle/customElement.js +30 -22
- package/dist/components/arcgis-catalog-layer-list/customElement.d.ts +1 -1
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +8 -0
- package/dist/components/arcgis-catalog-layer-list-next/customElement.js +17 -17
- package/dist/components/arcgis-feature-table/customElement.d.ts +1 -1
- package/dist/components/arcgis-feature-templates-legacy/customElement.d.ts +1 -1
- package/dist/components/arcgis-layer-list/customElement.d.ts +1 -1
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +8 -0
- package/dist/components/arcgis-layer-list-next/customElement.js +27 -27
- package/dist/components/arcgis-layer-list-next/layer-list-item/customElement.js +10 -154
- package/dist/components/{arcgis-oriented-imagery-viewer-image-viewer → arcgis-oriented-imagery-viewer-non-panoramic-viewer}/customElement.d.ts +9 -3
- package/dist/components/arcgis-oriented-imagery-viewer-non-panoramic-viewer/customElement.js +411 -0
- package/dist/components/{arcgis-oriented-imagery-viewer-image-viewer → arcgis-oriented-imagery-viewer-non-panoramic-viewer}/index.js +1 -0
- package/dist/components/{arcgis-oriented-imagery-viewer-image-viewer → arcgis-oriented-imagery-viewer-non-panoramic-viewer}/support/NonPanoramicMedia.d.ts +12 -3
- package/dist/components/arcgis-selection-toolbar/customElement.d.ts +379 -0
- package/dist/components/arcgis-selection-toolbar/customElement.js +191 -0
- package/dist/components/arcgis-selection-toolbar/index.d.ts +1 -0
- package/dist/components/arcgis-selection-toolbar/index.js +10 -0
- package/dist/components/arcgis-selection-toolbar/types.d.ts +8 -0
- package/dist/components/arcgis-table-list/customElement.d.ts +1 -1
- package/dist/components/arcgis-table-list-next/customElement.d.ts +8 -0
- package/dist/components/arcgis-table-list-next/customElement.js +12 -12
- 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 +13 -3
- package/dist/loader.js +6 -5
- package/dist/types/lumina.d.ts +18 -8
- package/dist/types/preact.d.ts +20 -9
- package/dist/types/react.d.ts +22 -10
- package/dist/types/stencil.d.ts +18 -8
- package/package.json +6 -6
- package/dist/cdn/2CRPXLAY.js +0 -2
- package/dist/cdn/3EYX5DTH.js +0 -2
- package/dist/cdn/74IVEAEO.js +0 -2
- package/dist/cdn/EF7LH4GQ.js +0 -2
- package/dist/cdn/GBLPYWL2.js +0 -2
- package/dist/cdn/KAXVBIZ7.js +0 -2
- package/dist/cdn/QNQQA4BU.js +0 -2
- package/dist/cdn/VAISR7CN.js +0 -2
- package/dist/cdn/XCCZTOXH.js +0 -2
- package/dist/components/arcgis-oriented-imagery-viewer-image-viewer/customElement.js +0 -231
- /package/dist/cdn/{M5YTVQ3E.js → 2ROKOM2Z.js} +0 -0
- /package/dist/cdn/{JYWV4RJT.js → 37VIO2V5.js} +0 -0
- /package/dist/cdn/{RDWKI3KP.js → 3RVEVJVG.js} +0 -0
- /package/dist/cdn/{57URHW23.js → 4O5BM5AI.js} +0 -0
- /package/dist/cdn/{UHL5U7GJ.js → 4XAKKTWP.js} +0 -0
- /package/dist/cdn/{Y3QCO64W.js → 55GK5OAA.js} +0 -0
- /package/dist/cdn/{CGM2YWJH.js → 5KSNV3AD.js} +0 -0
- /package/dist/cdn/{GJRDLFOY.js → 6CHIESQS.js} +0 -0
- /package/dist/cdn/{3J2BDZNE.js → 6TPIG3XC.js} +0 -0
- /package/dist/cdn/{INJXVNS3.js → 6WOUFI3X.js} +0 -0
- /package/dist/cdn/{I62OLA5J.js → 73PS6B6H.js} +0 -0
- /package/dist/cdn/{SMOBVQX6.js → CBHZA2RM.js} +0 -0
- /package/dist/cdn/{VXYZPWDK.js → D4LXZSJU.js} +0 -0
- /package/dist/cdn/{3XZU4KZX.js → ETAL67B5.js} +0 -0
- /package/dist/cdn/{EAN2ER5F.js → EW7KQ7UM.js} +0 -0
- /package/dist/cdn/{7IA62IHQ.js → FQS7XRHV.js} +0 -0
- /package/dist/cdn/{KU2D7B6L.js → FRNAEEL2.js} +0 -0
- /package/dist/cdn/{F3MJCQ74.js → J3LAIXMY.js} +0 -0
- /package/dist/cdn/{A4LOY55I.js → JOPE2HA7.js} +0 -0
- /package/dist/cdn/{YKVEZBMI.js → LIKCZBSN.js} +0 -0
- /package/dist/cdn/{SKVY2FTI.js → LKS3BW4E.js} +0 -0
- /package/dist/cdn/{MUMLZBK2.js → LNV4R7FO.js} +0 -0
- /package/dist/cdn/{UT4Y7W2I.js → LYVEFTG5.js} +0 -0
- /package/dist/cdn/{YYY2B7Z3.js → M5RPB52H.js} +0 -0
- /package/dist/cdn/{2WS6ADGC.js → QDOF7WAJ.js} +0 -0
- /package/dist/cdn/{3PLX2VZZ.js → QG5I2LDY.js} +0 -0
- /package/dist/cdn/{4WTMWS4L.js → RCXLHOT5.js} +0 -0
- /package/dist/cdn/{KUGHB56Z.js → RMUOAQL7.js} +0 -0
- /package/dist/cdn/{OCYNG6CZ.js → SMGBVJDQ.js} +0 -0
- /package/dist/cdn/{5D5K4ODL.js → SWUDJD3D.js} +0 -0
- /package/dist/cdn/{TDMJD6KE.js → TXH2FVPB.js} +0 -0
- /package/dist/cdn/{ULVWM2Z5.js → TXLEUQGC.js} +0 -0
- /package/dist/cdn/{6D7LJWC3.js → URSO4VYE.js} +0 -0
- /package/dist/cdn/{Z5KZ3J36.js → VISNMKBR.js} +0 -0
- /package/dist/cdn/{WLNDY4AF.js → VM2FDVMM.js} +0 -0
- /package/dist/cdn/{ZIHLJCFU.js → VZMX6AAC.js} +0 -0
- /package/dist/cdn/{4B2SV3DL.js → W3ELQQ2T.js} +0 -0
- /package/dist/cdn/{FFKWCM3U.js → XNUG4O7M.js} +0 -0
- /package/dist/cdn/{6IZPSVRK.js → YNAWY2DP.js} +0 -0
- /package/dist/cdn/{SF5BNNTL.js → ZDEXTEYL.js} +0 -0
- /package/dist/cdn/{BSA3D7EV.js → ZTCPBOG3.js} +0 -0
- /package/dist/cdn/{POCKSTPT.js → ZUKUN26H.js} +0 -0
- /package/dist/cdn/{X7DC4UOR.js → ZWWCLNZL.js} +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.ar.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.bg.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.bs.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.ca.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.cs.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.da.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.de.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.el.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.en.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.es.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.et.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.fi.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.fr.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.he.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.hr.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.hu.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.id.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.it.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.ja.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.ko.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.lt.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.lv.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.nl.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.no.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.pl.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.pt-BR.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.pt-PT.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.ro.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.ru.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.sk.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.sl.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.sr.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.sv.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.th.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.tr.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.uk.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.vi.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.zh-CN.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.zh-HK.json +0 -0
- /package/dist/cdn/assets/{oriented-imagery-viewer-image-viewer → oriented-imagery-viewer-non-panoramic-viewer}/t9n/messages.zh-TW.json +0 -0
- /package/dist/components/{arcgis-oriented-imagery-viewer-image-viewer → arcgis-oriented-imagery-viewer-non-panoramic-viewer}/index.d.ts +0 -0
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { c as E } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as x, html as u } from "lit";
|
|
4
|
+
import { LitElement as P } from "@arcgis/lumina";
|
|
5
|
+
import { t as l } from "../../chunks/async-utils.js";
|
|
6
|
+
import { property as h, subclass as C } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
7
|
+
import * as M from "@arcgis/toolkit/log";
|
|
8
|
+
import V from "@arcgis/core/core/Accessor.js";
|
|
9
|
+
import w from "@arcgis/core/geometry/Extent.js";
|
|
10
|
+
import "@arcgis/core/views/MapView.js";
|
|
11
|
+
import b from "@arcgis/core/geometry/SpatialReference.js";
|
|
12
|
+
import { watch as p } from "@arcgis/core/core/reactiveUtils.js";
|
|
13
|
+
import { rotateDimensions as S, registerPanConstraint as F } from "@arcgis/core/applications/Components/OrientedImageryViewer/ImageViewer/utils.js";
|
|
14
|
+
import H from "@arcgis/core/layers/support/TileInfo.js";
|
|
15
|
+
import { u as L } from "../../chunks/useT9n.js";
|
|
16
|
+
import "@arcgis/core/Graphic.js";
|
|
17
|
+
import { G as z } from "../../chunks/graphicsLayerController.js";
|
|
18
|
+
import { createRef as I, ref as T } from "lit/directives/ref.js";
|
|
19
|
+
const O = x`:host{height:100%;--arcgis-view-color-focus: none}`, R = {
|
|
20
|
+
xmin: -150,
|
|
21
|
+
ymin: 1,
|
|
22
|
+
xmax: 20,
|
|
23
|
+
ymax: 80,
|
|
24
|
+
spatialReference: {
|
|
25
|
+
wkid: 4326
|
|
26
|
+
}
|
|
27
|
+
}, g = 1e-6;
|
|
28
|
+
function G(i, e) {
|
|
29
|
+
if (!e)
|
|
30
|
+
return null;
|
|
31
|
+
const t = i.width / 2, a = i.height / 2, r = e.xmin + t, s = e.xmax - t, o = e.ymin + a, c = e.ymax - a;
|
|
32
|
+
return r >= s || o >= c ? null : new w({
|
|
33
|
+
xmin: r,
|
|
34
|
+
xmax: s,
|
|
35
|
+
ymin: o,
|
|
36
|
+
ymax: c,
|
|
37
|
+
spatialReference: i.spatialReference
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
var N = Object.defineProperty, A = Object.getOwnPropertyDescriptor, d = (i, e, t, a) => {
|
|
41
|
+
for (var r = a > 1 ? void 0 : a ? A(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
42
|
+
(o = i[s]) && (r = (a ? o(e, t, r) : o(r)) || r);
|
|
43
|
+
return a && r && N(e, t, r), r;
|
|
44
|
+
};
|
|
45
|
+
let n = class extends V {
|
|
46
|
+
//--------------------------------------------------------------------------
|
|
47
|
+
//
|
|
48
|
+
// Lifecycle
|
|
49
|
+
//
|
|
50
|
+
//--------------------------------------------------------------------------
|
|
51
|
+
constructor(i) {
|
|
52
|
+
super(i), this.autoplay = !1, this.loop = !1, this.type = "image", this.autoLoad = !1;
|
|
53
|
+
}
|
|
54
|
+
static isNonPanoramicMedia(i) {
|
|
55
|
+
return !!i && typeof i == "object" && "declaredClass" in i && typeof i.declaredClass == "string" && i.declaredClass === "components.oriented-imagery-viewer.support.NonPanoramicMedia";
|
|
56
|
+
}
|
|
57
|
+
destroy() {
|
|
58
|
+
this._cache?.destroy(), this._cache = void 0, this._videoElement = void 0;
|
|
59
|
+
}
|
|
60
|
+
get layer() {
|
|
61
|
+
return this._cache;
|
|
62
|
+
}
|
|
63
|
+
get videoElement() {
|
|
64
|
+
return this._videoElement;
|
|
65
|
+
}
|
|
66
|
+
get size() {
|
|
67
|
+
if (!this._cache || this._cache.destroyed || this._cache.loadError)
|
|
68
|
+
return;
|
|
69
|
+
const { type: i } = this._cache;
|
|
70
|
+
if (i === "imagery-tile") {
|
|
71
|
+
const { serviceRasterInfo: e } = this._cache;
|
|
72
|
+
return e ? [e.width, e.height] : void 0;
|
|
73
|
+
}
|
|
74
|
+
if (i === "media") {
|
|
75
|
+
const e = this._videoElement ?? this._getVideoElementFromLayer(this._cache);
|
|
76
|
+
return !e || e.videoWidth <= 0 || e.videoHeight <= 0 ? void 0 : [e.videoWidth, e.videoHeight];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
//---------------------------------------------------------------------------
|
|
80
|
+
//
|
|
81
|
+
// Public Methods
|
|
82
|
+
//
|
|
83
|
+
//---------------------------------------------------------------------------
|
|
84
|
+
async load(i) {
|
|
85
|
+
return this.type === "video" ? await this._loadVideo(i) : await this._loadImage(i);
|
|
86
|
+
}
|
|
87
|
+
async _loadVideo(i) {
|
|
88
|
+
if (this._cache && !this._cache.destroyed && this._cache.type === "media")
|
|
89
|
+
return await this._cache.load(i), this._videoElement = this._getVideoElementFromLayer(this._cache) ?? this._videoElement, this._applyVideoPlaybackOptions(), { layer: this._cache, size: this.size };
|
|
90
|
+
const { title: e, url: t } = this;
|
|
91
|
+
if (!t)
|
|
92
|
+
throw new Error("URL is required to load NonPanoramicMedia.");
|
|
93
|
+
const a = (await import("@arcgis/core/geometry/Extent.js")).default, r = (await import("@arcgis/core/layers/support/ExtentAndRotationGeoreference.js")).default, s = (await import("@arcgis/core/layers/support/VideoElement.js")).default, o = (await import("@arcgis/core/layers/MediaLayer.js")).default;
|
|
94
|
+
l(i);
|
|
95
|
+
const c = new s({
|
|
96
|
+
video: t,
|
|
97
|
+
georeference: new r({
|
|
98
|
+
extent: new a(R)
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
await c.load(i), l(i), this._videoElement = c.content ?? void 0, this._applyVideoPlaybackOptions();
|
|
102
|
+
const m = new o({
|
|
103
|
+
source: c,
|
|
104
|
+
title: e
|
|
105
|
+
});
|
|
106
|
+
return await m.load(i), l(i), this._cache = m, { layer: this._cache, size: this.size };
|
|
107
|
+
}
|
|
108
|
+
_getVideoElementFromLayer(i) {
|
|
109
|
+
const e = i.source;
|
|
110
|
+
if (!e || !("content" in e))
|
|
111
|
+
return;
|
|
112
|
+
const { content: t } = e;
|
|
113
|
+
if (t instanceof HTMLVideoElement)
|
|
114
|
+
return t;
|
|
115
|
+
}
|
|
116
|
+
_applyVideoPlaybackOptions() {
|
|
117
|
+
const i = this._videoElement;
|
|
118
|
+
i && (i.autoplay = this.autoplay, i.loop = this.loop, this.autoplay || i.pause());
|
|
119
|
+
}
|
|
120
|
+
async _loadImage(i) {
|
|
121
|
+
if (this._cache && !this._cache.destroyed && this._cache.type === "imagery-tile")
|
|
122
|
+
return await this._cache.load(i), this._videoElement = void 0, { layer: this._cache, size: this.size };
|
|
123
|
+
const { url: e, customParameters: t } = this;
|
|
124
|
+
let a = this.datasetFormat;
|
|
125
|
+
if (!e)
|
|
126
|
+
throw new Error("URL is required to load NonPanoramicMedia.");
|
|
127
|
+
if (!a) {
|
|
128
|
+
const o = await import("../../chunks/urlUtils.js");
|
|
129
|
+
if (l(i), a = o.guessExtensionFromURI(e), !a) {
|
|
130
|
+
try {
|
|
131
|
+
a = await o.getDatasetFormat(e);
|
|
132
|
+
} catch {
|
|
133
|
+
M.log("warn", this, "Failed to determine dataset format from URL or response headers."), a = "UNKNOWN FORMAT";
|
|
134
|
+
}
|
|
135
|
+
l(i);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
this.datasetFormat = a;
|
|
139
|
+
const r = (await import("@arcgis/core/layers/ImageryTileLayer.js")).default;
|
|
140
|
+
l(i);
|
|
141
|
+
const s = new r({
|
|
142
|
+
url: e,
|
|
143
|
+
// @ts-ignore - datasetFormat is not part of the official ImageryTileLayer properties, but is used in the custom ioConfig for loading the image and is necessary to pass along the format information.
|
|
144
|
+
ioConfig: {
|
|
145
|
+
skipExtensions: ["aux.xml", "jgw"],
|
|
146
|
+
skipMapInfo: !0,
|
|
147
|
+
datasetFormat: a
|
|
148
|
+
},
|
|
149
|
+
customParameters: t ?? void 0
|
|
150
|
+
});
|
|
151
|
+
return await s.load(i), l(i), this._videoElement = void 0, this._cache = s, { layer: this._cache, size: this.size };
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
d([
|
|
155
|
+
h()
|
|
156
|
+
], n.prototype, "_cache", 2);
|
|
157
|
+
d([
|
|
158
|
+
h()
|
|
159
|
+
], n.prototype, "_videoElement", 2);
|
|
160
|
+
d([
|
|
161
|
+
h()
|
|
162
|
+
], n.prototype, "autoplay", 2);
|
|
163
|
+
d([
|
|
164
|
+
h()
|
|
165
|
+
], n.prototype, "loop", 2);
|
|
166
|
+
d([
|
|
167
|
+
h()
|
|
168
|
+
], n.prototype, "title", 2);
|
|
169
|
+
d([
|
|
170
|
+
h()
|
|
171
|
+
], n.prototype, "type", 2);
|
|
172
|
+
d([
|
|
173
|
+
h()
|
|
174
|
+
], n.prototype, "layer", 1);
|
|
175
|
+
d([
|
|
176
|
+
h()
|
|
177
|
+
], n.prototype, "videoElement", 1);
|
|
178
|
+
d([
|
|
179
|
+
h()
|
|
180
|
+
], n.prototype, "size", 1);
|
|
181
|
+
d([
|
|
182
|
+
h()
|
|
183
|
+
], n.prototype, "autoLoad", 2);
|
|
184
|
+
d([
|
|
185
|
+
h()
|
|
186
|
+
], n.prototype, "customParameters", 2);
|
|
187
|
+
d([
|
|
188
|
+
h()
|
|
189
|
+
], n.prototype, "datasetFormat", 2);
|
|
190
|
+
d([
|
|
191
|
+
h()
|
|
192
|
+
], n.prototype, "url", 2);
|
|
193
|
+
n = d([
|
|
194
|
+
C("components.oriented-imagery-viewer.support.NonPanoramicMedia")
|
|
195
|
+
], n);
|
|
196
|
+
function W(i, e, t, a, r) {
|
|
197
|
+
const { width: s, height: o } = S(i, e, r);
|
|
198
|
+
return Math.max(s / t, o / a);
|
|
199
|
+
}
|
|
200
|
+
const $ = 96, U = 39.37, y = U * $;
|
|
201
|
+
function v(i) {
|
|
202
|
+
const e = y * 0.25, t = y * i, a = [];
|
|
203
|
+
let r = t;
|
|
204
|
+
for (; r > e; )
|
|
205
|
+
a.push(r), r *= 0.5;
|
|
206
|
+
a.push(e);
|
|
207
|
+
const { lods: s } = H.create({
|
|
208
|
+
scales: a
|
|
209
|
+
});
|
|
210
|
+
return {
|
|
211
|
+
minScale: t,
|
|
212
|
+
lods: s
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
class j extends P {
|
|
216
|
+
constructor() {
|
|
217
|
+
super(...arguments), this._messages = L(), this.#t = new z(this), this._imageChanged = !1, this._internalMap = I(), this._loading = !1, this.hideHeader = !1, this.hideLoader = !1, this.hideZoomControls = !1, this.hideVideoControls = !1, this.rotation = 0;
|
|
218
|
+
}
|
|
219
|
+
static {
|
|
220
|
+
this.properties = { _imageChanged: 16, _internalMap: 16, _layer: 16, _videoTargetExtent: 16, _videoRef: 16, _loading: 16, _media: 16, hideHeader: 5, hideLoader: 5, hideZoomControls: 5, hideVideoControls: 5, messageOverrides: 0, media: 0, rotation: 9 };
|
|
221
|
+
}
|
|
222
|
+
static {
|
|
223
|
+
this.styles = [O];
|
|
224
|
+
}
|
|
225
|
+
#t;
|
|
226
|
+
#i;
|
|
227
|
+
#r;
|
|
228
|
+
#e;
|
|
229
|
+
#s;
|
|
230
|
+
#a;
|
|
231
|
+
get imageRenderer() {
|
|
232
|
+
return this._internalMap?.value?.view;
|
|
233
|
+
}
|
|
234
|
+
get map() {
|
|
235
|
+
return this.imageRenderer?.map;
|
|
236
|
+
}
|
|
237
|
+
get media() {
|
|
238
|
+
return this._media;
|
|
239
|
+
}
|
|
240
|
+
set media(e) {
|
|
241
|
+
if (!e) {
|
|
242
|
+
this.#i?.abort(), this._media = void 0, this._clearMedia();
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
this._media = e instanceof n ? e : new n(e);
|
|
246
|
+
}
|
|
247
|
+
addGraphic(e) {
|
|
248
|
+
this.#t.addGraphic(e);
|
|
249
|
+
}
|
|
250
|
+
addGraphics(e) {
|
|
251
|
+
this.#t.addGraphics(e);
|
|
252
|
+
}
|
|
253
|
+
clearGraphics() {
|
|
254
|
+
this.#t.clearGraphics();
|
|
255
|
+
}
|
|
256
|
+
async mediaOnLoad() {
|
|
257
|
+
return this.#r && await this.#r, this._media;
|
|
258
|
+
}
|
|
259
|
+
removeGraphic(e) {
|
|
260
|
+
this.#t.removeGraphic(e);
|
|
261
|
+
}
|
|
262
|
+
removeGraphics(e) {
|
|
263
|
+
this.#t.removeGraphics(e);
|
|
264
|
+
}
|
|
265
|
+
loaded() {
|
|
266
|
+
this.manager.onLifecycle(() => [
|
|
267
|
+
this._createResizeConstraint(),
|
|
268
|
+
this._createRotationHandler(),
|
|
269
|
+
this._createPanConstraint(),
|
|
270
|
+
this._createVideoInteractionWatcher(),
|
|
271
|
+
{
|
|
272
|
+
remove: () => {
|
|
273
|
+
this._removeVideoPanHandles();
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
p(() => this._media, (e) => {
|
|
277
|
+
this.#i?.abort(), e && (this.#i = new AbortController(), this.#r = this._loadMediaInternal(e, this.#i));
|
|
278
|
+
}, {
|
|
279
|
+
initial: !0,
|
|
280
|
+
sync: !0
|
|
281
|
+
})
|
|
282
|
+
]);
|
|
283
|
+
}
|
|
284
|
+
_createPanConstraint() {
|
|
285
|
+
return p(() => ({ layer: this._layer, imageRenderer: this.imageRenderer }), ({ layer: e, imageRenderer: t }) => {
|
|
286
|
+
this._media?.type !== "video" && (e?.type !== "imagery-tile" || !t?.ready || F(t, e));
|
|
287
|
+
}, { sync: !0, initial: !0 });
|
|
288
|
+
}
|
|
289
|
+
_createResizeConstraint() {
|
|
290
|
+
return p(() => {
|
|
291
|
+
if (!this.imageRenderer?.ready || !this._layer)
|
|
292
|
+
return;
|
|
293
|
+
if (this._layer.type === "imagery-tile") {
|
|
294
|
+
const { width: t, height: a } = this._layer.serviceRasterInfo, { width: r, height: s, rotation: o } = this.imageRenderer;
|
|
295
|
+
return W(t, a, r, s, o);
|
|
296
|
+
}
|
|
297
|
+
const e = this._videoTargetExtent;
|
|
298
|
+
if (!(!e || this.imageRenderer.width <= 0 || this.imageRenderer.height <= 0))
|
|
299
|
+
return Math.max(e.width / this.imageRenderer.width, e.height / this.imageRenderer.height);
|
|
300
|
+
}, (e) => {
|
|
301
|
+
if (!e || !this.imageRenderer)
|
|
302
|
+
return;
|
|
303
|
+
if (this._media?.type === "video") {
|
|
304
|
+
this._updateVideoScaleForResize(e);
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
const { constraints: t, scale: a } = this.imageRenderer, r = t.minScale, { lods: s, minScale: o } = v(e);
|
|
308
|
+
t.set({
|
|
309
|
+
minScale: o,
|
|
310
|
+
lods: s
|
|
311
|
+
}), this.imageRenderer.scale = this._imageChanged || Math.abs(a - r) <= 1e-6 ? o : a, this._imageChanged = !1;
|
|
312
|
+
}, { sync: !0, initial: !0 });
|
|
313
|
+
}
|
|
314
|
+
_createVideoInteractionWatcher() {
|
|
315
|
+
return p(() => [this.imageRenderer?.interacting, this.imageRenderer?.navigating, this.imageRenderer?.scale], () => {
|
|
316
|
+
this._media?.type === "video" && this._updateVideoInteraction();
|
|
317
|
+
}, { initial: !0 });
|
|
318
|
+
}
|
|
319
|
+
_createRotationHandler() {
|
|
320
|
+
return p(() => this.rotation, (e) => {
|
|
321
|
+
this._media?.type !== "video" && this.imageRenderer && (this.imageRenderer.constraints.rotationEnabled = !0, this.imageRenderer.rotation = e, this.imageRenderer.constraints.rotationEnabled = !1);
|
|
322
|
+
}, { sync: !0, initial: !0 });
|
|
323
|
+
}
|
|
324
|
+
_clearMedia() {
|
|
325
|
+
this._removeVideoPanHandles(), this._restoreConstraints(), this.#e = void 0, this._videoTargetExtent = void 0, this._videoRef?.pause(), this._videoRef = void 0, this._layer && this.map?.layers.includes(this._layer) && this.map.layers.remove(this._layer), this._layer?.destroy(), this._layer = void 0;
|
|
326
|
+
}
|
|
327
|
+
async _loadMediaInternal(e, t) {
|
|
328
|
+
if (this._loading = !0, this._clearMedia(), !e)
|
|
329
|
+
throw new Error("No media provided");
|
|
330
|
+
const { layer: a } = await e.load(t).finally(() => {
|
|
331
|
+
this._loading = !1;
|
|
332
|
+
});
|
|
333
|
+
l(t), this._imageChanged = !0, this._layer = a, this.imageRenderer?.map?.layers.add(this._layer), e.type === "video" && await this._loadVideoMedia(e);
|
|
334
|
+
}
|
|
335
|
+
async _loadVideoMedia(e) {
|
|
336
|
+
const t = this.imageRenderer, a = new w(R), r = e.videoElement;
|
|
337
|
+
this._videoRef = r instanceof HTMLVideoElement ? r : void 0, t && (await t.when(), this._snapshotConstraints(), t.constraints.set({
|
|
338
|
+
rotationEnabled: !1
|
|
339
|
+
}), await t.goTo(a.clone(), { animate: !1 }), this._videoTargetExtent = t.extent?.clone(), this.#e = t.extent?.clone(), this._videoTargetExtent && t.width > 0 && t.height > 0 && this._updateVideoScaleForResize(Math.max(this._videoTargetExtent.width / t.width, this._videoTargetExtent.height / t.height))), this._updateVideoInteraction();
|
|
340
|
+
}
|
|
341
|
+
_snapshotConstraints() {
|
|
342
|
+
const e = this.imageRenderer?.constraints;
|
|
343
|
+
!e || this.#a || (this.#a = {
|
|
344
|
+
geometry: e.geometry?.clone() ?? null,
|
|
345
|
+
lods: e.lods,
|
|
346
|
+
maxScale: e.maxScale,
|
|
347
|
+
minScale: e.minScale,
|
|
348
|
+
rotationEnabled: e.rotationEnabled
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
_restoreConstraints() {
|
|
352
|
+
const e = this.imageRenderer?.constraints, t = this.#a;
|
|
353
|
+
!e || !t || (e.set({
|
|
354
|
+
geometry: t.geometry,
|
|
355
|
+
lods: t.lods,
|
|
356
|
+
maxScale: t.maxScale,
|
|
357
|
+
minScale: t.minScale,
|
|
358
|
+
rotationEnabled: t.rotationEnabled
|
|
359
|
+
}), this.#a = void 0);
|
|
360
|
+
}
|
|
361
|
+
_disablePan() {
|
|
362
|
+
const e = this.imageRenderer;
|
|
363
|
+
if (this._removeVideoPanHandles(), !e)
|
|
364
|
+
return;
|
|
365
|
+
const t = e.on("drag", (r) => r.stopPropagation()), a = e.on("key-down", (r) => {
|
|
366
|
+
r.key.startsWith("Arrow") && r.stopPropagation();
|
|
367
|
+
});
|
|
368
|
+
this.#s = [t, a];
|
|
369
|
+
}
|
|
370
|
+
_enablePan() {
|
|
371
|
+
this._removeVideoPanHandles();
|
|
372
|
+
}
|
|
373
|
+
_removeVideoPanHandles() {
|
|
374
|
+
this.#s?.forEach((e) => e.remove()), this.#s = void 0;
|
|
375
|
+
}
|
|
376
|
+
_updateVideoInteraction() {
|
|
377
|
+
const e = this.imageRenderer, t = e?.extent;
|
|
378
|
+
if (!e || !t || this._layer?.type !== "media")
|
|
379
|
+
return;
|
|
380
|
+
this.#e ??= t.clone();
|
|
381
|
+
const { minScale: a } = e.constraints;
|
|
382
|
+
if (!a)
|
|
383
|
+
return;
|
|
384
|
+
const r = e.scale < a - g, s = G(t, this._videoTargetExtent);
|
|
385
|
+
if (r && !!s) {
|
|
386
|
+
this._enablePan(), e.constraints.geometry = s;
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
if (r) {
|
|
390
|
+
this._disablePan(), e.constraints.geometry = null;
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
this.#e && !t.equals(this.#e) && (e.extent = this.#e.clone()), this._disablePan(), e.constraints.geometry = null;
|
|
394
|
+
}
|
|
395
|
+
_updateVideoScaleForResize(e) {
|
|
396
|
+
if (!this.imageRenderer)
|
|
397
|
+
return;
|
|
398
|
+
const { constraints: t, scale: a } = this.imageRenderer, r = t.minScale, s = r != null && Math.abs(a - r) <= g, { lods: o, minScale: c } = v(e);
|
|
399
|
+
t.set({ lods: o, minScale: c, rotationEnabled: !1 }), this.imageRenderer.scale = this._imageChanged || s ? c : a, this._imageChanged = !1, s && requestAnimationFrame(() => {
|
|
400
|
+
const { extent: m, scale: _, constraints: f } = this.imageRenderer ?? {};
|
|
401
|
+
m && _ && f?.minScale != null && Math.abs(_ - f.minScale) <= g && (this.#e = m.clone());
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
render() {
|
|
405
|
+
return u`<calcite-panel .loading=${this.hideLoader ? void 0 : this._loading} .heading=${this.hideHeader ? void 0 : this._messages.title}><arcgis-map hide-attribution .spatialReference=${b.WebMercator} ${T(this._internalMap)}><arcgis-zoom .hidden=${this.hideZoomControls} .messageOverrides=${this.messageOverrides} slot=top-left></arcgis-zoom></arcgis-map>${this.hideVideoControls || this._media?.type !== "video" || !this._videoRef ? void 0 : u`<arcgis-oriented-imagery-viewer-video-controls .videoRef=${this._videoRef}></arcgis-oriented-imagery-viewer-video-controls>`}</calcite-panel>`;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
E("arcgis-oriented-imagery-viewer-non-panoramic-viewer", j);
|
|
409
|
+
export {
|
|
410
|
+
j as ArcgisOrientedImageryViewerNonPanoramicViewer
|
|
411
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type ImageryTileLayer from "@arcgis/core/layers/ImageryTileLayer.js";
|
|
2
2
|
import type Accessor from "@arcgis/core/core/Accessor.js";
|
|
3
|
+
import type MediaLayer from "@arcgis/core/layers/MediaLayer.js";
|
|
3
4
|
import type { AbortOptions } from "@arcgis/core/core/promiseUtils.js";
|
|
4
5
|
|
|
5
|
-
export interface NonPanoramicMediaProperties extends Partial<Pick<NonPanoramicMedia, "autoLoad" | "customParameters" | "datasetFormat" | "url">> {}
|
|
6
|
+
export interface NonPanoramicMediaProperties extends Partial<Pick<NonPanoramicMedia, "autoLoad" | "autoplay" | "customParameters" | "datasetFormat" | "loop" | "title" | "type" | "url">> {}
|
|
6
7
|
|
|
7
8
|
/** @internal */
|
|
8
9
|
export default class NonPanoramicMedia extends Accessor {
|
|
@@ -11,15 +12,23 @@ export default class NonPanoramicMedia extends Accessor {
|
|
|
11
12
|
constructor(properties: NonPanoramicMediaProperties);
|
|
12
13
|
/** @default false */
|
|
13
14
|
accessor autoLoad: boolean;
|
|
15
|
+
/** @default false */
|
|
16
|
+
accessor autoplay: boolean;
|
|
14
17
|
accessor customParameters: Record<string, string> | undefined;
|
|
15
18
|
accessor datasetFormat: string | undefined;
|
|
16
|
-
get layer(): ImageryTileLayer | undefined;
|
|
19
|
+
get layer(): ImageryTileLayer | MediaLayer | undefined;
|
|
20
|
+
/** @default false */
|
|
21
|
+
accessor loop: boolean;
|
|
17
22
|
get size(): [number, number] | undefined;
|
|
23
|
+
accessor title: string | undefined;
|
|
24
|
+
/** @default "image" */
|
|
25
|
+
accessor type: "image" | "video";
|
|
18
26
|
accessor url: string | undefined;
|
|
27
|
+
get videoElement(): HTMLVideoElement | undefined;
|
|
19
28
|
destroy(): void;
|
|
20
29
|
/** @param options */
|
|
21
30
|
load(options?: AbortOptions): Promise<{
|
|
22
|
-
layer: ImageryTileLayer;
|
|
31
|
+
layer: ImageryTileLayer | MediaLayer;
|
|
23
32
|
size: [number, number] | undefined;
|
|
24
33
|
}>;
|
|
25
34
|
}
|