@arcgis/map-components 5.2.0-next.95 → 5.2.0-next.96
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/22TB66OC.js +2 -0
- package/dist/cdn/{AY2PVEY5.js → 3AIQYNSA.js} +1 -1
- package/dist/cdn/{SSJBKHEN.js → 77NK4UBY.js} +1 -1
- package/dist/cdn/AJBOKAK6.js +2 -0
- package/dist/cdn/{2HYRTMJ6.js → AOBYM5ZK.js} +1 -1
- package/dist/cdn/AZ6IOGGT.js +2 -0
- package/dist/cdn/BOPKJR3D.js +2 -0
- package/dist/cdn/{K2FKS4AS.js → BZGHEINJ.js} +1 -1
- package/dist/cdn/{2F6NRCC5.js → DVGE5VPK.js} +1 -1
- package/dist/cdn/EDGLEFG3.js +2 -0
- package/dist/cdn/G743AW46.js +2 -0
- package/dist/cdn/{XZGU6TR6.js → GGKOLSCH.js} +1 -1
- package/dist/cdn/H7KG55LR.js +2 -0
- package/dist/cdn/{KZPPV365.js → JMYDF3AT.js} +1 -1
- package/dist/cdn/L4DWZT4V.js +2 -0
- package/dist/cdn/N2RLGXGJ.js +2 -0
- package/dist/cdn/P2JBFLSB.js +2 -0
- package/dist/cdn/RCQKTBVC.js +2 -0
- package/dist/cdn/{O6CGTOAO.js → S7JDLOX2.js} +1 -1
- package/dist/cdn/assets/selection-list/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/video-player/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/esri-main.js +1 -1
- package/dist/chunks/slots.js +1 -1
- package/dist/components/arcgis-aggregated-features/customElement.js +7 -7
- package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +5 -6
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +11 -1
- package/dist/components/arcgis-catalog-layer-list-next/types.d.ts +2 -2
- package/dist/components/arcgis-feature/customElement.js +27 -27
- package/dist/components/arcgis-feature-attachments/customElement.js +73 -60
- package/dist/components/arcgis-feature-next/customElement.d.ts +7 -0
- package/dist/components/arcgis-feature-next/customElement.js +12 -12
- package/dist/components/arcgis-feature-relationship/customElement.js +54 -45
- package/dist/components/arcgis-features-next/customElement.d.ts +7 -0
- package/dist/components/arcgis-features-next/customElement.js +16 -16
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +25 -9
- package/dist/components/arcgis-popup/customElement.d.ts +7 -0
- package/dist/components/arcgis-popup/customElement.js +15 -15
- package/dist/components/arcgis-scene/customElement.d.ts +2 -2
- package/dist/components/arcgis-selection-list/customElement.d.ts +421 -0
- package/dist/components/arcgis-selection-list/customElement.js +279 -0
- package/dist/components/arcgis-selection-list/index.d.ts +1 -0
- package/dist/components/arcgis-selection-list/index.js +16 -0
- package/dist/components/arcgis-selection-list/types.d.ts +85 -0
- package/dist/components/arcgis-utility-network-elements-result-item/customElement.js +1 -1
- package/dist/components/arcgis-video-player/customElement.d.ts +3 -0
- package/dist/components/arcgis-video-player/customElement.js +1 -1
- package/dist/components/arcgis-video-player-slider/customElement.js +9 -9
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/loader.js +8 -7
- package/dist/types/lumina.d.ts +10 -3
- package/dist/types/preact.d.ts +11 -3
- package/dist/types/react.d.ts +12 -3
- package/dist/types/stencil.d.ts +10 -3
- package/package.json +6 -6
- package/dist/cdn/2GDWXNYN.js +0 -2
- package/dist/cdn/A6Z7H75I.js +0 -2
- package/dist/cdn/CDMVB72W.js +0 -2
- package/dist/cdn/D5TJRWW3.js +0 -2
- package/dist/cdn/FY6IGGPV.js +0 -2
- package/dist/cdn/G7HOUS4O.js +0 -2
- package/dist/cdn/HF3GCBAI.js +0 -2
- package/dist/cdn/LKCX5SXM.js +0 -2
- package/dist/cdn/S3QMZKDY.js +0 -2
- package/dist/cdn/XQH6U57U.js +0 -2
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { c as y } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as w, html as s } from "lit";
|
|
4
|
+
import { keyed as n } from "lit/directives/keyed.js";
|
|
5
|
+
import { ref as x } from "lit/directives/ref.js";
|
|
6
|
+
import { substitute as v, formatNumber as g } from "@arcgis/core/intl.js";
|
|
7
|
+
import { isGroupLayerItem as b, isLayerItem as I, isFeatureItem as C } from "@arcgis/core/widgets/support/SelectionList/selectionListUtils.js";
|
|
8
|
+
import L from "@arcgis/core/widgets/support/SelectionList/SelectionListViewModel.js";
|
|
9
|
+
import { LitElement as M, createEvent as F, nothing as u, safeClassMap as r } from "@arcgis/lumina";
|
|
10
|
+
import { usePropertyChange as S } from "@arcgis/lumina/controllers";
|
|
11
|
+
import { u as T } from "../../chunks/useT9n.js";
|
|
12
|
+
import { m as k } from "../../chunks/useViewModel.js";
|
|
13
|
+
const c = {
|
|
14
|
+
container: "container",
|
|
15
|
+
flowItem: "flow-item",
|
|
16
|
+
layerDropdown: "layer-dropdown",
|
|
17
|
+
listItemFeature: "feature",
|
|
18
|
+
listItemFeatureIcon: "feature-icon",
|
|
19
|
+
listItemIcon: "icon",
|
|
20
|
+
itemCount: "item-count",
|
|
21
|
+
notice: "notice",
|
|
22
|
+
panel: "panel",
|
|
23
|
+
totalCount: "total-count"
|
|
24
|
+
}, A = w`:host{width:100%;display:flex;height:100%;flex:1 1 0;>*{align-items:center;align-self:center;width:100%;height:100%}}.root{display:flex;flex-direction:column}calcite-flow{height:100%;width:100%}.container,.flow-item,.panel{display:flex}.flow-item{overflow:auto}.flow-item[scale=s] .container{gap:var(--calcite-spacing-sm);padding:var(--calcite-spacing-sm) 0}.flow-item[scale=m] .container{gap:var(--calcite-spacing-md);padding:var(--calcite-spacing-md) 0}.flow-item[scale=l] .container{gap:var(--calcite-spacing-lg);padding:var(--calcite-spacing-lg) 0}.container{flex-direction:column;background-color:var(--calcite-color-foreground-1)}.container>*{background-color:var(--calcite-color-foreground-1)}.container>*[scale=s]{padding:0 var(--calcite-spacing-sm) 0 var(--calcite-spacing-sm);font-size:var(--calcite-font-size-sm)}.container>*[scale=m]{padding:0 var(--calcite-spacing-md) 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size-md)}.container>*[scale=l]{padding:0 var(--calcite-spacing-lg) 0 var(--calcite-spacing-lg);font-size:var(--calcite-font-size-lg)}.icon{display:flex;align-items:center;justify-content:center;min-width:var(--calcite-spacing-xxl);height:var(--calcite-spacing-xxl)}.icon span{line-height:0}.feature-icon .icon{margin-inline-start:calc(var(--calcite-spacing-lg) * -1)}.total-count{align-self:center;margin-inline:var(--calcite-spacing-xxs);line-height:initial}.item-count{display:flex;gap:.5em;align-items:center}`, D = k(L);
|
|
25
|
+
class P extends M {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments), this.viewModel = D(this), this.messages = T(), this.#i = !1, this.#t = /* @__PURE__ */ new WeakSet(), this.#e = null, this.autoDestroyDisabled = !1, this.icon = "selection", this.view = this.viewModel.view, this.displayMode = "group", this.filterText = this.viewModel.filterText, this.hideFilter = !1, this.hideFilterNotice = !1, this.hideHeader = !1, this.hideItemCloseActions = !1, this.hideItemCount = !1, this.hideItemIcons = !1, this.hideItemMenus = !1, this.hideLayerFilter = !1, this.hideMenu = !1, this.hideTotalCount = !1, this.hideZoomToButton = !1, this.highlightOnHoverDisabled = !1, this.layer = this.viewModel.layer, this.maxVisibleFeatureCountPerLayer = this.viewModel.maxVisibleFeatureCountPerLayer, this.menuScale = "m", this.selectionManager = this.viewModel.selectionManager, this.visualScale = "s", this.arcgisPropertyChange = S()("state"), this.arcgisReady = F();
|
|
28
|
+
}
|
|
29
|
+
static {
|
|
30
|
+
this.properties = { hasFilterText: 16, isUpdating: 16, itemWithOpenMenu: 16, autoDestroyDisabled: 5, disabled: 5, icon: 1, label: 1, referenceElement: 1, view: 0, activeLayerItem: 32, afterListItemSelect: 0, allLayerItems: 32, count: 32, displayMode: 1, effectiveSelectionManager: 32, filterText: 1, hideFilter: 5, hideFilterNotice: 5, hideHeader: 5, hideItemCloseActions: 5, hideItemCount: 5, hideItemIcons: 5, hideItemMenus: 5, hideLayerFilter: 5, hideMenu: 5, hideTotalCount: 5, hideZoomToButton: 5, highlightOnHoverDisabled: 5, listItemActionConfigurations: 0, listItemUnavailableFunction: 0, layer: 0, layerItems: 32, maxVisibleFeatureCountExceeded: 32, maxVisibleFeatureCountPerLayer: 9, menuScale: 1, selectionManager: 0, state: 32, visibleFeatureCount: 32, visibleFeatureItems: 32, visibleLayerCount: 32, visualScale: 1 };
|
|
31
|
+
}
|
|
32
|
+
static {
|
|
33
|
+
this.styles = A;
|
|
34
|
+
}
|
|
35
|
+
#i;
|
|
36
|
+
#t;
|
|
37
|
+
#e;
|
|
38
|
+
get hasFilterText() {
|
|
39
|
+
const { filterText: e } = this;
|
|
40
|
+
return e != null && e !== "";
|
|
41
|
+
}
|
|
42
|
+
get isUpdating() {
|
|
43
|
+
return this.viewModel.isUpdating;
|
|
44
|
+
}
|
|
45
|
+
get disabled() {
|
|
46
|
+
return this.#i || this.state === "disabled";
|
|
47
|
+
}
|
|
48
|
+
set disabled(e) {
|
|
49
|
+
this.#i = e;
|
|
50
|
+
}
|
|
51
|
+
get activeLayerItem() {
|
|
52
|
+
return this.viewModel.activeLayerItem;
|
|
53
|
+
}
|
|
54
|
+
get allLayerItems() {
|
|
55
|
+
return this.viewModel.allLayerItems;
|
|
56
|
+
}
|
|
57
|
+
get count() {
|
|
58
|
+
return this.viewModel.effectiveCount;
|
|
59
|
+
}
|
|
60
|
+
get effectiveSelectionManager() {
|
|
61
|
+
return this.viewModel.effectiveSelectionManager;
|
|
62
|
+
}
|
|
63
|
+
get layerItems() {
|
|
64
|
+
return this.viewModel.layerItems;
|
|
65
|
+
}
|
|
66
|
+
get maxVisibleFeatureCountExceeded() {
|
|
67
|
+
return this.viewModel.maxVisibleFeatureCountExceeded;
|
|
68
|
+
}
|
|
69
|
+
get state() {
|
|
70
|
+
return this.viewModel.state;
|
|
71
|
+
}
|
|
72
|
+
get visibleFeatureCount() {
|
|
73
|
+
return this.viewModel.visibleFeatureCount;
|
|
74
|
+
}
|
|
75
|
+
get visibleFeatureItems() {
|
|
76
|
+
return this.viewModel.visibleFeatureItems;
|
|
77
|
+
}
|
|
78
|
+
get visibleLayerCount() {
|
|
79
|
+
return this.viewModel.visibleLayerCount;
|
|
80
|
+
}
|
|
81
|
+
async clear() {
|
|
82
|
+
this.viewModel.clear();
|
|
83
|
+
}
|
|
84
|
+
async collapseAll() {
|
|
85
|
+
this.viewModel.collapseAll();
|
|
86
|
+
}
|
|
87
|
+
async deselectItem(e) {
|
|
88
|
+
this.viewModel.deselectItem(e);
|
|
89
|
+
}
|
|
90
|
+
async destroy() {
|
|
91
|
+
this.viewModel?.destroy();
|
|
92
|
+
}
|
|
93
|
+
async expandAll() {
|
|
94
|
+
this.viewModel.expandAll();
|
|
95
|
+
}
|
|
96
|
+
async findLayerItem(e) {
|
|
97
|
+
return this.viewModel.findLayerItem(e);
|
|
98
|
+
}
|
|
99
|
+
async findParentItem(e) {
|
|
100
|
+
return this.viewModel.findParentItem(e);
|
|
101
|
+
}
|
|
102
|
+
async goToItem(e) {
|
|
103
|
+
this.viewModel.goToItem(e);
|
|
104
|
+
}
|
|
105
|
+
async removeFromSelection(e) {
|
|
106
|
+
this.viewModel.removeFromSelection(e);
|
|
107
|
+
}
|
|
108
|
+
async replace(e) {
|
|
109
|
+
this.viewModel.replace(e);
|
|
110
|
+
}
|
|
111
|
+
async selectItem(e) {
|
|
112
|
+
this.viewModel.selectSingleItem(e);
|
|
113
|
+
}
|
|
114
|
+
connectedCallback() {
|
|
115
|
+
super.connectedCallback(), this.#e = new IntersectionObserver((e, t) => {
|
|
116
|
+
const { messages: a } = this;
|
|
117
|
+
e.forEach((i) => {
|
|
118
|
+
if (!i.isIntersecting)
|
|
119
|
+
return;
|
|
120
|
+
const l = i.target;
|
|
121
|
+
if (this.#t.has(l)) {
|
|
122
|
+
t.unobserve(l);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const d = l.getAttribute("data-thumbnail-key"), o = d ? this._getFeatureItemByThumbnailKey(d) : void 0;
|
|
126
|
+
if (!o)
|
|
127
|
+
return;
|
|
128
|
+
this.#t.add(l);
|
|
129
|
+
const m = o.title && a.previewTemplateAriaLabel ? v(a.previewTemplateAriaLabel, { label: o.title }) : a.preview;
|
|
130
|
+
if (o.thumbnail) {
|
|
131
|
+
l.appendChild(o.thumbnail);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
o.fetchThumbnail({ ariaLabel: m }).then((h) => h && l.appendChild(h)).catch(() => this.#t.delete(l));
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
disconnectedCallback() {
|
|
139
|
+
super.disconnectedCallback(), this.#e?.disconnect();
|
|
140
|
+
}
|
|
141
|
+
_closeItemMenu(e) {
|
|
142
|
+
(!e || e === this.itemWithOpenMenu) && (this.itemWithOpenMenu = void 0);
|
|
143
|
+
}
|
|
144
|
+
_getFeatureItemByThumbnailKey(e) {
|
|
145
|
+
return this.viewModel.visibleFeatureItems.find((t) => t.thumbnailKey === e);
|
|
146
|
+
}
|
|
147
|
+
_isItemUnavailable(e) {
|
|
148
|
+
return !e.layerIsVisible || this.listItemUnavailableFunction?.({ item: e }) || !1;
|
|
149
|
+
}
|
|
150
|
+
_makeObserverRef() {
|
|
151
|
+
let e = null;
|
|
152
|
+
return (t) => {
|
|
153
|
+
t ? (e = t, this.#e?.observe(t)) : e && (this.#e?.unobserve(e), e = null);
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
_afterListItemSelect(e, t) {
|
|
157
|
+
t.stopPropagation(), this._closeItemMenu(), this.afterListItemSelect?.({ item: e });
|
|
158
|
+
}
|
|
159
|
+
#o() {
|
|
160
|
+
if (this.hideTotalCount || this.hideHeader)
|
|
161
|
+
return;
|
|
162
|
+
const { count: e, messages: t } = this, a = g(e), i = t.selectionCount ? v(t.selectionCount, { count: a }) : void 0;
|
|
163
|
+
return s`<calcite-chip appearance=outline class=${r(c.totalCount)} .closable=${e > 0} .closed=${e === 0} .disabled=${this.disabled} .icon=${this.maxVisibleFeatureCountExceeded ? "exclamation-mark-triangle" : void 0} .label=${a} .scale=${this.visualScale} slot=header-actions-end title=${i ?? u} @calciteChipClose=${this.clear}>${a}</calcite-chip>`;
|
|
164
|
+
}
|
|
165
|
+
#c() {
|
|
166
|
+
if (this.hideHeader || this.hideMenu)
|
|
167
|
+
return;
|
|
168
|
+
const { menuScale: e, messages: t } = this, a = this.disabled || this.count === 0;
|
|
169
|
+
return [
|
|
170
|
+
s`<calcite-action .disabled=${a} icon=reset .scale=${e} slot=header-menu-actions .text=${t.clear ?? ""} text-enabled @click=${this.clear}></calcite-action>`,
|
|
171
|
+
s`<calcite-action .disabled=${a} icon=folders .scale=${e} slot=header-menu-actions .text=${t.collapseAll ?? ""} text-enabled @click=${this.collapseAll}></calcite-action>`
|
|
172
|
+
];
|
|
173
|
+
}
|
|
174
|
+
#r() {
|
|
175
|
+
const { layerItems: e, messages: t } = this;
|
|
176
|
+
if (this.count === 0 || e.length < 2 || this.hideLayerFilter)
|
|
177
|
+
return;
|
|
178
|
+
const a = t.allLayersCount ? v(t.allLayersCount, { count: e.length }) : "";
|
|
179
|
+
return s`<calcite-combobox class=${r(c.layerDropdown)} .disabled=${this.disabled} .label=${t.filterByLayer ?? ""} overlay-positioning=fixed .placeholder=${t.filterByLayer} .scale=${this.visualScale} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: i }) => {
|
|
180
|
+
this.filterText = void 0;
|
|
181
|
+
const l = i.selectedItems[0]?.value ?? void 0;
|
|
182
|
+
this.layer = l === "all-layers" ? void 0 : l;
|
|
183
|
+
}}>${n("all-layers", s`<calcite-combobox-item .heading=${a} icon=layers .selected=${this.layer == null} value=all-layers></calcite-combobox-item>`)}${this.layerItems.map((i) => this.#h(i))}</calcite-combobox>`;
|
|
184
|
+
}
|
|
185
|
+
#d() {
|
|
186
|
+
if (!(this.hideFilter || this.count === 0))
|
|
187
|
+
return s`<calcite-input clearable .disabled=${this.disabled} icon=search .placeholder=${this.messages.filter} .scale=${this.visualScale} .value=${this.filterText} @calciteInputInput=${({ target: { value: e } }) => {
|
|
188
|
+
this.filterText = e;
|
|
189
|
+
}}></calcite-input>`;
|
|
190
|
+
}
|
|
191
|
+
#h(e) {
|
|
192
|
+
const t = e.title || this.messages?.untitledLayer || "";
|
|
193
|
+
return n(e.key, s`<calcite-combobox-item .heading=${t} .icon=${e.iconName} .selected=${e.layer === this.layer} .value=${e.layer}></calcite-combobox-item>`);
|
|
194
|
+
}
|
|
195
|
+
#u() {
|
|
196
|
+
const { messages: e } = this;
|
|
197
|
+
if (this.visibleFeatureCount !== 0)
|
|
198
|
+
return s`<calcite-list .disabled=${this.disabled} display-mode=nested interaction-mode=interactive .label=${e.componentLabel ?? ""} .loading=${this.isUpdating} .scale=${this.visualScale} selection-mode=none>${this.#s(this.allLayerItems)}</calcite-list>`;
|
|
199
|
+
}
|
|
200
|
+
#s(e) {
|
|
201
|
+
return this.activeLayerItem ? this.#l(this.activeLayerItem) : e.map((t) => b(t) ? this.#v(t) : I(t) ? this.#l(t) : null).filter((t) => t != null);
|
|
202
|
+
}
|
|
203
|
+
#m() {
|
|
204
|
+
if (!(this.disabled || this.visibleFeatureCount > 0 || this.hideFilter || this.hideFilterNotice))
|
|
205
|
+
return s`<calcite-notice class=${r(c.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale} width=full><div slot=message>${this.messages.noMatchingFeatures}</div></calcite-notice>`;
|
|
206
|
+
}
|
|
207
|
+
#p(e) {
|
|
208
|
+
if (this.hideItemCount)
|
|
209
|
+
return;
|
|
210
|
+
const { messages: t } = this, a = g(e.total), i = g(e.visibleTotal), l = t.selectionCount ? v(t.selectionCount, { count: a }) : void 0;
|
|
211
|
+
return !this.hasFilterText && e.maxVisibleFeatureCountExceeded ? s`<span class=${r(c.itemCount)} slot=content-end title=${l ?? u}><calcite-icon icon=exclamation-mark-triangle scale=s title=${t.tooManyFeatures ?? u}></calcite-icon>${`${g(this.maxVisibleFeatureCountPerLayer)}+`}</span>` : s`<span class=${r(c.itemCount)} slot=content-end title=${l ?? u}>${i}</span>`;
|
|
212
|
+
}
|
|
213
|
+
#a(e) {
|
|
214
|
+
if (this.hideItemMenus)
|
|
215
|
+
return;
|
|
216
|
+
const { messages: t } = this, a = this.itemWithOpenMenu === e, i = C(e), l = I(e), d = b(e), o = i ? t.deselectFeature : l ? t.deselectLayer : t.deselectGroup;
|
|
217
|
+
return [
|
|
218
|
+
n("dropdown", s`<calcite-dropdown .open=${a} overlay-positioning=fixed placement=bottom-end .scale=${this.menuScale} slot=actions-end width=m @calciteDropdownClose=${() => this._closeItemMenu(e)} @calciteDropdownOpen=${() => {
|
|
219
|
+
this.itemWithOpenMenu = e;
|
|
220
|
+
}}>${n("action", s`<calcite-action icon=ellipsis .scale=${this.visualScale} slot=trigger .text=${t.menu ?? ""}></calcite-action>`)}${// Only render menu-items for open menu(s) to reduce
|
|
221
|
+
// the total number of list item elements in the DOM at any time.
|
|
222
|
+
a ? n("dropdown-group", s`<calcite-dropdown-group selection-mode=none>${this.hideZoomToButton ? void 0 : n("zoom-to", s`<calcite-dropdown-item icon-start=layer-zoom-to @calciteDropdownItemSelect=${() => this.goToItem(e)}>${t.zoomTo}</calcite-dropdown-item>`)}${n("select-single", s`<calcite-dropdown-item icon-start=selection-filter @calciteDropdownItemSelect=${() => this.selectItem(e)}>${i ? t.onlySelectFeature : t.onlySelectThis}</calcite-dropdown-item>`)}${n("clear-selection", s`<calcite-dropdown-item icon-start=selection-x @calciteDropdownItemSelect=${() => this.deselectItem(e)}>${o}</calcite-dropdown-item>`)}${this.listItemActionConfigurations?.map((m) => {
|
|
223
|
+
const { disabled: h, hidden: f, label: $, type: p } = m;
|
|
224
|
+
if (!(typeof f == "function" ? f({ item: e }) : !!f) && (!p || p === "feature" && i || p === "layer" && l || p === "group" && d))
|
|
225
|
+
return n(`custom-action-${$}`, s`<calcite-dropdown-item .disabled=${typeof h == "function" ? h({ item: e }) : !!h} .iconStart=${m.icon ?? void 0} @calciteDropdownItemSelect=${() => m.callback({ item: e })}>${$}</calcite-dropdown-item>`);
|
|
226
|
+
})}</calcite-dropdown-group>`) : void 0}</calcite-dropdown>`)
|
|
227
|
+
];
|
|
228
|
+
}
|
|
229
|
+
#v(e) {
|
|
230
|
+
const t = e.title || this.messages.untitledLayer;
|
|
231
|
+
if (e.visibleTotal === 0)
|
|
232
|
+
return;
|
|
233
|
+
const { displayMode: a } = this;
|
|
234
|
+
return a === "layer" || a === "feature" ? this.#s(e.items) : n(e.key, s`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons ? void 0 : e.iconName} .label=${t} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${(i) => {
|
|
235
|
+
i.stopPropagation(), e.expanded = !1;
|
|
236
|
+
}} @calciteListItemClose=${(i) => {
|
|
237
|
+
i.stopPropagation(), this.deselectItem(e);
|
|
238
|
+
}} @calciteListItemExpand=${(i) => {
|
|
239
|
+
i.stopPropagation(), e.expanded = !0;
|
|
240
|
+
}} @calciteListItemSelect=${(i) => this._afterListItemSelect(e, i)}>${this.#a(e)}${this.#s(e.items)}</calcite-list-item>`);
|
|
241
|
+
}
|
|
242
|
+
#l(e) {
|
|
243
|
+
if (e.visibleTotal === 0 || !e.visible)
|
|
244
|
+
return;
|
|
245
|
+
if (this.displayMode === "feature")
|
|
246
|
+
return this.#n(e.featureItems);
|
|
247
|
+
const { messages: t } = this, a = e.title || t.untitledLayer;
|
|
248
|
+
return n(e.key, s`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons ? void 0 : e.iconName} .label=${a} title=${(e.layerIsVisible ? void 0 : t.layerIsNotVisible) ?? u} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${(i) => {
|
|
249
|
+
i.stopPropagation(), e.expanded = !1;
|
|
250
|
+
}} @calciteListItemClose=${(i) => {
|
|
251
|
+
i.stopPropagation(), this.deselectItem(e);
|
|
252
|
+
}} @calciteListItemExpand=${(i) => {
|
|
253
|
+
i.stopPropagation(), e.expanded = !0;
|
|
254
|
+
}} @calciteListItemSelect=${(i) => this._afterListItemSelect(e, i)}>${this.#p(e)}${this.#a(e)}${this.#n(e.featureItems)}${e.maxVisibleFeatureCountExceeded ? s`<calcite-notice class=${r(c.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale}><div slot=message>${t.tooManyFeatures}</div></calcite-notice>` : void 0}</calcite-list-item>`);
|
|
255
|
+
}
|
|
256
|
+
#n(e) {
|
|
257
|
+
return e.map((t) => this.#g(t));
|
|
258
|
+
}
|
|
259
|
+
#g(e) {
|
|
260
|
+
if (!e.visible)
|
|
261
|
+
return;
|
|
262
|
+
const { highlightOnHoverDisabled: t, messages: a, viewModel: i } = this, l = e.title || a.untitledFeature, d = !this.hideItemIcons && this.displayMode !== "feature";
|
|
263
|
+
return n(e.key, s`<calcite-list-item class=${r(d ? c.listItemFeatureIcon : c.listItemFeature)} .closable=${!this.hideItemCloseActions} .label=${l} .unavailable=${this._isItemUnavailable(e)} .value=${l} @blur=${t ? void 0 : () => i.removeTemporaryHighlight()} @calciteListItemClose=${(o) => {
|
|
264
|
+
o.stopPropagation(), this.deselectItem(e);
|
|
265
|
+
}} @calciteListItemSelect=${(o) => this._afterListItemSelect(e, o)} @focus=${t ? void 0 : () => i.addTemporaryHighlight(e)} @pointerenter=${t ? void 0 : () => i.addTemporaryHighlight(e)} @pointerleave=${t ? void 0 : () => i.removeTemporaryHighlight()}>${this.#f(e)}${this.#a(e)}</calcite-list-item>`);
|
|
266
|
+
}
|
|
267
|
+
#f(e) {
|
|
268
|
+
if (!this.hideItemIcons)
|
|
269
|
+
return n("thumbnail-container", s`<div class=${r(c.listItemIcon)} slot=content-start>${n(e.thumbnailKey, s`<span data-thumbnail-key=${e.thumbnailKey ?? u} ${x(this._makeObserverRef())}></span>`)}</div>`);
|
|
270
|
+
}
|
|
271
|
+
render() {
|
|
272
|
+
const e = this.hideHeader ? void 0 : this.el.title || this.messages.selection;
|
|
273
|
+
return s`<div><calcite-flow><calcite-flow-item class=${r(c.flowItem)} .heading=${e} .loading=${this.state === "loading"} overlay-positioning=fixed .scale=${this.visualScale} selected><calcite-panel class=${r(c.panel)} .disabled=${this.disabled} overlay-positioning=fixed .scale=${this.visualScale}><div class=${r(c.container)}>${this.#r()}${this.#d()}${this.#u()}${this.#m()}</div></calcite-panel>${this.#o()}${this.#c()}</calcite-flow-item></calcite-flow></div>`;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
y("arcgis-selection-list", P);
|
|
277
|
+
export {
|
|
278
|
+
P as ArcgisSelectionList
|
|
279
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "@esri/calcite-components/components/calcite-chip";
|
|
2
|
+
import "@esri/calcite-components/components/calcite-action";
|
|
3
|
+
import "@esri/calcite-components/components/calcite-combobox";
|
|
4
|
+
import "@esri/calcite-components/components/calcite-combobox-item";
|
|
5
|
+
import "@esri/calcite-components/components/calcite-input";
|
|
6
|
+
import "@esri/calcite-components/components/calcite-list";
|
|
7
|
+
import "@esri/calcite-components/components/calcite-notice";
|
|
8
|
+
import "@esri/calcite-components/components/calcite-icon";
|
|
9
|
+
import "@esri/calcite-components/components/calcite-dropdown";
|
|
10
|
+
import "@esri/calcite-components/components/calcite-dropdown-group";
|
|
11
|
+
import "@esri/calcite-components/components/calcite-dropdown-item";
|
|
12
|
+
import "@esri/calcite-components/components/calcite-list-item";
|
|
13
|
+
import "@esri/calcite-components/components/calcite-flow";
|
|
14
|
+
import "@esri/calcite-components/components/calcite-flow-item";
|
|
15
|
+
import "@esri/calcite-components/components/calcite-panel";
|
|
16
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { ListItem } from "@arcgis/core/widgets/support/SelectionList/types.js";
|
|
2
|
+
import type { Icon } from "@esri/calcite-components/components/calcite-icon";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A callback function that is called to determine if a menu action should be unavailable.
|
|
6
|
+
*
|
|
7
|
+
* @param params
|
|
8
|
+
* @since 5.2
|
|
9
|
+
*/
|
|
10
|
+
export type ListItemUnavailableFunction = (params: { item: ListItem; }) => boolean;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Configuration for list item menu actions.
|
|
14
|
+
*
|
|
15
|
+
* @since 5.2
|
|
16
|
+
*/
|
|
17
|
+
export interface ListItemActionConfiguration {
|
|
18
|
+
/**
|
|
19
|
+
* A label for the menu action. This will be displayed in the list item menu.
|
|
20
|
+
*
|
|
21
|
+
* @since 5.2
|
|
22
|
+
*/
|
|
23
|
+
label: string;
|
|
24
|
+
/** A callback function that is called when the menu action is selected. */
|
|
25
|
+
callback: ListItemActionCallbackFunction;
|
|
26
|
+
/**
|
|
27
|
+
* An optional callback function that is called to determine if the menu action should be disabled.
|
|
28
|
+
* If this function returns true, the menu action will be disabled. This value can also be a boolean.
|
|
29
|
+
*
|
|
30
|
+
* @since 5.2
|
|
31
|
+
*/
|
|
32
|
+
disabled?: ListItemActionDisabledFunction | boolean;
|
|
33
|
+
/**
|
|
34
|
+
* An optional callback function that is called to determine if the menu action should be hidden.
|
|
35
|
+
* If this function returns true, the menu action will be hidden. This value can also be a boolean.
|
|
36
|
+
*
|
|
37
|
+
* @since 5.2
|
|
38
|
+
*/
|
|
39
|
+
hidden?: ListItemActionHiddenFunction | boolean;
|
|
40
|
+
/**
|
|
41
|
+
* An optional property specifying an icon to display for the menu action.
|
|
42
|
+
*
|
|
43
|
+
* @since 5.2
|
|
44
|
+
*/
|
|
45
|
+
icon?: Icon["icon"];
|
|
46
|
+
/**
|
|
47
|
+
* The type of the list item that the menu action configuration applies to.
|
|
48
|
+
* If this property is not specified, the menu action will be available for all list item types.
|
|
49
|
+
*
|
|
50
|
+
* @since 5.2
|
|
51
|
+
*/
|
|
52
|
+
type?: null | undefined | "feature" | "group" | "layer";
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* A callback function that is called when a list item is selected.
|
|
57
|
+
*
|
|
58
|
+
* @param params
|
|
59
|
+
* @since 5.2
|
|
60
|
+
*/
|
|
61
|
+
export type ListItemSelectCallback = (params: { item: ListItem; }) => void;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* A callback function that is called when a menu action is selected.
|
|
65
|
+
*
|
|
66
|
+
* @param params
|
|
67
|
+
* @since 5.2
|
|
68
|
+
*/
|
|
69
|
+
export type ListItemActionCallbackFunction = (params: { item: ListItem; }) => void;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* A callback function that is called to determine if a menu action should be disabled.
|
|
73
|
+
*
|
|
74
|
+
* @param params
|
|
75
|
+
* @since 5.2
|
|
76
|
+
*/
|
|
77
|
+
export type ListItemActionDisabledFunction = (params: { item: ListItem; }) => boolean;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* A callback function that is called to determine if a menu action should be hidden.
|
|
81
|
+
*
|
|
82
|
+
* @param params
|
|
83
|
+
* @since 5.2
|
|
84
|
+
*/
|
|
85
|
+
export type ListItemActionHiddenFunction = (params: { item: ListItem; }) => boolean;
|
|
@@ -35,7 +35,7 @@ class A extends R {
|
|
|
35
35
|
#r;
|
|
36
36
|
#a;
|
|
37
37
|
get isFeaturesListShown() {
|
|
38
|
-
return (this._isFeaturesSelected || this.#o) && !this.hideFeatureResults && !this._featuresComponentElement?.manager
|
|
38
|
+
return (this._isFeaturesSelected || this.#o) && !this.hideFeatureResults && !this._featuresComponentElement?.manager?.destroyed;
|
|
39
39
|
}
|
|
40
40
|
get numResults() {
|
|
41
41
|
return this.features.length + this.#e.length;
|
|
@@ -150,6 +150,7 @@ export abstract class ArcgisVideoPlayer extends LitElement {
|
|
|
150
150
|
pause?: string | undefined;
|
|
151
151
|
platformInfo?: string | undefined;
|
|
152
152
|
play?: string | undefined;
|
|
153
|
+
playbackProgress?: string | undefined;
|
|
153
154
|
playbackSpeed?: string | undefined;
|
|
154
155
|
quality?: string | undefined;
|
|
155
156
|
reverse?: string | undefined;
|
|
@@ -188,6 +189,7 @@ export abstract class ArcgisVideoPlayer extends LitElement {
|
|
|
188
189
|
pause: string;
|
|
189
190
|
platformInfo: string;
|
|
190
191
|
play: string;
|
|
192
|
+
playbackProgress: string;
|
|
191
193
|
playbackSpeed: string;
|
|
192
194
|
quality: string;
|
|
193
195
|
reverse: string;
|
|
@@ -224,6 +226,7 @@ export abstract class ArcgisVideoPlayer extends LitElement {
|
|
|
224
226
|
pause: string;
|
|
225
227
|
platformInfo: string;
|
|
226
228
|
play: string;
|
|
229
|
+
playbackProgress: string;
|
|
227
230
|
playbackSpeed: string;
|
|
228
231
|
quality: string;
|
|
229
232
|
reverse: string;
|
|
@@ -64,7 +64,7 @@ class T extends g {
|
|
|
64
64
|
}} ${y(this._videoViewRef)}></arcgis-video>`;
|
|
65
65
|
}
|
|
66
66
|
_renderSlider() {
|
|
67
|
-
return this._isLive ? null : e`<arcgis-video-player-slider .buffered=${this._bufferedValue} .value=${this._currentValue * 100} .viewModel=${this.viewModel}></arcgis-video-player-slider>`;
|
|
67
|
+
return this._isLive ? null : e`<arcgis-video-player-slider .buffered=${this._bufferedValue} .messages=${this.messages} .value=${this._currentValue * 100} .viewModel=${this.viewModel}></arcgis-video-player-slider>`;
|
|
68
68
|
}
|
|
69
69
|
_renderActionBar() {
|
|
70
70
|
return e`<arcgis-video-player-action-bar .currentTime=${this._currentTime} .duration=${this._duration} .messages=${this.messages} .toggleMetadata=${() => this._metadataVisible = !this._metadataVisible} .viewModel=${this.viewModel} .inline=${this.inline}></arcgis-video-player-action-bar>`;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as i } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
const l =
|
|
6
|
-
class
|
|
3
|
+
import { css as o, html as t } from "lit";
|
|
4
|
+
import { LitElement as a } from "@arcgis/lumina";
|
|
5
|
+
const l = o`:host{min-width:100px;flex:1 1 auto;display:flex;align-items:center;justify-content:center}.slider-progress-container{position:relative;z-index:1;flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center}.progress{--arcgis-internal-video-player-progress-width: 2px;appearance:none;position:absolute;top:calc(50% - var(--arcgis-internal-video-player-progress-width) / 2);left:var(--calcite-spacing-xs);border:none;background:var(--calcite-color-border-1);cursor:pointer;width:calc(100% - var(--calcite-spacing-xs) * 2);height:var(--arcgis-internal-video-player-progress-width)}.progress::-webkit-progress-bar{background-color:var(--calcite-color-border-3)}.progress::-webkit-progress-value{background-color:var(--calcite-color-border-input)}.progress::-moz-progress-bar{background-color:var(--calcite-color-border-3)}.slider{--calcite-slider-track-color: transparent;width:100%}`;
|
|
6
|
+
class c extends a {
|
|
7
7
|
static {
|
|
8
|
-
this.properties = { viewModel: 0, buffered: 9, value: 9 };
|
|
8
|
+
this.properties = { viewModel: 0, buffered: 9, messages: 0, value: 9 };
|
|
9
9
|
}
|
|
10
10
|
static {
|
|
11
11
|
this.styles = l;
|
|
@@ -17,11 +17,11 @@ class a extends t {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
const {
|
|
21
|
-
return
|
|
20
|
+
const { buffered: e, messages: r, value: s } = this;
|
|
21
|
+
return t`<div class="slider-progress-container" dir=ltr><progress class="progress" max=1 .value=${`${e}`}></progress><div class="slider"><calcite-slider .label=${r.playbackProgress} max=100 min=0 .value=${s} @calciteSliderInput=${this._onSliderInput}></calcite-slider></div></div>`;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
i("arcgis-video-player-slider",
|
|
24
|
+
i("arcgis-video-player-slider", c);
|
|
25
25
|
export {
|
|
26
|
-
|
|
26
|
+
c as VideoPlayerSlider
|
|
27
27
|
};
|