@arcgis/map-components 5.2.0-next.73 → 5.2.0-next.75
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/4FJSNV35.js +2 -0
- package/dist/cdn/{AOGPP4VX.js → 4NJUFFOS.js} +1 -1
- package/dist/cdn/{PT33LZD5.js → 6MYKPCPT.js} +1 -1
- package/dist/cdn/BKYSXBQN.js +2 -0
- package/dist/cdn/CF47R6K5.js +2 -0
- package/dist/cdn/{6NWYETZO.js → D2GIYGUD.js} +1 -1
- package/dist/cdn/{AKQ23RYL.js → ES3KG6A4.js} +1 -1
- package/dist/cdn/JDVOGTZB.js +4 -0
- package/dist/cdn/{U5NYFDPL.js → MOKFWLNF.js} +1 -1
- package/dist/cdn/S54DWYVB.js +2 -0
- package/dist/cdn/SE5IUOLA.js +2 -0
- package/dist/cdn/{KL6LVGWT.js → SJXCBJJW.js} +2 -2
- package/dist/cdn/{MFRZNKMQ.js → XBAD6Q2O.js} +1 -1
- package/dist/cdn/{UAFLVW2D.js → XMEBM4Y2.js} +1 -1
- package/dist/cdn/{ORO4OWNH.js → ZLRMCH6O.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-selection-toolbar/customElement.d.ts +17 -7
- package/dist/components/arcgis-selection-toolbar/customElement.js +24 -20
- 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/stencil.d.ts +2 -2
- package/package.json +5 -5
- package/dist/cdn/4WL7ZDOR.js +0 -2
- package/dist/cdn/FUISFUR3.js +0 -2
- package/dist/cdn/L254HFGW.js +0 -2
- package/dist/cdn/UDZLCLOW.js +0 -4
- package/dist/cdn/XVUJEFQE.js +0 -2
- package/dist/cdn/ZGGP2PLT.js +0 -2
- package/dist/components/arcgis-selection-toolbar/types.d.ts +0 -8
- /package/dist/cdn/{RMUOAQL7.js → 2IOX3M25.js} +0 -0
- /package/dist/cdn/{SWUDJD3D.js → 2KS6VTIZ.js} +0 -0
- /package/dist/cdn/{CBHZA2RM.js → 2N2A7TFY.js} +0 -0
- /package/dist/cdn/{QDOF7WAJ.js → 2X2WQONZ.js} +0 -0
- /package/dist/cdn/{LNV4R7FO.js → 3B6FCCWV.js} +0 -0
- /package/dist/cdn/{LYVEFTG5.js → 4KTFBEBW.js} +0 -0
- /package/dist/cdn/{D4LXZSJU.js → 4Y5WOZAR.js} +0 -0
- /package/dist/cdn/{EW7KQ7UM.js → 5VAWPVBO.js} +0 -0
- /package/dist/cdn/{ETAL67B5.js → 7T3MIY45.js} +0 -0
- /package/dist/cdn/{73PS6B6H.js → A6O4WH3F.js} +0 -0
- /package/dist/cdn/{VZMX6AAC.js → ANPCJFOB.js} +0 -0
- /package/dist/cdn/{6CHIESQS.js → AS6CVCAA.js} +0 -0
- /package/dist/cdn/{VISNMKBR.js → AURQ6AZT.js} +0 -0
- /package/dist/cdn/{J3LAIXMY.js → BEWGYHLQ.js} +0 -0
- /package/dist/cdn/{XNUG4O7M.js → BIQ72MMB.js} +0 -0
- /package/dist/cdn/{37VIO2V5.js → BY2C56P2.js} +0 -0
- /package/dist/cdn/{6TPIG3XC.js → CHK6UXUR.js} +0 -0
- /package/dist/cdn/{ZDEXTEYL.js → E5CYXNOV.js} +0 -0
- /package/dist/cdn/{5KSNV3AD.js → FSVQ3YCE.js} +0 -0
- /package/dist/cdn/{FQS7XRHV.js → HAOZ5VKZ.js} +0 -0
- /package/dist/cdn/{YNAWY2DP.js → HPSLJE7K.js} +0 -0
- /package/dist/cdn/{SMGBVJDQ.js → HRNKPJ3W.js} +0 -0
- /package/dist/cdn/{JOPE2HA7.js → IYIK5LIF.js} +0 -0
- /package/dist/cdn/{4XAKKTWP.js → JY7ELDXN.js} +0 -0
- /package/dist/cdn/{LIKCZBSN.js → KDMDKSN3.js} +0 -0
- /package/dist/cdn/{LKS3BW4E.js → KHMFIFKB.js} +0 -0
- /package/dist/cdn/{VM2FDVMM.js → LBJGPS6R.js} +0 -0
- /package/dist/cdn/{FRNAEEL2.js → MADQIAMY.js} +0 -0
- /package/dist/cdn/{ZWWCLNZL.js → MCMHWVNK.js} +0 -0
- /package/dist/cdn/{ZTCPBOG3.js → MXDXZZ7M.js} +0 -0
- /package/dist/cdn/{W3ELQQ2T.js → NOUSKMUF.js} +0 -0
- /package/dist/cdn/{URSO4VYE.js → OLOMB2NS.js} +0 -0
- /package/dist/cdn/{3RVEVJVG.js → QYQFMAF2.js} +0 -0
- /package/dist/cdn/{M5RPB52H.js → RFYBJAVR.js} +0 -0
- /package/dist/cdn/{TXH2FVPB.js → TBYOTOK3.js} +0 -0
- /package/dist/cdn/{4O5BM5AI.js → UW66366K.js} +0 -0
- /package/dist/cdn/{RCXLHOT5.js → WEG4POUJ.js} +0 -0
- /package/dist/cdn/{2ROKOM2Z.js → WN6WNWDL.js} +0 -0
- /package/dist/cdn/{QG5I2LDY.js → XP34TRZ2.js} +0 -0
- /package/dist/cdn/{6WOUFI3X.js → YK4IJ6A4.js} +0 -0
- /package/dist/cdn/{TXLEUQGC.js → YQ5H6M4V.js} +0 -0
- /package/dist/cdn/{55GK5OAA.js → ZMB2HOR5.js} +0 -0
- /package/dist/cdn/{ZUKUN26H.js → ZTBD4LIR.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type SelectionOperation from "@arcgis/core/views/selection/SelectionOperation.js";
|
|
3
3
|
import type SelectionManager from "@arcgis/core/views/SelectionManager.js";
|
|
4
|
+
import type { SelectionToolbarViewModelEvents } from "@arcgis/core/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js";
|
|
4
5
|
import type { SelectionOperationProperties } from "@arcgis/core/views/selection/SelectionOperation.js";
|
|
5
|
-
import type {
|
|
6
|
+
import type { SelectionOperationType, SelectionToolName, SelectableViewUnion, SelectionSource } from "@arcgis/core/views/selection/types.js";
|
|
6
7
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
7
|
-
import type { SelectionToolbarBeforeActivateEvent } from "./types.js";
|
|
8
8
|
import type { ArcgisReferenceElement, IconName } from "../types.js";
|
|
9
9
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
10
10
|
import type { SelectionToolConfig } from "@arcgis/core/widgets/support/SelectionToolbar/types.js";
|
|
@@ -172,7 +172,7 @@ export abstract class ArcgisSelectionToolbar extends LitElement {
|
|
|
172
172
|
* Controls the orientation of the component.
|
|
173
173
|
*
|
|
174
174
|
* @default "horizontal"
|
|
175
|
-
* @
|
|
175
|
+
* @internal
|
|
176
176
|
*/
|
|
177
177
|
accessor layout: "horizontal" | "vertical";
|
|
178
178
|
/**
|
|
@@ -337,6 +337,15 @@ export abstract class ArcgisSelectionToolbar extends LitElement {
|
|
|
337
337
|
cancel(): Promise<void>;
|
|
338
338
|
/** Permanently destroy the component. */
|
|
339
339
|
destroy(): Promise<void>;
|
|
340
|
+
/**
|
|
341
|
+
* Convenience method for syncing the effective selection manager with the current layers and tables on
|
|
342
|
+
* the view. This is useful when new layers or table layers have been added to the view after construction.
|
|
343
|
+
* Otherwise, newly-added layers are not included in selection results made by this component. This method will do
|
|
344
|
+
* nothing if the effective selection manager does not have a view assigned.
|
|
345
|
+
*
|
|
346
|
+
* @since 5.2
|
|
347
|
+
*/
|
|
348
|
+
syncSources(): Promise<void>;
|
|
340
349
|
/**
|
|
341
350
|
* Convenience method for toggling the active state of a specific tool. If the provided tool is already active, it will be cancelled.
|
|
342
351
|
* If the provided tool is not active, it will be activated. Any currently active selection operation will also be cancelled before
|
|
@@ -352,23 +361,24 @@ export abstract class ArcgisSelectionToolbar extends LitElement {
|
|
|
352
361
|
*
|
|
353
362
|
* @since 5.2
|
|
354
363
|
*/
|
|
355
|
-
readonly arcgisBeforeActivate: import("@arcgis/lumina").TargetedEvent<this,
|
|
364
|
+
readonly arcgisBeforeActivate: import("@arcgis/lumina").TargetedEvent<this, SelectionToolbarViewModelEvents["before-activate"]>;
|
|
356
365
|
/**
|
|
357
366
|
* Fires when the selection operation is complete and results have been processed.
|
|
358
367
|
*
|
|
359
368
|
* @since 5.2
|
|
360
369
|
*/
|
|
361
|
-
readonly arcgisComplete: import("@arcgis/lumina").TargetedEvent<this,
|
|
370
|
+
readonly arcgisComplete: import("@arcgis/lumina").TargetedEvent<this, SelectionToolbarViewModelEvents["complete"]>;
|
|
362
371
|
/** Emitted when the value of a property is changed. Use this to listen to changes to properties. */
|
|
363
372
|
readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "activeOperation" | "state"; }>;
|
|
364
373
|
/** Emitted when the component associated with a map or scene view is ready to be interacted with. */
|
|
365
374
|
readonly arcgisReady: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
366
375
|
/**
|
|
367
|
-
* Fires when the
|
|
376
|
+
* Fires when the potential selection set changes while drawing. This event will not fire unless
|
|
377
|
+
* the 'syncWhileDrawing' property is set to true. For the final selection set, use the 'complete' event.
|
|
368
378
|
*
|
|
369
379
|
* @since 5.2
|
|
370
380
|
*/
|
|
371
|
-
readonly arcgisSelectionChange: import("@arcgis/lumina").TargetedEvent<this,
|
|
381
|
+
readonly arcgisSelectionChange: import("@arcgis/lumina").TargetedEvent<this, SelectionToolbarViewModelEvents["selection-change"]>;
|
|
372
382
|
readonly "@eventTypes": {
|
|
373
383
|
arcgisBeforeActivate: ArcgisSelectionToolbar["arcgisBeforeActivate"]["detail"];
|
|
374
384
|
arcgisComplete: ArcgisSelectionToolbar["arcgisComplete"]["detail"];
|
|
@@ -2,26 +2,27 @@
|
|
|
2
2
|
import { c as g } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as v, html as a } from "lit";
|
|
4
4
|
import { keyed as h } from "lit/directives/keyed.js";
|
|
5
|
-
import { substitute as p, formatNumber as
|
|
6
|
-
import
|
|
7
|
-
import { LitElement as
|
|
8
|
-
import { usePropertyChange as
|
|
9
|
-
import {
|
|
5
|
+
import { substitute as p, formatNumber as m } from "@arcgis/core/intl.js";
|
|
6
|
+
import T from "@arcgis/core/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js";
|
|
7
|
+
import { LitElement as b, createEvent as y, nothing as r } from "@arcgis/lumina";
|
|
8
|
+
import { usePropertyChange as w } from "@arcgis/lumina/controllers";
|
|
9
|
+
import { reEmitEvent as d } from "@arcgis/lumina/controllers/accessor";
|
|
10
|
+
import { u as M } from "../../chunks/useT9n.js";
|
|
10
11
|
import { m as O } from "../../chunks/useViewModel.js";
|
|
11
|
-
const
|
|
12
|
+
const S = v`:host{width:100%;display:flex;>*{align-items:center;align-self:center;height:100%;width:100%}}.root{display:flex;flex-direction:column}calcite-action-bar[layout=horizontal]{width:100%;calcite-chip{margin-inline-start:auto}}calcite-action-bar[layout=vertical]{height:100%;calcite-chip{margin-block-start:auto}}calcite-action-bar slot{align-items:center}calcite-dropdown:has(calcite-action:not([text-enabled])){align-self:center}calcite-action:not([text-enabled]){align-self:center}calcite-chip{display:flex;align-self:center;line-height:initial}calcite-dropdown{calcite-icon{margin-inline-start:var(--calcite-space-2xs)}}calcite-chip[closed]{display:inline-flex}calcite-progress{--calcite-progress-background-color: transparent}`, u = {
|
|
12
13
|
replace: "overwrite-features",
|
|
13
14
|
add: "cursor-plus",
|
|
14
15
|
remove: "cursor-minus"
|
|
15
|
-
}, $ = O(
|
|
16
|
-
class
|
|
16
|
+
}, $ = O(T);
|
|
17
|
+
class D extends b {
|
|
17
18
|
constructor() {
|
|
18
|
-
super(...arguments), this.viewModel = $(this), this.messages =
|
|
19
|
+
super(...arguments), this.viewModel = $(this), this.messages = M(), this.autoDestroyDisabled = !1, this.disabled = !1, this.icon = "selection-set", this.view = this.viewModel.view, this.activeOperation = this.viewModel.activeOperation, this.availableOperationTypes = ["replace", "add", "remove"], this.continuousSelectionEnabled = this.viewModel.continuousSelectionEnabled, this.defaultLassoToolOptions = this.viewModel.defaultLassoToolOptions, this.defaultOperationType = this.viewModel.defaultOperationType, this.defaultPointToolOptions = this.viewModel.defaultPointToolOptions, this.defaultRectangleToolOptions = this.viewModel.defaultRectangleToolOptions, this.effectiveSelectionManager = this.viewModel.effectiveSelectionManager, this.effectiveSources = this.viewModel.effectiveSources, this.hideChip = !1, this.hideLassoTool = !1, this.hideOperationTypeControls = !1, this.hidePanTool = !1, this.hidePointTool = !1, this.hideProgress = !1, this.hideRectangleTool = !1, this.layout = "horizontal", this.returnFeatureTitleFields = this.viewModel.returnFeatureTitleFields, this.selectionManager = this.viewModel.selectionManager, this.showTextLabels = !1, this.sources = this.viewModel.sources, this.toolConfigs = this.viewModel.toolConfigs, this.visualScale = "m", this.arcgisBeforeActivate = d(() => this.viewModel, "before-activate"), this.arcgisComplete = d(() => this.viewModel, "complete"), this.arcgisPropertyChange = w()("activeOperation", "state"), this.arcgisReady = y(), this.arcgisSelectionChange = d(() => this.viewModel, "selection-change");
|
|
19
20
|
}
|
|
20
21
|
static {
|
|
21
22
|
this.properties = { _effectiveDisabled: 16, _effectiveOperationType: 16, _processing: 16, autoDestroyDisabled: 5, disabled: 7, icon: 1, label: 1, referenceElement: 1, view: 0, activeOperation: 32, availableOperationTypes: 0, continuousSelectionEnabled: 5, defaultLassoToolOptions: 0, defaultOperationType: 1, defaultPointToolOptions: 0, defaultRectangleToolOptions: 0, effectiveSelectionManager: 32, effectiveSources: 32, hideChip: 5, hideLassoTool: 5, hideOperationTypeControls: 5, hidePanTool: 5, hidePointTool: 5, hideProgress: 5, hideRectangleTool: 5, layerViewPreferenceDisabled: 5, layout: 1, returnFeatureTitleFields: 5, returnGeometryDisabled: 5, selectionManager: 0, showTextLabels: 5, sources: 0, state: 32, syncResultsDisabled: 5, syncWhileDrawing: 5, toolConfigs: 0, visualScale: 1 };
|
|
22
23
|
}
|
|
23
24
|
static {
|
|
24
|
-
this.styles =
|
|
25
|
+
this.styles = S;
|
|
25
26
|
}
|
|
26
27
|
get _effectiveDisabled() {
|
|
27
28
|
return this.disabled || this.state === "disabled";
|
|
@@ -73,6 +74,9 @@ class S extends m {
|
|
|
73
74
|
async destroy() {
|
|
74
75
|
this.viewModel?.destroy();
|
|
75
76
|
}
|
|
77
|
+
async syncSources() {
|
|
78
|
+
return this.effectiveSelectionManager?.syncSources();
|
|
79
|
+
}
|
|
76
80
|
async toggleTool(e) {
|
|
77
81
|
if (!this._effectiveDisabled)
|
|
78
82
|
return this.viewModel.toggleTool(e);
|
|
@@ -103,13 +107,13 @@ class S extends m {
|
|
|
103
107
|
const { effectiveSelectionManager: e, layout: t, messages: i, visualScale: o } = this, s = e?.count ?? 0, l = o === "l" ? 999 : 99;
|
|
104
108
|
return i.countTruncated && s > l && t === "vertical" ? p(i.countTruncated, {
|
|
105
109
|
count: l
|
|
106
|
-
}) :
|
|
110
|
+
}) : m(s);
|
|
107
111
|
}
|
|
108
112
|
#i() {
|
|
109
113
|
if (this.hideProgress)
|
|
110
114
|
return;
|
|
111
115
|
const e = this.messages.processing;
|
|
112
|
-
return a`<calcite-progress aria-label=${e ??
|
|
116
|
+
return a`<calcite-progress aria-label=${e ?? r} .label=${e} .type=${this._processing ? "indeterminate" : "determinate"}></calcite-progress>`;
|
|
113
117
|
}
|
|
114
118
|
#o() {
|
|
115
119
|
return h("tools-group", a`<calcite-action-group>${this.#s()}${this.#a()}</calcite-action-group>`);
|
|
@@ -137,7 +141,7 @@ class S extends m {
|
|
|
137
141
|
if (this.hideChip)
|
|
138
142
|
return;
|
|
139
143
|
const { effectiveSelectionManager: e, messages: t } = this, i = e?.count ?? 0, o = this._getTextForChip(), s = t.clearSelectionCount ? p(t.clearSelectionCount, { count: i }) : void 0;
|
|
140
|
-
return a`<calcite-chip appearance=outline .closable=${i > 0} .disabled=${this._effectiveDisabled || i === 0} .label=${o} .scale=${this.visualScale} title=${s ??
|
|
144
|
+
return a`<calcite-chip appearance=outline .closable=${i > 0} .disabled=${this._effectiveDisabled || i === 0} .label=${o} .scale=${this.visualScale} title=${s ?? r} @calciteChipClose=${() => e?.clear()}>${o}</calcite-chip>`;
|
|
141
145
|
}
|
|
142
146
|
#n() {
|
|
143
147
|
if (this.hidePointTool)
|
|
@@ -161,8 +165,8 @@ class S extends m {
|
|
|
161
165
|
const { availableOperationTypes: e } = this;
|
|
162
166
|
if (this.hideOperationTypeControls || !e.length)
|
|
163
167
|
return;
|
|
164
|
-
const { _effectiveOperationType: t, showTextLabels: i, visualScale: o } = this, s = u[t], l = this._getTextForSelectionOperationType(t),
|
|
165
|
-
return h("toggle-group", a`<calcite-action-group><calcite-dropdown overlay-positioning=fixed placement=bottom-start .scale=${o}><calcite-action class=tool-button .disabled=${this._effectiveDisabled} .icon=${s} .scale=${o} slot=trigger .text=${l ?? ""} .textEnabled=${i} title=${
|
|
168
|
+
const { _effectiveOperationType: t, showTextLabels: i, visualScale: o } = this, s = u[t], l = this._getTextForSelectionOperationType(t), n = this._getLabelForSelectionOperationType(t);
|
|
169
|
+
return h("toggle-group", a`<calcite-action-group><calcite-dropdown overlay-positioning=fixed placement=bottom-start .scale=${o}><calcite-action class=tool-button .disabled=${this._effectiveDisabled} .icon=${s} .scale=${o} slot=trigger .text=${l ?? ""} .textEnabled=${i} title=${n ?? r}><calcite-icon icon=chevron-down scale=s></calcite-icon></calcite-action><calcite-dropdown-group>${e.map((c) => this.#p(c))}</calcite-dropdown-group></calcite-dropdown></calcite-action-group>`);
|
|
166
170
|
}
|
|
167
171
|
#p(e) {
|
|
168
172
|
return a`<calcite-dropdown-item .iconStart=${u[e]} .selected=${this.defaultOperationType === e} @calciteDropdownItemSelect=${() => this.defaultOperationType = e}>${this._getLabelForSelectionOperationType(e)}</calcite-dropdown-item>`;
|
|
@@ -178,14 +182,14 @@ class S extends m {
|
|
|
178
182
|
});
|
|
179
183
|
}
|
|
180
184
|
#t(e) {
|
|
181
|
-
const { active: t, disabled: i, icon: o, onclick: s, text: l, title:
|
|
182
|
-
return a`<calcite-action .active=${t} class=tool-button .disabled=${i} .icon=${o} @click=${s} .text=${l} .textEnabled=${
|
|
185
|
+
const { active: t, disabled: i, icon: o, onclick: s, text: l, title: n } = e, { showTextLabels: c, visualScale: f } = this;
|
|
186
|
+
return a`<calcite-action .active=${t} class=tool-button .disabled=${i} .icon=${o} @click=${s} .text=${l} .textEnabled=${c} title=${n ?? r} .scale=${f}></calcite-action>`;
|
|
183
187
|
}
|
|
184
188
|
render() {
|
|
185
|
-
return a`<div><calcite-action-bar expand-disabled .layout=${this.layout} overflow-
|
|
189
|
+
return a`<div><calcite-action-bar expand-toggle-disabled .layout=${this.layout} overflow-mode=none .scale=${this.visualScale}>${this.#h()}${this.#o()}${this.#r()}</calcite-action-bar>${this.#i()}</div>`;
|
|
186
190
|
}
|
|
187
191
|
}
|
|
188
|
-
g("arcgis-selection-toolbar",
|
|
192
|
+
g("arcgis-selection-toolbar", D);
|
|
189
193
|
export {
|
|
190
|
-
|
|
194
|
+
D as ArcgisSelectionToolbar
|
|
191
195
|
};
|