@orangelogic/design-system 2.103.0 → 2.104.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/{asset.CtL7ACp7.js → asset.DmOI7fQJ.js} +1 -1
- package/library/chunks/{button.DfRnA70F.js → button.CAa1kvwe.js} +1 -1
- package/library/chunks/{color-swatch-group.BVPz-gma.js → color-swatch-group.pyN7NkEj.js} +3 -3
- package/library/chunks/{color-swatch.GsiCvj1n.js → color-swatch.DfJDZHlk.js} +1 -1
- package/library/chunks/{confirm-popover.PiSCZY6-.js → confirm-popover.DffsrEEf.js} +3 -3
- package/library/chunks/{dialog.BTU6B2_4.js → dialog.08JIK4Kd.js} +2 -2
- package/library/chunks/{dot-pagination.BzsMmgef.js → dot-pagination.-nDdQxJN.js} +1 -1
- package/library/chunks/{file-on-demand.DCxabV6T.js → file-on-demand.D5xRAZKN.js} +202 -211
- package/library/chunks/{folder-select.BM7yeAsU.js → folder-select.D4haLI38.js} +3 -3
- package/library/chunks/{header.B5C9hZiO.js → header.BZxyeLPK.js} +1 -1
- package/library/chunks/{i18n.DK1uYlJT.js → i18n.BABe9hN4.js} +0 -1
- package/library/chunks/{icon-button.CN0NGNQx.js → icon-button.C2s3pHG4.js} +1 -1
- package/library/chunks/{iframe.BsLEwsvI.js → iframe.DPccxsnE.js} +1 -1
- package/library/chunks/{image.D207g003.js → image.DB68R-yp.js} +1 -1
- package/library/chunks/{list-editor.DqI-Aj2b.js → list-editor.CJQ6AEs1.js} +13 -12
- package/library/chunks/{option.B7SoEb_q.js → option.DGXQzdtb.js} +1 -1
- package/library/chunks/{pagination.BJrZCqaj.js → pagination.DhtwOCF6.js} +4 -4
- package/library/chunks/{tab-group.DpyBG0JQ.js → tab-group.BhCf9Smq.js} +3 -3
- package/library/chunks/{table.DQqei6Sh.js → table.CRDY_C9O.js} +4 -4
- package/library/chunks/{tree.DAiWVFiY.js → tree.CJculPt6.js} +1 -1
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +5 -5
- package/library/components/atoms.js +12 -12
- package/library/components/border-input-group.js +1 -1
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +2 -2
- package/library/components/color-picker.js +2 -2
- package/library/components/color-swatch-group.js +4 -4
- package/library/components/color-swatch.js +2 -2
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +2 -2
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +1 -1
- package/library/components/dynamic-select.js +4 -4
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +9 -9
- package/library/components/folder-select.js +3 -3
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +2 -2
- package/library/components/input.js +1 -1
- package/library/components/line-clamp.js +1 -1
- package/library/components/list-editor.js +6 -6
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +4 -4
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/pagination.js +5 -5
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +2 -2
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +2 -2
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/tab-group.js +4 -4
- package/library/components/tab.js +2 -2
- package/library/components/table.js +5 -5
- package/library/components/tag.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +1125 -1112
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/events/src/cx-book-reader-event.d.ts +9 -0
- package/library/packages/events/src/events.d.ts +1 -0
- package/library/packages/molecules/src/graph-view/react/constant.d.ts +1 -1
- package/library/packages/organisms/src/file-on-demand/file-on-demand.constants.d.ts +0 -1
- package/library/packages/utils/src/custom-element/i18n.d.ts +0 -1
- package/library/react-web-component.d.ts +78 -4
- package/library/utils.js +1 -1
- package/package.json +1 -1
|
@@ -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.CJculPt6.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
|
-
import { L as q } from "./i18n.
|
|
8
|
-
import { k as
|
|
7
|
+
import { L as q } from "./i18n.BABe9hN4.js";
|
|
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.DUgD4c9f.js";
|
|
10
|
-
import { x as n, i as ot, E 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
|
-
import { e as
|
|
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
|
|
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.CAa1kvwe.js";
|
|
19
|
+
import { C as Wt } from "./dialog.08JIK4Kd.js";
|
|
20
|
+
import qt from "../components/divider.js";
|
|
21
21
|
import nt from "../components/format-bytes.js";
|
|
22
|
-
import { C as
|
|
23
|
-
import
|
|
24
|
-
import { C as
|
|
25
|
-
import
|
|
26
|
-
import
|
|
22
|
+
import { C as At } from "./icon-button.C2s3pHG4.js";
|
|
23
|
+
import Gt from "../components/input.js";
|
|
24
|
+
import { C as Yt } from "./option.DGXQzdtb.js";
|
|
25
|
+
import Dt from "../components/relative-time.js";
|
|
26
|
+
import Kt from "../components/select.js";
|
|
27
27
|
import Zt from "../components/space.js";
|
|
28
|
-
import
|
|
29
|
-
import { C as
|
|
30
|
-
import
|
|
31
|
-
import
|
|
28
|
+
import Xt from "../components/tab.js";
|
|
29
|
+
import { C as Jt } from "./tab-group.BhCf9Smq.js";
|
|
30
|
+
import Qt from "../components/tab-panel.js";
|
|
31
|
+
import Tt from "../components/tooltip.js";
|
|
32
32
|
import { C as rt } from "./typography.DJC_UXgs.js";
|
|
33
|
-
import { C as
|
|
34
|
-
import { d as
|
|
33
|
+
import { C as te } from "./confirm-popover.DffsrEEf.js";
|
|
34
|
+
import { d as ee } from "./debounce.CIEhztrj.js";
|
|
35
35
|
import { a as et } from "./number.B4PQLJIg.js";
|
|
36
36
|
import { i as K, a as pt } from "./url.Cj9cIQXJ.js";
|
|
37
|
-
import { a as
|
|
38
|
-
import { S as ut, i as
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import { o as
|
|
42
|
-
import { r as
|
|
43
|
-
function
|
|
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 de(t) {
|
|
|
57
57
|
return e;
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
var
|
|
61
|
-
function
|
|
62
|
-
return t &&
|
|
60
|
+
var de = le();
|
|
61
|
+
function he(t, e) {
|
|
62
|
+
return t && de(t, e, Et);
|
|
63
63
|
}
|
|
64
|
-
function
|
|
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 = wt(i) ?
|
|
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 fe = {
|
|
|
98
98
|
PINNED: "pinned",
|
|
99
99
|
RECENT: "recent",
|
|
100
100
|
UPLOADS: "uploads"
|
|
101
|
-
},
|
|
101
|
+
}, Z = 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 fe = {
|
|
|
108
108
|
HAS_BROWSER_CHILDREN: "Document.HasBrowserChildren",
|
|
109
109
|
PARENT_FOLDER_IDENTIFIER: "Document.ParentRecordID",
|
|
110
110
|
TITLE_WITH_FALLBACK: "CoreField.TitleWithFallback"
|
|
111
|
-
},
|
|
111
|
+
}, X = "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 fe = {
|
|
|
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 fe = {
|
|
|
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 fe = {
|
|
|
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
|
})
|
|
@@ -169,8 +169,8 @@ const fe = {
|
|
|
169
169
|
["limit", s.toString()],
|
|
170
170
|
["start", _.toString()]
|
|
171
171
|
], F = new URL(`${g}${$}`);
|
|
172
|
-
f.forEach(([
|
|
173
|
-
F.searchParams.append(
|
|
172
|
+
f.forEach(([w, E]) => {
|
|
173
|
+
F.searchParams.append(w, E);
|
|
174
174
|
});
|
|
175
175
|
const k = await fetch(F.toString(), {
|
|
176
176
|
headers: {
|
|
@@ -179,49 +179,49 @@ const fe = {
|
|
|
179
179
|
method: "GET"
|
|
180
180
|
});
|
|
181
181
|
if (!k.ok) {
|
|
182
|
-
const
|
|
183
|
-
throw
|
|
182
|
+
const w = new Error();
|
|
183
|
+
throw w.message = "Failed to fetch", w;
|
|
184
184
|
}
|
|
185
185
|
const G = await k.json();
|
|
186
186
|
let Y = /* @__PURE__ */ new Set();
|
|
187
|
-
a && (Y =
|
|
188
|
-
const ct = G.contentItems?.map((
|
|
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
|
|
196
196
|
) ?? "").replace(/^Root\//i, "")
|
|
197
197
|
) || E;
|
|
198
198
|
if (a) {
|
|
199
199
|
if (a.has(B)) {
|
|
200
|
-
const lt = B.split("/"),
|
|
201
|
-
B = `${lt.join("/")}/${
|
|
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
|
}
|
|
205
205
|
return {
|
|
206
206
|
childCount: Number(
|
|
207
207
|
M(
|
|
208
|
-
|
|
208
|
+
w.fields,
|
|
209
209
|
A.CHILD_COUNT
|
|
210
210
|
) ?? 0
|
|
211
211
|
),
|
|
212
212
|
children: [],
|
|
213
213
|
docType: M(
|
|
214
|
-
|
|
214
|
+
w.fields,
|
|
215
215
|
A.DOC_TYPE
|
|
216
216
|
) ?? "",
|
|
217
217
|
fullPath: B,
|
|
218
218
|
hasChildren: M(
|
|
219
|
-
|
|
219
|
+
w.fields,
|
|
220
220
|
A.HAS_BROWSER_CHILDREN
|
|
221
221
|
) === "1",
|
|
222
|
-
id:
|
|
222
|
+
id: w.recordID,
|
|
223
223
|
parentFolderIdentifier: M(
|
|
224
|
-
|
|
224
|
+
w.fields,
|
|
225
225
|
A.PARENT_FOLDER_IDENTIFIER
|
|
226
226
|
) ?? "",
|
|
227
227
|
parents: [],
|
|
@@ -240,17 +240,17 @@ function M(t, e) {
|
|
|
240
240
|
const at = "-", S = (t) => {
|
|
241
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(at),
|
|
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
|
-
},
|
|
247
|
-
const e = t.match(/(?:V\.?)?(\d+(?:\.\d+)*)/);
|
|
246
|
+
}, xt = (t) => {
|
|
247
|
+
const e = t.match(/(?:V\.?)?(\d+(?:\.\d+)*(?:-[a-zA-Z0-9]+(?:[.-][a-zA-Z0-9]+)*)?)/);
|
|
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];
|
|
@@ -261,20 +261,20 @@ const at = "-", S = (t) => {
|
|
|
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,7 +335,7 @@ 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())
|
|
@@ -379,8 +379,8 @@ 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 =
|
|
383
|
-
return n`<cx-tree-item aria-label=${this.folder?.title ?? ""} class=${
|
|
382
|
+
const t = mt(this.folder?.path ?? [], this.folder?.fullPath ?? "");
|
|
383
|
+
return n`<cx-tree-item aria-label=${this.folder?.title ?? ""} class=${C({
|
|
384
384
|
"folder-tree__item": !0,
|
|
385
385
|
selectable: !0
|
|
386
386
|
})} data-id=${this.folder?.id} data-path=${t} ?lazy=${this.folder?.hasChildren && this.data === null} @cx-lazy-load=${this.onLazyLoad}><div class="folder-tree__label"><cx-icon class="folder-tree__icon" name="folder"></cx-icon><cx-line-clamp lines="1" class="folder-tree__label__value">${this.folder?.title}</cx-line-clamp></div>${U(
|
|
@@ -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() {
|
|
@@ -512,7 +512,7 @@ let b = class extends H {
|
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
514
|
render() {
|
|
515
|
-
return n`<div class="folder-tree selectable"><cx-tree class=${
|
|
515
|
+
return n`<div class="folder-tree selectable"><cx-tree class=${C({
|
|
516
516
|
selectable: !0
|
|
517
517
|
})} @cx-selected-change=${this.handleSelectedChange} selection="multiple" disabled-auto-expand disabled-sync-checkboxes>${U(
|
|
518
518
|
this.folders,
|
|
@@ -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 Ee(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 Ve(t, e, i, a) {
|
|
|
652
652
|
}
|
|
653
653
|
return _;
|
|
654
654
|
}
|
|
655
|
-
var
|
|
656
|
-
function
|
|
657
|
-
return wt(t) ||
|
|
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
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 ht(
|
|
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 it =
|
|
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)],
|
|
@@ -767,9 +767,9 @@ j([
|
|
|
767
767
|
T = j([
|
|
768
768
|
W("cx-file-on-demand-pinned-status")
|
|
769
769
|
], T);
|
|
770
|
-
const
|
|
771
|
-
var Ze = Object.defineProperty,
|
|
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 Ze = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, V = (t, e, i, a) => {
|
|
772
|
+
for (var s = a > 1 ? void 0 : a ? Xe(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
774
|
return a && s && Ze(e, i, s), s;
|
|
775
775
|
};
|
|
@@ -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() ?? "";
|
|
@@ -902,7 +902,7 @@ let L = class extends H {
|
|
|
902
902
|
uploadErrorMessage: o,
|
|
903
903
|
uploadStatus: c = v.InProgress
|
|
904
904
|
}) {
|
|
905
|
-
const h = a > 0 ? e * 100 / a : 0, _ = c === v.InProgress ? h : 100, m = n`<div class=${
|
|
905
|
+
const h = a > 0 ? e * 100 / a : 0, _ = c === v.InProgress ? h : 100, m = n`<div class=${C({
|
|
906
906
|
"in-progress": c === v.InProgress,
|
|
907
907
|
paused: t,
|
|
908
908
|
progress: !0,
|
|
@@ -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,10 +954,10 @@ 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
|
-
return n`<div class=${
|
|
960
|
+
return n`<div class=${C({
|
|
961
961
|
asset__thumbnail: !0,
|
|
962
962
|
"asset__thumbnail--folder": this.isFolder,
|
|
963
963
|
"asset__thumbnail--placeholder": this.showThumbnailPlaceholder
|
|
@@ -1011,17 +1011,17 @@ 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
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":
|
|
1021
|
+
"cx-progress-bar": ae,
|
|
1022
|
+
"cx-relative-time": Dt,
|
|
1023
|
+
"cx-spinner": oe,
|
|
1024
|
+
"cx-tooltip": Tt,
|
|
1025
1025
|
"cx-typography": rt
|
|
1026
1026
|
};
|
|
1027
1027
|
V([
|
|
@@ -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() {
|
|
@@ -1089,7 +1089,7 @@ let r = class extends H {
|
|
|
1089
1089
|
base: st,
|
|
1090
1090
|
decimals: 2,
|
|
1091
1091
|
inputUnit: "B",
|
|
1092
|
-
targetUnit:
|
|
1092
|
+
targetUnit: X,
|
|
1093
1093
|
value: this.settings.cacheSize ?? 0
|
|
1094
1094
|
}), this.cacheLocation = this.settings.cacheLocation, this.proxyTypes = this.settings.config.proxyTypes ?? [], this.siteUrl = this.settings.config.siteUrl, this.isRecentAssetsLoading = !1, this.isFavoriteAssetsLoading = !1, this.isUploadingAssetsLoading = !1, this.isPinnedAssetsLoading = !1, this.connectError = "", this.disconnectError = "", this.upgradeError = "", this.totalCount = 0, this.folderPathsSet = /* @__PURE__ */ new Set(), this.validConnectionUrl = !1, this.isAddingRootIDs = !1, this.fetchFolders = async ({
|
|
1095
1095
|
excludes: t = [],
|
|
@@ -1099,7 +1099,7 @@ let r = class extends H {
|
|
|
1099
1099
|
start: s = 0
|
|
1100
1100
|
}) => {
|
|
1101
1101
|
try {
|
|
1102
|
-
return await
|
|
1102
|
+
return await Pt({
|
|
1103
1103
|
excludes: t,
|
|
1104
1104
|
folderId: e,
|
|
1105
1105
|
folderPathsSet: i,
|
|
@@ -1159,7 +1159,7 @@ let r = class extends H {
|
|
|
1159
1159
|
base: st,
|
|
1160
1160
|
decimals: 2,
|
|
1161
1161
|
inputUnit: "B",
|
|
1162
|
-
targetUnit:
|
|
1162
|
+
targetUnit: X,
|
|
1163
1163
|
value: this.settings.cacheSize ?? 0
|
|
1164
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);
|
|
1165
1165
|
}
|
|
@@ -1224,7 +1224,7 @@ let r = class extends H {
|
|
|
1224
1224
|
cacheSize: et({
|
|
1225
1225
|
base: st,
|
|
1226
1226
|
decimals: 2,
|
|
1227
|
-
inputUnit:
|
|
1227
|
+
inputUnit: X,
|
|
1228
1228
|
targetUnit: "B",
|
|
1229
1229
|
value: this.cacheSize
|
|
1230
1230
|
}),
|
|
@@ -1272,7 +1272,7 @@ let r = class extends H {
|
|
|
1272
1272
|
if (!this.recentAssetsList)
|
|
1273
1273
|
return;
|
|
1274
1274
|
const { clientHeight: t, scrollHeight: e, scrollTop: i } = this.recentAssetsList;
|
|
1275
|
-
!this.isRecentAssetsLoading && this.recentAssets.hasMore && i + t >= e -
|
|
1275
|
+
!this.isRecentAssetsLoading && this.recentAssets.hasMore && i + t >= e - Z && (this.isRecentAssetsLoading = !0, this.emit("cx-file-on-demand-load-more", {
|
|
1276
1276
|
detail: {
|
|
1277
1277
|
type: "recent"
|
|
1278
1278
|
}
|
|
@@ -1285,7 +1285,7 @@ let r = class extends H {
|
|
|
1285
1285
|
if (!this.favoritesAssetsList)
|
|
1286
1286
|
return;
|
|
1287
1287
|
const { clientHeight: t, scrollHeight: e, scrollTop: i } = this.favoritesAssetsList;
|
|
1288
|
-
!this.isFavoriteAssetsLoading && this.favoriteAssets.hasMore && i + t >= e -
|
|
1288
|
+
!this.isFavoriteAssetsLoading && this.favoriteAssets.hasMore && i + t >= e - Z && (this.isFavoriteAssetsLoading = !0, this.emit("cx-file-on-demand-load-more", {
|
|
1289
1289
|
detail: {
|
|
1290
1290
|
type: "favorites"
|
|
1291
1291
|
}
|
|
@@ -1295,7 +1295,7 @@ let r = class extends H {
|
|
|
1295
1295
|
if (!this.pinnedAssetsList)
|
|
1296
1296
|
return;
|
|
1297
1297
|
const { clientHeight: t, scrollHeight: e, scrollTop: i } = this.pinnedAssetsList;
|
|
1298
|
-
!this.isPinnedAssetsLoading && this.pinnedAssets.hasMore && i + t >= e -
|
|
1298
|
+
!this.isPinnedAssetsLoading && this.pinnedAssets.hasMore && i + t >= e - Z && (this.isPinnedAssetsLoading = !0, this.emit("cx-file-on-demand-load-more", {
|
|
1299
1299
|
detail: {
|
|
1300
1300
|
type: "pinned"
|
|
1301
1301
|
}
|
|
@@ -1311,7 +1311,7 @@ let r = class extends H {
|
|
|
1311
1311
|
if (!this.uploadsAssetsList)
|
|
1312
1312
|
return;
|
|
1313
1313
|
const { clientHeight: t, scrollHeight: e, scrollTop: i } = this.uploadsAssetsList;
|
|
1314
|
-
!this.isUploadingAssetsLoading && this.uploadingAssets.hasMore && i + t >= e -
|
|
1314
|
+
!this.isUploadingAssetsLoading && this.uploadingAssets.hasMore && i + t >= e - Z && (this.isUploadingAssetsLoading = !0, this.emit("cx-file-on-demand-load-more", {
|
|
1315
1315
|
detail: {
|
|
1316
1316
|
type: "uploads"
|
|
1317
1317
|
}
|
|
@@ -1325,7 +1325,7 @@ let r = class extends H {
|
|
|
1325
1325
|
this.rootIDs = t, await this.updateComplete;
|
|
1326
1326
|
const i = this.container.querySelectorAll("cx-tree-item"), a = it(this.rootIDs, e);
|
|
1327
1327
|
i.forEach((s) => {
|
|
1328
|
-
a.includes(s.dataset.id ?? "") &&
|
|
1328
|
+
a.includes(s.dataset.id ?? "") && $t(s);
|
|
1329
1329
|
});
|
|
1330
1330
|
}
|
|
1331
1331
|
// #region Render
|
|
@@ -1343,16 +1343,16 @@ let r = class extends H {
|
|
|
1343
1343
|
return n`<cx-file-on-demand-asset .asset=${t} .listType=${e} .favoriteInProgressAssets=${this.favoriteInProgressAssets} .pinInProgressAssets=${this.pinInProgressAssets}></cx-file-on-demand-asset>`;
|
|
1344
1344
|
}
|
|
1345
1345
|
renderRecentAssets() {
|
|
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] =
|
|
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(
|
|
1347
1347
|
this.recentAssets.assets
|
|
1348
|
-
), a = n`<div class="recent__list" @scroll=${this.requestMoreRecentAssets}><div class=${
|
|
1348
|
+
), a = n`<div class="recent__list" @scroll=${this.requestMoreRecentAssets}><div class=${C({
|
|
1349
1349
|
empty: e.length === 0,
|
|
1350
1350
|
recent__today: !0
|
|
1351
1351
|
})} data-testid="recent__today"><div class="asset-group__label"><cx-typography variant="small">${this.localize.term("today")}</cx-typography></div>${U(
|
|
1352
1352
|
e,
|
|
1353
1353
|
(s) => s.recordId,
|
|
1354
1354
|
(s) => this.renderAsset(s, x.RECENT)
|
|
1355
|
-
)}</div><div class=${
|
|
1355
|
+
)}</div><div class=${C({
|
|
1356
1356
|
empty: i.length === 0,
|
|
1357
1357
|
recent__other: !0
|
|
1358
1358
|
})}><div class="asset-group__label"><cx-typography variant="small">${this.localize.term("allOther")}</cx-typography></div>${U(
|
|
@@ -1367,7 +1367,7 @@ let r = class extends H {
|
|
|
1367
1367
|
)}</cx-tab-panel>`;
|
|
1368
1368
|
}
|
|
1369
1369
|
renderFavoriteAssets() {
|
|
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 =
|
|
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(
|
|
1371
1371
|
e,
|
|
1372
1372
|
(a) => a.recordId,
|
|
1373
1373
|
(a) => this.renderAsset(a, x.FAVORITES)
|
|
@@ -1383,16 +1383,16 @@ let r = class extends H {
|
|
|
1383
1383
|
return n`<cx-button class="asset-group__clear-button" variant="text" size="small" @click=${this.clearUpload}>${this.localize.term("clearAll")}</cx-button>`;
|
|
1384
1384
|
}
|
|
1385
1385
|
renderUploadingAssets() {
|
|
1386
|
-
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] =
|
|
1386
|
+
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(
|
|
1387
1387
|
this.uploadingAssets.assets
|
|
1388
|
-
), a = n`<div class="uploads__list" @scroll=${this.requestMoreUploadingAssets}><div class=${
|
|
1388
|
+
), a = n`<div class="uploads__list" @scroll=${this.requestMoreUploadingAssets}><div class=${C({
|
|
1389
1389
|
empty: e.length === 0,
|
|
1390
1390
|
recent__today: !0
|
|
1391
1391
|
})} data-testid="uploads__today"><div class="asset-group__label"><cx-typography variant="small">${this.localize.term("today")}</cx-typography>${p(e.length > 0, () => this.renderClearUploadButton())}</div>${U(
|
|
1392
1392
|
e,
|
|
1393
1393
|
(s) => s.recordId,
|
|
1394
1394
|
(s) => this.renderAsset(s, x.UPLOADS)
|
|
1395
|
-
)}</div><div class=${
|
|
1395
|
+
)}</div><div class=${C({
|
|
1396
1396
|
empty: i.length === 0,
|
|
1397
1397
|
uploads__other: !0
|
|
1398
1398
|
})}><div class="asset-group__label"><cx-typography variant="small">${this.localize.term("allOther")}</cx-typography>${p(
|
|
@@ -1410,7 +1410,7 @@ let r = class extends H {
|
|
|
1410
1410
|
)}</cx-tab-panel>`;
|
|
1411
1411
|
}
|
|
1412
1412
|
renderPinnedAssets() {
|
|
1413
|
-
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 =
|
|
1413
|
+
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(
|
|
1414
1414
|
e,
|
|
1415
1415
|
(a) => a.recordId,
|
|
1416
1416
|
(a) => this.renderAsset(a, x.PINNED)
|
|
@@ -1508,7 +1508,7 @@ let r = class extends H {
|
|
|
1508
1508
|
}
|
|
1509
1509
|
renderRootFolderTree() {
|
|
1510
1510
|
if (!this.rootIDs.length)
|
|
1511
|
-
return
|
|
1511
|
+
return jt;
|
|
1512
1512
|
const t = this.rootIDs.filter(
|
|
1513
1513
|
(a) => !this.removedIds.includes(a)
|
|
1514
1514
|
), e = (a) => {
|
|
@@ -1521,7 +1521,7 @@ let r = class extends H {
|
|
|
1521
1521
|
const { id: s, path: o } = S(a), c = () => {
|
|
1522
1522
|
e(s);
|
|
1523
1523
|
};
|
|
1524
|
-
return n`<cx-tree-item data-id=${s} class=${
|
|
1524
|
+
return n`<cx-tree-item data-id=${s} class=${C({
|
|
1525
1525
|
"folder-tree__item": !0
|
|
1526
1526
|
})}><div class="folder-tree__label"><cx-icon class="folder-tree__icon" name="folder"></cx-icon><cx-line-clamp lines="1" class="folder-tree__label__value">${o}</cx-line-clamp></div><cx-tooltip slot="actions" content=${this.localize.term("removeFolder", 1)} hoist><cx-icon-button @click=${c} name="close"></cx-icon-button></cx-tooltip></cx-tree-item>`;
|
|
1527
1527
|
};
|
|
@@ -1543,11 +1543,11 @@ let r = class extends H {
|
|
|
1543
1543
|
`
|
|
1544
1544
|
)}</div>`;
|
|
1545
1545
|
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")}
|
|
1546
|
-
${
|
|
1546
|
+
${xt(this.settings.config.version ?? "")}</cx-typography></cx-line-clamp></div>${p(
|
|
1547
1547
|
this.hasNewVersion,
|
|
1548
1548
|
() => 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(
|
|
1549
1549
|
"newVersionAvailable",
|
|
1550
|
-
|
|
1550
|
+
xt(
|
|
1551
1551
|
this.settings.config.latestVersion ?? ""
|
|
1552
1552
|
)
|
|
1553
1553
|
)}</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>`
|
|
@@ -1565,20 +1565,11 @@ let r = class extends H {
|
|
|
1565
1565
|
t.key.length === 1 && !e.test(t.key)) && t.preventDefault();
|
|
1566
1566
|
}
|
|
1567
1567
|
handleCacheSizeChange(t) {
|
|
1568
|
-
const e = t.target
|
|
1569
|
-
if (
|
|
1568
|
+
const e = t.target;
|
|
1569
|
+
if (Number(e.value) < 0) {
|
|
1570
1570
|
e.setCustomValidity(this.localize.term("cacheSizeCannotBeNegative"));
|
|
1571
1571
|
return;
|
|
1572
1572
|
}
|
|
1573
|
-
if (i > gt) {
|
|
1574
|
-
e.setCustomValidity(
|
|
1575
|
-
this.localize.term(
|
|
1576
|
-
"cacheSizeTooLarge",
|
|
1577
|
-
gt.toLocaleString()
|
|
1578
|
-
)
|
|
1579
|
-
);
|
|
1580
|
-
return;
|
|
1581
|
-
}
|
|
1582
1573
|
this.cacheSize = Number(e.value);
|
|
1583
1574
|
}
|
|
1584
1575
|
async handleCacheLocationClick() {
|
|
@@ -1592,7 +1583,7 @@ let r = class extends H {
|
|
|
1592
1583
|
const t = n`<cx-tooltip content=${this.localize.term("openDrive")} hoist><cx-icon-button data-testid="settings__cache__location__open-button" name="folder_open" outline @click=${this.openCacheLocation}></cx-icon-button></cx-tooltip>`;
|
|
1593
1584
|
return n`<div class="settings__advanced"><div class="settings-group settings__proxy"><cx-typography variant="h5">Proxy</cx-typography><cx-select class="settings__proxy__select" label=${this.localize.term("types")} multiple=multiple input-behavior="none" value=${(this.proxyTypes ?? []).join(" ")} @cx-change=${this.handleProxyChange}><cx-option value="Image" ?disabled=${(this.proxyTypes ?? []).includes("All")}>${this.localize.term("image")}</cx-option><cx-option value="Video" ?disabled=${(this.proxyTypes ?? []).includes("All")}>${this.localize.term("video")}</cx-option><cx-option value="Audio" ?disabled=${(this.proxyTypes ?? []).includes("All")}>${this.localize.term("audio")}</cx-option><cx-option value="All">${this.localize.term("all")}</cx-option></cx-select><cx-typography variant="small">${this.localize.term(
|
|
1594
1585
|
"itCanTakeAFewMinutesForThisSettingToTakeEffect"
|
|
1595
|
-
)}</cx-typography></div><div class="settings-group settings__cache"><cx-typography variant="h5">${this.localize.term("cache")}</cx-typography><div class="settings__cache__size"><cx-typography variant="body3" class="settings__cache__size__label">${this.localize.term("currentUsage")}: <cx-format-bytes .value=${this.settings.cacheUsage}></cx-format-bytes></cx-typography><cx-typography variant="body3" class="settings__cache__size__label">${this.localize.term("capacity")}</cx-typography><cx-input data-testid="settings__cache__size__input" label=${this.localize.term("size")} type="number" no-spin-buttons min="0" step="any" value=${this.cacheSize} @keydown=${this.handleCacheSizeKeydown} @cx-change=${this.handleCacheSizeChange}><cx-typography slot="suffix" variant="body2">${
|
|
1586
|
+
)}</cx-typography></div><div class="settings-group settings__cache"><cx-typography variant="h5">${this.localize.term("cache")}</cx-typography><div class="settings__cache__size"><cx-typography variant="body3" class="settings__cache__size__label">${this.localize.term("currentUsage")}: <cx-format-bytes .value=${this.settings.cacheUsage}></cx-format-bytes></cx-typography><cx-typography variant="body3" class="settings__cache__size__label">${this.localize.term("capacity")}</cx-typography><cx-input data-testid="settings__cache__size__input" label=${this.localize.term("size")} type="number" no-spin-buttons min="0" step="any" value=${this.cacheSize} @keydown=${this.handleCacheSizeKeydown} @cx-change=${this.handleCacheSizeChange}><cx-typography slot="suffix" variant="body2">${X}</cx-typography></cx-input></div><div class="settings__cache__location"><cx-typography variant="body3" class="settings__cache__location__label">${this.localize.term("location")}</cx-typography><div class="settings__cache__location__value"><cx-line-clamp lines="1" class="settings__cache__location__value__text"><cx-typography variant="body3">${this.cacheLocation}</cx-typography></cx-line-clamp><cx-space spacing="x-small" class="settings__cache__location__actions"><cx-button class="settings__cache__location__change-button" outline @click=${this.handleCacheLocationClick}><cx-icon name="edit" slot="prefix"></cx-icon>${this.localize.term("change")}</cx-button>${t}</cx-space></div></div><div class="settings__cache__buttons"><cx-button data-testid="settings__cache__clear-button" @click=${this.clearCache}><cx-icon name="delete" slot="prefix"></cx-icon>${this.localize.term("clearCache")}</cx-button></div></div><div class="settings-group settings__config"><cx-typography variant="h5">${this.localize.term("config")}</cx-typography><div class="settings__config__buttons"><cx-button data-testid="settings__config__export-button" @click=${this.exportSettings}><cx-icon name="file_download" slot="prefix"></cx-icon>${this.localize.term("export")}</cx-button><cx-button @click=${this.importSettings} data-testid="settings__config__import-button"><cx-icon name="file_upload" slot="prefix"></cx-icon>${this.localize.term("import")}</cx-button></div></div><div class="settings-group settings__logs"><cx-typography variant="h5">${this.localize.term("logs")}</cx-typography><div class="settings__logs__buttons"><cx-button data-testid="settings__logs__view-button" @click=${this.viewLogs}><cx-icon name="code" slot="prefix"></cx-icon>${this.localize.term("view")}</cx-button></div></div></div>`;
|
|
1596
1587
|
}
|
|
1597
1588
|
renderSettingsView() {
|
|
1598
1589
|
const t = () => {
|
|
@@ -1622,18 +1613,18 @@ let r = class extends H {
|
|
|
1622
1613
|
case "error":
|
|
1623
1614
|
return n`<cx-icon variant="filled" name="error"></cx-icon>`;
|
|
1624
1615
|
}
|
|
1625
|
-
}, a = n`<div class=${
|
|
1616
|
+
}, a = n`<div class=${C({
|
|
1626
1617
|
"connection-status": !0,
|
|
1627
1618
|
"connection-status--bad": this.connectionStatus === "bad",
|
|
1628
1619
|
"connection-status--excellent": this.connectionStatus === "excellent",
|
|
1629
1620
|
"connection-status--good": this.connectionStatus === "good"
|
|
1630
1621
|
})}><cx-typography class="label" variant="small">${this.localize.term("connection")}</cx-typography><cx-tooltip class="connection-status__tooltip" content=${this.connectionStatusTooltip} hoist ?disabled=${!this.connectionStatusTooltip.trim()}><div class="connection-status__value"><cx-typography variant="small">${this.connectionStatus}</cx-typography>${e()}</div></cx-tooltip></div>`, s = this.settings.cacheUsage >= this.settings.cacheSize;
|
|
1631
|
-
return n`<cx-divider class="status-footer__divider"></cx-divider><div class="status-footer"><div class="connected-url"><cx-typography class="label" variant="small">${this.localize.term("connectedTo")}</cx-typography><cx-line-clamp class="value-line-clamp" lines="1"><cx-typography class="value" variant="small">${this.settings.config.siteUrl}</cx-typography></cx-line-clamp></div>${a}<div class=${
|
|
1622
|
+
return n`<cx-divider class="status-footer__divider"></cx-divider><div class="status-footer"><div class="connected-url"><cx-typography class="label" variant="small">${this.localize.term("connectedTo")}</cx-typography><cx-line-clamp class="value-line-clamp" lines="1"><cx-typography class="value" variant="small">${this.settings.config.siteUrl}</cx-typography></cx-line-clamp></div>${a}<div class=${C({
|
|
1632
1623
|
"asset-index-sync-status": !0,
|
|
1633
1624
|
"asset-index-sync-status--error": this.assetIndexSyncStatus === "error",
|
|
1634
1625
|
"asset-index-sync-status--loaded": this.assetIndexSyncStatus === "loaded",
|
|
1635
1626
|
"asset-index-sync-status--loading": this.assetIndexSyncStatus === "loading"
|
|
1636
|
-
})}><cx-typography class="label" variant="small">${this.localize.term("assetIndexSync")}</cx-typography><div class="value"><cx-typography variant="small">${
|
|
1627
|
+
})}><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>
|
|
1637
1628
|
/
|
|
1638
1629
|
<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>`;
|
|
1639
1630
|
}
|
|
@@ -1643,10 +1634,10 @@ let r = class extends H {
|
|
|
1643
1634
|
K(e) || (this.validConnectionUrl = !1);
|
|
1644
1635
|
}
|
|
1645
1636
|
renderWelcomeView() {
|
|
1646
|
-
return n`<div class="welcome"><div class="welcome__message"><cx-typography variant="h5">${this.localize.term("welcomeToFileOnDemand")}</cx-typography><cx-typography variant="body3">${this.localize.term("enterYourSiteUrlToConnect")}</cx-typography></div><form class="welcome__actions" @submit=${this.connect}><cx-input aria-label=${this.localize.term("connectionURLInput")} class="welcome__input" placeholder="Ex: https://cortex.orangelogic.com/" value=${this.settings.config.siteUrl} @cx-input=${this.handleConnectionURLInput}></cx-input><cx-tooltip class="welcome__connect-button__tooltip" ?disabled=${this.siteUrl.trim() && this.validConnectionUrl} content=${this.siteUrl.trim() ? this.localize.term("pleaseEnterAValidUrl") : this.localize.term("connectionCannotBeEmpty")}><cx-button type="submit" ?loading=${this.isConnecting} variant="primary" class=${
|
|
1637
|
+
return n`<div class="welcome"><div class="welcome__message"><cx-typography variant="h5">${this.localize.term("welcomeToFileOnDemand")}</cx-typography><cx-typography variant="body3">${this.localize.term("enterYourSiteUrlToConnect")}</cx-typography></div><form class="welcome__actions" @submit=${this.connect}><cx-input aria-label=${this.localize.term("connectionURLInput")} class="welcome__input" placeholder="Ex: https://cortex.orangelogic.com/" value=${this.settings.config.siteUrl} @cx-input=${this.handleConnectionURLInput}></cx-input><cx-tooltip class="welcome__connect-button__tooltip" ?disabled=${this.siteUrl.trim() && this.validConnectionUrl} content=${this.siteUrl.trim() ? this.localize.term("pleaseEnterAValidUrl") : this.localize.term("connectionCannotBeEmpty")}><cx-button type="submit" ?loading=${this.isConnecting} variant="primary" class=${C({
|
|
1647
1638
|
"welcome__connect-button": !0,
|
|
1648
1639
|
"welcome__connect-button--disabled": !this.siteUrl.trim() || !this.validConnectionUrl
|
|
1649
|
-
})} ?disabled=${!this.siteUrl.trim() || !this.validConnectionUrl}>${this.localize.term("connect")}</cx-button></cx-tooltip><cx-button type="button" ?loading=${this.isCancellingConnection} variant="text" class=${
|
|
1640
|
+
})} ?disabled=${!this.siteUrl.trim() || !this.validConnectionUrl}>${this.localize.term("connect")}</cx-button></cx-tooltip><cx-button type="button" ?loading=${this.isCancellingConnection} variant="text" class=${C({
|
|
1650
1641
|
"welcome__cancel-connection-button": !0
|
|
1651
1642
|
})} ?disabled=${!this.isConnecting} @click=${this.cancelConnection}>${this.localize.term("cancel")}</cx-button><cx-typography class="error-message" variant="body3">${p(
|
|
1652
1643
|
this.connectError,
|
|
@@ -1661,7 +1652,7 @@ let r = class extends H {
|
|
|
1661
1652
|
return n`<div class="loading-overlay"><cx-spinner></cx-spinner></div>`;
|
|
1662
1653
|
}
|
|
1663
1654
|
render() {
|
|
1664
|
-
return n`<div class=${
|
|
1655
|
+
return n`<div class=${C({
|
|
1665
1656
|
container: !0,
|
|
1666
1657
|
"container--connected": this.connectionEstablished,
|
|
1667
1658
|
"container--user-interaction-blocked": this.userInteractionBlocked
|
|
@@ -1670,30 +1661,30 @@ let r = class extends H {
|
|
|
1670
1661
|
}
|
|
1671
1662
|
// #endregion
|
|
1672
1663
|
};
|
|
1673
|
-
r.styles =
|
|
1664
|
+
r.styles = Je;
|
|
1674
1665
|
r.dependencies = {
|
|
1675
|
-
"cx-avatar":
|
|
1676
|
-
"cx-button":
|
|
1677
|
-
"cx-confirm-popover":
|
|
1678
|
-
"cx-dialog":
|
|
1679
|
-
"cx-divider":
|
|
1666
|
+
"cx-avatar": Vt,
|
|
1667
|
+
"cx-button": Ht,
|
|
1668
|
+
"cx-confirm-popover": te,
|
|
1669
|
+
"cx-dialog": Wt,
|
|
1670
|
+
"cx-divider": qt,
|
|
1680
1671
|
"cx-file-on-demand-asset": L,
|
|
1681
1672
|
"cx-folder-tree": b,
|
|
1682
1673
|
"cx-format-bytes": nt,
|
|
1683
1674
|
"cx-icon": J,
|
|
1684
|
-
"cx-icon-button":
|
|
1685
|
-
"cx-input":
|
|
1675
|
+
"cx-icon-button": At,
|
|
1676
|
+
"cx-input": Gt,
|
|
1686
1677
|
"cx-line-clamp": Q,
|
|
1687
|
-
"cx-option":
|
|
1688
|
-
"cx-relative-time":
|
|
1689
|
-
"cx-select":
|
|
1678
|
+
"cx-option": Yt,
|
|
1679
|
+
"cx-relative-time": Dt,
|
|
1680
|
+
"cx-select": Kt,
|
|
1690
1681
|
"cx-space": Zt,
|
|
1691
|
-
"cx-tab":
|
|
1692
|
-
"cx-tab-group":
|
|
1693
|
-
"cx-tab-panel":
|
|
1694
|
-
"cx-tooltip":
|
|
1695
|
-
"cx-tree":
|
|
1696
|
-
"cx-tree-item":
|
|
1682
|
+
"cx-tab": Xt,
|
|
1683
|
+
"cx-tab-group": Jt,
|
|
1684
|
+
"cx-tab-panel": Qt,
|
|
1685
|
+
"cx-tooltip": Tt,
|
|
1686
|
+
"cx-tree": St,
|
|
1687
|
+
"cx-tree-item": bt,
|
|
1697
1688
|
"cx-typography": rt
|
|
1698
1689
|
};
|
|
1699
1690
|
l([
|
|
@@ -1953,7 +1944,7 @@ l([
|
|
|
1953
1944
|
], r.prototype, "searchText", 2);
|
|
1954
1945
|
l([
|
|
1955
1946
|
P(["searchText"]),
|
|
1956
|
-
|
|
1947
|
+
ee(200)
|
|
1957
1948
|
], r.prototype, "onSearch", 1);
|
|
1958
1949
|
l([
|
|
1959
1950
|
P("cacheLocation")
|
|
@@ -1963,12 +1954,12 @@ r = l([
|
|
|
1963
1954
|
], r);
|
|
1964
1955
|
export {
|
|
1965
1956
|
r as C,
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1957
|
+
He as a,
|
|
1958
|
+
je as b,
|
|
1959
|
+
Me as c,
|
|
1960
|
+
vt as d,
|
|
1961
|
+
We as e,
|
|
1962
|
+
qe as i,
|
|
1963
|
+
Ee as o,
|
|
1964
|
+
Ne as s
|
|
1974
1965
|
};
|