@arcgis/map-components 6.0.0-next.21 → 6.0.0-next.22
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/{G56N6RF4.js → 2S6RQ6Q4.js} +1 -1
- package/dist/cdn/{FDESUDJ5.js → AIF4MCBB.js} +1 -1
- package/dist/cdn/CNJSDHZI.js +2 -0
- package/dist/cdn/{SDLZ4BNM.js → EVWWTIEQ.js} +1 -1
- package/dist/cdn/FRX4ZT35.js +2 -0
- package/dist/cdn/IQGL3AGV.js +2 -0
- package/dist/cdn/MW27GSDX.js +2 -0
- package/dist/cdn/{4LNXCEM5.js → NORQIOSX.js} +1 -1
- package/dist/cdn/PFMWLSWQ.js +2 -0
- package/dist/cdn/{WTAAQHO3.js → TM4FFRX5.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-basemap-layer-list-next/customElement.js +88 -86
- package/dist/components/arcgis-daylight/customElement.js +2 -1
- package/dist/components/arcgis-layer-list-item-indicator/customElement.js +2 -2
- package/dist/components/arcgis-layer-list-item-panel/customElement.js +9 -9
- package/dist/components/arcgis-layer-list-next/customElement.js +97 -95
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +5 -5
- package/dist/components/arcgis-sketch/customElement.d.ts +308 -30
- package/dist/components/arcgis-sketch/customElement.js +47 -20
- package/dist/components/arcgis-table-list-next/customElement.js +55 -54
- package/dist/components/arcgis-time-slider/customElement.d.ts +2 -2
- 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/loader.js +1 -1
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +6 -6
- package/dist/cdn/ED2T4ASN.js +0 -2
- package/dist/cdn/MBLS5ES4.js +0 -2
- package/dist/cdn/PHVKEWZ7.js +0 -2
- package/dist/cdn/QKGJVGXJ.js +0 -2
- package/dist/cdn/UPCWZNTA.js +0 -2
|
@@ -6,12 +6,12 @@ import { GenericController as J, usePropertyChange as Q, useWatchAttributes as X
|
|
|
6
6
|
import { reEmitEvent as S } from "@arcgis/lumina-toolkit/reEmitEvent";
|
|
7
7
|
import Y from "@arcgis/core/layers/GraphicsLayer.js";
|
|
8
8
|
import Z from "@arcgis/core/symbols/TextSymbol.js";
|
|
9
|
-
import { LitElement as ee, createEvent as te, nothing as
|
|
9
|
+
import { LitElement as ee, createEvent as te, nothing as D } from "@arcgis/lumina";
|
|
10
10
|
import { watch as f, on as ie, whenOnce as oe } from "@arcgis/core/core/reactiveUtils.js";
|
|
11
11
|
import { u as se } from "../../chunks/useT9n.js";
|
|
12
12
|
import { m as ne } from "../../chunks/useViewModel.js";
|
|
13
13
|
import { V as _ } from "../../chunks/visible-element.js";
|
|
14
|
-
import { createRef as
|
|
14
|
+
import { createRef as L, ref as M } from "lit/directives/ref.js";
|
|
15
15
|
import le from "@arcgis/core/widgets/Sketch/SketchViewModel.js";
|
|
16
16
|
import { S as re } from "../../chunks/resources.js";
|
|
17
17
|
import { getOrCreateMapValue as F, createReactiveMap as ae } from "@arcgis/core/applications/Components/featureUtils.js";
|
|
@@ -36,7 +36,7 @@ const be = [
|
|
|
36
36
|
"top-left",
|
|
37
37
|
"top-right"
|
|
38
38
|
], Ce = new Set(be);
|
|
39
|
-
function
|
|
39
|
+
function B(i, e) {
|
|
40
40
|
let t = e;
|
|
41
41
|
for (const o of i.split(".")) {
|
|
42
42
|
if (typeof t != "object" || t === null)
|
|
@@ -738,7 +738,7 @@ class Ae extends J {
|
|
|
738
738
|
const e = this.component.el, t = e.parentElement, o = this.#o, s = e.assignedSlot;
|
|
739
739
|
if (!t || !Pe.has(t.localName) || !o || !s?.parentElement)
|
|
740
740
|
return;
|
|
741
|
-
const c = getComputedStyle(t).direction === "rtl" ? "rtl" : "ltr", d =
|
|
741
|
+
const c = getComputedStyle(t).direction === "rtl" ? "rtl" : "ltr", d = U(e.slot, c);
|
|
742
742
|
if (!d)
|
|
743
743
|
return;
|
|
744
744
|
const r = Array.from(t.children).filter(
|
|
@@ -778,8 +778,8 @@ class Ae extends J {
|
|
|
778
778
|
this.#y();
|
|
779
779
|
return;
|
|
780
780
|
}
|
|
781
|
-
const t = this.component.layout, o =
|
|
782
|
-
content:
|
|
781
|
+
const t = this.component.layout, o = Le({
|
|
782
|
+
content: Oe(e),
|
|
783
783
|
gap: ke,
|
|
784
784
|
layout: t,
|
|
785
785
|
position: e.position,
|
|
@@ -806,7 +806,7 @@ class Ae extends J {
|
|
|
806
806
|
this.#t.disconnect(), this.#p?.(), this.#p = void 0, this.#e.disconnect(), this.#i.disconnect(), this.#l = void 0, this.#s = void 0, this.#h = [], this.#n?.removeEventListener("slotchange", this.#u), this.#n = void 0, this.#r = void 0, this.#a = void 0, this.#d = void 0, this.#g = void 0;
|
|
807
807
|
}
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function Le({
|
|
810
810
|
content: i,
|
|
811
811
|
gap: e,
|
|
812
812
|
layout: t,
|
|
@@ -815,12 +815,12 @@ function Oe({
|
|
|
815
815
|
toolbarBounds: c,
|
|
816
816
|
viewBounds: d
|
|
817
817
|
}) {
|
|
818
|
-
const r =
|
|
818
|
+
const r = O(d, t), n = O(c, t), u = z(o, t), g = u ? n.start - r.start : r.end - n.end;
|
|
819
819
|
let l = 0, v = !1;
|
|
820
820
|
for (const b of i) {
|
|
821
821
|
if (z(b.position, t) === u)
|
|
822
822
|
continue;
|
|
823
|
-
const C =
|
|
823
|
+
const C = O(b.bounds, t);
|
|
824
824
|
if (!(C.crossStart < n.crossEnd && C.crossEnd > n.crossStart))
|
|
825
825
|
continue;
|
|
826
826
|
const E = u ? r.end - C.start : C.end - r.start;
|
|
@@ -829,17 +829,17 @@ function Oe({
|
|
|
829
829
|
const m = v ? e : 0;
|
|
830
830
|
return Math.max(0, r.length - Math.max(0, g) - s - l - m);
|
|
831
831
|
}
|
|
832
|
-
function
|
|
832
|
+
function O(i, e) {
|
|
833
833
|
return e === "horizontal" ? { start: i.left, end: i.right, length: i.width, crossStart: i.top, crossEnd: i.bottom } : { start: i.top, end: i.bottom, length: i.height, crossStart: i.left, crossEnd: i.right };
|
|
834
834
|
}
|
|
835
835
|
function z(i, e) {
|
|
836
836
|
return e === "horizontal" ? i.endsWith("left") : i.startsWith("top");
|
|
837
837
|
}
|
|
838
|
-
function
|
|
838
|
+
function Oe(i) {
|
|
839
839
|
return i.content.flatMap((e) => {
|
|
840
840
|
if (e.assignedSlot === i.assignedSlot)
|
|
841
841
|
return [];
|
|
842
|
-
const t =
|
|
842
|
+
const t = U(e.slot, i.direction);
|
|
843
843
|
return t ? [{ bounds: e.getBoundingClientRect(), position: t }] : [];
|
|
844
844
|
});
|
|
845
845
|
}
|
|
@@ -859,7 +859,7 @@ function $e(i, e, t, o) {
|
|
|
859
859
|
return g + b;
|
|
860
860
|
}, u);
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function U(i, e) {
|
|
863
863
|
const [t, o] = i.split("-");
|
|
864
864
|
if (t !== "bottom" && t !== "top")
|
|
865
865
|
return;
|
|
@@ -875,9 +875,9 @@ const Re = ne((i) => new le({
|
|
|
875
875
|
}));
|
|
876
876
|
class Ve extends ee {
|
|
877
877
|
constructor() {
|
|
878
|
-
super(), this.#t = new a(), this.#l =
|
|
878
|
+
super(), this.#t = new a(), this.#l = L(), this.#s = new Ae(this), this.#n = L(), this._defaultGraphicsLayer = null, this._messages = se(), this.test = {
|
|
879
879
|
componentViewModel: this.#t
|
|
880
|
-
}, this._groupLayoutPriorityOverrides = /* @__PURE__ */ new Map(), this._contextualToolLocation = "separate", this._refMap = ae(), this.viewModel = Re(this), this.view = this.viewModel.view, this.autoDestroyDisabled = !1, this.createGraphic = this.viewModel.createGraphic, this.creationMode = this.viewModel.creationMode, this.defaultCreateOptions = this.viewModel.defaultCreateOptions, this.defaultGraphicsLayerDisabled = !1, this.defaultUpdateOptions = this.viewModel.defaultUpdateOptions, this.geometrySimplificationInProgress = this.viewModel.geometrySimplificationInProgress, this.icon = "pencil", this.label = this._messages?.componentLabel, this.labelOptions = this.viewModel.labelOptions, this.layer = this.viewModel.layer, this.layout = "horizontal", this.pointSymbol = this.viewModel.pointSymbol, this.polygonSymbol = this.viewModel.polygonSymbol, this.polylineSymbol = this.viewModel.polylineSymbol, this.visualScale = "m", this.snappingOptions = this.viewModel.snappingOptions, this.textSymbol = this.viewModel.textSymbol, this.toolbarKind = "floating", this.tooltipOptions = this.viewModel.tooltipOptions, this.useViewOptions = this.viewModel.useViewOptions, this.valueOptions = this.viewModel.valueOptions, this.useLegacyCreateTools = this.viewModel.useLegacyCreateTools, this.updateOnGraphicClickDisabled = this.viewModel.updateOnGraphicClick, this.updateGraphics = this.viewModel.updateGraphics, this.arcgisCreate = S(() => this.viewModel, "create"), this.arcgisDelete = S(() => this.viewModel, "delete"), this.arcgisDuplicate = S(() => this.viewModel, "duplicate"), this.arcgisPropertyChange = Q()("activeTool", "geometrySimplificationInProgress", "state"), this.arcgisReady = te(), this.arcgisRedo = S(() => this.viewModel, "redo"), this.arcgisUndo = S(() => this.viewModel, "undo"), this.arcgisUpdate = S(() => this.viewModel, "update"), X(["slot"], () => {
|
|
880
|
+
}, this._groupLayoutPriorityOverrides = /* @__PURE__ */ new Map(), this._contextualToolLocation = "separate", this._refMap = ae(), this.viewModel = Re(this), this.view = this.viewModel.view, this.autoDestroyDisabled = !1, this.createGraphic = this.viewModel.createGraphic, this.creationMode = this.viewModel.creationMode, this.defaultCreateOptions = this.viewModel.defaultCreateOptions, this.defaultGraphicsLayerDisabled = !1, this.defaultUpdateOptions = this.viewModel.defaultUpdateOptions, this.geometrySimplificationInProgress = this.viewModel.geometrySimplificationInProgress, this.icon = "pencil", this.label = this._messages?.componentLabel, this.labelOptions = this.viewModel.labelOptions, this.layer = this.viewModel.layer, this.layout = "horizontal", this.pointSymbol = this.viewModel.pointSymbol, this.polygonSymbol = this.viewModel.polygonSymbol, this.polylineSymbol = this.viewModel.polylineSymbol, this.activeFillSymbol = this.viewModel.activeFillSymbol, this.activeLineSymbol = this.viewModel.activeLineSymbol, this.activeVertexSymbol = this.viewModel.activeVertexSymbol, this.activeCreateToolDrawMode = this.viewModel.activeCreateToolDrawMode, this.visualScale = "m", this.snappingOptions = this.viewModel.snappingOptions, this.textSymbol = this.viewModel.textSymbol, this.toolbarKind = "floating", this.tooltipOptions = this.viewModel.tooltipOptions, this.useViewOptions = this.viewModel.useViewOptions, this.valueOptions = this.viewModel.valueOptions, this.useLegacyCreateTools = this.viewModel.useLegacyCreateTools, this.updateOnGraphicClickDisabled = this.viewModel.updateOnGraphicClick, this.updateGraphics = this.viewModel.updateGraphics, this.activeTooltip = this.viewModel.activeTooltip, this.arcgisCreate = S(() => this.viewModel, "create"), this.arcgisDelete = S(() => this.viewModel, "delete"), this.arcgisDuplicate = S(() => this.viewModel, "duplicate"), this.arcgisPropertyChange = Q()("activeTool", "geometrySimplificationInProgress", "state"), this.arcgisReady = te(), this.arcgisRedo = S(() => this.viewModel, "redo"), this.arcgisUndo = S(() => this.viewModel, "undo"), this.arcgisUpdate = S(() => this.viewModel, "update"), X(["slot"], () => {
|
|
881
881
|
this.requestUpdate();
|
|
882
882
|
}), this.manager.onLifecycle(() => [
|
|
883
883
|
f(() => this.el.view?.map, (e, t) => {
|
|
@@ -899,7 +899,7 @@ class Ve extends ee {
|
|
|
899
899
|
});
|
|
900
900
|
}
|
|
901
901
|
static {
|
|
902
|
-
this.properties = { _groupLayoutPriorityOverrides: 16, _contextualToolLocation: 16, _refMap: 16, viewModel: 0, view: 0, activeTool: 32, autoDestroyDisabled: 5, visibleElements: 0, availableCreateTools: 0, createGraphic: 32, creationMode: 1, defaultCreateOptions: 0, defaultGraphicsLayerDisabled: 5, defaultUpdateOptions: 0, geometrySimplificationInProgress: 36, hideCreateToolsCircle: 5, hideCreateToolsMultipoint: 5, hideCreateToolsPoint: 5, hideCreateToolsPolygon: 5, hideCreateToolsPolyline: 5, hideCreateToolsRectangle: 5, hideDuplicateButton: 5, hideDeleteButton: 5, hideSelectionCountLabel: 5, hideLabelsToggle: 5, hideSelectionToolsLassoSelection: 5, hideSelectionToolsRectangleSelection: 5, hideSettingsMenu: 5, hideSinglePluginBackButton: 5, hideSnappingControls: 5, hideSnappingControlsElementsEnabledToggle: 5, hideSnappingControlsElementsFeatureEnabledToggle: 5, hideSnappingControlsElementsLayerList: 5, hideSnappingControlsElementsSelfEnabledToggle: 5, hideSnappingControlsElementsGridEnabledToggle: 5, hideSnappingControlsElementsGridControls: 5, hideSnappingControlsElementsGridControlsElementsColorSelection: 5, hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle: 5, hideSnappingControlsElementsGridControlsElementsLineIntervalInput: 5, hideSnappingControlsElementsGridControlsElementsNumericInputs: 5, hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning: 5, hideSnappingControlsElementsGridControlsElementsPlacementButtons: 5, hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle: 5, hideTooltipsToggle: 5, hideUndoRedoMenu: 5, icon: 1, label: 1, labelOptions: 0, layer: 0, layout: 1, pointSymbol: 0, polygonSymbol: 0, polylineSymbol: 0, referenceElement: 1, relativePosition: 1, scale: 1, visualScale: 1, showSnappingControlsElementsHeader: 5, showCreateToolsFreehandPolygon: 5, showCreateToolsFreehandPolyline: 5, showCreateToolsText: 5, hideGeometrySimplificationActivityIndicator: 5, snappingOptions: 0, state: 32, textSymbol: 0, toolbarKind: 1, tooltipOptions: 0, useViewOptions: 5, valueOptions: 0, useLegacyCreateTools: 5, updateOnGraphicClickDisabled: 5, cancelUpdateOnClickAwayDisabled: 5, updateGraphics: 32 };
|
|
902
|
+
this.properties = { _groupLayoutPriorityOverrides: 16, _contextualToolLocation: 16, _refMap: 16, viewModel: 0, view: 0, activeTool: 32, autoDestroyDisabled: 5, visibleElements: 0, availableCreateTools: 0, createGraphic: 32, creationMode: 1, defaultCreateOptions: 0, defaultGraphicsLayerDisabled: 5, defaultUpdateOptions: 0, geometrySimplificationInProgress: 36, hideCreateToolsCircle: 5, hideCreateToolsMultipoint: 5, hideCreateToolsPoint: 5, hideCreateToolsPolygon: 5, hideCreateToolsPolyline: 5, hideCreateToolsRectangle: 5, hideDuplicateButton: 5, hideDeleteButton: 5, hideSelectionCountLabel: 5, hideLabelsToggle: 5, hideSelectionToolsLassoSelection: 5, hideSelectionToolsRectangleSelection: 5, hideSettingsMenu: 5, hideSinglePluginBackButton: 5, hideSnappingControls: 5, hideSnappingControlsElementsEnabledToggle: 5, hideSnappingControlsElementsFeatureEnabledToggle: 5, hideSnappingControlsElementsLayerList: 5, hideSnappingControlsElementsSelfEnabledToggle: 5, hideSnappingControlsElementsGridEnabledToggle: 5, hideSnappingControlsElementsGridControls: 5, hideSnappingControlsElementsGridControlsElementsColorSelection: 5, hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle: 5, hideSnappingControlsElementsGridControlsElementsLineIntervalInput: 5, hideSnappingControlsElementsGridControlsElementsNumericInputs: 5, hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning: 5, hideSnappingControlsElementsGridControlsElementsPlacementButtons: 5, hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle: 5, hideTooltipsToggle: 5, hideUndoRedoMenu: 5, icon: 1, label: 1, labelOptions: 0, layer: 0, layout: 1, pointSymbol: 0, polygonSymbol: 0, polylineSymbol: 0, activeFillSymbol: 0, activeLineSymbol: 0, activeVertexSymbol: 0, activeCreateToolDrawMode: 1, referenceElement: 1, relativePosition: 1, scale: 1, visualScale: 1, showSnappingControlsElementsHeader: 5, showCreateToolsFreehandPolygon: 5, showCreateToolsFreehandPolyline: 5, showCreateToolsText: 5, hideGeometrySimplificationActivityIndicator: 5, snappingOptions: 0, state: 32, textSymbol: 0, toolbarKind: 1, tooltipOptions: 0, useViewOptions: 5, valueOptions: 0, useLegacyCreateTools: 5, updateOnGraphicClickDisabled: 5, cancelUpdateOnClickAwayDisabled: 5, updateGraphics: 32, activeTooltip: 0 };
|
|
903
903
|
}
|
|
904
904
|
static {
|
|
905
905
|
this.styles = Se;
|
|
@@ -1159,6 +1159,12 @@ class Ve extends ee {
|
|
|
1159
1159
|
set cancelUpdateOnClickAwayDisabled(e) {
|
|
1160
1160
|
this.viewModel.cancelUpdateOnClickAway = !e;
|
|
1161
1161
|
}
|
|
1162
|
+
async addGraphic(e) {
|
|
1163
|
+
this.viewModel.addGraphic(e);
|
|
1164
|
+
}
|
|
1165
|
+
async addGraphics(e) {
|
|
1166
|
+
this.viewModel.addGraphics(e);
|
|
1167
|
+
}
|
|
1162
1168
|
async cancel() {
|
|
1163
1169
|
this.#t.cancelAll();
|
|
1164
1170
|
}
|
|
@@ -1180,9 +1186,24 @@ class Ve extends ee {
|
|
|
1180
1186
|
async duplicate() {
|
|
1181
1187
|
this.viewModel.duplicate();
|
|
1182
1188
|
}
|
|
1189
|
+
async hasGraphic(e) {
|
|
1190
|
+
return this.viewModel.hasGraphic(e);
|
|
1191
|
+
}
|
|
1192
|
+
async removeAllGraphics() {
|
|
1193
|
+
this.viewModel.removeAllGraphics();
|
|
1194
|
+
}
|
|
1195
|
+
async removeGraphic(e) {
|
|
1196
|
+
this.viewModel.removeGraphic(e);
|
|
1197
|
+
}
|
|
1198
|
+
async removeGraphics(e) {
|
|
1199
|
+
this.viewModel.removeGraphics(e);
|
|
1200
|
+
}
|
|
1183
1201
|
async redo() {
|
|
1184
1202
|
this.viewModel.redo();
|
|
1185
1203
|
}
|
|
1204
|
+
async canRedo() {
|
|
1205
|
+
return this.viewModel.canRedo();
|
|
1206
|
+
}
|
|
1186
1207
|
async setContextualToolLocation(e) {
|
|
1187
1208
|
this._contextualToolLocation = e;
|
|
1188
1209
|
}
|
|
@@ -1195,9 +1216,15 @@ class Ve extends ee {
|
|
|
1195
1216
|
async triggerUpdate(e, t) {
|
|
1196
1217
|
await this.#t.update(e, t);
|
|
1197
1218
|
}
|
|
1219
|
+
async place(e) {
|
|
1220
|
+
this.viewModel.place(e);
|
|
1221
|
+
}
|
|
1198
1222
|
async undo() {
|
|
1199
1223
|
this.#t.sketchViewModel?.undo();
|
|
1200
1224
|
}
|
|
1225
|
+
async canUndo() {
|
|
1226
|
+
return this.viewModel.canUndo();
|
|
1227
|
+
}
|
|
1201
1228
|
connectedCallback() {
|
|
1202
1229
|
super.connectedCallback(), this.defaultGraphicsLayerDisabled || (this._defaultGraphicsLayer?.destroyed && (this._defaultGraphicsLayer = null), this._defaultGraphicsLayer ??= new Y({ title: "Sketch Layer" }), this.layer = this._defaultGraphicsLayer, this.view?.map?.add(this.layer), this.viewModel.layer = this._defaultGraphicsLayer);
|
|
1203
1230
|
}
|
|
@@ -1229,7 +1256,7 @@ class Ve extends ee {
|
|
|
1229
1256
|
_renderActionGroup({ visible: e, commands: t, name: o }) {
|
|
1230
1257
|
if (!e || !t.length)
|
|
1231
1258
|
return;
|
|
1232
|
-
const { defaultPriority: s, groupKind: c, overflowLabel: d, preferEndSlot: r } = we[o], u = (o === "geometrySimplification" ? void 0 : this._groupLayoutPriorityOverrides.get(o)) ?? s, g = t.map((v) => this._renderCommand(v)), l =
|
|
1259
|
+
const { defaultPriority: s, groupKind: c, overflowLabel: d, preferEndSlot: r } = we[o], u = (o === "geometrySimplification" ? void 0 : this._groupLayoutPriorityOverrides.get(o)) ?? s, g = t.map((v) => this._renderCommand(v)), l = B(`more.${d}`, this._messages);
|
|
1233
1260
|
switch (c) {
|
|
1234
1261
|
case "more-button":
|
|
1235
1262
|
return y`<arcgis-toolbar-group .priority=${u} .preferEndSlot=${r}><arcgis-toolbar-more-button .overflowActionLabel=${l} .priority=${u}>${g}</arcgis-toolbar-more-button></arcgis-toolbar-group>`;
|
|
@@ -1239,9 +1266,9 @@ class Ve extends ee {
|
|
|
1239
1266
|
return y`<arcgis-toolbar-group .priority=${u} .preferEndSlot=${r}>${g}</arcgis-toolbar-group>`;
|
|
1240
1267
|
}
|
|
1241
1268
|
}
|
|
1242
|
-
_renderCommand({ active: e, afterCreate: t, afterRemoved: o, afterUpdate: s, appearance: c, icon: d, disabled: r, id: n, kind: u, labelKey: g, labelParameters: l, loading: v, tooltipKey: m, iconFlipRTL: b, onClick: C, refKey: P, textEnabled: E, renderAsAction:
|
|
1243
|
-
const { _messages: G, _refMap: H, layout: $ } = this, k =
|
|
1244
|
-
return
|
|
1269
|
+
_renderCommand({ active: e, afterCreate: t, afterRemoved: o, afterUpdate: s, appearance: c, icon: d, disabled: r, id: n, kind: u, labelKey: g, labelParameters: l, loading: v, tooltipKey: m, iconFlipRTL: b, onClick: C, refKey: P, textEnabled: E, renderAsAction: K }) {
|
|
1270
|
+
const { _messages: G, _refMap: H, layout: $ } = this, k = B(g, G), A = k === void 0 ? g : l ? j(k, l) : k, R = G?.[m] ?? A, V = P ? F(H, P, L) : this.#n, x = { afterCreate: t, afterRemoved: o, afterUpdate: s };
|
|
1271
|
+
return K ? y`<arcgis-toolbar-action .active=${e} .appearance=${c} .disabled=${r} .icon=${d} .iconFlipRtl=${b} id=${n ?? D} .kind=${u} .loading=${v} .labelText=${$ === "horizontal" ? A : ""} .textEnabled=${E} .tooltipText=${$ === "horizontal" && E ? "" : R} @arcgisToolbarItemSelected=${C} ${W(x)} ${M(V)}></arcgis-toolbar-action>` : y`<arcgis-toolbar-item .active=${e} .disabled=${r} .icon=${d} id=${n ?? D} .iconFlipRtl=${b} .labelText=${A} .tooltipText=${R} @arcgisItemSelected=${C} ${W(x)} ${M(V)}></arcgis-toolbar-item>`;
|
|
1245
1272
|
}
|
|
1246
1273
|
}
|
|
1247
1274
|
N("arcgis-sketch", Ve);
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { repeat as
|
|
4
|
-
import { keyed as
|
|
5
|
-
import
|
|
6
|
-
import { watch as I, on as
|
|
7
|
-
import
|
|
8
|
-
import { LitElement as
|
|
9
|
-
import { usePropertyChange as
|
|
10
|
-
import { reEmitEvent as
|
|
2
|
+
import { c as M } from "../../chunks/runtime.js";
|
|
3
|
+
import { repeat as C } from "lit/directives/repeat.js";
|
|
4
|
+
import { keyed as v } from "lit/directives/keyed.js";
|
|
5
|
+
import L from "@arcgis/core/core/Collection.js";
|
|
6
|
+
import { watch as I, on as y } from "@arcgis/core/core/reactiveUtils.js";
|
|
7
|
+
import E from "@arcgis/core/layerList/TableListModel.js";
|
|
8
|
+
import { LitElement as _, createEvent as c, safeClassMap as b, nothing as D } from "@arcgis/lumina";
|
|
9
|
+
import { usePropertyChange as F } from "@arcgis/lumina/controllers";
|
|
10
|
+
import { reEmitEvent as T } from "@arcgis/lumina-toolkit/reEmitEvent";
|
|
11
11
|
import { classes as P } from "@arcgis/toolkit/dom";
|
|
12
12
|
import { generateGuid as N } from "@arcgis/toolkit/string";
|
|
13
13
|
import { createRef as U, ref as x } from "lit/directives/ref.js";
|
|
14
14
|
import { html as o } from "lit";
|
|
15
15
|
import { u as A } from "../../chunks/useT9n.js";
|
|
16
|
-
import { g
|
|
16
|
+
import { g } from "../../chunks/globalCss.js";
|
|
17
17
|
import { m as B, b as R, r as k, e as S } from "../../chunks/layer-list-utils.js";
|
|
18
18
|
import { ArcgisLayerListItem as G } from "../arcgis-layer-list-next/layer-list-item/customElement.js";
|
|
19
19
|
import { s as O, a as q } from "../../chunks/layer-list-next.js";
|
|
20
20
|
import { c as H } from "../../chunks/css.js";
|
|
21
21
|
import { m as V } from "../../chunks/useViewModel.js";
|
|
22
|
-
const w = H,
|
|
23
|
-
class z extends
|
|
22
|
+
const w = H, $ = "nested", j = V(E);
|
|
23
|
+
class z extends _ {
|
|
24
24
|
constructor() {
|
|
25
|
-
super(...arguments), this
|
|
26
|
-
const l = s === "pull" ? this.listItemCanGiveFunction : this.listItemCanReceiveFunction, a = this
|
|
25
|
+
super(...arguments), this.#t = null, this._rootGroupUid = `table-${N()}`, this._rootListRef = U(), this._selectedDragItemLayerUid = null, this.messages = A(), this.viewModel = j(this), this._canMove = ({ dragEl: e, fromEl: t, toEl: i }, s) => {
|
|
26
|
+
const l = s === "pull" ? this.listItemCanGiveFunction : this.listItemCanReceiveFunction, a = this.#e(e);
|
|
27
27
|
if (!a || !("sortable" in a) || !a.sortable)
|
|
28
28
|
return !1;
|
|
29
|
-
const h = this
|
|
30
|
-
return p && r && typeof l == "function" ? l(
|
|
29
|
+
const h = this.#e(t), d = this.#i(t), n = this.#e(i), m = this.#i(i), f = !!d && !!m && d === m, u = { selected: a, from: h, to: n }, p = t?.group, r = i?.group;
|
|
30
|
+
return p && r && typeof l == "function" ? l(u) : f;
|
|
31
31
|
}, this._onPanelOpen = () => {
|
|
32
32
|
this.requestUpdate();
|
|
33
33
|
}, this._onSelectedDragItemLayerUidChange = (e) => {
|
|
34
34
|
this._selectedDragItemLayerUid = e;
|
|
35
35
|
}, this._onTriggerAction = (e, t) => {
|
|
36
36
|
this.triggerAction(e, t);
|
|
37
|
-
}, this.autoDestroyDisabled = !1, this.closed = !1, this.collapsed = !1, this.dragEnabled = !1, this.filterPlaceholder = "", this.filterText = "", this.headingLevel = 2, this.hideNoFilterResultsNotice = !1, this.hideNoItemsNotice = !1, this.hideStatusIndicators = !1, this.icon = "table", this.listItemCreatedFunction = this.viewModel.listItemCreatedFunction, this.listModeDisabled = this.viewModel.listModeDisabled, this.map = this.viewModel.map, this.minDragEnabledItems = B, this.minFilterItems = R, this.selectedItems = new
|
|
37
|
+
}, this.autoDestroyDisabled = !1, this.closed = !1, this.collapsed = !1, this.dragEnabled = !1, this.filterPlaceholder = "", this.filterText = "", this.headingLevel = 2, this.hideNoFilterResultsNotice = !1, this.hideNoItemsNotice = !1, this.hideStatusIndicators = !1, this.icon = "table", this.listItemCreatedFunction = this.viewModel.listItemCreatedFunction, this.listModeDisabled = this.viewModel.listModeDisabled, this.map = this.viewModel.map, this.minDragEnabledItems = B, this.minFilterItems = R, this.selectedItems = new L(), this.selectionMode = "none", this.showCloseButton = !1, this.showCollapseButton = !1, this.showErrors = !1, this.showFilter = !1, this.showHeading = !1, this.showTemporaryTableIndicators = !1, this.tables = this.viewModel.tables, this.arcgisClose = c(), this.arcgisFilterChange = c(), this.arcgisPropertyChange = F()("state"), this.arcgisReady = c(), this.arcgisSelectedItemsChange = c(), this.arcgisTableItemsChanged = c(), this.arcgisTriggerAction = T(() => this.viewModel, "trigger-action");
|
|
38
38
|
}
|
|
39
39
|
static {
|
|
40
40
|
this.properties = { _visibleItems: 16, _openedPanelItems: 16, _dragEnabled: 16, _filterEnabled: 16, autoDestroyDisabled: 5, closed: 5, collapsed: 7, dragEnabled: 5, filterPlaceholder: 1, filterPredicate: 0, filterText: 1, headingLevel: 9, hideNoFilterResultsNotice: 5, hideNoItemsNotice: 5, hideStatusIndicators: 5, icon: 1, label: 1, listItemCanGiveFunction: 0, listItemCanReceiveFunction: 0, listItemCreatedFunction: 0, listModeDisabled: 5, map: 0, messageOverrides: 0, minDragEnabledItems: 9, minFilterItems: 9, referenceElement: 1, selectedItems: 0, selectionMode: 1, showCloseButton: 5, showCollapseButton: 5, showErrors: 5, showFilter: 5, showHeading: 5, showTemporaryTableIndicators: 5, state: 32, tableItems: 32, tables: 0, view: 0 };
|
|
@@ -42,6 +42,7 @@ class z extends E {
|
|
|
42
42
|
static {
|
|
43
43
|
this.styles = [O, q];
|
|
44
44
|
}
|
|
45
|
+
#t;
|
|
45
46
|
get _visibleItems() {
|
|
46
47
|
return this.tableItems?.filter((e) => !e.hidden && (this.showErrors || !e.error));
|
|
47
48
|
}
|
|
@@ -71,24 +72,24 @@ class z extends E {
|
|
|
71
72
|
I(() => this.view?.map, (e) => {
|
|
72
73
|
this.map || (this.viewModel.map = e);
|
|
73
74
|
}, { initial: !0 }),
|
|
74
|
-
|
|
75
|
+
y(() => this.viewModel.tableItems, "change", () => {
|
|
75
76
|
k(this.selectedItems), this.arcgisTableItemsChanged.emit(), this.requestUpdate();
|
|
76
77
|
}, { initial: !0 }),
|
|
77
|
-
|
|
78
|
+
y(() => this.selectedItems, "change", () => this.arcgisSelectedItemsChange.emit()),
|
|
78
79
|
I(() => [this.viewModel.state, this.viewModel.totalItems], () => this.requestUpdate(), { initial: !0 }),
|
|
79
|
-
I(() => [this.filterPredicate, this._rootListRef.value], () => this
|
|
80
|
+
I(() => [this.filterPredicate, this._rootListRef.value], () => this.#a())
|
|
80
81
|
]);
|
|
81
82
|
}
|
|
82
83
|
triggerAction(e, t) {
|
|
83
84
|
return this.viewModel.triggerAction(e, t);
|
|
84
85
|
}
|
|
85
|
-
|
|
86
|
+
#e(e) {
|
|
86
87
|
if (e?.tagName.toLowerCase() === "calcite-list-item")
|
|
87
88
|
return e.value;
|
|
88
89
|
const t = e?.getAttribute("data-item");
|
|
89
|
-
return t ? this
|
|
90
|
+
return t ? this.#l(t) : null;
|
|
90
91
|
}
|
|
91
|
-
|
|
92
|
+
#l(e) {
|
|
92
93
|
const t = this.tableItems?.toArray() ?? [];
|
|
93
94
|
for (; t.length; ) {
|
|
94
95
|
const i = t.shift();
|
|
@@ -100,82 +101,82 @@ class z extends E {
|
|
|
100
101
|
}
|
|
101
102
|
return null;
|
|
102
103
|
}
|
|
103
|
-
|
|
104
|
+
#i(e) {
|
|
104
105
|
return e?.getAttribute("data-layer-type") ?? null;
|
|
105
106
|
}
|
|
106
|
-
|
|
107
|
+
#a() {
|
|
107
108
|
const e = this._rootListRef.value;
|
|
108
109
|
e && (e.filterPredicate = this.filterPredicate ? (t) => {
|
|
109
|
-
const i = this
|
|
110
|
+
const i = this.#e(t);
|
|
110
111
|
return i ? this.filterPredicate(i) : !1;
|
|
111
112
|
} : void 0);
|
|
112
113
|
}
|
|
113
|
-
|
|
114
|
+
#r(e) {
|
|
114
115
|
e.open = !1;
|
|
115
116
|
}
|
|
116
|
-
|
|
117
|
+
#o(e, t) {
|
|
117
118
|
e?.sort((i, s) => {
|
|
118
119
|
const l = i.uid != null ? t.indexOf(i.uid) : -1, a = s.uid != null ? t.indexOf(s.uid) : -1;
|
|
119
120
|
return l > a ? -1 : l < a ? 1 : 0;
|
|
120
121
|
});
|
|
121
122
|
}
|
|
122
|
-
|
|
123
|
+
#n(e) {
|
|
123
124
|
const { fromEl: t, dragEl: i, oldIndex: s } = e;
|
|
124
125
|
s == null || !t || !i || t.insertBefore(i, t.children[s]);
|
|
125
126
|
}
|
|
126
|
-
|
|
127
|
-
const
|
|
127
|
+
#d(e) {
|
|
128
|
+
const t = this.#t, { toEl: i, fromEl: s, dragEl: l, newIndex: a } = e, h = t?.newIndex === a && t?.dragEl === l && t?.toEl === i && t?.fromEl === s;
|
|
128
129
|
if (!s || !i || h)
|
|
129
130
|
return;
|
|
130
|
-
this
|
|
131
|
+
this.#t = e, this._selectedDragItemLayerUid = l.value;
|
|
131
132
|
const d = Array.from(s.children).filter((n) => n?.matches("calcite-list-item")).map((n) => n.value.layer?.uid ?? "");
|
|
132
|
-
this
|
|
133
|
+
this.#o(this.viewModel.tables, d);
|
|
133
134
|
}
|
|
134
|
-
|
|
135
|
+
#h(e) {
|
|
135
136
|
const { selectionMode: t, selectedItems: i } = this;
|
|
136
137
|
if (t === "none")
|
|
137
138
|
return;
|
|
138
|
-
const s = e.target.selectedItems.map((l) => this
|
|
139
|
+
const s = e.target.selectedItems.map((l) => this.#e(l)).filter(Boolean);
|
|
139
140
|
i.removeAll(), i.addMany(s);
|
|
140
141
|
}
|
|
141
|
-
|
|
142
|
+
#c() {
|
|
142
143
|
this.closed = !0, this.arcgisClose.emit(), this.autoDestroyDisabled || this.destroy();
|
|
143
144
|
}
|
|
144
145
|
render() {
|
|
145
146
|
const { state: e } = this, t = {
|
|
146
|
-
[
|
|
147
|
-
[
|
|
147
|
+
[g.hidden]: e === "loading",
|
|
148
|
+
[g.disabled]: e === "disabled"
|
|
148
149
|
};
|
|
149
|
-
return o`<div class=${b(P(
|
|
150
|
+
return o`<div class=${b(P(g.widget, g.panel, t))}>${this.#g()}</div>`;
|
|
150
151
|
}
|
|
151
|
-
|
|
152
|
+
#s() {
|
|
152
153
|
return o`<div slot=message>${this.messages.noItemsToDisplay}</div>`;
|
|
153
154
|
}
|
|
154
|
-
|
|
155
|
-
return this.hideNoItemsNotice ? null : o`<div class=${b(w.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this
|
|
155
|
+
#m() {
|
|
156
|
+
return this.hideNoItemsNotice ? null : o`<div class=${b(w.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this.#s()}</calcite-notice></div>`;
|
|
156
157
|
}
|
|
157
|
-
|
|
158
|
-
return
|
|
159
|
-
const { panel: i, title: s } = e, l = () => this
|
|
158
|
+
#u() {
|
|
159
|
+
return C(this._openedPanelItems.toArray(), (e) => e.uid, (e, t) => {
|
|
160
|
+
const { panel: i, title: s } = e, l = () => this.#r(i);
|
|
160
161
|
return o`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${t === this._openedPanelItems.length - 1} @calciteFlowItemBack=${(a) => {
|
|
161
162
|
a.preventDefault(), l();
|
|
162
163
|
}}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${l} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`;
|
|
163
164
|
});
|
|
164
165
|
}
|
|
165
|
-
|
|
166
|
-
const { collapsed: e, _visibleItems: t, _filterEnabled: i, _rootGroupUid: s, showCloseButton: l, showCollapseButton: a, showHeading: h, _dragEnabled: d, selectionMode: n, filterText: m, filterPlaceholder: f, messages:
|
|
167
|
-
o`<calcite-flow-item .closable=${l} .closed=${this.closed} .collapsed=${e} .collapsible=${a} .heading=${h ? this.label ??
|
|
166
|
+
#g() {
|
|
167
|
+
const { collapsed: e, _visibleItems: t, _filterEnabled: i, _rootGroupUid: s, showCloseButton: l, showCollapseButton: a, showHeading: h, _dragEnabled: d, selectionMode: n, filterText: m, filterPlaceholder: f, messages: u } = this, p = [
|
|
168
|
+
o`<calcite-flow-item .closable=${l} .closed=${this.closed} .collapsed=${e} .collapsible=${a} .heading=${h ? this.label ?? u.componentLabel : void 0} .headingLevel=${this.headingLevel} .selected=${!this._openedPanelItems.length} @calciteFlowItemClose=${() => this.#c()}>${t?.length ? o`<calcite-list .canPull=${(r) => this._canMove(r, "pull")} .canPut=${(r) => this._canMove(r, "put")} data-layer-type=${s ?? D} .displayMode=${$} .dragEnabled=${d} .filterEnabled=${i} .filterPlaceholder=${f} .filterProps=${S} .filterText=${i ? m : ""} .group=${s} .label=${this.label ?? u.componentLabel} selection-appearance=border .selectionMode=${n} @calciteListChange=${this.#h} @calciteListDragEnd=${(r) => this.#n(r.detail)} @calciteListFilter=${(r) => {
|
|
168
169
|
this.filterText = r.currentTarget?.filterText ?? "", this.arcgisFilterChange.emit();
|
|
169
|
-
}} @calciteListOrderChange=${(r) => this
|
|
170
|
-
this
|
|
170
|
+
}} @calciteListOrderChange=${(r) => this.#d(r.detail)} ${x(this._rootListRef)}>${t.toArray().map((r) => this.#f(r))}${i && !this.hideNoFilterResultsNotice ? o`<div class=${b(w.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#s()}</calcite-notice></div>` : null}</calcite-list>` : this.#m()}</calcite-flow-item>`,
|
|
171
|
+
this.#u()
|
|
171
172
|
];
|
|
172
|
-
return this.closed ? null :
|
|
173
|
+
return this.closed ? null : v("root-flow", o`<calcite-flow>${p}</calcite-flow>`);
|
|
173
174
|
}
|
|
174
|
-
|
|
175
|
-
return
|
|
175
|
+
#f(e) {
|
|
176
|
+
return v(e.uid, G({ canMove: this._canMove, css: w, displayMode: $, dragEnabled: this.dragEnabled, hideStatusIndicators: this.hideStatusIndicators, item: e, itemType: "table", listModeDisabled: this.viewModel.listModeDisabled, messages: this.messages, rootGroupUid: this._rootGroupUid, selectedDragItemLayerUid: this._selectedDragItemLayerUid, selectedItems: this.selectedItems, selectionMode: this.selectionMode, showErrors: this.showErrors, showFilter: this.showFilter, showTemporaryTableIndicators: this.showTemporaryTableIndicators, handleAction: (t, i) => this._onTriggerAction(t, i), handlePanelOpen: this._onPanelOpen, handleSelectedDragItemLayerUidChange: this._onSelectedDragItemLayerUidChange, view: this.view }));
|
|
176
177
|
}
|
|
177
178
|
}
|
|
178
|
-
|
|
179
|
+
M("arcgis-table-list-next", z);
|
|
179
180
|
export {
|
|
180
181
|
z as ArcgisTableListNext
|
|
181
182
|
};
|
|
@@ -28,10 +28,10 @@ export abstract class ArcgisTimeSlider extends LitElement {
|
|
|
28
28
|
* can be used to execute custom code such as setting the [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) to a specific date or copying the
|
|
29
29
|
* timeExtent to the browser's clipboard.
|
|
30
30
|
*
|
|
31
|
-
* [](https://developers.arcgis.com/javascript/latest/sample-code/
|
|
31
|
+
* [](https://developers.arcgis.com/javascript/latest/sample-code/time-bar-time-offset/)
|
|
32
32
|
*
|
|
33
33
|
* @since 4.21
|
|
34
|
-
* @see [Sample -
|
|
34
|
+
* @see [Sample - Time Bar with timeOffset and actions](https://developers.arcgis.com/javascript/latest/sample-code/time-bar-time-offset/)
|
|
35
35
|
* @example
|
|
36
36
|
* // Create a TimeSlider with two actions to snap the thumb to
|
|
37
37
|
* // two specific time extents.
|