@orangelogic/design-system 2.94.0 → 2.96.0
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/library/chunks/{color-swatch-group.Q8ybVS0A.js → color-swatch-group.CKHEL4hJ.js} +1 -1
- package/library/chunks/{cropper.C3G5CGTF.js → cropper.uKGcvnPk.js} +2 -2
- package/library/chunks/{file-on-demand.Vj4PI0tu.js → file-on-demand.KQlA1JFF.js} +192 -189
- package/library/chunks/{image.C3LupRuN.js → image.C-Covc0H.js} +320 -299
- package/library/chunks/{image.ocYnNdYK.js → image.Dtdklw5q.js} +1 -1
- package/library/chunks/{index.B7slZiaV.js → index.BgXEXk4m.js} +3 -3
- package/library/chunks/{list-editor.CZzuw4XU.js → list-editor.De7nc_Wd.js} +2 -2
- package/library/chunks/number.CCF6IxpN.js +105 -0
- package/library/chunks/{table.CYxWpvAC.js → table.Cr0s-nqe.js} +2 -1
- package/library/chunks/{time.wo2iH5iw.js → time.BNrE47-8.js} +1 -1
- package/library/components/asset-link-format.js +3 -3
- package/library/components/atoms.js +2 -2
- package/library/components/color-swatch-group.js +2 -2
- package/library/components/cropper.js +1 -1
- package/library/components/file-on-demand.js +2 -2
- package/library/components/format-time.js +1 -1
- package/library/components/image.js +1 -1
- package/library/components/list-editor.js +2 -2
- package/library/components/masonry.js +1 -1
- package/library/components/molecules.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/table.js +1 -1
- package/library/components/textarea.js +1 -1
- package/library/components/types.js +23 -19
- package/library/components/video.js +1 -1
- package/library/package.json +1 -1
- package/library/packages/base/src/resizable-element.d.ts +9 -1
- package/library/packages/molecules/src/mentions/mentions.d.ts +1 -0
- package/library/packages/organisms/src/file-on-demand/file-on-demand.constants.d.ts +1 -0
- package/library/packages/types/src/resizable-element.d.ts +5 -0
- package/library/packages/utils/src/number/number.d.ts +4 -1
- package/library/react-web-component.d.ts +8 -0
- package/library/utils.js +4 -4
- package/package.json +1 -1
- package/library/chunks/number.DE78rV_g.js +0 -104
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
import J from "../components/icon.js";
|
|
2
2
|
import Q from "../components/line-clamp.js";
|
|
3
|
-
import { C as
|
|
3
|
+
import { C as bt, s as $t, a as St, b as dt } from "./tree.CKi63r95.js";
|
|
4
4
|
import { n as d, C as H } from "./lib-cortex-element.CVMmyPMC.js";
|
|
5
5
|
import { c as tt } from "./component.styles.CRO4Odto.js";
|
|
6
6
|
import { c as W } from "./custom-element.L4WJXn1j.js";
|
|
7
7
|
import { L as q } from "./i18n.W6czbRms.js";
|
|
8
|
-
import { k as
|
|
8
|
+
import { k as Et, h as It, i as wt, w as P, j as Lt, l as Ft, f as Ut, g as Rt, d as kt, m as Ot, n as Nt } from "./watch.BCJD77bD.js";
|
|
9
9
|
import { p as R } from "./string.DfV21HEI.js";
|
|
10
|
-
import { x as n, i as
|
|
10
|
+
import { x as n, i as ot, E as jt } from "./lit-element.jLBm65_O.js";
|
|
11
11
|
import { r as u } from "./state.CSDxrqLd.js";
|
|
12
12
|
import { e as z } from "./query.BBf1UFkC.js";
|
|
13
13
|
import { e as C } from "./class-map.BiVq-cVR.js";
|
|
14
14
|
import { c as U } from "./repeat.DbF2p5ae.js";
|
|
15
15
|
import { n as p } from "./when.Dr1es41R.js";
|
|
16
|
-
import { a as
|
|
17
|
-
import
|
|
18
|
-
import { C as
|
|
19
|
-
import { C as
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import { C as
|
|
23
|
-
import
|
|
24
|
-
import { C as
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import { C as
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import { C as
|
|
33
|
-
import { C as
|
|
34
|
-
import { d as
|
|
35
|
-
import { a as et } from "./number.
|
|
36
|
-
import { i as K, a as
|
|
37
|
-
import { a as
|
|
38
|
-
import { S as
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import { o as
|
|
42
|
-
import { r as
|
|
43
|
-
function
|
|
16
|
+
import { a as Bt, i as Ct, c as Mt, b as ht } from "./_baseUniq.BUihBa8c.js";
|
|
17
|
+
import Vt from "../components/avatar.js";
|
|
18
|
+
import { C as Ht } from "./button.BZjbVq8t.js";
|
|
19
|
+
import { C as Wt } from "./dialog.DRW8iwh-.js";
|
|
20
|
+
import qt from "../components/divider.js";
|
|
21
|
+
import nt from "../components/format-bytes.js";
|
|
22
|
+
import { C as At } from "./icon-button.MqA-pNw8.js";
|
|
23
|
+
import Gt from "../components/input.js";
|
|
24
|
+
import { C as Yt } from "./option.Cx54zrJq.js";
|
|
25
|
+
import Dt from "../components/relative-time.js";
|
|
26
|
+
import Kt from "../components/select.js";
|
|
27
|
+
import Xt from "../components/space.js";
|
|
28
|
+
import Zt from "../components/tab.js";
|
|
29
|
+
import { C as Jt } from "./tab-group.BLZ-qEpp.js";
|
|
30
|
+
import Qt from "../components/tab-panel.js";
|
|
31
|
+
import Tt from "../components/tooltip.js";
|
|
32
|
+
import { C as rt } from "./typography.DJC_UXgs.js";
|
|
33
|
+
import { C as te } from "./confirm-popover.bBo9aPlX.js";
|
|
34
|
+
import { d as ee } from "./debounce.DaHuiSGU.js";
|
|
35
|
+
import { a as et } from "./number.CCF6IxpN.js";
|
|
36
|
+
import { i as K, a as pt } from "./url.Cj9cIQXJ.js";
|
|
37
|
+
import { a as se } from "./toString.CL_lYXbK.js";
|
|
38
|
+
import { S as ut, i as ie } from "./isObjectLike.z36Fu426.js";
|
|
39
|
+
import ae from "../components/progress-bar.js";
|
|
40
|
+
import oe from "../components/spinner.js";
|
|
41
|
+
import { o as ne } from "./style-map.llVFPd__.js";
|
|
42
|
+
import { r as re } from "./choose.BTbF6BAn.js";
|
|
43
|
+
function ce(t, e, i, a) {
|
|
44
44
|
for (var s = -1, o = t == null ? 0 : t.length; ++s < o; ) {
|
|
45
45
|
var c = t[s];
|
|
46
46
|
e(a, c, i(c), t);
|
|
47
47
|
}
|
|
48
48
|
return a;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function le(t) {
|
|
51
51
|
return function(e, i, a) {
|
|
52
52
|
for (var s = -1, o = Object(e), c = a(e), h = c.length; h--; ) {
|
|
53
53
|
var _ = c[++s];
|
|
@@ -57,39 +57,39 @@ function ce(t) {
|
|
|
57
57
|
return e;
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
var
|
|
61
|
-
function de(t, e) {
|
|
62
|
-
return t && le(t, e, zt);
|
|
63
|
-
}
|
|
60
|
+
var de = le();
|
|
64
61
|
function he(t, e) {
|
|
62
|
+
return t && de(t, e, Et);
|
|
63
|
+
}
|
|
64
|
+
function pe(t, e) {
|
|
65
65
|
return function(i, a) {
|
|
66
66
|
if (i == null)
|
|
67
67
|
return i;
|
|
68
|
-
if (!
|
|
68
|
+
if (!It(i))
|
|
69
69
|
return t(i, a);
|
|
70
70
|
for (var s = i.length, o = -1, c = Object(i); ++o < s && a(c[o], o, c) !== !1; )
|
|
71
71
|
;
|
|
72
72
|
return i;
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
var
|
|
76
|
-
function
|
|
77
|
-
return
|
|
75
|
+
var ue = pe(he);
|
|
76
|
+
function ge(t, e, i, a) {
|
|
77
|
+
return ue(t, function(s, o, c) {
|
|
78
78
|
e(a, s, i(s), c);
|
|
79
79
|
}), a;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function xe(t, e) {
|
|
82
82
|
return function(i, a) {
|
|
83
|
-
var s =
|
|
84
|
-
return s(i, t,
|
|
83
|
+
var s = wt(i) ? ce : ge, o = e ? e() : {};
|
|
84
|
+
return s(i, t, Bt(a), o);
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
var
|
|
87
|
+
var me = xe(function(t, e, i) {
|
|
88
88
|
t[i ? 0 : 1].push(e);
|
|
89
89
|
}, function() {
|
|
90
90
|
return [[], []];
|
|
91
91
|
});
|
|
92
|
-
const
|
|
92
|
+
const _e = {
|
|
93
93
|
error: "Upload error",
|
|
94
94
|
loaded: "Up-to-date",
|
|
95
95
|
loading: "Syncing"
|
|
@@ -98,7 +98,7 @@ const me = {
|
|
|
98
98
|
PINNED: "pinned",
|
|
99
99
|
RECENT: "recent",
|
|
100
100
|
UPLOADS: "uploads"
|
|
101
|
-
}, X = 20,
|
|
101
|
+
}, X = 20, fe = {
|
|
102
102
|
GET_CONTENT: "/webapi/extensibility/integrations/contentBrowserSDK/getcontent_4bw_v1"
|
|
103
103
|
}, A = {
|
|
104
104
|
ASSET_PATH: "Document.AssetPath",
|
|
@@ -108,7 +108,7 @@ const me = {
|
|
|
108
108
|
HAS_BROWSER_CHILDREN: "Document.HasBrowserChildren",
|
|
109
109
|
PARENT_FOLDER_IDENTIFIER: "Document.ParentRecordID",
|
|
110
110
|
TITLE_WITH_FALLBACK: "CoreField.TitleWithFallback"
|
|
111
|
-
}, Z = "GB", O = 6e4,
|
|
111
|
+
}, Z = "GB", st = 1e3, O = 6e4, ve = ["album", "story", "project", "merchandise"], gt = (t) => {
|
|
112
112
|
const e = /* @__PURE__ */ new Date(), i = new Date(
|
|
113
113
|
e.getFullYear(),
|
|
114
114
|
e.getMonth(),
|
|
@@ -118,11 +118,11 @@ const me = {
|
|
|
118
118
|
e.getMonth(),
|
|
119
119
|
e.getDate() + 1
|
|
120
120
|
).getTime();
|
|
121
|
-
return
|
|
121
|
+
return me(
|
|
122
122
|
t.toSorted((s, o) => o.uploadTimestamp - s.uploadTimestamp),
|
|
123
123
|
(s) => s.uploadTimestamp >= i && s.uploadTimestamp < a
|
|
124
124
|
);
|
|
125
|
-
},
|
|
125
|
+
}, ye = ({
|
|
126
126
|
excludesRecordIDs: t,
|
|
127
127
|
searchText: e
|
|
128
128
|
}) => {
|
|
@@ -132,12 +132,12 @@ const me = {
|
|
|
132
132
|
t?.length && (a = t.map((o) => `RecordID:NOT ${o}`).join(" AND "));
|
|
133
133
|
let s = i ? ` AND (${[i].filter(Boolean).join(" OR ")})` : "";
|
|
134
134
|
return a && (s = `${s} AND (${a})`), `(MediaType:Story OR MediaType:Album)${s}`;
|
|
135
|
-
},
|
|
135
|
+
}, be = 10, Pt = async ({
|
|
136
136
|
excludes: t = [],
|
|
137
137
|
folderId: e,
|
|
138
138
|
folderPath: i = [],
|
|
139
139
|
folderPathsSet: a,
|
|
140
|
-
limit: s =
|
|
140
|
+
limit: s = be,
|
|
141
141
|
searchText: o,
|
|
142
142
|
seeThru: c,
|
|
143
143
|
siteUrl: h,
|
|
@@ -148,11 +148,11 @@ const me = {
|
|
|
148
148
|
return { data: [], totalCount: 0 };
|
|
149
149
|
let g = h;
|
|
150
150
|
g.endsWith("/") && (g = g.slice(0, -1));
|
|
151
|
-
const $ =
|
|
151
|
+
const $ = fe.GET_CONTENT, f = [
|
|
152
152
|
["Token", m],
|
|
153
153
|
[
|
|
154
154
|
"extraFilters",
|
|
155
|
-
|
|
155
|
+
ye({
|
|
156
156
|
excludesRecordIDs: t,
|
|
157
157
|
searchText: o
|
|
158
158
|
})
|
|
@@ -184,12 +184,12 @@ const me = {
|
|
|
184
184
|
}
|
|
185
185
|
const G = await k.json();
|
|
186
186
|
let Y = /* @__PURE__ */ new Set();
|
|
187
|
-
a && (Y =
|
|
188
|
-
const
|
|
187
|
+
a && (Y = Ie(a));
|
|
188
|
+
const ct = G.contentItems?.map((w) => {
|
|
189
189
|
let E = M(
|
|
190
190
|
w.fields,
|
|
191
191
|
A.TITLE_WITH_FALLBACK
|
|
192
|
-
) ?? "", B =
|
|
192
|
+
) ?? "", B = Se(
|
|
193
193
|
(M(
|
|
194
194
|
w.fields,
|
|
195
195
|
A.ASSET_PATH
|
|
@@ -197,8 +197,8 @@ const me = {
|
|
|
197
197
|
) || E;
|
|
198
198
|
if (a) {
|
|
199
199
|
if (a.has(B)) {
|
|
200
|
-
const
|
|
201
|
-
B = `${
|
|
200
|
+
const lt = B.split("/"), zt = lt.pop();
|
|
201
|
+
B = `${lt.join("/")}/${w.recordID}-${zt}`, E = `${w.recordID}-${E}`;
|
|
202
202
|
}
|
|
203
203
|
o?.trim() && Y.has(E) && (E = B), a.add(B), Y.add(E);
|
|
204
204
|
}
|
|
@@ -229,7 +229,7 @@ const me = {
|
|
|
229
229
|
title: E
|
|
230
230
|
};
|
|
231
231
|
}) ?? [];
|
|
232
|
-
return { data:
|
|
232
|
+
return { data: ct, totalCount: G.totalCount ?? ct.length };
|
|
233
233
|
};
|
|
234
234
|
function M(t, e) {
|
|
235
235
|
const i = e.toLowerCase(), a = Object.keys(t).find(
|
|
@@ -237,44 +237,44 @@ function M(t, e) {
|
|
|
237
237
|
);
|
|
238
238
|
return a ? t[a] : void 0;
|
|
239
239
|
}
|
|
240
|
-
const
|
|
241
|
-
const e = t.split(
|
|
240
|
+
const at = "-", S = (t) => {
|
|
241
|
+
const e = t.split(at), i = e.pop() ?? "", a = e.join(at);
|
|
242
242
|
return { id: i, path: a };
|
|
243
|
-
}, N = ({ id: t, path: e }) => [e, t].join(
|
|
243
|
+
}, N = ({ id: t, path: e }) => [e, t].join(at), $e = (t) => {
|
|
244
244
|
const e = t.split(".");
|
|
245
245
|
return e.length > 1 ? e.pop() ?? "" : "";
|
|
246
|
-
},
|
|
246
|
+
}, xt = (t) => {
|
|
247
247
|
const e = t.match(/(?:V\.?)?(\d+(?:\.\d+)*)/);
|
|
248
248
|
return e ? e[1] : "";
|
|
249
|
-
},
|
|
249
|
+
}, mt = (t, e) => {
|
|
250
250
|
let i = e?.trim();
|
|
251
251
|
const a = e ? e.split("/").length : 0;
|
|
252
252
|
return (t ? t.length : 0) >= a && (i = t.join("/") ?? ""), i;
|
|
253
|
-
},
|
|
253
|
+
}, Se = (t) => t.split("/").map((e) => e.trim()).join("/"), Ie = (t) => {
|
|
254
254
|
const e = /* @__PURE__ */ new Set();
|
|
255
255
|
for (const i of t) {
|
|
256
256
|
const a = i.split("/"), s = a[a.length - 1];
|
|
257
257
|
s && e.add(s);
|
|
258
258
|
}
|
|
259
259
|
return e;
|
|
260
|
-
},
|
|
260
|
+
}, we = (t, e) => {
|
|
261
261
|
const i = t.split("/"), a = e.split("/");
|
|
262
262
|
return i.slice(0, a.length + 1).join("/");
|
|
263
263
|
};
|
|
264
|
-
function
|
|
264
|
+
function _t(t) {
|
|
265
265
|
return t.toSorted((e, i) => i.uploadTimestamp - e.uploadTimestamp);
|
|
266
266
|
}
|
|
267
|
-
var
|
|
268
|
-
for (var s = a > 1 ? void 0 : a ?
|
|
267
|
+
var Ce = Object.defineProperty, Ae = Object.getOwnPropertyDescriptor, D = (t, e, i, a) => {
|
|
268
|
+
for (var s = a > 1 ? void 0 : a ? Ae(e, i) : e, o = t.length - 1, c; o >= 0; o--)
|
|
269
269
|
(c = t[o]) && (s = (a ? c(e, i, s) : c(s)) || s);
|
|
270
|
-
return a && s &&
|
|
270
|
+
return a && s && Ce(e, i, s), s;
|
|
271
271
|
};
|
|
272
272
|
let y = class extends H {
|
|
273
273
|
constructor() {
|
|
274
274
|
super(...arguments), this.localize = new q(this), this.role = "treeitem", this.siteUrl = "", this.token = "", this.searchText = "", this.folder = null, this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.folderPathsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], this.data = null, this.totalCount = 0, this.isLoading = !1, this.fetchFolders = async ({
|
|
275
275
|
folderId: t,
|
|
276
276
|
start: e = 0
|
|
277
|
-
}) => await
|
|
277
|
+
}) => await Pt({
|
|
278
278
|
folderId: t,
|
|
279
279
|
folderPath: this.folder?.path ?? [],
|
|
280
280
|
folderPathsSet: this.folderPathsSet,
|
|
@@ -301,7 +301,7 @@ let y = class extends H {
|
|
|
301
301
|
if (this.data = e, this.totalCount = i, await this.updateComplete, this.closest("cx-tree")?.initTreeItems(), !this.treeItem.selected && !this.treeItem.indeterminate) {
|
|
302
302
|
let a = !0, s = !0;
|
|
303
303
|
for (const o of this.treeItem.getChildrenItems())
|
|
304
|
-
o.selected ? (
|
|
304
|
+
o.selected ? ($t(o, !0, "multiple"), s = !1) : a = !1;
|
|
305
305
|
this.treeItem.indeterminate = !a && !s;
|
|
306
306
|
}
|
|
307
307
|
};
|
|
@@ -335,13 +335,13 @@ let y = class extends H {
|
|
|
335
335
|
if (await this.updateComplete, !this.treeItem)
|
|
336
336
|
return;
|
|
337
337
|
let t = !1;
|
|
338
|
-
const e = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a =
|
|
338
|
+
const e = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = mt(this.folder?.path ?? [], this.folder?.fullPath ?? ""), s = [...this.currentRootIDsSet], o = (m, g) => {
|
|
339
339
|
m.forEach(($) => {
|
|
340
340
|
const f = S($);
|
|
341
341
|
if (!f.path.trim() || !f.id.trim())
|
|
342
342
|
return !1;
|
|
343
343
|
const F = R(f.path), k = R(a);
|
|
344
|
-
a && F.startsWith(k) && F !== k && g.add(
|
|
344
|
+
a && F.startsWith(k) && F !== k && g.add(we(f.path, a));
|
|
345
345
|
});
|
|
346
346
|
};
|
|
347
347
|
o(this.removedIDs, i), o(s, e);
|
|
@@ -379,7 +379,7 @@ let y = class extends H {
|
|
|
379
379
|
c ? (t = i.size > 0, this.treeItem.selected = !0) : (t = e.size > 0, this.treeItem.selected = !1, await this.treeItem.updateComplete), t ? (this.treeItem.selected = !1, await this.treeItem.updateComplete, this.treeItem.indeterminate = !0) : this.treeItem.indeterminate = !1;
|
|
380
380
|
}
|
|
381
381
|
render() {
|
|
382
|
-
const t =
|
|
382
|
+
const t = mt(this.folder?.path ?? [], this.folder?.fullPath ?? "");
|
|
383
383
|
return n`<cx-tree-item aria-label=${this.folder?.title ?? ""} class=${C({
|
|
384
384
|
"folder-tree__item": !0,
|
|
385
385
|
selectable: !0
|
|
@@ -398,7 +398,7 @@ y.styles = [tt];
|
|
|
398
398
|
y.dependencies = {
|
|
399
399
|
"cx-icon": J,
|
|
400
400
|
"cx-line-clamp": Q,
|
|
401
|
-
"cx-tree-item":
|
|
401
|
+
"cx-tree-item": bt
|
|
402
402
|
};
|
|
403
403
|
D([
|
|
404
404
|
z("cx-tree-item")
|
|
@@ -453,11 +453,11 @@ D([
|
|
|
453
453
|
y = D([
|
|
454
454
|
W("cx-folder-item")
|
|
455
455
|
], y);
|
|
456
|
-
const
|
|
457
|
-
var
|
|
458
|
-
for (var s = a > 1 ? void 0 : a ?
|
|
456
|
+
const De = ot`.folder-tree{flex:1;overflow:auto}.folder-tree:not(.selectable){max-height:200px}.folder-tree__item::part(label){width:100%;overflow:hidden}.folder-tree__icon{font-size:var(--cx-font-size-large);color:var(--cx-color-neutral-600)}.folder-tree__label{gap:var(--cx-spacing-x-small);width:100%;line-height:var(--cx-line-height-medium);display:flex;overflow:hidden}.folder-tree__label__value{--tooltip-max-width:min(80vw, 640px);flex-grow:1;flex-shrink:1;overflow:hidden}.load-more-button{margin-left:calc(1em + var(--cx-spacing-x-small) + 1rem + var(--cx-spacing-x-small) * 2)}.load-more-button cx-button{line-height:var(--cx-line-height-small)}`;
|
|
457
|
+
var Te = Object.defineProperty, Pe = Object.getOwnPropertyDescriptor, I = (t, e, i, a) => {
|
|
458
|
+
for (var s = a > 1 ? void 0 : a ? Pe(e, i) : e, o = t.length - 1, c; o >= 0; o--)
|
|
459
459
|
(c = t[o]) && (s = (a ? c(e, i, s) : c(s)) || s);
|
|
460
|
-
return a && s &&
|
|
460
|
+
return a && s && Te(e, i, s), s;
|
|
461
461
|
};
|
|
462
462
|
let b = class extends H {
|
|
463
463
|
constructor() {
|
|
@@ -491,7 +491,7 @@ let b = class extends H {
|
|
|
491
491
|
if (!(e.indeterminate && !e.selected)) {
|
|
492
492
|
if (e.selected) {
|
|
493
493
|
if (!this.currentRootIDsSet.has(s)) {
|
|
494
|
-
|
|
494
|
+
dt(e, "multiple"), this.currentRootIDsSet.add(s);
|
|
495
495
|
for (const o of e.getChildrenItems())
|
|
496
496
|
!o.id.trim() || !o.dataset.path?.trim() || this.currentRootIDsSet.add(
|
|
497
497
|
N({
|
|
@@ -504,7 +504,7 @@ let b = class extends H {
|
|
|
504
504
|
(o) => o !== s && !S(o).path.startsWith(a + "/")
|
|
505
505
|
);
|
|
506
506
|
} else
|
|
507
|
-
this.removedIDs.push(s), this.currentRootIDsSet.has(s) && (this.currentRootIDsSet.delete(s),
|
|
507
|
+
this.removedIDs.push(s), this.currentRootIDsSet.has(s) && (this.currentRootIDsSet.delete(s), dt(e, "multiple"));
|
|
508
508
|
[...this.currentRootIDsSet].forEach((o) => {
|
|
509
509
|
const c = R(a), h = S(o).path, _ = R(h);
|
|
510
510
|
_.startsWith(c) && _ !== c && (e.selected || this.currentRootIDsSet.delete(o));
|
|
@@ -525,10 +525,10 @@ let b = class extends H {
|
|
|
525
525
|
)}</cx-tree></div>`;
|
|
526
526
|
}
|
|
527
527
|
};
|
|
528
|
-
b.styles = [tt,
|
|
528
|
+
b.styles = [tt, De];
|
|
529
529
|
b.dependencies = {
|
|
530
530
|
"cx-folder-item": y,
|
|
531
|
-
"cx-tree":
|
|
531
|
+
"cx-tree": St
|
|
532
532
|
};
|
|
533
533
|
I([
|
|
534
534
|
z("cx-tree")
|
|
@@ -575,7 +575,7 @@ I([
|
|
|
575
575
|
b = I([
|
|
576
576
|
W("cx-folder-tree")
|
|
577
577
|
], b);
|
|
578
|
-
function
|
|
578
|
+
function ze(t, e, i) {
|
|
579
579
|
switch (i.length) {
|
|
580
580
|
case 0:
|
|
581
581
|
return t.call(e);
|
|
@@ -588,58 +588,58 @@ function Pe(t, e, i) {
|
|
|
588
588
|
}
|
|
589
589
|
return t.apply(e, i);
|
|
590
590
|
}
|
|
591
|
-
var
|
|
592
|
-
function
|
|
593
|
-
return e =
|
|
594
|
-
for (var a = arguments, s = -1, o =
|
|
591
|
+
var ft = Math.max;
|
|
592
|
+
function Ee(t, e, i) {
|
|
593
|
+
return e = ft(e === void 0 ? t.length - 1 : e, 0), function() {
|
|
594
|
+
for (var a = arguments, s = -1, o = ft(a.length - e, 0), c = Array(o); ++s < o; )
|
|
595
595
|
c[s] = a[e + s];
|
|
596
596
|
s = -1;
|
|
597
597
|
for (var h = Array(e + 1); ++s < e; )
|
|
598
598
|
h[s] = a[s];
|
|
599
|
-
return h[e] = i(c),
|
|
599
|
+
return h[e] = i(c), ze(t, this, h);
|
|
600
600
|
};
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function Le(t) {
|
|
603
603
|
return function() {
|
|
604
604
|
return t;
|
|
605
605
|
};
|
|
606
606
|
}
|
|
607
|
-
var
|
|
607
|
+
var vt = function() {
|
|
608
608
|
try {
|
|
609
|
-
var t =
|
|
609
|
+
var t = Lt(Object, "defineProperty");
|
|
610
610
|
return t({}, "", {}), t;
|
|
611
611
|
} catch {
|
|
612
612
|
}
|
|
613
|
-
}(),
|
|
614
|
-
return
|
|
613
|
+
}(), Fe = vt ? function(t, e) {
|
|
614
|
+
return vt(t, "toString", {
|
|
615
615
|
configurable: !0,
|
|
616
616
|
enumerable: !1,
|
|
617
|
-
value:
|
|
617
|
+
value: Le(e),
|
|
618
618
|
writable: !0
|
|
619
619
|
});
|
|
620
|
-
} :
|
|
621
|
-
function
|
|
620
|
+
} : Ct, Ue = 800, Re = 16, ke = Date.now;
|
|
621
|
+
function Oe(t) {
|
|
622
622
|
var e = 0, i = 0;
|
|
623
623
|
return function() {
|
|
624
|
-
var a =
|
|
624
|
+
var a = ke(), s = Re - (a - i);
|
|
625
625
|
if (i = a, s > 0) {
|
|
626
|
-
if (++e >=
|
|
626
|
+
if (++e >= Ue)
|
|
627
627
|
return arguments[0];
|
|
628
628
|
} else
|
|
629
629
|
e = 0;
|
|
630
630
|
return t.apply(void 0, arguments);
|
|
631
631
|
};
|
|
632
632
|
}
|
|
633
|
-
var
|
|
634
|
-
function
|
|
635
|
-
return
|
|
633
|
+
var Ne = Oe(Fe);
|
|
634
|
+
function je(t, e) {
|
|
635
|
+
return Ne(Ee(t, e, Ct), t + "");
|
|
636
636
|
}
|
|
637
|
-
var
|
|
638
|
-
function
|
|
639
|
-
var s = -1, o =
|
|
637
|
+
var Be = 200;
|
|
638
|
+
function Me(t, e, i, a) {
|
|
639
|
+
var s = -1, o = Mt, c = !0, h = t.length, _ = [], m = e.length;
|
|
640
640
|
if (!h)
|
|
641
641
|
return _;
|
|
642
|
-
i && (e =
|
|
642
|
+
i && (e = se(e, Ft(i))), e.length >= Be && (o = Rt, c = !1, e = new Ut(e));
|
|
643
643
|
t:
|
|
644
644
|
for (; ++s < h; ) {
|
|
645
645
|
var g = t[s], $ = i == null ? g : i(g);
|
|
@@ -652,36 +652,36 @@ function Be(t, e, i, a) {
|
|
|
652
652
|
}
|
|
653
653
|
return _;
|
|
654
654
|
}
|
|
655
|
-
var
|
|
656
|
-
function
|
|
657
|
-
return
|
|
655
|
+
var yt = ut ? ut.isConcatSpreadable : void 0;
|
|
656
|
+
function Ve(t) {
|
|
657
|
+
return wt(t) || kt(t) || !!(yt && t && t[yt]);
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function He(t, e, i, a, s) {
|
|
660
660
|
var o = -1, c = t.length;
|
|
661
|
-
for (i || (i =
|
|
661
|
+
for (i || (i = Ve), s || (s = []); ++o < c; ) {
|
|
662
662
|
var h = t[o];
|
|
663
|
-
i(h) ?
|
|
663
|
+
i(h) ? Ot(s, h) : a || (s[s.length] = h);
|
|
664
664
|
}
|
|
665
665
|
return s;
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function We(t, e, i) {
|
|
668
668
|
var a = t.length;
|
|
669
669
|
if (a < 2)
|
|
670
|
-
return a ?
|
|
670
|
+
return a ? ht(t[0]) : [];
|
|
671
671
|
for (var s = -1, o = Array(a); ++s < a; )
|
|
672
672
|
for (var c = t[s], h = -1; ++h < a; )
|
|
673
|
-
h != s && (o[s] =
|
|
674
|
-
return
|
|
673
|
+
h != s && (o[s] = Me(o[s] || c, t[h], e, i));
|
|
674
|
+
return ht(He(o), e, i);
|
|
675
675
|
}
|
|
676
|
-
function
|
|
677
|
-
return
|
|
676
|
+
function qe(t) {
|
|
677
|
+
return ie(t) && It(t);
|
|
678
678
|
}
|
|
679
|
-
var
|
|
680
|
-
return
|
|
681
|
-
}), v = /* @__PURE__ */ ((t) => (t.Canceled = "CANCELED", t.Failed = "FAILED", t.InProgress = "INPROGRESS", t.PendingComplete = "PENDINGCOMPLETE", t.Success = "SUCCESS", t))(v || {}),
|
|
682
|
-
for (var s = a > 1 ? void 0 : a ?
|
|
679
|
+
var it = je(function(t) {
|
|
680
|
+
return We(Nt(t, qe));
|
|
681
|
+
}), v = /* @__PURE__ */ ((t) => (t.Canceled = "CANCELED", t.Failed = "FAILED", t.InProgress = "INPROGRESS", t.PendingComplete = "PENDINGCOMPLETE", t.Success = "SUCCESS", t))(v || {}), Ge = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, j = (t, e, i, a) => {
|
|
682
|
+
for (var s = a > 1 ? void 0 : a ? Ye(e, i) : e, o = t.length - 1, c; o >= 0; o--)
|
|
683
683
|
(c = t[o]) && (s = (a ? c(e, i, s) : c(s)) || s);
|
|
684
|
-
return a && s &&
|
|
684
|
+
return a && s && Ge(e, i, s), s;
|
|
685
685
|
};
|
|
686
686
|
let T = class extends H {
|
|
687
687
|
constructor() {
|
|
@@ -715,7 +715,7 @@ let T = class extends H {
|
|
|
715
715
|
</cx-line-clamp></cx-typography></div>`;
|
|
716
716
|
}
|
|
717
717
|
render() {
|
|
718
|
-
return n`<div class="file-on-demand-pinned-status">${
|
|
718
|
+
return n`<div class="file-on-demand-pinned-status">${re(this.uploadStatus, [
|
|
719
719
|
[v.Success, this.renderSuccess.bind(this)],
|
|
720
720
|
[v.Failed, this.renderFailed.bind(this)],
|
|
721
721
|
[v.InProgress, this.renderInProgress.bind(this)],
|
|
@@ -726,10 +726,10 @@ let T = class extends H {
|
|
|
726
726
|
};
|
|
727
727
|
T.styles = [tt];
|
|
728
728
|
T.dependencies = {
|
|
729
|
-
"cx-format-bytes":
|
|
729
|
+
"cx-format-bytes": nt,
|
|
730
730
|
"cx-icon": J,
|
|
731
731
|
"cx-line-clamp": Q,
|
|
732
|
-
"cx-typography":
|
|
732
|
+
"cx-typography": rt
|
|
733
733
|
};
|
|
734
734
|
j([
|
|
735
735
|
d({
|
|
@@ -767,11 +767,11 @@ j([
|
|
|
767
767
|
T = j([
|
|
768
768
|
W("cx-file-on-demand-pinned-status")
|
|
769
769
|
], T);
|
|
770
|
-
const
|
|
771
|
-
var
|
|
772
|
-
for (var s = a > 1 ? void 0 : a ?
|
|
770
|
+
const Ke = ot`:host{padding:var(--cx-spacing-2x-small) var(--cx-spacing-small);display:block}.asset{max-height:var(--asset-height);gap:var(--cx-spacing-small);display:flex}:host(:hover){background-color:var(--cx-input-filled-background-color-hover)}.asset__description{flex-direction:column;flex:1;justify-content:center;width:0;display:flex}.asset__description__label{display:flex}.asset__description__label__text{flex-grow:1;flex-shrink:1;overflow:hidden}.asset__description__status{color:var(--cx-color-neutral-500);line-height:var(--cx-line-height-medium)}.asset__actions{justify-content:flex-end;align-items:center;min-width:64px;display:flex}.asset:hover .asset__actions{visibility:visible;opacity:1}.asset__actions{visibility:hidden;opacity:0}.asset__actions__spinner{min-height:var(--cx-input-height-medium);min-width:var(--cx-input-height-medium);justify-content:center;align-items:center;display:flex}.asset__actions__spinner::part(base){flex-grow:0}.asset__thumbnail{width:56px;height:var(--asset-height);border-radius:var(--cx-border-radius-medium);justify-content:center;align-items:center;display:flex;position:relative}.asset__thumbnail--placeholder{background-color:var(--cx-color-primary-50)}.asset__thumbnail--folder{background-color:var(--cx-color-neutral-100)}.asset__thumbnail__image{object-fit:cover;border-radius:var(--cx-border-radius-medium);flex-shrink:0;width:100%;height:100%}.asset__thumbnail__icon{--font-size:38px;color:var(--cx-color-primary-400);display:none}.asset__folder__icon{--font-size:var(--cx-font-size-x-large);color:var(--cx-color-neutral-600)}.asset__thumbnail__extension{bottom:var(--cx-spacing-3x-small);width:26px;color:var(--cx-color-primary-50);display:none;position:absolute;left:50%;transform:translate(-50%)}.asset__thumbnail__extension__line-clamp{text-align:center;width:100%}.asset__thumbnail__extension__text{text-transform:uppercase;flex-grow:1;flex-shrink:1;display:contents;overflow:hidden}.asset__thumbnail--placeholder .asset__thumbnail__image{display:none}.asset__thumbnail--placeholder .asset__thumbnail__icon,.asset__thumbnail--placeholder .asset__thumbnail__extension{display:flex}cx-progress-bar{--height:4px;--indicator-color:var(--color);--track-color:var(--cx-color-neutral-300);z-index:0}.progress{align-items:center;gap:var(--cx-spacing-2x-small);width:100%;margin-top:var(--cx-spacing-3x-small);display:flex}.syncing-progress,.completed-progress,.failed-progress,.canceled-progress{margin-top:var(--cx-spacing-2x-small)}.progress *{white-space:nowrap}.progress cx-icon{--font-size:var(--cx-font-size-medium)}.progress cx-typography::part(base){line-height:var(--cx-font-size-medium)}.uploading-progress.in-progress cx-icon{color:var(--cx-color-primary-500)}.uploading-progress.paused cx-icon{color:var(--cx-color-warning-500)}.syncing-progress cx-icon{color:var(--cx-color-warning)}.completed-progress cx-icon{color:var(--cx-color-success)}.failed-progress cx-icon,.failed-progress__text{color:var(--cx-color-danger);cursor:help}.canceled-progress cx-icon{color:var(--cx-color-neutral-600)}.file-on-demand-pinned-status__success cx-icon,.file-on-demand-pinned-status__in-progress cx-icon{color:var(--cx-color-success-500)}.file-on-demand-pinned-status__failed cx-icon{color:var(--cx-color-danger-500)}.file-on-demand-pinned-status__canceled cx-icon{color:var(--cx-color-neutral-500)}`;
|
|
771
|
+
var Xe = Object.defineProperty, Ze = Object.getOwnPropertyDescriptor, V = (t, e, i, a) => {
|
|
772
|
+
for (var s = a > 1 ? void 0 : a ? Ze(e, i) : e, o = t.length - 1, c; o >= 0; o--)
|
|
773
773
|
(c = t[o]) && (s = (a ? c(e, i, s) : c(s)) || s);
|
|
774
|
-
return a && s &&
|
|
774
|
+
return a && s && Xe(e, i, s), s;
|
|
775
775
|
};
|
|
776
776
|
let L = class extends H {
|
|
777
777
|
constructor() {
|
|
@@ -793,7 +793,7 @@ let L = class extends H {
|
|
|
793
793
|
return this.listType === x.PINNED;
|
|
794
794
|
}
|
|
795
795
|
get isFolder() {
|
|
796
|
-
return
|
|
796
|
+
return ve.includes((this.asset.docType ?? "").toLowerCase());
|
|
797
797
|
}
|
|
798
798
|
get thumbnailUrl() {
|
|
799
799
|
return this.asset.thumbnail?.trim() ?? "";
|
|
@@ -921,7 +921,7 @@ let L = class extends H {
|
|
|
921
921
|
return n`
|
|
922
922
|
${p(
|
|
923
923
|
c === v.InProgress,
|
|
924
|
-
() => n`<cx-progress-bar style=${
|
|
924
|
+
() => n`<cx-progress-bar style=${ne({
|
|
925
925
|
"--color": t ? "var(--cx-color-warning-500)" : "var(--cx-color-primary-500)"
|
|
926
926
|
})} .value=${_.toFixed(0)} class="progress-bar"></cx-progress-bar>${m}`
|
|
927
927
|
)}
|
|
@@ -954,7 +954,7 @@ let L = class extends H {
|
|
|
954
954
|
return this.isFolder ? this.listType === x.FAVORITES ? n`<cx-icon class="asset__folder__icon" name="folder_special"></cx-icon>` : n`<cx-icon class="asset__folder__icon" name="topic"></cx-icon>` : n`${p(
|
|
955
955
|
!!this.thumbnailUrl,
|
|
956
956
|
() => n`<img alt=${this.asset.fileName} class="asset__thumbnail__image" src=${this.thumbnailUrl} @error=${this.handleImgError} @load=${this.handleImgLoad}>`
|
|
957
|
-
)}<cx-icon class="asset__thumbnail__icon" name="insert_drive_file" variant="filled"></cx-icon><div class="asset__thumbnail__extension"><cx-line-clamp class="asset__thumbnail__extension__line-clamp" lines="1"><cx-typography class="asset__thumbnail__extension__text" variant="small">${
|
|
957
|
+
)}<cx-icon class="asset__thumbnail__icon" name="insert_drive_file" variant="filled"></cx-icon><div class="asset__thumbnail__extension"><cx-line-clamp class="asset__thumbnail__extension__line-clamp" lines="1"><cx-typography class="asset__thumbnail__extension__text" variant="small">${$e(this.asset.fileName)}</cx-typography></cx-line-clamp></div>`;
|
|
958
958
|
}
|
|
959
959
|
renderThumbnail() {
|
|
960
960
|
return n`<div class=${C({
|
|
@@ -1011,18 +1011,18 @@ let L = class extends H {
|
|
|
1011
1011
|
${p(this.showPinnedActions, () => this.renderPinnedActions())}</div></div>`;
|
|
1012
1012
|
}
|
|
1013
1013
|
};
|
|
1014
|
-
L.styles = [tt,
|
|
1014
|
+
L.styles = [tt, Ke];
|
|
1015
1015
|
L.dependencies = {
|
|
1016
1016
|
"cx-file-on-demand-pinned-status": T,
|
|
1017
|
-
"cx-format-bytes":
|
|
1017
|
+
"cx-format-bytes": nt,
|
|
1018
1018
|
"cx-icon": J,
|
|
1019
|
-
"cx-icon-button":
|
|
1019
|
+
"cx-icon-button": At,
|
|
1020
1020
|
"cx-line-clamp": Q,
|
|
1021
|
-
"cx-progress-bar":
|
|
1022
|
-
"cx-relative-time":
|
|
1023
|
-
"cx-spinner":
|
|
1024
|
-
"cx-tooltip":
|
|
1025
|
-
"cx-typography":
|
|
1021
|
+
"cx-progress-bar": ae,
|
|
1022
|
+
"cx-relative-time": Dt,
|
|
1023
|
+
"cx-spinner": oe,
|
|
1024
|
+
"cx-tooltip": Tt,
|
|
1025
|
+
"cx-typography": rt
|
|
1026
1026
|
};
|
|
1027
1027
|
V([
|
|
1028
1028
|
d({ type: Object })
|
|
@@ -1059,11 +1059,11 @@ V([
|
|
|
1059
1059
|
L = V([
|
|
1060
1060
|
W("cx-file-on-demand-asset")
|
|
1061
1061
|
], L);
|
|
1062
|
-
const
|
|
1063
|
-
var
|
|
1064
|
-
for (var s = a > 1 ? void 0 : a ?
|
|
1062
|
+
const Je = ot`:host{--asset-height:40px;color:var(--cx-color-neutral-900);--cx-button-text-transform:none;--tooltip-max-width:min(80vw, 640px);height:100%;display:block}.container{height:100%;display:block}.container--user-interaction-blocked{pointer-events:none;user-select:none}.loading-overlay{background-color:var(--cx-color-neutral-50);opacity:.8;width:100%;height:100%;z-index:var(--cx-z-index-tooltip);justify-content:center;align-items:center;display:flex;position:absolute;top:0;left:0}.assets,.welcome{flex-direction:column;height:100%;display:flex}.assets-list__tab-group .empty-icon{color:var(--cx-color-neutral-600);font-size:var(--cx-font-size-3x-large)}cx-tab{line-height:var(--cx-line-height-large)}.assets-list__tab-group cx-tab{width:25%}.settings__tab-group cx-tab{width:50%}cx-tab::part(base){justify-content:center;display:flex}cx-tab::part(label){text-align:center}cx-tab-panel{--padding:0 0 var(--cx-spacing-x-small) 0}cx-icon[slot=prefix]{font-size:var(--cx-font-size-large)}.error-message{color:var(--cx-color-danger);min-height:1ch}.welcome{padding:var(--cx-spacing-x-large) var(--cx-spacing-medium) var(--cx-spacing-medium) var(--cx-spacing-medium);justify-content:center;align-items:center;gap:var(--cx-spacing-x-large)}.welcome__message{justify-content:center;align-items:center;gap:var(--cx-spacing-x-small);flex-direction:column;display:flex}.welcome__actions{justify-content:center;gap:var(--cx-spacing-x-small);flex-direction:column;width:100%;display:flex}.welcome__connect-button,.welcome__cancel-connection-button,.welcome__input{width:100%}.welcome__connect-button--disabled::part(base){cursor:help}.welcome .error-message{text-align:center}.header{background-color:var(--cx-color-neutral-50);padding:var(--cx-spacing-x-small) var(--cx-spacing-small);justify-content:space-between;line-height:1;display:flex}.header__user{align-items:center;gap:var(--cx-spacing-x-small);display:flex;overflow:hidden}.header__username{display:flex;overflow:hidden}.header__username__text{flex-grow:1;flex-shrink:1;overflow:hidden}.header__avatar{--size:24px}.header__actions{min-width:fit-content}.settings__version__badge::part(base){width:var(--cx-spacing-x-small);padding:0}.assets-list{flex:1;height:0}.assets-list__tab-group,.assets-list__tab-group::part(base),.assets-list__tab-group::part(body),.assets-list__tab-group cx-tab-panel,.assets-list__tab-group cx-tab-panel::part(base){height:100%;overflow:hidden}.assets-list__tab-group .assets-list__tab-group__empty-message{justify-content:center;align-items:center;gap:var(--cx-spacing-medium);font-size:var(--cx-font-size-x-large);padding:var(--cx-spacing-large) 0;text-align:center;flex-direction:column;display:flex}.assets-list__tab-group .assets-list__tab-group__empty-message:not(.favorites-empty){margin-top:40px}.assets-list__tab-group .recent__list,.assets-list__tab-group .favorites__list,.assets-list__tab-group .uploads__list,.assets-list__tab-group .pinned__list{height:100%;padding:0 0 var(--cx-spacing-x-small) 0;flex-direction:column;display:flex;overflow:hidden auto}.favorites-tab-panel__content,.pinned-tab-panel__content{flex-direction:column;height:100%;display:flex}.favorites__sync-time{justify-content:center;align-items:center;display:flex}.assets-list__tab-group .favorites__list,.assets-list__tab-group .pinned__list{flex:1;height:0}.recent__other.empty,.uploads__other.empty,.recent__today.empty,.uploads__today.empty{display:none}.status-footer{padding:0 var(--cx-spacing-small) var(--cx-spacing-small) var(--cx-spacing-small);gap:var(--cx-spacing-2x-small);flex-direction:column;display:flex}.status-footer cx-typography,.status-footer cx-line-clamp{line-height:1}.status-footer .cache-usage,.status-footer .connected-url,.status-footer .connection-status,.status-footer .asset-index-sync-status{justify-content:space-between;align-items:center;display:flex}.status-footer .label{color:var(--cx-color-neutral-600)}.status-footer__divider{--spacing:0;margin-bottom:var(--cx-spacing-small)}.connected-url .label{white-space:nowrap}.connected-url .value-line-clamp{padding:0 var(--cx-spacing-2x-small)}.connected-url .value::part(base){font-weight:var(--cx-font-weight-medium);color:var(--cx-color-neutral-900)}.cache-usage__warning-icon{color:var(--cx-color-warning-500)}.status-footer .cache-usage .label{color:var(--cx-color-primary-600)}.connection-status__value{justify-content:center;align-items:center;gap:var(--cx-spacing-2x-small);cursor:help;display:flex}.connection-status__value cx-typography{display:inline-flex}.connection-status__value cx-typography::part(base){text-transform:capitalize;font-weight:var(--cx-font-weight-medium)}.connection-status--excellent .connection-status__value{color:var(--cx-color-success)}.connection-status--good .connection-status__value{color:var(--cx-color-warning)}.connection-status--bad .connection-status__value{color:var(--cx-color-danger)}.connection-status cx-icon{font-size:var(--cx-font-size-medium)}.asset-index-sync-status .value{justify-content:center;align-items:center;gap:var(--cx-spacing-2x-small);display:flex}.asset-index-sync-status .value cx-typography{display:inline-flex}.asset-index-sync-status .value cx-typography::part(base){text-transform:capitalize;font-weight:var(--cx-font-weight-medium)}.asset-index-sync-status--loaded .value{color:var(--cx-color-success)}.asset-index-sync-status--loading .value{color:var(--cx-color-warning)}.asset-index-sync-status--error .value{color:var(--cx-color-danger)}.asset-index-sync-status cx-icon{font-size:var(--cx-font-size-medium)}.uploads__list .asset-group__label{justify-content:space-between;align-items:center;display:flex}.asset-group__clear-button::part(base){color:var(--cx-color-primary-500);font-size:var(--cx-font-size-x-small)}.asset-group__label{padding:var(--cx-spacing-x-small) var(--cx-spacing-small);color:var(--cx-color-neutral-400);line-height:var(--cx-line-height-large)}.settings{height:100%}.settings .error-message{text-align:center}.settings__form{flex-direction:column;height:100%;display:flex}.settings__tab-group{flex:1;height:0}.settings__tab-group::part(base),.settings__tab-group::part(body){height:100%;overflow:hidden}.settings__tab-group cx-tab-panel{padding:var(--cx-spacing-medium) var(--cx-spacing-large) var(--cx-spacing-large) var(--cx-spacing-large);height:100%;overflow-y:auto}.settings-group{gap:var(--cx-spacing-x-small);flex-direction:column;display:flex}.settings__general,.settings__advanced{gap:calc(var(--cx-spacing-small) * 2);flex-direction:column;display:flex}.settings__footer{border-top:1px solid var(--cx-color-neutral-200);padding:var(--cx-spacing-x-small) var(--cx-spacing-small);justify-content:flex-end;display:flex}.settings__footer__actions{gap:var(--cx-spacing-x-small);display:flex}.settings__connection-url{justify-content:space-between;display:flex}.settings__connection-url__value{padding:0 var(--cx-spacing-small);flex-grow:1;flex-shrink:1;overflow:hidden}.settings__software__version{gap:var(--cx-spacing-small);flex-direction:column;display:flex}.settings__software__version__value{justify-content:space-between;align-items:center;gap:var(--cx-spacing-2x-small);display:flex}.settings__software__version__value__text{flex-grow:1;flex-shrink:1;overflow:hidden}.settings__software__version__install-button{flex-shrink:0}.settings__about{text-align:center;color:var(--cx-color-neutral-500)}.settings__disconnect-button{width:100%}.settings__disconnect-button::part(base),.settings__disconnect-button cx-icon{color:var(--cx-color-danger)}.settings__cache__size{gap:var(--cx-spacing-x-small);flex-direction:column;justify-content:center;display:flex}.settings__cache__size cx-input{width:150px}.settings__cache__location{gap:var(--cx-spacing-small);flex-direction:column;display:flex}.settings__cache__location__label,.settings__cache__size__label{--color:var(--cx-color-neutral-600)}.settings__cache__location__value{justify-content:space-between;align-items:center;display:flex}.settings__cache__location__value__text{padding:0 var(--cx-spacing-small);flex-grow:1;flex-shrink:1;overflow:hidden}.settings__cache__location__actions{flex-wrap:nowrap}.settings__cache__location__change-button{flex-shrink:0}cx-tree-item:not(.selectable){--selected-color:var(--cx-color-neutral-700)}cx-tree-item:not(:hover):not(.selectable)::part(item){background-color:unset;color:var(--cx-color-neutral-700)}.folder-tree{flex:1;overflow:auto}.folder-tree:not(.selectable){max-height:200px}.folder-tree__item::part(label){width:100%;overflow:hidden}.folder-tree__icon{font-size:var(--cx-font-size-large);color:var(--cx-color-neutral-600)}.folder-tree__label{gap:var(--cx-spacing-x-small);width:100%;line-height:var(--cx-line-height-medium);display:flex;overflow:hidden}.folder-tree__label__value{flex-grow:1;flex-shrink:1;overflow:hidden}.select-folders-popup::part(body){gap:var(--cx-spacing-medium);flex-direction:column;display:flex;overflow:hidden}.select-folders-popup .selectable-folder-tree{flex:1;overflow:auto}.select-folders-popup__actions{justify-content:flex-end;display:flex}`;
|
|
1063
|
+
var Qe = Object.defineProperty, ts = Object.getOwnPropertyDescriptor, l = (t, e, i, a) => {
|
|
1064
|
+
for (var s = a > 1 ? void 0 : a ? ts(e, i) : e, o = t.length - 1, c; o >= 0; o--)
|
|
1065
1065
|
(c = t[o]) && (s = (a ? c(e, i, s) : c(s)) || s);
|
|
1066
|
-
return a && s &&
|
|
1066
|
+
return a && s && Qe(e, i, s), s;
|
|
1067
1067
|
};
|
|
1068
1068
|
let r = class extends H {
|
|
1069
1069
|
constructor() {
|
|
@@ -1086,6 +1086,7 @@ let r = class extends H {
|
|
|
1086
1086
|
// maxUploadRate: 0,
|
|
1087
1087
|
}
|
|
1088
1088
|
}, this.pickCacheLocation = async () => "Default", this.hasNewVersion = !1, this.aboutContent = "", this.token = "", this.userInteractionBlocked = !1, this.isConnecting = !1, this.isCancellingConnection = !1, this.isDisconnecting = !1, this.isUpgrading = !1, this.isSettingsOpened = !1, this.rootIDs = this.settings.config.rootIDs, this._activeFoldersMode = this.rootIDs.length > 0, this.removedIds = [], this.cacheSize = et({
|
|
1089
|
+
base: st,
|
|
1089
1090
|
decimals: 2,
|
|
1090
1091
|
inputUnit: "B",
|
|
1091
1092
|
targetUnit: Z,
|
|
@@ -1098,7 +1099,7 @@ let r = class extends H {
|
|
|
1098
1099
|
start: s = 0
|
|
1099
1100
|
}) => {
|
|
1100
1101
|
try {
|
|
1101
|
-
return await
|
|
1102
|
+
return await Pt({
|
|
1102
1103
|
excludes: t,
|
|
1103
1104
|
folderId: e,
|
|
1104
1105
|
folderPathsSet: i,
|
|
@@ -1155,6 +1156,7 @@ let r = class extends H {
|
|
|
1155
1156
|
}
|
|
1156
1157
|
updateSettingsStates() {
|
|
1157
1158
|
this._activeFoldersMode = this.settings.config.rootIDs?.length > 0, this.rootIDs = this.settings.config.rootIDs ?? [], this.cacheSize = et({
|
|
1159
|
+
base: st,
|
|
1158
1160
|
decimals: 2,
|
|
1159
1161
|
inputUnit: "B",
|
|
1160
1162
|
targetUnit: Z,
|
|
@@ -1162,12 +1164,12 @@ let r = class extends H {
|
|
|
1162
1164
|
}), this.cacheLocation = this.settings.cacheLocation ?? "Default", this.proxyTypes = this.settings.config.proxyTypes ?? [], this.siteUrl = this.settings.config.siteUrl ?? "", this.validConnectionUrl = K(this.settings.config.siteUrl);
|
|
1163
1165
|
}
|
|
1164
1166
|
get formHasChanges() {
|
|
1165
|
-
return this.settings.cacheSize !== this.cacheSize || this.settings.cacheLocation !== this.cacheLocation || !!
|
|
1167
|
+
return this.settings.cacheSize !== this.cacheSize || this.settings.cacheLocation !== this.cacheLocation || !!it(this.settings.config.proxyTypes, this.proxyTypes).length || !!it(this.settings.config.rootIDs, this.rootIDs).length;
|
|
1166
1168
|
}
|
|
1167
1169
|
connect(t = null) {
|
|
1168
1170
|
if (t?.preventDefault(), this.connectError = "", !this.siteUrl?.trim())
|
|
1169
1171
|
return;
|
|
1170
|
-
const e =
|
|
1172
|
+
const e = pt(this.siteUrl);
|
|
1171
1173
|
if (!K(e)) {
|
|
1172
1174
|
this.connectError = this.localize.term("pleaseEnterAValidUrl");
|
|
1173
1175
|
return;
|
|
@@ -1220,6 +1222,7 @@ let r = class extends H {
|
|
|
1220
1222
|
settings: {
|
|
1221
1223
|
cacheLocation: this.cacheLocation,
|
|
1222
1224
|
cacheSize: et({
|
|
1225
|
+
base: st,
|
|
1223
1226
|
decimals: 2,
|
|
1224
1227
|
inputUnit: Z,
|
|
1225
1228
|
targetUnit: "B",
|
|
@@ -1320,9 +1323,9 @@ let r = class extends H {
|
|
|
1320
1323
|
async updateActiveFolderIdentifiers(t) {
|
|
1321
1324
|
const e = this.rootIDs;
|
|
1322
1325
|
this.rootIDs = t, await this.updateComplete;
|
|
1323
|
-
const i = this.container.querySelectorAll("cx-tree-item"), a =
|
|
1326
|
+
const i = this.container.querySelectorAll("cx-tree-item"), a = it(this.rootIDs, e);
|
|
1324
1327
|
i.forEach((s) => {
|
|
1325
|
-
a.includes(s.dataset.id ?? "") &&
|
|
1328
|
+
a.includes(s.dataset.id ?? "") && $t(s);
|
|
1326
1329
|
});
|
|
1327
1330
|
}
|
|
1328
1331
|
// #region Render
|
|
@@ -1340,7 +1343,7 @@ let r = class extends H {
|
|
|
1340
1343
|
return n`<cx-file-on-demand-asset .asset=${t} .listType=${e} .favoriteInProgressAssets=${this.favoriteInProgressAssets} .pinInProgressAssets=${this.pinInProgressAssets}></cx-file-on-demand-asset>`;
|
|
1341
1344
|
}
|
|
1342
1345
|
renderRecentAssets() {
|
|
1343
|
-
const t = n`<div class="recent-empty assets-list__tab-group__empty-message"><cx-icon class="empty-icon" name="explore"></cx-icon><cx-typography variant="body2">${this.localize.term("allViewedAssetsWillBeVisibleHere")}</cx-typography></div>`, [e, i] =
|
|
1346
|
+
const t = n`<div class="recent-empty assets-list__tab-group__empty-message"><cx-icon class="empty-icon" name="explore"></cx-icon><cx-typography variant="body2">${this.localize.term("allViewedAssetsWillBeVisibleHere")}</cx-typography></div>`, [e, i] = gt(
|
|
1344
1347
|
this.recentAssets.assets
|
|
1345
1348
|
), a = n`<div class="recent__list" @scroll=${this.requestMoreRecentAssets}><div class=${C({
|
|
1346
1349
|
empty: e.length === 0,
|
|
@@ -1364,7 +1367,7 @@ let r = class extends H {
|
|
|
1364
1367
|
)}</cx-tab-panel>`;
|
|
1365
1368
|
}
|
|
1366
1369
|
renderFavoriteAssets() {
|
|
1367
|
-
const t = n`<div class="favorites-empty assets-list__tab-group__empty-message"><cx-icon class="empty-icon" name="star"></cx-icon><cx-typography variant="body2">${this.localize.term("allFavoriteAssetsWillBeVisibleHere")}</cx-typography></div>`, e =
|
|
1370
|
+
const t = n`<div class="favorites-empty assets-list__tab-group__empty-message"><cx-icon class="empty-icon" name="star"></cx-icon><cx-typography variant="body2">${this.localize.term("allFavoriteAssetsWillBeVisibleHere")}</cx-typography></div>`, e = _t(this.favoriteAssets.assets), i = n`<div class="favorites__list" @scroll=${this.requestMoreFavoriteAssets}>${U(
|
|
1368
1371
|
e,
|
|
1369
1372
|
(a) => a.recordId,
|
|
1370
1373
|
(a) => this.renderAsset(a, x.FAVORITES)
|
|
@@ -1377,7 +1380,7 @@ let r = class extends H {
|
|
|
1377
1380
|
)}</div></cx-tab-panel>`;
|
|
1378
1381
|
}
|
|
1379
1382
|
renderUploadingAssets() {
|
|
1380
|
-
const t = n`<div class="uploads-empty assets-list__tab-group__empty-message"><cx-icon class="empty-icon" name="arrow_upward"></cx-icon><cx-typography variant="body2">${this.localize.term("allAssetUploadsWillBeVisibleHere")}</cx-typography></div>`, [e, i] =
|
|
1383
|
+
const t = n`<div class="uploads-empty assets-list__tab-group__empty-message"><cx-icon class="empty-icon" name="arrow_upward"></cx-icon><cx-typography variant="body2">${this.localize.term("allAssetUploadsWillBeVisibleHere")}</cx-typography></div>`, [e, i] = gt(
|
|
1381
1384
|
this.uploadingAssets.assets
|
|
1382
1385
|
), a = n`<div class="uploads__list" @scroll=${this.requestMoreUploadingAssets}><div class=${C({
|
|
1383
1386
|
empty: e.length === 0,
|
|
@@ -1401,7 +1404,7 @@ let r = class extends H {
|
|
|
1401
1404
|
)}</cx-tab-panel>`;
|
|
1402
1405
|
}
|
|
1403
1406
|
renderPinnedAssets() {
|
|
1404
|
-
const t = n`<div class="pinned-empty assets-list__tab-group__empty-message"><cx-icon class="empty-icon" name="keep"></cx-icon><cx-typography variant="body2">${this.localize.term("allPinnedAssetsWillBeVisibleHere")}</cx-typography></div>`, e =
|
|
1407
|
+
const t = n`<div class="pinned-empty assets-list__tab-group__empty-message"><cx-icon class="empty-icon" name="keep"></cx-icon><cx-typography variant="body2">${this.localize.term("allPinnedAssetsWillBeVisibleHere")}</cx-typography></div>`, e = _t(this.pinnedAssets.assets), i = n`<div class="pinned__list" @scroll=${this.requestMorePinnedAssets}>${U(
|
|
1405
1408
|
e,
|
|
1406
1409
|
(a) => a.recordId,
|
|
1407
1410
|
(a) => this.renderAsset(a, x.PINNED)
|
|
@@ -1499,7 +1502,7 @@ let r = class extends H {
|
|
|
1499
1502
|
}
|
|
1500
1503
|
renderRootFolderTree() {
|
|
1501
1504
|
if (!this.rootIDs.length)
|
|
1502
|
-
return
|
|
1505
|
+
return jt;
|
|
1503
1506
|
const t = this.rootIDs.filter(
|
|
1504
1507
|
(a) => !this.removedIds.includes(a)
|
|
1505
1508
|
), e = (a) => {
|
|
@@ -1534,11 +1537,11 @@ let r = class extends H {
|
|
|
1534
1537
|
`
|
|
1535
1538
|
)}</div>`;
|
|
1536
1539
|
return n`<div class="settings__general">${t}<div class="settings-group settings__software"><cx-typography variant="h5">${this.localize.term("software")}</cx-typography><div class="settings__software__version"><div class="settings__software__version__value"><cx-line-clamp lines="1" class="settings__software__version__value__text"><cx-typography variant="body3">${this.localize.term("currentVersion")}
|
|
1537
|
-
${
|
|
1540
|
+
${xt(this.settings.config.version ?? "")}</cx-typography></cx-line-clamp></div>${p(
|
|
1538
1541
|
this.hasNewVersion,
|
|
1539
1542
|
() => n`<div class="settings__software__version__value"><cx-badge class="settings__version__badge" slot="badge" variant="danger" pill size="x-small"></cx-badge><cx-line-clamp lines="1" class="settings__software__version__value__text"><cx-typography variant="body3">${this.localize.term(
|
|
1540
1543
|
"newVersionAvailable",
|
|
1541
|
-
|
|
1544
|
+
xt(
|
|
1542
1545
|
this.settings.config.latestVersion ?? ""
|
|
1543
1546
|
)
|
|
1544
1547
|
)}</cx-typography></cx-line-clamp><cx-button size="small" ?loading=${this.isUpgrading} class="settings__software__version__install-button" outline @click=${this.upgrade}><cx-icon name="install_desktop" slot="prefix"></cx-icon>${this.localize.term("download")}</cx-button></div>`
|
|
@@ -1615,13 +1618,13 @@ let r = class extends H {
|
|
|
1615
1618
|
"asset-index-sync-status--error": this.assetIndexSyncStatus === "error",
|
|
1616
1619
|
"asset-index-sync-status--loaded": this.assetIndexSyncStatus === "loaded",
|
|
1617
1620
|
"asset-index-sync-status--loading": this.assetIndexSyncStatus === "loading"
|
|
1618
|
-
})}><cx-typography class="label" variant="small">${this.localize.term("assetIndexSync")}</cx-typography><div class="value"><cx-typography variant="small">${
|
|
1621
|
+
})}><cx-typography class="label" variant="small">${this.localize.term("assetIndexSync")}</cx-typography><div class="value"><cx-typography variant="small">${_e[this.assetIndexSyncStatus]}</cx-typography>${i()}</div></div><div class="cache-usage"><cx-typography class="label" variant="small">${this.localize.term("cache")}</cx-typography><cx-tooltip ?disabled=${!s} content=${this.localize.term("cacheUsageWarning")}><cx-space spacing="3x-small"><cx-line-clamp class="value-line-clamp" lines="1"><cx-typography class="value" variant="small"><cx-format-bytes .value=${this.settings.cacheUsage}></cx-format-bytes>
|
|
1619
1622
|
/
|
|
1620
1623
|
<cx-format-bytes .value=${this.settings.cacheSize}></cx-format-bytes></cx-typography></cx-line-clamp>${p(s, () => n`<cx-icon class="cache-usage__warning-icon" name="warning" variant="filled"></cx-icon>`)}</cx-space></cx-tooltip></div>${p(this.assetIndexSyncStatus === "error", () => t)}</div>`;
|
|
1621
1624
|
}
|
|
1622
1625
|
handleConnectionURLInput(t) {
|
|
1623
1626
|
this.validConnectionUrl = !0, this.siteUrl = t.target.value.trim();
|
|
1624
|
-
const e =
|
|
1627
|
+
const e = pt(this.siteUrl);
|
|
1625
1628
|
K(e) || (this.validConnectionUrl = !1);
|
|
1626
1629
|
}
|
|
1627
1630
|
renderWelcomeView() {
|
|
@@ -1652,31 +1655,31 @@ let r = class extends H {
|
|
|
1652
1655
|
}
|
|
1653
1656
|
// #endregion
|
|
1654
1657
|
};
|
|
1655
|
-
r.styles =
|
|
1658
|
+
r.styles = Je;
|
|
1656
1659
|
r.dependencies = {
|
|
1657
|
-
"cx-avatar":
|
|
1658
|
-
"cx-button":
|
|
1659
|
-
"cx-confirm-popover":
|
|
1660
|
-
"cx-dialog":
|
|
1661
|
-
"cx-divider":
|
|
1660
|
+
"cx-avatar": Vt,
|
|
1661
|
+
"cx-button": Ht,
|
|
1662
|
+
"cx-confirm-popover": te,
|
|
1663
|
+
"cx-dialog": Wt,
|
|
1664
|
+
"cx-divider": qt,
|
|
1662
1665
|
"cx-file-on-demand-asset": L,
|
|
1663
1666
|
"cx-folder-tree": b,
|
|
1664
|
-
"cx-format-bytes":
|
|
1667
|
+
"cx-format-bytes": nt,
|
|
1665
1668
|
"cx-icon": J,
|
|
1666
|
-
"cx-icon-button":
|
|
1667
|
-
"cx-input":
|
|
1669
|
+
"cx-icon-button": At,
|
|
1670
|
+
"cx-input": Gt,
|
|
1668
1671
|
"cx-line-clamp": Q,
|
|
1669
|
-
"cx-option":
|
|
1670
|
-
"cx-relative-time":
|
|
1671
|
-
"cx-select":
|
|
1672
|
-
"cx-space":
|
|
1673
|
-
"cx-tab":
|
|
1674
|
-
"cx-tab-group":
|
|
1675
|
-
"cx-tab-panel":
|
|
1676
|
-
"cx-tooltip":
|
|
1677
|
-
"cx-tree":
|
|
1678
|
-
"cx-tree-item":
|
|
1679
|
-
"cx-typography":
|
|
1672
|
+
"cx-option": Yt,
|
|
1673
|
+
"cx-relative-time": Dt,
|
|
1674
|
+
"cx-select": Kt,
|
|
1675
|
+
"cx-space": Xt,
|
|
1676
|
+
"cx-tab": Zt,
|
|
1677
|
+
"cx-tab-group": Jt,
|
|
1678
|
+
"cx-tab-panel": Qt,
|
|
1679
|
+
"cx-tooltip": Tt,
|
|
1680
|
+
"cx-tree": St,
|
|
1681
|
+
"cx-tree-item": bt,
|
|
1682
|
+
"cx-typography": rt
|
|
1680
1683
|
};
|
|
1681
1684
|
l([
|
|
1682
1685
|
z(".container")
|
|
@@ -1935,7 +1938,7 @@ l([
|
|
|
1935
1938
|
], r.prototype, "searchText", 2);
|
|
1936
1939
|
l([
|
|
1937
1940
|
P(["searchText"]),
|
|
1938
|
-
|
|
1941
|
+
ee(200)
|
|
1939
1942
|
], r.prototype, "onSearch", 1);
|
|
1940
1943
|
l([
|
|
1941
1944
|
P("cacheLocation")
|
|
@@ -1945,12 +1948,12 @@ r = l([
|
|
|
1945
1948
|
], r);
|
|
1946
1949
|
export {
|
|
1947
1950
|
r as C,
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1951
|
+
He as a,
|
|
1952
|
+
je as b,
|
|
1953
|
+
Me as c,
|
|
1954
|
+
vt as d,
|
|
1955
|
+
We as e,
|
|
1956
|
+
qe as i,
|
|
1957
|
+
Ee as o,
|
|
1958
|
+
Ne as s
|
|
1956
1959
|
};
|