@orangelogic/design-system 2.112.0 → 2.114.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.Ci6rP56l.js → asset.Drl4D1c7.js} +1 -1
- package/library/chunks/{button.BvBgxmvw.js → button.DwJEeW2t.js} +1 -1
- package/library/chunks/{color-swatch-group.D8KPblw2.js → color-swatch-group.5Mqr0rNP.js} +7 -7
- package/library/chunks/{color-swatch.DQxReKYX.js → color-swatch.DVzEaNeL.js} +1 -1
- package/library/chunks/{confirm-popover.dyPIFLWa.js → confirm-popover.BifwpSuf.js} +3 -3
- package/library/chunks/{dialog.BoCFGpPO.js → dialog.BYCWepBc.js} +2 -2
- package/library/chunks/{document-viewer.B90s20gM.js → document-viewer.Cui5mV3v.js} +5 -5
- package/library/chunks/{dot-pagination.uz9GFrMP.js → dot-pagination.C4l5vKor.js} +1 -1
- package/library/chunks/{file-on-demand.DLVH0DID.js → file-on-demand.AwMj4AfO.js} +246 -227
- package/library/chunks/{folder-select.C2ruplAB.js → folder-select.Bc9x2hMO.js} +4 -4
- package/library/chunks/{header.By_Mfx47.js → header.Cf9ujCpg.js} +3 -3
- package/library/chunks/{i18n.BcD4Ohsq.js → i18n.CH-wak_P.js} +6 -1
- package/library/chunks/{icon-button.DO6DHXwo.js → icon-button.CQiBjznj.js} +1 -1
- package/library/chunks/{iframe.C4jZSmOr.js → iframe.BQPVygBJ.js} +1 -1
- package/library/chunks/{image.Cx4hbc4L.js → image.cT-FziNS.js} +1 -1
- package/library/chunks/{input.B7SaYNrr.js → input.CH4lKxPM.js} +1 -1
- package/library/chunks/{list-editor.Hag-nXN-.js → list-editor.BBgFSBlF.js} +74 -74
- package/library/chunks/{option.CA-HtVdP.js → option.Bvh35v8S.js} +10 -10
- package/library/chunks/{pagination.jgAGwDyt.js → pagination.zQ2FFtxB.js} +5 -5
- package/library/chunks/{tab-group.DyxpVNOn.js → tab-group.DvMX02hY.js} +3 -3
- package/library/chunks/{table.Crb35At8.js → table.DLrle5SR.js} +5 -5
- package/library/chunks/{tree.jg0MjIB8.js → tree.Btf2Q4YZ.js} +10 -7
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +6 -6
- package/library/components/atoms.js +129 -131
- package/library/components/audio.js +2 -2
- package/library/components/border-input-group.js +2 -2
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +2 -2
- package/library/components/color-picker.js +3 -3
- 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 +3 -3
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/divider.js +15 -15
- package/library/components/document-viewer.js +3 -3
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +2 -2
- 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 +10 -10
- package/library/components/folder-select.js +4 -4
- 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 +2 -2
- package/library/components/line-clamp.js +1 -1
- package/library/components/list-editor.js +7 -7
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +3 -3
- package/library/components/molecules.js +4 -4
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +6 -6
- 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/radio-button.js +10 -10
- package/library/components/radio-card.js +6 -6
- package/library/components/radio.js +2 -2
- 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/resize-observer.js +3 -3
- package/library/components/select.js +7 -7
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +10 -10
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +3 -3
- 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 +29688 -29415
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/divider/divider.d.ts +1 -1
- package/library/packages/atoms/src/components/option/option.d.ts +1 -1
- package/library/packages/atoms/src/components/radio/radio.d.ts +1 -1
- package/library/packages/atoms/src/components/radio-button/radio-button.d.ts +1 -1
- package/library/packages/atoms/src/components/radio-card/radio-card.d.ts +1 -1
- package/library/packages/atoms/src/components/tree/tree.d.ts +1 -0
- package/library/packages/atoms/src/index.d.ts +0 -1
- package/library/packages/{atoms/src/components → molecules/src}/faceted-filter/components/facet/facet.d.ts +9 -9
- package/library/packages/{atoms/src/components → molecules/src}/faceted-filter/faceted-filter.d.ts +12 -12
- package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +6 -3
- package/library/packages/molecules/src/index.d.ts +1 -0
- package/library/packages/molecules/src/share-option-list/share-option-list.d.ts +1 -1
- package/library/packages/organisms/src/carousel/carousel.d.ts +1 -0
- package/library/packages/organisms/src/file-on-demand/components/file-on-demand-pinned-status.ts/file-on-demand-pinned-status.d.ts +2 -0
- package/library/packages/organisms/src/file-on-demand/file-on-demand.d.ts +1 -0
- package/library/packages/types/src/icon-picker.d.ts +2 -2
- package/library/packages/utils/src/custom-element/i18n.d.ts +6 -1
- package/library/react-web-component.d.ts +51 -52
- package/library/utils.js +1 -1
- package/package.json +1 -1
- package/library/components/faceted-filter.d.ts +0 -3
- package/library/components/faceted-filter.js +0 -295
- /package/library/packages/{atoms/src/components → molecules/src}/faceted-filter/components/facet/facet.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → molecules/src}/faceted-filter/faceted-filter.styles.d.ts +0 -0
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import
|
|
3
|
-
import { C as bt, s as $t, a as St, b as dt } from "./tree.
|
|
4
|
-
import { n as d, C as
|
|
5
|
-
import { c as
|
|
6
|
-
import { c as
|
|
7
|
-
import { L as
|
|
8
|
-
import { k as Et, h as It, i as
|
|
1
|
+
import { C as tt } from "./icon.DnBh6-56.js";
|
|
2
|
+
import et from "../components/line-clamp.js";
|
|
3
|
+
import { C as bt, s as $t, a as St, b as dt } from "./tree.Btf2Q4YZ.js";
|
|
4
|
+
import { n as d, C as W } from "./lib-cortex-element.CVMmyPMC.js";
|
|
5
|
+
import { c as st } from "./component.styles.CRO4Odto.js";
|
|
6
|
+
import { c as q } from "./custom-element.L4WJXn1j.js";
|
|
7
|
+
import { L as G } from "./i18n.CH-wak_P.js";
|
|
8
|
+
import { k as Et, h as It, i as Ct, w as P, j as Lt, l as Ft, a as Ut, c as Rt, g as kt, m as Ot, n as Nt } from "./watch.CThbualB.js";
|
|
9
9
|
import { p as R } from "./string.DUgD4c9f.js";
|
|
10
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 w } from "./class-map.BiVq-cVR.js";
|
|
14
14
|
import { c as U } from "./repeat.DbF2p5ae.js";
|
|
15
|
-
import { n as
|
|
16
|
-
import { b as Bt, i as
|
|
15
|
+
import { n as h } from "./when.Dr1es41R.js";
|
|
16
|
+
import { b as Bt, i as wt } from "./_baseIteratee.DpzDid58.js";
|
|
17
17
|
import Mt from "../components/avatar.js";
|
|
18
|
-
import { C as Vt } from "./button.
|
|
19
|
-
import { C as Ht } from "./dialog.
|
|
18
|
+
import { C as Vt } from "./button.DwJEeW2t.js";
|
|
19
|
+
import { C as Ht } from "./dialog.BYCWepBc.js";
|
|
20
20
|
import Wt from "../components/divider.js";
|
|
21
21
|
import nt from "../components/format-bytes.js";
|
|
22
|
-
import { C as At } from "./icon-button.
|
|
23
|
-
import { C as qt } from "./input.
|
|
24
|
-
import { C as Gt } from "./option.
|
|
22
|
+
import { C as At } from "./icon-button.CQiBjznj.js";
|
|
23
|
+
import { C as qt } from "./input.CH4lKxPM.js";
|
|
24
|
+
import { C as Gt } from "./option.Bvh35v8S.js";
|
|
25
25
|
import Dt from "../components/relative-time.js";
|
|
26
26
|
import Yt from "../components/select.js";
|
|
27
27
|
import Kt from "../components/space.js";
|
|
28
28
|
import Zt from "../components/tab.js";
|
|
29
|
-
import { C as Xt } from "./tab-group.
|
|
29
|
+
import { C as Xt } from "./tab-group.DvMX02hY.js";
|
|
30
30
|
import Jt from "../components/tab-panel.js";
|
|
31
31
|
import Tt from "../components/tooltip.js";
|
|
32
32
|
import { C as rt } from "./typography.DJC_UXgs.js";
|
|
33
|
-
import { C as Qt } from "./confirm-popover.
|
|
33
|
+
import { C as Qt } from "./confirm-popover.BifwpSuf.js";
|
|
34
34
|
import { d as te } from "./debounce.CIEhztrj.js";
|
|
35
|
-
import { a as
|
|
36
|
-
import { i as
|
|
37
|
-
import { a as ee, b as
|
|
35
|
+
import { a as Z } from "./number.B4PQLJIg.js";
|
|
36
|
+
import { i as X, a as pt } from "./url.Cj9cIQXJ.js";
|
|
37
|
+
import { a as ee, b as ht } from "./_baseUniq.HFKneygy.js";
|
|
38
38
|
import { a as se } from "./toString.CAY8lys2.js";
|
|
39
39
|
import { S as ut, i as ie } from "./isObjectLike.z36Fu426.js";
|
|
40
40
|
import ae from "../components/progress-bar.js";
|
|
@@ -50,7 +50,7 @@ function ce(t, e, i, a) {
|
|
|
50
50
|
}
|
|
51
51
|
function le(t) {
|
|
52
52
|
return function(e, i, a) {
|
|
53
|
-
for (var s = -1, o = Object(e), c = a(e),
|
|
53
|
+
for (var s = -1, o = Object(e), c = a(e), p = c.length; p--; ) {
|
|
54
54
|
var _ = c[++s];
|
|
55
55
|
if (i(o[_], _, o) === !1)
|
|
56
56
|
break;
|
|
@@ -59,10 +59,10 @@ function le(t) {
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
var de = le();
|
|
62
|
-
function
|
|
62
|
+
function pe(t, e) {
|
|
63
63
|
return t && de(t, e, Et);
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function he(t, e) {
|
|
66
66
|
return function(i, a) {
|
|
67
67
|
if (i == null)
|
|
68
68
|
return i;
|
|
@@ -73,7 +73,7 @@ function pe(t, e) {
|
|
|
73
73
|
return i;
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
var ue = pe
|
|
76
|
+
var ue = he(pe);
|
|
77
77
|
function ge(t, e, i, a) {
|
|
78
78
|
return ue(t, function(s, o, c) {
|
|
79
79
|
e(a, s, i(s), c);
|
|
@@ -81,7 +81,7 @@ function ge(t, e, i, a) {
|
|
|
81
81
|
}
|
|
82
82
|
function xe(t, e) {
|
|
83
83
|
return function(i, a) {
|
|
84
|
-
var s =
|
|
84
|
+
var s = Ct(i) ? ce : ge, o = e ? e() : {};
|
|
85
85
|
return s(i, t, Bt(a), o);
|
|
86
86
|
};
|
|
87
87
|
}
|
|
@@ -99,7 +99,7 @@ const _e = {
|
|
|
99
99
|
PINNED: "pinned",
|
|
100
100
|
RECENT: "recent",
|
|
101
101
|
UPLOADS: "uploads"
|
|
102
|
-
},
|
|
102
|
+
}, J = 20, fe = {
|
|
103
103
|
GET_CONTENT: "/webapi/extensibility/integrations/contentBrowserSDK/getcontent_4bw_v1"
|
|
104
104
|
}, A = {
|
|
105
105
|
ASSET_PATH: "Document.AssetPath",
|
|
@@ -109,7 +109,7 @@ const _e = {
|
|
|
109
109
|
HAS_BROWSER_CHILDREN: "Document.HasBrowserChildren",
|
|
110
110
|
PARENT_FOLDER_IDENTIFIER: "Document.ParentRecordID",
|
|
111
111
|
TITLE_WITH_FALLBACK: "CoreField.TitleWithFallback"
|
|
112
|
-
},
|
|
112
|
+
}, M = "GB", Q = 1e3, N = 6e4, ve = ["album", "story", "project", "merchandise"], gt = (t) => {
|
|
113
113
|
const e = /* @__PURE__ */ new Date(), i = new Date(
|
|
114
114
|
e.getFullYear(),
|
|
115
115
|
e.getMonth(),
|
|
@@ -141,13 +141,13 @@ const _e = {
|
|
|
141
141
|
limit: s = be,
|
|
142
142
|
searchText: o,
|
|
143
143
|
seeThru: c,
|
|
144
|
-
siteUrl:
|
|
144
|
+
siteUrl: p,
|
|
145
145
|
start: _ = 0,
|
|
146
146
|
token: m
|
|
147
147
|
}) => {
|
|
148
|
-
if (!
|
|
148
|
+
if (!p)
|
|
149
149
|
return { data: [], totalCount: 0 };
|
|
150
|
-
let g =
|
|
150
|
+
let g = p;
|
|
151
151
|
g.endsWith("/") && (g = g.slice(0, -1));
|
|
152
152
|
const $ = fe.GET_CONTENT, f = [
|
|
153
153
|
["Token", m],
|
|
@@ -170,59 +170,59 @@ const _e = {
|
|
|
170
170
|
["limit", s.toString()],
|
|
171
171
|
["start", _.toString()]
|
|
172
172
|
], F = new URL(`${g}${$}`);
|
|
173
|
-
f.forEach(([
|
|
174
|
-
F.searchParams.append(
|
|
173
|
+
f.forEach(([C, E]) => {
|
|
174
|
+
F.searchParams.append(C, E);
|
|
175
175
|
});
|
|
176
|
-
const
|
|
176
|
+
const O = await fetch(F.toString(), {
|
|
177
177
|
headers: {
|
|
178
178
|
Authorization: `Bearer ${m}`
|
|
179
179
|
},
|
|
180
180
|
method: "GET"
|
|
181
181
|
});
|
|
182
|
-
if (!
|
|
183
|
-
const
|
|
184
|
-
throw
|
|
185
|
-
}
|
|
186
|
-
const
|
|
187
|
-
let
|
|
188
|
-
a && (
|
|
189
|
-
const ct =
|
|
190
|
-
let E =
|
|
191
|
-
|
|
182
|
+
if (!O.ok) {
|
|
183
|
+
const C = new Error();
|
|
184
|
+
throw C.message = "Failed to fetch", C;
|
|
185
|
+
}
|
|
186
|
+
const Y = await O.json();
|
|
187
|
+
let K = /* @__PURE__ */ new Set();
|
|
188
|
+
a && (K = Ie(a));
|
|
189
|
+
const ct = Y.contentItems?.map((C) => {
|
|
190
|
+
let E = V(
|
|
191
|
+
C.fields,
|
|
192
192
|
A.TITLE_WITH_FALLBACK
|
|
193
193
|
) ?? "", B = Se(
|
|
194
|
-
(
|
|
195
|
-
|
|
194
|
+
(V(
|
|
195
|
+
C.fields,
|
|
196
196
|
A.ASSET_PATH
|
|
197
197
|
) ?? "").replace(/^Root\//i, "")
|
|
198
198
|
) || E;
|
|
199
199
|
if (a) {
|
|
200
200
|
if (a.has(B)) {
|
|
201
201
|
const lt = B.split("/"), zt = lt.pop();
|
|
202
|
-
B = `${lt.join("/")}/${
|
|
202
|
+
B = `${lt.join("/")}/${C.recordID}-${zt}`, E = `${C.recordID}-${E}`;
|
|
203
203
|
}
|
|
204
|
-
o?.trim() &&
|
|
204
|
+
o?.trim() && K.has(E) && (E = B), a.add(B), K.add(E);
|
|
205
205
|
}
|
|
206
206
|
return {
|
|
207
207
|
childCount: Number(
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
V(
|
|
209
|
+
C.fields,
|
|
210
210
|
A.CHILD_COUNT
|
|
211
211
|
) ?? 0
|
|
212
212
|
),
|
|
213
213
|
children: [],
|
|
214
|
-
docType:
|
|
215
|
-
|
|
214
|
+
docType: V(
|
|
215
|
+
C.fields,
|
|
216
216
|
A.DOC_TYPE
|
|
217
217
|
) ?? "",
|
|
218
218
|
fullPath: B,
|
|
219
|
-
hasChildren:
|
|
220
|
-
|
|
219
|
+
hasChildren: V(
|
|
220
|
+
C.fields,
|
|
221
221
|
A.HAS_BROWSER_CHILDREN
|
|
222
222
|
) === "1",
|
|
223
|
-
id:
|
|
224
|
-
parentFolderIdentifier:
|
|
225
|
-
|
|
223
|
+
id: C.recordID,
|
|
224
|
+
parentFolderIdentifier: V(
|
|
225
|
+
C.fields,
|
|
226
226
|
A.PARENT_FOLDER_IDENTIFIER
|
|
227
227
|
) ?? "",
|
|
228
228
|
parents: [],
|
|
@@ -230,9 +230,9 @@ const _e = {
|
|
|
230
230
|
title: E
|
|
231
231
|
};
|
|
232
232
|
}) ?? [];
|
|
233
|
-
return { data: ct, totalCount:
|
|
233
|
+
return { data: ct, totalCount: Y.totalCount ?? ct.length };
|
|
234
234
|
};
|
|
235
|
-
function
|
|
235
|
+
function V(t, e) {
|
|
236
236
|
const i = e.toLowerCase(), a = Object.keys(t).find(
|
|
237
237
|
(s) => s.toLowerCase() === i
|
|
238
238
|
);
|
|
@@ -241,7 +241,7 @@ function M(t, e) {
|
|
|
241
241
|
const at = "-", S = (t) => {
|
|
242
242
|
const e = t.split(at), i = e.pop() ?? "", a = e.join(at);
|
|
243
243
|
return { id: i, path: a };
|
|
244
|
-
},
|
|
244
|
+
}, j = ({ id: t, path: e }) => [e, t].join(at), $e = (t) => {
|
|
245
245
|
const e = t.split(".");
|
|
246
246
|
return e.length > 1 ? e.pop() ?? "" : "";
|
|
247
247
|
}, xt = (t) => {
|
|
@@ -258,21 +258,21 @@ const at = "-", S = (t) => {
|
|
|
258
258
|
s && e.add(s);
|
|
259
259
|
}
|
|
260
260
|
return e;
|
|
261
|
-
},
|
|
261
|
+
}, Ce = (t, e) => {
|
|
262
262
|
const i = t.split("/"), a = e.split("/");
|
|
263
263
|
return i.slice(0, a.length + 1).join("/");
|
|
264
264
|
};
|
|
265
265
|
function _t(t) {
|
|
266
266
|
return t.toSorted((e, i) => i.uploadTimestamp - e.uploadTimestamp);
|
|
267
267
|
}
|
|
268
|
-
var
|
|
268
|
+
var we = Object.defineProperty, Ae = Object.getOwnPropertyDescriptor, D = (t, e, i, a) => {
|
|
269
269
|
for (var s = a > 1 ? void 0 : a ? Ae(e, i) : e, o = t.length - 1, c; o >= 0; o--)
|
|
270
270
|
(c = t[o]) && (s = (a ? c(e, i, s) : c(s)) || s);
|
|
271
|
-
return a && s &&
|
|
271
|
+
return a && s && we(e, i, s), s;
|
|
272
272
|
};
|
|
273
|
-
let y = class extends
|
|
273
|
+
let y = class extends W {
|
|
274
274
|
constructor() {
|
|
275
|
-
super(...arguments), this.localize = new
|
|
275
|
+
super(...arguments), this.localize = new G(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 ({
|
|
276
276
|
folderId: t,
|
|
277
277
|
start: e = 0
|
|
278
278
|
}) => await Pt({
|
|
@@ -341,8 +341,8 @@ let y = class extends H {
|
|
|
341
341
|
const f = S($);
|
|
342
342
|
if (!f.path.trim() || !f.id.trim())
|
|
343
343
|
return !1;
|
|
344
|
-
const F = R(f.path),
|
|
345
|
-
a && F.startsWith(
|
|
344
|
+
const F = R(f.path), O = R(a);
|
|
345
|
+
a && F.startsWith(O) && F !== O && g.add(Ce(f.path, a));
|
|
346
346
|
});
|
|
347
347
|
};
|
|
348
348
|
o(this.removedIDs, i), o(s, e);
|
|
@@ -350,16 +350,16 @@ let y = class extends H {
|
|
|
350
350
|
const g = S(m);
|
|
351
351
|
if (!g.path.trim() || !g.id.trim())
|
|
352
352
|
return !1;
|
|
353
|
-
const $ =
|
|
353
|
+
const $ = j({
|
|
354
354
|
id: this.folder?.id ?? "",
|
|
355
355
|
path: a
|
|
356
|
-
}), f = R(g.path), F = R(a),
|
|
357
|
-
return
|
|
356
|
+
}), f = R(g.path), F = R(a), O = g.id === this.folder?.id, Y = !this.removedIDs.includes($) && F.startsWith(f);
|
|
357
|
+
return O || Y;
|
|
358
358
|
});
|
|
359
|
-
const
|
|
359
|
+
const p = this.folder?.childCount && e.size === this.folder?.childCount;
|
|
360
360
|
if (this.folder?.childCount && i.size === this.folder?.childCount) {
|
|
361
361
|
this.currentRootIDsSet.delete(
|
|
362
|
-
|
|
362
|
+
j({
|
|
363
363
|
id: this.folder?.id ?? "",
|
|
364
364
|
path: a
|
|
365
365
|
})
|
|
@@ -367,9 +367,9 @@ let y = class extends H {
|
|
|
367
367
|
const m = this.parentElement?.parentElement;
|
|
368
368
|
m && m instanceof y && m.syncBoxes(), c = !1;
|
|
369
369
|
} else if (!c)
|
|
370
|
-
if (
|
|
370
|
+
if (p) {
|
|
371
371
|
this.currentRootIDsSet.add(
|
|
372
|
-
|
|
372
|
+
j({
|
|
373
373
|
id: this.folder?.id ?? "",
|
|
374
374
|
path: a
|
|
375
375
|
})
|
|
@@ -381,7 +381,7 @@ let y = class extends H {
|
|
|
381
381
|
}
|
|
382
382
|
render() {
|
|
383
383
|
const t = mt(this.folder?.path ?? [], this.folder?.fullPath ?? "");
|
|
384
|
-
return n`<cx-tree-item aria-label=${this.folder?.title ?? ""} class=${
|
|
384
|
+
return n`<cx-tree-item aria-label=${this.folder?.title ?? ""} class=${w({
|
|
385
385
|
"folder-tree__item": !0,
|
|
386
386
|
selectable: !0
|
|
387
387
|
})} 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(
|
|
@@ -389,16 +389,16 @@ let y = class extends H {
|
|
|
389
389
|
(e) => e.id,
|
|
390
390
|
(e) => n`<cx-folder-item slot="children" .folder=${e} .siteUrl=${this.siteUrl} .token=${this.token} .removedIDs=${this.removedIDs} .currentRootIDsSet=${this.currentRootIDsSet} .folderPathsSet=${this.folderPathsSet}></cx-folder-item>`
|
|
391
391
|
)}
|
|
392
|
-
${
|
|
392
|
+
${h(
|
|
393
393
|
this.data && this.data.length < this.totalCount,
|
|
394
394
|
() => n`<div slot="children" class="load-more-button"><cx-button data-testid="load-more-button" variant="text" @click=${this.loadMore} ?loading=${this.isLoading}>${this.localize.term("more")}</cx-button></div>`
|
|
395
395
|
)}</cx-tree-item>`;
|
|
396
396
|
}
|
|
397
397
|
};
|
|
398
|
-
y.styles = [
|
|
398
|
+
y.styles = [st];
|
|
399
399
|
y.dependencies = {
|
|
400
|
-
"cx-icon":
|
|
401
|
-
"cx-line-clamp":
|
|
400
|
+
"cx-icon": tt,
|
|
401
|
+
"cx-line-clamp": et,
|
|
402
402
|
"cx-tree-item": bt
|
|
403
403
|
};
|
|
404
404
|
D([
|
|
@@ -452,7 +452,7 @@ D([
|
|
|
452
452
|
P(["currentRootIDsSet", "removedIDs"])
|
|
453
453
|
], y.prototype, "syncBoxes", 1);
|
|
454
454
|
y = D([
|
|
455
|
-
|
|
455
|
+
q("cx-folder-item")
|
|
456
456
|
], y);
|
|
457
457
|
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)}`;
|
|
458
458
|
var Te = Object.defineProperty, Pe = Object.getOwnPropertyDescriptor, I = (t, e, i, a) => {
|
|
@@ -460,9 +460,9 @@ var Te = Object.defineProperty, Pe = Object.getOwnPropertyDescriptor, I = (t, e,
|
|
|
460
460
|
(c = t[o]) && (s = (a ? c(e, i, s) : c(s)) || s);
|
|
461
461
|
return a && s && Te(e, i, s), s;
|
|
462
462
|
};
|
|
463
|
-
let b = class extends
|
|
463
|
+
let b = class extends W {
|
|
464
464
|
constructor() {
|
|
465
|
-
super(...arguments), this.localize = new
|
|
465
|
+
super(...arguments), this.localize = new G(this), this.role = "tree", this.siteUrl = "", this.bearerToken = "", this.token = "", this.searchText = "", this.folders = [], this.rootIDs = [], this.totalCount = 0, this.loadMore = () => {
|
|
466
466
|
}, this.isLoading = !1, this.folderPathsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.renderFolder = (t) => n`<cx-folder-item .currentRootIDsSet=${this.currentRootIDsSet} .folder=${t} .folderPathsSet=${this.folderPathsSet} .removedIDs=${this.removedIDs} bearer-token=${this.bearerToken} search-text=${this.searchText} site-url=${this.siteUrl} token=${this.token}></cx-folder-item>`;
|
|
467
467
|
}
|
|
468
468
|
get currentRootIDs() {
|
|
@@ -474,7 +474,7 @@ let b = class extends H {
|
|
|
474
474
|
resetTree() {
|
|
475
475
|
this.currentRootIDsSet = new Set(this.rootIDs), this.tree.querySelectorAll("cx-folder-item").forEach((t) => {
|
|
476
476
|
t.selected = this.currentRootIDsSet.has(
|
|
477
|
-
|
|
477
|
+
j({
|
|
478
478
|
id: t.id,
|
|
479
479
|
path: t.dataset.path ?? ""
|
|
480
480
|
})
|
|
@@ -485,7 +485,7 @@ let b = class extends H {
|
|
|
485
485
|
const e = t.target, i = e.dataset.id ?? "", a = e.dataset.path ?? "";
|
|
486
486
|
if (await e.updateComplete, !i.trim() || !a.trim())
|
|
487
487
|
return;
|
|
488
|
-
const s =
|
|
488
|
+
const s = j({
|
|
489
489
|
id: i,
|
|
490
490
|
path: a
|
|
491
491
|
});
|
|
@@ -495,7 +495,7 @@ let b = class extends H {
|
|
|
495
495
|
dt(e, "multiple"), this.currentRootIDsSet.add(s);
|
|
496
496
|
for (const o of e.getChildrenItems())
|
|
497
497
|
!o.id.trim() || !o.dataset.path?.trim() || this.currentRootIDsSet.add(
|
|
498
|
-
|
|
498
|
+
j({
|
|
499
499
|
id: o.id,
|
|
500
500
|
path: o.dataset.path ?? ""
|
|
501
501
|
})
|
|
@@ -507,26 +507,26 @@ let b = class extends H {
|
|
|
507
507
|
} else
|
|
508
508
|
this.removedIDs.push(s), this.currentRootIDsSet.has(s) && (this.currentRootIDsSet.delete(s), dt(e, "multiple"));
|
|
509
509
|
[...this.currentRootIDsSet].forEach((o) => {
|
|
510
|
-
const c = R(a),
|
|
510
|
+
const c = R(a), p = S(o).path, _ = R(p);
|
|
511
511
|
_.startsWith(c) && _ !== c && (e.selected || this.currentRootIDsSet.delete(o));
|
|
512
512
|
}), this.currentRootIDsSet = new Set(this.currentRootIDsSet);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
render() {
|
|
516
|
-
return n`<div class="folder-tree selectable"><cx-tree class=${
|
|
516
|
+
return n`<div class="folder-tree selectable"><cx-tree class=${w({
|
|
517
517
|
selectable: !0
|
|
518
518
|
})} @cx-selected-change=${this.handleSelectedChange} selection="multiple" disabled-auto-expand disabled-sync-checkboxes>${U(
|
|
519
519
|
this.folders,
|
|
520
520
|
(t) => t.id,
|
|
521
521
|
(t) => this.renderFolder(t)
|
|
522
522
|
)}
|
|
523
|
-
${
|
|
523
|
+
${h(
|
|
524
524
|
this.folders && this.folders.length < this.totalCount,
|
|
525
525
|
() => n`<div class="load-more-button"><cx-button variant="text" @click=${this.loadMore} ?loading=${this.isLoading}>${this.localize.term("more")}</cx-button></div>`
|
|
526
526
|
)}</cx-tree></div>`;
|
|
527
527
|
}
|
|
528
528
|
};
|
|
529
|
-
b.styles = [
|
|
529
|
+
b.styles = [st, De];
|
|
530
530
|
b.dependencies = {
|
|
531
531
|
"cx-folder-item": y,
|
|
532
532
|
"cx-tree": St
|
|
@@ -574,7 +574,7 @@ I([
|
|
|
574
574
|
P("rootIDs")
|
|
575
575
|
], b.prototype, "handleRootIDsChange", 1);
|
|
576
576
|
b = I([
|
|
577
|
-
|
|
577
|
+
q("cx-folder-tree")
|
|
578
578
|
], b);
|
|
579
579
|
function ze(t, e, i) {
|
|
580
580
|
switch (i.length) {
|
|
@@ -595,9 +595,9 @@ function Ee(t, e, i) {
|
|
|
595
595
|
for (var a = arguments, s = -1, o = ft(a.length - e, 0), c = Array(o); ++s < o; )
|
|
596
596
|
c[s] = a[e + s];
|
|
597
597
|
s = -1;
|
|
598
|
-
for (var
|
|
599
|
-
|
|
600
|
-
return
|
|
598
|
+
for (var p = Array(e + 1); ++s < e; )
|
|
599
|
+
p[s] = a[s];
|
|
600
|
+
return p[e] = i(c), ze(t, this, p);
|
|
601
601
|
};
|
|
602
602
|
}
|
|
603
603
|
function Le(t) {
|
|
@@ -618,7 +618,7 @@ var vt = function() {
|
|
|
618
618
|
value: Le(e),
|
|
619
619
|
writable: !0
|
|
620
620
|
});
|
|
621
|
-
} :
|
|
621
|
+
} : wt, Ue = 800, Re = 16, ke = Date.now;
|
|
622
622
|
function Oe(t) {
|
|
623
623
|
var e = 0, i = 0;
|
|
624
624
|
return function() {
|
|
@@ -633,16 +633,16 @@ function Oe(t) {
|
|
|
633
633
|
}
|
|
634
634
|
var Ne = Oe(Fe);
|
|
635
635
|
function je(t, e) {
|
|
636
|
-
return Ne(Ee(t, e,
|
|
636
|
+
return Ne(Ee(t, e, wt), t + "");
|
|
637
637
|
}
|
|
638
638
|
var Be = 200;
|
|
639
639
|
function Me(t, e, i, a) {
|
|
640
|
-
var s = -1, o = ee, c = !0,
|
|
641
|
-
if (!
|
|
640
|
+
var s = -1, o = ee, c = !0, p = t.length, _ = [], m = e.length;
|
|
641
|
+
if (!p)
|
|
642
642
|
return _;
|
|
643
643
|
i && (e = se(e, Ft(i))), e.length >= Be && (o = Rt, c = !1, e = new Ut(e));
|
|
644
644
|
t:
|
|
645
|
-
for (; ++s <
|
|
645
|
+
for (; ++s < p; ) {
|
|
646
646
|
var g = t[s], $ = i == null ? g : i(g);
|
|
647
647
|
if (g = g !== 0 ? g : 0, c && $ === $) {
|
|
648
648
|
for (var f = m; f--; )
|
|
@@ -655,38 +655,38 @@ function Me(t, e, i, a) {
|
|
|
655
655
|
}
|
|
656
656
|
var yt = ut ? ut.isConcatSpreadable : void 0;
|
|
657
657
|
function Ve(t) {
|
|
658
|
-
return
|
|
658
|
+
return Ct(t) || kt(t) || !!(yt && t && t[yt]);
|
|
659
659
|
}
|
|
660
660
|
function He(t, e, i, a, s) {
|
|
661
661
|
var o = -1, c = t.length;
|
|
662
662
|
for (i || (i = Ve), s || (s = []); ++o < c; ) {
|
|
663
|
-
var
|
|
664
|
-
i(
|
|
663
|
+
var p = t[o];
|
|
664
|
+
i(p) ? Ot(s, p) : a || (s[s.length] = p);
|
|
665
665
|
}
|
|
666
666
|
return s;
|
|
667
667
|
}
|
|
668
668
|
function We(t, e, i) {
|
|
669
669
|
var a = t.length;
|
|
670
670
|
if (a < 2)
|
|
671
|
-
return a ?
|
|
671
|
+
return a ? ht(t[0]) : [];
|
|
672
672
|
for (var s = -1, o = Array(a); ++s < a; )
|
|
673
|
-
for (var c = t[s],
|
|
674
|
-
|
|
675
|
-
return
|
|
673
|
+
for (var c = t[s], p = -1; ++p < a; )
|
|
674
|
+
p != s && (o[s] = Me(o[s] || c, t[p], e, i));
|
|
675
|
+
return ht(He(o), e, i);
|
|
676
676
|
}
|
|
677
677
|
function qe(t) {
|
|
678
678
|
return ie(t) && It(t);
|
|
679
679
|
}
|
|
680
680
|
var it = je(function(t) {
|
|
681
681
|
return We(Nt(t, qe));
|
|
682
|
-
}), 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,
|
|
682
|
+
}), 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, k = (t, e, i, a) => {
|
|
683
683
|
for (var s = a > 1 ? void 0 : a ? Ye(e, i) : e, o = t.length - 1, c; o >= 0; o--)
|
|
684
684
|
(c = t[o]) && (s = (a ? c(e, i, s) : c(s)) || s);
|
|
685
685
|
return a && s && Ge(e, i, s), s;
|
|
686
686
|
};
|
|
687
|
-
let T = class extends
|
|
687
|
+
let T = class extends W {
|
|
688
688
|
constructor() {
|
|
689
|
-
super(...arguments), this.localize = new
|
|
689
|
+
super(...arguments), this.localize = new G(this), this.size = 0, this.remainingSize = 0, this.childrenCount = 0, this.assetsCount = 0;
|
|
690
690
|
}
|
|
691
691
|
get cachedSize() {
|
|
692
692
|
return Math.max(0, this.size - this.remainingSize);
|
|
@@ -698,21 +698,25 @@ let T = class extends H {
|
|
|
698
698
|
return this;
|
|
699
699
|
}
|
|
700
700
|
renderFolderSuccessText() {
|
|
701
|
-
return n`${this.childrenCount} ${this.localize.term("subfolders")}
|
|
702
|
-
${this.assetsCount} ${this.localize.term("assets")}
|
|
701
|
+
return n`${this.childrenCount} ${this.localize.term("subfolders")} ‧
|
|
702
|
+
${this.assetsCount} ${this.localize.term("assets")} ‧
|
|
703
|
+
<cx-format-bytes value=${this.size}></cx-format-bytes>`;
|
|
704
|
+
}
|
|
705
|
+
renderFileSuccessText() {
|
|
706
|
+
return n`<cx-format-bytes value=${this.size}></cx-format-bytes>`;
|
|
703
707
|
}
|
|
704
708
|
renderSuccess() {
|
|
705
|
-
return n`<div class="file-on-demand-pinned-status__success progress"><cx-
|
|
709
|
+
return n`<div class="file-on-demand-pinned-status__success progress"><cx-typography variant="small"><cx-line-clamp lines="1">${h(this.isFolder, this.renderFolderSuccessText.bind(this), this.renderFileSuccessText.bind(this))}</cx-line-clamp></cx-typography></div>`;
|
|
706
710
|
}
|
|
707
711
|
renderFailed() {
|
|
708
|
-
return n`<div class="file-on-demand-pinned-status__failed progress"><cx-icon name="
|
|
712
|
+
return n`<div class="file-on-demand-pinned-status__failed progress"><cx-icon name="warning"></cx-icon><cx-tooltip content=${this.uploadErrorMessage || this.localize.term("syncFailed")}><cx-typography variant="small"><cx-line-clamp lines="1"><span class="pinned-status__text">${this.localize.term("syncFailed")}</span></cx-line-clamp></cx-typography></cx-tooltip></div>`;
|
|
709
713
|
}
|
|
710
714
|
renderCanceled() {
|
|
711
715
|
return n`<div class="file-on-demand-pinned-status__canceled progress"><cx-icon name="file_download_off" variant="filled"></cx-icon><cx-typography variant="small"><cx-line-clamp lines="1">${this.localize.term("syncCanceled")}</cx-line-clamp></cx-typography></div>`;
|
|
712
716
|
}
|
|
713
717
|
renderInProgress() {
|
|
714
|
-
return n`<div class="file-on-demand-pinned-status__in-progress progress"><cx-icon name="downloading" variant="filled"></cx-icon><cx-typography variant="small"><cx-line-clamp lines="1">${this.
|
|
715
|
-
<cx-format-bytes
|
|
718
|
+
return n`<div class="file-on-demand-pinned-status__in-progress progress"><cx-icon name="downloading" variant="filled"></cx-icon><cx-typography variant="small"><cx-line-clamp lines="1">${this.percentage}% (<cx-format-bytes value=${this.cachedSize}></cx-format-bytes>/
|
|
719
|
+
<cx-format-bytes value=${this.size}></cx-format-bytes>)
|
|
716
720
|
</cx-line-clamp></cx-typography></div>`;
|
|
717
721
|
}
|
|
718
722
|
render() {
|
|
@@ -725,58 +729,64 @@ let T = class extends H {
|
|
|
725
729
|
])}</div>`;
|
|
726
730
|
}
|
|
727
731
|
};
|
|
728
|
-
T.styles = [
|
|
732
|
+
T.styles = [st];
|
|
729
733
|
T.dependencies = {
|
|
730
734
|
"cx-format-bytes": nt,
|
|
731
|
-
"cx-icon":
|
|
732
|
-
"cx-line-clamp":
|
|
735
|
+
"cx-icon": tt,
|
|
736
|
+
"cx-line-clamp": et,
|
|
733
737
|
"cx-typography": rt
|
|
734
738
|
};
|
|
735
|
-
|
|
739
|
+
k([
|
|
736
740
|
d({
|
|
737
741
|
attribute: "upload-status",
|
|
738
742
|
type: String
|
|
739
743
|
})
|
|
740
744
|
], T.prototype, "uploadStatus", 2);
|
|
741
|
-
|
|
745
|
+
k([
|
|
742
746
|
d({ type: Number })
|
|
743
747
|
], T.prototype, "size", 2);
|
|
744
|
-
|
|
748
|
+
k([
|
|
745
749
|
d({
|
|
746
750
|
attribute: "remaining-size",
|
|
747
751
|
type: Number
|
|
748
752
|
})
|
|
749
753
|
], T.prototype, "remainingSize", 2);
|
|
750
|
-
|
|
754
|
+
k([
|
|
751
755
|
d({
|
|
752
756
|
attribute: "is-folder",
|
|
753
757
|
type: Boolean
|
|
754
758
|
})
|
|
755
759
|
], T.prototype, "isFolder", 2);
|
|
756
|
-
|
|
760
|
+
k([
|
|
757
761
|
d({
|
|
758
762
|
attribute: "children-count",
|
|
759
763
|
type: Number
|
|
760
764
|
})
|
|
761
765
|
], T.prototype, "childrenCount", 2);
|
|
762
|
-
|
|
766
|
+
k([
|
|
763
767
|
d({
|
|
764
768
|
attribute: "assets-count",
|
|
765
769
|
type: Number
|
|
766
770
|
})
|
|
767
771
|
], T.prototype, "assetsCount", 2);
|
|
768
|
-
|
|
769
|
-
|
|
772
|
+
k([
|
|
773
|
+
d({
|
|
774
|
+
attribute: "upload-error-message",
|
|
775
|
+
type: String
|
|
776
|
+
})
|
|
777
|
+
], T.prototype, "uploadErrorMessage", 2);
|
|
778
|
+
T = k([
|
|
779
|
+
q("cx-file-on-demand-pinned-status")
|
|
770
780
|
], T);
|
|
771
|
-
const Ke = ot`:host{--cx-asset-thumbnail-width:56px;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:var(--cx-asset-thumbnail-width);height:var(--asset-height);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-medium);justify-content:center;align-items:center;display:flex;position:relative;overflow:hidden}.asset__thumbnail--placeholder{background-color:var(--cx-color-primary-50)}.asset__thumbnail--folder{background-color:var(--cx-color-neutral-100)}.asset__thumbnail__image{height:100%;max-width:var(--cx-asset-thumbnail-width);object-fit:cover;flex-shrink:0}.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
|
|
772
|
-
var Ze = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor,
|
|
781
|
+
const Ke = ot`:host{--cx-asset-thumbnail-width:56px;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:var(--cx-asset-thumbnail-width);height:var(--asset-height);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-medium);justify-content:center;align-items:center;display:flex;position:relative;overflow:hidden}.asset__thumbnail--placeholder{background-color:var(--cx-color-primary-50)}.asset__thumbnail--folder{background-color:var(--cx-color-neutral-100)}.asset__thumbnail__image{height:100%;max-width:var(--cx-asset-thumbnail-width);object-fit:cover;flex-shrink:0}.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{color:var(--cx-color-success-500)}.file-on-demand-pinned-status__in-progress cx-icon{color:var(--cx-color-primary-500)}.file-on-demand-pinned-status__failed cx-icon{color:var(--cx-color-warning-600)}.file-on-demand-pinned-status__failed .pinned-status__text{cursor:help}.file-on-demand-pinned-status__canceled cx-icon{color:var(--cx-color-neutral-500)}`;
|
|
782
|
+
var Ze = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, H = (t, e, i, a) => {
|
|
773
783
|
for (var s = a > 1 ? void 0 : a ? Xe(e, i) : e, o = t.length - 1, c; o >= 0; o--)
|
|
774
784
|
(c = t[o]) && (s = (a ? c(e, i, s) : c(s)) || s);
|
|
775
785
|
return a && s && Ze(e, i, s), s;
|
|
776
786
|
};
|
|
777
|
-
let L = class extends
|
|
787
|
+
let L = class extends W {
|
|
778
788
|
constructor() {
|
|
779
|
-
super(...arguments), this.localize = new
|
|
789
|
+
super(...arguments), this.localize = new G(this), this.favoriteInProgressAssets = [], this.pinInProgressAssets = [], this.thumbnailLoadError = !1;
|
|
780
790
|
}
|
|
781
791
|
/** Failed or canceled uploads: show open-in-drive and retry. */
|
|
782
792
|
get showRetryableUploadActions() {
|
|
@@ -903,36 +913,36 @@ let L = class extends H {
|
|
|
903
913
|
uploadErrorMessage: o,
|
|
904
914
|
uploadStatus: c = v.InProgress
|
|
905
915
|
}) {
|
|
906
|
-
const
|
|
916
|
+
const p = a > 0 ? e * 100 / a : 0, _ = c === v.InProgress ? p : 100, m = n`<div class=${w({
|
|
907
917
|
"in-progress": c === v.InProgress,
|
|
908
918
|
paused: t,
|
|
909
919
|
progress: !0,
|
|
910
920
|
"uploading-progress": !0
|
|
911
|
-
})}>${
|
|
912
|
-
(${Math.round(
|
|
913
|
-
${
|
|
921
|
+
})}>${h(t, () => n`<cx-icon name="pause" variant="filled"></cx-icon>`, () => n`<cx-icon name="arrow_upward"></cx-icon>`)}<cx-typography variant="small"><cx-line-clamp lines="1">${h(t, () => n`${this.localize.term("paused")} ‧`)}<cx-format-bytes value=${e}></cx-format-bytes> ${this.localize.term("of")} <cx-format-bytes value=${a}></cx-format-bytes>
|
|
922
|
+
(${Math.round(p)}%)
|
|
923
|
+
${h(
|
|
914
924
|
!!i && !t,
|
|
915
925
|
() => n`‧
|
|
916
|
-
<cx-relative-time format="narrow" numeric="always" date=${new Date(Date.now() + (i ?? 0))} sync sync-interval=${
|
|
926
|
+
<cx-relative-time format="narrow" numeric="always" date=${new Date(Date.now() + (i ?? 0))} sync sync-interval=${N}></cx-relative-time>`
|
|
917
927
|
)}</cx-line-clamp></cx-typography></div>`, g = n`<div class="progress syncing-progress"><cx-icon name="cached"></cx-icon><cx-typography variant="small"><cx-line-clamp lines="1">${this.localize.term("syncing")} ‧
|
|
918
|
-
<cx-relative-time format="narrow" numeric="always" date=${new Date(s)} sync sync-interval=${
|
|
919
|
-
<cx-relative-time format="narrow" numeric="always" date=${new Date(s)} sync sync-interval=${
|
|
920
|
-
</span></cx-tooltip><cx-relative-time format="narrow" numeric="always" date=${new Date(s)} sync sync-interval=${
|
|
921
|
-
<cx-relative-time format="narrow" numeric="always" date=${new Date(s)} sync sync-interval=${
|
|
928
|
+
<cx-relative-time format="narrow" numeric="always" date=${new Date(s)} sync sync-interval=${N}></cx-relative-time></cx-line-clamp></cx-typography></div>`, $ = n`<div class="progress completed-progress"><cx-icon name="check"></cx-icon><cx-typography variant="small"><cx-line-clamp lines="1">${this.localize.term("readyToUse")} ‧
|
|
929
|
+
<cx-relative-time format="narrow" numeric="always" date=${new Date(s)} sync sync-interval=${N}></cx-relative-time></cx-line-clamp></cx-typography></div>`, f = n`<div class="progress failed-progress"><cx-typography variant="small"><cx-line-clamp lines="1"><cx-tooltip content=${o || this.localize.term("uploadFailed")}><span class="failed-progress__text">${this.localize.term("uploadFailed")} ‧
|
|
930
|
+
</span></cx-tooltip><cx-relative-time format="narrow" numeric="always" date=${new Date(s)} sync sync-interval=${N}></cx-relative-time></cx-line-clamp></cx-typography></div>`, F = n`<div class="progress canceled-progress"><cx-icon name="cancel"></cx-icon><cx-typography variant="small"><cx-line-clamp lines="1">${this.localize.term("canceled")} ‧
|
|
931
|
+
<cx-relative-time format="narrow" numeric="always" date=${new Date(s)} sync sync-interval=${N}></cx-relative-time></cx-line-clamp></cx-typography></div>`;
|
|
922
932
|
return n`
|
|
923
|
-
${
|
|
933
|
+
${h(
|
|
924
934
|
c === v.InProgress,
|
|
925
935
|
() => n`<cx-progress-bar style=${ne({
|
|
926
936
|
"--color": t ? "var(--cx-color-warning-500)" : "var(--cx-color-primary-500)"
|
|
927
937
|
})} .value=${_.toFixed(0)} class="progress-bar"></cx-progress-bar>${m}`
|
|
928
938
|
)}
|
|
929
|
-
${
|
|
939
|
+
${h(
|
|
930
940
|
c === v.PendingComplete,
|
|
931
941
|
() => g
|
|
932
942
|
)}
|
|
933
|
-
${
|
|
934
|
-
${
|
|
935
|
-
${
|
|
943
|
+
${h(c === v.Success, () => $)}
|
|
944
|
+
${h(c === v.Failed, () => f)}
|
|
945
|
+
${h(c === v.Canceled, () => F)}
|
|
936
946
|
`;
|
|
937
947
|
}
|
|
938
948
|
renderUploadingStatus() {
|
|
@@ -949,16 +959,16 @@ let L = class extends H {
|
|
|
949
959
|
`;
|
|
950
960
|
}
|
|
951
961
|
renderPinnedStatus() {
|
|
952
|
-
return n`<cx-file-on-demand-pinned-status size=${this.asset.size ?? 0} remaining-size=${this.asset.remainingSize ?? 0} upload-status=${this.asset.uploadStatus} ?is-folder=${this.isFolder} children-count=${this.asset.childrenCount ?? 0} assets-count=${this.asset.assetsCount ?? 0}></cx-file-on-demand-pinned-status>`;
|
|
962
|
+
return n`<cx-file-on-demand-pinned-status size=${this.asset.size ?? 0} remaining-size=${this.asset.remainingSize ?? 0} upload-status=${this.asset.uploadStatus} ?is-folder=${this.isFolder} children-count=${this.asset.childrenCount ?? 0} assets-count=${this.asset.assetsCount ?? 0} upload-error-message=${this.asset.uploadErrorMessage}></cx-file-on-demand-pinned-status>`;
|
|
953
963
|
}
|
|
954
964
|
renderThumbnailContent() {
|
|
955
|
-
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`${
|
|
965
|
+
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`${h(
|
|
956
966
|
!!this.thumbnailUrl,
|
|
957
967
|
() => n`<img alt=${this.asset.fileName} class="asset__thumbnail__image" src=${this.thumbnailUrl} @error=${this.handleImgError} @load=${this.handleImgLoad}>`
|
|
958
968
|
)}<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>`;
|
|
959
969
|
}
|
|
960
970
|
renderThumbnail() {
|
|
961
|
-
return n`<div class=${
|
|
971
|
+
return n`<div class=${w({
|
|
962
972
|
asset__thumbnail: !0,
|
|
963
973
|
"asset__thumbnail--folder": this.isFolder,
|
|
964
974
|
"asset__thumbnail--placeholder": this.showThumbnailPlaceholder
|
|
@@ -969,7 +979,7 @@ let L = class extends H {
|
|
|
969
979
|
}
|
|
970
980
|
renderNormalActions() {
|
|
971
981
|
return n`${this.renderOpenDriveButton()}
|
|
972
|
-
${
|
|
982
|
+
${h(
|
|
973
983
|
this.favoriteInProgressAssets.includes(this.asset.recordId),
|
|
974
984
|
() => n`<cx-spinner class="asset__actions__spinner"></cx-spinner>`,
|
|
975
985
|
() => n`<cx-tooltip content=${this.asset.isInFavorite ? this.localize.term("unfavorite") : this.localize.term("favorite")} hoist><cx-icon-button data-testid="asset__favorite-button" name="star" variant=${this.asset.isInFavorite ? "filled" : "outlined"} @click=${this.handleFavoriteClick}></cx-icon-button></cx-tooltip>`
|
|
@@ -982,59 +992,59 @@ let L = class extends H {
|
|
|
982
992
|
return n`<cx-tooltip content=${this.asset.isPaused ? this.localize.term("resume") : this.localize.term("pause")} hoist><cx-icon-button data-testid=${this.asset.isPaused ? "asset__resume-button" : "asset__pause-button"} name=${this.asset.isPaused ? "play_arrow" : "pause"} variant="filled" @click=${this.handlePauseUploadClick}></cx-icon-button></cx-tooltip><cx-tooltip content=${this.localize.term("cancel")} hoist><cx-icon-button data-testid="asset__cancel-button" name="close" @click=${this.handleCancelUploadClick}></cx-icon-button></cx-tooltip>`;
|
|
983
993
|
}
|
|
984
994
|
renderPinnedActions() {
|
|
985
|
-
return n`${
|
|
995
|
+
return n`${h(
|
|
986
996
|
this.pinInProgressAssets.includes(this.asset.recordId),
|
|
987
997
|
() => n`<cx-spinner class="asset__actions__spinner"></cx-spinner>`,
|
|
988
|
-
() => n
|
|
998
|
+
() => n`${this.renderOpenDriveButton()}<cx-tooltip content=${this.asset.isPinned ? this.localize.term("unpin") : this.localize.term("pin")} hoist><cx-icon-button data-testid="asset__pin-button" name="keep" variant=${this.asset.isPinned ? "filled" : "outlined"} @click=${this.handlePinClick}></cx-icon-button></cx-tooltip>`
|
|
989
999
|
)} `;
|
|
990
1000
|
}
|
|
991
1001
|
render() {
|
|
992
|
-
return n`<div data-id=${this.asset.recordId} data-testid=${`asset-${this.asset.uploadStatus}`} class="asset">${this.renderThumbnail()}<div class="asset__description"><div class="asset__description__label"><cx-line-clamp class="asset__description__label__text" lines="1"><cx-typography variant="body3">${this.asset.fileName}</cx-typography></cx-line-clamp></div><div class="asset__description__status">${
|
|
1002
|
+
return n`<div data-id=${this.asset.recordId} data-testid=${`asset-${this.asset.uploadStatus}`} class="asset">${this.renderThumbnail()}<div class="asset__description"><div class="asset__description__label"><cx-line-clamp class="asset__description__label__text" lines="1"><cx-typography variant="body3">${this.asset.fileName}</cx-typography></cx-line-clamp></div><div class="asset__description__status">${h(
|
|
993
1003
|
this.listType === x.RECENT,
|
|
994
|
-
() => n`<cx-typography variant="small" class="asset__description__status__time"><cx-relative-time format="narrow" numeric="always" date=${new Date(this.asset.uploadTimestamp)} sync sync-interval=${
|
|
1004
|
+
() => n`<cx-typography variant="small" class="asset__description__status__time"><cx-relative-time format="narrow" numeric="always" date=${new Date(this.asset.uploadTimestamp)} sync sync-interval=${N}></cx-relative-time></cx-typography>`
|
|
995
1005
|
)}
|
|
996
|
-
${
|
|
1006
|
+
${h(
|
|
997
1007
|
this.listType === x.UPLOADS,
|
|
998
1008
|
() => this.renderUploadingStatus()
|
|
999
1009
|
)}
|
|
1000
|
-
${
|
|
1010
|
+
${h(
|
|
1001
1011
|
this.listType === x.PINNED,
|
|
1002
1012
|
() => this.renderPinnedStatus()
|
|
1003
|
-
)}</div></div><div class="asset__actions">${
|
|
1004
|
-
${
|
|
1013
|
+
)}</div></div><div class="asset__actions">${h(this.showNormalActions, () => this.renderNormalActions())}
|
|
1014
|
+
${h(
|
|
1005
1015
|
this.showInProgressActions,
|
|
1006
1016
|
() => this.renderInProgressActions()
|
|
1007
1017
|
)}
|
|
1008
|
-
${
|
|
1018
|
+
${h(
|
|
1009
1019
|
this.showRetryableUploadActions,
|
|
1010
1020
|
() => this.renderRetryableUploadActions()
|
|
1011
1021
|
)}
|
|
1012
|
-
${
|
|
1022
|
+
${h(this.showPinnedActions, () => this.renderPinnedActions())}</div></div>`;
|
|
1013
1023
|
}
|
|
1014
1024
|
};
|
|
1015
|
-
L.styles = [
|
|
1025
|
+
L.styles = [st, Ke];
|
|
1016
1026
|
L.dependencies = {
|
|
1017
1027
|
"cx-file-on-demand-pinned-status": T,
|
|
1018
1028
|
"cx-format-bytes": nt,
|
|
1019
|
-
"cx-icon":
|
|
1029
|
+
"cx-icon": tt,
|
|
1020
1030
|
"cx-icon-button": At,
|
|
1021
|
-
"cx-line-clamp":
|
|
1031
|
+
"cx-line-clamp": et,
|
|
1022
1032
|
"cx-progress-bar": ae,
|
|
1023
1033
|
"cx-relative-time": Dt,
|
|
1024
1034
|
"cx-spinner": oe,
|
|
1025
1035
|
"cx-tooltip": Tt,
|
|
1026
1036
|
"cx-typography": rt
|
|
1027
1037
|
};
|
|
1028
|
-
|
|
1038
|
+
H([
|
|
1029
1039
|
d({ type: Object })
|
|
1030
1040
|
], L.prototype, "asset", 2);
|
|
1031
|
-
|
|
1041
|
+
H([
|
|
1032
1042
|
d({
|
|
1033
1043
|
attribute: "list-type",
|
|
1034
1044
|
type: String
|
|
1035
1045
|
})
|
|
1036
1046
|
], L.prototype, "listType", 2);
|
|
1037
|
-
|
|
1047
|
+
H([
|
|
1038
1048
|
d({
|
|
1039
1049
|
attribute: "favorite-in-progress-assets",
|
|
1040
1050
|
converter: {
|
|
@@ -1044,7 +1054,7 @@ V([
|
|
|
1044
1054
|
type: String
|
|
1045
1055
|
})
|
|
1046
1056
|
], L.prototype, "favoriteInProgressAssets", 2);
|
|
1047
|
-
|
|
1057
|
+
H([
|
|
1048
1058
|
d({
|
|
1049
1059
|
attribute: "pin-in-progress-assets",
|
|
1050
1060
|
converter: {
|
|
@@ -1054,21 +1064,21 @@ V([
|
|
|
1054
1064
|
type: String
|
|
1055
1065
|
})
|
|
1056
1066
|
], L.prototype, "pinInProgressAssets", 2);
|
|
1057
|
-
|
|
1067
|
+
H([
|
|
1058
1068
|
u()
|
|
1059
1069
|
], L.prototype, "thumbnailLoadError", 2);
|
|
1060
|
-
L =
|
|
1061
|
-
|
|
1070
|
+
L = H([
|
|
1071
|
+
q("cx-file-on-demand-asset")
|
|
1062
1072
|
], L);
|
|
1063
|
-
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-
|
|
1073
|
+
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-neutral-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-medium);flex-direction:column;display:flex}.settings__cache__input{gap:var(--cx-spacing-medium);flex-direction:row;display:flex}.settings__cache__size cx-input{flex:1}.settings__cache__input .size-unit{color:var(--cx-color-neutral-700)}.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}`;
|
|
1064
1074
|
var Qe = Object.defineProperty, ts = Object.getOwnPropertyDescriptor, l = (t, e, i, a) => {
|
|
1065
1075
|
for (var s = a > 1 ? void 0 : a ? ts(e, i) : e, o = t.length - 1, c; o >= 0; o--)
|
|
1066
1076
|
(c = t[o]) && (s = (a ? c(e, i, s) : c(s)) || s);
|
|
1067
1077
|
return a && s && Qe(e, i, s), s;
|
|
1068
1078
|
};
|
|
1069
|
-
let r = class extends
|
|
1079
|
+
let r = class extends W {
|
|
1070
1080
|
constructor() {
|
|
1071
|
-
super(...arguments), this.localize = new
|
|
1081
|
+
super(...arguments), this.localize = new G(this), this.connectionEstablished = !1, this.connectionStatus = "excellent", this.connectionStatusTooltip = "", this.assetIndexSyncStatus = "loading", this.userAvatarUrl = "", this.username = "", this.recentAssets = { assets: [], hasMore: !1 }, this.favoriteAssets = { assets: [], hasMore: !1 }, this.favoritesLastSync = Date.now(), this.favoriteInProgressAssets = [], this.pinInProgressAssets = [], this.uploadingAssets = { assets: [], hasMore: !1 }, this.pinnedAssets = { assets: [], hasMore: !1 }, this.availableFolderIdentifiers = [], this.isLoading = !1, this.settings = {
|
|
1072
1082
|
cacheLocation: "Default",
|
|
1073
1083
|
cacheSize: 0,
|
|
1074
1084
|
cacheUsage: 0,
|
|
@@ -1086,11 +1096,11 @@ let r = class extends H {
|
|
|
1086
1096
|
// maxDownloadRate: 0,
|
|
1087
1097
|
// maxUploadRate: 0,
|
|
1088
1098
|
}
|
|
1089
|
-
}, 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 =
|
|
1090
|
-
base:
|
|
1099
|
+
}, 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 = Z({
|
|
1100
|
+
base: Q,
|
|
1091
1101
|
decimals: 2,
|
|
1092
1102
|
inputUnit: "B",
|
|
1093
|
-
targetUnit:
|
|
1103
|
+
targetUnit: M,
|
|
1094
1104
|
value: this.settings.cacheSize ?? 0
|
|
1095
1105
|
}), 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 ({
|
|
1096
1106
|
excludes: t = [],
|
|
@@ -1141,7 +1151,7 @@ let r = class extends H {
|
|
|
1141
1151
|
}
|
|
1142
1152
|
fetchData() {
|
|
1143
1153
|
if (!this.connectionEstablished) {
|
|
1144
|
-
this.validConnectionUrl =
|
|
1154
|
+
this.validConnectionUrl = X(this.settings.config.siteUrl);
|
|
1145
1155
|
return;
|
|
1146
1156
|
}
|
|
1147
1157
|
this.folderPathsSet = /* @__PURE__ */ new Set(), this.fetchFolders({
|
|
@@ -1156,13 +1166,13 @@ let r = class extends H {
|
|
|
1156
1166
|
this.connectionEstablished && (await this.updateComplete, await this.assetsListTabGroup?.updateComplete, this.assetsListTabGroup?.show(x.RECENT));
|
|
1157
1167
|
}
|
|
1158
1168
|
updateSettingsStates() {
|
|
1159
|
-
this._activeFoldersMode = this.settings.config.rootIDs?.length > 0, this.rootIDs = this.settings.config.rootIDs ?? [], this.cacheSize =
|
|
1160
|
-
base:
|
|
1169
|
+
this._activeFoldersMode = this.settings.config.rootIDs?.length > 0, this.rootIDs = this.settings.config.rootIDs ?? [], this.cacheSize = Z({
|
|
1170
|
+
base: Q,
|
|
1161
1171
|
decimals: 2,
|
|
1162
1172
|
inputUnit: "B",
|
|
1163
|
-
targetUnit:
|
|
1173
|
+
targetUnit: M,
|
|
1164
1174
|
value: this.settings.cacheSize ?? 0
|
|
1165
|
-
}), this.cacheLocation = this.settings.cacheLocation ?? "Default", this.proxyTypes = this.settings.config.proxyTypes ?? [], this.siteUrl = this.settings.config.siteUrl ?? "", this.validConnectionUrl =
|
|
1175
|
+
}), this.cacheLocation = this.settings.cacheLocation ?? "Default", this.proxyTypes = this.settings.config.proxyTypes ?? [], this.siteUrl = this.settings.config.siteUrl ?? "", this.validConnectionUrl = X(this.settings.config.siteUrl);
|
|
1166
1176
|
}
|
|
1167
1177
|
get formHasChanges() {
|
|
1168
1178
|
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;
|
|
@@ -1170,8 +1180,8 @@ let r = class extends H {
|
|
|
1170
1180
|
connect(t = null) {
|
|
1171
1181
|
if (t?.preventDefault(), this.connectError = "", !this.siteUrl?.trim())
|
|
1172
1182
|
return;
|
|
1173
|
-
const e =
|
|
1174
|
-
if (!
|
|
1183
|
+
const e = pt(this.siteUrl);
|
|
1184
|
+
if (!X(e)) {
|
|
1175
1185
|
this.connectError = this.localize.term("pleaseEnterAValidUrl");
|
|
1176
1186
|
return;
|
|
1177
1187
|
}
|
|
@@ -1222,10 +1232,10 @@ let r = class extends H {
|
|
|
1222
1232
|
detail: {
|
|
1223
1233
|
settings: {
|
|
1224
1234
|
cacheLocation: this.cacheLocation,
|
|
1225
|
-
cacheSize:
|
|
1226
|
-
base:
|
|
1235
|
+
cacheSize: Z({
|
|
1236
|
+
base: Q,
|
|
1227
1237
|
decimals: 2,
|
|
1228
|
-
inputUnit:
|
|
1238
|
+
inputUnit: M,
|
|
1229
1239
|
targetUnit: "B",
|
|
1230
1240
|
value: this.cacheSize
|
|
1231
1241
|
}),
|
|
@@ -1273,7 +1283,7 @@ let r = class extends H {
|
|
|
1273
1283
|
if (!this.recentAssetsList)
|
|
1274
1284
|
return;
|
|
1275
1285
|
const { clientHeight: t, scrollHeight: e, scrollTop: i } = this.recentAssetsList;
|
|
1276
|
-
!this.isRecentAssetsLoading && this.recentAssets.hasMore && i + t >= e -
|
|
1286
|
+
!this.isRecentAssetsLoading && this.recentAssets.hasMore && i + t >= e - J && (this.isRecentAssetsLoading = !0, this.emit("cx-file-on-demand-load-more", {
|
|
1277
1287
|
detail: {
|
|
1278
1288
|
type: "recent"
|
|
1279
1289
|
}
|
|
@@ -1286,7 +1296,7 @@ let r = class extends H {
|
|
|
1286
1296
|
if (!this.favoritesAssetsList)
|
|
1287
1297
|
return;
|
|
1288
1298
|
const { clientHeight: t, scrollHeight: e, scrollTop: i } = this.favoritesAssetsList;
|
|
1289
|
-
!this.isFavoriteAssetsLoading && this.favoriteAssets.hasMore && i + t >= e -
|
|
1299
|
+
!this.isFavoriteAssetsLoading && this.favoriteAssets.hasMore && i + t >= e - J && (this.isFavoriteAssetsLoading = !0, this.emit("cx-file-on-demand-load-more", {
|
|
1290
1300
|
detail: {
|
|
1291
1301
|
type: "favorites"
|
|
1292
1302
|
}
|
|
@@ -1296,7 +1306,7 @@ let r = class extends H {
|
|
|
1296
1306
|
if (!this.pinnedAssetsList)
|
|
1297
1307
|
return;
|
|
1298
1308
|
const { clientHeight: t, scrollHeight: e, scrollTop: i } = this.pinnedAssetsList;
|
|
1299
|
-
!this.isPinnedAssetsLoading && this.pinnedAssets.hasMore && i + t >= e -
|
|
1309
|
+
!this.isPinnedAssetsLoading && this.pinnedAssets.hasMore && i + t >= e - J && (this.isPinnedAssetsLoading = !0, this.emit("cx-file-on-demand-load-more", {
|
|
1300
1310
|
detail: {
|
|
1301
1311
|
type: "pinned"
|
|
1302
1312
|
}
|
|
@@ -1312,7 +1322,7 @@ let r = class extends H {
|
|
|
1312
1322
|
if (!this.uploadsAssetsList)
|
|
1313
1323
|
return;
|
|
1314
1324
|
const { clientHeight: t, scrollHeight: e, scrollTop: i } = this.uploadsAssetsList;
|
|
1315
|
-
!this.isUploadingAssetsLoading && this.uploadingAssets.hasMore && i + t >= e -
|
|
1325
|
+
!this.isUploadingAssetsLoading && this.uploadingAssets.hasMore && i + t >= e - J && (this.isUploadingAssetsLoading = !0, this.emit("cx-file-on-demand-load-more", {
|
|
1316
1326
|
detail: {
|
|
1317
1327
|
type: "uploads"
|
|
1318
1328
|
}
|
|
@@ -1334,7 +1344,7 @@ let r = class extends H {
|
|
|
1334
1344
|
const t = () => {
|
|
1335
1345
|
this.openDrive();
|
|
1336
1346
|
};
|
|
1337
|
-
return n`<div class="header"><div class="header__user"><cx-avatar class="header__avatar" image=${this.userAvatarUrl} label=${this.username}></cx-avatar><div class="header__username"><cx-line-clamp lines="1" class="header__username__text"><cx-typography variant="body3">${this.username}</cx-typography></cx-line-clamp></div></div><div class="header__actions"><cx-tooltip content=${this.localize.term("search")} hoist><cx-icon-button data-testid="header__search-button" name="search" @click=${this.openSearch}></cx-icon-button></cx-tooltip><cx-tooltip content=${this.localize.term("openDrive")} hoist><cx-icon-button data-testid="header__drive-button" name="folder_open" @click=${t}></cx-icon-button></cx-tooltip><cx-tooltip content=${this.localize.term("settings")} hoist><cx-icon-button data-testid="header__settings-button" class="header__settings" name="settings" @click=${this.showSettings}>${
|
|
1347
|
+
return n`<div class="header"><div class="header__user"><cx-avatar class="header__avatar" image=${this.userAvatarUrl} label=${this.username}></cx-avatar><div class="header__username"><cx-line-clamp lines="1" class="header__username__text"><cx-typography variant="body3">${this.username}</cx-typography></cx-line-clamp></div></div><div class="header__actions"><cx-tooltip content=${this.localize.term("search")} hoist><cx-icon-button data-testid="header__search-button" name="search" @click=${this.openSearch}></cx-icon-button></cx-tooltip><cx-tooltip content=${this.localize.term("openDrive")} hoist><cx-icon-button data-testid="header__drive-button" name="folder_open" @click=${t}></cx-icon-button></cx-tooltip><cx-tooltip content=${this.localize.term("settings")} hoist><cx-icon-button data-testid="header__settings-button" class="header__settings" name="settings" @click=${this.showSettings}>${h(
|
|
1338
1348
|
this.hasNewVersion,
|
|
1339
1349
|
() => n`<cx-badge class="settings__version__badge" slot="badge" variant="danger" pill size="x-small"></cx-badge>`
|
|
1340
1350
|
)}</cx-icon-button></cx-tooltip></div></div>`;
|
|
@@ -1346,14 +1356,14 @@ let r = class extends H {
|
|
|
1346
1356
|
renderRecentAssets() {
|
|
1347
1357
|
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(
|
|
1348
1358
|
this.recentAssets.assets
|
|
1349
|
-
), a = n`<div class="recent__list" @scroll=${this.requestMoreRecentAssets}><div class=${
|
|
1359
|
+
), a = n`<div class="recent__list" @scroll=${this.requestMoreRecentAssets}><div class=${w({
|
|
1350
1360
|
empty: e.length === 0,
|
|
1351
1361
|
recent__today: !0
|
|
1352
1362
|
})} data-testid="recent__today"><div class="asset-group__label"><cx-typography variant="small">${this.localize.term("today")}</cx-typography></div>${U(
|
|
1353
1363
|
e,
|
|
1354
1364
|
(s) => s.recordId,
|
|
1355
1365
|
(s) => this.renderAsset(s, x.RECENT)
|
|
1356
|
-
)}</div><div class=${
|
|
1366
|
+
)}</div><div class=${w({
|
|
1357
1367
|
empty: i.length === 0,
|
|
1358
1368
|
recent__other: !0
|
|
1359
1369
|
})}><div class="asset-group__label"><cx-typography variant="small">${this.localize.term("allOther")}</cx-typography></div>${U(
|
|
@@ -1361,7 +1371,7 @@ let r = class extends H {
|
|
|
1361
1371
|
(s) => s.recordId,
|
|
1362
1372
|
(s) => this.renderAsset(s, x.RECENT)
|
|
1363
1373
|
)}</div></div>`;
|
|
1364
|
-
return n`<cx-tab-panel name=${x.RECENT} class="assets-list__recent-tab-panel">${
|
|
1374
|
+
return n`<cx-tab-panel name=${x.RECENT} class="assets-list__recent-tab-panel">${h(
|
|
1365
1375
|
this.recentAssets.assets.length > 0,
|
|
1366
1376
|
() => a,
|
|
1367
1377
|
() => t
|
|
@@ -1374,7 +1384,7 @@ let r = class extends H {
|
|
|
1374
1384
|
(a) => this.renderAsset(a, x.FAVORITES)
|
|
1375
1385
|
)}</div>`;
|
|
1376
1386
|
return n`<cx-tab-panel name=${x.FAVORITES} class="assets-list__favorites-tab-panel"><div class="favorites-tab-panel__content"><div class="asset-group__label favorites__sync-time"><cx-typography variant="small">${this.localize.term("favoritesSync")} -
|
|
1377
|
-
<cx-relative-time format="narrow" numeric="always" date=${new Date(this.favoritesLastSync)} sync sync-interval=${
|
|
1387
|
+
<cx-relative-time format="narrow" numeric="always" date=${new Date(this.favoritesLastSync)} sync sync-interval=${N}></cx-relative-time></cx-typography></div>${h(
|
|
1378
1388
|
e.length > 0,
|
|
1379
1389
|
() => i,
|
|
1380
1390
|
() => t
|
|
@@ -1386,17 +1396,17 @@ let r = class extends H {
|
|
|
1386
1396
|
renderUploadingAssets() {
|
|
1387
1397
|
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(
|
|
1388
1398
|
this.uploadingAssets.assets
|
|
1389
|
-
), a = n`<div class="uploads__list" @scroll=${this.requestMoreUploadingAssets}><div class=${
|
|
1399
|
+
), a = n`<div class="uploads__list" @scroll=${this.requestMoreUploadingAssets}><div class=${w({
|
|
1390
1400
|
empty: e.length === 0,
|
|
1391
1401
|
recent__today: !0
|
|
1392
|
-
})} data-testid="uploads__today"><div class="asset-group__label"><cx-typography variant="small">${this.localize.term("today")}</cx-typography>${
|
|
1402
|
+
})} data-testid="uploads__today"><div class="asset-group__label"><cx-typography variant="small">${this.localize.term("today")}</cx-typography>${h(e.length > 0, () => this.renderClearUploadButton())}</div>${U(
|
|
1393
1403
|
e,
|
|
1394
1404
|
(s) => s.recordId,
|
|
1395
1405
|
(s) => this.renderAsset(s, x.UPLOADS)
|
|
1396
|
-
)}</div><div class=${
|
|
1406
|
+
)}</div><div class=${w({
|
|
1397
1407
|
empty: i.length === 0,
|
|
1398
1408
|
uploads__other: !0
|
|
1399
|
-
})}><div class="asset-group__label"><cx-typography variant="small">${this.localize.term("allOther")}</cx-typography>${
|
|
1409
|
+
})}><div class="asset-group__label"><cx-typography variant="small">${this.localize.term("allOther")}</cx-typography>${h(
|
|
1400
1410
|
e.length === 0 && i.length > 0,
|
|
1401
1411
|
() => this.renderClearUploadButton()
|
|
1402
1412
|
)}</div>${U(
|
|
@@ -1404,7 +1414,7 @@ let r = class extends H {
|
|
|
1404
1414
|
(s) => s.recordId,
|
|
1405
1415
|
(s) => this.renderAsset(s, x.UPLOADS)
|
|
1406
1416
|
)}</div></div>`;
|
|
1407
|
-
return n`<cx-tab-panel name=${x.UPLOADS} class="assets-list__uploads-tab-panel">${
|
|
1417
|
+
return n`<cx-tab-panel name=${x.UPLOADS} class="assets-list__uploads-tab-panel">${h(
|
|
1408
1418
|
this.uploadingAssets.assets.length > 0,
|
|
1409
1419
|
() => a,
|
|
1410
1420
|
() => t
|
|
@@ -1416,7 +1426,7 @@ let r = class extends H {
|
|
|
1416
1426
|
(a) => a.recordId,
|
|
1417
1427
|
(a) => this.renderAsset(a, x.PINNED)
|
|
1418
1428
|
)}</div>`;
|
|
1419
|
-
return n`<cx-tab-panel name=${x.PINNED} class="assets-list__pinned-tab-panel"><div class="pinned-tab-panel__content">${
|
|
1429
|
+
return n`<cx-tab-panel name=${x.PINNED} class="assets-list__pinned-tab-panel"><div class="pinned-tab-panel__content">${h(
|
|
1420
1430
|
e.length > 0,
|
|
1421
1431
|
() => i,
|
|
1422
1432
|
() => t
|
|
@@ -1459,42 +1469,42 @@ let r = class extends H {
|
|
|
1459
1469
|
s?.target && s.target !== this.dialog || (this.folderTree.resetTree(), this.folderTree.rootIDs = [], this.folderTree.removedIDs = [], this.dialog.hide(), this.searchText = "");
|
|
1460
1470
|
}, i = async () => {
|
|
1461
1471
|
this.isAddingRootIDs = !0, await this.updateComplete, this.searchText = "";
|
|
1462
|
-
const s = this.rootIDs.filter((
|
|
1472
|
+
const s = this.rootIDs.filter((p) => {
|
|
1463
1473
|
if (!this.folderTree.shadowRoot?.querySelector(
|
|
1464
|
-
`[data-id="${S(
|
|
1474
|
+
`[data-id="${S(p).id}"]`
|
|
1465
1475
|
))
|
|
1466
1476
|
return !0;
|
|
1467
1477
|
}), o = /* @__PURE__ */ new Set([
|
|
1468
1478
|
...this.folderTree.currentRootIDs,
|
|
1469
1479
|
...s
|
|
1470
1480
|
]);
|
|
1471
|
-
for (const
|
|
1472
|
-
const _ = R(S(
|
|
1481
|
+
for (const p of o) {
|
|
1482
|
+
const _ = R(S(p).path), m = this.folderTree.removedIDs.filter(
|
|
1473
1483
|
(g) => R(S(g).path).startsWith(_)
|
|
1474
1484
|
);
|
|
1475
1485
|
if (m.length > 0) {
|
|
1476
1486
|
const { totalCount: g } = await this.fetchFolders({
|
|
1477
1487
|
excludes: m.map((f) => S(f).id),
|
|
1478
|
-
folderId: S(
|
|
1488
|
+
folderId: S(p).id,
|
|
1479
1489
|
start: 0
|
|
1480
1490
|
}), { data: $ } = await this.fetchFolders({
|
|
1481
1491
|
excludes: m.map((f) => S(f).id),
|
|
1482
|
-
folderId: S(
|
|
1492
|
+
folderId: S(p).id,
|
|
1483
1493
|
limit: g || 10,
|
|
1484
1494
|
start: 0
|
|
1485
1495
|
});
|
|
1486
1496
|
$.forEach((f) => {
|
|
1487
1497
|
o.add(
|
|
1488
|
-
|
|
1498
|
+
j({ id: f.id, path: f.fullPath })
|
|
1489
1499
|
);
|
|
1490
|
-
}), o.delete(
|
|
1500
|
+
}), o.delete(p);
|
|
1491
1501
|
}
|
|
1492
1502
|
}
|
|
1493
1503
|
const c = Array.from(o);
|
|
1494
1504
|
this.updateActiveFolderIdentifiers(c), this.removedIds = c.filter(
|
|
1495
|
-
(
|
|
1496
|
-
const m = S(
|
|
1497
|
-
return _ !==
|
|
1505
|
+
(p) => [...c].some((_) => {
|
|
1506
|
+
const m = S(p), g = S(_), $ = R(g.path);
|
|
1507
|
+
return _ !== p && m.path.startsWith($);
|
|
1498
1508
|
})
|
|
1499
1509
|
), e(), this.isAddingRootIDs = !1;
|
|
1500
1510
|
}, a = (s) => {
|
|
@@ -1522,7 +1532,7 @@ let r = class extends H {
|
|
|
1522
1532
|
const { id: s, path: o } = S(a), c = () => {
|
|
1523
1533
|
e(s);
|
|
1524
1534
|
};
|
|
1525
|
-
return n`<cx-tree-item data-id=${s} class=${
|
|
1535
|
+
return n`<cx-tree-item data-id=${s} class=${w({
|
|
1526
1536
|
"folder-tree__item": !0
|
|
1527
1537
|
})}><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>`;
|
|
1528
1538
|
};
|
|
@@ -1537,14 +1547,14 @@ let r = class extends H {
|
|
|
1537
1547
|
t.target.value === "custom" ? (this._activeFoldersMode = !0, this.rootIDs = this.settings.config.rootIDs ?? []) : (this._activeFoldersMode = !1, this.rootIDs = []);
|
|
1538
1548
|
}
|
|
1539
1549
|
renderGeneralSettings() {
|
|
1540
|
-
const t = n`<div class="settings-group settings__active-folder"><cx-typography variant="h5">${this.localize.term("activeFolders")}</cx-typography><cx-typography variant="body3">${this.localize.term("activeFoldersHelpText")}</cx-typography><cx-select data-testid="settings__active-folder-select" hoist input-behavior="none" value=${this._activeFoldersMode ? "custom" : "all"} @cx-change=${this.handleActiveFolderChange}><cx-option value="all">${this.localize.term("allFoldersDefault")}</cx-option><cx-option value="custom">${this.localize.term("custom")}</cx-option></cx-select>${
|
|
1550
|
+
const t = n`<div class="settings-group settings__active-folder"><cx-typography variant="h5">${this.localize.term("activeFolders")}</cx-typography><cx-typography variant="body3">${this.localize.term("activeFoldersHelpText")}</cx-typography><cx-select data-testid="settings__active-folder-select" hoist input-behavior="none" value=${this._activeFoldersMode ? "custom" : "all"} @cx-change=${this.handleActiveFolderChange}><cx-option value="all">${this.localize.term("allFoldersDefault")}</cx-option><cx-option value="custom">${this.localize.term("custom")}</cx-option></cx-select>${h(
|
|
1541
1551
|
this._activeFoldersMode,
|
|
1542
1552
|
() => n`
|
|
1543
1553
|
${this.renderRootFolderTree()} ${this.renderSelectFoldersPopup()}
|
|
1544
1554
|
`
|
|
1545
1555
|
)}</div>`;
|
|
1546
1556
|
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")}
|
|
1547
|
-
${xt(this.settings.config.version ?? "")}</cx-typography></cx-line-clamp></div>${
|
|
1557
|
+
${xt(this.settings.config.version ?? "")}</cx-typography></cx-line-clamp></div>${h(
|
|
1548
1558
|
this.hasNewVersion,
|
|
1549
1559
|
() => 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(
|
|
1550
1560
|
"newVersionAvailable",
|
|
@@ -1573,6 +1583,15 @@ let r = class extends H {
|
|
|
1573
1583
|
}
|
|
1574
1584
|
this.cacheSize = Number(e.value);
|
|
1575
1585
|
}
|
|
1586
|
+
formatCacheUsage() {
|
|
1587
|
+
return Z({
|
|
1588
|
+
base: Q,
|
|
1589
|
+
decimals: 2,
|
|
1590
|
+
inputUnit: "B",
|
|
1591
|
+
targetUnit: M,
|
|
1592
|
+
value: this.settings.cacheUsage ?? 0
|
|
1593
|
+
});
|
|
1594
|
+
}
|
|
1576
1595
|
async handleCacheLocationClick() {
|
|
1577
1596
|
const t = await this.pickCacheLocation();
|
|
1578
1597
|
this.cacheLocation = t;
|
|
@@ -1584,7 +1603,7 @@ let r = class extends H {
|
|
|
1584
1603
|
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>`;
|
|
1585
1604
|
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(
|
|
1586
1605
|
"itCanTakeAFewMinutesForThisSettingToTakeEffect"
|
|
1587
|
-
)}</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("
|
|
1606
|
+
)}</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("cacheSizeDescription")}</cx-typography><div class="settings__cache__input"><cx-input data-testid="settings__cache__used__input" disabled=disabled label=${this.localize.term("used")} type="number" no-spin-buttons step="any" value=${this.formatCacheUsage()}><cx-typography class="size-unit" slot="suffix" variant="body2">${M}</cx-typography></cx-input><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 class="size-unit" slot="suffix" variant="body2">${M}</cx-typography></cx-input></div></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>`;
|
|
1588
1607
|
}
|
|
1589
1608
|
renderSettingsView() {
|
|
1590
1609
|
const t = () => {
|
|
@@ -1614,33 +1633,33 @@ let r = class extends H {
|
|
|
1614
1633
|
case "error":
|
|
1615
1634
|
return n`<cx-icon variant="filled" name="error"></cx-icon>`;
|
|
1616
1635
|
}
|
|
1617
|
-
}, a = n`<div class=${
|
|
1636
|
+
}, a = n`<div class=${w({
|
|
1618
1637
|
"connection-status": !0,
|
|
1619
1638
|
"connection-status--bad": this.connectionStatus === "bad",
|
|
1620
1639
|
"connection-status--excellent": this.connectionStatus === "excellent",
|
|
1621
1640
|
"connection-status--good": this.connectionStatus === "good"
|
|
1622
1641
|
})}><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;
|
|
1623
|
-
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=${
|
|
1642
|
+
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=${w({
|
|
1624
1643
|
"asset-index-sync-status": !0,
|
|
1625
1644
|
"asset-index-sync-status--error": this.assetIndexSyncStatus === "error",
|
|
1626
1645
|
"asset-index-sync-status--loaded": this.assetIndexSyncStatus === "loaded",
|
|
1627
1646
|
"asset-index-sync-status--loading": this.assetIndexSyncStatus === "loading"
|
|
1628
|
-
})}><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
|
|
1647
|
+
})}><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>
|
|
1629
1648
|
/
|
|
1630
|
-
<cx-format-bytes
|
|
1649
|
+
<cx-format-bytes value=${this.settings.cacheSize}></cx-format-bytes></cx-typography></cx-line-clamp></cx-space></cx-tooltip></div>${h(this.assetIndexSyncStatus === "error", () => t)}</div>`;
|
|
1631
1650
|
}
|
|
1632
1651
|
handleConnectionURLInput(t) {
|
|
1633
1652
|
this.validConnectionUrl = !0, this.siteUrl = t.target.value.trim();
|
|
1634
|
-
const e =
|
|
1635
|
-
|
|
1653
|
+
const e = pt(this.siteUrl);
|
|
1654
|
+
X(e) || (this.validConnectionUrl = !1);
|
|
1636
1655
|
}
|
|
1637
1656
|
renderWelcomeView() {
|
|
1638
|
-
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=${
|
|
1657
|
+
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=${w({
|
|
1639
1658
|
"welcome__connect-button": !0,
|
|
1640
1659
|
"welcome__connect-button--disabled": !this.siteUrl.trim() || !this.validConnectionUrl
|
|
1641
|
-
})} ?disabled=${!this.siteUrl.trim() || !this.validConnectionUrl}>${this.localize.term("connect")}</cx-button></cx-tooltip><cx-button type="button" ?loading=${this.isCancellingConnection} variant="text" class=${
|
|
1660
|
+
})} ?disabled=${!this.siteUrl.trim() || !this.validConnectionUrl}>${this.localize.term("connect")}</cx-button></cx-tooltip><cx-button type="button" ?loading=${this.isCancellingConnection} variant="text" class=${w({
|
|
1642
1661
|
"welcome__cancel-connection-button": !0
|
|
1643
|
-
})} ?disabled=${!this.isConnecting} @click=${this.cancelConnection}>${this.localize.term("cancel")}</cx-button><cx-typography class="error-message" variant="body3">${
|
|
1662
|
+
})} ?disabled=${!this.isConnecting} @click=${this.cancelConnection}>${this.localize.term("cancel")}</cx-button><cx-typography class="error-message" variant="body3">${h(
|
|
1644
1663
|
this.connectError,
|
|
1645
1664
|
() => this.connectError,
|
|
1646
1665
|
() => " "
|
|
@@ -1653,12 +1672,12 @@ let r = class extends H {
|
|
|
1653
1672
|
return n`<div class="loading-overlay"><cx-spinner></cx-spinner></div>`;
|
|
1654
1673
|
}
|
|
1655
1674
|
render() {
|
|
1656
|
-
return n`<div class=${
|
|
1675
|
+
return n`<div class=${w({
|
|
1657
1676
|
container: !0,
|
|
1658
1677
|
"container--connected": this.connectionEstablished,
|
|
1659
1678
|
"container--user-interaction-blocked": this.userInteractionBlocked
|
|
1660
1679
|
})}>${this.renderView()}
|
|
1661
|
-
${
|
|
1680
|
+
${h(this.userInteractionBlocked, () => this.renderLoadingOverlay())}</div>`;
|
|
1662
1681
|
}
|
|
1663
1682
|
// #endregion
|
|
1664
1683
|
};
|
|
@@ -1672,10 +1691,10 @@ r.dependencies = {
|
|
|
1672
1691
|
"cx-file-on-demand-asset": L,
|
|
1673
1692
|
"cx-folder-tree": b,
|
|
1674
1693
|
"cx-format-bytes": nt,
|
|
1675
|
-
"cx-icon":
|
|
1694
|
+
"cx-icon": tt,
|
|
1676
1695
|
"cx-icon-button": At,
|
|
1677
1696
|
"cx-input": qt,
|
|
1678
|
-
"cx-line-clamp":
|
|
1697
|
+
"cx-line-clamp": et,
|
|
1679
1698
|
"cx-option": Gt,
|
|
1680
1699
|
"cx-relative-time": Dt,
|
|
1681
1700
|
"cx-select": Yt,
|
|
@@ -1951,7 +1970,7 @@ l([
|
|
|
1951
1970
|
P("cacheLocation")
|
|
1952
1971
|
], r.prototype, "handleCacheLocationChange", 1);
|
|
1953
1972
|
r = l([
|
|
1954
|
-
|
|
1973
|
+
q("cx-file-on-demand")
|
|
1955
1974
|
], r);
|
|
1956
1975
|
export {
|
|
1957
1976
|
r as C,
|