@coolms/ui-react 0.1.0-alpha.15 → 0.1.0-alpha.17
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/CHANGELOG.md +19 -0
- package/design-tokens.lock.json +5 -5
- package/dist/components/Collections.d.ts +4 -3
- package/dist/components/FileViewer.d.ts +40 -0
- package/dist/components/Icon.d.ts +1 -1
- package/dist/components/Notification.d.ts +38 -0
- package/dist/components/PaneToolbar.d.ts +6 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.js +952 -831
- package/kit.contract.json +5 -1
- package/package.json +1 -1
- package/src/kit.css +34 -4
- package/src/tokens/coolms-tokens.css +10 -0
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useId as
|
|
1
|
+
import { jsx as e, jsxs as d, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { useId as q, useState as D, useRef as R, useEffect as J, useCallback as be, useMemo as Pe, useLayoutEffect as ke } from "react";
|
|
3
3
|
import { createPortal as xe } from "react-dom";
|
|
4
4
|
function re(n, l) {
|
|
5
5
|
const t = { ...n };
|
|
6
|
-
for (const
|
|
7
|
-
const m = l == null ? void 0 : l[
|
|
8
|
-
m !== void 0 && (t[
|
|
6
|
+
for (const o of Object.keys(l ?? {})) {
|
|
7
|
+
const m = l == null ? void 0 : l[o];
|
|
8
|
+
m !== void 0 && (t[o] = m);
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function T(...n) {
|
|
13
13
|
return n.filter(Boolean).join(" ");
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function z({ name: n }) {
|
|
16
16
|
const l = { width: 16, height: 16, viewBox: "0 0 16 16", "aria-hidden": !0, focusable: !1 };
|
|
17
17
|
switch (n) {
|
|
18
18
|
case "lock":
|
|
@@ -31,34 +31,34 @@ function U({ name: n }) {
|
|
|
31
31
|
return /* @__PURE__ */ e("svg", { ...l, className: "cms-glyph", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1Zm0 5.5a1 1 0 0 0-1 1V11a1 1 0 1 0 2 0V7.5a1 1 0 0 0-1-1ZM8 4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z" }) });
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function ne({
|
|
35
35
|
variant: n = "secondary",
|
|
36
36
|
busy: l = !1,
|
|
37
37
|
busyLabel: t,
|
|
38
|
-
locked:
|
|
38
|
+
locked: o = !1,
|
|
39
39
|
lockedReason: m,
|
|
40
40
|
icon: s,
|
|
41
41
|
disabled: r,
|
|
42
|
-
className:
|
|
43
|
-
children:
|
|
44
|
-
type:
|
|
45
|
-
title:
|
|
46
|
-
...
|
|
42
|
+
className: i,
|
|
43
|
+
children: u,
|
|
44
|
+
type: b = "button",
|
|
45
|
+
title: c,
|
|
46
|
+
...h
|
|
47
47
|
}) {
|
|
48
48
|
const a = !!r || l;
|
|
49
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ d(
|
|
50
50
|
"button",
|
|
51
51
|
{
|
|
52
|
-
...
|
|
53
|
-
type:
|
|
54
|
-
className:
|
|
52
|
+
...h,
|
|
53
|
+
type: b,
|
|
54
|
+
className: T("cms-button", `cms-button--${n}`, l && "is-busy", o && "is-locked", i),
|
|
55
55
|
disabled: a,
|
|
56
56
|
"aria-busy": l || void 0,
|
|
57
|
-
title:
|
|
57
|
+
title: o ? m ?? c : c,
|
|
58
58
|
children: [
|
|
59
|
-
l ? /* @__PURE__ */ e(
|
|
60
|
-
/* @__PURE__ */ e("span", { className: "cms-button__label", children: l && t !== void 0 ? t :
|
|
61
|
-
|
|
59
|
+
l ? /* @__PURE__ */ e(z, { name: "spinner" }) : o ? /* @__PURE__ */ e(z, { name: "lock" }) : s,
|
|
60
|
+
/* @__PURE__ */ e("span", { className: "cms-button__label", children: l && t !== void 0 ? t : u }),
|
|
61
|
+
o && m ? /* @__PURE__ */ d("span", { className: "cms-visually-hidden", children: [
|
|
62
62
|
", ",
|
|
63
63
|
m
|
|
64
64
|
] }) : null
|
|
@@ -66,16 +66,16 @@ function ee({
|
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
|
-
function Ce({ id: n, label: l, help: t, error:
|
|
70
|
-
return /* @__PURE__ */
|
|
69
|
+
function Ce({ id: n, label: l, help: t, error: o, pinned: m, children: s }) {
|
|
70
|
+
return /* @__PURE__ */ d("div", { className: T("cms-field", o != null && "is-invalid"), children: [
|
|
71
71
|
/* @__PURE__ */ e("label", { className: "cms-field__label", htmlFor: n, children: l }),
|
|
72
72
|
s,
|
|
73
|
-
m != null ? /* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */ e(
|
|
73
|
+
m != null ? /* @__PURE__ */ d("p", { className: "cms-field__pinned", id: `${n}-pinned`, children: [
|
|
74
|
+
/* @__PURE__ */ e(z, { name: "lock" }),
|
|
75
75
|
" ",
|
|
76
76
|
m
|
|
77
77
|
] }) : null,
|
|
78
|
-
|
|
78
|
+
o != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${n}-error`, role: "alert", children: o }) : null,
|
|
79
79
|
t != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${n}-help`, children: t }) : null
|
|
80
80
|
] });
|
|
81
81
|
}
|
|
@@ -85,25 +85,25 @@ function Me(n, l) {
|
|
|
85
85
|
}
|
|
86
86
|
const Fe = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, Be = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
|
|
87
87
|
function Ke(n, l, t) {
|
|
88
|
-
const
|
|
89
|
-
const
|
|
90
|
-
return
|
|
88
|
+
const o = (s, r, i, u = 0, b = 0, c = 0) => {
|
|
89
|
+
const h = new Date(Date.UTC(s, r - 1, i, u, b, c));
|
|
90
|
+
return h.setUTCFullYear(s), h.getUTCFullYear() === s && h.getUTCMonth() === r - 1 && h.getUTCDate() === i && h.getUTCHours() === u && h.getUTCMinutes() === b && h.getUTCSeconds() === c ? h : null;
|
|
91
91
|
}, m = (s) => ({ hour: Number(s[1]), minute: Number(s[2]), second: Number(s[3] ?? 0) });
|
|
92
92
|
try {
|
|
93
93
|
if (n === "time") {
|
|
94
94
|
const r = l.match(Be);
|
|
95
95
|
if (r === null) return l;
|
|
96
|
-
const
|
|
97
|
-
return
|
|
96
|
+
const i = m(r), u = o(2e3, 1, 1, i.hour, i.minute, i.second);
|
|
97
|
+
return u === null ? l : new Intl.DateTimeFormat(t, { timeStyle: r[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(u);
|
|
98
98
|
}
|
|
99
99
|
const s = l.match(Fe);
|
|
100
100
|
if (s === null) return l;
|
|
101
101
|
if (n === "date" && s[4] === void 0) {
|
|
102
|
-
const r =
|
|
102
|
+
const r = o(Number(s[1]), Number(s[2]), Number(s[3]));
|
|
103
103
|
return r === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeZone: "UTC" }).format(r);
|
|
104
104
|
}
|
|
105
105
|
if (n === "datetime-local" && s[4] !== void 0) {
|
|
106
|
-
const r =
|
|
106
|
+
const r = o(Number(s[1]), Number(s[2]), Number(s[3]), Number(s[4]), Number(s[5]), Number(s[6] ?? 0));
|
|
107
107
|
return r === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeStyle: s[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(r);
|
|
108
108
|
}
|
|
109
109
|
} catch {
|
|
@@ -112,93 +112,93 @@ function Ke(n, l, t) {
|
|
|
112
112
|
return l;
|
|
113
113
|
}
|
|
114
114
|
const He = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
|
|
115
|
-
function
|
|
116
|
-
const
|
|
117
|
-
return /* @__PURE__ */ e(Ce, { id:
|
|
115
|
+
function yn({ label: n, help: l, error: t, disabled: o, readOnly: m, pinned: s, value: r, onChange: i, placeholder: u, type: b = "text", name: c, locale: h, min: a, max: g, step: p, minLength: v, maxLength: N, required: k }) {
|
|
116
|
+
const x = q(), M = m === !0 || s != null, C = M && He.has(b), U = b === "number" && (p === "any" || typeof p == "number" && !Number.isInteger(p));
|
|
117
|
+
return /* @__PURE__ */ e(Ce, { id: x, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
|
|
118
118
|
"input",
|
|
119
119
|
{
|
|
120
|
-
id:
|
|
121
|
-
name:
|
|
122
|
-
type:
|
|
120
|
+
id: x,
|
|
121
|
+
name: c,
|
|
122
|
+
type: C ? "text" : b,
|
|
123
123
|
className: "cms-input",
|
|
124
|
-
value:
|
|
125
|
-
...
|
|
126
|
-
lang:
|
|
127
|
-
placeholder:
|
|
128
|
-
disabled:
|
|
129
|
-
readOnly:
|
|
130
|
-
required:
|
|
131
|
-
"aria-required":
|
|
132
|
-
min:
|
|
133
|
-
max:
|
|
134
|
-
step:
|
|
124
|
+
value: C ? Ke(b, r, h) : r,
|
|
125
|
+
...C ? { "data-value": r } : {},
|
|
126
|
+
lang: h,
|
|
127
|
+
placeholder: u,
|
|
128
|
+
disabled: o,
|
|
129
|
+
readOnly: M,
|
|
130
|
+
required: k,
|
|
131
|
+
"aria-required": k || void 0,
|
|
132
|
+
min: C ? void 0 : a,
|
|
133
|
+
max: C ? void 0 : g,
|
|
134
|
+
step: C ? void 0 : p,
|
|
135
135
|
minLength: v,
|
|
136
|
-
maxLength:
|
|
137
|
-
inputMode:
|
|
136
|
+
maxLength: N,
|
|
137
|
+
inputMode: b === "number" ? U ? "decimal" : "numeric" : void 0,
|
|
138
138
|
"aria-invalid": t != null || void 0,
|
|
139
|
-
"aria-describedby": Me(
|
|
140
|
-
onChange: (K) =>
|
|
139
|
+
"aria-describedby": Me(x, { help: l, error: t, pinned: s }),
|
|
140
|
+
onChange: (K) => i == null ? void 0 : i(K.target.value)
|
|
141
141
|
}
|
|
142
142
|
) });
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
const v =
|
|
144
|
+
function wn({ label: n, help: l, error: t, disabled: o, readOnly: m, pinned: s, value: r, onChange: i, placeholder: u, rows: b = 4, name: c, locale: h, minLength: a, maxLength: g, required: p }) {
|
|
145
|
+
const v = q();
|
|
146
146
|
return /* @__PURE__ */ e(Ce, { id: v, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
|
|
147
147
|
"textarea",
|
|
148
148
|
{
|
|
149
149
|
id: v,
|
|
150
|
-
name:
|
|
150
|
+
name: c,
|
|
151
151
|
className: "cms-input cms-textarea",
|
|
152
|
-
rows:
|
|
152
|
+
rows: b,
|
|
153
153
|
value: r,
|
|
154
|
-
lang:
|
|
155
|
-
placeholder:
|
|
156
|
-
disabled:
|
|
154
|
+
lang: h,
|
|
155
|
+
placeholder: u,
|
|
156
|
+
disabled: o,
|
|
157
157
|
readOnly: m === !0 || s != null,
|
|
158
|
-
required:
|
|
159
|
-
"aria-required":
|
|
158
|
+
required: p,
|
|
159
|
+
"aria-required": p || void 0,
|
|
160
160
|
minLength: a,
|
|
161
161
|
maxLength: g,
|
|
162
162
|
"aria-invalid": t != null || void 0,
|
|
163
163
|
"aria-describedby": Me(v, { help: l, error: t, pinned: s }),
|
|
164
|
-
onChange: (
|
|
164
|
+
onChange: (N) => i == null ? void 0 : i(N.target.value)
|
|
165
165
|
}
|
|
166
166
|
) });
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
const
|
|
170
|
-
return /* @__PURE__ */ e(Ce, { id:
|
|
168
|
+
function kn({ label: n, help: l, error: t, disabled: o, readOnly: m, value: s, options: r, onChange: i, emptyText: u = "Nothing to choose from yet.", name: b }) {
|
|
169
|
+
const c = q(), h = r.length === 0;
|
|
170
|
+
return /* @__PURE__ */ e(Ce, { id: c, label: n, help: h ? u : l, error: t, children: /* @__PURE__ */ e(
|
|
171
171
|
"select",
|
|
172
172
|
{
|
|
173
|
-
id:
|
|
174
|
-
name:
|
|
173
|
+
id: c,
|
|
174
|
+
name: b,
|
|
175
175
|
className: "cms-input cms-select",
|
|
176
176
|
value: s,
|
|
177
|
-
disabled:
|
|
177
|
+
disabled: o || h,
|
|
178
178
|
"aria-readonly": m || void 0,
|
|
179
179
|
"aria-invalid": t != null || void 0,
|
|
180
|
-
"aria-describedby": Me(
|
|
180
|
+
"aria-describedby": Me(c, { help: h ? u : l, error: t }),
|
|
181
181
|
onChange: (a) => {
|
|
182
|
-
m ||
|
|
182
|
+
m || i == null || i(a.target.value);
|
|
183
183
|
},
|
|
184
184
|
children: r.map((a) => /* @__PURE__ */ e("option", { value: a.value, disabled: m && a.value !== s, children: a.label }, a.value))
|
|
185
185
|
}
|
|
186
186
|
) });
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
const r =
|
|
190
|
-
return /* @__PURE__ */
|
|
188
|
+
function xn({ label: n, checked: l, onChange: t, disabled: o, readOnly: m, help: s }) {
|
|
189
|
+
const r = q();
|
|
190
|
+
return /* @__PURE__ */ d("div", { className: "cms-toggle-row", children: [
|
|
191
191
|
/* @__PURE__ */ e(
|
|
192
192
|
"button",
|
|
193
193
|
{
|
|
194
194
|
id: r,
|
|
195
195
|
type: "button",
|
|
196
196
|
role: "switch",
|
|
197
|
-
className:
|
|
197
|
+
className: T("cms-toggle", l && "is-on"),
|
|
198
198
|
"aria-checked": l,
|
|
199
199
|
"aria-readonly": m || void 0,
|
|
200
200
|
"aria-describedby": s != null ? `${r}-help` : void 0,
|
|
201
|
-
disabled:
|
|
201
|
+
disabled: o,
|
|
202
202
|
onClick: () => {
|
|
203
203
|
m || t == null || t(!l);
|
|
204
204
|
},
|
|
@@ -209,58 +209,58 @@ function kn({ label: n, checked: l, onChange: t, disabled: c, readOnly: m, help:
|
|
|
209
209
|
s != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${r}-help`, children: s }) : null
|
|
210
210
|
] });
|
|
211
211
|
}
|
|
212
|
-
const
|
|
213
|
-
function Le({ open: n, title: l, onClose: t, dirty:
|
|
214
|
-
const [
|
|
215
|
-
if (
|
|
212
|
+
const Oe = 150;
|
|
213
|
+
function Le({ open: n, title: l, onClose: t, dirty: o = !1, onDirtyClose: m, children: s, footer: r, closeLabel: i = "Close", initialFocus: u, className: b }) {
|
|
214
|
+
const [c, h] = D(n), [a, g] = D(!1), p = R(null), v = R(null), N = q();
|
|
215
|
+
if (J(() => {
|
|
216
216
|
if (n) {
|
|
217
|
-
v.current = document.activeElement,
|
|
217
|
+
v.current = document.activeElement, h(!0), g(!1);
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
|
-
if (!
|
|
220
|
+
if (!c) return;
|
|
221
221
|
g(!0);
|
|
222
|
-
const
|
|
223
|
-
var
|
|
224
|
-
|
|
225
|
-
},
|
|
226
|
-
return () => window.clearTimeout(
|
|
227
|
-
}, [n,
|
|
228
|
-
var
|
|
229
|
-
if (n &&
|
|
230
|
-
const
|
|
231
|
-
(
|
|
222
|
+
const x = window.setTimeout(() => {
|
|
223
|
+
var M, C;
|
|
224
|
+
h(!1), g(!1), (C = (M = v.current) == null ? void 0 : M.focus) == null || C.call(M);
|
|
225
|
+
}, Oe);
|
|
226
|
+
return () => window.clearTimeout(x);
|
|
227
|
+
}, [n, c]), J(() => {
|
|
228
|
+
var x, M;
|
|
229
|
+
if (n && c) {
|
|
230
|
+
const C = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
|
|
231
|
+
(M = (u == null ? void 0 : u.current) ?? ((x = p.current) == null ? void 0 : x.querySelector(`.cms-modal__body :is(${C}), .cms-modal__foot :is(${C})`)) ?? p.current) == null || M.focus();
|
|
232
232
|
}
|
|
233
|
-
}, [n,
|
|
234
|
-
const
|
|
235
|
-
|
|
233
|
+
}, [n, c, u]), !c) return null;
|
|
234
|
+
const k = () => {
|
|
235
|
+
o ? m == null || m() : t();
|
|
236
236
|
};
|
|
237
237
|
return xe(
|
|
238
|
-
/* @__PURE__ */ e("div", { className:
|
|
239
|
-
|
|
240
|
-
}, children: /* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ e("div", { className: T("cms-modal-scrim", a && "is-closing"), onMouseDown: (x) => {
|
|
239
|
+
x.target === x.currentTarget && k();
|
|
240
|
+
}, children: /* @__PURE__ */ d(
|
|
241
241
|
"div",
|
|
242
242
|
{
|
|
243
|
-
ref:
|
|
244
|
-
className:
|
|
243
|
+
ref: p,
|
|
244
|
+
className: T("cms-modal", b, a && "is-closing", o && "is-dirty"),
|
|
245
245
|
role: "dialog",
|
|
246
246
|
"aria-modal": "true",
|
|
247
|
-
"aria-labelledby":
|
|
247
|
+
"aria-labelledby": N,
|
|
248
248
|
tabIndex: -1,
|
|
249
|
-
onKeyDown: (
|
|
250
|
-
var
|
|
251
|
-
if (
|
|
252
|
-
|
|
253
|
-
else if (
|
|
254
|
-
const
|
|
255
|
-
if (!
|
|
256
|
-
const
|
|
257
|
-
|
|
249
|
+
onKeyDown: (x) => {
|
|
250
|
+
var M;
|
|
251
|
+
if (x.key === "Escape")
|
|
252
|
+
x.stopPropagation(), k();
|
|
253
|
+
else if (x.key === "Tab") {
|
|
254
|
+
const C = (M = p.current) == null ? void 0 : M.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
|
|
255
|
+
if (!C || C.length === 0) return;
|
|
256
|
+
const U = C[0], K = C[C.length - 1];
|
|
257
|
+
x.shiftKey && document.activeElement === U ? (x.preventDefault(), K.focus()) : !x.shiftKey && document.activeElement === K && (x.preventDefault(), U.focus());
|
|
258
258
|
}
|
|
259
259
|
},
|
|
260
260
|
children: [
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
/* @__PURE__ */ e("h2", { className: "cms-modal__title", id:
|
|
263
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label":
|
|
261
|
+
/* @__PURE__ */ d("header", { className: "cms-modal__head", children: [
|
|
262
|
+
/* @__PURE__ */ e("h2", { className: "cms-modal__title", id: N, children: l }),
|
|
263
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": i, onClick: k, children: /* @__PURE__ */ e(z, { name: "close" }) })
|
|
264
264
|
] }),
|
|
265
265
|
/* @__PURE__ */ e("div", { className: "cms-modal__body", children: s }),
|
|
266
266
|
r != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: r }) : null
|
|
@@ -270,56 +270,56 @@ function Le({ open: n, title: l, onClose: t, dirty: c = !1, onDirtyClose: m, chi
|
|
|
270
270
|
document.body
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
|
-
function
|
|
274
|
-
const
|
|
273
|
+
function Cn({ open: n, title: l, message: t, kind: o = "default", confirmLabel: m, cancelLabel: s, closeLabel: r, onConfirm: i, onCancel: u }) {
|
|
274
|
+
const b = o === "discard-changes";
|
|
275
275
|
return /* @__PURE__ */ e(
|
|
276
276
|
Le,
|
|
277
277
|
{
|
|
278
278
|
open: n,
|
|
279
279
|
title: l,
|
|
280
|
-
onClose:
|
|
280
|
+
onClose: u,
|
|
281
281
|
...r === void 0 ? {} : { closeLabel: r },
|
|
282
|
-
footer: /* @__PURE__ */
|
|
283
|
-
/* @__PURE__ */ e(
|
|
284
|
-
/* @__PURE__ */ e(
|
|
282
|
+
footer: /* @__PURE__ */ d(S, { children: [
|
|
283
|
+
/* @__PURE__ */ e(ne, { onClick: u, children: s ?? (b ? "Keep editing" : "Cancel") }),
|
|
284
|
+
/* @__PURE__ */ e(ne, { variant: o === "default" ? "primary" : "danger", onClick: i, children: m ?? (b ? "Discard changes" : "Confirm") })
|
|
285
285
|
] }),
|
|
286
|
-
children:
|
|
287
|
-
/* @__PURE__ */ e(
|
|
286
|
+
children: o !== "default" ? /* @__PURE__ */ d("p", { className: "cms-confirm__warning", children: [
|
|
287
|
+
/* @__PURE__ */ e(z, { name: "warning" }),
|
|
288
288
|
" ",
|
|
289
289
|
t
|
|
290
290
|
] }) : /* @__PURE__ */ e("p", { children: t })
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
295
|
-
return /* @__PURE__ */
|
|
296
|
-
/* @__PURE__ */ e(
|
|
294
|
+
function Mn({ kind: n, message: l, action: t, onDismiss: o, dismissLabel: m = "Dismiss" }) {
|
|
295
|
+
return /* @__PURE__ */ d("div", { className: T("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
|
|
296
|
+
/* @__PURE__ */ e(z, { name: n === "success" ? "check" : n === "error" ? "warning" : "info" }),
|
|
297
297
|
/* @__PURE__ */ e("span", { className: "cms-toast__message", children: l }),
|
|
298
|
-
t ? /* @__PURE__ */ e(
|
|
299
|
-
|
|
298
|
+
t ? /* @__PURE__ */ e(ne, { className: "cms-toast__action", onClick: t.onAction, children: t.label }) : null,
|
|
299
|
+
o ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": m, onClick: o, children: /* @__PURE__ */ e(z, { name: "close" }) }) : null
|
|
300
300
|
] });
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function Sn({ children: n }) {
|
|
303
303
|
return /* @__PURE__ */ e("div", { className: "cms-toast-region", children: n });
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
return /* @__PURE__ */
|
|
307
|
-
/* @__PURE__ */ e(
|
|
305
|
+
function Ue({ what: n, layout: l = "inline" }) {
|
|
306
|
+
return /* @__PURE__ */ d("div", { className: T("cms-loading", `cms-loading--${l}`), role: "status", "aria-live": "polite", children: [
|
|
307
|
+
/* @__PURE__ */ e(z, { name: "spinner" }),
|
|
308
308
|
/* @__PURE__ */ e("span", { children: n })
|
|
309
309
|
] });
|
|
310
310
|
}
|
|
311
|
-
function
|
|
312
|
-
return /* @__PURE__ */
|
|
311
|
+
function Re({ title: n, hint: l, action: t }) {
|
|
312
|
+
return /* @__PURE__ */ d("div", { className: "cms-empty", children: [
|
|
313
313
|
/* @__PURE__ */ e("p", { className: "cms-empty__title", children: n }),
|
|
314
314
|
l != null ? /* @__PURE__ */ e("p", { className: "cms-empty__hint", children: l }) : null,
|
|
315
315
|
t != null ? /* @__PURE__ */ e("div", { className: "cms-empty__action", children: t }) : null
|
|
316
316
|
] });
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
return /* @__PURE__ */
|
|
320
|
-
/* @__PURE__ */ e(
|
|
318
|
+
function ze({ message: n, onRetry: l, retryLabel: t = "Try again" }) {
|
|
319
|
+
return /* @__PURE__ */ d("div", { className: "cms-error-banner", role: "alert", children: [
|
|
320
|
+
/* @__PURE__ */ e(z, { name: "warning" }),
|
|
321
321
|
/* @__PURE__ */ e("span", { className: "cms-error-banner__message", children: n }),
|
|
322
|
-
l ? /* @__PURE__ */ e(
|
|
322
|
+
l ? /* @__PURE__ */ e(ne, { onClick: l, children: t }) : null
|
|
323
323
|
] });
|
|
324
324
|
}
|
|
325
325
|
const ye = 300;
|
|
@@ -329,129 +329,141 @@ function Ze() {
|
|
|
329
329
|
return Number.isFinite(l) && l >= 0 ? l : ye;
|
|
330
330
|
}
|
|
331
331
|
function Ve() {
|
|
332
|
-
return /* @__PURE__ */
|
|
332
|
+
return /* @__PURE__ */ d("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
|
|
333
333
|
/* @__PURE__ */ e("circle", { className: "cms-state__track", cx: "12", cy: "12", r: "10", fill: "none" }),
|
|
334
334
|
/* @__PURE__ */ e("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
|
|
335
335
|
] });
|
|
336
336
|
}
|
|
337
|
-
function
|
|
338
|
-
const [s, r] =
|
|
339
|
-
return
|
|
337
|
+
function ee({ kind: n, title: l, description: t, action: o, placement: m = "block" }) {
|
|
338
|
+
const [s, r] = D(n !== "loading");
|
|
339
|
+
return J(() => {
|
|
340
340
|
if (n !== "loading") {
|
|
341
341
|
r(!0);
|
|
342
342
|
return;
|
|
343
343
|
}
|
|
344
344
|
r(!1);
|
|
345
|
-
const
|
|
346
|
-
return () => window.clearTimeout(
|
|
347
|
-
}, [n]), /* @__PURE__ */
|
|
345
|
+
const i = window.setTimeout(() => r(!0), Ze());
|
|
346
|
+
return () => window.clearTimeout(i);
|
|
347
|
+
}, [n]), /* @__PURE__ */ d(
|
|
348
348
|
"div",
|
|
349
349
|
{
|
|
350
|
-
className:
|
|
350
|
+
className: T("cms-state", `cms-state--${n}`, `cms-state--${m}`, !s && "is-waiting"),
|
|
351
351
|
role: "status",
|
|
352
352
|
"aria-live": "polite",
|
|
353
353
|
"data-kind": n,
|
|
354
354
|
children: [
|
|
355
355
|
n === "loading" ? /* @__PURE__ */ e(Ve, {}) : null,
|
|
356
|
-
n === "error" || n === "denied" ? /* @__PURE__ */ e(
|
|
357
|
-
/* @__PURE__ */
|
|
356
|
+
n === "error" || n === "denied" ? /* @__PURE__ */ e(z, { name: n === "error" ? "warning" : "lock" }) : null,
|
|
357
|
+
/* @__PURE__ */ d("span", { className: "cms-state__text", children: [
|
|
358
358
|
/* @__PURE__ */ e("span", { className: "cms-state__title", children: l }),
|
|
359
359
|
t !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: t }) : null
|
|
360
360
|
] }),
|
|
361
|
-
|
|
361
|
+
o !== void 0 && n !== "denied" ? /* @__PURE__ */ e(ne, { className: "cms-state__action", onClick: o.onAction, children: o.label }) : null
|
|
362
362
|
]
|
|
363
363
|
}
|
|
364
364
|
);
|
|
365
365
|
}
|
|
366
366
|
const $e = {
|
|
367
|
-
mail: /* @__PURE__ */
|
|
367
|
+
mail: /* @__PURE__ */ d(S, { children: [
|
|
368
368
|
/* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
369
369
|
/* @__PURE__ */ e("path", { d: "m3 7 9 6 9-6" })
|
|
370
370
|
] }),
|
|
371
|
+
// The envelope with its flap open above it: a message read, or the message itself again.
|
|
372
|
+
"mail-open": /* @__PURE__ */ d(S, { children: [
|
|
373
|
+
/* @__PURE__ */ e("path", { d: "M3 10v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9" }),
|
|
374
|
+
/* @__PURE__ */ e("path", { d: "m3 10 9-6 9 6" }),
|
|
375
|
+
/* @__PURE__ */ e("path", { d: "m3 10 9 6 9-6" })
|
|
376
|
+
] }),
|
|
377
|
+
// A clipboard: copy what is shown.
|
|
378
|
+
copy: /* @__PURE__ */ d(S, { children: [
|
|
379
|
+
/* @__PURE__ */ e("rect", { x: "6", y: "4", width: "12", height: "17", rx: "2" }),
|
|
380
|
+
/* @__PURE__ */ e("path", { d: "M9 4V3h6v1" }),
|
|
381
|
+
/* @__PURE__ */ e("path", { d: "M9 10h6M9 14h6M9 18h3" })
|
|
382
|
+
] }),
|
|
371
383
|
chat: /* @__PURE__ */ e("path", { d: "M4 12a8 8 0 1 1 4 6.9L4 20l1.1-4A8 8 0 0 1 4 12Z" }),
|
|
372
384
|
phone: /* @__PURE__ */ e("path", { d: "M5 3h3l2 5-2.5 1.5a11 11 0 0 0 7 7L16 14l5 2v3a2 2 0 0 1-2 2A16 16 0 0 1 3 5a2 2 0 0 1 2-2Z" }),
|
|
373
|
-
calendar: /* @__PURE__ */
|
|
385
|
+
calendar: /* @__PURE__ */ d(S, { children: [
|
|
374
386
|
/* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "16", rx: "2" }),
|
|
375
387
|
/* @__PURE__ */ e("path", { d: "M3 10h18M8 3v4M16 3v4" })
|
|
376
388
|
] }),
|
|
377
|
-
file: /* @__PURE__ */
|
|
389
|
+
file: /* @__PURE__ */ d(S, { children: [
|
|
378
390
|
/* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
|
|
379
391
|
/* @__PURE__ */ e("path", { d: "M14 3v6h6M8 13h8M8 17h6" })
|
|
380
392
|
] }),
|
|
381
393
|
// The file, with code's angle brackets in place of its lines: a message's source.
|
|
382
|
-
"file-code": /* @__PURE__ */
|
|
394
|
+
"file-code": /* @__PURE__ */ d(S, { children: [
|
|
383
395
|
/* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
|
|
384
396
|
/* @__PURE__ */ e("path", { d: "M14 3v6h6" }),
|
|
385
397
|
/* @__PURE__ */ e("path", { d: "m10 12-2 2.5 2 2.5M14 12l2 2.5-2 2.5" })
|
|
386
398
|
] }),
|
|
387
|
-
image: /* @__PURE__ */
|
|
399
|
+
image: /* @__PURE__ */ d(S, { children: [
|
|
388
400
|
/* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
389
401
|
/* @__PURE__ */ e("circle", { cx: "9", cy: "10", r: "2" }),
|
|
390
402
|
/* @__PURE__ */ e("path", { d: "m21 17-5-5-9 8" })
|
|
391
403
|
] }),
|
|
392
|
-
search: /* @__PURE__ */
|
|
404
|
+
search: /* @__PURE__ */ d(S, { children: [
|
|
393
405
|
/* @__PURE__ */ e("circle", { cx: "11", cy: "11", r: "7" }),
|
|
394
406
|
/* @__PURE__ */ e("path", { d: "m20 20-4-4" })
|
|
395
407
|
] }),
|
|
396
|
-
bell: /* @__PURE__ */
|
|
408
|
+
bell: /* @__PURE__ */ d(S, { children: [
|
|
397
409
|
/* @__PURE__ */ e("path", { d: "M6 9a6 6 0 1 1 12 0c0 6 2 8 2 8H4s2-2 2-8Z" }),
|
|
398
410
|
/* @__PURE__ */ e("path", { d: "M10 20a2 2 0 0 0 4 0" })
|
|
399
411
|
] }),
|
|
400
|
-
pencil: /* @__PURE__ */
|
|
412
|
+
pencil: /* @__PURE__ */ d(S, { children: [
|
|
401
413
|
/* @__PURE__ */ e("path", { d: "M4 20h4L19 9l-4-4L4 16Z" }),
|
|
402
414
|
/* @__PURE__ */ e("path", { d: "m13 7 4 4" })
|
|
403
415
|
] }),
|
|
404
|
-
download: /* @__PURE__ */
|
|
416
|
+
download: /* @__PURE__ */ d(S, { children: [
|
|
405
417
|
/* @__PURE__ */ e("path", { d: "M12 4v11" }),
|
|
406
418
|
/* @__PURE__ */ e("path", { d: "m7 11 5 5 5-5" }),
|
|
407
419
|
/* @__PURE__ */ e("path", { d: "M4 20h16" })
|
|
408
420
|
] }),
|
|
409
|
-
print: /* @__PURE__ */
|
|
421
|
+
print: /* @__PURE__ */ d(S, { children: [
|
|
410
422
|
/* @__PURE__ */ e("path", { d: "M7 8V4h10v4" }),
|
|
411
423
|
/* @__PURE__ */ e("rect", { x: "3", y: "8", width: "18", height: "8", rx: "2" }),
|
|
412
424
|
/* @__PURE__ */ e("path", { d: "M7 14h10v6H7Z" })
|
|
413
425
|
] }),
|
|
414
|
-
"open-separately": /* @__PURE__ */
|
|
426
|
+
"open-separately": /* @__PURE__ */ d(S, { children: [
|
|
415
427
|
/* @__PURE__ */ e("path", { d: "M14 4h6v6" }),
|
|
416
428
|
/* @__PURE__ */ e("path", { d: "m20 4-9 9" }),
|
|
417
429
|
/* @__PURE__ */ e("path", { d: "M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5" })
|
|
418
430
|
] }),
|
|
419
431
|
star: /* @__PURE__ */ e("path", { d: "m12 3 2.8 5.8 6.2.9-4.5 4.4 1 6.2L12 17.4l-5.5 2.9 1-6.2L3 9.7l6.2-.9Z" }),
|
|
420
|
-
send: /* @__PURE__ */
|
|
432
|
+
send: /* @__PURE__ */ d(S, { children: [
|
|
421
433
|
/* @__PURE__ */ e("path", { d: "M21 3 10 14" }),
|
|
422
434
|
/* @__PURE__ */ e("path", { d: "M21 3 14 21l-4-7-7-4Z" })
|
|
423
435
|
] }),
|
|
424
|
-
inbox: /* @__PURE__ */
|
|
436
|
+
inbox: /* @__PURE__ */ d(S, { children: [
|
|
425
437
|
/* @__PURE__ */ e("path", { d: "M3 13h5l1 3h6l1-3h5" }),
|
|
426
438
|
/* @__PURE__ */ e("path", { d: "M5 5h14l2 8v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6Z" })
|
|
427
439
|
] }),
|
|
428
|
-
archive: /* @__PURE__ */
|
|
440
|
+
archive: /* @__PURE__ */ d(S, { children: [
|
|
429
441
|
/* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "5", rx: "1" }),
|
|
430
442
|
/* @__PURE__ */ e("path", { d: "M5 9v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9M10 13h4" })
|
|
431
443
|
] }),
|
|
432
|
-
trash: /* @__PURE__ */
|
|
444
|
+
trash: /* @__PURE__ */ d(S, { children: [
|
|
433
445
|
/* @__PURE__ */ e("path", { d: "M4 7h16M10 11v6M14 11v6" }),
|
|
434
446
|
/* @__PURE__ */ e("path", { d: "M6 7l1 13a2 2 0 0 0 2 1h6a2 2 0 0 0 2-1l1-13M9 7V4h6v3" })
|
|
435
447
|
] }),
|
|
436
448
|
paperclip: /* @__PURE__ */ e("path", { d: "m20 11-8.5 8.5a5 5 0 0 1-7-7L13 4a3.5 3.5 0 0 1 5 5l-8.5 8.5a2 2 0 0 1-3-3L14 7" }),
|
|
437
|
-
mic: /* @__PURE__ */
|
|
449
|
+
mic: /* @__PURE__ */ d(S, { children: [
|
|
438
450
|
/* @__PURE__ */ e("rect", { x: "9", y: "3", width: "6", height: "11", rx: "3" }),
|
|
439
451
|
/* @__PURE__ */ e("path", { d: "M5 11a7 7 0 0 0 14 0M12 18v3" })
|
|
440
452
|
] }),
|
|
441
|
-
speaker: /* @__PURE__ */
|
|
453
|
+
speaker: /* @__PURE__ */ d(S, { children: [
|
|
442
454
|
/* @__PURE__ */ e("path", { d: "M4 9h4l5-4v14l-5-4H4Z" }),
|
|
443
455
|
/* @__PURE__ */ e("path", { d: "M16 9a4 4 0 0 1 0 6M19 6a8 8 0 0 1 0 12" })
|
|
444
456
|
] }),
|
|
445
|
-
"user-plus": /* @__PURE__ */
|
|
457
|
+
"user-plus": /* @__PURE__ */ d(S, { children: [
|
|
446
458
|
/* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
|
|
447
459
|
/* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M19 8v6M16 11h6" })
|
|
448
460
|
] }),
|
|
449
461
|
"phone-off": /* @__PURE__ */ e("path", { d: "M3 14c5-5 13-5 18 0l-2 3-4-1v-3a10 10 0 0 0-6 0v3l-4 1Z" }),
|
|
450
|
-
video: /* @__PURE__ */
|
|
462
|
+
video: /* @__PURE__ */ d(S, { children: [
|
|
451
463
|
/* @__PURE__ */ e("rect", { x: "3", y: "6", width: "13", height: "12", rx: "2" }),
|
|
452
464
|
/* @__PURE__ */ e("path", { d: "m16 10 5-3v10l-5-3" })
|
|
453
465
|
] }),
|
|
454
|
-
info: /* @__PURE__ */
|
|
466
|
+
info: /* @__PURE__ */ d(S, { children: [
|
|
455
467
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "9" }),
|
|
456
468
|
/* @__PURE__ */ e("path", { d: "M12 11v6M12 7.5v.5" })
|
|
457
469
|
] }),
|
|
@@ -460,7 +472,7 @@ const $e = {
|
|
|
460
472
|
plus: /* @__PURE__ */ e("path", { d: "M12 5v14M5 12h14" }),
|
|
461
473
|
folder: /* @__PURE__ */ e("path", { d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }),
|
|
462
474
|
check: /* @__PURE__ */ e("path", { d: "m5 12 5 5 9-10" }),
|
|
463
|
-
server: /* @__PURE__ */
|
|
475
|
+
server: /* @__PURE__ */ d(S, { children: [
|
|
464
476
|
/* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "7", rx: "2" }),
|
|
465
477
|
/* @__PURE__ */ e("rect", { x: "3", y: "13", width: "18", height: "7", rx: "2" }),
|
|
466
478
|
/* @__PURE__ */ e("path", { d: "M7 7.5h.5M7 16.5h.5" })
|
|
@@ -472,7 +484,7 @@ const $e = {
|
|
|
472
484
|
more: /* @__PURE__ */ e("path", { d: "M5 12h.5M12 12h.5M19 12h.5" }),
|
|
473
485
|
important: /* @__PURE__ */ e("path", { d: "M4 6h11l5 6-5 6H4l4-6-4-6Z" })
|
|
474
486
|
};
|
|
475
|
-
function
|
|
487
|
+
function P({ name: n, size: l = 20, label: t }) {
|
|
476
488
|
return /* @__PURE__ */ e(
|
|
477
489
|
"svg",
|
|
478
490
|
{
|
|
@@ -491,12 +503,12 @@ function F({ name: n, size: l = 20, label: t }) {
|
|
|
491
503
|
}
|
|
492
504
|
);
|
|
493
505
|
}
|
|
494
|
-
const
|
|
506
|
+
const An = Object.keys($e), Ae = {
|
|
495
507
|
reply: "reply",
|
|
496
508
|
"reply-all": "reply",
|
|
497
509
|
forward: "forward",
|
|
498
510
|
envelope: "mail",
|
|
499
|
-
"envelope-open": "mail",
|
|
511
|
+
"envelope-open": "mail-open",
|
|
500
512
|
star: "star",
|
|
501
513
|
"star-fill": "star",
|
|
502
514
|
"folder-symlink": "folder",
|
|
@@ -507,6 +519,7 @@ const Sn = Object.keys($e), Ae = {
|
|
|
507
519
|
download: "download",
|
|
508
520
|
printer: "print",
|
|
509
521
|
"file-earmark-code": "file-code",
|
|
522
|
+
clipboard: "copy",
|
|
510
523
|
"three-dots": "more"
|
|
511
524
|
};
|
|
512
525
|
function _e(n) {
|
|
@@ -522,257 +535,290 @@ function Xe(n) {
|
|
|
522
535
|
function Ge(n) {
|
|
523
536
|
return n.getClientRects().length > 0;
|
|
524
537
|
}
|
|
525
|
-
function
|
|
526
|
-
const { name: l, badge: t, closeLabel:
|
|
527
|
-
|
|
528
|
-
var
|
|
529
|
-
const
|
|
530
|
-
return document.body.style.overflow = "hidden", (
|
|
531
|
-
var
|
|
532
|
-
document.body.style.overflow =
|
|
538
|
+
function Dn(n) {
|
|
539
|
+
const { name: l, badge: t, closeLabel: o, onClose: m, actions: s = [], moreLabel: r = "More", edit: i, editing: u, state: b, siblings: c, bar: h, thumbnails: a, strip: g, onZoom: p, children: v } = n, N = R(null), k = R(null), x = q(), [M, C] = D(!1), U = R(null);
|
|
540
|
+
J(() => {
|
|
541
|
+
var V;
|
|
542
|
+
const y = document.activeElement, F = document.body.style.overflow;
|
|
543
|
+
return document.body.style.overflow = "hidden", (V = k.current) == null || V.focus(), () => {
|
|
544
|
+
var E;
|
|
545
|
+
document.body.style.overflow = F, (E = y == null ? void 0 : y.focus) == null || E.call(y);
|
|
533
546
|
};
|
|
534
547
|
}, []);
|
|
535
|
-
const
|
|
536
|
-
|
|
537
|
-
},
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
},
|
|
541
|
-
var
|
|
542
|
-
const
|
|
543
|
-
if (
|
|
544
|
-
const
|
|
545
|
-
Math.abs(
|
|
548
|
+
const K = () => {
|
|
549
|
+
u != null && u.dirty ? u.onDirtyClose() : m();
|
|
550
|
+
}, le = (y) => {
|
|
551
|
+
const F = y.touches.length === 1 ? y.touches[0] : void 0;
|
|
552
|
+
U.current = F === void 0 || u !== void 0 || Xe(y.target) ? null : { x: F.clientX, y: F.clientY };
|
|
553
|
+
}, Q = (y) => {
|
|
554
|
+
var X, B;
|
|
555
|
+
const F = U.current, V = y.changedTouches[0];
|
|
556
|
+
if (U.current = null, F === null || V === void 0) return;
|
|
557
|
+
const E = V.clientX - F.x;
|
|
558
|
+
Math.abs(E) < je || Math.abs(E) < Math.abs(V.clientY - F.y) || (E > 0 ? (X = c == null ? void 0 : c.onPrevious) == null || X.call(c) : (B = c == null ? void 0 : c.onNext) == null || B.call(c));
|
|
546
559
|
};
|
|
547
560
|
return xe(
|
|
548
|
-
/* @__PURE__ */
|
|
561
|
+
/* @__PURE__ */ d(
|
|
549
562
|
"div",
|
|
550
563
|
{
|
|
551
|
-
ref:
|
|
552
|
-
className:
|
|
564
|
+
ref: N,
|
|
565
|
+
className: T("cms-viewer", u !== void 0 && "is-editing"),
|
|
553
566
|
role: "dialog",
|
|
554
567
|
"aria-modal": "true",
|
|
555
|
-
"aria-labelledby":
|
|
568
|
+
"aria-labelledby": x,
|
|
556
569
|
tabIndex: -1,
|
|
557
|
-
onKeyDown: (
|
|
558
|
-
var
|
|
559
|
-
if (
|
|
560
|
-
if (
|
|
561
|
-
|
|
562
|
-
} else if (
|
|
563
|
-
const
|
|
564
|
-
if (
|
|
565
|
-
const
|
|
566
|
-
|
|
567
|
-
} else
|
|
570
|
+
onKeyDown: (y) => {
|
|
571
|
+
var F, V, E;
|
|
572
|
+
if (y.key === "Escape") {
|
|
573
|
+
if (u !== void 0) return;
|
|
574
|
+
y.stopPropagation(), M ? C(!1) : m();
|
|
575
|
+
} else if (y.key === "Tab") {
|
|
576
|
+
const X = Array.from(((F = N.current) == null ? void 0 : F.querySelectorAll(We)) ?? []).filter(Ge);
|
|
577
|
+
if (X.length === 0) return;
|
|
578
|
+
const B = X[0], G = X[X.length - 1];
|
|
579
|
+
y.shiftKey && document.activeElement === B ? (y.preventDefault(), G.focus()) : !y.shiftKey && document.activeElement === G && (y.preventDefault(), B.focus());
|
|
580
|
+
} else u === void 0 && !qe(y.target) && !y.ctrlKey && !y.metaKey && !y.altKey && (y.key === "ArrowLeft" ? (V = c == null ? void 0 : c.onPrevious) == null || V.call(c) : y.key === "ArrowRight" ? (E = c == null ? void 0 : c.onNext) == null || E.call(c) : y.key === "+" || y.key === "=" ? p == null || p("in") : y.key === "-" ? p == null || p("out") : y.key === "0" && (p == null || p("reset")));
|
|
568
581
|
},
|
|
569
582
|
children: [
|
|
570
|
-
|
|
571
|
-
/* @__PURE__ */
|
|
572
|
-
/* @__PURE__ */ e("button", { ref:
|
|
583
|
+
c !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-visually-hidden", role: "status", children: `${l}, ${c.position}` }) : null,
|
|
584
|
+
/* @__PURE__ */ d("header", { className: "cms-viewer__top", children: [
|
|
585
|
+
/* @__PURE__ */ e("button", { ref: k, type: "button", className: "cms-viewer__icon", "aria-label": o, onClick: K, children: /* @__PURE__ */ e(z, { name: "close" }) }),
|
|
573
586
|
/* @__PURE__ */ e("span", { className: "cms-viewer__badge", children: t }),
|
|
574
|
-
/* @__PURE__ */ e("h2", { className: "cms-viewer__name", id:
|
|
575
|
-
|
|
587
|
+
/* @__PURE__ */ e("h2", { className: "cms-viewer__name", id: x, title: l, children: l }),
|
|
588
|
+
c !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-viewer__position", children: c.position }) : null,
|
|
576
589
|
/* @__PURE__ */ e("span", { className: "cms-viewer__space" }),
|
|
577
|
-
|
|
578
|
-
/* @__PURE__ */ e("span", { className: "cms-viewer__status", role: "status", children:
|
|
579
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick:
|
|
580
|
-
] }) : /* @__PURE__ */
|
|
581
|
-
/* @__PURE__ */ e("span", { className: "cms-viewer__actions", children: s.map((
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
] },
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
/* @__PURE__ */ e("span", { className: "cms-viewer__wide", children:
|
|
590
|
+
u !== void 0 ? /* @__PURE__ */ d(S, { children: [
|
|
591
|
+
/* @__PURE__ */ e("span", { className: "cms-viewer__status", role: "status", children: u.status }),
|
|
592
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: u.onDone, children: u.doneLabel })
|
|
593
|
+
] }) : /* @__PURE__ */ d(S, { children: [
|
|
594
|
+
/* @__PURE__ */ e("span", { className: "cms-viewer__actions", children: s.map((y) => /* @__PURE__ */ d("button", { type: "button", className: "cms-viewer__button", onClick: y.onSelect, children: [
|
|
595
|
+
y.icon,
|
|
596
|
+
y.label
|
|
597
|
+
] }, y.label)) }),
|
|
598
|
+
i !== void 0 ? /* @__PURE__ */ d("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": i.label, onClick: i.onEdit, children: [
|
|
599
|
+
i.icon,
|
|
600
|
+
/* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: i.label })
|
|
588
601
|
] }) : null,
|
|
589
|
-
s.length > 0 ? /* @__PURE__ */
|
|
590
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": r, "aria-expanded":
|
|
591
|
-
|
|
602
|
+
s.length > 0 ? /* @__PURE__ */ d("span", { className: "cms-viewer__more", children: [
|
|
603
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": r, "aria-expanded": M, onClick: () => C((y) => !y), children: /* @__PURE__ */ e(P, { name: "more" }) }),
|
|
604
|
+
M ? /* @__PURE__ */ e("span", { className: "cms-viewer__menu", children: s.map((y) => /* @__PURE__ */ d(
|
|
592
605
|
"button",
|
|
593
606
|
{
|
|
594
607
|
type: "button",
|
|
595
608
|
className: "cms-viewer__button",
|
|
596
609
|
onClick: () => {
|
|
597
|
-
C(!1),
|
|
610
|
+
C(!1), y.onSelect();
|
|
598
611
|
},
|
|
599
612
|
children: [
|
|
600
|
-
|
|
601
|
-
|
|
613
|
+
y.icon,
|
|
614
|
+
y.label
|
|
602
615
|
]
|
|
603
616
|
},
|
|
604
|
-
|
|
617
|
+
y.label
|
|
605
618
|
)) }) : null
|
|
606
619
|
] }) : null
|
|
607
620
|
] })
|
|
608
621
|
] }),
|
|
609
|
-
/* @__PURE__ */
|
|
610
|
-
|
|
611
|
-
/* @__PURE__ */
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
622
|
+
/* @__PURE__ */ d("div", { className: "cms-viewer__body", children: [
|
|
623
|
+
a != null && u === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: a }) : null,
|
|
624
|
+
/* @__PURE__ */ d("div", { className: "cms-viewer__content", onTouchStart: le, onTouchEnd: Q, children: [
|
|
625
|
+
(u == null ? void 0 : u.conflict) !== void 0 ? /* @__PURE__ */ d("div", { className: "cms-viewer__conflict", role: "alert", children: [
|
|
626
|
+
/* @__PURE__ */ e("p", { className: "cms-viewer__conflict-text", children: u.conflict.message }),
|
|
627
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button", onClick: u.conflict.onOverwrite, children: u.conflict.overwriteLabel }),
|
|
628
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: u.conflict.onKeepBoth, children: u.conflict.keepBothLabel })
|
|
629
|
+
] }) : null,
|
|
630
|
+
b === void 0 ? v : /* @__PURE__ */ e(Ye, { state: b }),
|
|
631
|
+
u === void 0 && (c != null && c.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": c.previousLabel, title: c.previousLabel, onClick: c.onPrevious, children: /* @__PURE__ */ e(z, { name: "back" }) }) : null,
|
|
632
|
+
u === void 0 && (c != null && c.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": c.nextLabel, title: c.nextLabel, onClick: c.onNext, children: /* @__PURE__ */ e(z, { name: "back" }) }) : null,
|
|
633
|
+
u === void 0 && c !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(c.total, 7) }, (y, F) => /* @__PURE__ */ e("i", { className: F === Math.min(c.index, 6) ? "is-current" : void 0 }, F)) }) : null
|
|
616
634
|
] })
|
|
617
635
|
] }),
|
|
618
|
-
|
|
619
|
-
|
|
636
|
+
u === void 0 && g != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: g }) : null,
|
|
637
|
+
h != null ? /* @__PURE__ */ e("footer", { className: "cms-viewer__bar", children: h }) : null
|
|
620
638
|
]
|
|
621
639
|
}
|
|
622
640
|
),
|
|
623
641
|
document.body
|
|
624
642
|
);
|
|
625
643
|
}
|
|
626
|
-
|
|
644
|
+
function Ye({ state: n }) {
|
|
645
|
+
switch (n.kind) {
|
|
646
|
+
case "loading":
|
|
647
|
+
return /* @__PURE__ */ e(ee, { kind: "loading", title: n.title, placement: "page" });
|
|
648
|
+
case "error":
|
|
649
|
+
return /* @__PURE__ */ e(
|
|
650
|
+
ee,
|
|
651
|
+
{
|
|
652
|
+
kind: "error",
|
|
653
|
+
title: n.title,
|
|
654
|
+
...n.description === void 0 ? {} : { description: n.description },
|
|
655
|
+
...n.retry === void 0 ? {} : { action: { label: n.retry.label, onAction: n.retry.onRetry } },
|
|
656
|
+
placement: "page"
|
|
657
|
+
}
|
|
658
|
+
);
|
|
659
|
+
case "no-preview":
|
|
660
|
+
return /* @__PURE__ */ e(
|
|
661
|
+
ee,
|
|
662
|
+
{
|
|
663
|
+
kind: "empty",
|
|
664
|
+
title: n.title,
|
|
665
|
+
...n.description === void 0 ? {} : { description: n.description },
|
|
666
|
+
action: { label: n.download.label, onAction: n.download.onDownload },
|
|
667
|
+
placement: "page"
|
|
668
|
+
}
|
|
669
|
+
);
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
class Je extends Error {
|
|
627
673
|
constructor(l = "denied") {
|
|
628
674
|
super(l), this.name = "FilePickerDenied";
|
|
629
675
|
}
|
|
630
676
|
}
|
|
631
677
|
const Ne = (n, l) => `${n}
|
|
632
|
-
${l}`,
|
|
633
|
-
function
|
|
678
|
+
${l}`, Qe = (n, l) => n === "" ? l : `${n}/${l}`, en = 48;
|
|
679
|
+
function Tn(n) {
|
|
634
680
|
var me, ue;
|
|
635
|
-
const { open: l, spaces: t, list:
|
|
636
|
-
|
|
637
|
-
var
|
|
638
|
-
l && (
|
|
639
|
-
}, [l]),
|
|
640
|
-
if (!l ||
|
|
641
|
-
let
|
|
642
|
-
return v({ status: "loading" }),
|
|
643
|
-
(
|
|
644
|
-
(
|
|
681
|
+
const { open: l, spaces: t, list: o, disabledReason: m, budget: s, formatSize: r, labels: i, onConfirm: u, onCancel: b } = n, [c, h] = D(((me = t[0]) == null ? void 0 : me.id) ?? ""), [a, g] = D(""), [p, v] = D({ status: "loading" }), [N, k] = D(0), [x, M] = D(/* @__PURE__ */ new Map()), [C, U] = D(0), [K, le] = D(!1), Q = R(null), y = q();
|
|
682
|
+
J(() => {
|
|
683
|
+
var f;
|
|
684
|
+
l && (h(((f = t[0]) == null ? void 0 : f.id) ?? ""), g(""), M(/* @__PURE__ */ new Map()), le(!1));
|
|
685
|
+
}, [l]), J(() => {
|
|
686
|
+
if (!l || c === "") return;
|
|
687
|
+
let f = !0;
|
|
688
|
+
return v({ status: "loading" }), U(0), o(c, a).then(
|
|
689
|
+
(w) => f && v({ status: "ready", entries: w.entries, next: w.next ?? null, paging: !1 }),
|
|
690
|
+
(w) => f && v({ status: w instanceof Je ? "denied" : "error" })
|
|
645
691
|
), () => {
|
|
646
|
-
|
|
692
|
+
f = !1;
|
|
647
693
|
};
|
|
648
|
-
}, [l,
|
|
649
|
-
const
|
|
650
|
-
if (
|
|
651
|
-
const
|
|
652
|
-
v({ ...
|
|
653
|
-
(
|
|
654
|
-
() => v({ status: "ready", entries:
|
|
694
|
+
}, [l, c, a, o, N]);
|
|
695
|
+
const F = be(() => {
|
|
696
|
+
if (p.status !== "ready" || p.next === null || p.paging) return;
|
|
697
|
+
const f = p.next, w = p.entries;
|
|
698
|
+
v({ ...p, paging: !0 }), o(c, a, f).then(
|
|
699
|
+
(I) => v({ status: "ready", entries: [...w, ...I.entries], next: I.next ?? null, paging: !1 }),
|
|
700
|
+
() => v({ status: "ready", entries: w, next: f, paging: !1 })
|
|
655
701
|
);
|
|
656
|
-
}, [
|
|
657
|
-
var
|
|
658
|
-
return ((
|
|
659
|
-
}, [s]),
|
|
660
|
-
if (
|
|
661
|
-
const
|
|
662
|
-
return
|
|
663
|
-
}, ce = (
|
|
664
|
-
const
|
|
665
|
-
!
|
|
666
|
-
const
|
|
667
|
-
return
|
|
702
|
+
}, [p, o, c, a]), V = be((f) => {
|
|
703
|
+
var w;
|
|
704
|
+
return ((w = s == null ? void 0 : s.cost) == null ? void 0 : w.call(s, f)) ?? f.size ?? 0;
|
|
705
|
+
}, [s]), E = Pe(() => [...x.values()], [x]), X = E.reduce((f, w) => f + (w.size ?? 0), 0), B = s === void 0 ? null : s.limitBytes - s.usedBytes - E.reduce((f, w) => f + V(w), 0), G = B !== null && B < 0, ie = (f) => {
|
|
706
|
+
if (f.kind !== "file") return null;
|
|
707
|
+
const w = m == null ? void 0 : m(f);
|
|
708
|
+
return w || (B !== null && !x.has(Ne(c, f.id)) && V(f) > B ? i.overBudget : null);
|
|
709
|
+
}, ce = (f) => {
|
|
710
|
+
const w = Ne(c, f.id);
|
|
711
|
+
!x.has(w) && ie(f) !== null || M((I) => {
|
|
712
|
+
const H = new Map(I);
|
|
713
|
+
return H.has(w) ? H.delete(w) : H.set(w, { ...f, space: c, path: a }), H;
|
|
668
714
|
});
|
|
669
|
-
},
|
|
670
|
-
const
|
|
671
|
-
return
|
|
672
|
-
}),
|
|
673
|
-
const
|
|
674
|
-
if (
|
|
675
|
-
|
|
676
|
-
const
|
|
677
|
-
|
|
678
|
-
} else
|
|
679
|
-
},
|
|
680
|
-
return /* @__PURE__ */
|
|
715
|
+
}, _ = (f) => g(Qe(a, f.name)), A = () => g(a.includes("/") ? a.slice(0, a.lastIndexOf("/")) : ""), Z = (f) => M((w) => {
|
|
716
|
+
const I = new Map(w);
|
|
717
|
+
return I.delete(f), I;
|
|
718
|
+
}), W = p.status === "ready" ? p.entries : [], L = (f) => {
|
|
719
|
+
const w = W[C];
|
|
720
|
+
if (f.key === "ArrowDown" || f.key === "ArrowUp" || f.key === "Home" || f.key === "End") {
|
|
721
|
+
f.preventDefault();
|
|
722
|
+
const I = W.length - 1, H = f.key === "Home" ? 0 : f.key === "End" ? I : Math.min(I, Math.max(0, C + (f.key === "ArrowDown" ? 1 : -1)));
|
|
723
|
+
U(H), H >= I - 1 && F();
|
|
724
|
+
} else f.key === "Enter" && (w == null ? void 0 : w.kind) === "folder" ? (f.preventDefault(), _(w)) : f.key === " " && (w == null ? void 0 : w.kind) === "file" ? (f.preventDefault(), ce(w)) : f.key === "Backspace" && a !== "" && (f.preventDefault(), A());
|
|
725
|
+
}, j = a === "" ? [] : a.split("/"), oe = ((ue = t.find((f) => f.id === c)) == null ? void 0 : ue.name) ?? "", de = (f) => `${y}-entry-${String(f)}`;
|
|
726
|
+
return /* @__PURE__ */ d(
|
|
681
727
|
Le,
|
|
682
728
|
{
|
|
683
729
|
open: l,
|
|
684
|
-
title:
|
|
685
|
-
onClose:
|
|
686
|
-
closeLabel:
|
|
687
|
-
initialFocus:
|
|
730
|
+
title: i.title,
|
|
731
|
+
onClose: b,
|
|
732
|
+
closeLabel: i.close,
|
|
733
|
+
initialFocus: Q,
|
|
688
734
|
className: "cms-file-picker",
|
|
689
|
-
footer: /* @__PURE__ */
|
|
690
|
-
/* @__PURE__ */
|
|
691
|
-
|
|
692
|
-
s !== void 0 &&
|
|
735
|
+
footer: /* @__PURE__ */ d("div", { className: "cms-file-picker__foot", children: [
|
|
736
|
+
/* @__PURE__ */ d("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
|
|
737
|
+
E.length > 0 ? /* @__PURE__ */ e("span", { children: i.total(E.length, r(X)) }) : null,
|
|
738
|
+
s !== void 0 && B !== null ? /* @__PURE__ */ e("span", { className: T(G && "is-over"), children: G ? i.overBudget : i.left(r(Math.max(0, B)), r(s.limitBytes)) }) : null
|
|
693
739
|
] }),
|
|
694
|
-
/* @__PURE__ */
|
|
695
|
-
/* @__PURE__ */ e(
|
|
696
|
-
/* @__PURE__ */ e(
|
|
740
|
+
/* @__PURE__ */ d("div", { className: "cms-file-picker__actions", children: [
|
|
741
|
+
/* @__PURE__ */ e(ne, { variant: "secondary", onClick: b, children: i.cancel }),
|
|
742
|
+
/* @__PURE__ */ e(ne, { variant: "primary", disabled: E.length === 0 || G, onClick: () => u(E), children: i.confirm(E.length) })
|
|
697
743
|
] })
|
|
698
744
|
] }),
|
|
699
745
|
children: [
|
|
700
|
-
/* @__PURE__ */
|
|
701
|
-
t.length > 1 ? /* @__PURE__ */
|
|
702
|
-
/* @__PURE__ */ e("span", { className: "cms-visually-hidden", children:
|
|
703
|
-
/* @__PURE__ */ e("select", { className: "cms-input cms-select", value:
|
|
704
|
-
|
|
705
|
-
}, children: t.map((
|
|
746
|
+
/* @__PURE__ */ d("div", { className: "cms-file-picker__top", children: [
|
|
747
|
+
t.length > 1 ? /* @__PURE__ */ d("label", { className: "cms-file-picker__space", children: [
|
|
748
|
+
/* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: i.space }),
|
|
749
|
+
/* @__PURE__ */ e("select", { className: "cms-input cms-select", value: c, onChange: (f) => {
|
|
750
|
+
h(f.target.value), g("");
|
|
751
|
+
}, children: t.map((f) => /* @__PURE__ */ e("option", { value: f.id, children: f.name }, f.id)) })
|
|
706
752
|
] }) : null,
|
|
707
|
-
/* @__PURE__ */
|
|
708
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label":
|
|
709
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ d("nav", { className: "cms-file-picker__path", "aria-label": i.path, children: [
|
|
754
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": i.up, disabled: a === "", onClick: A, children: /* @__PURE__ */ e(P, { name: "chevron-left" }) }),
|
|
755
|
+
/* @__PURE__ */ d("ol", { children: [
|
|
710
756
|
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": a === "" ? "location" : void 0, onClick: () => g(""), children: oe }) }),
|
|
711
|
-
|
|
712
|
-
const
|
|
713
|
-
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current":
|
|
757
|
+
j.map((f, w) => {
|
|
758
|
+
const I = j.slice(0, w + 1).join("/");
|
|
759
|
+
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": I === a ? "location" : void 0, onClick: () => g(I), children: f }) }, I);
|
|
714
760
|
})
|
|
715
761
|
] })
|
|
716
762
|
] }),
|
|
717
|
-
|
|
763
|
+
E.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": K, onClick: () => le((f) => !f), children: i.selected(E.length) }) : null
|
|
718
764
|
] }),
|
|
719
|
-
K &&
|
|
720
|
-
/* @__PURE__ */ e("ul", { children: [...
|
|
721
|
-
/* @__PURE__ */ e("span", { className: "cms-file-picker__name", children:
|
|
722
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label":
|
|
723
|
-
] },
|
|
724
|
-
/* @__PURE__ */ e(
|
|
725
|
-
|
|
726
|
-
}, children:
|
|
765
|
+
K && E.length > 0 ? /* @__PURE__ */ d("div", { className: "cms-file-picker__chosen", children: [
|
|
766
|
+
/* @__PURE__ */ e("ul", { children: [...x.entries()].map(([f, w]) => /* @__PURE__ */ d("li", { children: [
|
|
767
|
+
/* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: w.name }),
|
|
768
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": i.remove(w.name), onClick: () => Z(f), children: /* @__PURE__ */ e(z, { name: "close" }) })
|
|
769
|
+
] }, f)) }),
|
|
770
|
+
/* @__PURE__ */ e(ne, { variant: "secondary", onClick: () => {
|
|
771
|
+
M(/* @__PURE__ */ new Map()), le(!1);
|
|
772
|
+
}, children: i.clear })
|
|
727
773
|
] }) : null,
|
|
728
|
-
/* @__PURE__ */
|
|
729
|
-
const
|
|
730
|
-
|
|
774
|
+
/* @__PURE__ */ d("div", { className: "cms-file-picker__list", onScroll: (f) => {
|
|
775
|
+
const w = f.currentTarget;
|
|
776
|
+
w.scrollTop + w.clientHeight >= w.scrollHeight - en && F();
|
|
731
777
|
}, children: [
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
/* @__PURE__ */
|
|
778
|
+
p.status === "loading" ? /* @__PURE__ */ e(ee, { kind: "loading", title: i.loading, placement: "block" }) : null,
|
|
779
|
+
p.status === "error" ? /* @__PURE__ */ e(ee, { kind: "error", title: i.error, placement: "block", action: { label: i.retry, onAction: () => k((f) => f + 1) } }) : null,
|
|
780
|
+
p.status === "denied" ? /* @__PURE__ */ e(ee, { kind: "denied", title: i.denied, placement: "block" }) : null,
|
|
781
|
+
p.status === "ready" && W.length === 0 ? /* @__PURE__ */ e(ee, { kind: "empty", title: i.empty, placement: "block" }) : null,
|
|
782
|
+
/* @__PURE__ */ d(
|
|
737
783
|
"div",
|
|
738
784
|
{
|
|
739
|
-
ref:
|
|
785
|
+
ref: Q,
|
|
740
786
|
role: "listbox",
|
|
741
787
|
"aria-multiselectable": "true",
|
|
742
|
-
"aria-label":
|
|
743
|
-
"aria-activedescendant":
|
|
788
|
+
"aria-label": i.files,
|
|
789
|
+
"aria-activedescendant": W.length > 0 ? de(C) : void 0,
|
|
744
790
|
tabIndex: 0,
|
|
745
791
|
className: "cms-file-picker__entries",
|
|
746
|
-
hidden:
|
|
747
|
-
onKeyDown:
|
|
792
|
+
hidden: p.status !== "ready" || W.length === 0,
|
|
793
|
+
onKeyDown: L,
|
|
748
794
|
children: [
|
|
749
|
-
|
|
750
|
-
const
|
|
751
|
-
return /* @__PURE__ */
|
|
795
|
+
W.map((f, w) => {
|
|
796
|
+
const I = f.kind === "file" && x.has(Ne(c, f.id)), H = ie(f);
|
|
797
|
+
return /* @__PURE__ */ d(
|
|
752
798
|
"div",
|
|
753
799
|
{
|
|
754
|
-
id: de(
|
|
800
|
+
id: de(w),
|
|
755
801
|
role: "option",
|
|
756
|
-
"aria-selected":
|
|
757
|
-
"aria-disabled":
|
|
758
|
-
className:
|
|
802
|
+
"aria-selected": f.kind === "file" ? I : void 0,
|
|
803
|
+
"aria-disabled": H !== null || void 0,
|
|
804
|
+
className: T("cms-file-picker__entry", w === C && "is-active", I && "is-ticked", H !== null && "is-disabled"),
|
|
759
805
|
onClick: () => {
|
|
760
|
-
|
|
806
|
+
U(w), f.kind === "folder" ? _(f) : ce(f);
|
|
761
807
|
},
|
|
762
808
|
children: [
|
|
763
|
-
/* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children:
|
|
764
|
-
/* @__PURE__ */ e(
|
|
765
|
-
/* @__PURE__ */
|
|
766
|
-
/* @__PURE__ */ e("span", { className: "cms-file-picker__name", children:
|
|
767
|
-
|
|
809
|
+
/* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: I ? /* @__PURE__ */ e(P, { name: "check" }) : null }),
|
|
810
|
+
/* @__PURE__ */ e(P, { name: f.kind === "folder" ? "folder" : "file" }),
|
|
811
|
+
/* @__PURE__ */ d("span", { className: "cms-file-picker__text", children: [
|
|
812
|
+
/* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: f.name }),
|
|
813
|
+
H !== null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__reason", children: H }) : null
|
|
768
814
|
] }),
|
|
769
|
-
|
|
815
|
+
f.kind === "file" && f.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: r(f.size) }) : null
|
|
770
816
|
]
|
|
771
817
|
},
|
|
772
|
-
|
|
818
|
+
f.id
|
|
773
819
|
);
|
|
774
820
|
}),
|
|
775
|
-
|
|
821
|
+
p.status === "ready" && p.paging ? /* @__PURE__ */ e("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ e(ee, { kind: "loading", title: i.loading, placement: "inline" }) }) : null
|
|
776
822
|
]
|
|
777
823
|
}
|
|
778
824
|
)
|
|
@@ -781,25 +827,25 @@ function Dn(n) {
|
|
|
781
827
|
}
|
|
782
828
|
);
|
|
783
829
|
}
|
|
784
|
-
function
|
|
785
|
-
return /* @__PURE__ */
|
|
786
|
-
|
|
830
|
+
function En({ title: n, scope: l, actions: t, backLink: o }) {
|
|
831
|
+
return /* @__PURE__ */ d("header", { className: "cms-page-header", children: [
|
|
832
|
+
o ? /* @__PURE__ */ d(
|
|
787
833
|
"a",
|
|
788
834
|
{
|
|
789
835
|
className: "cms-page-header__back",
|
|
790
|
-
href:
|
|
836
|
+
href: o.href ?? "#",
|
|
791
837
|
onClick: (m) => {
|
|
792
|
-
|
|
838
|
+
o.onBack && (m.preventDefault(), o.onBack());
|
|
793
839
|
},
|
|
794
840
|
children: [
|
|
795
|
-
/* @__PURE__ */ e(
|
|
841
|
+
/* @__PURE__ */ e(z, { name: "back" }),
|
|
796
842
|
" ",
|
|
797
|
-
|
|
843
|
+
o.label
|
|
798
844
|
]
|
|
799
845
|
}
|
|
800
846
|
) : null,
|
|
801
|
-
/* @__PURE__ */
|
|
802
|
-
/* @__PURE__ */
|
|
847
|
+
/* @__PURE__ */ d("div", { className: "cms-page-header__row", children: [
|
|
848
|
+
/* @__PURE__ */ d("div", { className: "cms-page-header__titles", children: [
|
|
803
849
|
/* @__PURE__ */ e("h1", { className: "cms-page-header__title", children: n }),
|
|
804
850
|
l != null ? /* @__PURE__ */ e("p", { className: "cms-page-header__scope", children: l }) : null
|
|
805
851
|
] }),
|
|
@@ -807,30 +853,30 @@ function Tn({ title: n, scope: l, actions: t, backLink: c }) {
|
|
|
807
853
|
] })
|
|
808
854
|
] });
|
|
809
855
|
}
|
|
810
|
-
function
|
|
811
|
-
const m =
|
|
812
|
-
var
|
|
813
|
-
const
|
|
814
|
-
if (
|
|
856
|
+
function Ln({ tabs: n, active: l, onSelect: t, label: o }) {
|
|
857
|
+
const m = R([]), s = (r, i) => {
|
|
858
|
+
var h;
|
|
859
|
+
const u = n.length - 1, b = r.key === "ArrowRight" ? i === u ? 0 : i + 1 : r.key === "ArrowLeft" ? i === 0 ? u : i - 1 : r.key === "Home" ? 0 : r.key === "End" ? u : null;
|
|
860
|
+
if (b === null) return;
|
|
815
861
|
r.preventDefault();
|
|
816
|
-
const
|
|
817
|
-
|
|
862
|
+
const c = n[b];
|
|
863
|
+
c && (t(c.id), (h = m.current[b]) == null || h.focus());
|
|
818
864
|
};
|
|
819
|
-
return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label":
|
|
820
|
-
const
|
|
821
|
-
return /* @__PURE__ */
|
|
865
|
+
return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": o, children: n.map((r, i) => {
|
|
866
|
+
const u = r.id === l;
|
|
867
|
+
return /* @__PURE__ */ d(
|
|
822
868
|
"button",
|
|
823
869
|
{
|
|
824
|
-
ref: (
|
|
825
|
-
m.current[
|
|
870
|
+
ref: (b) => {
|
|
871
|
+
m.current[i] = b;
|
|
826
872
|
},
|
|
827
873
|
type: "button",
|
|
828
874
|
role: "tab",
|
|
829
|
-
className:
|
|
830
|
-
"aria-selected":
|
|
831
|
-
tabIndex:
|
|
875
|
+
className: T("cms-tab", u && "is-active"),
|
|
876
|
+
"aria-selected": u,
|
|
877
|
+
tabIndex: u ? 0 : -1,
|
|
832
878
|
onClick: () => t(r.id),
|
|
833
|
-
onKeyDown: (
|
|
879
|
+
onKeyDown: (b) => s(b, i),
|
|
834
880
|
children: [
|
|
835
881
|
r.label,
|
|
836
882
|
r.count !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-tab__count", children: r.count }) : null
|
|
@@ -840,76 +886,76 @@ function En({ tabs: n, active: l, onSelect: t, label: c }) {
|
|
|
840
886
|
);
|
|
841
887
|
}) });
|
|
842
888
|
}
|
|
843
|
-
function
|
|
844
|
-
var
|
|
889
|
+
function nn(n) {
|
|
890
|
+
var o;
|
|
845
891
|
const l = n.trim().split(/\s+/).filter(Boolean);
|
|
846
|
-
return (l.length > 1 ? [l[0][0], l[l.length - 1][0]] : [(
|
|
892
|
+
return (l.length > 1 ? [l[0][0], l[l.length - 1][0]] : [(o = l[0]) == null ? void 0 : o[0]]).filter(Boolean).join("").toUpperCase();
|
|
847
893
|
}
|
|
848
|
-
function
|
|
894
|
+
function ln(n) {
|
|
849
895
|
let l = 0;
|
|
850
896
|
for (const t of n.trim().toLowerCase())
|
|
851
897
|
l = l * 31 + (t.codePointAt(0) ?? 0) >>> 0;
|
|
852
898
|
return l % 6 + 1;
|
|
853
899
|
}
|
|
854
|
-
function ve({ name: n, pictureUrl: l, presence: t, size:
|
|
855
|
-
return /* @__PURE__ */
|
|
900
|
+
function ve({ name: n, pictureUrl: l, presence: t, size: o = 32 }) {
|
|
901
|
+
return /* @__PURE__ */ d(
|
|
856
902
|
"span",
|
|
857
903
|
{
|
|
858
|
-
className: `cms-avatar cms-avatar--tint-${
|
|
859
|
-
style: { width:
|
|
904
|
+
className: `cms-avatar cms-avatar--tint-${ln(n)}`,
|
|
905
|
+
style: { width: o, height: o, fontSize: Math.round(o * 0.4) },
|
|
860
906
|
role: "img",
|
|
861
907
|
"aria-label": t ? `${n}, ${t}` : n,
|
|
862
908
|
children: [
|
|
863
|
-
l ? /* @__PURE__ */ e("img", { src: l, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children:
|
|
864
|
-
t ? /* @__PURE__ */ e("span", { className:
|
|
909
|
+
l ? /* @__PURE__ */ e("img", { src: l, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: nn(n) }),
|
|
910
|
+
t ? /* @__PURE__ */ e("span", { className: T("cms-avatar__presence", `is-${t}`), "aria-hidden": "true" }) : null
|
|
865
911
|
]
|
|
866
912
|
}
|
|
867
913
|
);
|
|
868
914
|
}
|
|
869
|
-
function
|
|
870
|
-
return n <= 0 ? null : /* @__PURE__ */
|
|
915
|
+
function tn({ count: n, label: l, max: t = 99 }) {
|
|
916
|
+
return n <= 0 ? null : /* @__PURE__ */ d("span", { className: "cms-badge", children: [
|
|
871
917
|
/* @__PURE__ */ e("span", { "aria-hidden": "true", children: n > t ? `${t}+` : n }),
|
|
872
918
|
/* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: l })
|
|
873
919
|
] });
|
|
874
920
|
}
|
|
875
|
-
function
|
|
876
|
-
return /* @__PURE__ */
|
|
877
|
-
/* @__PURE__ */
|
|
921
|
+
function $n({ product: n, mark: l, rail: t, active: o, onNavigate: m, server: s, search: r, account: i, children: u, railLabel: b = "Sections" }) {
|
|
922
|
+
return /* @__PURE__ */ d("div", { className: "cms-shell", children: [
|
|
923
|
+
/* @__PURE__ */ d("nav", { className: "cms-shell__rail", "aria-label": b, children: [
|
|
878
924
|
/* @__PURE__ */ e("span", { className: "cms-shell__mark", "aria-hidden": "true", children: l }),
|
|
879
|
-
/* @__PURE__ */ e("ul", { className: "cms-shell__items", children: t.map((
|
|
880
|
-
const
|
|
881
|
-
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */
|
|
925
|
+
/* @__PURE__ */ e("ul", { className: "cms-shell__items", children: t.map((c) => {
|
|
926
|
+
const h = c.id === o;
|
|
927
|
+
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(
|
|
882
928
|
"a",
|
|
883
929
|
{
|
|
884
|
-
href:
|
|
885
|
-
className:
|
|
886
|
-
"aria-current":
|
|
887
|
-
title:
|
|
930
|
+
href: c.href,
|
|
931
|
+
className: T("cms-shell__item", h && "is-active"),
|
|
932
|
+
"aria-current": h ? "page" : void 0,
|
|
933
|
+
title: c.label,
|
|
888
934
|
onClick: (a) => {
|
|
889
|
-
m && (a.preventDefault(), m(
|
|
935
|
+
m && (a.preventDefault(), m(c.id));
|
|
890
936
|
},
|
|
891
937
|
children: [
|
|
892
|
-
/* @__PURE__ */
|
|
893
|
-
/* @__PURE__ */ e(
|
|
894
|
-
|
|
938
|
+
/* @__PURE__ */ d("span", { className: "cms-shell__icon", children: [
|
|
939
|
+
/* @__PURE__ */ e(P, { name: c.icon, size: 22 }),
|
|
940
|
+
c.badge ? /* @__PURE__ */ e(tn, { count: c.badge.count, label: c.badge.label }) : null
|
|
895
941
|
] }),
|
|
896
|
-
/* @__PURE__ */ e("span", { className: "cms-shell__label", children:
|
|
942
|
+
/* @__PURE__ */ e("span", { className: "cms-shell__label", children: c.label })
|
|
897
943
|
]
|
|
898
944
|
}
|
|
899
|
-
) },
|
|
945
|
+
) }, c.id);
|
|
900
946
|
}) })
|
|
901
947
|
] }),
|
|
902
|
-
/* @__PURE__ */
|
|
948
|
+
/* @__PURE__ */ d("header", { className: "cms-shell__top", children: [
|
|
903
949
|
/* @__PURE__ */ e("span", { className: "cms-shell__product", children: n }),
|
|
904
950
|
s != null ? /* @__PURE__ */ e("div", { className: "cms-shell__server", children: s }) : null,
|
|
905
951
|
r != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: r }) : null,
|
|
906
|
-
|
|
952
|
+
i != null ? /* @__PURE__ */ e("div", { className: "cms-shell__account", children: i }) : null
|
|
907
953
|
] }),
|
|
908
|
-
/* @__PURE__ */ e("main", { className: "cms-shell__main", children:
|
|
954
|
+
/* @__PURE__ */ e("main", { className: "cms-shell__main", children: u })
|
|
909
955
|
] });
|
|
910
956
|
}
|
|
911
|
-
function
|
|
912
|
-
return /* @__PURE__ */
|
|
957
|
+
function In({ label: n, placeholder: l, value: t, onChange: o, onSearch: m }) {
|
|
958
|
+
return /* @__PURE__ */ d(
|
|
913
959
|
"form",
|
|
914
960
|
{
|
|
915
961
|
role: "search",
|
|
@@ -918,7 +964,7 @@ function $n({ label: n, placeholder: l, value: t, onChange: c, onSearch: m }) {
|
|
|
918
964
|
s.preventDefault(), m == null || m(t);
|
|
919
965
|
},
|
|
920
966
|
children: [
|
|
921
|
-
/* @__PURE__ */ e(
|
|
967
|
+
/* @__PURE__ */ e(P, { name: "search", size: 18 }),
|
|
922
968
|
/* @__PURE__ */ e(
|
|
923
969
|
"input",
|
|
924
970
|
{
|
|
@@ -927,39 +973,39 @@ function $n({ label: n, placeholder: l, value: t, onChange: c, onSearch: m }) {
|
|
|
927
973
|
"aria-label": n,
|
|
928
974
|
placeholder: l,
|
|
929
975
|
value: t,
|
|
930
|
-
onChange: (s) =>
|
|
976
|
+
onChange: (s) => o(s.target.value)
|
|
931
977
|
}
|
|
932
978
|
)
|
|
933
979
|
]
|
|
934
980
|
}
|
|
935
981
|
);
|
|
936
982
|
}
|
|
937
|
-
function
|
|
938
|
-
const m =
|
|
939
|
-
var
|
|
940
|
-
const
|
|
941
|
-
if (
|
|
983
|
+
function Pn({ options: n, value: l, onChange: t, label: o }) {
|
|
984
|
+
const m = R([]), s = (r, i) => {
|
|
985
|
+
var h;
|
|
986
|
+
const u = n.length - 1, b = r.key === "ArrowRight" || r.key === "ArrowDown" ? i === u ? 0 : i + 1 : r.key === "ArrowLeft" || r.key === "ArrowUp" ? i === 0 ? u : i - 1 : null;
|
|
987
|
+
if (b === null) return;
|
|
942
988
|
r.preventDefault();
|
|
943
|
-
const
|
|
944
|
-
|
|
989
|
+
const c = n[b];
|
|
990
|
+
c && (t(c.id), (h = m.current[b]) == null || h.focus());
|
|
945
991
|
};
|
|
946
|
-
return /* @__PURE__ */ e("div", { className: "cms-chips", role: "radiogroup", "aria-label":
|
|
947
|
-
const
|
|
948
|
-
return /* @__PURE__ */
|
|
992
|
+
return /* @__PURE__ */ e("div", { className: "cms-chips", role: "radiogroup", "aria-label": o, children: n.map((r, i) => {
|
|
993
|
+
const u = r.id === l;
|
|
994
|
+
return /* @__PURE__ */ d(
|
|
949
995
|
"button",
|
|
950
996
|
{
|
|
951
|
-
ref: (
|
|
952
|
-
m.current[
|
|
997
|
+
ref: (b) => {
|
|
998
|
+
m.current[i] = b;
|
|
953
999
|
},
|
|
954
1000
|
type: "button",
|
|
955
1001
|
role: "radio",
|
|
956
|
-
"aria-checked":
|
|
957
|
-
tabIndex:
|
|
958
|
-
className:
|
|
1002
|
+
"aria-checked": u,
|
|
1003
|
+
tabIndex: u ? 0 : -1,
|
|
1004
|
+
className: T("cms-chip", u && "is-on"),
|
|
959
1005
|
onClick: () => t(r.id),
|
|
960
|
-
onKeyDown: (
|
|
1006
|
+
onKeyDown: (b) => s(b, i),
|
|
961
1007
|
children: [
|
|
962
|
-
|
|
1008
|
+
u ? /* @__PURE__ */ e(P, { name: "check", size: 16 }) : null,
|
|
963
1009
|
r.label
|
|
964
1010
|
]
|
|
965
1011
|
},
|
|
@@ -968,17 +1014,17 @@ function In({ options: n, value: l, onChange: t, label: c }) {
|
|
|
968
1014
|
}) });
|
|
969
1015
|
}
|
|
970
1016
|
const De = 16;
|
|
971
|
-
function
|
|
972
|
-
const
|
|
973
|
-
let m =
|
|
974
|
-
for (let s =
|
|
975
|
-
const r = Math.min(m,
|
|
976
|
-
|
|
1017
|
+
function an(n, l, t) {
|
|
1018
|
+
const o = n.map((s) => Math.min(Math.max(s.width, s.min), s.max));
|
|
1019
|
+
let m = o.reduce((s, r) => s + r, 0) + t - l;
|
|
1020
|
+
for (let s = o.length - 1; s >= 0 && m > 0; s -= 1) {
|
|
1021
|
+
const r = Math.min(m, o[s] - n[s].min);
|
|
1022
|
+
o[s] = o[s] - r, m -= r;
|
|
977
1023
|
}
|
|
978
|
-
return
|
|
1024
|
+
return o;
|
|
979
1025
|
}
|
|
980
|
-
function
|
|
981
|
-
const
|
|
1026
|
+
function sn({ index: n, size: l, shown: t, others: o, room: m, lastMin: s, onResize: r }) {
|
|
1027
|
+
const i = Math.max(l.min, Math.min(l.max, m > 0 ? m - o - s : l.max)), u = (h) => Math.round(Math.min(Math.max(h, l.min), i)), b = R(null), c = (h, a) => r == null ? void 0 : r(n, u(h), a);
|
|
982
1028
|
return /* @__PURE__ */ e(
|
|
983
1029
|
"div",
|
|
984
1030
|
{
|
|
@@ -988,102 +1034,102 @@ function an({ index: n, size: l, shown: t, others: c, room: m, lastMin: s, onRes
|
|
|
988
1034
|
"aria-label": l.label,
|
|
989
1035
|
"aria-valuenow": t,
|
|
990
1036
|
"aria-valuemin": l.min,
|
|
991
|
-
"aria-valuemax":
|
|
1037
|
+
"aria-valuemax": i,
|
|
992
1038
|
className: "cms-panes__splitter",
|
|
993
1039
|
style: { "--split-at": `var(--split-pane-end-${String(n)})` },
|
|
994
|
-
onPointerDown: (
|
|
995
|
-
var a, g,
|
|
996
|
-
|
|
1040
|
+
onPointerDown: (h) => {
|
|
1041
|
+
var a, g, p;
|
|
1042
|
+
h.button > 0 || (h.preventDefault(), (g = (a = h.currentTarget).setPointerCapture) == null || g.call(a, h.pointerId), b.current = { x: h.clientX, from: t, last: t }, (p = h.currentTarget.closest(".cms-panes")) == null || p.classList.add("is-resizing"));
|
|
997
1043
|
},
|
|
998
|
-
onPointerMove: (
|
|
999
|
-
const a =
|
|
1000
|
-
a === null || !Number.isFinite(
|
|
1044
|
+
onPointerMove: (h) => {
|
|
1045
|
+
const a = b.current;
|
|
1046
|
+
a === null || !Number.isFinite(h.clientX) || (a.last = u(a.from + h.clientX - a.x), c(a.last, !1));
|
|
1001
1047
|
},
|
|
1002
|
-
onPointerUp: (
|
|
1048
|
+
onPointerUp: (h) => {
|
|
1003
1049
|
var g;
|
|
1004
|
-
const a =
|
|
1005
|
-
a !== null && (
|
|
1050
|
+
const a = b.current;
|
|
1051
|
+
a !== null && (b.current = null, (g = h.currentTarget.closest(".cms-panes")) == null || g.classList.remove("is-resizing"), c(a.last, !0));
|
|
1006
1052
|
},
|
|
1007
|
-
onPointerCancel: (
|
|
1053
|
+
onPointerCancel: (h) => {
|
|
1008
1054
|
var g;
|
|
1009
|
-
const a =
|
|
1010
|
-
|
|
1055
|
+
const a = b.current;
|
|
1056
|
+
b.current = null, (g = h.currentTarget.closest(".cms-panes")) == null || g.classList.remove("is-resizing"), a !== null && c(a.last, !0);
|
|
1011
1057
|
},
|
|
1012
|
-
onDoubleClick: () =>
|
|
1013
|
-
onKeyDown: (
|
|
1014
|
-
const a =
|
|
1015
|
-
a !== null && (
|
|
1058
|
+
onDoubleClick: () => c(l.reset, !0),
|
|
1059
|
+
onKeyDown: (h) => {
|
|
1060
|
+
const a = h.key === "ArrowLeft" ? t - De : h.key === "ArrowRight" ? t + De : h.key === "Home" ? l.min : h.key === "End" ? i : h.key === "Enter" ? l.reset : null;
|
|
1061
|
+
a !== null && (h.preventDefault(), c(a, !0));
|
|
1016
1062
|
}
|
|
1017
1063
|
}
|
|
1018
1064
|
);
|
|
1019
1065
|
}
|
|
1020
|
-
function
|
|
1021
|
-
const r = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1),
|
|
1066
|
+
function Fn({ panes: n, active: l, back: t, sizes: o, lastMin: m = 360, onResize: s }) {
|
|
1067
|
+
const r = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1), i = R(null), [u, b] = D(0), c = (o ?? []).slice(0, n.length - 1), h = c.length === n.length - 1 && c.every((p) => p !== void 0);
|
|
1022
1068
|
ke(() => {
|
|
1023
|
-
const
|
|
1024
|
-
if (
|
|
1025
|
-
const v = () =>
|
|
1069
|
+
const p = i.current;
|
|
1070
|
+
if (p === null || !h) return;
|
|
1071
|
+
const v = () => b(p.clientWidth);
|
|
1026
1072
|
if (v(), typeof ResizeObserver > "u") return;
|
|
1027
|
-
const
|
|
1028
|
-
return
|
|
1029
|
-
}, [
|
|
1030
|
-
const a =
|
|
1031
|
-
[`--split-pane-${String(v)}`, `${String(
|
|
1032
|
-
[`--split-pane-end-${String(v)}`, `${String(a.slice(0, v + 1).reduce((
|
|
1073
|
+
const N = new ResizeObserver(v);
|
|
1074
|
+
return N.observe(p), () => N.disconnect();
|
|
1075
|
+
}, [h]);
|
|
1076
|
+
const a = h ? an(c, u > 0 ? u : Number.POSITIVE_INFINITY, m) : [], g = h ? Object.fromEntries(a.flatMap((p, v) => [
|
|
1077
|
+
[`--split-pane-${String(v)}`, `${String(p)}px`],
|
|
1078
|
+
[`--split-pane-end-${String(v)}`, `${String(a.slice(0, v + 1).reduce((N, k) => N + k, 0))}px`]
|
|
1033
1079
|
])) : void 0;
|
|
1034
|
-
return /* @__PURE__ */
|
|
1080
|
+
return /* @__PURE__ */ d(
|
|
1035
1081
|
"div",
|
|
1036
1082
|
{
|
|
1037
|
-
ref:
|
|
1038
|
-
className:
|
|
1083
|
+
ref: i,
|
|
1084
|
+
className: T("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", h && "cms-panes--sized"),
|
|
1039
1085
|
"data-active": r,
|
|
1040
1086
|
style: g,
|
|
1041
1087
|
children: [
|
|
1042
|
-
n.map((
|
|
1043
|
-
v === r && t ? /* @__PURE__ */
|
|
1044
|
-
/* @__PURE__ */ e(
|
|
1088
|
+
n.map((p, v) => /* @__PURE__ */ d("section", { className: "cms-panes__pane", "aria-label": p.label, "data-offset": r - v, children: [
|
|
1089
|
+
v === r && t ? /* @__PURE__ */ d("a", { className: "cms-panes__back", href: t.href, children: [
|
|
1090
|
+
/* @__PURE__ */ e(P, { name: "chevron-left", size: 18 }),
|
|
1045
1091
|
t.label
|
|
1046
1092
|
] }) : null,
|
|
1047
|
-
|
|
1048
|
-
] },
|
|
1049
|
-
|
|
1050
|
-
|
|
1093
|
+
p.content
|
|
1094
|
+
] }, p.label)),
|
|
1095
|
+
h ? c.map((p, v) => /* @__PURE__ */ e(
|
|
1096
|
+
sn,
|
|
1051
1097
|
{
|
|
1052
1098
|
index: v,
|
|
1053
|
-
size:
|
|
1099
|
+
size: p,
|
|
1054
1100
|
shown: a[v],
|
|
1055
|
-
others: a.reduce((
|
|
1056
|
-
room:
|
|
1101
|
+
others: a.reduce((N, k, x) => x === v ? N : N + k, 0),
|
|
1102
|
+
room: u,
|
|
1057
1103
|
lastMin: m,
|
|
1058
1104
|
onResize: s
|
|
1059
1105
|
},
|
|
1060
|
-
|
|
1106
|
+
p.label
|
|
1061
1107
|
)) : null
|
|
1062
1108
|
]
|
|
1063
1109
|
}
|
|
1064
1110
|
);
|
|
1065
1111
|
}
|
|
1066
|
-
const
|
|
1067
|
-
function
|
|
1068
|
-
const
|
|
1069
|
-
return /* @__PURE__ */
|
|
1112
|
+
const rn = { attachment: "Has an attachment", unread: "Unread" };
|
|
1113
|
+
function Bn({ from: n, subject: l, preview: t, time: o, unread: m, hasAttachment: s, selected: r, onOpen: i, labels: u }) {
|
|
1114
|
+
const b = re(rn, u);
|
|
1115
|
+
return /* @__PURE__ */ d(
|
|
1070
1116
|
"button",
|
|
1071
1117
|
{
|
|
1072
1118
|
type: "button",
|
|
1073
|
-
className:
|
|
1119
|
+
className: T("cms-mail-row", m && "is-unread", r && "is-selected"),
|
|
1074
1120
|
"aria-current": r ? "true" : void 0,
|
|
1075
|
-
onClick:
|
|
1121
|
+
onClick: i,
|
|
1076
1122
|
children: [
|
|
1077
1123
|
/* @__PURE__ */ e(ve, { name: n, size: 40 }),
|
|
1078
|
-
/* @__PURE__ */
|
|
1079
|
-
/* @__PURE__ */
|
|
1124
|
+
/* @__PURE__ */ d("span", { className: "cms-mail-row__body", children: [
|
|
1125
|
+
/* @__PURE__ */ d("span", { className: "cms-mail-row__line", children: [
|
|
1080
1126
|
/* @__PURE__ */ e("span", { className: "cms-mail-row__from", children: n }),
|
|
1081
|
-
s ? /* @__PURE__ */ e(
|
|
1082
|
-
/* @__PURE__ */ e("span", { className: "cms-mail-row__time", children:
|
|
1127
|
+
s ? /* @__PURE__ */ e(P, { name: "paperclip", size: 16, label: b.attachment }) : null,
|
|
1128
|
+
/* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: o })
|
|
1083
1129
|
] }),
|
|
1084
|
-
/* @__PURE__ */
|
|
1130
|
+
/* @__PURE__ */ d("span", { className: "cms-mail-row__line", children: [
|
|
1085
1131
|
/* @__PURE__ */ e("span", { className: "cms-mail-row__subject", children: l }),
|
|
1086
|
-
m ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label":
|
|
1132
|
+
m ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": b.unread }) : null
|
|
1087
1133
|
] }),
|
|
1088
1134
|
/* @__PURE__ */ e("span", { className: "cms-mail-row__preview", children: t })
|
|
1089
1135
|
] })
|
|
@@ -1091,45 +1137,45 @@ function Fn({ from: n, subject: l, preview: t, time: c, unread: m, hasAttachment
|
|
|
1091
1137
|
}
|
|
1092
1138
|
);
|
|
1093
1139
|
}
|
|
1094
|
-
function
|
|
1095
|
-
return /* @__PURE__ */
|
|
1140
|
+
function Kn({ direction: n, children: l, time: t, read: o, readLabel: m = "Read" }) {
|
|
1141
|
+
return /* @__PURE__ */ d("div", { className: T("cms-bubble", `cms-bubble--${n}`), children: [
|
|
1096
1142
|
/* @__PURE__ */ e("div", { className: "cms-bubble__text", children: l }),
|
|
1097
|
-
/* @__PURE__ */
|
|
1143
|
+
/* @__PURE__ */ d("div", { className: "cms-bubble__meta", children: [
|
|
1098
1144
|
t,
|
|
1099
|
-
n === "out" &&
|
|
1145
|
+
n === "out" && o ? /* @__PURE__ */ d(S, { children: [
|
|
1100
1146
|
" · ",
|
|
1101
1147
|
m
|
|
1102
1148
|
] }) : null
|
|
1103
1149
|
] })
|
|
1104
1150
|
] });
|
|
1105
1151
|
}
|
|
1106
|
-
function
|
|
1107
|
-
const
|
|
1108
|
-
v.preventDefault(), a &&
|
|
1109
|
-
},
|
|
1110
|
-
return /* @__PURE__ */
|
|
1111
|
-
/* @__PURE__ */ e("label", { htmlFor:
|
|
1112
|
-
r === "chat" ?
|
|
1152
|
+
function Hn({ label: n, value: l, onChange: t, onSend: o, onAttach: m, placeholder: s, variant: r = "chat", sendLabel: i = "Send", attachLabel: u = "Attach a file", leading: b, canSend: c }) {
|
|
1153
|
+
const h = q(), a = c ?? l.trim() !== "", g = (v) => {
|
|
1154
|
+
v.preventDefault(), a && o();
|
|
1155
|
+
}, p = m ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": u, onClick: m, children: /* @__PURE__ */ e(P, { name: "paperclip" }) }) : null;
|
|
1156
|
+
return /* @__PURE__ */ d("form", { className: T("cms-composer", `cms-composer--${r}`), onSubmit: g, children: [
|
|
1157
|
+
/* @__PURE__ */ e("label", { htmlFor: h, className: r === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
|
|
1158
|
+
r === "chat" ? p : null,
|
|
1113
1159
|
/* @__PURE__ */ e(
|
|
1114
1160
|
"textarea",
|
|
1115
1161
|
{
|
|
1116
|
-
id:
|
|
1162
|
+
id: h,
|
|
1117
1163
|
className: "cms-composer__input",
|
|
1118
1164
|
rows: r === "reply" ? 3 : 1,
|
|
1119
1165
|
placeholder: s,
|
|
1120
1166
|
value: l,
|
|
1121
1167
|
onChange: (v) => t(v.target.value),
|
|
1122
1168
|
onKeyDown: (v) => {
|
|
1123
|
-
v.nativeEvent.isComposing || v.keyCode === 229 || r === "chat" && v.key === "Enter" && !v.shiftKey && (v.preventDefault(), a &&
|
|
1169
|
+
v.nativeEvent.isComposing || v.keyCode === 229 || r === "chat" && v.key === "Enter" && !v.shiftKey && (v.preventDefault(), a && o());
|
|
1124
1170
|
}
|
|
1125
1171
|
}
|
|
1126
1172
|
),
|
|
1127
|
-
r === "reply" &&
|
|
1128
|
-
r === "reply" ?
|
|
1129
|
-
r === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label":
|
|
1130
|
-
|
|
1173
|
+
r === "reply" && b !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: b }) : null,
|
|
1174
|
+
r === "reply" ? p : null,
|
|
1175
|
+
r === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": i, disabled: !a, children: /* @__PURE__ */ e(P, { name: "send" }) }) : /* @__PURE__ */ d("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !a, children: [
|
|
1176
|
+
i,
|
|
1131
1177
|
" ",
|
|
1132
|
-
/* @__PURE__ */ e(
|
|
1178
|
+
/* @__PURE__ */ e(P, { name: "send", size: 18 })
|
|
1133
1179
|
] })
|
|
1134
1180
|
] });
|
|
1135
1181
|
}
|
|
@@ -1154,83 +1200,83 @@ const Se = {
|
|
|
1154
1200
|
onCallWith: (n) => `On a call with ${n}`,
|
|
1155
1201
|
returnToCall: "Return to call"
|
|
1156
1202
|
};
|
|
1157
|
-
function
|
|
1203
|
+
function On({ name: n, media: l, onAccept: t, onDecline: o, labels: m }) {
|
|
1158
1204
|
const s = re(Se, m), r = l === "video" ? s.incomingVideo : s.incomingAudio;
|
|
1159
|
-
return /* @__PURE__ */
|
|
1205
|
+
return /* @__PURE__ */ d("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": s.incomingFrom(r, n), children: [
|
|
1160
1206
|
/* @__PURE__ */ e("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ e(ve, { name: n, size: 112 }) }),
|
|
1161
1207
|
/* @__PURE__ */ e("p", { className: "cms-call-incoming__name", children: n }),
|
|
1162
1208
|
/* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: r }),
|
|
1163
|
-
/* @__PURE__ */
|
|
1164
|
-
/* @__PURE__ */ e(
|
|
1165
|
-
/* @__PURE__ */ e(
|
|
1209
|
+
/* @__PURE__ */ d("div", { className: "cms-call-incoming__actions", children: [
|
|
1210
|
+
/* @__PURE__ */ e(ae, { icon: "phone-off", label: s.decline, tone: "hang-up", onClick: o }),
|
|
1211
|
+
/* @__PURE__ */ e(ae, { icon: "phone", label: s.accept, tone: "accept", onClick: t })
|
|
1166
1212
|
] })
|
|
1167
1213
|
] });
|
|
1168
1214
|
}
|
|
1169
|
-
function
|
|
1170
|
-
return /* @__PURE__ */
|
|
1215
|
+
function ae({ icon: n, label: l, onClick: t, tone: o = "plain", pressed: m }) {
|
|
1216
|
+
return /* @__PURE__ */ d(
|
|
1171
1217
|
"button",
|
|
1172
1218
|
{
|
|
1173
1219
|
type: "button",
|
|
1174
|
-
className:
|
|
1220
|
+
className: T("cms-call-button", `cms-call-button--${o}`, m && "is-pressed"),
|
|
1175
1221
|
"aria-pressed": m,
|
|
1176
1222
|
onClick: t,
|
|
1177
1223
|
children: [
|
|
1178
|
-
/* @__PURE__ */ e("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ e(
|
|
1224
|
+
/* @__PURE__ */ e("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ e(P, { name: n, size: 24 }) }),
|
|
1179
1225
|
/* @__PURE__ */ e("span", { className: "cms-call-button__label", children: l })
|
|
1180
1226
|
]
|
|
1181
1227
|
}
|
|
1182
1228
|
);
|
|
1183
1229
|
}
|
|
1184
|
-
function Un({ name: n, duration: l, connection: t, you:
|
|
1185
|
-
const a = re(Se,
|
|
1186
|
-
return /* @__PURE__ */
|
|
1187
|
-
/* @__PURE__ */
|
|
1230
|
+
function Un({ name: n, duration: l, connection: t, you: o, muted: m, speaker: s, onToggleMute: r, onToggleSpeaker: i, onAddPerson: u, onChat: b, onHangUp: c, labels: h }) {
|
|
1231
|
+
const a = re(Se, h);
|
|
1232
|
+
return /* @__PURE__ */ d("section", { className: "cms-call-panel", "aria-label": a.callWith(n), children: [
|
|
1233
|
+
/* @__PURE__ */ d("div", { className: "cms-call-panel__head", children: [
|
|
1188
1234
|
/* @__PURE__ */ e(ve, { name: n, size: 64 }),
|
|
1189
|
-
/* @__PURE__ */
|
|
1235
|
+
/* @__PURE__ */ d("div", { className: "cms-call-panel__who", children: [
|
|
1190
1236
|
/* @__PURE__ */ e("p", { className: "cms-call-panel__name", children: n }),
|
|
1191
1237
|
/* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": a.callTime(l), children: l })
|
|
1192
1238
|
] }),
|
|
1193
|
-
/* @__PURE__ */ e("span", { className:
|
|
1239
|
+
/* @__PURE__ */ e("span", { className: T("cms-pill", t === "good" ? "cms-pill--success" : "cms-pill--warning"), children: t === "good" ? a.goodConnection : a.poorConnection })
|
|
1194
1240
|
] }),
|
|
1195
|
-
/* @__PURE__ */
|
|
1196
|
-
/* @__PURE__ */ e(ve, { name:
|
|
1241
|
+
/* @__PURE__ */ d("div", { className: "cms-call-panel__you", children: [
|
|
1242
|
+
/* @__PURE__ */ e(ve, { name: o.name, size: 36 }),
|
|
1197
1243
|
/* @__PURE__ */ e("span", { children: a.you }),
|
|
1198
|
-
|
|
1244
|
+
o.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": a.speaking }) : null
|
|
1199
1245
|
] }),
|
|
1200
|
-
/* @__PURE__ */
|
|
1201
|
-
/* @__PURE__ */ e(
|
|
1202
|
-
/* @__PURE__ */ e(
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
/* @__PURE__ */ e(
|
|
1246
|
+
/* @__PURE__ */ d("div", { className: "cms-call-panel__controls", children: [
|
|
1247
|
+
/* @__PURE__ */ e(ae, { icon: "mic", label: m ? a.unmute : a.mute, pressed: m, onClick: r }),
|
|
1248
|
+
/* @__PURE__ */ e(ae, { icon: "speaker", label: a.speaker, pressed: s, onClick: i }),
|
|
1249
|
+
u ? /* @__PURE__ */ e(ae, { icon: "user-plus", label: a.addPerson, onClick: u }) : null,
|
|
1250
|
+
b ? /* @__PURE__ */ e(ae, { icon: "chat", label: a.chat, onClick: b }) : null,
|
|
1251
|
+
/* @__PURE__ */ e(ae, { icon: "phone-off", label: a.hangUp, tone: "hang-up", onClick: c })
|
|
1206
1252
|
] })
|
|
1207
1253
|
] });
|
|
1208
1254
|
}
|
|
1209
|
-
function
|
|
1210
|
-
const
|
|
1211
|
-
return /* @__PURE__ */
|
|
1255
|
+
function Rn({ name: n, duration: l, muted: t, onToggleMute: o, onReturn: m, onHangUp: s, labels: r }) {
|
|
1256
|
+
const i = re(Se, r);
|
|
1257
|
+
return /* @__PURE__ */ d("section", { className: "cms-call-bar", "aria-label": i.callWith(n), children: [
|
|
1212
1258
|
/* @__PURE__ */ e("span", { className: "cms-call-bar__live", "aria-hidden": "true" }),
|
|
1213
|
-
/* @__PURE__ */ e("span", { className: "cms-call-bar__name", children:
|
|
1259
|
+
/* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: i.onCallWith(n) }),
|
|
1214
1260
|
/* @__PURE__ */ e("span", { className: "cms-call-bar__time", children: l }),
|
|
1215
|
-
/* @__PURE__ */
|
|
1216
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": t ?
|
|
1217
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick: m, children:
|
|
1218
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label":
|
|
1261
|
+
/* @__PURE__ */ d("span", { className: "cms-call-bar__actions", children: [
|
|
1262
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": t ? i.unmute : i.mute, "aria-pressed": t, onClick: o, children: /* @__PURE__ */ e(P, { name: "mic" }) }),
|
|
1263
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick: m, children: i.returnToCall }),
|
|
1264
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": i.hangUp, onClick: s, children: /* @__PURE__ */ e(P, { name: "phone-off" }) })
|
|
1219
1265
|
] })
|
|
1220
1266
|
] });
|
|
1221
1267
|
}
|
|
1222
|
-
function zn({ mark: n, product: l, headline: t, lead:
|
|
1223
|
-
return /* @__PURE__ */
|
|
1224
|
-
/* @__PURE__ */
|
|
1225
|
-
/* @__PURE__ */
|
|
1268
|
+
function zn({ mark: n, product: l, headline: t, lead: o, features: m = [], children: s }) {
|
|
1269
|
+
return /* @__PURE__ */ d("div", { className: "cms-signin", children: [
|
|
1270
|
+
/* @__PURE__ */ d("aside", { className: "cms-signin__brand", children: [
|
|
1271
|
+
/* @__PURE__ */ d("p", { className: "cms-signin__logo", children: [
|
|
1226
1272
|
/* @__PURE__ */ e("span", { className: "cms-signin__mark", "aria-hidden": "true", children: n }),
|
|
1227
1273
|
l
|
|
1228
1274
|
] }),
|
|
1229
|
-
/* @__PURE__ */
|
|
1275
|
+
/* @__PURE__ */ d("div", { className: "cms-signin__pitch", children: [
|
|
1230
1276
|
/* @__PURE__ */ e("p", { className: "cms-signin__headline", children: t }),
|
|
1231
|
-
/* @__PURE__ */ e("p", { className: "cms-signin__lead", children:
|
|
1232
|
-
m.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: m.map((r) => /* @__PURE__ */
|
|
1233
|
-
/* @__PURE__ */ e(
|
|
1277
|
+
/* @__PURE__ */ e("p", { className: "cms-signin__lead", children: o }),
|
|
1278
|
+
m.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: m.map((r) => /* @__PURE__ */ d("li", { children: [
|
|
1279
|
+
/* @__PURE__ */ e(P, { name: r.icon, size: 18 }),
|
|
1234
1280
|
r.label
|
|
1235
1281
|
] }, r.label)) }) : null
|
|
1236
1282
|
] })
|
|
@@ -1238,7 +1284,7 @@ function zn({ mark: n, product: l, headline: t, lead: c, features: m = [], child
|
|
|
1238
1284
|
/* @__PURE__ */ e("main", { className: "cms-signin__form", children: s })
|
|
1239
1285
|
] });
|
|
1240
1286
|
}
|
|
1241
|
-
const
|
|
1287
|
+
const cn = {
|
|
1242
1288
|
title: "Sign in",
|
|
1243
1289
|
identifier: "Email or username",
|
|
1244
1290
|
identifierPlaceholder: "name@example.com",
|
|
@@ -1250,92 +1296,92 @@ const rn = {
|
|
|
1250
1296
|
newHere: "New here?",
|
|
1251
1297
|
create: "Create an account"
|
|
1252
1298
|
};
|
|
1253
|
-
function
|
|
1254
|
-
const
|
|
1255
|
-
return /* @__PURE__ */
|
|
1256
|
-
|
|
1257
|
-
}, "aria-describedby": m ? `${
|
|
1258
|
-
/* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children:
|
|
1259
|
-
/* @__PURE__ */
|
|
1260
|
-
/* @__PURE__ */ e(
|
|
1299
|
+
function Zn({ server: n, onSubmit: l, forgotHref: t, createHref: o, error: m, busy: s, labels: r }) {
|
|
1300
|
+
const i = re(cn, r), u = q(), [b, c] = D(""), [h, a] = D(""), [g, p] = D(!1);
|
|
1301
|
+
return /* @__PURE__ */ d("form", { className: "cms-signin-form", onSubmit: (N) => {
|
|
1302
|
+
N.preventDefault(), l(b, h);
|
|
1303
|
+
}, "aria-describedby": m ? `${u}-error` : void 0, children: [
|
|
1304
|
+
/* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: i.title }),
|
|
1305
|
+
/* @__PURE__ */ d("p", { className: "cms-signin-form__server", children: [
|
|
1306
|
+
/* @__PURE__ */ e(P, { name: "server", size: 18 }),
|
|
1261
1307
|
n
|
|
1262
1308
|
] }),
|
|
1263
|
-
/* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${
|
|
1309
|
+
/* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${u}-identifier`, children: i.identifier }),
|
|
1264
1310
|
/* @__PURE__ */ e(
|
|
1265
1311
|
"input",
|
|
1266
1312
|
{
|
|
1267
|
-
id: `${
|
|
1313
|
+
id: `${u}-identifier`,
|
|
1268
1314
|
className: "cms-signin-form__input",
|
|
1269
1315
|
type: "text",
|
|
1270
1316
|
autoComplete: "username",
|
|
1271
|
-
placeholder:
|
|
1272
|
-
value:
|
|
1273
|
-
onChange: (
|
|
1317
|
+
placeholder: i.identifierPlaceholder,
|
|
1318
|
+
value: b,
|
|
1319
|
+
onChange: (N) => c(N.target.value),
|
|
1274
1320
|
required: !0
|
|
1275
1321
|
}
|
|
1276
1322
|
),
|
|
1277
|
-
/* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${
|
|
1278
|
-
/* @__PURE__ */
|
|
1323
|
+
/* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${u}-password`, children: i.password }),
|
|
1324
|
+
/* @__PURE__ */ d("span", { className: "cms-signin-form__password", children: [
|
|
1279
1325
|
/* @__PURE__ */ e(
|
|
1280
1326
|
"input",
|
|
1281
1327
|
{
|
|
1282
|
-
id: `${
|
|
1328
|
+
id: `${u}-password`,
|
|
1283
1329
|
className: "cms-signin-form__input",
|
|
1284
1330
|
type: g ? "text" : "password",
|
|
1285
1331
|
autoComplete: "current-password",
|
|
1286
|
-
value:
|
|
1287
|
-
onChange: (
|
|
1332
|
+
value: h,
|
|
1333
|
+
onChange: (N) => a(N.target.value),
|
|
1288
1334
|
required: !0
|
|
1289
1335
|
}
|
|
1290
1336
|
),
|
|
1291
|
-
/* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": g, onClick: () =>
|
|
1337
|
+
/* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": g, onClick: () => p((N) => !N), children: g ? i.hide : i.show })
|
|
1292
1338
|
] }),
|
|
1293
|
-
t ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: t, children:
|
|
1294
|
-
m ? /* @__PURE__ */ e("p", { id: `${
|
|
1295
|
-
/* @__PURE__ */ e("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: s, "aria-busy": s || void 0, children:
|
|
1296
|
-
|
|
1297
|
-
/* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children:
|
|
1298
|
-
/* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href:
|
|
1339
|
+
t ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: t, children: i.forgot }) : null,
|
|
1340
|
+
m ? /* @__PURE__ */ e("p", { id: `${u}-error`, className: "cms-signin-form__error", role: "alert", children: m }) : null,
|
|
1341
|
+
/* @__PURE__ */ e("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: s, "aria-busy": s || void 0, children: i.submit }),
|
|
1342
|
+
o ? /* @__PURE__ */ d(S, { children: [
|
|
1343
|
+
/* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children: i.newHere }) }),
|
|
1344
|
+
/* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href: o, children: i.create })
|
|
1299
1345
|
] }) : null
|
|
1300
1346
|
] });
|
|
1301
1347
|
}
|
|
1302
|
-
function
|
|
1303
|
-
const
|
|
1304
|
-
if (t != null) return /* @__PURE__ */ e(
|
|
1305
|
-
if (l === null) return /* @__PURE__ */ e(
|
|
1306
|
-
if (l.length === 0) return /* @__PURE__ */ e(
|
|
1307
|
-
const
|
|
1348
|
+
function Vn({ label: n, rows: l, error: t, onRetry: o, loadingText: m = "Loading", emptyTitle: s = "Nothing here yet", emptyHint: r, selected: i, onOpen: u, onRowMenu: b }) {
|
|
1349
|
+
const c = R([]);
|
|
1350
|
+
if (t != null) return /* @__PURE__ */ e(ze, { message: t, onRetry: o });
|
|
1351
|
+
if (l === null) return /* @__PURE__ */ e(Ue, { what: m, layout: "block" });
|
|
1352
|
+
if (l.length === 0) return /* @__PURE__ */ e(Re, { title: s, hint: r });
|
|
1353
|
+
const h = (a, g, p) => {
|
|
1308
1354
|
var v;
|
|
1309
1355
|
if (a.key === "ArrowDown" || a.key === "ArrowUp")
|
|
1310
|
-
a.preventDefault(), (v =
|
|
1356
|
+
a.preventDefault(), (v = c.current[Math.min(l.length - 1, Math.max(0, g + (a.key === "ArrowDown" ? 1 : -1)))]) == null || v.focus();
|
|
1311
1357
|
else if (a.key === "Enter")
|
|
1312
|
-
|
|
1313
|
-
else if ((a.key === "ContextMenu" || a.shiftKey && a.key === "F10") &&
|
|
1358
|
+
u == null || u(p);
|
|
1359
|
+
else if ((a.key === "ContextMenu" || a.shiftKey && a.key === "F10") && b) {
|
|
1314
1360
|
a.preventDefault();
|
|
1315
|
-
const
|
|
1316
|
-
|
|
1361
|
+
const N = a.currentTarget.getBoundingClientRect();
|
|
1362
|
+
b(p, { x: N.left + 16, y: N.bottom });
|
|
1317
1363
|
}
|
|
1318
1364
|
};
|
|
1319
1365
|
return /* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: l.map((a, g) => {
|
|
1320
|
-
const
|
|
1321
|
-
return /* @__PURE__ */
|
|
1366
|
+
const p = a.id === i;
|
|
1367
|
+
return /* @__PURE__ */ d(
|
|
1322
1368
|
"li",
|
|
1323
1369
|
{
|
|
1324
1370
|
ref: (v) => {
|
|
1325
|
-
|
|
1371
|
+
c.current[g] = v;
|
|
1326
1372
|
},
|
|
1327
1373
|
role: "option",
|
|
1328
|
-
"aria-selected":
|
|
1329
|
-
tabIndex:
|
|
1330
|
-
className:
|
|
1331
|
-
onClick: () =>
|
|
1332
|
-
onKeyDown: (v) =>
|
|
1333
|
-
onContextMenu:
|
|
1334
|
-
v.preventDefault(),
|
|
1374
|
+
"aria-selected": p,
|
|
1375
|
+
tabIndex: p || i == null && g === 0 ? 0 : -1,
|
|
1376
|
+
className: T("cms-list__row", p && "is-selected"),
|
|
1377
|
+
onClick: () => u == null ? void 0 : u(a.id),
|
|
1378
|
+
onKeyDown: (v) => h(v, g, a.id),
|
|
1379
|
+
onContextMenu: b ? (v) => {
|
|
1380
|
+
v.preventDefault(), b(a.id, { x: v.clientX, y: v.clientY });
|
|
1335
1381
|
} : void 0,
|
|
1336
1382
|
children: [
|
|
1337
1383
|
a.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: a.lead }) : null,
|
|
1338
|
-
/* @__PURE__ */
|
|
1384
|
+
/* @__PURE__ */ d("span", { className: "cms-list__text", children: [
|
|
1339
1385
|
/* @__PURE__ */ e("span", { className: "cms-list__primary", children: a.primary }),
|
|
1340
1386
|
a.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: a.secondary }) : null
|
|
1341
1387
|
] }),
|
|
@@ -1346,36 +1392,36 @@ function Zn({ label: n, rows: l, error: t, onRetry: c, loadingText: m = "Loading
|
|
|
1346
1392
|
);
|
|
1347
1393
|
}) });
|
|
1348
1394
|
}
|
|
1349
|
-
function
|
|
1350
|
-
const s =
|
|
1395
|
+
function on({ at: n, items: l, onClose: t, label: o = "Actions", focus: m = "first" }) {
|
|
1396
|
+
const s = R(null), r = R(null), i = q(), [u, b] = D(n), c = l.filter((a) => a.offer.offered);
|
|
1351
1397
|
if (ke(() => {
|
|
1352
1398
|
if (!n) return;
|
|
1353
|
-
const
|
|
1354
|
-
|
|
1355
|
-
}, [n]),
|
|
1356
|
-
var
|
|
1399
|
+
const a = s.current, g = (a == null ? void 0 : a.offsetWidth) ?? 0, p = (a == null ? void 0 : a.offsetHeight) ?? 0;
|
|
1400
|
+
b({ x: Math.max(0, Math.min(n.x, window.innerWidth - g)), y: Math.max(0, Math.min(n.y, window.innerHeight - p)) });
|
|
1401
|
+
}, [n]), J(() => {
|
|
1402
|
+
var p, v;
|
|
1357
1403
|
if (!n) return;
|
|
1358
1404
|
r.current = document.activeElement;
|
|
1359
|
-
const
|
|
1360
|
-
(
|
|
1361
|
-
const
|
|
1362
|
-
var
|
|
1363
|
-
(
|
|
1405
|
+
const a = Array.from(((p = s.current) == null ? void 0 : p.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')) ?? []);
|
|
1406
|
+
(v = m === "last" ? a[a.length - 1] : a[0]) == null || v.focus();
|
|
1407
|
+
const g = (N) => {
|
|
1408
|
+
var k;
|
|
1409
|
+
(k = s.current) != null && k.contains(N.target) || t();
|
|
1364
1410
|
};
|
|
1365
|
-
return document.addEventListener("mousedown",
|
|
1366
|
-
var
|
|
1367
|
-
document.removeEventListener("mousedown",
|
|
1411
|
+
return document.addEventListener("mousedown", g), () => {
|
|
1412
|
+
var N, k;
|
|
1413
|
+
document.removeEventListener("mousedown", g), (k = (N = r.current) == null ? void 0 : N.focus) == null || k.call(N);
|
|
1368
1414
|
};
|
|
1369
|
-
}, [n, t, m]), !n ||
|
|
1370
|
-
const
|
|
1371
|
-
var
|
|
1372
|
-
const
|
|
1373
|
-
if (
|
|
1374
|
-
|
|
1375
|
-
else if (
|
|
1376
|
-
|
|
1377
|
-
const
|
|
1378
|
-
(
|
|
1415
|
+
}, [n, t, m]), !n || c.length === 0) return null;
|
|
1416
|
+
const h = (a) => {
|
|
1417
|
+
var v, N;
|
|
1418
|
+
const g = Array.from(((v = s.current) == null ? void 0 : v.querySelectorAll('[role="menuitem"]')) ?? []), p = g.indexOf(document.activeElement);
|
|
1419
|
+
if (a.key === "Escape" || a.key === "Tab")
|
|
1420
|
+
a.preventDefault(), t();
|
|
1421
|
+
else if (a.key === "ArrowDown" || a.key === "ArrowUp") {
|
|
1422
|
+
a.preventDefault();
|
|
1423
|
+
const k = a.key === "ArrowDown" ? 1 : -1;
|
|
1424
|
+
(N = g[(p + k + g.length) % g.length]) == null || N.focus();
|
|
1379
1425
|
}
|
|
1380
1426
|
};
|
|
1381
1427
|
return xe(
|
|
@@ -1385,33 +1431,34 @@ function cn({ at: n, items: l, onClose: t, label: c = "Actions", focus: m = "fir
|
|
|
1385
1431
|
ref: s,
|
|
1386
1432
|
className: "cms-menu",
|
|
1387
1433
|
role: "menu",
|
|
1388
|
-
"aria-label":
|
|
1389
|
-
style: { left: (
|
|
1390
|
-
onKeyDown:
|
|
1391
|
-
onContextMenu: (
|
|
1392
|
-
children:
|
|
1393
|
-
const
|
|
1394
|
-
return /* @__PURE__ */
|
|
1434
|
+
"aria-label": o,
|
|
1435
|
+
style: { left: (u ?? n).x, top: (u ?? n).y },
|
|
1436
|
+
onKeyDown: h,
|
|
1437
|
+
onContextMenu: (a) => a.preventDefault(),
|
|
1438
|
+
children: c.map((a) => {
|
|
1439
|
+
const g = a.offer.refusal !== void 0;
|
|
1440
|
+
return /* @__PURE__ */ d(
|
|
1395
1441
|
"div",
|
|
1396
1442
|
{
|
|
1397
1443
|
role: "menuitem",
|
|
1398
1444
|
tabIndex: -1,
|
|
1399
|
-
"aria-disabled":
|
|
1400
|
-
|
|
1401
|
-
|
|
1445
|
+
"aria-disabled": g || void 0,
|
|
1446
|
+
"aria-describedby": g ? `${i}-${a.id}` : void 0,
|
|
1447
|
+
title: g ? a.offer.refusal : void 0,
|
|
1448
|
+
className: T("cms-menu__item", a.danger && "is-danger", a.offer.locked && "is-locked", g && "is-refused"),
|
|
1402
1449
|
onClick: () => {
|
|
1403
|
-
|
|
1450
|
+
g || (t(), a.onSelect());
|
|
1404
1451
|
},
|
|
1405
|
-
onKeyDown: (
|
|
1406
|
-
(
|
|
1452
|
+
onKeyDown: (p) => {
|
|
1453
|
+
(p.key === "Enter" || p.key === " ") && !g && (p.preventDefault(), t(), a.onSelect());
|
|
1407
1454
|
},
|
|
1408
1455
|
children: [
|
|
1409
|
-
|
|
1410
|
-
/* @__PURE__ */ e("span", { className: "cms-menu__label", children:
|
|
1411
|
-
|
|
1456
|
+
a.offer.locked ? /* @__PURE__ */ e(z, { name: "lock" }) : null,
|
|
1457
|
+
/* @__PURE__ */ e("span", { className: "cms-menu__label", children: a.label }),
|
|
1458
|
+
g ? /* @__PURE__ */ e("span", { id: `${i}-${a.id}`, className: "cms-menu__refusal", children: a.offer.refusal }) : null
|
|
1412
1459
|
]
|
|
1413
1460
|
},
|
|
1414
|
-
|
|
1461
|
+
a.id
|
|
1415
1462
|
);
|
|
1416
1463
|
})
|
|
1417
1464
|
}
|
|
@@ -1420,116 +1467,122 @@ function cn({ at: n, items: l, onClose: t, label: c = "Actions", focus: m = "fir
|
|
|
1420
1467
|
);
|
|
1421
1468
|
}
|
|
1422
1469
|
const Te = { bare: /* @__PURE__ */ new Set(), hidden: /* @__PURE__ */ new Set() }, Ee = (n, l) => n.size === l.size && [...n].every((t) => l.has(t));
|
|
1423
|
-
function
|
|
1470
|
+
function dn(n) {
|
|
1424
1471
|
const l = /* @__PURE__ */ new Map();
|
|
1425
1472
|
for (const t of n) l.set(t.group, [...l.get(t.group) ?? [], t]);
|
|
1426
1473
|
return [...l.values()];
|
|
1427
1474
|
}
|
|
1428
|
-
function
|
|
1475
|
+
function mn(n) {
|
|
1429
1476
|
const l = /* @__PURE__ */ new Map();
|
|
1430
1477
|
for (const t of n) t.overflow !== void 0 && t.overflow !== 0 && l.set(t.overflow, [...l.get(t.overflow) ?? [], t.id]);
|
|
1431
|
-
return [...l.entries()].sort(([t], [
|
|
1432
|
-
}
|
|
1433
|
-
function
|
|
1434
|
-
const r =
|
|
1435
|
-
const
|
|
1436
|
-
if (
|
|
1437
|
-
const Z = getComputedStyle(
|
|
1438
|
-
var
|
|
1439
|
-
return ((
|
|
1440
|
-
}, oe =
|
|
1441
|
-
const
|
|
1442
|
-
return oe + he.reduce((
|
|
1443
|
-
},
|
|
1444
|
-
let
|
|
1445
|
-
if (
|
|
1478
|
+
return [...l.entries()].sort(([t], [o]) => t - o).map(([, t]) => t);
|
|
1479
|
+
}
|
|
1480
|
+
function Wn({ label: n, actions: l, onAction: t, status: o, moreLabel: m, leading: s }) {
|
|
1481
|
+
const r = R(null), i = R(null), [u, b] = D(Te), [c, h] = D(null), [a, g] = D("first"), [p, v] = D(null), [N, k] = D(null), x = dn(l), M = mn(l), C = x.flat(), U = C.filter((_) => _.overflow === 0), K = C.filter((_) => _.overflow !== 0), le = JSON.stringify([l.map((_) => [_.id, _.label, _.icon, _.group, _.overflow ?? null]), o ?? "", s !== void 0]), Q = be(() => {
|
|
1482
|
+
const _ = r.current, A = i.current;
|
|
1483
|
+
if (_ === null || A === null) return;
|
|
1484
|
+
const Z = getComputedStyle(_), W = parseFloat(Z.columnGap || "0") || 0, L = _.clientWidth - (parseFloat(Z.paddingLeft) || 0) - (parseFloat(Z.paddingRight) || 0), j = ($) => {
|
|
1485
|
+
var O;
|
|
1486
|
+
return ((O = A.querySelector($)) == null ? void 0 : O.getBoundingClientRect().width) ?? 0;
|
|
1487
|
+
}, oe = j('[data-measure="leading"]'), de = j('[data-measure="separator"]'), me = j('[data-measure="more"]'), ue = ($, O) => j(`[data-measure="${O ? "full" : "icon"}"][data-measure-action="${CSS.escape($)}"]`), f = ($, O) => {
|
|
1488
|
+
const Y = /* @__PURE__ */ new Set([...U.map((te) => te.id), ...O]), se = x.map((te) => te.filter((pe) => !Y.has(pe.id))).filter((te) => te.length > 0), he = se.flat(), Ie = he.length + (se.length - 1) + (Y.size > 0 ? 1 : 0) + (oe > 0 ? 1 : 0);
|
|
1489
|
+
return oe + he.reduce((te, pe) => te + ue(pe.id, !$.has(pe.id)), 0) + de * Math.max(0, se.length - 1) + (Y.size > 0 ? me : 0) + W * Math.max(0, Ie - 1);
|
|
1490
|
+
}, w = K.filter(($) => !M.some((O) => O.includes($.id))).map(($) => $.id), I = [...M, ...[...w].reverse().map(($) => [$])];
|
|
1491
|
+
let H = null;
|
|
1492
|
+
if (f(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= L) H = Te;
|
|
1446
1493
|
else {
|
|
1447
|
-
const
|
|
1448
|
-
for (const
|
|
1449
|
-
for (const
|
|
1450
|
-
if (
|
|
1451
|
-
|
|
1494
|
+
const $ = /* @__PURE__ */ new Set();
|
|
1495
|
+
for (const O of I) {
|
|
1496
|
+
for (const Y of O) $.add(Y);
|
|
1497
|
+
if (f($, /* @__PURE__ */ new Set()) <= L) {
|
|
1498
|
+
H = { bare: $, hidden: /* @__PURE__ */ new Set() };
|
|
1452
1499
|
break;
|
|
1453
1500
|
}
|
|
1454
1501
|
}
|
|
1455
1502
|
}
|
|
1456
|
-
if (
|
|
1457
|
-
const
|
|
1458
|
-
for (const
|
|
1459
|
-
for (const
|
|
1460
|
-
if (
|
|
1503
|
+
if (H === null) {
|
|
1504
|
+
const $ = new Set(K.map((Y) => Y.id)), O = /* @__PURE__ */ new Set();
|
|
1505
|
+
for (const Y of M) {
|
|
1506
|
+
for (const se of Y) K.some((he) => he.id === se) && O.add(se);
|
|
1507
|
+
if (O.size >= 2 && f($, O) <= L) break;
|
|
1508
|
+
}
|
|
1509
|
+
if (f($, O) > L) {
|
|
1510
|
+
for (const Y of [...w].reverse())
|
|
1511
|
+
if (O.add(Y), f($, O) <= L) break;
|
|
1461
1512
|
}
|
|
1462
|
-
|
|
1513
|
+
H = { bare: $, hidden: O };
|
|
1463
1514
|
}
|
|
1464
|
-
const ge =
|
|
1465
|
-
|
|
1466
|
-
}, [
|
|
1467
|
-
ke(
|
|
1468
|
-
const
|
|
1469
|
-
if (
|
|
1470
|
-
const
|
|
1471
|
-
return
|
|
1472
|
-
}, [
|
|
1473
|
-
const
|
|
1474
|
-
...
|
|
1475
|
-
...
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1515
|
+
const ge = H;
|
|
1516
|
+
b(($) => Ee($.bare, ge.bare) && Ee($.hidden, ge.hidden) ? $ : ge);
|
|
1517
|
+
}, [le]);
|
|
1518
|
+
ke(Q, [Q]), J(() => {
|
|
1519
|
+
const _ = r.current;
|
|
1520
|
+
if (_ === null || typeof ResizeObserver > "u") return;
|
|
1521
|
+
const A = new ResizeObserver(() => Q());
|
|
1522
|
+
return A.observe(_), () => A.disconnect();
|
|
1523
|
+
}, [Q]);
|
|
1524
|
+
const y = /* @__PURE__ */ new Set([...U.map((_) => _.id), ...u.hidden]), V = x.map((_) => _.filter((A) => !y.has(A.id))).filter((_) => _.length > 0).flat(), E = [
|
|
1525
|
+
...U,
|
|
1526
|
+
...M.flat().map((_) => C.find((A) => A.id === _)).filter((_) => _ !== void 0 && u.hidden.has(_.id)),
|
|
1527
|
+
// The pinned that a row too narrow for them sent behind ..., in the row's order.
|
|
1528
|
+
...K.filter((_) => u.hidden.has(_.id) && !M.some((A) => A.includes(_.id)))
|
|
1529
|
+
], X = new Set(K.filter((_) => !M.some((A) => A.includes(_.id))).map((_) => _.id)), B = [...V.map((_) => _.id), ...E.length > 0 ? ["more"] : []], G = p !== null && B.includes(p) ? p : B[0] ?? null, ie = (_) => {
|
|
1530
|
+
var L, j;
|
|
1531
|
+
const A = B.indexOf(G ?? "");
|
|
1479
1532
|
let Z = null;
|
|
1480
|
-
if (
|
|
1481
|
-
|
|
1482
|
-
const
|
|
1483
|
-
v(
|
|
1484
|
-
}, ce =
|
|
1485
|
-
id:
|
|
1486
|
-
label: /* @__PURE__ */
|
|
1487
|
-
/* @__PURE__ */ e(
|
|
1488
|
-
|
|
1533
|
+
if (_.key === "ArrowRight" ? Z = Math.min(B.length - 1, A + 1) : _.key === "ArrowLeft" ? Z = Math.max(0, A - 1) : _.key === "Home" ? Z = 0 : _.key === "End" ? Z = B.length - 1 : _.key === "Escape" && k(G), Z === null) return;
|
|
1534
|
+
_.preventDefault();
|
|
1535
|
+
const W = B[Z] ?? null;
|
|
1536
|
+
v(W), (j = (L = r.current) == null ? void 0 : L.querySelector(`[data-stop="${CSS.escape(W ?? "")}"]`)) == null || j.focus();
|
|
1537
|
+
}, ce = E.map((_) => ({
|
|
1538
|
+
id: _.id,
|
|
1539
|
+
label: /* @__PURE__ */ d(S, { children: [
|
|
1540
|
+
/* @__PURE__ */ e(fe, { name: _.icon }),
|
|
1541
|
+
_.label
|
|
1489
1542
|
] }),
|
|
1490
|
-
offer:
|
|
1491
|
-
...
|
|
1543
|
+
offer: _.disabled ? { offered: !0, locked: !1, refusal: _.reason ?? "" } : { offered: !0, locked: !1 },
|
|
1544
|
+
..._.danger ? { danger: !0 } : {},
|
|
1492
1545
|
onSelect: () => {
|
|
1493
|
-
!
|
|
1546
|
+
!_.disabled && !_.busy && t(_.id);
|
|
1494
1547
|
}
|
|
1495
1548
|
}));
|
|
1496
|
-
return /* @__PURE__ */
|
|
1549
|
+
return /* @__PURE__ */ d(
|
|
1497
1550
|
"div",
|
|
1498
1551
|
{
|
|
1499
1552
|
ref: r,
|
|
1500
1553
|
role: "toolbar",
|
|
1501
1554
|
"aria-label": n,
|
|
1502
|
-
className:
|
|
1555
|
+
className: T(
|
|
1503
1556
|
"cms-pane-toolbar",
|
|
1504
|
-
K.length > 0 &&
|
|
1505
|
-
|
|
1557
|
+
K.length > 0 && u.bare.size >= K.length && "cms-pane-toolbar--labels-hidden",
|
|
1558
|
+
u.bare.size > 0 && u.bare.size < K.length && "cms-pane-toolbar--labels-partly-hidden"
|
|
1506
1559
|
),
|
|
1507
1560
|
onKeyDown: ie,
|
|
1508
1561
|
children: [
|
|
1509
1562
|
s !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__leading", children: s }) : null,
|
|
1510
|
-
|
|
1511
|
-
const Z =
|
|
1512
|
-
return /* @__PURE__ */
|
|
1513
|
-
Z.length > 0 &&
|
|
1514
|
-
/* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: Z.length === 0, children:
|
|
1515
|
-
|
|
1563
|
+
x.map((_, A) => {
|
|
1564
|
+
const Z = _.filter((L) => !y.has(L.id)), W = x.slice(0, A).some((L) => L.some((j) => !y.has(j.id)));
|
|
1565
|
+
return /* @__PURE__ */ d("div", { className: "cms-pane-toolbar__group-wrap", children: [
|
|
1566
|
+
Z.length > 0 && W ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
|
|
1567
|
+
/* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: Z.length === 0, children: _.map((L) => /* @__PURE__ */ e(
|
|
1568
|
+
un,
|
|
1516
1569
|
{
|
|
1517
|
-
action:
|
|
1518
|
-
labels: !
|
|
1519
|
-
overflowed:
|
|
1520
|
-
pinned:
|
|
1521
|
-
tabbable:
|
|
1522
|
-
tipOff:
|
|
1523
|
-
onChoose: () => t(
|
|
1570
|
+
action: L,
|
|
1571
|
+
labels: !u.bare.has(L.id),
|
|
1572
|
+
overflowed: y.has(L.id),
|
|
1573
|
+
pinned: X.has(L.id),
|
|
1574
|
+
tabbable: G === L.id,
|
|
1575
|
+
tipOff: N === L.id,
|
|
1576
|
+
onChoose: () => t(L.id),
|
|
1524
1577
|
onFocus: () => {
|
|
1525
|
-
v(
|
|
1578
|
+
v(L.id), k(null);
|
|
1526
1579
|
}
|
|
1527
1580
|
},
|
|
1528
|
-
|
|
1581
|
+
L.id
|
|
1529
1582
|
)) })
|
|
1530
|
-
] },
|
|
1583
|
+
] }, A);
|
|
1531
1584
|
}),
|
|
1532
|
-
|
|
1585
|
+
E.length > 0 ? /* @__PURE__ */ e(
|
|
1533
1586
|
"button",
|
|
1534
1587
|
{
|
|
1535
1588
|
type: "button",
|
|
@@ -1538,93 +1591,160 @@ function Vn({ label: n, actions: l, onAction: t, status: c, moreLabel: m, leadin
|
|
|
1538
1591
|
"aria-label": m,
|
|
1539
1592
|
title: m,
|
|
1540
1593
|
"aria-haspopup": "menu",
|
|
1541
|
-
"aria-expanded":
|
|
1542
|
-
tabIndex:
|
|
1594
|
+
"aria-expanded": c !== null,
|
|
1595
|
+
tabIndex: G === "more" ? 0 : -1,
|
|
1543
1596
|
onFocus: () => v("more"),
|
|
1544
|
-
onClick: (
|
|
1545
|
-
const
|
|
1546
|
-
g("first"),
|
|
1597
|
+
onClick: (_) => {
|
|
1598
|
+
const A = _.currentTarget.getBoundingClientRect();
|
|
1599
|
+
g("first"), h(c === null ? { x: A.left, y: A.bottom } : null);
|
|
1547
1600
|
},
|
|
1548
|
-
onKeyDown: (
|
|
1549
|
-
if (
|
|
1550
|
-
|
|
1551
|
-
const
|
|
1552
|
-
g(
|
|
1601
|
+
onKeyDown: (_) => {
|
|
1602
|
+
if (_.key === "ArrowDown" || _.key === "ArrowUp") {
|
|
1603
|
+
_.preventDefault(), _.stopPropagation();
|
|
1604
|
+
const A = _.currentTarget.getBoundingClientRect();
|
|
1605
|
+
g(_.key === "ArrowUp" ? "last" : "first"), h({ x: A.left, y: A.bottom });
|
|
1553
1606
|
}
|
|
1554
1607
|
},
|
|
1555
|
-
children: /* @__PURE__ */ e(
|
|
1608
|
+
children: /* @__PURE__ */ e(P, { name: "more" })
|
|
1556
1609
|
}
|
|
1557
1610
|
) : null,
|
|
1558
|
-
|
|
1559
|
-
/* @__PURE__ */ e(
|
|
1560
|
-
/* @__PURE__ */
|
|
1611
|
+
o !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: o, children: o }) : null,
|
|
1612
|
+
/* @__PURE__ */ e(on, { at: c, items: ce, onClose: () => h(null), label: m, focus: a }),
|
|
1613
|
+
/* @__PURE__ */ d("div", { ref: i, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
|
|
1561
1614
|
s !== void 0 ? /* @__PURE__ */ e("div", { "data-measure": "leading", children: s }) : null,
|
|
1562
1615
|
/* @__PURE__ */ e("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
|
|
1563
|
-
/* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(
|
|
1564
|
-
|
|
1565
|
-
/* @__PURE__ */
|
|
1566
|
-
/* @__PURE__ */ e(
|
|
1567
|
-
/* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children:
|
|
1616
|
+
/* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(P, { name: "more" }) }),
|
|
1617
|
+
C.map((_) => /* @__PURE__ */ d("span", { children: [
|
|
1618
|
+
/* @__PURE__ */ d("span", { "data-measure": "full", "data-measure-action": _.id, className: "cms-pane-toolbar__action", children: [
|
|
1619
|
+
/* @__PURE__ */ e(fe, { name: _.icon }),
|
|
1620
|
+
/* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: _.label })
|
|
1568
1621
|
] }),
|
|
1569
|
-
/* @__PURE__ */ e("span", { "data-measure": "icon", "data-measure-action":
|
|
1570
|
-
] },
|
|
1622
|
+
/* @__PURE__ */ e("span", { "data-measure": "icon", "data-measure-action": _.id, className: T("cms-pane-toolbar__action", _e(_.icon) !== null && "cms-pane-toolbar__action--bare"), children: _e(_.icon) !== null ? /* @__PURE__ */ e(fe, { name: _.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: _.label }) })
|
|
1623
|
+
] }, _.id))
|
|
1571
1624
|
] })
|
|
1572
1625
|
]
|
|
1573
1626
|
}
|
|
1574
1627
|
);
|
|
1575
1628
|
}
|
|
1576
|
-
function
|
|
1577
|
-
const [
|
|
1578
|
-
|
|
1629
|
+
function un({ action: n, labels: l, overflowed: t, pinned: o, tabbable: m, tipOff: s, onChoose: r, onFocus: i }) {
|
|
1630
|
+
const [u, b] = D(!1);
|
|
1631
|
+
J(() => {
|
|
1579
1632
|
if (!n.busy) {
|
|
1580
|
-
|
|
1633
|
+
b(!1);
|
|
1581
1634
|
return;
|
|
1582
1635
|
}
|
|
1583
|
-
const
|
|
1584
|
-
return () => clearTimeout(
|
|
1636
|
+
const k = setTimeout(() => b(!0), ye);
|
|
1637
|
+
return () => clearTimeout(k);
|
|
1585
1638
|
}, [n.busy]);
|
|
1586
|
-
const
|
|
1587
|
-
return /* @__PURE__ */
|
|
1639
|
+
const c = _e(n.icon) === null, h = l || c, a = n.disabled && n.reason ? n.reason : null, g = a ?? (h ? null : n.label), p = q(), [v, N] = D(!1);
|
|
1640
|
+
return /* @__PURE__ */ d(
|
|
1588
1641
|
"button",
|
|
1589
1642
|
{
|
|
1590
1643
|
type: "button",
|
|
1591
|
-
className:
|
|
1644
|
+
className: T("cms-pane-toolbar__action", !h && "cms-pane-toolbar__action--bare", c && "cms-pane-toolbar__action--text", n.danger && "is-danger"),
|
|
1592
1645
|
"data-action": n.id,
|
|
1593
1646
|
"data-stop": n.id,
|
|
1594
1647
|
...t ? { "data-overflowed": "" } : {},
|
|
1595
|
-
...
|
|
1648
|
+
...o ? { "data-pinned": "" } : {},
|
|
1596
1649
|
hidden: t,
|
|
1597
1650
|
"aria-label": n.label,
|
|
1598
1651
|
"aria-disabled": n.disabled || void 0,
|
|
1599
1652
|
"aria-busy": n.busy || void 0,
|
|
1600
|
-
...a === null ? {} : { "aria-describedby":
|
|
1653
|
+
...a === null ? {} : { "aria-describedby": p },
|
|
1601
1654
|
...v && a !== null ? { "data-reason-shown": "" } : {},
|
|
1602
1655
|
tabIndex: m ? 0 : -1,
|
|
1603
|
-
onFocus:
|
|
1604
|
-
onBlur: () =>
|
|
1605
|
-
onKeyDown: (
|
|
1606
|
-
|
|
1656
|
+
onFocus: i,
|
|
1657
|
+
onBlur: () => N(!1),
|
|
1658
|
+
onKeyDown: (k) => {
|
|
1659
|
+
k.key === "Escape" && N(!1);
|
|
1607
1660
|
},
|
|
1608
1661
|
onClick: () => {
|
|
1609
|
-
a !== null ?
|
|
1662
|
+
a !== null ? N(!0) : !n.disabled && !n.busy && r();
|
|
1610
1663
|
},
|
|
1611
1664
|
children: [
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
a !== null || g !== null && !s ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id:
|
|
1665
|
+
u ? /* @__PURE__ */ e(z, { name: "spinner" }) : /* @__PURE__ */ e(fe, { name: n.icon }),
|
|
1666
|
+
h ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: n.label }) : null,
|
|
1667
|
+
a !== null || g !== null && !s ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: p, children: g }) : null
|
|
1615
1668
|
]
|
|
1616
1669
|
}
|
|
1617
1670
|
);
|
|
1618
1671
|
}
|
|
1619
|
-
function
|
|
1672
|
+
function fe({ name: n }) {
|
|
1620
1673
|
const l = _e(n);
|
|
1621
|
-
return l === null ? null : /* @__PURE__ */ e(
|
|
1674
|
+
return l === null ? null : /* @__PURE__ */ e(P, { name: l, size: 18 });
|
|
1675
|
+
}
|
|
1676
|
+
function jn({ title: n, body: l = null, time: t = null, unread: o, unreadLabel: m, expandLabel: s, collapseLabel: r, action: i = null, onRead: u, leading: b }) {
|
|
1677
|
+
const [c, h] = D(!1), a = q(), g = () => {
|
|
1678
|
+
o && u();
|
|
1679
|
+
}, p = (i == null ? void 0 : i.presentation) === "row" && i.onAction !== void 0, v = (i == null ? void 0 : i.presentation) === "button" && i.onAction !== void 0 ? i : null, N = () => {
|
|
1680
|
+
var k;
|
|
1681
|
+
g(), p && ((k = i.onAction) == null || k.call(i));
|
|
1682
|
+
};
|
|
1683
|
+
return /* @__PURE__ */ d("article", { className: T("cms-notification", o && "is-unread", c && "is-expanded", p && "is-row-action"), "data-state": o ? "unread" : "read", children: [
|
|
1684
|
+
/* @__PURE__ */ d(
|
|
1685
|
+
"div",
|
|
1686
|
+
{
|
|
1687
|
+
className: "cms-notification__row",
|
|
1688
|
+
role: "button",
|
|
1689
|
+
tabIndex: 0,
|
|
1690
|
+
"aria-describedby": l === null ? void 0 : a,
|
|
1691
|
+
onClick: N,
|
|
1692
|
+
onKeyDown: (k) => {
|
|
1693
|
+
k.target !== k.currentTarget || k.key !== "Enter" && k.key !== " " || (k.preventDefault(), N());
|
|
1694
|
+
},
|
|
1695
|
+
children: [
|
|
1696
|
+
b != null ? /* @__PURE__ */ e("span", { className: "cms-notification__leading", children: b }) : null,
|
|
1697
|
+
/* @__PURE__ */ d("span", { className: "cms-notification__text", children: [
|
|
1698
|
+
/* @__PURE__ */ d("span", { className: "cms-notification__head", children: [
|
|
1699
|
+
/* @__PURE__ */ d("span", { className: "cms-notification__title", children: [
|
|
1700
|
+
o ? /* @__PURE__ */ d("span", { className: "cms-visually-hidden", children: [
|
|
1701
|
+
m,
|
|
1702
|
+
" "
|
|
1703
|
+
] }) : null,
|
|
1704
|
+
n
|
|
1705
|
+
] }),
|
|
1706
|
+
t !== null ? /* @__PURE__ */ e("span", { className: "cms-notification__time", children: t }) : null
|
|
1707
|
+
] }),
|
|
1708
|
+
l !== null && l !== "" ? /* @__PURE__ */ e("span", { className: "cms-notification__body", id: a, children: l }) : null
|
|
1709
|
+
] }),
|
|
1710
|
+
o ? /* @__PURE__ */ e("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
|
|
1711
|
+
]
|
|
1712
|
+
}
|
|
1713
|
+
),
|
|
1714
|
+
l !== null && l !== "" ? /* @__PURE__ */ e(
|
|
1715
|
+
"button",
|
|
1716
|
+
{
|
|
1717
|
+
type: "button",
|
|
1718
|
+
className: "cms-notification__chevron",
|
|
1719
|
+
"aria-expanded": c,
|
|
1720
|
+
"aria-controls": a,
|
|
1721
|
+
"aria-label": c ? r : s,
|
|
1722
|
+
title: c ? r : s,
|
|
1723
|
+
onClick: () => {
|
|
1724
|
+
c || g(), h((k) => !k);
|
|
1725
|
+
},
|
|
1726
|
+
children: /* @__PURE__ */ e(P, { name: "chevron-down", size: 18 })
|
|
1727
|
+
}
|
|
1728
|
+
) : null,
|
|
1729
|
+
v !== null ? /* @__PURE__ */ e(
|
|
1730
|
+
"button",
|
|
1731
|
+
{
|
|
1732
|
+
type: "button",
|
|
1733
|
+
className: "cms-button cms-notification__action",
|
|
1734
|
+
onClick: () => {
|
|
1735
|
+
var k;
|
|
1736
|
+
g(), (k = v.onAction) == null || k.call(v);
|
|
1737
|
+
},
|
|
1738
|
+
children: v.label
|
|
1739
|
+
}
|
|
1740
|
+
) : null
|
|
1741
|
+
] });
|
|
1622
1742
|
}
|
|
1623
|
-
function
|
|
1743
|
+
function hn(n) {
|
|
1624
1744
|
return n === "allowed" || n === "elevate" || n === "denied";
|
|
1625
1745
|
}
|
|
1626
|
-
function
|
|
1627
|
-
if (!
|
|
1746
|
+
function qn(n, l) {
|
|
1747
|
+
if (!hn(n))
|
|
1628
1748
|
return l.showRefused ? { offered: !0, locked: !1, refusal: "not available: the server gave an answer this app does not know", unknown: !0 } : { offered: !1, locked: !1, unknown: !0 };
|
|
1629
1749
|
switch (n) {
|
|
1630
1750
|
case "allowed":
|
|
@@ -1635,11 +1755,11 @@ function Wn(n, l) {
|
|
|
1635
1755
|
return l.showRefused ? { offered: !0, locked: !1, refusal: l.refusal ?? "not allowed" } : { offered: !1, locked: !1 };
|
|
1636
1756
|
}
|
|
1637
1757
|
}
|
|
1638
|
-
function
|
|
1758
|
+
function pn(n, l) {
|
|
1639
1759
|
if (!n) return;
|
|
1640
1760
|
if (typeof n.get == "function") return n.get(l) ?? void 0;
|
|
1641
|
-
const t = n,
|
|
1642
|
-
return
|
|
1761
|
+
const t = n, o = Object.keys(t).find((m) => m.toLowerCase() === l.toLowerCase());
|
|
1762
|
+
return o === void 0 ? void 0 : t[o];
|
|
1643
1763
|
}
|
|
1644
1764
|
function fn(n) {
|
|
1645
1765
|
if (n && typeof n == "object") {
|
|
@@ -1648,109 +1768,110 @@ function fn(n) {
|
|
|
1648
1768
|
if (typeof l.title == "string" && l.title !== "") return l.title;
|
|
1649
1769
|
}
|
|
1650
1770
|
}
|
|
1651
|
-
function
|
|
1771
|
+
function Xn(n, l, t, o) {
|
|
1652
1772
|
if (n !== 403) return { kind: "none" };
|
|
1653
1773
|
const m = fn(t);
|
|
1654
|
-
return
|
|
1774
|
+
return pn(l, "X-Elevation-Required") !== void 0 ? o.elevates ? { kind: "elevation-required", message: m ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: m ?? "The server refused this." };
|
|
1655
1775
|
}
|
|
1656
1776
|
const we = "coolms-kit:reread";
|
|
1657
|
-
function
|
|
1777
|
+
function Gn() {
|
|
1658
1778
|
window.dispatchEvent(new Event(we));
|
|
1659
1779
|
}
|
|
1660
|
-
function
|
|
1661
|
-
const [l, t] =
|
|
1662
|
-
|
|
1663
|
-
const
|
|
1664
|
-
const
|
|
1665
|
-
r(!0),
|
|
1666
|
-
(
|
|
1667
|
-
|
|
1780
|
+
function Yn(n) {
|
|
1781
|
+
const [l, t] = D(void 0), [o, m] = D(void 0), [s, r] = D(!0), i = R(n);
|
|
1782
|
+
i.current = n;
|
|
1783
|
+
const u = R(0), b = be(() => {
|
|
1784
|
+
const c = ++u.current;
|
|
1785
|
+
r(!0), i.current().then(
|
|
1786
|
+
(h) => {
|
|
1787
|
+
c === u.current && (t(h), m(void 0), r(!1));
|
|
1668
1788
|
},
|
|
1669
|
-
(
|
|
1670
|
-
|
|
1789
|
+
(h) => {
|
|
1790
|
+
c === u.current && (m(h), r(!1));
|
|
1671
1791
|
}
|
|
1672
1792
|
);
|
|
1673
1793
|
}, []);
|
|
1674
|
-
return
|
|
1675
|
-
|
|
1676
|
-
const
|
|
1677
|
-
return window.addEventListener("focus",
|
|
1678
|
-
window.removeEventListener("focus",
|
|
1794
|
+
return J(() => {
|
|
1795
|
+
b();
|
|
1796
|
+
const c = () => b();
|
|
1797
|
+
return window.addEventListener("focus", c), window.addEventListener(we, c), () => {
|
|
1798
|
+
window.removeEventListener("focus", c), window.removeEventListener(we, c);
|
|
1679
1799
|
};
|
|
1680
|
-
}, [
|
|
1800
|
+
}, [b]), { value: l, error: o, loading: s, reread: b };
|
|
1681
1801
|
}
|
|
1682
|
-
function
|
|
1802
|
+
function Jn(n) {
|
|
1683
1803
|
return n === 412 ? { conflict: !0, message: "Someone changed this since you opened it. Nothing was saved; read it again to see the change." } : { conflict: !1 };
|
|
1684
1804
|
}
|
|
1685
|
-
const
|
|
1686
|
-
function
|
|
1687
|
-
const t = n.split(".").map((m) => Number.parseInt(m, 10) || 0),
|
|
1688
|
-
for (let m = 0; m < Math.max(t.length,
|
|
1689
|
-
const s = t[m] ?? 0, r =
|
|
1805
|
+
const bn = "/errors/client-update-required";
|
|
1806
|
+
function _n(n, l) {
|
|
1807
|
+
const t = n.split(".").map((m) => Number.parseInt(m, 10) || 0), o = l.split(".").map((m) => Number.parseInt(m, 10) || 0);
|
|
1808
|
+
for (let m = 0; m < Math.max(t.length, o.length); m++) {
|
|
1809
|
+
const s = t[m] ?? 0, r = o[m] ?? 0;
|
|
1690
1810
|
if (s !== r) return s < r;
|
|
1691
1811
|
}
|
|
1692
1812
|
return !1;
|
|
1693
1813
|
}
|
|
1694
|
-
function
|
|
1695
|
-
return n.problemType !== void 0 && n.problemType.endsWith(
|
|
1814
|
+
function Qn(n) {
|
|
1815
|
+
return n.problemType !== void 0 && n.problemType.endsWith(bn) ? !0 : n.minimumVersion !== void 0 && _n(n.version, n.minimumVersion);
|
|
1696
1816
|
}
|
|
1697
1817
|
export {
|
|
1698
|
-
|
|
1818
|
+
$n as AppShell,
|
|
1699
1819
|
ve as Avatar,
|
|
1700
1820
|
Ae as BOOTSTRAP_ICONS,
|
|
1701
|
-
|
|
1702
|
-
|
|
1821
|
+
tn as Badge,
|
|
1822
|
+
ne as Button,
|
|
1703
1823
|
Se as CALL_LABELS,
|
|
1704
|
-
|
|
1705
|
-
|
|
1824
|
+
bn as CLIENT_UPDATE_REQUIRED,
|
|
1825
|
+
Rn as CallBar,
|
|
1706
1826
|
Un as CallPanel,
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1827
|
+
Kn as ChatBubble,
|
|
1828
|
+
Hn as Composer,
|
|
1829
|
+
Cn as ConfirmDialog,
|
|
1830
|
+
on as ContextMenu,
|
|
1831
|
+
Re as EmptyState,
|
|
1832
|
+
ze as ErrorBanner,
|
|
1833
|
+
Tn as FilePicker,
|
|
1834
|
+
Je as FilePickerDenied,
|
|
1835
|
+
Dn as FileViewer,
|
|
1836
|
+
Pn as FilterChips,
|
|
1837
|
+
An as ICON_NAMES,
|
|
1838
|
+
P as Icon,
|
|
1839
|
+
On as IncomingCall,
|
|
1840
|
+
Vn as List,
|
|
1841
|
+
Ue as Loading,
|
|
1842
|
+
rn as MAIL_ROW_LABELS,
|
|
1843
|
+
Oe as MODAL_CLOSE_MS,
|
|
1844
|
+
Bn as MailRow,
|
|
1725
1845
|
Le as Modal,
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1846
|
+
jn as Notification,
|
|
1847
|
+
En as PageHeader,
|
|
1848
|
+
Wn as PaneToolbar,
|
|
1849
|
+
cn as SIGN_IN_LABELS,
|
|
1729
1850
|
ye as STATE_DELAY_MS,
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1851
|
+
In as SearchField,
|
|
1852
|
+
kn as Select,
|
|
1853
|
+
Zn as SignInForm,
|
|
1733
1854
|
zn as SignInLayout,
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1855
|
+
Fn as SplitPanes,
|
|
1856
|
+
ee as State,
|
|
1857
|
+
Ln as TabStrip,
|
|
1858
|
+
wn as TextArea,
|
|
1859
|
+
yn as TextField,
|
|
1860
|
+
Mn as Toast,
|
|
1861
|
+
Sn as ToastRegion,
|
|
1862
|
+
xn as Toggle,
|
|
1863
|
+
an as fitPanes,
|
|
1743
1864
|
_e as iconForName,
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1865
|
+
nn as initialsOf,
|
|
1866
|
+
hn as isCapability,
|
|
1867
|
+
Qn as needsClientUpdate,
|
|
1868
|
+
qn as offerFor,
|
|
1869
|
+
Jn as readConflict,
|
|
1870
|
+
Xn as readRefusal,
|
|
1750
1871
|
fn as refusalText,
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1872
|
+
Gn as rereadAll,
|
|
1873
|
+
ln as tintOf,
|
|
1874
|
+
Yn as useReread,
|
|
1875
|
+
_n as versionBelow,
|
|
1755
1876
|
Ke as writtenOut
|
|
1756
1877
|
};
|