@arcgis/map-components 5.1.0-next.123 → 5.1.0-next.125
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/{RH4PIMHF.js → APG5BPBC.js} +1 -1
- package/dist/cdn/K4QY44EL.js +2 -0
- package/dist/cdn/{XYUG5M3W.js → T6JFYEP2.js} +1 -1
- package/dist/cdn/V4FMJCXV.js +2 -0
- package/dist/cdn/YJT2XNV5.js +2 -0
- package/dist/cdn/ZJINX5IW.js +2 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-daylight/customElement.d.ts +1 -1
- package/dist/components/arcgis-daylight/customElement.js +34 -27
- package/dist/components/arcgis-direct-line-measurement-3d/customElement.js +20 -20
- package/dist/components/arcgis-feature-templates/customElement.d.ts +10 -8
- package/dist/components/arcgis-feature-templates/customElement.js +198 -247
- package/dist/components/arcgis-features/customElement.d.ts +4 -17
- 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-link-chart/customElement.d.ts +24 -0
- package/dist/components/arcgis-map/customElement.d.ts +24 -0
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +3 -3
- package/dist/components/arcgis-paste/PasteViewModel.d.ts +2 -2
- package/dist/components/arcgis-popup/customElement.d.ts +13 -20
- package/dist/components/arcgis-scene/customElement.d.ts +24 -0
- package/dist/components/arcgis-slider-binary-color-size-legacy/customElement.d.ts +10 -10
- package/dist/components/arcgis-slider-classed-color-legacy/customElement.d.ts +6 -6
- package/dist/components/arcgis-slider-classed-size-legacy/customElement.d.ts +6 -6
- package/dist/components/arcgis-slider-color-legacy/customElement.d.ts +10 -10
- package/dist/components/arcgis-slider-color-size-legacy/customElement.d.ts +10 -10
- package/dist/components/arcgis-slider-opacity-legacy/customElement.d.ts +10 -10
- 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-slider-size-legacy/customElement.d.ts +10 -10
- package/dist/components/arcgis-template-image/customElement.d.ts +2 -2
- package/dist/components/arcgis-version-management/customElement.js +21 -20
- package/dist/components/arcgis-version-management/index.js +1 -0
- 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/package.json +5 -5
- package/dist/cdn/4IQZ7YKM.js +0 -2
- package/dist/cdn/DZMN2UH5.js +0 -2
- package/dist/cdn/OCMGQ4AF.js +0 -2
- package/dist/cdn/WFL2WTJK.js +0 -2
- package/dist/components/arcgis-feature-templates/TemplateItem.d.ts +0 -33
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/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
|
};
|
|
@@ -112,10 +112,10 @@ export abstract class ArcgisSliderSizeLegacy extends LitElement {
|
|
|
112
112
|
* numBins: 30,
|
|
113
113
|
* });
|
|
114
114
|
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
115
|
+
* slider.histogramConfig = {
|
|
116
|
+
* bins: histogramResult.bins
|
|
117
|
+
* };
|
|
118
|
+
* ```
|
|
119
119
|
* @see [histogram](https://developers.arcgis.com/javascript/latest/references/core/smartMapping/statistics/histogram/)
|
|
120
120
|
*/
|
|
121
121
|
accessor histogramConfig: HistogramConfig | null | undefined;
|
|
@@ -166,7 +166,7 @@ export abstract class ArcgisSliderSizeLegacy extends LitElement {
|
|
|
166
166
|
* }
|
|
167
167
|
* return value.toFixed(0);
|
|
168
168
|
* };
|
|
169
|
-
*
|
|
169
|
+
* ```
|
|
170
170
|
*/
|
|
171
171
|
accessor inputFormatFunction: LabelFormatFunction | null | undefined;
|
|
172
172
|
/**
|
|
@@ -211,7 +211,7 @@ export abstract class ArcgisSliderSizeLegacy extends LitElement {
|
|
|
211
211
|
* slider.labelFormatFunction = (value: number, type?: SliderFormatType): string => {
|
|
212
212
|
* return (type === "value") ? value.toFixed(0) : value.toString();
|
|
213
213
|
* };
|
|
214
|
-
*
|
|
214
|
+
* ```
|
|
215
215
|
*/
|
|
216
216
|
accessor labelFormatFunction: LabelFormatFunction | null | undefined;
|
|
217
217
|
/**
|
|
@@ -315,12 +315,12 @@ export abstract class ArcgisSliderSizeLegacy extends LitElement {
|
|
|
315
315
|
* min: 10,
|
|
316
316
|
* max: 25
|
|
317
317
|
* };
|
|
318
|
-
*
|
|
318
|
+
* ```
|
|
319
319
|
* @example
|
|
320
320
|
* ```js
|
|
321
321
|
* // disables zooming on the slider
|
|
322
322
|
* slider.zoomOptions = null;
|
|
323
|
-
*
|
|
323
|
+
* ```
|
|
324
324
|
* @example
|
|
325
325
|
* ```js
|
|
326
326
|
* // zooms the slider so thumbs can only be moved to positions above
|
|
@@ -328,7 +328,7 @@ export abstract class ArcgisSliderSizeLegacy extends LitElement {
|
|
|
328
328
|
* slider.zoomOptions = {
|
|
329
329
|
* min: 10
|
|
330
330
|
* };
|
|
331
|
-
*
|
|
331
|
+
* ```
|
|
332
332
|
* @example
|
|
333
333
|
* ```js
|
|
334
334
|
* // zooms the slider so thumbs can only be moved to positions below
|
|
@@ -336,7 +336,7 @@ export abstract class ArcgisSliderSizeLegacy extends LitElement {
|
|
|
336
336
|
* slider.zoomOptions = {
|
|
337
337
|
* max: 25
|
|
338
338
|
* };
|
|
339
|
-
*
|
|
339
|
+
* ```
|
|
340
340
|
*/
|
|
341
341
|
accessor zoomOptions: ZoomOptions | null | undefined;
|
|
342
342
|
/** Permanently destroy the component. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
|
-
import type
|
|
2
|
+
import type TemplateListItem from "@arcgis/core/editing/templates/TemplateListItem.js";
|
|
3
3
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -10,5 +10,5 @@ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
12
12
|
export abstract class ArcgisTemplateImage extends LitElement {
|
|
13
|
-
accessor template:
|
|
13
|
+
accessor template: TemplateListItem | undefined;
|
|
14
14
|
}
|
|
@@ -3,21 +3,22 @@ import { c as S } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { once as L, watch as P } from "@arcgis/core/core/reactiveUtils.js";
|
|
4
4
|
import _ from "@arcgis/core/versionManagement/VersionManager.js";
|
|
5
5
|
import { LitElement as b, createEvent as u } from "@arcgis/lumina";
|
|
6
|
-
import { css as
|
|
6
|
+
import { css as N, render as C, html as v } from "lit";
|
|
7
7
|
import { createRef as F, ref as M } from "lit/directives/ref.js";
|
|
8
8
|
import { u as k } from "../../chunks/useT9n.js";
|
|
9
9
|
import { m as x } from "../../chunks/useViewModel.js";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
import { d as $ } from "../../chunks/component-utils.js";
|
|
11
|
+
import { rethrowError as A } from "@arcgis/toolkit/log";
|
|
12
|
+
const T = N`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;min-height:var(--arcgis-internal-panel-height-md, 420px);height:100%}calcite-notice{margin:var(--calcite-spacing-md)}`, O = x(_), w = "map-components:version-management";
|
|
13
|
+
class U extends b {
|
|
13
14
|
constructor() {
|
|
14
|
-
super(...arguments), this.flowElement = F(), this.messages = k({ blocking: !0 }), this.viewModel =
|
|
15
|
+
super(...arguments), this.flowElement = F(), this.messages = k({ blocking: !0 }), this.viewModel = O(this), this._isInitialVersionInvalid = /* @__PURE__ */ new Map(), this._initialVersionInfos = [], this._showInvalidFeatureServiceNotice = !1, this.allowEditingDisabled = !1, this.autoDestroyDisabled = !1, this.closable = !1, this.pageSize = 5, this.state = this.viewModel.state, this.versioningStates = this.viewModel.versioningStates, this.view = this.viewModel.view, this.arcgisReady = u(), this.arcgisVersioningStateChanged = u();
|
|
15
16
|
}
|
|
16
17
|
static {
|
|
17
18
|
this.properties = { versionList: 16, _showInvalidFeatureServiceNotice: 16, allowEditingDisabled: 5, autoDestroyDisabled: 5, closable: 7, initialVersionInfos: 0, icon: 1, label: 3, messageOverrides: 0, mode: 1, pageSize: 9, referenceElement: 1, state: 32, versioningStates: 0, view: 0 };
|
|
18
19
|
}
|
|
19
20
|
static {
|
|
20
|
-
this.styles =
|
|
21
|
+
this.styles = T;
|
|
21
22
|
}
|
|
22
23
|
get initialVersionInfos() {
|
|
23
24
|
return this._initialVersionInfos;
|
|
@@ -37,7 +38,7 @@ class O extends b {
|
|
|
37
38
|
try {
|
|
38
39
|
this._changeToInitialVersion(e);
|
|
39
40
|
} catch (i) {
|
|
40
|
-
|
|
41
|
+
A(this)(i);
|
|
41
42
|
}
|
|
42
43
|
});
|
|
43
44
|
}), this.manager.onLifecycle(() => [
|
|
@@ -74,7 +75,7 @@ class O extends b {
|
|
|
74
75
|
versionInfo: i
|
|
75
76
|
};
|
|
76
77
|
this.versionPropertiesContainer = document.createElement("div");
|
|
77
|
-
const s =
|
|
78
|
+
const s = C(v`<arcgis-version-management-version-properties .versionPropertiesElementProps=${o} selected show-back-button></arcgis-version-management-version-properties>`, this.versionPropertiesContainer), a = Array.from(s.parentNode.childNodes).find((c) => c.nodeName.toUpperCase() === "ARCGIS-VERSION-MANAGEMENT-VERSION-PROPERTIES");
|
|
78
79
|
return this.listenOn(a, "arcgisFlowItemBack", () => {
|
|
79
80
|
this._removeVersionPropertiesFlowItem(this.flowElement.value);
|
|
80
81
|
}), this.listenOn(a, "calciteFlowItemBack", (c) => {
|
|
@@ -197,37 +198,37 @@ class O extends b {
|
|
|
197
198
|
i.nodeName.toUpperCase() === "ARCGIS-VERSION-MANAGEMENT-VERSION-PROPERTIES" && e.removeChild(i);
|
|
198
199
|
}
|
|
199
200
|
render() {
|
|
200
|
-
const { allowEditingDisabled: e, closable: i, flowElement: { value: r }, initialVersionInfos: t, _isInitialVersionInvalid: n, label: o, messages: s, mode: a, pageSize: c, versionList: m, viewModel:
|
|
201
|
+
const { allowEditingDisabled: e, closable: i, flowElement: { value: r }, initialVersionInfos: t, _isInitialVersionInvalid: n, label: o, messages: s, mode: a, pageSize: c, versionList: m, viewModel: d, viewModel: { loadError: f, state: g } } = this, I = Array.from(d.serviceNameLookup, ([l, h]) => ({ url: l, name: h })), V = g !== "disabled" ? I.map((l) => {
|
|
201
202
|
const h = {
|
|
202
203
|
allowEditing: !e,
|
|
203
204
|
closable: i,
|
|
204
|
-
currentUser:
|
|
205
|
-
currentVersionIdentifier:
|
|
205
|
+
currentUser: d.userLookup.get(l.url),
|
|
206
|
+
currentVersionIdentifier: d.versioningStateLookup.get(l.url).currentVersionInfo.versionIdentifier,
|
|
206
207
|
executionError: void 0,
|
|
207
208
|
flowElement: r,
|
|
208
209
|
heading: o,
|
|
209
210
|
initialVersionInfos: t,
|
|
210
211
|
isInitialVersionInvalid: n,
|
|
211
|
-
isVersionAdministrator:
|
|
212
|
-
isVersioningApiAvailable: (
|
|
212
|
+
isVersionAdministrator: d.versionAdministratorLookup.get(l.url),
|
|
213
|
+
isVersioningApiAvailable: (d.serverVersionLookup.get(l.url) ?? 0) >= 11.2,
|
|
213
214
|
mode: a,
|
|
214
215
|
pageSize: c,
|
|
215
216
|
serviceName: l.name,
|
|
216
|
-
state:
|
|
217
|
+
state: g,
|
|
217
218
|
serviceUrl: l.url,
|
|
218
219
|
strings: s,
|
|
219
|
-
versionInfos:
|
|
220
|
+
versionInfos: d.versioningStateLookup.get(l.url)?.versionInfos ?? []
|
|
220
221
|
};
|
|
221
|
-
return
|
|
222
|
+
return v`<arcgis-version-management-service-item .serviceItemElementProps=${h} @arcgisFlowItemBack=${() => {
|
|
222
223
|
r && (this._removeVersionListFlowItem(r), this.versionList = void 0);
|
|
223
224
|
}} @arcgisFlowItemClose=${() => this._handleFlowItemClose()} @arcgisGetVersions=${async (p) => {
|
|
224
225
|
await this._refreshVersionList(p.detail.serviceUrl);
|
|
225
226
|
}} @arcgisManageVersion=${this._handleManageVersionAction} @arcgisNewVersion=${this._handleNewVersionAction} @arcgisCreateVersionList=${(p) => this.versionList = p.detail}></arcgis-version-management-service-item>`;
|
|
226
|
-
}) : void 0, E =
|
|
227
|
-
return
|
|
227
|
+
}) : void 0, E = g === "disabled" && f != null ? v`<calcite-notice kind=warning open scale=s slot=footer width=full><div slot=message>${this._getLoadError(f)}</div></calcite-notice>` : void 0, y = this._showInvalidFeatureServiceNotice ? v`<calcite-notice closable kind=warning open scale=s slot=content-top width=full icon @calciteNoticeClose=${() => this._showInvalidFeatureServiceNotice = !1}><div slot=title>${s.headers.invalidInitialFeatureService}</div><div slot=message>${s.loadErrors.invalidInitialFeatureService}</div></calcite-notice>` : void 0;
|
|
228
|
+
return v`<div class="root"><calcite-flow custom-item-selectors="arcgis-version-management-version-list, arcgis-version-management-version-properties" ${M(this.flowElement)}><calcite-flow-item .closable=${this.closable} .heading=${$(o) ? s.label : o} @calciteFlowItemClose=${() => this._handleFlowItemClose()} .selected=${!m}>${y}${g === "loading" || g === "executing" ? v`<calcite-loader .label=${`${s.label} - loading`}></calcite-loader>` : v`<calcite-panel>${V}${E}</calcite-panel>`}</calcite-flow-item></calcite-flow></div>`;
|
|
228
229
|
}
|
|
229
230
|
}
|
|
230
|
-
S("arcgis-version-management",
|
|
231
|
+
S("arcgis-version-management", U);
|
|
231
232
|
export {
|
|
232
|
-
|
|
233
|
+
U as ArcgisVersionManagement
|
|
233
234
|
};
|
|
@@ -3,5 +3,6 @@ import "../arcgis-version-management-service-item/index.js";
|
|
|
3
3
|
import "@esri/calcite-components/components/calcite-notice";
|
|
4
4
|
import "@esri/calcite-components/components/calcite-flow";
|
|
5
5
|
import "@esri/calcite-components/components/calcite-flow-item";
|
|
6
|
+
import "@esri/calcite-components/components/calcite-loader";
|
|
6
7
|
import "@esri/calcite-components/components/calcite-panel";
|
|
7
8
|
export * from "./customElement.js";
|