@esri/hub-web-components 0.37.2 → 0.37.3
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/24LWDIWH.js +2 -0
- package/dist/cdn/{GTMYGR72.js → 4VZL3FH3.js} +1 -1
- package/dist/cdn/{77R2C3NY.js → 5SFG6XNQ.js} +1 -1
- package/dist/cdn/{DIAOUTLA.js → 5VH76XSQ.js} +1 -1
- package/dist/cdn/{UAGYDOBI.js → 77NTOQZO.js} +1 -1
- package/dist/cdn/CKOFCDE3.js +2 -0
- package/dist/cdn/{MKMW2OIY.js → EAB7DUGA.js} +1 -1
- package/dist/cdn/GLKCCCVQ.js +2 -0
- package/dist/cdn/{SNHGQLES.js → HE3DHDMO.js} +1 -1
- package/dist/cdn/{YXKNVWVS.js → HKS652OZ.js} +1 -1
- package/dist/cdn/{SMQJD2L6.js → I2CC4Z7B.js} +1 -1
- package/dist/cdn/{UTLMCJD2.js → I3GKS5LC.js} +1 -1
- package/dist/cdn/IE3N5HKQ.js +2 -0
- package/dist/cdn/{DEVEFEZB.js → JXTLVDZ3.js} +1 -1
- package/dist/cdn/{IV7AWQ4I.js → K4JVFZDS.js} +1 -1
- package/dist/cdn/{NQJLGBVK.js → MLV6BSL7.js} +1 -1
- package/dist/cdn/{VJWEGXQY.js → MT4BUGHF.js} +1 -1
- package/dist/cdn/MUJK2PAB.js +10 -0
- package/dist/cdn/{V76BJGGX.js → N6VT6AJI.js} +1 -1
- package/dist/cdn/{JEQW7KPC.js → PTAQKJEW.js} +1 -1
- package/dist/cdn/{OAR2EXND.js → SOGZ7ZLI.js} +1 -1
- package/dist/cdn/{3SHBZF4M.js → VQ6FS65F.js} +1 -1
- package/dist/cdn/{WTEVUXDK.js → WTFAANTX.js} +1 -1
- package/dist/cdn/{HSKNYFFN.js → XRBZRHR3.js} +1 -1
- package/dist/cdn/{TWLLLMPH.js → YDFCEZES.js} +1 -1
- package/dist/cdn/{M3ZUOUC3.js → YEWX4IVK.js} +1 -1
- package/dist/cdn/{RIMWN7PN.js → YTAOXT7K.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/components/arcgis-layout-container/customElement.js +221 -221
- package/dist/components/arcgis-layout-editor-toolbar/customElement.js +13 -13
- package/dist/components/arcgis-layout-node-controls/customElement.js +27 -27
- package/dist/components/arcgis-layout-node-wrapper/customElement.js +31 -31
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +54 -53
- package/dist/cdn/425VBETO.js +0 -2
- package/dist/cdn/CP5CMZPK.js +0 -2
- package/dist/cdn/G3DW5HI6.js +0 -2
- package/dist/cdn/MTV6GBRX.js +0 -2
- package/dist/cdn/W5FA4IWP.js +0 -10
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/0.37/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { LitElement as
|
|
2
|
+
import { c as e } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as o, html as c } from "lit";
|
|
4
|
+
import { LitElement as r } from "@arcgis/lumina";
|
|
5
5
|
import { useContextConsumer as a } from "@arcgis/lumina/context";
|
|
6
|
-
import { focusElement as
|
|
7
|
-
import { createRef as
|
|
8
|
-
import { l as
|
|
9
|
-
const d =
|
|
10
|
-
class
|
|
6
|
+
import { focusElement as i } from "@arcgis/toolkit/dom";
|
|
7
|
+
import { createRef as s, ref as l } from "lit/directives/ref.js";
|
|
8
|
+
import { l as n } from "../../chunks/layoutContext.js";
|
|
9
|
+
const d = o`:host{font-family:Avenir Next;--calcite-color-background: #f7f7f7;--calcite-color-background-none: rgba(255, 255, 255, 0);--calcite-color-border-1: #d4d4d4;--calcite-color-border-2: #dedede;--calcite-color-border-3: #ebebeb;--calcite-color-border-ghost: rgba(0, 0, 0, .3);--calcite-color-border-input: #949494;--calcite-color-border-white: #ffffff;--calcite-color-brand: #007ac2;--calcite-color-brand-hover: #00619b;--calcite-color-brand-press: #004874;--calcite-color-brand-underline: rgba(0, 97, 155, .4);--calcite-color-focus: #007ac2;--calcite-color-foreground-1: #ffffff;--calcite-color-foreground-2: #f2f2f2;--calcite-color-foreground-3: #ebebeb;--calcite-color-foreground-current: #d6efff;--calcite-color-inverse: #363636;--calcite-color-inverse-hover: #2b2b2b;--calcite-color-inverse-press: #212121;--calcite-color-status-danger: #d83020;--calcite-color-status-danger-hover: #a82b1e;--calcite-color-status-danger-press: #7c1d13;--calcite-color-status-info: #00619b;--calcite-color-status-info-hover: #004874;--calcite-color-status-info-press: #00304d;--calcite-color-status-success: #288835;--calcite-color-status-success-hover: #1a6324;--calcite-color-status-success-press: #0d3f14;--calcite-color-status-warning: #da7c0b;--calcite-color-status-warning-hover: #c26b00;--calcite-color-status-warning-press: #9a5b10;--calcite-color-surface-1: #f7f7f7;--calcite-color-surface-2: #ffffff;--calcite-color-surface-3: #f2f2f2;--calcite-color-surface-4: #ebebeb;--calcite-color-surface-highlight: #d6efff;--calcite-color-text-1: #141414;--calcite-color-text-2: #4a4a4a;--calcite-color-text-3: #6b6b6b;--calcite-color-text-highlight: #004874;--calcite-color-text-inverse: #ffffff;--calcite-color-text-link: #00619b;--calcite-color-transparent: rgba(0, 0, 0, 0);--calcite-color-transparent-hover: rgba(0, 0, 0, .04);--calcite-color-transparent-inverse-hover: rgba(255, 255, 255, .12);--calcite-color-transparent-inverse-press: rgba(255, 255, 255, .16);--calcite-color-transparent-press: rgba(0, 0, 0, .08);--calcite-color-transparent-scrim: rgba(255, 255, 255, .85);--calcite-color-transparent-tint: rgba(255, 255, 255, .8) }calcite-navigation{border-block-start:1px solid var(--calcite-navigation-border-color, var(--calcite-color-border-3));--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);[slot=content-end]{margin-inline-end:1rem}[slot=content-end]{display:flex}[slot=content-end]{gap:.75rem}}`;
|
|
10
|
+
class b extends r {
|
|
11
11
|
constructor() {
|
|
12
|
-
super(...arguments), this.#t = a({ context:
|
|
12
|
+
super(...arguments), this.#t = a({ context: n }), this._exitButtonRef = s(), this.isLayoutDirty = !1, this.isLayoutValid = !0, this.isPublishing = !1;
|
|
13
13
|
}
|
|
14
14
|
static {
|
|
15
15
|
this.properties = { exitEditMode: 0, publishLayout: 0, resetLayout: 0, isLayoutDirty: 5, isLayoutValid: 5, isPublishing: 5 };
|
|
@@ -29,14 +29,14 @@ class u extends o {
|
|
|
29
29
|
return this.isLayoutDirty || (t = this._messages.toolbar.noChanges), this.isLayoutValid || (t = this._messages.toolbar.invalidLayout), t;
|
|
30
30
|
}
|
|
31
31
|
loaded() {
|
|
32
|
-
|
|
32
|
+
i(this._exitButtonRef.value);
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
35
|
const t = this._messages.toolbar.exit;
|
|
36
|
-
return
|
|
36
|
+
return c`<calcite-navigation><calcite-action .label=${t} @click=${this.exitEditMode} scale=l slot=content-start .text=${t} text-enabled ${l(this._exitButtonRef)}></calcite-action><div slot=content-end><arcgis-ref-tooltip .isSlottedElDisabled=${this._isPublishDisabled} .text=${this._disabledPublishTooltip}><calcite-button .disabled=${this._isPublishDisabled} .loading=${this.isPublishing} @click=${this.publishLayout} round>${this._messages.toolbar.publish}</calcite-button></arcgis-ref-tooltip><calcite-dropdown offset-distance=5><calcite-button appearance=transparent icon-start=ellipsis .label=${this._messages.toolbar.moreOptions} round scale=m slot=trigger></calcite-button><calcite-dropdown-group selection-mode=none><calcite-dropdown-item .label=${this._messages.toolbar.resetLabel} @click=${this.resetLayout}>${this._messages.toolbar.resetLabel}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown></div></calcite-navigation>`;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
e("arcgis-layout-editor-toolbar", b);
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
b as ArcgisLayoutEditorToolbar
|
|
42
42
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/0.37/LICENSE.txt */
|
|
2
|
-
import { c } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as u, html as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { useContextConsumer as
|
|
6
|
-
import { getWithDefault as o, getProp as
|
|
7
|
-
import { i as
|
|
8
|
-
import { dictionary as
|
|
9
|
-
import { f as
|
|
10
|
-
import { l as
|
|
11
|
-
const
|
|
12
|
-
class
|
|
2
|
+
import { c as d } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as u, html as f } from "lit";
|
|
4
|
+
import { LitElement as h, createEvent as i, noShadowRoot as p } from "@arcgis/lumina";
|
|
5
|
+
import { useContextConsumer as g } from "@arcgis/lumina/context";
|
|
6
|
+
import { getWithDefault as o, getProp as a } from "@esri/hub-common";
|
|
7
|
+
import { i as b } from "../../chunks/isNodeVisible.js";
|
|
8
|
+
import { dictionary as s } from "@esri/telemetry-dictionary-hub";
|
|
9
|
+
import { f as n } from "../../chunks/findColumnAndNodeIndex.js";
|
|
10
|
+
import { l as y } from "../../chunks/layoutContext.js";
|
|
11
|
+
const m = u`@layer{layout-node-controls{position:absolute;font-family:Avenir Next;--calcite-color-background: #f7f7f7;--calcite-color-background-none: rgba(255, 255, 255, 0);--calcite-color-border-1: #d4d4d4;--calcite-color-border-2: #dedede;--calcite-color-border-3: #ebebeb;--calcite-color-border-ghost: rgba(0, 0, 0, .3);--calcite-color-border-input: #949494;--calcite-color-border-white: #ffffff;--calcite-color-brand: #007ac2;--calcite-color-brand-hover: #00619b;--calcite-color-brand-press: #004874;--calcite-color-brand-underline: rgba(0, 97, 155, .4);--calcite-color-focus: #007ac2;--calcite-color-foreground-1: #ffffff;--calcite-color-foreground-2: #f2f2f2;--calcite-color-foreground-3: #ebebeb;--calcite-color-foreground-current: #d6efff;--calcite-color-inverse: #363636;--calcite-color-inverse-hover: #2b2b2b;--calcite-color-inverse-press: #212121;--calcite-color-status-danger: #d83020;--calcite-color-status-danger-hover: #a82b1e;--calcite-color-status-danger-press: #7c1d13;--calcite-color-status-info: #00619b;--calcite-color-status-info-hover: #004874;--calcite-color-status-info-press: #00304d;--calcite-color-status-success: #288835;--calcite-color-status-success-hover: #1a6324;--calcite-color-status-success-press: #0d3f14;--calcite-color-status-warning: #da7c0b;--calcite-color-status-warning-hover: #c26b00;--calcite-color-status-warning-press: #9a5b10;--calcite-color-surface-1: #f7f7f7;--calcite-color-surface-2: #ffffff;--calcite-color-surface-3: #f2f2f2;--calcite-color-surface-4: #ebebeb;--calcite-color-surface-highlight: #d6efff;--calcite-color-text-1: #141414;--calcite-color-text-2: #4a4a4a;--calcite-color-text-3: #6b6b6b;--calcite-color-text-highlight: #004874;--calcite-color-text-inverse: #ffffff;--calcite-color-text-link: #00619b;--calcite-color-transparent: rgba(0, 0, 0, 0);--calcite-color-transparent-hover: rgba(0, 0, 0, .04);--calcite-color-transparent-inverse-hover: rgba(255, 255, 255, .12);--calcite-color-transparent-inverse-press: rgba(255, 255, 255, .16);--calcite-color-transparent-press: rgba(0, 0, 0, .08);--calcite-color-transparent-scrim: rgba(255, 255, 255, .85);--calcite-color-transparent-tint: rgba(255, 255, 255, .8)}layout-node-controls .delete-popover-content{padding:0 1rem 1rem;margin:0}}`;
|
|
12
|
+
class v extends h {
|
|
13
13
|
constructor() {
|
|
14
|
-
super(), this.#e =
|
|
14
|
+
super(), this.#e = g({ context: y, subscribe: !0 }), this.isEditMode = !1, this.isLayoutValid = !0, this.arcgisLayoutDeactivateNode = i(), this.arcgisLayoutDeleteNode = i(), this.arcgisLayoutNodeEditorOpen = i(), this.arcgisLayoutNodeReposition = i(), this.arcgisLayoutNodeVisibilityChange = i(), this.hubTelemetry = i(), this.listen("calcitePopoverOpen", (e) => {
|
|
15
15
|
e.stopPropagation();
|
|
16
16
|
}), this.listen("calcitePopoverClose", (e) => {
|
|
17
17
|
e.stopPropagation(), this.arcgisLayoutDeactivateNode.emit({
|
|
@@ -23,24 +23,24 @@ class N extends p {
|
|
|
23
23
|
this.properties = { isEditMode: 5, isLayoutValid: 5, node: 0, activatedNode: 0, layoutElement: 0, messages: 0, layoutNodeConfig: 0 };
|
|
24
24
|
}
|
|
25
25
|
static {
|
|
26
|
-
this.styles =
|
|
26
|
+
this.styles = m;
|
|
27
27
|
}
|
|
28
28
|
static {
|
|
29
|
-
this.shadowRootOptions =
|
|
29
|
+
this.shadowRootOptions = p;
|
|
30
30
|
}
|
|
31
31
|
#e;
|
|
32
32
|
get #t() {
|
|
33
33
|
const e = this.layoutNodeConfig ? this.layoutNodeConfig.disableMove : !1;
|
|
34
34
|
let t = !1;
|
|
35
|
-
return this.node && this.layout && (t = !!
|
|
35
|
+
return this.node && this.layout && (t = !!n(this.node, this.layout)?.isFirstInColumn), !e && !t;
|
|
36
36
|
}
|
|
37
37
|
get #o() {
|
|
38
38
|
const e = this.layoutNodeConfig ? this.layoutNodeConfig.disableMove : !1;
|
|
39
39
|
let t = !1;
|
|
40
|
-
return this.node && this.layout && (t = !!
|
|
40
|
+
return this.node && this.layout && (t = !!n(this.node, this.layout)?.isLastInColumn), !e && !t;
|
|
41
41
|
}
|
|
42
42
|
get _isNodeVisible() {
|
|
43
|
-
return
|
|
43
|
+
return b(this.node);
|
|
44
44
|
}
|
|
45
45
|
get layoutNodeEditorRef() {
|
|
46
46
|
return this.#e.value.layoutNodeEditorRef;
|
|
@@ -62,7 +62,7 @@ class N extends p {
|
|
|
62
62
|
}
|
|
63
63
|
_onOpenEditorButtonClick() {
|
|
64
64
|
this.arcgisLayoutNodeEditorOpen.emit({ node: this.node, element: this.layoutElement }), this.hubTelemetry.emit({
|
|
65
|
-
...
|
|
65
|
+
...s.category.interaction.action.open.label.sidePanel,
|
|
66
66
|
details: this.layoutNodeConfig.name
|
|
67
67
|
});
|
|
68
68
|
}
|
|
@@ -74,7 +74,7 @@ class N extends p {
|
|
|
74
74
|
});
|
|
75
75
|
const e = this._isNodeVisible ? "disable" : "enable";
|
|
76
76
|
this.hubTelemetry.emit({
|
|
77
|
-
...
|
|
77
|
+
...s.category.interaction.action[e].label.visibility,
|
|
78
78
|
details: this.layoutNodeConfig.name
|
|
79
79
|
});
|
|
80
80
|
}
|
|
@@ -86,7 +86,7 @@ class N extends p {
|
|
|
86
86
|
}
|
|
87
87
|
_onDeleteButtonClick() {
|
|
88
88
|
this.hubTelemetry.emit({
|
|
89
|
-
...
|
|
89
|
+
...s.category.interaction.action.open.label.popover,
|
|
90
90
|
details: `Delete ${this.layoutNodeConfig.name}`
|
|
91
91
|
});
|
|
92
92
|
}
|
|
@@ -94,7 +94,7 @@ class N extends p {
|
|
|
94
94
|
this.arcgisLayoutDeleteNode.emit({
|
|
95
95
|
id: this.node.id
|
|
96
96
|
}), this.hubTelemetry.emit({
|
|
97
|
-
...
|
|
97
|
+
...s.category.content.action.delete.label.layoutNode,
|
|
98
98
|
details: this.layoutNodeConfig.name
|
|
99
99
|
});
|
|
100
100
|
}
|
|
@@ -103,13 +103,13 @@ class N extends p {
|
|
|
103
103
|
const t = this.layoutNodeConfig;
|
|
104
104
|
if (this.isEditMode && this.node && t && this.layoutElement) {
|
|
105
105
|
const l = this.messages.layoutNodeControls.a11yLabel || "";
|
|
106
|
-
let
|
|
107
|
-
this.node.tag === "arcgis-nav-card" && (
|
|
108
|
-
const
|
|
106
|
+
let c = "overlay";
|
|
107
|
+
this.node.tag === "arcgis-nav-card" && (c = this.layoutElement.querySelector("calcite-tab-nav"));
|
|
108
|
+
const r = this.layoutNodeEditorRef ? {
|
|
109
109
|
initialFocus: this.layoutNodeEditorRef,
|
|
110
110
|
extraContainers: [this.layoutNodeEditorRef]
|
|
111
111
|
} : void 0;
|
|
112
|
-
e =
|
|
112
|
+
e = f`<calcite-popover .focusTrapOptions=${r} offset-distance=1 offset-skidding=-4 .label=${l} .open=${this.node.id === this.activatedNode?.id} overlay-positioning=fixed placement=top-start pointer-disabled .referenceElement=${c} top-layer-disabled trigger-disabled><calcite-action-bar expand-disabled floating layout=horizontal overflow-actions-disabled overlay-positioning=absolute><calcite-action-group><calcite-action .text=${o(t, "i18n.label", this.messages.configurableNodes.default.label)} text-enabled></calcite-action></calcite-action-group><calcite-action-group><calcite-action .disabled=${t.disableAdjustVisibility} .icon=${this._isNodeVisible ? "view-visible" : "view-hide"} @click=${this._onToggleVisibilityClick} .text=${this._isNodeVisible ? o(t, "i18n.hideLabel", this.messages.configurableNodes.default.hide) : o(t, "i18n.showLabel", this.messages.configurableNodes.default.show)}></calcite-action><arcgis-ref-tooltip .text=${this.moveUpTooltipText}><calcite-action .disabled=${!this.#t} icon=arrow-up @click=${this._onMoveUpButtonClick} .text=${o(t, "i18n.repositionUpLabel", this.messages.configurableNodes.default.up)}></calcite-action></arcgis-ref-tooltip><arcgis-ref-tooltip .text=${this.moveDownTooltipText}><calcite-action .disabled=${!this.#o} icon=arrow-down @click=${this._onMoveDownButtonClick} .text=${o(t, "i18n.repositionDownLabel", this.messages.configurableNodes.default.down)}></calcite-action></arcgis-ref-tooltip><arcgis-ref-tooltip .text=${this.node.readOnly ? "Metadata must be updated in the workspace" : ""}><calcite-action .disabled=${this.node.readOnly || t.disableEdit || !this.isLayoutValid} icon=pencil @click=${this._onOpenEditorButtonClick} .text=${o(t, "i18n.edit", this.messages.configurableNodes.default.edit)}></calcite-action></arcgis-ref-tooltip><arcgis-ref-tooltip .text=${this.deleteTooltipText}><calcite-action .disabled=${this.node.readOnly || t.disableDelete} icon=trash id=delete-button @click=${this._onDeleteButtonClick} .text=${o(t, "i18n.delete", this.messages.configurableNodes.default.delete)}></calcite-action></arcgis-ref-tooltip><calcite-popover .focusTrapOptions=${r} .heading=${a(this.messages, "layoutNodeControls.deletePopover.heading")} .label=${a(this.messages, "layoutNodeControls.deletePopover.heading")} offset-distance=2 overlay-positioning=fixed placement=bottom-start pointer-disabled reference-element=delete-button><div class="delete-popover-content"><p>${a(this.messages, "layoutNodeControls.deletePopover.body")}</p><calcite-button alignment=center appearance=outline-fill kind=danger @click=${this._onDeleteConfirmButtonClick} round width=full>${a(this.messages, "layoutNodeControls.deletePopover.button")}</calcite-button></div></calcite-popover></calcite-action-group></calcite-action-bar></calcite-popover>`;
|
|
113
113
|
}
|
|
114
114
|
return e;
|
|
115
115
|
}
|
|
@@ -117,7 +117,7 @@ class N extends p {
|
|
|
117
117
|
return this.renderControls();
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
|
|
120
|
+
d("arcgis-layout-node-controls", v);
|
|
121
121
|
export {
|
|
122
|
-
|
|
122
|
+
v as ArcgisLayoutNodeControls
|
|
123
123
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/0.37/LICENSE.txt */
|
|
2
2
|
import { c as d } from "../../chunks/runtime.js";
|
|
3
|
-
import { LitElement as h, createEvent as
|
|
3
|
+
import { LitElement as h, createEvent as c, nothing as r, safeClassMap as l } from "@arcgis/lumina";
|
|
4
4
|
import { useContextConsumer as u } from "@arcgis/lumina/context";
|
|
5
|
-
import { css as
|
|
6
|
-
import { cloneObject as
|
|
5
|
+
import { css as f, html as o } from "lit";
|
|
6
|
+
import { cloneObject as p, getWithDefault as n } from "@esri/hub-common";
|
|
7
7
|
import { l as v } from "../../chunks/layoutContext.js";
|
|
8
|
-
import { g, a as
|
|
8
|
+
import { g as b, a as g, i as m } from "../../chunks/interpolate-translations.js";
|
|
9
9
|
import { g as y } from "../../chunks/state.js";
|
|
10
|
-
import { dictionary as
|
|
11
|
-
import { slotChangeGetAssignedElements as
|
|
10
|
+
import { dictionary as x } from "@esri/telemetry-dictionary-hub";
|
|
11
|
+
import { slotChangeGetAssignedElements as N } from "@arcgis/toolkit/dom";
|
|
12
12
|
import { i as C } from "../../chunks/isNodeVisible.js";
|
|
13
|
-
const $ =
|
|
14
|
-
function
|
|
15
|
-
const t =
|
|
16
|
-
return Object.values(t).filter((
|
|
13
|
+
const $ = f`#card-label{position:fixed;position-anchor:--highlight-anchor;inset-block-end:calc(anchor(top) + 3px);inset-inline-start:calc(anchor(left) - 3px);background-color:#fff;border:solid 1px var(--calcite-popover-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-popover-corner-radius);font-size:var(--calcite-font-size--2);line-height:var(--calcite-font-line-height-fixed-sm);font-weight:var(--calcite-font-weight-normal);padding-inline:var(--calcite-spacing-sm);padding-block:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);box-shadow:0 0 16px #00000029}#card-label,#overlay,#add-button,calcite-popover{font-family:Avenir Next;--calcite-color-background: #f7f7f7;--calcite-color-background-none: rgba(255, 255, 255, 0);--calcite-color-border-1: #d4d4d4;--calcite-color-border-2: #dedede;--calcite-color-border-3: #ebebeb;--calcite-color-border-ghost: rgba(0, 0, 0, .3);--calcite-color-border-input: #949494;--calcite-color-border-white: #ffffff;--calcite-color-brand: #007ac2;--calcite-color-brand-hover: #00619b;--calcite-color-brand-press: #004874;--calcite-color-brand-underline: rgba(0, 97, 155, .4);--calcite-color-focus: #007ac2;--calcite-color-foreground-1: #ffffff;--calcite-color-foreground-2: #f2f2f2;--calcite-color-foreground-3: #ebebeb;--calcite-color-foreground-current: #d6efff;--calcite-color-inverse: #363636;--calcite-color-inverse-hover: #2b2b2b;--calcite-color-inverse-press: #212121;--calcite-color-status-danger: #d83020;--calcite-color-status-danger-hover: #a82b1e;--calcite-color-status-danger-press: #7c1d13;--calcite-color-status-info: #00619b;--calcite-color-status-info-hover: #004874;--calcite-color-status-info-press: #00304d;--calcite-color-status-success: #288835;--calcite-color-status-success-hover: #1a6324;--calcite-color-status-success-press: #0d3f14;--calcite-color-status-warning: #da7c0b;--calcite-color-status-warning-hover: #c26b00;--calcite-color-status-warning-press: #9a5b10;--calcite-color-surface-1: #f7f7f7;--calcite-color-surface-2: #ffffff;--calcite-color-surface-3: #f2f2f2;--calcite-color-surface-4: #ebebeb;--calcite-color-surface-highlight: #d6efff;--calcite-color-text-1: #141414;--calcite-color-text-2: #4a4a4a;--calcite-color-text-3: #6b6b6b;--calcite-color-text-highlight: #004874;--calcite-color-text-inverse: #ffffff;--calcite-color-text-link: #00619b;--calcite-color-transparent: rgba(0, 0, 0, 0);--calcite-color-transparent-hover: rgba(0, 0, 0, .04);--calcite-color-transparent-inverse-hover: rgba(255, 255, 255, .12);--calcite-color-transparent-inverse-press: rgba(255, 255, 255, .16);--calcite-color-transparent-press: rgba(0, 0, 0, .08);--calcite-color-transparent-scrim: rgba(255, 255, 255, .85);--calcite-color-transparent-tint: rgba(255, 255, 255, .8)}#aria-description{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}#overlay{position:absolute;position-anchor:--highlight-anchor;position-area:center;width:anchor-size(width);height:anchor-size(height);display:flex;justify-content:center;align-items:center}#overlay.hidden{background-color:#fff6;outline:1.5px dashed var(--calcite-color-border-1);calcite-chip{opacity:1}}#add-button{position:fixed;position-anchor:--highlight-anchor;justify-self:anchor-center;inset-block-start:calc(anchor(bottom) - 15px);z-index:2}.slot-container{display:flex;flex:1;min-width:0;anchor-name:--highlight-anchor}:host{--calcite-popover-border-color: #dedede;--calcite-popover-corner-radius: 4px;#card-label,calcite-button{opacity:0}display:flex}::slotted(*){flex:1;min-width:0}#overlay:focus-visible{outline:none}:host([is-edit-mode]):has(.is-focused){#card-label{opacity:1}}:host([is-edit-mode]:not([activated],[has-nav-card]):hover),:host([is-edit-mode]:not([activated],[has-nav-card]):focus){#overlay{--calcite-internal-color-focus: var(--calcite-color-brand)}#overlay{cursor:pointer}#overlay{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}#overlay{outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}#overlay{outline-width:var(--calcite-border-width-sm)}#card-label,calcite-button{opacity:1}}:host([is-edit-mode][activated]:not([has-nav-card])){#overlay{--calcite-internal-color-focus: var(--calcite-color-brand-hover)}#overlay{cursor:pointer}#overlay{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}#overlay{outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}#overlay{outline-width:var(--calcite-border-width-md)}}.popover-content{max-height:19.3rem;overflow-y:auto;border-radius:var(--calcite-popover-corner-radius)}calcite-list-item{--calcite-list-border-color: transparent}`;
|
|
14
|
+
function w(s = {}, e) {
|
|
15
|
+
const t = b(s);
|
|
16
|
+
return Object.values(t).filter((a) => !a.hideAdd);
|
|
17
17
|
}
|
|
18
|
-
class
|
|
18
|
+
class _ extends h {
|
|
19
19
|
constructor() {
|
|
20
|
-
super(), this.#e = u({ context: v }), this.isPopoverOpen = !1, this.isFocused = !1, this.isEditMode = !1, this.arcgisLayoutActivateNode =
|
|
20
|
+
super(), this.#e = u({ context: v }), this.isPopoverOpen = !1, this.isFocused = !1, this.isEditMode = !1, this.arcgisLayoutActivateNode = c(), this.arcgisLayoutAddNode = c(), this.hubTelemetry = c(), this.listen("calcitePopoverBeforeOpen", this.loadConfig), this.listen("calcitePopoverOpen", (e) => {
|
|
21
21
|
this.isPopoverOpen = !0;
|
|
22
22
|
}), this.listen("calcitePopoverClose", (e) => {
|
|
23
23
|
this.isPopoverOpen = !1;
|
|
@@ -36,8 +36,8 @@ class w extends h {
|
|
|
36
36
|
get _layoutNodeConfig() {
|
|
37
37
|
if (!this.layoutElement || !this.node)
|
|
38
38
|
return;
|
|
39
|
-
let e =
|
|
40
|
-
return e && (e =
|
|
39
|
+
let e = g(this.layoutElement.tagName.toLowerCase(), this.#e.value, this._context);
|
|
40
|
+
return e && (e = m(this._messages, e)), p(e);
|
|
41
41
|
}
|
|
42
42
|
get ariaCardDescription() {
|
|
43
43
|
let e = "";
|
|
@@ -58,13 +58,13 @@ class w extends h {
|
|
|
58
58
|
(e.has("activatedNode") || e.has("node")) && (this.node?.id === this.activatedNode?.id ? this.el.setAttribute("activated", "true") : this.el.removeAttribute("activated")), e.has("node") && (this.node?.tag === "arcgis-nav-card" ? this.el.setAttribute("has-nav-card", "true") : this.el.removeAttribute("has-nav-card"));
|
|
59
59
|
}
|
|
60
60
|
_handleSlotChange(e) {
|
|
61
|
-
this.layoutElement =
|
|
61
|
+
this.layoutElement = N(e)[0];
|
|
62
62
|
}
|
|
63
63
|
_handlePopoverOpen() {
|
|
64
|
-
this.hubTelemetry.emit(
|
|
64
|
+
this.hubTelemetry.emit(x.category.interaction.action.open.label.dialog.details.addLayoutNode);
|
|
65
65
|
}
|
|
66
66
|
loadConfig() {
|
|
67
|
-
this.config || (this.config =
|
|
67
|
+
this.config || (this.config = w(this.#e.value, this._context));
|
|
68
68
|
}
|
|
69
69
|
_handleNodeFocus(e) {
|
|
70
70
|
this.isFocused = e.detail;
|
|
@@ -78,14 +78,14 @@ class w extends h {
|
|
|
78
78
|
(e.key === "Enter" || e.key === " ") && this._handleNodeClick(e);
|
|
79
79
|
}
|
|
80
80
|
async _handleListItemSelect(e) {
|
|
81
|
-
const t = e.target.dataset.tag,
|
|
82
|
-
if (this.node &&
|
|
83
|
-
const
|
|
81
|
+
const t = e.target.dataset.tag, a = this.config?.find((i) => i.tag === t);
|
|
82
|
+
if (this.node && a) {
|
|
83
|
+
const i = {
|
|
84
84
|
adjacentNode: this.node,
|
|
85
85
|
position: "after",
|
|
86
|
-
config:
|
|
86
|
+
config: a
|
|
87
87
|
};
|
|
88
|
-
this.arcgisLayoutAddNode.emit(
|
|
88
|
+
this.arcgisLayoutAddNode.emit(i);
|
|
89
89
|
}
|
|
90
90
|
this.isPopoverOpen = !1;
|
|
91
91
|
}
|
|
@@ -93,38 +93,38 @@ class w extends h {
|
|
|
93
93
|
let e;
|
|
94
94
|
if (this.isEditMode && this.node) {
|
|
95
95
|
const t = n(this._layoutNodeConfig ?? {}, "i18n.label", this._messages.configurableNodes.default.label);
|
|
96
|
-
e =
|
|
96
|
+
e = o`<span id=card-label aria-hidden=true>${t}</span>`;
|
|
97
97
|
}
|
|
98
98
|
return e;
|
|
99
99
|
}
|
|
100
100
|
renderOverlay() {
|
|
101
101
|
let e;
|
|
102
102
|
if (this.isEditMode && this.node && this.node.tag !== "arcgis-nav-card") {
|
|
103
|
-
const t = this._messages.layoutNodeHidden,
|
|
104
|
-
e =
|
|
103
|
+
const t = this._messages.layoutNodeHidden, a = n(this._layoutNodeConfig ?? {}, "i18n.ariaLabel", this._messages.configurableNodes.default.ariaLabel);
|
|
104
|
+
e = o`<div aria-describedby=aria-description aria-label=${a ?? r} id=overlay class=${l({ hidden: !this.isNodeVisible })} @click=${this._handleNodeClick} @keydown=${this._handleNodeKeyDown} role=button tabindex=0><span id=aria-description>${this.ariaCardDescription}</span>${this.isNodeVisible ? null : o`<calcite-chip appearance=solid icon=view-hide .label=${t}>${t}</calcite-chip>`}</div>`;
|
|
105
105
|
}
|
|
106
106
|
return e;
|
|
107
107
|
}
|
|
108
108
|
renderNodeControls() {
|
|
109
109
|
let e;
|
|
110
|
-
return this.isEditMode && this.node && (e =
|
|
110
|
+
return this.isEditMode && this.node && (e = o`<arcgis-layout-node-controls .activatedNode=${this.activatedNode} .isEditMode=${this.isEditMode} .isLayoutValid=${this.#e.value.isLayoutValid} .layout=${this.#e.value.layout} .layoutNodeConfig=${this._layoutNodeConfig} .messages=${this._messages} .node=${this.node} .layoutElement=${this.layoutElement} style="position: absolute;"></arcgis-layout-node-controls>`), e;
|
|
111
111
|
}
|
|
112
112
|
renderAddButton() {
|
|
113
113
|
let e;
|
|
114
|
-
return this.isEditMode && this.node && this.node.tag !== "arcgis-nav-card" && (e =
|
|
114
|
+
return this.isEditMode && this.node && this.node.tag !== "arcgis-nav-card" && (e = o`<calcite-button icon-start=plus id=add-button .label=${this._messages.addButtonLabel} round></calcite-button>`), e;
|
|
115
115
|
}
|
|
116
116
|
renderAddPopover() {
|
|
117
117
|
let e;
|
|
118
|
-
return this.isEditMode && this.node && this.node.tag !== "arcgis-nav-card" && (e =
|
|
118
|
+
return this.isEditMode && this.node && this.node.tag !== "arcgis-nav-card" && (e = o`<calcite-popover auto-close .heading=${this._messages.addElementPopoverHeading} .label=${this._messages.addElementPopoverLabel} @calcitePopoverOpen=${this._handlePopoverOpen} .open=${this.isPopoverOpen} reference-element=add-button top-layer-disabled><div class="popover-content"><calcite-list .label=${this._messages.addElementListLabel}>${this.config?.map((t) => o`<calcite-list-item data-tag=${t.tag ?? r} .disabled=${t.disableAdd} icon-start=${t.icon ?? r} .label=${t.i18n.label} @calciteListItemSelect=${this._handleListItemSelect}></calcite-list-item>`)}</calcite-list></div></calcite-popover>`), e;
|
|
119
119
|
}
|
|
120
120
|
render() {
|
|
121
|
-
return
|
|
121
|
+
return o`${this.renderLabel()}<div class=${l({
|
|
122
122
|
"slot-container": !0,
|
|
123
123
|
"is-focused": this.isFocused
|
|
124
124
|
})}><slot @slotchange=${this._handleSlotChange}></slot></div>${this.renderOverlay()}${this.renderAddButton()}${this.renderAddPopover()}${this.renderNodeControls()}`;
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
d("arcgis-layout-node-wrapper",
|
|
127
|
+
d("arcgis-layout-node-wrapper", _);
|
|
128
128
|
export {
|
|
129
|
-
|
|
129
|
+
_ as ArcgisLayoutNodeWrapper
|
|
130
130
|
};
|