@arcgis/map-components 5.2.0-next.5 → 5.2.0-next.7
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/{32HC6PWY.js → 2EOQ5G2R.js} +1 -1
- package/dist/cdn/{Z5YGVWFI.js → 3AZCF2P5.js} +1 -1
- package/dist/cdn/{QEPCYJLX.js → 52XUYHPM.js} +1 -1
- package/dist/cdn/{WTL3FIGS.js → 55JA345T.js} +1 -1
- package/dist/cdn/{KUHPQGH3.js → 5T3MHTWU.js} +1 -1
- package/dist/cdn/5UUUR4LF.js +2 -0
- package/dist/cdn/ABPHGXQN.js +2 -0
- package/dist/cdn/{PNBNM2CX.js → BJF74GDX.js} +1 -1
- package/dist/cdn/CZXCSL3K.js +2 -0
- package/dist/cdn/{L4EHCDIJ.js → DITXUZMH.js} +1 -1
- package/dist/cdn/FGSOMLKL.js +2 -0
- package/dist/cdn/L34RL7Y3.js +2 -0
- package/dist/cdn/LM56QFP5.js +2 -0
- package/dist/cdn/{7DIC4O5E.js → NOHLNRB4.js} +1 -1
- package/dist/cdn/{MF5STJJO.js → RJM52R4G.js} +1 -1
- package/dist/cdn/W42XLSER.js +2 -0
- package/dist/cdn/WMH7TCIP.js +2 -0
- package/dist/cdn/{VNYFKVJ2.js → WQDUJLSY.js} +1 -1
- package/dist/cdn/{4XVCI45D.js → XF5VBSRX.js} +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/time-utils.js +14 -14
- package/dist/components/arcgis-daylight/customElement.d.ts +1 -1
- package/dist/components/arcgis-daylight/customElement.js +242 -203
- package/dist/components/arcgis-elevation-profile/customElement.d.ts +14 -0
- package/dist/components/arcgis-elevation-profile/customElement.js +77 -75
- package/dist/components/arcgis-feature-table/customElement.d.ts +1 -0
- package/dist/components/arcgis-feature-table/customElement.js +1 -1
- package/dist/components/arcgis-feature-templates/TemplateItem.d.ts +33 -0
- package/dist/components/arcgis-feature-templates/customElement.d.ts +275 -0
- package/dist/components/arcgis-feature-templates/customElement.js +560 -0
- package/dist/components/arcgis-feature-templates/index.d.ts +1 -0
- package/dist/components/arcgis-feature-templates/index.js +13 -0
- package/dist/components/arcgis-features-next/customElement.d.ts +7 -1
- package/dist/components/arcgis-layer-list/customElement.d.ts +3 -0
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +319 -32
- package/dist/components/arcgis-layer-list-next/customElement.js +5 -1
- package/dist/components/arcgis-legend/customElement.js +6 -6
- package/dist/components/arcgis-legend-classic-element/customElement.js +1 -1
- package/dist/components/arcgis-legend-classic-view/customElement.js +16 -16
- package/dist/components/arcgis-map/customElement.d.ts +47 -4
- package/dist/components/arcgis-paste/PasteViewModel.d.ts +1 -1
- package/dist/components/arcgis-paste/customElement.js +27 -38
- package/dist/components/arcgis-paste/index.js +1 -1
- package/dist/components/arcgis-popup/customElement.d.ts +7 -1
- package/dist/components/arcgis-slider-scale-range/customElement.d.ts +1 -1
- package/dist/components/arcgis-slider-scale-range/customElement.js +65 -31
- package/dist/components/arcgis-template-image/customElement.d.ts +14 -0
- package/dist/components/arcgis-template-image/customElement.js +119 -0
- package/dist/components/arcgis-template-image/index.d.ts +1 -0
- package/dist/components/arcgis-template-image/index.js +1 -0
- package/dist/components/arcgis-version-management/customElement.d.ts +9 -1
- package/dist/components/arcgis-version-management/customElement.js +21 -20
- package/dist/components/arcgis-version-management/index.js +1 -0
- package/dist/components/arcgis-weather/customElement.js +96 -94
- 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 +14 -0
- package/dist/loader.js +3 -1
- package/dist/types/lumina.d.ts +15 -1
- package/dist/types/preact.d.ts +17 -1
- package/dist/types/react.d.ts +19 -1
- package/dist/types/stencil.d.ts +15 -1
- package/package.json +7 -7
- package/dist/cdn/AOC4VUP6.js +0 -2
- package/dist/cdn/IBTOXDST.js +0 -2
- package/dist/cdn/JFVZHHIX.js +0 -2
- package/dist/cdn/MHRXFE7S.js +0 -2
- package/dist/cdn/RAQVHNVI.js +0 -2
- package/dist/cdn/YJCBT5VK.js +0 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as n } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as c, html as
|
|
3
|
+
import { css as c, html as a } from "lit";
|
|
4
4
|
import { LitElement as d, safeClassMap as o } from "@arcgis/lumina";
|
|
5
5
|
import { classes as g } from "@arcgis/toolkit/dom";
|
|
6
6
|
import { H as m } from "../../chunks/heading.js";
|
|
7
|
-
const h = c`.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)}:host{display:block}.
|
|
8
|
-
class
|
|
7
|
+
const h = c`.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)}:host{display:block}.layers{display:flex;flex-direction:column;gap:var(--arcgis-internal-legend-layer-gap)}.layers>.layer{position:relative}.layers>.layer:not(:last-child):after{content:"";position:absolute;left:0;right:0;bottom:calc(var(--arcgis-internal-legend-layer-gap) / -2);border-bottom:1px solid var(--calcite-color-border-2)}.layers>.layer:last-child{padding-bottom:var(--arcgis-internal-legend-layer-gap)}.layer>.esri-widget__heading{margin:var(--arcgis-internal-legend-heading-margin)}.no-legend{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md)}.layer{padding:var(--arcgis-internal-legend-layer-padding);word-wrap:break-word}.layer-elements{margin-left:var(--calcite-spacing-sm);display:flex;flex-direction:column;gap:var(--arcgis-internal-legend-layer-element-gap);overflow:auto}.layer-children{display:flex;flex-direction:column;gap:var(--arcgis-internal-legend-layer-gap)}.layer-children>.layer{position:relative}.layer-children>.layer:not(:last-child):after{content:"";position:absolute;left:0;right:0;bottom:calc(var(--arcgis-internal-legend-layer-gap) / -2);border-bottom:1px solid var(--calcite-color-border-2)}.layer-child{margin-left:var(--calcite-spacing-sm);padding:0}:dir(rtl) .layer-elements,:dir(rtl) .layer-child{margin-right:var(--calcite-spacing-sm);margin-left:0;overflow:auto}`;
|
|
8
|
+
class y extends d {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments), this.headingLevel = 3, this.type = "classic";
|
|
11
11
|
}
|
|
@@ -16,31 +16,31 @@ class p extends d {
|
|
|
16
16
|
this.styles = h;
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
const
|
|
20
|
-
return
|
|
19
|
+
const r = this.activeLayerInfos?.toArray().map((l) => this._renderLegendForLayer(l)).filter(Boolean);
|
|
20
|
+
return r?.length ? a`<section class="layers">${r}</section>` : a`<div class="no-legend">${this.messages.noLegend}</div>`;
|
|
21
21
|
}
|
|
22
22
|
_renderLegendForLayer(e) {
|
|
23
23
|
if (!e.ready)
|
|
24
24
|
return null;
|
|
25
|
-
const
|
|
25
|
+
const r = e.title ? m({
|
|
26
26
|
level: this.headingLevel,
|
|
27
27
|
children: e.title
|
|
28
28
|
}) : null;
|
|
29
29
|
if (e.children.length) {
|
|
30
|
-
const
|
|
31
|
-
return
|
|
30
|
+
const l = e.children.toArray().map((i) => this._renderLegendForLayer(i));
|
|
31
|
+
return a`<section class="layer">${r}<div class="layer-children">${l}</div></section>`;
|
|
32
32
|
}
|
|
33
|
-
return this._renderLegendElementsForLayer(e,
|
|
33
|
+
return this._renderLegendElementsForLayer(e, r);
|
|
34
34
|
}
|
|
35
|
-
_renderLegendElementsForLayer(e,
|
|
36
|
-
const
|
|
37
|
-
if (!
|
|
35
|
+
_renderLegendElementsForLayer(e, r) {
|
|
36
|
+
const l = e.legendElements?.filter(Boolean);
|
|
37
|
+
if (!l?.length)
|
|
38
38
|
return null;
|
|
39
|
-
const i =
|
|
40
|
-
return
|
|
39
|
+
const i = l.map((s) => a`<arcgis-legend-classic-element .cssEffectFilter=${e.cssEffectFilter ?? void 0} .layer=${e.layer} .legendElement=${s} .messages=${this.messages}></arcgis-legend-classic-element>`), t = { "layer-child": !!e.parent };
|
|
40
|
+
return a`<section class=${o(g("layer", t))}>${r}<div class="layer-elements">${i}</div></section>`;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
n("arcgis-legend-classic-view",
|
|
43
|
+
n("arcgis-legend-classic-view", y);
|
|
44
44
|
export {
|
|
45
|
-
|
|
45
|
+
y as LegendClassicView
|
|
46
46
|
};
|
|
@@ -211,11 +211,34 @@ export abstract class ArcgisMap extends LitElement {
|
|
|
211
211
|
* Specifies a basemap for the map. The basemap is a set of layers that give
|
|
212
212
|
* geographic context to the view and the other operational layers
|
|
213
213
|
* in the map.
|
|
214
|
-
* It can either be set using a basemap ID string ([see values](https://developers.arcgis.com/javascript/latest/references/core/Map/#basemap)),
|
|
215
|
-
* [Basemap](https://developers.arcgis.com/javascript/latest/references/core/Basemap/)
|
|
216
|
-
* or [BasemapStyle](https://developers.arcgis.com/javascript/latest/references/core/support/BasemapStyle/).
|
|
217
214
|
*
|
|
218
|
-
* [
|
|
215
|
+
* The basemap can be set from a basemap ID string from the [basemap styles service](https://developers.arcgis.com/javascript/latest/references/core/support/BasemapStyle/), such as `arcgis/navigation`, or from the [Basemap](https://developers.arcgis.com/javascript/latest/references/core/Basemap/) class.
|
|
216
|
+
*
|
|
217
|
+
* > [!NOTE]
|
|
218
|
+
* > Accessing the basemap styles service requires authentication, see [Authentication and access tokens](https://developers.arcgis.com/javascript/latest/authentication/access-tokens/) for more information.
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* ```html
|
|
222
|
+
* <!-- Basemap set using a basemap ID string from the basemap styles service -->
|
|
223
|
+
* <arcgis-map basemap="arcgis/navigation" center="-98, 39" zoom="4"></arcgis-map>
|
|
224
|
+
* ```
|
|
225
|
+
* @example
|
|
226
|
+
* ```js
|
|
227
|
+
* // Basemap set using a Basemap instance
|
|
228
|
+
* const viewElement = document.querySelector("arcgis-map");
|
|
229
|
+
* viewElement.basemap = new Basemap({
|
|
230
|
+
* title: "Terrain",
|
|
231
|
+
* baseLayers: [
|
|
232
|
+
* new VectorTileLayer({
|
|
233
|
+
* url: "https://arcgis.com/sharing/rest/content/items/b5676525747f499687f12746441101ef/resources/styles/root.json",
|
|
234
|
+
* })
|
|
235
|
+
* ]
|
|
236
|
+
* });
|
|
237
|
+
* ```
|
|
238
|
+
* @see [Map.basemap](https://developers.arcgis.com/javascript/latest/references/core/Map/#basemap)
|
|
239
|
+
* @see [Basemap](https://developers.arcgis.com/javascript/latest/references/core/Basemap/)
|
|
240
|
+
* @see [BasemapStyle](https://developers.arcgis.com/javascript/latest/references/core/support/BasemapStyle/)
|
|
241
|
+
* @see [Authentication and access tokens](https://developers.arcgis.com/javascript/latest/authentication/access-tokens/)
|
|
219
242
|
*/
|
|
220
243
|
accessor basemap: Basemap | string | undefined;
|
|
221
244
|
/** Represents the view for a single basemap after it has been added to the map. */
|
|
@@ -883,6 +906,26 @@ export abstract class ArcgisMap extends LitElement {
|
|
|
883
906
|
* Represents the current view as a Viewpoint or point of observation on the view.
|
|
884
907
|
* Setting the viewpoint immediately changes the current view. For animating
|
|
885
908
|
* the view, see this component's [goTo()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#goTo) method.
|
|
909
|
+
*
|
|
910
|
+
* @example
|
|
911
|
+
* ```js
|
|
912
|
+
* // Set the viewpoint to the Empire State Building in New York City
|
|
913
|
+
* const viewElement = document.querySelector("arcgis-map");
|
|
914
|
+
* viewElement.viewpoint = new Viewpoint({
|
|
915
|
+
* targetGeometry: new Point({
|
|
916
|
+
* longitude: -73.9857,
|
|
917
|
+
* latitude: 40.7484
|
|
918
|
+
* }),
|
|
919
|
+
* scale: 5000
|
|
920
|
+
* });
|
|
921
|
+
* ```
|
|
922
|
+
* @example
|
|
923
|
+
* ```js
|
|
924
|
+
* // Get the initial viewpoint of the view once the view is ready
|
|
925
|
+
* const viewElement = document.querySelector("arcgis-map");
|
|
926
|
+
* await viewElement.viewOnReady();
|
|
927
|
+
* const initialViewpoint = viewElement.viewpoint.clone();
|
|
928
|
+
* ```
|
|
886
929
|
*/
|
|
887
930
|
accessor viewpoint: Viewpoint;
|
|
888
931
|
/**
|
|
@@ -8,8 +8,8 @@ import type Collection from "@arcgis/core/core/Collection.js";
|
|
|
8
8
|
import type SceneView from "@arcgis/core/views/SceneView.js";
|
|
9
9
|
import type MapView from "@arcgis/core/views/MapView.js";
|
|
10
10
|
import type SubtypeSublayer from "@arcgis/core/layers/support/SubtypeSublayer.js";
|
|
11
|
-
import type TemplateItem from "@arcgis/core/widgets/FeatureTemplates/TemplateItem.js";
|
|
12
11
|
import type BatchAttributeFormViewModel from "@arcgis/core/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js";
|
|
12
|
+
import type TemplateItem from "../arcgis-feature-templates/TemplateItem.js";
|
|
13
13
|
import type { EsriClipboard, ClipboardItem as EsriClipboardItem } from "@arcgis/core/applications/Components/clipboard.js";
|
|
14
14
|
import type { ApplySet, ApplySetLayerEditResult, ApplySetServiceEditResult } from "@arcgis/core/applications/Components/applySetUtils.js";
|
|
15
15
|
import type { ClipboardMove } from "./ClipboardMove.js";
|
|
@@ -43,7 +43,7 @@ function Ee(e, t, i, a, s, o) {
|
|
|
43
43
|
const g = o.objectIdField ?? "";
|
|
44
44
|
return e.forEach((m) => {
|
|
45
45
|
if (m.name !== g && !h.includes(m.name) && !p.includes(m.name) && !s.includes(m.name) && m.type !== "global-id" && (u === "" || u !== m.name)) {
|
|
46
|
-
const f =
|
|
46
|
+
const f = Oe(m, t);
|
|
47
47
|
f.match && f.targetField && (l[f.targetField?.name] = i[m.name]);
|
|
48
48
|
}
|
|
49
49
|
}), l;
|
|
@@ -68,7 +68,7 @@ function Te(e, t) {
|
|
|
68
68
|
return !1;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function Oe(e, t) {
|
|
72
72
|
const i = { match: !1, sourceField: null, targetField: null };
|
|
73
73
|
for (const a of t)
|
|
74
74
|
if (Te(e, a)) {
|
|
@@ -82,7 +82,7 @@ async function se(e, t, i, a) {
|
|
|
82
82
|
let s = !0;
|
|
83
83
|
const o = { hasAsyncArcadeExpressions: !1 }, l = e.items.filter((h) => h.type === "add");
|
|
84
84
|
for (const h of l) {
|
|
85
|
-
const p = h.graphic.clone(), u =
|
|
85
|
+
const p = h.graphic.clone(), u = Ge(
|
|
86
86
|
h.graphic,
|
|
87
87
|
h.layer
|
|
88
88
|
);
|
|
@@ -109,7 +109,7 @@ async function se(e, t, i, a) {
|
|
|
109
109
|
}
|
|
110
110
|
return s;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function Ge(e, t) {
|
|
113
113
|
if (t.type === "feature" || t.type === "subtype-sublayer")
|
|
114
114
|
return t;
|
|
115
115
|
const i = t.findSublayerForFeature(e);
|
|
@@ -416,7 +416,7 @@ A([
|
|
|
416
416
|
v = A([
|
|
417
417
|
C("components.paste.commands.PasteCommand")
|
|
418
418
|
], v);
|
|
419
|
-
var Be = Object.defineProperty, je = Object.getOwnPropertyDescriptor,
|
|
419
|
+
var Be = Object.defineProperty, je = Object.getOwnPropertyDescriptor, O = (e, t, i, a) => {
|
|
420
420
|
for (var s = a > 1 ? void 0 : a ? je(t, i) : t, o = e.length - 1, l; o >= 0; o--)
|
|
421
421
|
(l = e[o]) && (s = (a ? l(t, i, s) : l(s)) || s);
|
|
422
422
|
return a && s && Be(t, i, s), s;
|
|
@@ -533,25 +533,25 @@ let F = class extends v {
|
|
|
533
533
|
return e.pasteAppendTitle;
|
|
534
534
|
}
|
|
535
535
|
};
|
|
536
|
-
|
|
536
|
+
O([
|
|
537
537
|
r()
|
|
538
538
|
], F.prototype, "id", 1);
|
|
539
|
-
|
|
539
|
+
O([
|
|
540
540
|
r()
|
|
541
541
|
], F.prototype, "icon", 1);
|
|
542
|
-
|
|
542
|
+
O([
|
|
543
543
|
r()
|
|
544
544
|
], F.prototype, "immediate", 1);
|
|
545
|
-
|
|
545
|
+
O([
|
|
546
546
|
r()
|
|
547
547
|
], F.prototype, "mustShowOnCommandPage", 1);
|
|
548
|
-
|
|
548
|
+
O([
|
|
549
549
|
r()
|
|
550
550
|
], F.prototype, "commandEnabled", 1);
|
|
551
|
-
F =
|
|
551
|
+
F = O([
|
|
552
552
|
C("components.paste.commands.PasteAppendCommand")
|
|
553
553
|
], F);
|
|
554
|
-
var We = Object.defineProperty, Re = Object.getOwnPropertyDescriptor,
|
|
554
|
+
var We = Object.defineProperty, Re = Object.getOwnPropertyDescriptor, G = (e, t, i, a) => {
|
|
555
555
|
for (var s = a > 1 ? void 0 : a ? Re(t, i) : t, o = e.length - 1, l; o >= 0; o--)
|
|
556
556
|
(l = e[o]) && (s = (a ? l(t, i, s) : l(s)) || s);
|
|
557
557
|
return a && s && We(t, i, s), s;
|
|
@@ -669,22 +669,22 @@ let _ = class extends v {
|
|
|
669
669
|
return e.pasteSubtractTitle;
|
|
670
670
|
}
|
|
671
671
|
};
|
|
672
|
-
|
|
672
|
+
G([
|
|
673
673
|
r()
|
|
674
674
|
], _.prototype, "id", 1);
|
|
675
|
-
|
|
675
|
+
G([
|
|
676
676
|
r()
|
|
677
677
|
], _.prototype, "icon", 1);
|
|
678
|
-
|
|
678
|
+
G([
|
|
679
679
|
r()
|
|
680
680
|
], _.prototype, "immediate", 1);
|
|
681
|
-
|
|
681
|
+
G([
|
|
682
682
|
r()
|
|
683
683
|
], _.prototype, "mustShowOnCommandPage", 1);
|
|
684
|
-
|
|
684
|
+
G([
|
|
685
685
|
r()
|
|
686
686
|
], _.prototype, "commandEnabled", 1);
|
|
687
|
-
_ =
|
|
687
|
+
_ = G([
|
|
688
688
|
C("components.paste.commands.PasteSubtractCommand")
|
|
689
689
|
], _);
|
|
690
690
|
var Ne = Object.defineProperty, Ue = Object.getOwnPropertyDescriptor, k = (e, t, i, a) => {
|
|
@@ -1690,25 +1690,14 @@ class st extends he {
|
|
|
1690
1690
|
if (!this._templateGallery.value || this.viewModel.activeFlowPage !== "gallery-page")
|
|
1691
1691
|
return;
|
|
1692
1692
|
const t = this._templateGallery.value;
|
|
1693
|
-
if (t.state !== "ready")
|
|
1694
|
-
return;
|
|
1695
1693
|
if (this.viewModel.pasteTemplateIsValid || (this.viewModel.pasteTemplate = void 0), this.viewModel.pasteTemplate !== void 0) {
|
|
1696
|
-
t.
|
|
1694
|
+
t.selectedTemplateId !== this.viewModel.pasteTemplate.id && (t.selectedTemplateId = this.viewModel.pasteTemplate.id);
|
|
1697
1695
|
return;
|
|
1698
1696
|
}
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
i = a.items[0];
|
|
1704
|
-
break;
|
|
1705
|
-
}
|
|
1706
|
-
continue;
|
|
1707
|
-
}
|
|
1708
|
-
i = a;
|
|
1709
|
-
break;
|
|
1710
|
-
}
|
|
1711
|
-
i && t.select(i);
|
|
1697
|
+
if (t.effectiveTemplates.length === 0)
|
|
1698
|
+
return;
|
|
1699
|
+
const i = t.effectiveTemplates[0].templates[0];
|
|
1700
|
+
i && (this.viewModel.pasteTemplate = i, t.selectedTemplateId = i.id);
|
|
1712
1701
|
});
|
|
1713
1702
|
}
|
|
1714
1703
|
_renderFlowCommandStart(t) {
|
|
@@ -1775,11 +1764,11 @@ class st extends he {
|
|
|
1775
1764
|
this.viewModel.activeFlowPage = "merge-page";
|
|
1776
1765
|
}} title=${this._messages.seeMergeOptions ?? ue}>${this._messages.seeMergeOptions}</calcite-link>` : null}</calcite-notice></div>` : null}${this.viewModel.clipboardAndTemplateSupportAttributes && this.viewModel.pasteTemplate ? this._renderAttributeCheckbox(!this.viewModel.clipboardAndTemplateSupportAttributes) : null}${this.viewModel.clipboardAndTemplateSupportAttributes ? null : this._renderAttributeCheckbox(!1)}</div><calcite-list .hidden=${this.viewModel.activeCommand !== "paste-merge"} .label=${this._messages.pasteCommandChoices ?? ""} selection-mode=none selection-appearance=border><calcite-list-item .label=${this._messages.mergeOptionsTitle} .description=${this._messages.mergeOptionsDesc} .disabled=${this.viewModel.updating} @click=${() => {
|
|
1777
1766
|
this.viewModel.activeFlowPage = "merge-page";
|
|
1778
|
-
}}><calcite-icon slot=content-start icon=configure></calcite-icon><calcite-icon slot=content-end icon=chevron-right></calcite-icon></calcite-list-item></calcite-list><div>${this.viewModel.workingLayers.length > 0 ? d`<arcgis-feature-templates
|
|
1767
|
+
}}><calcite-icon slot=content-start icon=configure></calcite-icon><calcite-icon slot=content-end icon=chevron-right></calcite-icon></calcite-list-item></calcite-list><div>${this.viewModel.workingLayers.length > 0 ? d`<arcgis-feature-templates .applicationDisabledFunction=${(i) => !!(i.template && ie(i.template) && i.template.type !== "feature")} class="paste-feature-templates" .layers=${this.viewModel.workingLayers} @arcgisTemplatesChanged=${() => {
|
|
1779
1768
|
this._checkAndUpdateInitialPasteTemplate();
|
|
1780
|
-
}} @
|
|
1781
|
-
this.viewModel.pasteTemplate = i.detail.
|
|
1782
|
-
}} .view=${this.viewModel.view} .referenceElement=${this.referenceElement} ${D(this._templateGallery)}></arcgis-feature-templates
|
|
1769
|
+
}} @arcgisSelectTemplate=${(i) => {
|
|
1770
|
+
this.viewModel.pasteTemplate = i.detail.template;
|
|
1771
|
+
}} .view=${this.viewModel.view} .referenceElement=${this.referenceElement} ${D(this._templateGallery)}></arcgis-feature-templates>` : d`<calcite-notice open icon=exclamation-point kind=warning><div slot=message>${b(this._messages.noMatchingEditableLayers ?? "", { num: this.maximumFeatureCount })}</div></calcite-notice>`}</div></div></calcite-panel>${this._renderApplying()}</calcite-flow-item>`) : w("paste-gallery", d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${(i) => {
|
|
1783
1772
|
i.preventDefault(), this.viewModel.hasPasteCommandsPage && (this.viewModel.activeFlowPage = "commands-page");
|
|
1784
1773
|
}}>${this._renderFlowCommandStart(!this.viewModel.hasPasteCommandsPage)}</calcite-flow-item>`);
|
|
1785
1774
|
}
|
|
@@ -10,7 +10,7 @@ import "@esri/calcite-components/components/calcite-link";
|
|
|
10
10
|
import "@esri/calcite-components/components/calcite-list";
|
|
11
11
|
import "@esri/calcite-components/components/calcite-list-item";
|
|
12
12
|
import "@esri/calcite-components/components/calcite-icon";
|
|
13
|
-
import "../arcgis-feature-templates
|
|
13
|
+
import "../arcgis-feature-templates/index.js";
|
|
14
14
|
import "../arcgis-feature-title/index.js";
|
|
15
15
|
import "../arcgis-feature-image/index.js";
|
|
16
16
|
import "@esri/calcite-components/components/calcite-chip";
|
|
@@ -304,7 +304,13 @@ export abstract class ArcgisPopup extends LitElement {
|
|
|
304
304
|
* ```
|
|
305
305
|
*/
|
|
306
306
|
accessor features: Array<Graphic>;
|
|
307
|
-
/**
|
|
307
|
+
/**
|
|
308
|
+
* When `true`, this prevents the popup from trapping focus when opened.
|
|
309
|
+
* Preventing focus trapping can be used in scenarios where interactions are expected within the user interface, such as when the popup resides in a panel.
|
|
310
|
+
*
|
|
311
|
+
* @default false
|
|
312
|
+
* @since 5.1
|
|
313
|
+
*/
|
|
308
314
|
accessor focusTrapDisabled: boolean;
|
|
309
315
|
/**
|
|
310
316
|
* This function provides the ability to override either the [arcgis-map.goTo()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#goTo) or [arcgis-scene.goTo()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/#goTo) methods.
|
|
@@ -234,7 +234,7 @@ export abstract class ArcgisSliderScaleRange extends LitElement {
|
|
|
234
234
|
* Each region comes from the [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes).
|
|
235
235
|
* See [SupportedRegion](https://developers.arcgis.com/javascript/latest/references/core/widgets/ScaleRangeSlider/types/#SupportedRegion) for the list of regions that are currently supported.
|
|
236
236
|
*/
|
|
237
|
-
accessor region: SupportedRegion |
|
|
237
|
+
accessor region: SupportedRegion | undefined;
|
|
238
238
|
/**
|
|
239
239
|
* Indicates whether the world scale value is shown in the scale menu.
|
|
240
240
|
*
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { g as x, c as p } from "../../chunks/runtime.js";
|
|
3
|
-
import { keyed as
|
|
4
|
-
import { LitElement as
|
|
3
|
+
import { keyed as g } from "lit/directives/keyed.js";
|
|
4
|
+
import { LitElement as _, createEvent as d, safeStyleMap as u, nothing as v } from "@arcgis/lumina";
|
|
5
5
|
import { watch as f } from "@arcgis/core/core/reactiveUtils.js";
|
|
6
|
-
import { u as
|
|
6
|
+
import { u as M } from "../../chunks/useView.js";
|
|
7
7
|
import { u as y } from "../../chunks/useT9n.js";
|
|
8
|
-
import { css as L, html as
|
|
9
|
-
import { usePropertyChange as
|
|
10
|
-
import { createRef as
|
|
8
|
+
import { css as L, html as r } from "lit";
|
|
9
|
+
import { usePropertyChange as b } from "@arcgis/lumina/controllers";
|
|
10
|
+
import { createRef as $, ref as w } from "lit/directives/ref.js";
|
|
11
11
|
import T from "@arcgis/core/portal/Portal.js";
|
|
12
12
|
const h = /* @__PURE__ */ new Set([
|
|
13
13
|
"ar-iq",
|
|
@@ -84,7 +84,35 @@ const h = /* @__PURE__ */ new Set([
|
|
|
84
84
|
"th-th",
|
|
85
85
|
"zh-cn",
|
|
86
86
|
"zh-tw"
|
|
87
|
-
]),
|
|
87
|
+
]), R = {
|
|
88
|
+
ar: "iq",
|
|
89
|
+
bg: "bg",
|
|
90
|
+
cs: "cz",
|
|
91
|
+
da: "dk",
|
|
92
|
+
de: "de",
|
|
93
|
+
el: "gr",
|
|
94
|
+
en: "us",
|
|
95
|
+
es: "es",
|
|
96
|
+
et: "ee",
|
|
97
|
+
fi: "fi",
|
|
98
|
+
fr: "fr",
|
|
99
|
+
is: "is",
|
|
100
|
+
it: "it",
|
|
101
|
+
ja: "jp",
|
|
102
|
+
ko: "kr",
|
|
103
|
+
lt: "lt",
|
|
104
|
+
lv: "lv",
|
|
105
|
+
nl: "nl",
|
|
106
|
+
nn: "no",
|
|
107
|
+
pl: "pl",
|
|
108
|
+
pt: "br",
|
|
109
|
+
ro: "ro",
|
|
110
|
+
ru: "ru",
|
|
111
|
+
sk: "sk",
|
|
112
|
+
sv: "se",
|
|
113
|
+
th: "th",
|
|
114
|
+
zh: "cn"
|
|
115
|
+
}, P = L`:host{display:block;width:310px;max-width:100%}.slider{height:50px}.scale-indicator-container{position:relative;width:100%;margin-top:2px}.scale-indicator-icon{transform:scale(.8,1.7);margin-left:-6px;width:1px;--calcite-icon-color: var(--calcite-color-text-3)}.scale-menu-list{max-height:220px;overflow-y:auto}.scale-menu-input{max-width:120px}.scale-menu-button-container{display:flex;direction:ltr;justify-content:space-between}.scale-menu-button{min-width:0}:dir(rtl) .scale-menu-button-container>*{direction:rtl}.preview-container{padding:6px;background-color:var(--calcite-color-foreground-1);box-shadow:0 1px 2px #0000004d}`, l = [
|
|
88
116
|
{ id: "world", scale: 147914382, minScale: 147914382, maxScale: 1e8 },
|
|
89
117
|
{ id: "continent", scale: 5e7, minScale: 99999999, maxScale: 35e6 },
|
|
90
118
|
{ id: "countriesBig", scale: 25e6, minScale: 34999999, maxScale: 15e6 },
|
|
@@ -106,9 +134,9 @@ const h = /* @__PURE__ */ new Set([
|
|
|
106
134
|
{ id: "rooms", scale: 400, minScale: 400, maxScale: 101 },
|
|
107
135
|
{ id: "room", scale: 100, minScale: 100, maxScale: 0 }
|
|
108
136
|
];
|
|
109
|
-
class
|
|
137
|
+
class I extends _ {
|
|
110
138
|
constructor() {
|
|
111
|
-
super(...arguments), this.messages = y(), this._sliderRef =
|
|
139
|
+
super(...arguments), this.messages = y(), this._sliderRef = $(), this._activeMenu = null, this._customScaleSelected = null, this._portalRegion = null, this._layerMaxScaleLimit = l[l.length - 1].maxScale, this._layerMinScaleLimit = l[0].minScale, this.autoDestroyDisabled = !1, this.disabled = !1, this.hidePreview = !1, this.hideMaxScaleMenu = !1, this.hideMinScaleMenu = !1, this.icon = "actual-size", this.maxScale = 0, this.maxScaleLimit = l[l.length - 1].maxScale, this.minScale = 0, this.minScaleLimit = l[0].minScale, this.mode = "range", this.showWorldValue = !1, this.view = M(this), this.arcgisChange = d(), this.arcgisInput = d(), this.arcgisPropertyChange = b()("state", "minScale", "maxScale"), this.arcgisReady = d();
|
|
112
140
|
}
|
|
113
141
|
static {
|
|
114
142
|
this.properties = { _activeMenu: 16, _customScaleSelected: 16, _portalRegion: 16, _layerMaxScaleLimit: 16, _layerMinScaleLimit: 16, autoDestroyDisabled: 5, disabled: 7, hidePreview: 5, hideMaxScaleMenu: 5, hideMinScaleMenu: 5, icon: 1, label: 1, layer: 0, maxScale: 9, maxScaleLimit: 9, minScale: 9, minScaleLimit: 9, mode: 1, referenceElement: 1, region: 1, showWorldValue: 5, state: 32, view: 0 };
|
|
@@ -155,9 +183,9 @@ class R extends g {
|
|
|
155
183
|
if (s)
|
|
156
184
|
this._layerMinScaleLimit = s[0].scale === 0 ? l[0].minScale : Math.min(l[0].minScale, s[0].scale), !("resampling" in this.layer) || this.layer.resampling || (this._layerMaxScaleLimit = s[s.length - 1].scale);
|
|
157
185
|
else {
|
|
158
|
-
const
|
|
186
|
+
const m = this.layer && "maxScaleRange" in this.layer ? this.layer.maxScaleRange : null;
|
|
159
187
|
let n = 0, o = 0;
|
|
160
|
-
|
|
188
|
+
m && (n = m.minScale, o = m.maxScale), o !== 0 && (this._layerMaxScaleLimit = o), n !== 0 && (this._layerMinScaleLimit = n);
|
|
161
189
|
}
|
|
162
190
|
this.minScaleLimit = Math.min(this.minScaleLimit, this._layerMinScaleLimit), this.maxScaleLimit = Math.max(this.maxScaleLimit, this._layerMaxScaleLimit);
|
|
163
191
|
const c = this.layer;
|
|
@@ -183,18 +211,24 @@ class R extends g {
|
|
|
183
211
|
if (h.has(e))
|
|
184
212
|
return e;
|
|
185
213
|
if (this.region) {
|
|
186
|
-
const a = `${this.messages._t9nLocale}-${
|
|
187
|
-
if (h.has(
|
|
188
|
-
return
|
|
214
|
+
const a = this.region.toLowerCase(), t = `${this.messages._t9nLocale}-${a}`;
|
|
215
|
+
if (h.has(t))
|
|
216
|
+
return t;
|
|
217
|
+
for (const s of h)
|
|
218
|
+
if (s.endsWith(`-${a}`))
|
|
219
|
+
return s;
|
|
189
220
|
}
|
|
190
221
|
if (this._portalRegion) {
|
|
191
222
|
const a = `${this.messages._t9nLocale}-${this._portalRegion}`;
|
|
192
223
|
if (h.has(a))
|
|
193
224
|
return a;
|
|
194
225
|
}
|
|
195
|
-
const i =
|
|
196
|
-
if (
|
|
197
|
-
|
|
226
|
+
const i = R[this.messages._t9nLocale];
|
|
227
|
+
if (i) {
|
|
228
|
+
const a = `${this.messages._t9nLocale}-${i}`;
|
|
229
|
+
if (h.has(a))
|
|
230
|
+
return a;
|
|
231
|
+
}
|
|
198
232
|
for (const a of h)
|
|
199
233
|
if (a.startsWith(`${this.messages._t9nLocale}-`))
|
|
200
234
|
return a;
|
|
@@ -236,21 +270,21 @@ class R extends g {
|
|
|
236
270
|
}
|
|
237
271
|
_renderScalePreviewPopover() {
|
|
238
272
|
const e = this._renderScalePreview();
|
|
239
|
-
return this.hidePreview || !e ? null :
|
|
273
|
+
return this.hidePreview || !e ? null : r`<div slot=popover>${e}</div>`;
|
|
240
274
|
}
|
|
241
275
|
render() {
|
|
242
|
-
return
|
|
276
|
+
return r`<div><arcgis-slider class="slider" .disabled=${this.disabled} layout=horizontal .fillPlacement=${this.mode === "max-scale-only" ? "start" : this.mode === "min-scale-only" ? "end" : void 0} .fullRangeMin=${this._mapScaleToSlider(l[0].minScale)} .fullRangeMax=${this._mapScaleToSlider(l[l.length - 1].maxScale)} .max=${this._mapScaleToSlider(this.maxScaleLimit)} .min=${this._mapScaleToSlider(this.minScaleLimit)} .labelFormatter=${(e, i, a) => a(Math.round(this._mapSliderToScale(e)))} .values=${this.mode === "max-scale-only" ? [this._mapScaleToSlider(this._effectiveMaxScale)] : this.mode === "min-scale-only" ? [this._mapScaleToSlider(this._effectiveMinScale)] : [this._mapScaleToSlider(this._effectiveMinScale), this._mapScaleToSlider(this._effectiveMaxScale)]} @arcgisInput=${this._handleSliderThumbDrag} ${w(this._sliderRef)}>${this._renderScalePreviewPopover()}${this.view?.scale != null && this._renderCurrentScaleIndicator(this.view.scale) || ""}</arcgis-slider><div class="scale-menu-button-container" slot=content-end>${this.mode !== "max-scale-only" && !this.hideMinScaleMenu ? [this._renderScaleMenuButtons("min"), this._renderScaleMenuPopover("min")] : r`<div></div>`}${this.mode !== "min-scale-only" && !this.hideMaxScaleMenu && [this._renderScaleMenuButtons("max"), this._renderScaleMenuPopover("max")] || ""}</div></div>`;
|
|
243
277
|
}
|
|
244
278
|
_renderCurrentScaleIndicator(e) {
|
|
245
279
|
const i = this._sliderRef.value, a = i?.fullRangeMax ?? this._mapScaleToSlider(l[l.length - 1].maxScale), t = i?.fullRangeMin ?? this._mapScaleToSlider(l[0].minScale), s = a - t, c = Math.min(100, Math.max(0, (this._mapScaleToSlider(e) - t) / s * 100));
|
|
246
|
-
return
|
|
280
|
+
return g("scale-indicator", r`<div class="scale-indicator-container" slot=content-end><div class="scale-indicator-icon" style=${u({
|
|
247
281
|
position: "absolute",
|
|
248
282
|
left: `${c}%`
|
|
249
283
|
})} .title=${`${this.messages.currentScale} 1:${Math.round(e).toLocaleString(this.messages._t9nLocale)}`}><calcite-icon icon=caret-up scale=s></calcite-icon></div></div>`);
|
|
250
284
|
}
|
|
251
285
|
_renderCustomScaleValue(e, i) {
|
|
252
286
|
const a = Math.round(i).toString();
|
|
253
|
-
return
|
|
287
|
+
return r`<calcite-list-item .label=${this.messages?.featuredScaleLabels?.custom} .selected=${this._customScaleSelected === e} @calciteListItemSelect=${(t) => {
|
|
254
288
|
const s = t.target.querySelector("calcite-input-number");
|
|
255
289
|
this._handleCustomScaleInput(e, s?.value ?? ""), this._customScaleSelected = e;
|
|
256
290
|
}}><calcite-input-number dir=ltr class="scale-menu-input" slot=content-end group-separator inputmode=numeric .max=${l[0].minScale} .min=${l[l.length - 1].maxScale} number-button-type=none .placeholder=${this.messages?.customScaleInputTooltip} prefix-text=1: scale=s step=1 .value=${a} @click=${(t) => t.stopPropagation()} @keydown=${(t) => {
|
|
@@ -258,10 +292,10 @@ class R extends g {
|
|
|
258
292
|
}}></calcite-input-number></calcite-list-item>`;
|
|
259
293
|
}
|
|
260
294
|
_renderScaleMenuButtons(e) {
|
|
261
|
-
return
|
|
295
|
+
return r`<calcite-button .disabled=${this.disabled} class="scale-menu-button" .id=${`scale-menu-button-${e}`} icon-end=chevron-down scale=s .appearance=${this._activeMenu === e ? "outline" : "transparent"}>${this._getDropdownLabel(e)}</calcite-button>`;
|
|
262
296
|
}
|
|
263
297
|
_renderScaleMenuPopover(e) {
|
|
264
|
-
return
|
|
298
|
+
return r`<calcite-popover auto-close .label=${`${e === "min" ? "Min" : "Max"} scale menu`} .referenceElement=${`scale-menu-button-${e}`} .placement=${e === "max" ? "bottom-end" : "bottom-start"} .open=${this._activeMenu === e} scale=s @calcitePopoverOpen=${() => this._activeMenu = e} @calcitePopoverClose=${() => {
|
|
265
299
|
this._activeMenu === e && (this._activeMenu = null);
|
|
266
300
|
}}>${this._renderScaleMenu(e)}</calcite-popover>`;
|
|
267
301
|
}
|
|
@@ -269,14 +303,14 @@ class R extends g {
|
|
|
269
303
|
const i = Math.floor(this._mapScaleToSlider(this._effectiveMaxScale)), a = Math.floor(this._mapScaleToSlider(this._effectiveMinScale)), t = e === "min" ? this._effectiveMinScale : this._effectiveMaxScale, s = this.messages.featuredScaleLabels;
|
|
270
304
|
if (!s)
|
|
271
305
|
return;
|
|
272
|
-
const c = Math.floor(this._mapScaleToSlider(this.maxScaleLimit)),
|
|
306
|
+
const c = Math.floor(this._mapScaleToSlider(this.maxScaleLimit)), m = Math.floor(this._mapScaleToSlider(this.minScaleLimit)), n = l.filter((o, S) => e === "min" ? S < i && S >= m : S > a && S <= c).map((o) => this._renderScaleMenuItem({
|
|
273
307
|
scaleLabel: s[o.id],
|
|
274
308
|
scaleValue: o.scale,
|
|
275
309
|
isSelected: t === o.scale,
|
|
276
310
|
valueVisible: o.id !== "world" || this.showWorldValue,
|
|
277
311
|
type: e
|
|
278
312
|
}));
|
|
279
|
-
return
|
|
313
|
+
return r`<calcite-list label="Scale Menu List" scale=s class="scale-menu-list" selection-appearance=icon selection-mode=single-persist>${this.view?.scale != null && this._renderCustomScaleValue(e, t) || ""}${this.view?.scale != null ? this._renderScaleMenuItem({
|
|
280
314
|
scaleValue: this.view.scale,
|
|
281
315
|
scaleLabel: s.current,
|
|
282
316
|
isSelected: t === this.view.scale,
|
|
@@ -286,7 +320,7 @@ class R extends g {
|
|
|
286
320
|
}
|
|
287
321
|
_renderScaleMenuItem(e) {
|
|
288
322
|
const { scaleValue: i, scaleLabel: a, isSelected: t, valueVisible: s } = e, c = i === l[0].scale ? ` ${this.messages.aboveSuffix}` : i === l[l.length - 1].scale ? ` ${this.messages.belowSuffix}` : "";
|
|
289
|
-
return
|
|
323
|
+
return r`<calcite-list-item .label=${a} .selected=${t && this._customScaleSelected !== e.type} .description=${s ? `1:${Math.round(i).toLocaleString(this.messages._t9nLocale)}${c}` : void 0} @calciteListItemSelect=${() => {
|
|
290
324
|
this._setScale(e.type, i), this._customScaleSelected = null;
|
|
291
325
|
}}></calcite-list-item>`;
|
|
292
326
|
}
|
|
@@ -294,17 +328,17 @@ class R extends g {
|
|
|
294
328
|
const e = this._sliderRef.value?.activeValue;
|
|
295
329
|
if (typeof e != "number")
|
|
296
330
|
return null;
|
|
297
|
-
const i = Math.min(l.length - 1, Math.max(0, Math.floor(e))), a = 5, t = 128, s = t * (i % a), c = t * Math.floor(i / a),
|
|
298
|
-
return
|
|
331
|
+
const i = Math.min(l.length - 1, Math.max(0, Math.floor(e))), a = 5, t = 128, s = t * (i % a), c = t * Math.floor(i / a), m = `-${s}px -${c}px`, n = this._getSpriteSheetFile();
|
|
332
|
+
return r`<div class="preview-container"><img src=${x(`./assets/slider-scale-range/images/${n}.avif`) ?? v} style=${u({
|
|
299
333
|
display: "block",
|
|
300
334
|
height: `${t}px`,
|
|
301
335
|
width: `${t}px`,
|
|
302
|
-
objectPosition:
|
|
336
|
+
objectPosition: m,
|
|
303
337
|
objectFit: "none"
|
|
304
338
|
})}></div>`;
|
|
305
339
|
}
|
|
306
340
|
}
|
|
307
|
-
p("arcgis-slider-scale-range",
|
|
341
|
+
p("arcgis-slider-scale-range", I);
|
|
308
342
|
export {
|
|
309
|
-
|
|
343
|
+
I as ArcgisSliderScaleRange
|
|
310
344
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type TemplateItem from "../arcgis-feature-templates/TemplateItem.js";
|
|
3
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The Template Image component generates a feature swatch representing a
|
|
7
|
+
* Feature Template.
|
|
8
|
+
*
|
|
9
|
+
* @since 5.1
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export abstract class ArcgisTemplateImage extends LitElement {
|
|
13
|
+
accessor template: TemplateItem | undefined;
|
|
14
|
+
}
|