@esri/hub-web-components 0.37.1 → 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.
Files changed (44) hide show
  1. package/dist/cdn/24LWDIWH.js +2 -0
  2. package/dist/cdn/{OCLH76JV.js → 4VZL3FH3.js} +1 -1
  3. package/dist/cdn/{ENIUDJ7K.js → 5SFG6XNQ.js} +1 -1
  4. package/dist/cdn/{DIAOUTLA.js → 5VH76XSQ.js} +1 -1
  5. package/dist/cdn/{UAGYDOBI.js → 77NTOQZO.js} +1 -1
  6. package/dist/cdn/CKOFCDE3.js +2 -0
  7. package/dist/cdn/{J2T727KW.js → EAB7DUGA.js} +1 -1
  8. package/dist/cdn/GLKCCCVQ.js +2 -0
  9. package/dist/cdn/{J6YVMYK4.js → HE3DHDMO.js} +1 -1
  10. package/dist/cdn/{MK2IL6EU.js → HKS652OZ.js} +1 -1
  11. package/dist/cdn/{UNAHMPVZ.js → I2CC4Z7B.js} +1 -1
  12. package/dist/cdn/{BFDKTUKB.js → I3GKS5LC.js} +1 -1
  13. package/dist/cdn/IE3N5HKQ.js +2 -0
  14. package/dist/cdn/{I4GSA6FV.js → JXTLVDZ3.js} +1 -1
  15. package/dist/cdn/{NCDVI3CS.js → K4JVFZDS.js} +1 -1
  16. package/dist/cdn/{LGCNVPYM.js → MLV6BSL7.js} +1 -1
  17. package/dist/cdn/{6X3MZZZU.js → MT4BUGHF.js} +1 -1
  18. package/dist/cdn/MUJK2PAB.js +10 -0
  19. package/dist/cdn/{WO6HRRH3.js → N6VT6AJI.js} +1 -1
  20. package/dist/cdn/{P25YNGGG.js → PTAQKJEW.js} +1 -1
  21. package/dist/cdn/{M4WTQTD4.js → SOGZ7ZLI.js} +1 -1
  22. package/dist/cdn/{V3OFOLDD.js → VQ6FS65F.js} +1 -1
  23. package/dist/cdn/{H4XKOYUB.js → WTFAANTX.js} +1 -1
  24. package/dist/cdn/{E5HKFFMD.js → XRBZRHR3.js} +1 -1
  25. package/dist/cdn/{LX5L3QU6.js → YDFCEZES.js} +1 -1
  26. package/dist/cdn/YEWX4IVK.js +6 -0
  27. package/dist/cdn/{PHGORKJG.js → YTAOXT7K.js} +1 -1
  28. package/dist/cdn/index.js +1 -1
  29. package/dist/chunks/runtime.js +1 -1
  30. package/dist/components/arcgis-hub-entity-view-layout/customElement.js +42 -36
  31. package/dist/components/arcgis-layout-container/customElement.js +221 -221
  32. package/dist/components/arcgis-layout-editor-toolbar/customElement.js +13 -13
  33. package/dist/components/arcgis-layout-node-controls/customElement.js +27 -27
  34. package/dist/components/arcgis-layout-node-wrapper/customElement.js +31 -31
  35. package/dist/docs/api.json +1 -1
  36. package/dist/docs/docs.json +1 -1
  37. package/dist/docs/web-types.json +1 -1
  38. package/package.json +55 -54
  39. package/dist/cdn/5PZXLCBE.js +0 -2
  40. package/dist/cdn/EG7UYDYW.js +0 -2
  41. package/dist/cdn/PQAWOUBJ.js +0 -6
  42. package/dist/cdn/QA3FAKMR.js +0 -2
  43. package/dist/cdn/TZLGC5F6.js +0 -2
  44. package/dist/cdn/W5FA4IWP.js +0 -10
@@ -2,155 +2,155 @@
2
2
  import { g as D, c as I } from "../../chunks/runtime.js";
3
3
  import { css as M, html as p } from "lit";
4
4
  import { keyed as $ } from "lit/directives/keyed.js";
5
- import { LitElement as T, createEvent as v, noShadowRoot as O } from "@arcgis/lumina";
5
+ import { LitElement as T, createEvent as b, noShadowRoot as O } from "@arcgis/lumina";
6
6
  import { useContextProvider as V } from "@arcgis/lumina/context";
7
7
  import { createRef as x, ref as R } from "lit/directives/ref.js";
8
8
  import { l as H } from "../../chunks/layoutContext.js";
9
- import { layoutNodeTags as S, cloneObject as f, findNodeById as L, setProp as j, getProp as U, deepMerge as B, Logger as _, createId as z, getWithDefault as F } from "@esri/hub-common";
9
+ import { layoutNodeTags as A, cloneObject as y, findNodeById as v, setProp as j, getProp as U, deepMerge as B, Logger as _, createId as z, getWithDefault as F } from "@esri/hub-common";
10
10
  import { g as q } from "../../chunks/state.js";
11
11
  import { p as G } from "../../chunks/processLayout.js";
12
- import { c as W, b as C, i as m, a as w } from "../../chunks/typeGuards.js";
12
+ import { c as W, b as w, i as m, a as C } from "../../chunks/typeGuards.js";
13
13
  import { a as J, i as K } from "../../chunks/interpolate-translations.js";
14
14
  import { u as Q } from "../../chunks/useT9n.js";
15
15
  import { migrateSchema as X } from "@esri/hub-components";
16
- import { f as A } from "../../chunks/findColumnAndNodeIndex.js";
17
- import { dictionary as b } from "@esri/telemetry-dictionary-hub";
18
- const Y = M`@layer{arcgis-layout-container{display:block;--offset-top: 0px;calcite-shell{position:static;font-size:inherit}#arcgis-layout-container-edit-mode-live-region{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}}arcgis-layout-container[is-edit-mode]{height:calc(100vh - var(--offset-top));arcgis-layout{margin-block-start:15px}calcite-panel>*{margin:1rem}calcite-panel>calcite-action.panel-close{margin:0}}}`;
19
- function Z(i, t) {
20
- const s = ["order", "offset", "width"], e = [];
21
- return s.forEach((a) => {
22
- let o;
23
- C(i) && (o = i.sectionProps?.[a]), m(i) && (o = i.rowProps?.[a]), w(i) && (o = i.columnProps?.[a]), typeof o == "number" ? (o < 0 || o > 12) && e.push(`Node "${i.id}": ${t} > ${a} out of range (0-12): ${o}`) : typeof o == "object" && Object.entries(o).forEach(([n, r]) => {
24
- typeof r == "number" && (r < 0 || r > 12) && e.push(`Node "${i.id}": ${t} > ${a}.${n} out of range (0-12): ${r}`);
16
+ import { f as S } from "../../chunks/findColumnAndNodeIndex.js";
17
+ import { dictionary as L } from "@esri/telemetry-dictionary-hub";
18
+ const Y = M`@layer{arcgis-layout-container{display:block;--offset-top: 0px;calcite-shell{position:static;font-size:inherit}#arcgis-layout-container-edit-mode-live-region{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}}arcgis-layout-container[is-edit-mode]{height:calc(100vh - var(--offset-top));arcgis-layout{margin-block-start:15px}calcite-shell-panel{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-panel>*{margin:1rem}calcite-panel>calcite-action.panel-close{margin:0}}}`;
19
+ function Z(e, t) {
20
+ const o = ["order", "offset", "width"], i = [];
21
+ return o.forEach((a) => {
22
+ let s;
23
+ w(e) && (s = e.sectionProps?.[a]), m(e) && (s = e.rowProps?.[a]), C(e) && (s = e.columnProps?.[a]), typeof s == "number" ? (s < 0 || s > 12) && i.push(`Node "${e.id}": ${t} > ${a} out of range (0-12): ${s}`) : typeof s == "object" && Object.entries(s).forEach(([r, n]) => {
24
+ typeof n == "number" && (n < 0 || n > 12) && i.push(`Node "${e.id}": ${t} > ${a}.${r} out of range (0-12): ${n}`);
25
25
  });
26
- }), e;
26
+ }), i;
27
27
  }
28
- function tt(i, t, s, e) {
28
+ function tt(e, t, o, i) {
29
29
  const a = [];
30
- return i.id || a.push(`${t} > missing required id.`), i.tag || a.push(`${t} > missing required tag.`), i.id && (s.has(i.id) && a.push(`Node "${i.id}": ${t} > duplicate id: "${i.id}"`), s.add(i.id)), e.includes(i.tag) || a.push(`Node "${i.id}": ${t} > has invalid tag: ${i.tag}`), a.push(...Z(i, t)), (C(i) || m(i) || w(i)) && (!i.children || !Array.isArray(i.children) || i.children.length === 0) && a.push(`Node "${i.id}": ${t} > missing or empty children array.`), a;
30
+ return e.id || a.push(`${t} > missing required id.`), e.tag || a.push(`${t} > missing required tag.`), e.id && (o.has(e.id) && a.push(`Node "${e.id}": ${t} > duplicate id: "${e.id}"`), o.add(e.id)), i.includes(e.tag) || a.push(`Node "${e.id}": ${t} > has invalid tag: ${e.tag}`), a.push(...Z(e, t)), (w(e) || m(e) || C(e)) && (!e.children || !Array.isArray(e.children) || e.children.length === 0) && a.push(`Node "${e.id}": ${t} > missing or empty children array.`), a;
31
31
  }
32
- function N({ node: i, nodePath: t, idSet: s, validTags: e, errors: a }) {
33
- if (i.tag === "arcgis-nav-card") {
34
- const o = i.properties;
35
- o && typeof o == "object" && Array.isArray(o.sections) && o.sections.forEach((r, c) => {
32
+ function N({ node: e, nodePath: t, idSet: o, validTags: i, errors: a }) {
33
+ if (e.tag === "arcgis-nav-card") {
34
+ const s = e.properties;
35
+ s && typeof s == "object" && Array.isArray(s.sections) && s.sections.forEach((n, c) => {
36
36
  const u = `${t}.sections[${c}]`;
37
37
  N({
38
- node: r,
38
+ node: n,
39
39
  nodePath: u,
40
- idSet: s,
40
+ idSet: o,
41
41
  validTags: ["arcgis-layout-section"],
42
42
  errors: a
43
43
  });
44
44
  });
45
45
  }
46
- a.push(...tt(i, t, s, e)), Array.isArray(i.children) && i.children.forEach((o, n) => {
47
- let r = `${t}.Child[${n}]`, c = Array.from(S);
48
- C(i) ? (c = ["arcgis-layout-row"], r = `${t}.Row[${n}]`) : m(i) ? (c = ["arcgis-layout-column"], r = `${t}.Column[${n}]`) : w(i) && (c = Array.from(S).filter(
46
+ a.push(...tt(e, t, o, i)), Array.isArray(e.children) && e.children.forEach((s, r) => {
47
+ let n = `${t}.Child[${r}]`, c = Array.from(A);
48
+ w(e) ? (c = ["arcgis-layout-row"], n = `${t}.Row[${r}]`) : m(e) ? (c = ["arcgis-layout-column"], n = `${t}.Column[${r}]`) : C(e) && (c = Array.from(A).filter(
49
49
  (u) => u !== "arcgis-layout-column" && u !== "arcgis-layout-section"
50
50
  )), N({
51
- node: o,
52
- nodePath: r,
53
- idSet: s,
51
+ node: s,
52
+ nodePath: n,
53
+ idSet: o,
54
54
  validTags: c,
55
55
  errors: a
56
56
  });
57
57
  });
58
58
  }
59
- function it(i) {
60
- const t = [], s = /* @__PURE__ */ new Set();
61
- return i ? typeof i != "object" ? (t.push("Layout must be an object."), t) : !i.sections.length || !Array.isArray(i.sections) ? (t.push("Layout must have a sections array."), t) : (i.sections.forEach((e, a) => {
62
- if (W(e))
59
+ function et(e) {
60
+ const t = [], o = /* @__PURE__ */ new Set();
61
+ return e ? typeof e != "object" ? (t.push("Layout must be an object."), t) : !e.sections.length || !Array.isArray(e.sections) ? (t.push("Layout must have a sections array."), t) : (e.sections.forEach((i, a) => {
62
+ if (W(i))
63
63
  return;
64
- const o = e, n = `Section[${a}]`;
64
+ const s = i, r = `Section[${a}]`;
65
65
  N({
66
- node: o,
67
- nodePath: n,
68
- idSet: s,
66
+ node: s,
67
+ nodePath: r,
68
+ idSet: o,
69
69
  validTags: ["arcgis-layout-section"],
70
70
  errors: t
71
71
  });
72
72
  }), t) : (t.push("Layout must be defined."), t);
73
73
  }
74
- async function et(i) {
75
- return i === "arcgis-text-card" ? (await import("../../chunks/migrateTextCard.js")).migrateTextCard : ((t) => t);
74
+ async function it(e) {
75
+ return e === "arcgis-text-card" ? (await import("../../chunks/migrateTextCard.js")).migrateTextCard : ((t) => t);
76
76
  }
77
- function st(i) {
78
- const t = f(i);
77
+ function ot(e) {
78
+ const t = y(e);
79
79
  return t.schemaVersion = 2, t;
80
80
  }
81
- const ot = {
82
- 2: st
81
+ const st = {
82
+ 2: ot
83
83
  };
84
- async function at(i) {
85
- const t = X(i, ot), s = await Promise.all(
86
- t.sections.map(async (e) => await P(e))
84
+ async function at(e) {
85
+ const t = X(e, st), o = await Promise.all(
86
+ t.sections.map(async (i) => await k(i))
87
87
  );
88
- return t.sections = s, t;
88
+ return t.sections = o, t;
89
89
  }
90
- async function P(i) {
91
- const s = (await et(i.tag))(i);
92
- return Array.isArray(s.children) && (s.children = await Promise.all(
93
- s.children.map(async (e) => await P(e))
94
- )), s;
90
+ async function k(e) {
91
+ const o = (await it(e.tag))(e);
92
+ return Array.isArray(o.children) && (o.children = await Promise.all(
93
+ o.children.map(async (i) => await k(i))
94
+ )), o;
95
95
  }
96
- function nt(i, t) {
97
- if (i.children && t < i.children.length - 1)
98
- return i.children[t + 1];
96
+ function rt(e, t) {
97
+ if (e.children && t < e.children.length - 1)
98
+ return e.children[t + 1];
99
99
  }
100
- function rt(i, t) {
101
- if (i.children && t > 0)
102
- return i.children[t - 1];
100
+ function nt(e, t) {
101
+ if (e.children && t > 0)
102
+ return e.children[t - 1];
103
103
  }
104
- function ct(i, t) {
105
- if (t < i.sections.length - 1)
106
- return i.sections[t + 1];
104
+ function ct(e, t) {
105
+ if (t < e.sections.length - 1)
106
+ return e.sections[t + 1];
107
107
  }
108
- function dt(i, t) {
108
+ function lt(e, t) {
109
109
  if (t > 0)
110
- return i.sections[t - 1];
110
+ return e.sections[t - 1];
111
111
  }
112
- function lt(i, t) {
113
- const s = f(t);
114
- function e(a) {
115
- for (let o = 0; o < a.sections.length; o++) {
116
- const n = a.sections[o];
117
- if (n.children)
118
- for (let r = 0; r < n.children.length; r++) {
119
- const c = n.children[r];
112
+ function dt(e, t) {
113
+ const o = y(t);
114
+ function i(a) {
115
+ for (let s = 0; s < a.sections.length; s++) {
116
+ const r = a.sections[s];
117
+ if (r.children)
118
+ for (let n = 0; n < r.children.length; n++) {
119
+ const c = r.children[n];
120
120
  if (c.children)
121
121
  for (let u = 0; u < c.children.length; u++) {
122
- const d = c.children[u];
123
- if (d.children)
124
- for (let l = 0; l < d.children.length; l++) {
125
- const y = d.children[l];
126
- if (y.id === i.id)
127
- if (l > 0) {
128
- const h = d.children[l - 1];
129
- return d.children[l - 1] = d.children[l], d.children[l] = h, !0;
122
+ const l = c.children[u];
123
+ if (l.children)
124
+ for (let d = 0; d < l.children.length; d++) {
125
+ const f = l.children[d];
126
+ if (f.id === e.id)
127
+ if (d > 0) {
128
+ const h = l.children[d - 1];
129
+ return l.children[d - 1] = l.children[d], l.children[d] = h, !0;
130
130
  } else {
131
131
  if (u > 0)
132
- return d.children.splice(l, 1), c.children[u - 1].children?.push(i), !0;
133
- if (r > 0) {
134
- d.children.splice(l, 1);
135
- const h = rt(n, r);
132
+ return l.children.splice(d, 1), c.children[u - 1].children?.push(e), !0;
133
+ if (n > 0) {
134
+ l.children.splice(d, 1);
135
+ const h = nt(r, n);
136
136
  if (h?.children && h.children.length > 0)
137
- return h.children[h.children.length - 1].children?.push(i), !0;
138
- } else if (o > 0) {
139
- d.children.splice(l, 1);
140
- const h = dt(a, o);
137
+ return h.children[h.children.length - 1].children?.push(e), !0;
138
+ } else if (s > 0) {
139
+ l.children.splice(d, 1);
140
+ const h = lt(a, s);
141
141
  if (h?.children && h.children.length > 0) {
142
142
  const g = h.children[h.children.length - 1];
143
143
  if (g.children && g.children.length > 0)
144
- return g.children[g.children.length - 1].children?.push(i), !0;
144
+ return g.children[g.children.length - 1].children?.push(e), !0;
145
145
  }
146
146
  }
147
147
  }
148
- if (y.tag === "arcgis-nav-card") {
149
- const h = y.properties?.sections;
150
- if (h && e({ sections: h }))
148
+ if (f.tag === "arcgis-nav-card") {
149
+ const h = f.properties?.sections;
150
+ if (h && i({ sections: h }))
151
151
  return !0;
152
152
  }
153
- if (y.children && m(y) && e({ sections: [{ children: [y] }] }))
153
+ if (f.children && m(f) && i({ sections: [{ children: [f] }] }))
154
154
  return !0;
155
155
  }
156
156
  }
@@ -158,50 +158,50 @@ function lt(i, t) {
158
158
  }
159
159
  return !1;
160
160
  }
161
- return e(s), s;
161
+ return i(o), o;
162
162
  }
163
- function ht(i, t) {
164
- const s = f(t);
165
- function e(a) {
166
- for (let o = 0; o < a.sections.length; o++) {
167
- const n = a.sections[o];
168
- if (n.children)
169
- for (let r = 0; r < n.children.length; r++) {
170
- const c = n.children[r];
163
+ function ht(e, t) {
164
+ const o = y(t);
165
+ function i(a) {
166
+ for (let s = 0; s < a.sections.length; s++) {
167
+ const r = a.sections[s];
168
+ if (r.children)
169
+ for (let n = 0; n < r.children.length; n++) {
170
+ const c = r.children[n];
171
171
  if (c.children)
172
172
  for (let u = 0; u < c.children.length; u++) {
173
- const d = c.children[u];
174
- if (d.children)
175
- for (let l = 0; l < d.children.length; l++) {
176
- const y = d.children[l];
177
- if (y.id === i.id)
178
- if (l < d.children.length - 1) {
179
- const h = d.children[l + 1];
180
- return d.children[l + 1] = d.children[l], d.children[l] = h, !0;
173
+ const l = c.children[u];
174
+ if (l.children)
175
+ for (let d = 0; d < l.children.length; d++) {
176
+ const f = l.children[d];
177
+ if (f.id === e.id)
178
+ if (d < l.children.length - 1) {
179
+ const h = l.children[d + 1];
180
+ return l.children[d + 1] = l.children[d], l.children[d] = h, !0;
181
181
  } else {
182
182
  if (u < c.children.length - 1)
183
- return d.children.splice(l, 1), c.children[u + 1].children?.unshift(i), !0;
184
- if (r < n.children.length - 1) {
185
- d.children.splice(l, 1);
186
- const h = nt(n, r);
183
+ return l.children.splice(d, 1), c.children[u + 1].children?.unshift(e), !0;
184
+ if (n < r.children.length - 1) {
185
+ l.children.splice(d, 1);
186
+ const h = rt(r, n);
187
187
  if (h?.children && h.children.length > 0)
188
- return h.children[0].children?.unshift(i), !0;
189
- } else if (o < a.sections.length - 1) {
190
- d.children.splice(l, 1);
191
- const h = ct(a, o);
188
+ return h.children[0].children?.unshift(e), !0;
189
+ } else if (s < a.sections.length - 1) {
190
+ l.children.splice(d, 1);
191
+ const h = ct(a, s);
192
192
  if (h?.children && h.children.length > 0) {
193
193
  const g = h.children[0];
194
194
  if (g.children && g.children.length > 0)
195
- return g.children[0].children?.unshift(i), !0;
195
+ return g.children[0].children?.unshift(e), !0;
196
196
  }
197
197
  }
198
198
  }
199
- if (y.tag === "arcgis-nav-card") {
200
- const h = y.properties?.sections;
201
- if (h && e({ sections: h }))
199
+ if (f.tag === "arcgis-nav-card") {
200
+ const h = f.properties?.sections;
201
+ if (h && i({ sections: h }))
202
202
  return !0;
203
203
  }
204
- if (y.children && m(y) && e({ sections: [{ children: [y] }] }))
204
+ if (f.children && m(f) && i({ sections: [{ children: [f] }] }))
205
205
  return !0;
206
206
  }
207
207
  }
@@ -209,93 +209,93 @@ function ht(i, t) {
209
209
  }
210
210
  return !1;
211
211
  }
212
- return e(s), s;
212
+ return i(o), o;
213
213
  }
214
- function ut(i, t) {
215
- const s = [];
216
- function e(a) {
214
+ function ut(e, t) {
215
+ const o = [];
216
+ function i(a) {
217
217
  if (a.nodeType === Node.ELEMENT_NODE) {
218
- const o = a;
219
- o.matches(t) && s.push(o);
220
- const n = o.shadowRoot;
221
- n && e(n);
222
- for (const r of Array.from(o.children))
223
- e(r);
218
+ const s = a;
219
+ s.matches(t) && o.push(s);
220
+ const r = s.shadowRoot;
221
+ r && i(r);
222
+ for (const n of Array.from(s.children))
223
+ i(n);
224
224
  } else if (a instanceof ShadowRoot)
225
- for (const o of Array.from(a.children))
226
- e(o);
225
+ for (const s of Array.from(a.children))
226
+ i(s);
227
227
  }
228
- return e(i), s;
228
+ return i(e), o;
229
229
  }
230
- const yt = /\{\{\s*variables\.([^.\s}]+)\.value\s*\}\}/gu;
231
- function ft(i) {
232
- const t = /* @__PURE__ */ new Set(), s = (e) => {
233
- if (typeof e == "string") {
234
- for (const a of e.matchAll(yt)) {
235
- const o = a[1];
236
- o && t.add(o);
230
+ const ft = /\{\{\s*variables\.([^.\s}]+)\.value\s*\}\}/gu;
231
+ function yt(e) {
232
+ const t = /* @__PURE__ */ new Set(), o = (i) => {
233
+ if (typeof i == "string") {
234
+ for (const a of i.matchAll(ft)) {
235
+ const s = a[1];
236
+ s && t.add(s);
237
237
  }
238
238
  return;
239
239
  }
240
- if (Array.isArray(e)) {
241
- e.forEach((a) => s(a));
240
+ if (Array.isArray(i)) {
241
+ i.forEach((a) => o(a));
242
242
  return;
243
243
  }
244
- e && typeof e == "object" && Object.values(e).forEach((a) => s(a));
244
+ i && typeof i == "object" && Object.values(i).forEach((a) => o(a));
245
245
  };
246
- return s(i), Array.from(t);
246
+ return o(e), Array.from(t);
247
247
  }
248
- function E(i, t) {
249
- const s = [], e = /* @__PURE__ */ new Set();
250
- if (!i.sections?.length)
251
- return s;
252
- const a = (o) => {
253
- const n = { ...o };
254
- delete n.children, n.tag === "arcgis-nav-card" && n.properties && (n.properties = { ...n.properties }, delete n.properties.sections), !e.has(o.id) && ft(n).includes(t) && (s.push(o), e.add(o.id));
248
+ function E(e, t) {
249
+ const o = [], i = /* @__PURE__ */ new Set();
250
+ if (!e.sections?.length)
251
+ return o;
252
+ const a = (s) => {
253
+ const r = { ...s };
254
+ delete r.children, r.tag === "arcgis-nav-card" && r.properties && (r.properties = { ...r.properties }, delete r.properties.sections), !i.has(s.id) && yt(r).includes(t) && (o.push(s), i.add(s.id));
255
255
  };
256
- for (const o of i.sections)
257
- if (a(o), !!o.children) {
258
- for (const n of o.children)
259
- if (a(n), !!n.children) {
260
- for (const r of n.children)
261
- if (a(r), !!r.children)
262
- for (const c of r.children) {
256
+ for (const s of e.sections)
257
+ if (a(s), !!s.children) {
258
+ for (const r of s.children)
259
+ if (a(r), !!r.children) {
260
+ for (const n of r.children)
261
+ if (a(n), !!n.children)
262
+ for (const c of n.children) {
263
263
  if (a(c), c.tag === "arcgis-nav-card") {
264
264
  const u = c.properties?.sections;
265
265
  E(
266
266
  { sections: u || [] },
267
267
  t
268
- ).forEach((l) => a(l));
268
+ ).forEach((d) => a(d));
269
269
  }
270
270
  m(c) && c.children && E(
271
271
  {
272
272
  sections: [{ children: [c] }]
273
273
  },
274
274
  t
275
- ).forEach((d) => a(d));
275
+ ).forEach((l) => a(l));
276
276
  }
277
277
  }
278
278
  }
279
- return s;
279
+ return o;
280
280
  }
281
- function k(i) {
282
- const t = f(i);
283
- return Object.keys(t.variables || {}).forEach((e) => {
284
- E(t, e).length === 0 && delete t.variables?.[e];
281
+ function P(e) {
282
+ const t = y(e);
283
+ return Object.keys(t.variables || {}).forEach((i) => {
284
+ E(t, i).length === 0 && delete t.variables?.[i];
285
285
  }), t;
286
286
  }
287
- function gt(i, t) {
288
- let s = f(t);
289
- const e = L(s, i);
290
- if (e) {
291
- const a = A(e, s);
287
+ function gt(e, t) {
288
+ let o = y(t);
289
+ const i = v(o, e);
290
+ if (i) {
291
+ const a = S(i, o);
292
292
  if (a) {
293
- const { column: o, index: n } = a;
294
- o.children?.splice(n, 1);
293
+ const { column: s, index: r } = a;
294
+ s.children?.splice(r, 1);
295
295
  }
296
- s = k(s);
296
+ o = P(o);
297
297
  }
298
- return s;
298
+ return o;
299
299
  }
300
300
  class pt extends T {
301
301
  constructor() {
@@ -309,11 +309,11 @@ class pt extends T {
309
309
  }
310
310
  });
311
311
  }, this._resetLayout = async (t) => {
312
- t.stopPropagation(), this._isConfirmResetDialogOpen = !0, this.hubTelemetry.emit(b.category.interaction.action.open.label.modal.details.resetToDefault);
312
+ t.stopPropagation(), this._isConfirmResetDialogOpen = !0, this.hubTelemetry.emit(L.category.interaction.action.open.label.modal.details.resetToDefault);
313
313
  }, this._confirmResetLayout = () => {
314
314
  this._hideConfirmResetDialog(), this.arcgisHubLayoutReset.emit({
315
315
  successCallback: () => {
316
- this._isLayoutDirty = !0, this.hubTelemetry.emit(b.category.interaction.action.select.label.layout.details.default);
316
+ this._isLayoutDirty = !0, this.hubTelemetry.emit(L.category.interaction.action.select.label.layout.details.default);
317
317
  }
318
318
  });
319
319
  }, this._handleCloseEditPanel = async () => {
@@ -323,15 +323,15 @@ class pt extends T {
323
323
  await this._updateLayoutNode(this._nodeBeforeEdit.id, "properties", this._nodeBeforeEdit.properties, void 0, !0);
324
324
  }
325
325
  this._isEditPanelOpen = !1, this._nodeBeforeEdit = void 0, this.hubTelemetry.emit({
326
- ...b.category.interaction.action.close.label.sidePanel,
326
+ ...L.category.interaction.action.close.label.sidePanel,
327
327
  details: this._layoutNodeEditorConfig?.layoutNodeConfig?.name || "unknown"
328
328
  });
329
329
  }, this._setlayoutNodeEditorRef = async (t) => {
330
- await this.updateComplete, await new Promise((s) => setTimeout(s, 100)), this.#t.setValue({
330
+ await this.updateComplete, await new Promise((o) => setTimeout(o, 100)), this.#t.setValue({
331
331
  ...this._layoutContext,
332
332
  layoutNodeEditorRef: t
333
333
  });
334
- }, this._isConfirmResetDialogOpen = !1, this._liveAnnouncement = void 0, this._layoutErrors = [], this._historyStack = [], this._historyIdx = -1, this._isLayoutDirty = !1, this._isLayoutValid = !0, this._isEditPanelOpen = !1, this.debug = !1, this.isEditMode = !1, this.isPublishing = !1, this.options = {}, this.arcgisHubLayoutChanged = v(), this.arcgisHubLayoutEditorExit = v(), this.arcgisHubLayoutPublished = v(), this.arcgisHubLayoutReset = v(), this.hubTelemetry = v(), this.listen("arcgisLayoutActivateNode", (t) => {
334
+ }, this._isConfirmResetDialogOpen = !1, this._liveAnnouncement = void 0, this._layoutErrors = [], this._historyStack = [], this._historyIdx = -1, this._isLayoutDirty = !1, this._isLayoutValid = !0, this._isEditPanelOpen = !1, this.debug = !1, this.isEditMode = !1, this.isPublishing = !1, this.options = {}, this.arcgisHubLayoutChanged = b(), this.arcgisHubLayoutEditorExit = b(), this.arcgisHubLayoutPublished = b(), this.arcgisHubLayoutReset = b(), this.hubTelemetry = b(), this.listen("arcgisLayoutActivateNode", (t) => {
335
335
  this._handleNodeActivate(t);
336
336
  }), this.listen("arcgisLayoutDeactivateNode", (t) => {
337
337
  this._handleNodeDeactivate(t);
@@ -375,8 +375,8 @@ class pt extends T {
375
375
  this._initShell();
376
376
  }
377
377
  willUpdate(t) {
378
- (t.has("layout") || t.has("options")) && this._init(), this.hasUpdated && t.has("isEditMode") && (this._activatedNode = void 0, this._layoutNodeEditorConfig = void 0, this.updateEditModeAnnouncement(), this.isEditMode && ut(this._layoutRef.value, "arcgis-hub-gallery, arcgis-hub-image").forEach((e) => {
379
- e.lazy = !1;
378
+ (t.has("layout") || t.has("options")) && this._init(), this.hasUpdated && t.has("isEditMode") && (this._activatedNode = void 0, this._layoutNodeEditorConfig = void 0, this.updateEditModeAnnouncement(), this.isEditMode && ut(this._layoutRef.value, "arcgis-hub-gallery, arcgis-hub-image").forEach((i) => {
379
+ i.lazy = !1;
380
380
  })), (!this.hasUpdated || t.has("_processedLayout") || t.has("_isLayoutValid")) && this.#t.setValue(this._layoutContext);
381
381
  }
382
382
  _hideConfirmResetDialog() {
@@ -388,88 +388,88 @@ class pt extends T {
388
388
  }
389
389
  async _init() {
390
390
  const t = await at(this.layout);
391
- this._layout = f(t), this._processedLayout = await this._validateAndProcess(this._layout, this.options), this._historyStack = [this._processedLayout], this._historyIdx = 0;
391
+ this._layout = y(t), this._processedLayout = await this._validateAndProcess(this._layout, this.options), this._historyStack = [this._processedLayout], this._historyIdx = 0;
392
392
  }
393
393
  async getUpdateComplete() {
394
394
  const t = await super.getUpdateComplete();
395
- return await this._layoutRef.value?.updateComplete, await new Promise((s) => setTimeout(s, 150)), t;
395
+ return await this._layoutRef.value?.updateComplete, await new Promise((o) => setTimeout(o, 150)), t;
396
396
  }
397
397
  async updateEditModeAnnouncement() {
398
398
  this._liveAnnouncement = "";
399
399
  const t = this.isEditMode ? this._messages.editModeActivatedLiveRegion : this._messages.editModeDeactivatedLiveRegion;
400
400
  await this.updateComplete, this._liveAnnouncement = t;
401
401
  }
402
- async _updateLayoutNode(t, s, e, a, o, n) {
403
- let r = f(this._layout);
404
- const c = L(r, t);
405
- c && (j(s, e, c), a && (r.variables = {
406
- ...r.variables,
402
+ async _updateLayoutNode(t, o, i, a, s, r) {
403
+ let n = y(this._layout);
404
+ const c = v(n, t);
405
+ c && (j(o, i, c), a && (n.variables = {
406
+ ...n.variables,
407
407
  ...a
408
- }), r = k(r), this._layout = r, this._processedLayout = await this._validateAndProcess(r, this.options), this._activatedNode = L(this._processedLayout, t), this._historyIdx < this._historyStack.length - 1 && (this._historyStack = this._historyStack.slice(0, this._historyIdx + 1)), this._historyStack.push(this._processedLayout), this._historyIdx = this._historyStack.length - 1, this._isLayoutValid = o, this._isNodeDirty = !0, this._isLayoutDirty = !0, n && n());
408
+ }), n = P(n), this._layout = n, this._processedLayout = await this._validateAndProcess(n, this.options), this._activatedNode = v(this._processedLayout, t), this._historyIdx < this._historyStack.length - 1 && (this._historyStack = this._historyStack.slice(0, this._historyIdx + 1)), this._historyStack.push(this._processedLayout), this._historyIdx = this._historyStack.length - 1, this._isLayoutValid = s, this._isNodeDirty = !0, this._isLayoutDirty = !0, r && r());
409
409
  }
410
410
  _handleNodeActivate(t) {
411
- const { node: s } = t.detail;
412
- this._activatedNode = s;
411
+ const { node: o } = t.detail;
412
+ this._activatedNode = o;
413
413
  }
414
414
  _handleNodeDeactivate(t) {
415
415
  t.detail.node.id === this._activatedNode?.id && (this._activatedNode = void 0);
416
416
  }
417
417
  async _handleLayoutNodeEditorChange(t) {
418
- const { layoutNodeConfig: s, id: e, values: a, valid: o } = t.detail, n = L(this._layout, e);
419
- if (n) {
420
- const c = (U(s, "editor.valuesOutCallback") || ((l) => l))(a, { nodeId: e, valid: o }), u = c.variables;
418
+ const { layoutNodeConfig: o, id: i, values: a, valid: s } = t.detail, r = v(this._layout, i);
419
+ if (r) {
420
+ const c = (U(o, "editor.valuesOutCallback") || ((d) => d))(a, { nodeId: i, valid: s }), u = c.variables;
421
421
  delete c.variables;
422
- const d = n.properties || {};
423
- n.properties = B(d, c), await this._updateLayoutNode(e, "properties", n.properties, u, o, () => {
422
+ const l = r.properties || {};
423
+ r.properties = B(l, c), await this._updateLayoutNode(i, "properties", r.properties, u, s, () => {
424
424
  this.arcgisHubLayoutChanged.emit();
425
425
  });
426
426
  }
427
427
  }
428
428
  async _handleLayoutNodeVisibilityChange(t) {
429
- const { id: s } = t.detail, e = L(this._layout, s);
430
- e && (e.visibility || (e.visibility = { kind: "static", isHidden: !1 }), e.visibility.kind === "static" && await this._updateLayoutNode(s, "visibility", { ...e.visibility, isHidden: !e.visibility.isHidden }, void 0, !0, () => {
429
+ const { id: o } = t.detail, i = v(this._layout, o);
430
+ i && (i.visibility || (i.visibility = { kind: "static", isHidden: !1 }), i.visibility.kind === "static" && await this._updateLayoutNode(o, "visibility", { ...i.visibility, isHidden: !i.visibility.isHidden }, void 0, !0, () => {
431
431
  this.arcgisHubLayoutChanged.emit();
432
432
  }));
433
433
  }
434
- async _validateAndProcess(t, s) {
435
- const e = it(t);
436
- return this._layoutErrors = e, e.length > 0 && !this.debug && _.error("Layout validation errors:", e), await G(t, { ...s }, this._context);
434
+ async _validateAndProcess(t, o) {
435
+ const i = et(t);
436
+ return this._layoutErrors = i, i.length > 0 && !this.debug && _.error("Layout validation errors:", i), await G(t, { ...o }, this._context);
437
437
  }
438
438
  _handleLayoutNodeEditorOpen(t) {
439
- const { node: s, element: e } = t.detail;
440
- this.openLayoutNodeEditor(e, s);
439
+ const { node: o, element: i } = t.detail;
440
+ this.openLayoutNodeEditor(i, o);
441
441
  }
442
- openLayoutNodeEditor(t, s) {
442
+ openLayoutNodeEditor(t, o) {
443
443
  this._isEditPanelOpen = !0;
444
- let e = J(t.tagName.toLowerCase(), this._layoutContext, this._context);
445
- e && (e = K(this._messages, e)), this._layoutNodeEditorConfig = {
446
- layoutNodeConfig: f(e),
447
- layoutNode: f(s)
448
- }, this._nodeBeforeEdit = f(this._activatedNode);
444
+ let i = J(t.tagName.toLowerCase(), this._layoutContext, this._context);
445
+ i && (i = K(this._messages, i)), this._layoutNodeEditorConfig = {
446
+ layoutNodeConfig: y(i),
447
+ layoutNode: y(o)
448
+ }, this._nodeBeforeEdit = y(this._activatedNode);
449
449
  }
450
450
  async _handleLayoutAddNode(t) {
451
451
  _.debug("Add node event:", t.detail.config.tag);
452
- const s = f(this._layout), { column: e, index: a } = A(t.detail.adjacentNode, s);
453
- _.debug("Found column and index:", e, a);
454
- const o = {
452
+ const o = y(this._layout), { column: i, index: a } = S(t.detail.adjacentNode, o);
453
+ _.debug("Found column and index:", i, a);
454
+ const s = {
455
455
  id: z(),
456
456
  tag: t.detail.config.tag,
457
457
  properties: t.detail.config.defaults
458
458
  };
459
- e.children?.splice(a + 1, 0, o), this._layout = s, this._processedLayout = await this._validateAndProcess(s, this.options), await this.updateComplete, this._activatedNode = o;
460
- const n = await this._layoutRef.value?.getCardEl(o.id);
461
- this.openLayoutNodeEditor(n, this._activatedNode), this._historyIdx < this._historyStack.length - 1 && (this._historyStack = this._historyStack.slice(0, this._historyIdx + 1)), this._historyStack.push(this._processedLayout), this._historyIdx = this._historyStack.length - 1, this._isLayoutDirty = !0, this.arcgisHubLayoutChanged.emit(), this.hubTelemetry.emit({
462
- ...b.category.interaction.action.select.label.layoutNode,
459
+ i.children?.splice(a + 1, 0, s), this._layout = o, this._processedLayout = await this._validateAndProcess(o, this.options), await this.updateComplete, this._activatedNode = s;
460
+ const r = await this._layoutRef.value?.getCardEl(s.id);
461
+ this.openLayoutNodeEditor(r, this._activatedNode), this._historyIdx < this._historyStack.length - 1 && (this._historyStack = this._historyStack.slice(0, this._historyIdx + 1)), this._historyStack.push(this._processedLayout), this._historyIdx = this._historyStack.length - 1, this._isLayoutDirty = !0, this.arcgisHubLayoutChanged.emit(), this.hubTelemetry.emit({
462
+ ...L.category.interaction.action.select.label.layoutNode,
463
463
  details: t.detail.config.name
464
464
  });
465
465
  }
466
466
  async _handleLayoutRepositionNode(t) {
467
- _.debug("Reposition node event:", t.detail.node.id, t.detail.direction), this._activatedNode = void 0, t.detail.direction === "up" ? (_.debug("Moving node up..."), this._layout = lt(t.detail.node, this._layout)) : (_.debug("Moving node down..."), this._layout = ht(t.detail.node, this._layout)), this._processedLayout = await this._validateAndProcess(this._layout, this.options), await this.updateComplete, this._activatedNode = t.detail.node, (await this._layoutRef.value?.getCardEl(t.detail.node.id))?.scrollIntoView({ behavior: "smooth", block: "nearest" }), this._historyIdx < this._historyStack.length - 1 && (this._historyStack = this._historyStack.slice(0, this._historyIdx + 1)), this._historyStack.push(this._processedLayout), this._historyIdx = this._historyStack.length - 1, this._isLayoutDirty = !0, this.arcgisHubLayoutChanged.emit();
467
+ _.debug("Reposition node event:", t.detail.node.id, t.detail.direction), this._activatedNode = void 0, t.detail.direction === "up" ? (_.debug("Moving node up..."), this._layout = dt(t.detail.node, this._layout)) : (_.debug("Moving node down..."), this._layout = ht(t.detail.node, this._layout)), this._processedLayout = await this._validateAndProcess(this._layout, this.options), await this.updateComplete, this._activatedNode = t.detail.node, (await this._layoutRef.value?.getCardEl(t.detail.node.id))?.scrollIntoView({ behavior: "smooth", block: "nearest" }), this._historyIdx < this._historyStack.length - 1 && (this._historyStack = this._historyStack.slice(0, this._historyIdx + 1)), this._historyStack.push(this._processedLayout), this._historyIdx = this._historyStack.length - 1, this._isLayoutDirty = !0, this.arcgisHubLayoutChanged.emit();
468
468
  }
469
469
  async _handleLayoutDeleteNode(t) {
470
470
  _.debug("Delete node event:", t.detail.id);
471
- const { id: s } = t.detail, e = gt(s, this._layout);
472
- this._layout = e, this._processedLayout = await this._validateAndProcess(e, this.options), this._activatedNode = void 0, this._handleCloseEditPanel(), this._historyIdx < this._historyStack.length - 1 && (this._historyStack = this._historyStack.slice(0, this._historyIdx + 1)), this._historyStack.push(this._processedLayout), this._historyIdx = this._historyStack.length - 1, this._isLayoutDirty = !0, this.arcgisHubLayoutChanged.emit();
471
+ const { id: o } = t.detail, i = gt(o, this._layout);
472
+ this._layout = i, this._processedLayout = await this._validateAndProcess(i, this.options), this._activatedNode = void 0, this._handleCloseEditPanel(), this._historyIdx < this._historyStack.length - 1 && (this._historyStack = this._historyStack.slice(0, this._historyIdx + 1)), this._historyStack.push(this._processedLayout), this._historyIdx = this._historyStack.length - 1, this._isLayoutDirty = !0, this.arcgisHubLayoutChanged.emit();
473
473
  }
474
474
  renderEditToolbar() {
475
475
  let t;
@@ -478,8 +478,8 @@ class pt extends T {
478
478
  renderEditor() {
479
479
  let t;
480
480
  if (this.isEditMode) {
481
- const s = this._layoutNodeEditorConfig;
482
- t = p`<calcite-shell-panel .collapsed=${!this._isEditPanelOpen} position=end slot=panel-end><calcite-panel .heading=${F(s || {}, "layoutNodeConfig.i18n.label", this._messages.configurableNodes.default.label)} id=editor-panel ${R(this._setlayoutNodeEditorRef)}>${s?.layoutNodeConfig?.editor && p`<calcite-action class="panel-close" icon=x @click=${this._handleCloseEditPanel} slot=header-actions-end .text=${this._messages.close}></calcite-action>${$(s.layoutNode.id, p`<arcgis-layout-node-editor .layoutNodeConfig=${s.layoutNodeConfig} .node=${s.layoutNode}></arcgis-layout-node-editor>`)}` || ""}</calcite-panel></calcite-shell-panel>`;
481
+ const o = this._layoutNodeEditorConfig;
482
+ t = p`<calcite-shell-panel .collapsed=${!this._isEditPanelOpen} position=end slot=panel-end><calcite-panel .heading=${F(o || {}, "layoutNodeConfig.i18n.label", this._messages.configurableNodes.default.label)} id=editor-panel ${R(this._setlayoutNodeEditorRef)}>${o?.layoutNodeConfig?.editor && p`<calcite-action class="panel-close" icon=x @click=${this._handleCloseEditPanel} slot=header-actions-end .text=${this._messages.close}></calcite-action>${$(o.layoutNode.id, p`<arcgis-layout-node-editor .layoutNodeConfig=${o.layoutNodeConfig} .node=${o.layoutNode}></arcgis-layout-node-editor>`)}` || ""}</calcite-panel></calcite-shell-panel>`;
483
483
  }
484
484
  return t;
485
485
  }