@arcgis/map-components 5.1.0-next.130 → 5.1.0-next.131
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/ISRQNAIX.js +2 -0
- package/dist/cdn/OH4JYR64.js +2 -0
- package/dist/cdn/R6VK6X7V.js +2 -0
- package/dist/cdn/{23QRQ72P.js → RCF3OLAO.js} +1 -1
- package/dist/cdn/RIRUBRN3.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-bookmarks/customElement.js +171 -159
- package/dist/components/arcgis-bookmarks/index.js +2 -2
- package/dist/components/arcgis-daylight/customElement.js +1 -1
- package/dist/components/arcgis-features-next/customElement.d.ts +5 -0
- package/dist/components/arcgis-features-next/customElement.js +3 -3
- package/dist/components/arcgis-layer-list-next/customElement.js +61 -53
- package/dist/components/arcgis-layer-list-next/layer-list-item/customElement.js +71 -72
- package/dist/components/arcgis-version-management-version-properties/customElement.js +14 -14
- 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 +4 -4
- package/dist/cdn/2NCN7SVY.js +0 -2
- package/dist/cdn/5HO3VI5Q.js +0 -2
- package/dist/cdn/IL5K5FGZ.js +0 -2
- package/dist/cdn/RTWRHZK6.js +0 -2
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { html as c } from "lit";
|
|
3
|
-
import { keyed as
|
|
4
|
-
import { isLayerFromCatalog as
|
|
5
|
-
import { safeClassMap as d, safeStyleMap as
|
|
6
|
-
import { classes as
|
|
7
|
-
import { createRef as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { h as xe, j as Z, l as Me, k as Le, n as Ee, o as ke, g as we } from "../../../chunks/layer-list-utils.js";
|
|
3
|
+
import { keyed as Y } from "lit/directives/keyed.js";
|
|
4
|
+
import { isLayerFromCatalog as Ce } from "@arcgis/core/layers/catalog/catalogUtils.js";
|
|
5
|
+
import { safeClassMap as d, safeStyleMap as Se, nothing as r } from "@arcgis/lumina";
|
|
6
|
+
import { classes as F } from "@arcgis/toolkit/dom";
|
|
7
|
+
import { createRef as Z, ref as ee } from "lit/directives/ref.js";
|
|
8
|
+
import { g as Te, a as le } from "../../../chunks/action-utils.js";
|
|
9
|
+
import { h as xe, j as te, l as Me, k as Le, n as Ee, o as ke, g as we } from "../../../chunks/layer-list-utils.js";
|
|
11
10
|
import { s as Pe } from "../../../chunks/component-utils.js";
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
return i ?
|
|
11
|
+
const ne = /* @__PURE__ */ new Map();
|
|
12
|
+
function ce(i) {
|
|
13
|
+
return i ? ne.get(i) ?? !1 : !1;
|
|
15
14
|
}
|
|
16
15
|
function De(i, e) {
|
|
17
|
-
const l = !(i.aria?.pressed ??
|
|
18
|
-
return i.aria = { ...i.aria, pressed: l }, e &&
|
|
16
|
+
const l = !(i.aria?.pressed ?? ce(e));
|
|
17
|
+
return i.aria = { ...i.aria, pressed: l }, e && ne.set(e, l), l;
|
|
19
18
|
}
|
|
20
|
-
function
|
|
19
|
+
function O(i) {
|
|
21
20
|
return i && "visibilityMode" in i ? i.visibilityMode : null;
|
|
22
21
|
}
|
|
23
|
-
function
|
|
22
|
+
function ie(i, e) {
|
|
24
23
|
if (!("visible" in i))
|
|
25
24
|
return;
|
|
26
|
-
|
|
25
|
+
O(e) === "exclusive" && i.visible || (i.visible = !i.visible);
|
|
27
26
|
}
|
|
28
27
|
function Fe(i, e) {
|
|
29
28
|
i.panel.open = !i.panel.open, i.panel.open && e && e();
|
|
@@ -31,77 +30,77 @@ function Fe(i, e) {
|
|
|
31
30
|
function Oe(i, e, l, m) {
|
|
32
31
|
i && l === e.layer?.uid && (Pe(i), m?.(null));
|
|
33
32
|
}
|
|
34
|
-
function
|
|
33
|
+
function Ge(i, e, l) {
|
|
35
34
|
l.type === "toggle" && (l.value = !l.value), i(l, e);
|
|
36
35
|
}
|
|
37
|
-
function
|
|
36
|
+
function Re(i) {
|
|
38
37
|
return i.actionsSections.map((e) => e.filter((l) => l.visible));
|
|
39
38
|
}
|
|
40
|
-
function
|
|
39
|
+
function se(i, e) {
|
|
41
40
|
const { icon: l } = e;
|
|
42
41
|
if (l)
|
|
43
42
|
return null;
|
|
44
43
|
const m = "image" in e ? e.image : void 0;
|
|
45
|
-
return m ? c`<span aria-hidden=true class=${d(
|
|
44
|
+
return m ? c`<span aria-hidden=true class=${d(F(i.itemActionIcon, { [i.itemActionImage]: !!m }))} style=${Se(Te(m))}></span>` : null;
|
|
46
45
|
}
|
|
47
|
-
function
|
|
48
|
-
const { item: m, css: a, handleAction:
|
|
49
|
-
return c`<calcite-action .active=${S === "toggle" ? e.value : !1} data-action-id=${e.id ?? r} .disabled=${I} .icon=${T} .indicator=${
|
|
46
|
+
function ae(i, e, l) {
|
|
47
|
+
const { item: m, css: a, handleAction: f } = i, { active: C, disabled: I, title: b, type: S, indicator: h } = e, T = le(e);
|
|
48
|
+
return c`<calcite-action .active=${S === "toggle" ? e.value : !1} data-action-id=${e.id ?? r} .disabled=${I} .icon=${T} .indicator=${h} .loading=${C} @click=${() => Ge(f, m, e)} scale=s slot=${(l ? void 0 : "actions-end") ?? r} .text=${b ?? ""} .textEnabled=${l} title=${b ?? void 0 ?? r}>${se(a, e)}</calcite-action>`;
|
|
50
49
|
}
|
|
51
|
-
function
|
|
52
|
-
const { item: e, parent: l, hideStatusIndicators: m, css: a, visibilityAppearance:
|
|
53
|
-
let
|
|
54
|
-
m || (
|
|
55
|
-
let
|
|
50
|
+
function Ve(i) {
|
|
51
|
+
const { item: e, parent: l, hideStatusIndicators: m, css: a, visibilityAppearance: f, hideCatalogLayerList: C, dragEnabled: I = !1, rootGroupUid: b, listModeDisabled: S = !1, selectionMode: h, displayMode: T, layerTablesEnabled: x, showErrors: oe, parentTitles: G, selectedItems: re, activeItem: de, handleCatalogOpen: ue, handleTablesOpen: me, selectedDragItemLayerUid: $e, handleSelectedDragItemLayerUidChange: pe, handlePanelOpen: ge, messages: n, setCurrentActiveItem: R, clearActiveItem: V } = i, p = Z(), M = Z(), y = e.title || ("untitledTable" in n ? n.untitledTable : n.untitledLayer ?? "");
|
|
52
|
+
let H = null;
|
|
53
|
+
m || (H = c`<arcgis-layer-list-item-indicator class=${d(a.statusIndicator)} .messages=${n} .item=${e} .parent=${l} slot=content-end></arcgis-layer-list-item-indicator>`);
|
|
54
|
+
let U = null;
|
|
56
55
|
{
|
|
57
|
-
const { layer: t } = e, s = t && "persistenceEnabled" in t && (
|
|
58
|
-
(i.showTemporaryLayerIndicators || i.showTemporaryTableIndicators) && s && (
|
|
56
|
+
const { layer: t } = e, s = t && "persistenceEnabled" in t && (Ce(t) || !t.persistenceEnabled);
|
|
57
|
+
(i.showTemporaryLayerIndicators || i.showTemporaryTableIndicators) && s && (U = c`<calcite-icon class=${d(a.itemTemporaryIcon)} icon=temporary scale=s slot=content-start title=${n.temporary ?? r}></calcite-icon>`);
|
|
59
58
|
}
|
|
60
|
-
let
|
|
61
|
-
if ("visible" in e && "visibleToggle" in a &&
|
|
62
|
-
const t =
|
|
59
|
+
let q = null;
|
|
60
|
+
if ("visible" in e && "visibleToggle" in a && f) {
|
|
61
|
+
const t = O(l);
|
|
63
62
|
if (t !== "inherited") {
|
|
64
63
|
const s = xe({
|
|
65
64
|
visible: e.visible,
|
|
66
65
|
exclusive: t === "exclusive",
|
|
67
|
-
visibilityAppearance:
|
|
68
|
-
}), o =
|
|
69
|
-
|
|
70
|
-
De(
|
|
71
|
-
}} .slot=${o ? "actions-start" : "actions-end"} .text=${
|
|
66
|
+
visibilityAppearance: f
|
|
67
|
+
}), o = f === "checkbox", u = n.layerVisibility, v = e.title ?? e.layer?.title ?? "", g = v ? `${u ?? ""}: ${v}` : u ?? "", P = ce(e.layer?.id);
|
|
68
|
+
q = c`<calcite-action .aria=${{ pressed: P }} class=${d(a.visibleToggle)} .icon=${o ? s : void 0} .label=${g} @click=${(D) => {
|
|
69
|
+
De(D.currentTarget, e.layer?.id), ie(e, l);
|
|
70
|
+
}} .slot=${o ? "actions-start" : "actions-end"} .text=${u ?? ""} title=${u ?? r}>${o ? null : c`<calcite-icon class=${d(F({
|
|
72
71
|
[a.visibleIcon]: t !== "exclusive" && e.visible
|
|
73
72
|
}))} .icon=${s} scale=s></calcite-icon>`}</calcite-action>`;
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
|
-
let
|
|
75
|
+
let j = null;
|
|
77
76
|
{
|
|
78
77
|
const t = e.panel;
|
|
79
|
-
t?.open && !t.disabled && !t.flowEnabled && (
|
|
78
|
+
t?.open && !t.disabled && !t.flowEnabled && (j = c`<div class=${d(a.itemContentBottom)} slot=content-bottom><arcgis-layer-list-item-panel .item=${e} .view=${i.view}></arcgis-layer-list-item-panel></div>`);
|
|
80
79
|
}
|
|
81
|
-
let
|
|
80
|
+
let B = null;
|
|
82
81
|
{
|
|
83
82
|
const t = e.panel;
|
|
84
83
|
if (t?.visible) {
|
|
85
|
-
const { open: s, title: o, disabled:
|
|
86
|
-
|
|
84
|
+
const { open: s, title: o, disabled: u } = t, v = { icon: t.icon, image: t.image, indicator: !1 }, g = le(v);
|
|
85
|
+
B = c`<calcite-action .active=${s} .disabled=${u} .icon=${g} @click=${() => Fe(e, ge)} slot=actions-end .text=${o ?? ""} title=${o ?? void 0 ?? r}>${se(a, t)}</calcite-action>`;
|
|
87
86
|
}
|
|
88
87
|
}
|
|
89
|
-
let
|
|
88
|
+
let N = null;
|
|
90
89
|
{
|
|
91
|
-
const t = e.layer, s = t?.type === "catalog-footprint", o = t?.type === "sublayer" &&
|
|
92
|
-
"itemCatalogIcon" in a && (s || o) && (
|
|
90
|
+
const t = e.layer, s = t?.type === "catalog-footprint", o = t?.type === "sublayer" && te(t, "footprints");
|
|
91
|
+
"itemCatalogIcon" in a && (s || o) && (N = c`<calcite-icon class=${d(a.itemCatalogIcon)} icon=footprint scale=s slot=content-start></calcite-icon>`);
|
|
93
92
|
}
|
|
94
|
-
let
|
|
93
|
+
let _ = null;
|
|
95
94
|
{
|
|
96
|
-
const t = e.layer, s = t?.type === "catalog-dynamic-group", o = t?.type === "sublayer" &&
|
|
97
|
-
"itemCatalogIcon" in a && (s || o) && (
|
|
95
|
+
const t = e.layer, s = t?.type === "catalog-dynamic-group", o = t?.type === "sublayer" && te(t, "layers-in-view");
|
|
96
|
+
"itemCatalogIcon" in a && (s || o) && (_ = c`<calcite-icon class=${d(a.itemCatalogIcon)} icon=catalog-dataset scale=s slot=content-start></calcite-icon>`);
|
|
98
97
|
}
|
|
99
|
-
let
|
|
98
|
+
let z = null;
|
|
100
99
|
if ("visible" in e) {
|
|
101
100
|
const t = e.layer;
|
|
102
|
-
!C && t?.type === "catalog-dynamic-group" && (
|
|
101
|
+
!C && t?.type === "catalog-dynamic-group" && (z = c`<calcite-action .disabled=${!t.visible} icon=chevron-right icon-flip-rtl @click=${() => ue?.(e)} scale=s slot=actions-end .text=${y ?? ""}></calcite-action>`);
|
|
103
102
|
}
|
|
104
|
-
let
|
|
103
|
+
let J = null, L = !1;
|
|
105
104
|
{
|
|
106
105
|
const t = e.layer;
|
|
107
106
|
if (x && t)
|
|
@@ -114,43 +113,43 @@ function Ge(i) {
|
|
|
114
113
|
L = x.includes(t.type) && "subtables" in t && !!t.subtables?.length;
|
|
115
114
|
break;
|
|
116
115
|
}
|
|
117
|
-
"itemTableIcon" in a && "visible" in e && "tables" in n && L && (
|
|
116
|
+
"itemTableIcon" in a && "visible" in e && "tables" in n && L && (J = Y(`${e.uid}-tables`, c`<calcite-list-item class=${d(a.item)} data-layer-id=${t?.id ?? r} drag-disabled .label=${n.tables} title=${n.tables ?? r} @calciteListItemSelect=${() => me?.(e)} .value=${e}><calcite-icon class=${d(a.itemTableIcon)} icon=table scale=s slot=content-start></calcite-icon><calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`));
|
|
118
117
|
}
|
|
119
|
-
let
|
|
118
|
+
let K = null;
|
|
120
119
|
if ("children" in e) {
|
|
121
|
-
const t = [...
|
|
122
|
-
(
|
|
120
|
+
const t = [...G ?? [], e.title], { children: s, layer: o } = e, u = o?.type !== "catalog-dynamic-group" && Me(e), v = S ? !1 : Le(o), g = o?.type === "group", P = !v && !u && I && g, D = g && "sortable" in e && e.sortable, Ie = I && ("childrenSortable" in e && e.childrenSortable || D) && Ee(e), Ae = u ? (s?.filter(($) => !$.hidden && (oe || !$.error)).toArray() ?? []).map(($) => Ve({ ...i, item: $, parent: e, parentTitles: t })) : null;
|
|
121
|
+
(u || P) && (K = c`<calcite-list .canPull=${($) => i.canMove ? i.canMove($, "pull") : !1} .canPut=${($) => i.canMove ? i.canMove($, "put") : !1} data-item=${e.uid ?? r} data-layer-type=${b ?? r} .displayMode=${T} .dragEnabled=${Ie} .group=${g ? b : `${b}-${o?.uid}`} .label=${e.title} selection-appearance=highlight .selectionMode=${h}>${Ae}${J}</calcite-list>`);
|
|
123
122
|
}
|
|
124
123
|
let E = null;
|
|
125
124
|
if (e.error) {
|
|
126
125
|
const t = "layerError" in n ? n.layerError : n.tableError;
|
|
127
126
|
E = c`<div class=${d(a.itemMessage)} slot=content-bottom><calcite-notice icon=exclamation-mark-triangle kind=warning open scale=s width=full><div slot=message>${t}</div></calcite-notice></div>`;
|
|
128
|
-
} else "incompatible" in e && e.incompatible && "layerIncompatible" in n && (E = c`<div class=${d(a.itemMessage)} slot=content-bottom><calcite-notice icon=exclamation-mark-triangle kind=warning open scale=s tabindex=0 width=full ${
|
|
129
|
-
const
|
|
127
|
+
} else "incompatible" in e && e.incompatible && "layerIncompatible" in n && (E = c`<div class=${d(a.itemMessage)} slot=content-bottom><calcite-notice icon=exclamation-mark-triangle kind=warning open scale=s tabindex=0 width=full ${ee(M)}><div slot=message>${n.layerIncompatible}</div></calcite-notice></div>`);
|
|
128
|
+
const Q = Re(e), k = e.actionsSections.reduce((t, s) => t + s.length, 0), W = ke(Q), be = Q.toArray().map((t) => c`<calcite-action-group>${t.toArray().map((s) => ae(i, s, !0))}</calcite-action-group>`), ye = (t) => {
|
|
130
129
|
e.actionsOpen = t.currentTarget.open;
|
|
131
130
|
};
|
|
132
|
-
let
|
|
133
|
-
k > 1 && (
|
|
131
|
+
let X = null;
|
|
132
|
+
k > 1 && (X = c`<calcite-action-menu appearance=transparent .label=${n.menu ?? ""} .open=${e.actionsOpen} overlay-positioning=fixed placement=bottom-end slot=actions-end @calciteActionMenuOpen=${ye}><calcite-action .aria=${{
|
|
134
133
|
expanded: e.actionsOpen ?? !1,
|
|
135
134
|
hasPopup: "true"
|
|
136
|
-
}} icon=ellipsis scale=s slot=trigger .text=${n.options ?? ""} title=${n.options ?? r}></calcite-action>${
|
|
135
|
+
}} icon=ellipsis scale=s slot=trigger .text=${n.options ?? ""} title=${n.options ?? r}></calcite-action>${be}</calcite-action-menu>`);
|
|
137
136
|
let w = null;
|
|
138
|
-
k === 1 &&
|
|
139
|
-
const
|
|
137
|
+
k === 1 && W ? w = ae(i, W, !1) : k > 1 && (w = X);
|
|
138
|
+
const ve = "visibleAtCurrentTimeExtent" in e && "layerInvisibleAtTime" in n && !e.visibleAtCurrentTimeExtent ? `${y} (${n.layerInvisibleAtTime})` : "visibleAtCurrentScale" in e && "layerInvisibleAtScale" in n && !e.visibleAtCurrentScale ? `${y} (${n.layerInvisibleAtScale})` : y, fe = "parent" in e && e.parent?.layer?.type === "catalog", A = e.layer, he = "visibleAtCurrentScale" in e && !e.visibleAtCurrentScale || "visibleAtCurrentTimeExtent" in e && !e.visibleAtCurrentTimeExtent;
|
|
140
139
|
return queueMicrotask(() => {
|
|
141
|
-
Oe(
|
|
142
|
-
}),
|
|
143
|
-
|
|
140
|
+
Oe(p.value ?? null, e, $e, pe), M.value && (i.handleTooltipReferenceChange?.(A?.uid, M.value), queueMicrotask(() => i.handleTooltipReferenceChange?.(A?.uid, null))), e.panel && (e.panel.container = p.value);
|
|
141
|
+
}), Y(e.uid, c`<calcite-list-item class=${d(F(a.item, "itemActive" in a && { [a.itemActive]: de?.uid === e.uid }))} data-item=${e.uid ?? r} data-layer-id=${A?.id ?? r} .dragDisabled=${!("sortable" in e && e.sortable) || fe} id=${A?.uid ?? r} .label=${y} .metadata=${{ parentTitles: G ?? [], _title: y }} .expanded=${"open" in e && e.open} .selected=${h !== "none" ? re.includes(e) : !1} title=${ve ?? r} .unavailable=${he} .value=${e} @focusin=${() => {
|
|
142
|
+
R?.(e), p.value?.classList.add(a.itemActive);
|
|
144
143
|
}} @focusout=${() => {
|
|
145
|
-
|
|
144
|
+
V?.(), p.value?.classList.remove(a.itemActive);
|
|
146
145
|
}} @mouseover=${() => {
|
|
147
|
-
|
|
146
|
+
R?.(e), p.value?.classList.add(a.itemActive);
|
|
148
147
|
}} @mouseleave=${() => {
|
|
149
|
-
|
|
150
|
-
}} @calciteListItemSelect=${(t) => "visible" in e && we(t.currentTarget, i.operationalItems) === e &&
|
|
148
|
+
V?.(), p.value?.classList.remove(a.itemActive);
|
|
149
|
+
}} @calciteListItemSelect=${(t) => "visible" in e && we(t.currentTarget, i.operationalItems) === e && h === "none" && O(l) !== "inherited" && ie(e, l)} @calciteListItemToggle=${(t) => {
|
|
151
150
|
"open" in e && (t.stopPropagation(), e.open = t.target.expanded);
|
|
152
|
-
}} ${
|
|
151
|
+
}} ${ee(p)}>${N}${_}${H}${q}${z}${U}${K}${E}${j}${B}${w}</calcite-list-item>`);
|
|
153
152
|
}
|
|
154
153
|
export {
|
|
155
|
-
|
|
154
|
+
Ve as ArcgisLayerListItem
|
|
156
155
|
};
|
|
@@ -30,16 +30,16 @@ class x extends C {
|
|
|
30
30
|
this.arcgisFlowItemBack.emit();
|
|
31
31
|
}
|
|
32
32
|
_handleChange(t) {
|
|
33
|
-
const { _mode: s, _ownerName: h, _versionName: d, versionPropertiesElementProps: { currentUser: m, isVersionAdministrator: e, serviceUrl:
|
|
34
|
-
let { _alterVersionParameters:
|
|
33
|
+
const { _mode: s, _ownerName: h, _versionName: d, versionPropertiesElementProps: { currentUser: m, isVersionAdministrator: e, serviceUrl: r, versionInfo: i } } = this;
|
|
34
|
+
let { _alterVersionParameters: o, _createVersionParameters: a } = this;
|
|
35
35
|
switch (s === "create" && (a || (a = {
|
|
36
36
|
access: "public",
|
|
37
37
|
description: "",
|
|
38
|
-
featureServerUrl:
|
|
38
|
+
featureServerUrl: r,
|
|
39
39
|
ownerName: m,
|
|
40
40
|
versionName: ""
|
|
41
|
-
})), s === "edit" && (
|
|
42
|
-
featureServerUrl:
|
|
41
|
+
})), s === "edit" && (o || (o = {
|
|
42
|
+
featureServerUrl: r,
|
|
43
43
|
versionIdentifier: i.versionIdentifier,
|
|
44
44
|
ownerName: h,
|
|
45
45
|
versionName: d,
|
|
@@ -47,22 +47,22 @@ class x extends C {
|
|
|
47
47
|
description: i.description
|
|
48
48
|
})), t.type) {
|
|
49
49
|
case "calciteChipGroupSelect": {
|
|
50
|
-
const
|
|
51
|
-
s === "create" && (a = { ...a, [
|
|
50
|
+
const c = t.target.label, n = t.target.selectedItems[0].label;
|
|
51
|
+
s === "create" && (a = { ...a, [c]: n }), s === "edit" && (o = { ...o, [c]: n });
|
|
52
52
|
break;
|
|
53
53
|
}
|
|
54
54
|
case "calciteInputTextInput": {
|
|
55
|
-
const
|
|
56
|
-
s === "create" && (a = { ...a, [
|
|
55
|
+
const c = t.target.name, n = t.target.value;
|
|
56
|
+
s === "create" && (a = { ...a, [c]: n }), s === "edit" && (o = { ...o, [c]: n });
|
|
57
57
|
break;
|
|
58
58
|
}
|
|
59
59
|
case "calciteTextAreaInput": {
|
|
60
|
-
const
|
|
61
|
-
s === "create" && (a = { ...a, [
|
|
60
|
+
const c = t.target.name, n = t.target.value;
|
|
61
|
+
s === "create" && c && (a = { ...a, [c]: n }), s === "edit" && c && (o = { ...o, [c]: n });
|
|
62
62
|
break;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
s === "create" && (a.access !== "public" && m.toUpperCase() !== a.ownerName?.toUpperCase() && !e ? (this._switchToVersionCheckboxElement.value.checked = !1, this._switchToVersionCheckboxElement.value.disabled = !0, this._switchToVersion = !1) : this._switchToVersionCheckboxElement.value.disabled = !1, this._createVersionParameters = a), s === "edit" && (this._alterVersionParameters =
|
|
65
|
+
s === "create" && (a.access !== "public" && m.toUpperCase() !== a.ownerName?.toUpperCase() && !e ? (this._switchToVersionCheckboxElement.value.checked = !1, this._switchToVersionCheckboxElement.value.disabled = !0, this._switchToVersion = !1) : this._switchToVersionCheckboxElement.value.disabled = !1, this._createVersionParameters = a), s === "edit" && (this._alterVersionParameters = o);
|
|
66
66
|
}
|
|
67
67
|
_handleClose() {
|
|
68
68
|
this.arcgisFlowItemClose.emit();
|
|
@@ -84,8 +84,8 @@ class x extends C {
|
|
|
84
84
|
this._switchToVersion = t.target.checked;
|
|
85
85
|
}
|
|
86
86
|
render() {
|
|
87
|
-
const { selected: t, showBackButton: s, versionPropertiesElementProps: { closable: h, currentUser: d, state: m, strings: e, versionInfo:
|
|
88
|
-
return l`<calcite-flow-item .closable=${h} .description=${
|
|
87
|
+
const { selected: t, showBackButton: s, versionPropertiesElementProps: { closable: h, currentUser: d, state: m, strings: e, versionInfo: r }, _mode: i, _ownerName: o, _versionName: a } = this, c = l`<calcite-button appearance=outline slot=footer width=full @click=${this._handleCancel}>${e.actions.cancelSave}</calcite-button><calcite-button appearance=solid slot=footer width=full @click=${this._handleSave}>${e.actions.saveVersion}</calcite-button>`, n = l`<calcite-label>${e.input.versionAccess}<calcite-chip-group label=access @calciteChipGroupSelect=${this._handleChange} selection-mode=single-persist><calcite-chip .selected=${i === "edit" && r.access === "public" || i === "create"} label=public>${e.accessLevels.public}</calcite-chip><calcite-chip .selected=${i === "edit" && r.access === "protected"} label=protected>${e.accessLevels.protected}</calcite-chip><calcite-chip .selected=${i === "edit" && r.access === "private"} label=private>${e.accessLevels.private}</calcite-chip></calcite-chip-group></calcite-label>`, _ = l`<calcite-label>${e.input.versionDescription}<calcite-text-area limit-text max-length=64 name=description resize=none rows=2 scale=s .value=${i === "edit" ? r.description : ""} @calciteTextAreaInput=${this._handleChange}></calcite-text-area></calcite-label>`, f = l`<calcite-label>${e.input.versionName}<calcite-input-text max-length=62 name=versionName .value=${i === "edit" ? a : ""} @calciteInputTextInput=${this._handleChange} ${v(this._versionNameInputElement)}></calcite-input-text></calcite-label>`, b = l`<calcite-label>${e.input.versionOwner}<calcite-input-text name=ownerName .value=${i === "edit" ? o : d} @calciteInputTextInput=${this._handleChange}></calcite-input-text></calcite-label>`, g = i === "create" ? l`<calcite-label layout=inline><calcite-checkbox checked name=switchToVersion @calciteCheckboxChange=${this._handleSwitchToVersionChange} ${v(this._switchToVersionCheckboxElement)}></calcite-checkbox>${e.actions.switchToVersion}</calcite-label>` : void 0, w = this._validationError ? l`<calcite-notice closable kind=warning open scale=s width=full @calciteNoticeClose=${() => this._validationError = void 0}><div slot=message>${this._validationError}</div></calcite-notice>` : void 0;
|
|
88
|
+
return l`<calcite-flow-item .closable=${h} .description=${r ? r.versionIdentifier.name : ""} .heading=${r ? e.actions.editVersion : e.actions.newVersion} .selected=${t} .showBackButton=${s} @calciteFlowItemClose=${this._handleClose} ${v(this._flowItemElement)}><calcite-panel .loading=${m === "executing"}><calcite-block expanded .label=${e.headers.versionProperties}>${f}${_}${n}${b}${g}${w}</calcite-block>${c}</calcite-panel></calcite-flow-item>`;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
$("arcgis-version-management-version-properties", x);
|