@orangelogic/design-system 2.60.0 → 2.61.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/apps/cortex/src/types.d.ts +2 -0
- package/library/chunks/_baseRest.ClTMQtN1.js +67 -0
- package/library/chunks/{_baseUniq.BUihBa8c.js → _baseUniq.Df-fLIBx.js} +53 -56
- package/library/chunks/{amazon_s3.DeaMdPPn.js → amazon_s3.BEMtqafk.js} +1 -1
- package/library/chunks/animate.El-MpOws.js +37 -0
- package/library/chunks/animation-registry.HmpwNuGH.js +34 -0
- package/library/chunks/{animation.B7d72NVK.js → animation.DfUHRQry.js} +10 -8
- package/library/chunks/array.DCtvHiLS.js +81 -0
- package/library/chunks/asset.CG_yXtWK.js +288 -0
- package/library/chunks/{browser.Va59Ix3P.js → browser.BHOCIF_A.js} +18 -16
- package/library/chunks/{button.CtCSNRB3.js → button.P71VJ5xh.js} +75 -74
- package/library/chunks/{button.styles.C8AIO8fd.js → button.styles.Dl5IQLHU.js} +1 -1
- package/library/chunks/{capitalize.CNStXZBq.js → capitalize.WSkCXkNE.js} +1 -1
- package/library/chunks/{chatbot.sm4Rph1v.js → chatbot.BmpIu59L.js} +2 -2
- package/library/chunks/{class-map.CoZTSvbM.js → class-map.BiVq-cVR.js} +1 -1
- package/library/chunks/{color-swatch-group.qJevXs50.js → color-swatch-group.DlLmydlB.js} +116 -127
- package/library/chunks/color-swatch.Bpb_hW2H.js +407 -0
- package/library/chunks/color.vLD2sNTs.js +164 -0
- package/library/chunks/{component.styles.CI-v8BZa.js → component.styles.DMSLciL5.js} +1 -1
- package/library/chunks/{confirm-popover.D2TF1x6K.js → confirm-popover.C1uA36JR.js} +15 -13
- package/library/chunks/{content-builder.WranV3P4.js → content-builder.Bf7kqzDI.js} +1 -1
- package/library/chunks/converters.DkDtLstb.js +11 -0
- package/library/chunks/{cropper.aA0v16xS.js → cropper.BraEEykE.js} +5004 -5024
- package/library/chunks/custom-element.L4WJXn1j.js +14 -0
- package/library/chunks/debounce.DaHuiSGU.js +15 -0
- package/library/chunks/{default-value.CIKAvD5l.js → default-value.COZopaet.js} +1 -1
- package/library/chunks/{dialog.B1TORO6S.js → dialog.C_75RVVz.js} +52 -49
- package/library/chunks/{directive-helpers.DBHob-_L.js → directive-helpers.Dm4rc594.js} +1 -1
- package/library/chunks/dom.CZrJ64Dm.js +92 -0
- package/library/chunks/{dot-pagination.8f2oX_ge.js → dot-pagination.CoCIJsHC.js} +24 -22
- package/library/chunks/{endpoints.BgyupJys.js → endpoints.B7lcoc1N.js} +1 -3
- package/library/chunks/{file-on-demand.Cwgabdyw.js → file-on-demand.B2jNilAj.js} +1829 -1544
- package/library/chunks/{folder-select.DiWCwR-T.js → folder-select.CSEQxIXF.js} +380 -255
- package/library/chunks/{form-control.styles.NE2Q-quE.js → form-control.styles.CUGhvlfT.js} +1 -1
- package/library/chunks/{form.B8u0ywni.js → form.CO12-VK0.js} +1 -1
- package/library/chunks/{guard.BDP4A85K.js → guard.D4axKaMo.js} +1 -1
- package/library/chunks/{header.B_FD8uLt.js → header.Bd3G0-oA.js} +11 -9
- package/library/chunks/{hub-connection.CxfaT11o.js → hub-connection.BxT2b7Nq.js} +4 -3
- package/library/chunks/{i18n.BP2FRO1v.js → i18n.DrzK7TPf.js} +54 -7
- package/library/chunks/identity.ByMq8VxU.js +6 -0
- package/library/chunks/{if-defined.MfEgpxEN.js → if-defined.BRoBj_Rp.js} +1 -1
- package/library/chunks/{iframe.DZm7FiCl.js → iframe.UCj6Ze2A.js} +18 -16
- package/library/chunks/{image.Ycf8RudS.js → image.DZCRhE3G.js} +82 -79
- package/library/chunks/image.mbpyiQpQ.js +82 -0
- package/library/chunks/index.S0wy3rzm.js +373 -0
- package/library/chunks/isObjectLike.D3cpZO39.js +81 -0
- package/library/chunks/{isSymbol.L0C2ND_U.js → isSymbol.huJ_Cvxt.js} +1 -1
- package/library/chunks/lib-cortex-element.CVMmyPMC.js +146 -0
- package/library/chunks/{list-editor.COkw5JKG.js → list-editor.CrLntuM7.js} +75 -79
- package/library/chunks/{custom-element.vnXBMQxc.js → lit-element.jLBm65_O.js} +123 -277
- package/library/chunks/{live.LdB9xEhp.js → live.SCz6M8Gs.js} +2 -2
- package/library/chunks/{mailchimp.BjbPJfd-.js → mailchimp.Bs6uJVsf.js} +1 -1
- package/library/chunks/{modal.BqNLxgs1.js → modal.U1QltQKe.js} +25 -19
- package/library/chunks/{option.D9KJhzHs.js → option.D1u5-cTt.js} +21 -19
- package/library/chunks/{orangelogic.BgbQXkBv.js → orangelogic.TdFfoPUN.js} +1 -1
- package/library/chunks/{overlayscrollbars.aFuRG5Rs.js → overlayscrollbars.XhGWx9Zk.js} +1 -1
- package/library/chunks/{pagination.C2FN4fmO.js → pagination.BI3LONVU.js} +17 -15
- package/library/chunks/{ref.BaCjlzLO.js → ref.bzeTdX0K.js} +2 -2
- package/library/chunks/{repeat.CauKaXyy.js → repeat.DbF2p5ae.js} +2 -2
- package/library/chunks/responsive.CA6dcNiM.js +17 -0
- package/library/chunks/{scroll.DwPiX2Ox.js → scroll.xtO5yojm.js} +3 -2
- package/library/chunks/{slot.DJLm4Dig.js → slot.j5oheLJC.js} +12 -4
- package/library/chunks/{state.Cw55xXlb.js → state.CSDxrqLd.js} +1 -1
- package/library/chunks/{static.BjNkqt7_.js → static.UA3G1Deq.js} +1 -1
- package/library/chunks/string.Cp_XNbnV.js +160 -0
- package/library/chunks/{style-map.CZovMmo_.js → style-map.llVFPd__.js} +1 -1
- package/library/chunks/{tab-group.5fLnWflv.js → tab-group.DxSlcWK0.js} +20 -18
- package/library/chunks/{table.BAr8KKc6.js → table.CY-iMTWV.js} +457 -505
- package/library/chunks/template.CsJd8Pb_.js +20 -0
- package/library/chunks/time.D_uFZqqe.js +118 -0
- package/library/chunks/{toString.CL_lYXbK.js → toString.CRT5zqEU.js} +3 -3
- package/library/chunks/toast.BXNbwZV8.js +25 -0
- package/library/chunks/{tree.CUfvIDyA.js → tree.CNbrP8cY.js} +33 -36
- package/library/chunks/{typography.BFpl0WMA.js → typography.oDzoLbZS.js} +16 -14
- package/library/chunks/{unsafe-html.DyO9_Rsq.js → unsafe-html.Dff7-rCx.js} +1 -1
- package/library/chunks/url.LjsR2sB5.js +15 -0
- package/library/chunks/user-agent.D9aPuOyL.js +4 -0
- package/library/chunks/watch.q1sEjPWL.js +501 -0
- package/library/components/alert.js +38 -35
- package/library/components/animated-image.js +25 -23
- package/library/components/animation.js +7 -5
- package/library/components/array-line-clamp.d.ts +3 -0
- package/library/components/array-line-clamp.js +195 -0
- package/library/components/asset-link-format.js +223 -212
- package/library/components/atoms.js +164 -162
- package/library/components/avatar.js +28 -26
- package/library/components/badge.js +10 -8
- package/library/components/bicolor-picker.js +21 -19
- package/library/components/border-input-group.js +11 -9
- package/library/components/breadcrumb-item.js +14 -12
- package/library/components/breadcrumb.js +24 -22
- package/library/components/button-group.js +26 -24
- package/library/components/button.js +14 -13
- package/library/components/card.js +28 -19
- package/library/components/checkbox.js +29 -23
- package/library/components/color-picker.js +19 -17
- package/library/components/color-swatch-group.js +20 -17
- package/library/components/color-swatch.js +16 -13
- package/library/components/confirm-popover.js +11 -9
- package/library/components/copy-button.js +15 -13
- package/library/components/corner-position-input-group.js +13 -11
- package/library/components/cortex-element.d.ts +3 -0
- package/library/components/cortex-element.js +5 -0
- package/library/components/cropper.js +7 -5
- package/library/components/details.js +23 -20
- package/library/components/dialog.js +19 -16
- package/library/components/divider.js +13 -11
- package/library/components/dot-pagination.js +11 -9
- package/library/components/dot-status.js +10 -8
- package/library/components/drawer.js +63 -51
- package/library/components/dropdown.js +29 -26
- package/library/components/dynamic-select.js +12 -10
- package/library/components/element-clamp.js +28 -25
- package/library/components/file-on-demand.js +21 -20
- package/library/components/folder-select.js +12 -10
- package/library/components/format-bytes.js +11 -10
- package/library/components/format-date.js +11 -9
- package/library/components/format-number.js +16 -15
- package/library/components/format-time.js +118 -9
- package/library/components/grid-item.js +48 -46
- package/library/components/grid.js +31 -29
- package/library/components/header.js +10 -9
- package/library/components/hub-connection.js +6 -5
- package/library/components/icon-button.js +20 -18
- package/library/components/icon.js +17 -15
- package/library/components/iframe.js +10 -8
- package/library/components/image-comparer.js +27 -25
- package/library/components/image.js +14 -11
- package/library/components/include.js +26 -24
- package/library/components/input-group.js +15 -13
- package/library/components/input.js +23 -21
- package/library/components/line-clamp.js +12 -10
- package/library/components/list-editor.js +17 -15
- package/library/components/markdown.js +80 -78
- package/library/components/masonry.js +46 -44
- package/library/components/menu-item.js +151 -136
- package/library/components/menu-label.js +15 -13
- package/library/components/menu-section.js +18 -16
- package/library/components/menu.js +10 -8
- package/library/components/molecules.js +5 -5
- package/library/components/mutation-observer.js +12 -10
- package/library/components/option.js +10 -8
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +30 -28
- package/library/components/pagination.js +14 -12
- package/library/components/popup.js +3296 -9
- package/library/components/position-picker.js +12 -10
- package/library/components/progress-bar.js +13 -11
- package/library/components/progress-ring.js +15 -13
- package/library/components/qr-code.js +54 -52
- package/library/components/radio-button.js +19 -17
- package/library/components/radio-card.js +14 -12
- package/library/components/radio-group.js +20 -18
- package/library/components/radio.js +15 -13
- package/library/components/range.js +25 -23
- package/library/components/rating.js +17 -15
- package/library/components/relative-time.js +16 -14
- package/library/components/resize-observer.js +21 -19
- package/library/components/select.js +1442 -25
- package/library/components/shadow-input-group.js +19 -17
- package/library/components/share-option-list.js +20 -18
- package/library/components/sidebar.js +14 -12
- package/library/components/size-input-group.js +35 -33
- package/library/components/skeleton.js +12 -10
- package/library/components/space.js +12 -10
- package/library/components/spinner.js +17 -15
- package/library/components/split-panel.js +15 -13
- package/library/components/step.js +18 -16
- package/library/components/stepper-wizard.js +11 -9
- package/library/components/stepper.js +13 -11
- package/library/components/switch.js +21 -19
- package/library/components/tab-group.js +15 -13
- package/library/components/tab-panel.js +20 -18
- package/library/components/tab.js +18 -16
- package/library/components/table.js +69 -67
- package/library/components/tag.js +11 -9
- package/library/components/textarea.js +20 -18
- package/library/components/timecode.js +98 -8
- package/library/components/tooltip.js +24 -21
- package/library/components/tree-item.js +14 -11
- package/library/components/tree.js +12 -10
- package/library/components/typeface.js +13 -11
- package/library/components/types.js +15487 -15444
- package/library/components/typography.js +6 -4
- package/library/components/video.js +13 -11
- package/library/components/visually-hidden.js +15 -13
- package/library/events.d.ts +1 -0
- package/library/events.js +1 -0
- package/library/package.json +11 -2
- package/library/packages/atoms/src/components/array-line-clamp/array-line-clamp.d.ts +45 -0
- package/library/packages/atoms/src/components/array-line-clamp/array-line-clamp.styles.d.ts +2 -0
- package/library/packages/atoms/src/components/checkbox/checkbox.d.ts +2 -0
- package/library/packages/atoms/src/components/drawer/drawer.d.ts +7 -1
- package/library/packages/atoms/src/components/include/include.d.ts +1 -0
- package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +2 -0
- package/library/packages/atoms/src/components/tree/tree.d.ts +0 -4
- package/library/packages/atoms/src/index.d.ts +1 -0
- package/library/packages/events/src/cx-file-on-demand-load-more.d.ts +8 -0
- package/library/packages/events/src/cx-file-on-demand-pin.d.ts +8 -0
- package/library/packages/events/src/cx-file-on-demand-unpin.d.ts +8 -0
- package/library/packages/events/src/cx-folder-select-search-term-change.d.ts +8 -0
- package/library/packages/events/src/cx-share-option-list-item-selected.d.ts +8 -0
- package/library/packages/events/src/events.d.ts +6 -2
- package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +2 -0
- package/library/packages/molecules/src/cropper/cropper.d.ts +1 -0
- package/library/packages/molecules/src/cropper/react/Cropper.d.ts +1 -0
- package/library/packages/molecules/src/download-format-picker/download-format-picker.d.ts +1 -0
- package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +8 -0
- package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +1 -0
- package/library/packages/molecules/src/folder-select/folder-select.d.ts +6 -1
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +3 -7
- package/library/packages/organisms/src/content-builder/styleController.d.ts +8 -8
- package/library/packages/organisms/src/file-on-demand/components/file-on-demand-asset/file-on-demand-asset.d.ts +80 -0
- package/library/packages/organisms/src/file-on-demand/components/file-on-demand-asset/file-on-demand-asset.styles.d.ts +2 -0
- package/library/packages/organisms/src/file-on-demand/components/file-on-demand-pinned-status.ts/file-on-demand-pinned-status.d.ts +44 -0
- package/library/packages/organisms/src/file-on-demand/file-on-demand.constants.d.ts +1 -0
- package/library/packages/organisms/src/file-on-demand/file-on-demand.d.ts +11 -18
- package/library/packages/organisms/src/file-on-demand/file-on-demand.utils.d.ts +6 -0
- package/library/packages/services/src/api/folder/folder.d.ts +4 -8
- package/library/packages/services/src/api/folder/folder.types.d.ts +2 -1
- package/library/packages/types/src/file-on-demand.d.ts +4 -0
- package/library/packages/types/src/folder-select.d.ts +9 -2
- package/library/packages/utils/src/custom-element/i18n.d.ts +40 -2
- package/library/packages/utils/src/drag-scroll/drag-scroll.d.ts +22 -0
- package/library/packages/utils/src/drag-scroll/index.d.ts +1 -0
- package/library/packages/utils/src/font/font.d.ts +26 -0
- package/library/packages/utils/src/font/index.d.ts +1 -0
- package/library/packages/utils/src/history-manager/history-manager.d.ts +13 -0
- package/library/packages/utils/src/history-manager/index.d.ts +1 -0
- package/library/packages/utils/src/index.d.ts +45 -0
- package/library/packages/utils/src/template/index.d.ts +1 -0
- package/library/packages/utils/src/template/template.d.ts +3 -0
- package/library/react-web-component.d.ts +418 -360
- package/library/utils.d.ts +1 -0
- package/library/utils.js +180 -0
- package/package.json +11 -2
- package/library/chunks/animation-registry.DavRkTTr.js +0 -69
- package/library/chunks/asset.Ba-CxnNM.js +0 -309
- package/library/chunks/color-swatch.DUe3iLLo.js +0 -558
- package/library/chunks/dom.C0OFx7ND.js +0 -78
- package/library/chunks/format-time.BW6-ZWCX.js +0 -226
- package/library/chunks/isObjectLike.z36Fu426.js +0 -34
- package/library/chunks/popup._w5T7x8f.js +0 -3307
- package/library/chunks/select.DfO4de04.js +0 -1441
- package/library/chunks/string.BCk3SmdZ.js +0 -144
- package/library/chunks/timecode.D7XTiQ_3.js +0 -105
- package/library/chunks/watch.BCJD77bD.js +0 -547
- package/library/packages/events/src/cx-load-more.d.ts +0 -8
|
@@ -1,98 +1,105 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { C as
|
|
4
|
-
import { n as
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import Gt from "
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import { C as
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import { a as
|
|
37
|
-
import {
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
import J from "../components/icon.js";
|
|
2
|
+
import Q from "../components/line-clamp.js";
|
|
3
|
+
import { C as ft, s as vt, a as yt, b as lt } from "./tree.CNbrP8cY.js";
|
|
4
|
+
import { n as d, C as H } from "./lib-cortex-element.CVMmyPMC.js";
|
|
5
|
+
import { c as tt } from "./component.styles.DMSLciL5.js";
|
|
6
|
+
import { c as W } from "./custom-element.L4WJXn1j.js";
|
|
7
|
+
import { L as q } from "./i18n.DrzK7TPf.js";
|
|
8
|
+
import { k as Dt, a as bt, i as $t, w as P, S as Tt, b as Pt, c as zt, d as Et, e as Ft, f as Lt } from "./watch.q1sEjPWL.js";
|
|
9
|
+
import { p as R } from "./string.Cp_XNbnV.js";
|
|
10
|
+
import { x as n, i as at, E as Ut } from "./lit-element.jLBm65_O.js";
|
|
11
|
+
import { r as u } from "./state.CSDxrqLd.js";
|
|
12
|
+
import { e as z } from "./query.BBf1UFkC.js";
|
|
13
|
+
import { e as A } from "./class-map.BiVq-cVR.js";
|
|
14
|
+
import { c as U } from "./repeat.DbF2p5ae.js";
|
|
15
|
+
import { n as p } from "./when.Dr1es41R.js";
|
|
16
|
+
import { a as Rt, c as kt, b as dt } from "./_baseUniq.Df-fLIBx.js";
|
|
17
|
+
import Ot from "../components/avatar.js";
|
|
18
|
+
import { C as Nt } from "./button.P71VJ5xh.js";
|
|
19
|
+
import { C as jt } from "./dialog.C_75RVVz.js";
|
|
20
|
+
import Bt from "../components/divider.js";
|
|
21
|
+
import ot from "../components/format-bytes.js";
|
|
22
|
+
import St from "../components/icon-button.js";
|
|
23
|
+
import Mt from "../components/input.js";
|
|
24
|
+
import { C as Vt } from "./option.D1u5-cTt.js";
|
|
25
|
+
import It from "../components/relative-time.js";
|
|
26
|
+
import Ht from "../components/select.js";
|
|
27
|
+
import Wt from "../components/space.js";
|
|
28
|
+
import qt from "../components/tab.js";
|
|
29
|
+
import { C as Gt } from "./tab-group.DxSlcWK0.js";
|
|
30
|
+
import Yt from "../components/tab-panel.js";
|
|
31
|
+
import wt from "../components/tooltip.js";
|
|
32
|
+
import { C as nt } from "./typography.oDzoLbZS.js";
|
|
33
|
+
import { C as Kt } from "./confirm-popover.C1uA36JR.js";
|
|
34
|
+
import { d as Xt } from "./debounce.DaHuiSGU.js";
|
|
35
|
+
import { a as et } from "./number.CjNxU7Xs.js";
|
|
36
|
+
import { i as K, a as ht } from "./url.LjsR2sB5.js";
|
|
37
|
+
import { b as Zt } from "./_baseRest.ClTMQtN1.js";
|
|
38
|
+
import { a as Jt } from "./toString.CRT5zqEU.js";
|
|
39
|
+
import { S as pt, i as Qt } from "./isObjectLike.D3cpZO39.js";
|
|
40
|
+
import te from "../components/progress-bar.js";
|
|
41
|
+
import ee from "../components/spinner.js";
|
|
42
|
+
import { o as se } from "./style-map.llVFPd__.js";
|
|
43
|
+
import { r as ie } from "./choose.BTbF6BAn.js";
|
|
44
|
+
function ae(t, e, i, a) {
|
|
45
|
+
for (var s = -1, o = t == null ? 0 : t.length; ++s < o; ) {
|
|
40
46
|
var l = t[s];
|
|
41
|
-
e(
|
|
47
|
+
e(a, l, i(l), t);
|
|
42
48
|
}
|
|
43
|
-
return
|
|
49
|
+
return a;
|
|
44
50
|
}
|
|
45
|
-
function
|
|
46
|
-
return function(e, i,
|
|
47
|
-
for (var s = -1,
|
|
48
|
-
var
|
|
49
|
-
if (i(
|
|
51
|
+
function oe(t) {
|
|
52
|
+
return function(e, i, a) {
|
|
53
|
+
for (var s = -1, o = Object(e), l = a(e), h = l.length; h--; ) {
|
|
54
|
+
var _ = l[++s];
|
|
55
|
+
if (i(o[_], _, o) === !1)
|
|
50
56
|
break;
|
|
51
57
|
}
|
|
52
58
|
return e;
|
|
53
59
|
};
|
|
54
60
|
}
|
|
55
|
-
var
|
|
56
|
-
function
|
|
57
|
-
return t &&
|
|
61
|
+
var ne = oe();
|
|
62
|
+
function re(t, e) {
|
|
63
|
+
return t && ne(t, e, Dt);
|
|
58
64
|
}
|
|
59
|
-
function
|
|
60
|
-
return function(i,
|
|
65
|
+
function ce(t, e) {
|
|
66
|
+
return function(i, a) {
|
|
61
67
|
if (i == null)
|
|
62
68
|
return i;
|
|
63
|
-
if (!
|
|
64
|
-
return t(i,
|
|
65
|
-
for (var s = i.length,
|
|
69
|
+
if (!bt(i))
|
|
70
|
+
return t(i, a);
|
|
71
|
+
for (var s = i.length, o = -1, l = Object(i); ++o < s && a(l[o], o, l) !== !1; )
|
|
66
72
|
;
|
|
67
73
|
return i;
|
|
68
74
|
};
|
|
69
75
|
}
|
|
70
|
-
var
|
|
71
|
-
function
|
|
72
|
-
return
|
|
73
|
-
e(
|
|
74
|
-
}),
|
|
76
|
+
var le = ce(re);
|
|
77
|
+
function de(t, e, i, a) {
|
|
78
|
+
return le(t, function(s, o, l) {
|
|
79
|
+
e(a, s, i(s), l);
|
|
80
|
+
}), a;
|
|
75
81
|
}
|
|
76
|
-
function
|
|
77
|
-
return function(i,
|
|
78
|
-
var s =
|
|
79
|
-
return s(i, t,
|
|
82
|
+
function he(t, e) {
|
|
83
|
+
return function(i, a) {
|
|
84
|
+
var s = $t(i) ? ae : de, o = e ? e() : {};
|
|
85
|
+
return s(i, t, Rt(a), o);
|
|
80
86
|
};
|
|
81
87
|
}
|
|
82
|
-
var
|
|
88
|
+
var pe = he(function(t, e, i) {
|
|
83
89
|
t[i ? 0 : 1].push(e);
|
|
84
90
|
}, function() {
|
|
85
91
|
return [[], []];
|
|
86
92
|
});
|
|
87
|
-
const
|
|
93
|
+
const ue = {
|
|
88
94
|
error: "Upload error",
|
|
89
95
|
loaded: "Up-to-date",
|
|
90
96
|
loading: "Syncing"
|
|
91
|
-
},
|
|
97
|
+
}, x = {
|
|
92
98
|
FAVORITES: "favorites",
|
|
99
|
+
PINNED: "pinned",
|
|
93
100
|
RECENT: "recent",
|
|
94
101
|
UPLOADS: "uploads"
|
|
95
|
-
},
|
|
102
|
+
}, X = 20, ge = {
|
|
96
103
|
GET_CONTENT: "/webapi/extensibility/integrations/contentBrowserSDK/getcontent_4bw_v1"
|
|
97
104
|
}, C = {
|
|
98
105
|
ASSET_PATH: "Document.AssetPath",
|
|
@@ -102,53 +109,53 @@ const le = {
|
|
|
102
109
|
HAS_BROWSER_CHILDREN: "Document.HasBrowserChildren",
|
|
103
110
|
PARENT_FOLDER_IDENTIFIER: "Document.ParentRecordID",
|
|
104
111
|
TITLE_WITH_FALLBACK: "CoreField.TitleWithFallback"
|
|
105
|
-
},
|
|
112
|
+
}, Z = "GB", O = 6e4, xe = ["album", "story", "project", "merchandise"], ut = (t) => {
|
|
106
113
|
const e = /* @__PURE__ */ new Date(), i = new Date(
|
|
107
114
|
e.getFullYear(),
|
|
108
115
|
e.getMonth(),
|
|
109
116
|
e.getDate()
|
|
110
|
-
).getTime(),
|
|
117
|
+
).getTime(), a = new Date(
|
|
111
118
|
e.getFullYear(),
|
|
112
119
|
e.getMonth(),
|
|
113
120
|
e.getDate() + 1
|
|
114
121
|
).getTime();
|
|
115
|
-
return
|
|
116
|
-
t.toSorted((s,
|
|
117
|
-
(s) => s.uploadTimestamp >= i && s.uploadTimestamp <
|
|
122
|
+
return pe(
|
|
123
|
+
t.toSorted((s, o) => o.uploadTimestamp - s.uploadTimestamp),
|
|
124
|
+
(s) => s.uploadTimestamp >= i && s.uploadTimestamp < a
|
|
118
125
|
);
|
|
119
|
-
},
|
|
126
|
+
}, me = ({
|
|
120
127
|
excludesRecordIDs: t,
|
|
121
128
|
searchText: e
|
|
122
129
|
}) => {
|
|
123
130
|
let i = "";
|
|
124
131
|
e?.trim() && (i = `Story_Title:${e}`);
|
|
125
|
-
let
|
|
126
|
-
t?.length && (
|
|
132
|
+
let a = "";
|
|
133
|
+
t?.length && (a = t.map((o) => `RecordID:NOT ${o}`).join(" AND "));
|
|
127
134
|
let s = i ? ` AND (${[i].filter(Boolean).join(" OR ")})` : "";
|
|
128
|
-
return
|
|
129
|
-
},
|
|
135
|
+
return a && (s = `${s} AND (${a})`), `(MediaType:Story OR MediaType:Album)${s}`;
|
|
136
|
+
}, _e = 10, Ct = async ({
|
|
130
137
|
excludes: t = [],
|
|
131
138
|
folderId: e,
|
|
132
139
|
folderPath: i = [],
|
|
133
|
-
folderPathsSet:
|
|
134
|
-
limit: s =
|
|
135
|
-
searchText:
|
|
140
|
+
folderPathsSet: a,
|
|
141
|
+
limit: s = _e,
|
|
142
|
+
searchText: o,
|
|
136
143
|
seeThru: l,
|
|
137
|
-
siteUrl:
|
|
138
|
-
start:
|
|
139
|
-
token:
|
|
144
|
+
siteUrl: h,
|
|
145
|
+
start: _ = 0,
|
|
146
|
+
token: m
|
|
140
147
|
}) => {
|
|
141
|
-
if (!
|
|
148
|
+
if (!h)
|
|
142
149
|
return { data: [], totalCount: 0 };
|
|
143
|
-
let
|
|
144
|
-
|
|
145
|
-
const
|
|
146
|
-
["Token",
|
|
150
|
+
let g = h;
|
|
151
|
+
g.endsWith("/") && (g = g.slice(0, -1));
|
|
152
|
+
const b = ge.GET_CONTENT, f = [
|
|
153
|
+
["Token", m],
|
|
147
154
|
[
|
|
148
155
|
"extraFilters",
|
|
149
|
-
|
|
156
|
+
me({
|
|
150
157
|
excludesRecordIDs: t,
|
|
151
|
-
searchText:
|
|
158
|
+
searchText: o
|
|
152
159
|
})
|
|
153
160
|
],
|
|
154
161
|
["fields", C.ASSET_PATH],
|
|
@@ -159,63 +166,63 @@ const le = {
|
|
|
159
166
|
["fields", C.PARENT_FOLDER_IDENTIFIER],
|
|
160
167
|
["fields", C.CHILD_COUNT],
|
|
161
168
|
["objectRecordID", e],
|
|
162
|
-
["seeThru",
|
|
169
|
+
["seeThru", o?.trim() || l ? "true" : "false"],
|
|
163
170
|
["limit", s.toString()],
|
|
164
|
-
["start",
|
|
165
|
-
],
|
|
166
|
-
|
|
167
|
-
|
|
171
|
+
["start", _.toString()]
|
|
172
|
+
], L = new URL(`${g}${b}`);
|
|
173
|
+
f.forEach(([w, E]) => {
|
|
174
|
+
L.searchParams.append(w, E);
|
|
168
175
|
});
|
|
169
|
-
const
|
|
176
|
+
const k = await fetch(L.toString(), {
|
|
170
177
|
headers: {
|
|
171
|
-
Authorization: `Bearer ${
|
|
178
|
+
Authorization: `Bearer ${m}`
|
|
172
179
|
},
|
|
173
180
|
method: "GET"
|
|
174
181
|
});
|
|
175
|
-
if (!
|
|
176
|
-
const
|
|
177
|
-
throw
|
|
178
|
-
}
|
|
179
|
-
const
|
|
180
|
-
let
|
|
181
|
-
|
|
182
|
-
const
|
|
183
|
-
let E =
|
|
184
|
-
|
|
182
|
+
if (!k.ok) {
|
|
183
|
+
const w = new Error();
|
|
184
|
+
throw w.message = "Failed to fetch", w;
|
|
185
|
+
}
|
|
186
|
+
const G = await k.json();
|
|
187
|
+
let Y = /* @__PURE__ */ new Set();
|
|
188
|
+
a && (Y = ye(a));
|
|
189
|
+
const rt = G.contentItems?.map((w) => {
|
|
190
|
+
let E = M(
|
|
191
|
+
w.fields,
|
|
185
192
|
C.TITLE_WITH_FALLBACK
|
|
186
|
-
) ?? "",
|
|
187
|
-
(
|
|
188
|
-
|
|
193
|
+
) ?? "", B = ve(
|
|
194
|
+
(M(
|
|
195
|
+
w.fields,
|
|
189
196
|
C.ASSET_PATH
|
|
190
197
|
) ?? "").replace(/^Root\//i, "")
|
|
191
198
|
) || E;
|
|
192
|
-
if (
|
|
193
|
-
if (
|
|
194
|
-
const
|
|
195
|
-
|
|
199
|
+
if (a) {
|
|
200
|
+
if (a.has(B)) {
|
|
201
|
+
const ct = B.split("/"), At = ct.pop();
|
|
202
|
+
B = `${ct.join("/")}/${w.recordID}-${At}`, E = `${w.recordID}-${E}`;
|
|
196
203
|
}
|
|
197
|
-
|
|
204
|
+
o?.trim() && Y.has(E) && (E = B), a.add(B), Y.add(E);
|
|
198
205
|
}
|
|
199
206
|
return {
|
|
200
207
|
childCount: Number(
|
|
201
|
-
|
|
202
|
-
|
|
208
|
+
M(
|
|
209
|
+
w.fields,
|
|
203
210
|
C.CHILD_COUNT
|
|
204
211
|
) ?? 0
|
|
205
212
|
),
|
|
206
213
|
children: [],
|
|
207
|
-
docType:
|
|
208
|
-
|
|
214
|
+
docType: M(
|
|
215
|
+
w.fields,
|
|
209
216
|
C.DOC_TYPE
|
|
210
217
|
) ?? "",
|
|
211
|
-
fullPath:
|
|
212
|
-
hasChildren:
|
|
213
|
-
|
|
218
|
+
fullPath: B,
|
|
219
|
+
hasChildren: M(
|
|
220
|
+
w.fields,
|
|
214
221
|
C.HAS_BROWSER_CHILDREN
|
|
215
222
|
) === "1",
|
|
216
|
-
id:
|
|
217
|
-
parentFolderIdentifier:
|
|
218
|
-
|
|
223
|
+
id: w.recordID,
|
|
224
|
+
parentFolderIdentifier: M(
|
|
225
|
+
w.fields,
|
|
219
226
|
C.PARENT_FOLDER_IDENTIFIER
|
|
220
227
|
) ?? "",
|
|
221
228
|
parents: [],
|
|
@@ -223,49 +230,52 @@ const le = {
|
|
|
223
230
|
title: E
|
|
224
231
|
};
|
|
225
232
|
}) ?? [];
|
|
226
|
-
return { data:
|
|
233
|
+
return { data: rt, totalCount: G.totalCount ?? rt.length };
|
|
227
234
|
};
|
|
228
|
-
function
|
|
229
|
-
const i = e.toLowerCase(),
|
|
235
|
+
function M(t, e) {
|
|
236
|
+
const i = e.toLowerCase(), a = Object.keys(t).find(
|
|
230
237
|
(s) => s.toLowerCase() === i
|
|
231
238
|
);
|
|
232
|
-
return
|
|
239
|
+
return a ? t[a] : void 0;
|
|
233
240
|
}
|
|
234
|
-
const
|
|
235
|
-
const e = t.split(
|
|
236
|
-
return { id: i, path:
|
|
237
|
-
},
|
|
241
|
+
const it = "-", S = (t) => {
|
|
242
|
+
const e = t.split(it), i = e.pop() ?? "", a = e.join(it);
|
|
243
|
+
return { id: i, path: a };
|
|
244
|
+
}, N = ({ id: t, path: e }) => [e, t].join(it), fe = (t) => {
|
|
238
245
|
const e = t.split(".");
|
|
239
246
|
return e.length > 1 ? e.pop() ?? "" : "";
|
|
240
|
-
},
|
|
247
|
+
}, gt = (t) => {
|
|
241
248
|
const e = t.match(/(?:V\.?)?(\d+(?:\.\d+)*)/);
|
|
242
249
|
return e ? e[1] : "";
|
|
243
|
-
},
|
|
250
|
+
}, xt = (t, e) => {
|
|
244
251
|
let i = e?.trim();
|
|
245
|
-
const
|
|
246
|
-
return (t ? t.length : 0) >=
|
|
247
|
-
},
|
|
252
|
+
const a = e ? e.split("/").length : 0;
|
|
253
|
+
return (t ? t.length : 0) >= a && (i = t.join("/") ?? ""), i;
|
|
254
|
+
}, ve = (t) => t.split("/").map((e) => e.trim()).join("/"), ye = (t) => {
|
|
248
255
|
const e = /* @__PURE__ */ new Set();
|
|
249
256
|
for (const i of t) {
|
|
250
|
-
const
|
|
257
|
+
const a = i.split("/"), s = a[a.length - 1];
|
|
251
258
|
s && e.add(s);
|
|
252
259
|
}
|
|
253
260
|
return e;
|
|
254
|
-
},
|
|
255
|
-
const i = t.split("/"),
|
|
256
|
-
return i.slice(0,
|
|
261
|
+
}, be = (t, e) => {
|
|
262
|
+
const i = t.split("/"), a = e.split("/");
|
|
263
|
+
return i.slice(0, a.length + 1).join("/");
|
|
257
264
|
};
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
265
|
+
function mt(t) {
|
|
266
|
+
return t.toSorted((e, i) => i.uploadTimestamp - e.uploadTimestamp);
|
|
267
|
+
}
|
|
268
|
+
var $e = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, D = (t, e, i, a) => {
|
|
269
|
+
for (var s = a > 1 ? void 0 : a ? Se(e, i) : e, o = t.length - 1, l; o >= 0; o--)
|
|
270
|
+
(l = t[o]) && (s = (a ? l(e, i, s) : l(s)) || s);
|
|
271
|
+
return a && s && $e(e, i, s), s;
|
|
262
272
|
};
|
|
263
|
-
let v = class extends
|
|
273
|
+
let v = class extends H {
|
|
264
274
|
constructor() {
|
|
265
|
-
super(...arguments), this.localize = new
|
|
275
|
+
super(...arguments), this.localize = new q(this), this.role = "treeitem", this.siteUrl = "", this.token = "", this.searchText = "", this.folder = null, this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.folderPathsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], this.data = null, this.totalCount = 0, this.isLoading = !1, this.fetchFolders = async ({
|
|
266
276
|
folderId: t,
|
|
267
277
|
start: e = 0
|
|
268
|
-
}) => await
|
|
278
|
+
}) => await Ct({
|
|
269
279
|
folderId: t,
|
|
270
280
|
folderPath: this.folder?.path ?? [],
|
|
271
281
|
folderPathsSet: this.folderPathsSet,
|
|
@@ -278,11 +288,11 @@ let v = class extends Y {
|
|
|
278
288
|
if (e >= this.totalCount)
|
|
279
289
|
return;
|
|
280
290
|
this.isLoading = !0;
|
|
281
|
-
const { data: i, totalCount:
|
|
291
|
+
const { data: i, totalCount: a } = await this.fetchFolders({
|
|
282
292
|
folderId: this.folder?.id ?? "",
|
|
283
293
|
start: e
|
|
284
294
|
});
|
|
285
|
-
this.data = [...this.data ?? [], ...i], this.totalCount =
|
|
295
|
+
this.data = [...this.data ?? [], ...i], this.totalCount = a, this.isLoading = !1;
|
|
286
296
|
}, this.onLazyLoad = async (t) => {
|
|
287
297
|
if (t.target !== this.treeItem)
|
|
288
298
|
return;
|
|
@@ -290,10 +300,10 @@ let v = class extends Y {
|
|
|
290
300
|
folderId: this.folder?.id ?? ""
|
|
291
301
|
});
|
|
292
302
|
if (this.data = e, this.totalCount = i, await this.updateComplete, !this.treeItem.selected && !this.treeItem.indeterminate) {
|
|
293
|
-
let
|
|
294
|
-
for (const
|
|
295
|
-
|
|
296
|
-
this.treeItem.indeterminate = !
|
|
303
|
+
let a = !0, s = !0;
|
|
304
|
+
for (const o of this.treeItem.getChildrenItems())
|
|
305
|
+
o.selected ? (vt(o, !0, "multiple"), s = !1) : a = !1;
|
|
306
|
+
this.treeItem.indeterminate = !a && !s;
|
|
297
307
|
}
|
|
298
308
|
};
|
|
299
309
|
}
|
|
@@ -326,52 +336,52 @@ let v = class extends Y {
|
|
|
326
336
|
if (await this.updateComplete, !this.treeItem)
|
|
327
337
|
return;
|
|
328
338
|
let t = !1;
|
|
329
|
-
const e = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(),
|
|
330
|
-
|
|
331
|
-
const
|
|
332
|
-
if (!
|
|
339
|
+
const e = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = xt(this.folder?.path ?? [], this.folder?.fullPath ?? ""), s = [...this.currentRootIDsSet], o = (m, g) => {
|
|
340
|
+
m.forEach((b) => {
|
|
341
|
+
const f = S(b);
|
|
342
|
+
if (!f.path.trim() || !f.id.trim())
|
|
333
343
|
return !1;
|
|
334
|
-
const
|
|
335
|
-
|
|
344
|
+
const L = R(f.path), k = R(a);
|
|
345
|
+
a && L.startsWith(k) && L !== k && g.add(be(f.path, a));
|
|
336
346
|
});
|
|
337
347
|
};
|
|
338
|
-
|
|
339
|
-
let l = !!s.some((
|
|
340
|
-
const
|
|
341
|
-
if (!
|
|
348
|
+
o(this.removedIDs, i), o(s, e);
|
|
349
|
+
let l = !!s.some((m) => {
|
|
350
|
+
const g = S(m);
|
|
351
|
+
if (!g.path.trim() || !g.id.trim())
|
|
342
352
|
return !1;
|
|
343
|
-
const
|
|
353
|
+
const b = N({
|
|
344
354
|
id: this.folder?.id ?? "",
|
|
345
|
-
path:
|
|
346
|
-
}),
|
|
347
|
-
return
|
|
355
|
+
path: a
|
|
356
|
+
}), f = R(g.path), L = R(a), k = g.id === this.folder?.id, G = !this.removedIDs.includes(b) && L.startsWith(f);
|
|
357
|
+
return k || G;
|
|
348
358
|
});
|
|
349
|
-
const
|
|
359
|
+
const h = this.folder?.childCount && e.size === this.folder?.childCount;
|
|
350
360
|
if (this.folder?.childCount && i.size === this.folder?.childCount) {
|
|
351
361
|
this.currentRootIDsSet.delete(
|
|
352
|
-
|
|
362
|
+
N({
|
|
353
363
|
id: this.folder?.id ?? "",
|
|
354
|
-
path:
|
|
364
|
+
path: a
|
|
355
365
|
})
|
|
356
366
|
);
|
|
357
|
-
const
|
|
358
|
-
|
|
367
|
+
const m = this.parentElement?.parentElement;
|
|
368
|
+
m && m instanceof v && m.syncBoxes(), l = !1;
|
|
359
369
|
} else if (!l)
|
|
360
|
-
if (
|
|
370
|
+
if (h) {
|
|
361
371
|
this.currentRootIDsSet.add(
|
|
362
|
-
|
|
372
|
+
N({
|
|
363
373
|
id: this.folder?.id ?? "",
|
|
364
|
-
path:
|
|
374
|
+
path: a
|
|
365
375
|
})
|
|
366
376
|
);
|
|
367
|
-
const
|
|
368
|
-
|
|
377
|
+
const m = this.parentElement?.parentElement;
|
|
378
|
+
m && m instanceof v && m.syncBoxes(), l = !0;
|
|
369
379
|
} else e.size > 0 && (t = !0);
|
|
370
380
|
l ? (t = i.size > 0, this.treeItem.selected = !0) : (t = e.size > 0, this.treeItem.selected = !1, await this.treeItem.updateComplete), t ? (this.treeItem.selected = !1, await this.treeItem.updateComplete, this.treeItem.indeterminate = !0) : this.treeItem.indeterminate = !1;
|
|
371
381
|
}
|
|
372
382
|
render() {
|
|
373
|
-
const t =
|
|
374
|
-
return
|
|
383
|
+
const t = xt(this.folder?.path ?? [], this.folder?.fullPath ?? "");
|
|
384
|
+
return n`
|
|
375
385
|
<cx-tree-item
|
|
376
386
|
aria-label=${this.folder?.title ?? ""}
|
|
377
387
|
class=${A({
|
|
@@ -389,10 +399,10 @@ let v = class extends Y {
|
|
|
389
399
|
${this.folder?.title}
|
|
390
400
|
</cx-line-clamp>
|
|
391
401
|
</div>
|
|
392
|
-
${
|
|
402
|
+
${U(
|
|
393
403
|
this.data ?? [],
|
|
394
404
|
(e) => e.id,
|
|
395
|
-
(e) =>
|
|
405
|
+
(e) => n`<cx-folder-item
|
|
396
406
|
slot="children"
|
|
397
407
|
.folder=${e}
|
|
398
408
|
.siteUrl=${this.siteUrl}
|
|
@@ -402,9 +412,9 @@ let v = class extends Y {
|
|
|
402
412
|
.folderPathsSet=${this.folderPathsSet}
|
|
403
413
|
></cx-folder-item>`
|
|
404
414
|
)}
|
|
405
|
-
${
|
|
415
|
+
${p(
|
|
406
416
|
this.data && this.data.length < this.totalCount,
|
|
407
|
-
() =>
|
|
417
|
+
() => n`
|
|
408
418
|
<div slot="children" class="load-more-button">
|
|
409
419
|
<cx-button
|
|
410
420
|
data-testid="load-more-button"
|
|
@@ -421,64 +431,66 @@ let v = class extends Y {
|
|
|
421
431
|
`;
|
|
422
432
|
}
|
|
423
433
|
};
|
|
424
|
-
v.styles = [
|
|
434
|
+
v.styles = [tt];
|
|
425
435
|
v.dependencies = {
|
|
426
|
-
"cx-icon":
|
|
427
|
-
"cx-line-clamp":
|
|
428
|
-
"cx-tree-item":
|
|
436
|
+
"cx-icon": J,
|
|
437
|
+
"cx-line-clamp": Q,
|
|
438
|
+
"cx-tree-item": ft
|
|
429
439
|
};
|
|
430
440
|
D([
|
|
431
|
-
|
|
441
|
+
z("cx-tree-item")
|
|
432
442
|
], v.prototype, "treeItem", 2);
|
|
433
443
|
D([
|
|
434
|
-
|
|
444
|
+
d({
|
|
435
445
|
attribute: "site-url",
|
|
436
|
-
reflect: !0
|
|
446
|
+
reflect: !0,
|
|
447
|
+
type: String
|
|
437
448
|
})
|
|
438
449
|
], v.prototype, "siteUrl", 2);
|
|
439
450
|
D([
|
|
440
|
-
|
|
451
|
+
d({ reflect: !0, type: String })
|
|
441
452
|
], v.prototype, "token", 2);
|
|
442
453
|
D([
|
|
443
|
-
|
|
454
|
+
d({ attribute: "search-text", reflect: !0, type: String })
|
|
444
455
|
], v.prototype, "searchText", 2);
|
|
445
456
|
D([
|
|
446
|
-
|
|
457
|
+
d({ type: Object })
|
|
447
458
|
], v.prototype, "folder", 2);
|
|
448
459
|
D([
|
|
449
|
-
|
|
460
|
+
d({
|
|
450
461
|
attribute: "current-root-ids-set",
|
|
451
462
|
type: Object
|
|
452
463
|
})
|
|
453
464
|
], v.prototype, "currentRootIDsSet", 2);
|
|
454
465
|
D([
|
|
455
|
-
|
|
466
|
+
d({ attribute: "folder-paths-set", type: Object })
|
|
456
467
|
], v.prototype, "folderPathsSet", 2);
|
|
457
468
|
D([
|
|
458
|
-
|
|
469
|
+
d({
|
|
459
470
|
attribute: "removed-ids",
|
|
460
471
|
converter: {
|
|
461
472
|
fromAttribute: (t) => t.split(" "),
|
|
462
473
|
toAttribute: (t) => t.join(" ")
|
|
463
|
-
}
|
|
474
|
+
},
|
|
475
|
+
type: String
|
|
464
476
|
})
|
|
465
477
|
], v.prototype, "removedIDs", 2);
|
|
466
478
|
D([
|
|
467
|
-
|
|
479
|
+
u()
|
|
468
480
|
], v.prototype, "data", 2);
|
|
469
481
|
D([
|
|
470
|
-
|
|
482
|
+
u()
|
|
471
483
|
], v.prototype, "totalCount", 2);
|
|
472
484
|
D([
|
|
473
|
-
|
|
485
|
+
u()
|
|
474
486
|
], v.prototype, "isLoading", 2);
|
|
475
487
|
D([
|
|
476
|
-
|
|
488
|
+
P(["currentRootIDsSet", "removedIDs"])
|
|
477
489
|
], v.prototype, "syncBoxes", 1);
|
|
478
490
|
v = D([
|
|
479
|
-
|
|
491
|
+
W("cx-folder-item")
|
|
480
492
|
], v);
|
|
481
|
-
const
|
|
493
|
+
const Ie = at`
|
|
482
494
|
.folder-tree {
|
|
483
495
|
overflow: auto;
|
|
484
496
|
flex: 1;
|
|
@@ -533,15 +545,15 @@ const ye = gt`
|
|
|
533
545
|
line-height: var(--cx-line-height-small);
|
|
534
546
|
}
|
|
535
547
|
`;
|
|
536
|
-
var
|
|
537
|
-
for (var s =
|
|
538
|
-
(l = t[
|
|
539
|
-
return
|
|
548
|
+
var we = Object.defineProperty, Ce = Object.getOwnPropertyDescriptor, I = (t, e, i, a) => {
|
|
549
|
+
for (var s = a > 1 ? void 0 : a ? Ce(e, i) : e, o = t.length - 1, l; o >= 0; o--)
|
|
550
|
+
(l = t[o]) && (s = (a ? l(e, i, s) : l(s)) || s);
|
|
551
|
+
return a && s && we(e, i, s), s;
|
|
540
552
|
};
|
|
541
|
-
let y = class extends
|
|
553
|
+
let y = class extends H {
|
|
542
554
|
constructor() {
|
|
543
|
-
super(...arguments), this.localize = new
|
|
544
|
-
}, this.isLoading = !1, this.folderPathsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.renderFolder = (t) =>
|
|
555
|
+
super(...arguments), this.localize = new q(this), this.role = "tree", this.siteUrl = "", this.bearerToken = "", this.token = "", this.searchText = "", this.folders = [], this.rootIDs = [], this.totalCount = 0, this.loadMore = () => {
|
|
556
|
+
}, this.isLoading = !1, this.folderPathsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.renderFolder = (t) => n`<cx-folder-item
|
|
545
557
|
.currentRootIDsSet=${this.currentRootIDsSet}
|
|
546
558
|
.folder=${t}
|
|
547
559
|
.folderPathsSet=${this.folderPathsSet}
|
|
@@ -561,7 +573,7 @@ let y = class extends Y {
|
|
|
561
573
|
resetTree() {
|
|
562
574
|
this.currentRootIDsSet = new Set(this.rootIDs), this.tree.querySelectorAll("cx-folder-item").forEach((t) => {
|
|
563
575
|
t.selected = this.currentRootIDsSet.has(
|
|
564
|
-
|
|
576
|
+
N({
|
|
565
577
|
id: t.id,
|
|
566
578
|
path: t.dataset.path ?? ""
|
|
567
579
|
})
|
|
@@ -569,38 +581,38 @@ let y = class extends Y {
|
|
|
569
581
|
});
|
|
570
582
|
}
|
|
571
583
|
async handleSelectedChange(t) {
|
|
572
|
-
const e = t.target, i = e.dataset.id ?? "",
|
|
573
|
-
if (await e.updateComplete, !i.trim() || !
|
|
584
|
+
const e = t.target, i = e.dataset.id ?? "", a = e.dataset.path ?? "";
|
|
585
|
+
if (await e.updateComplete, !i.trim() || !a.trim())
|
|
574
586
|
return;
|
|
575
|
-
const s =
|
|
587
|
+
const s = N({
|
|
576
588
|
id: i,
|
|
577
|
-
path:
|
|
589
|
+
path: a
|
|
578
590
|
});
|
|
579
591
|
if (!(e.indeterminate && !e.selected)) {
|
|
580
592
|
if (e.selected) {
|
|
581
593
|
if (!this.currentRootIDsSet.has(s)) {
|
|
582
|
-
|
|
583
|
-
for (const
|
|
584
|
-
!
|
|
585
|
-
|
|
586
|
-
id:
|
|
587
|
-
path:
|
|
594
|
+
lt(e, "multiple"), this.currentRootIDsSet.add(s);
|
|
595
|
+
for (const o of e.getChildrenItems())
|
|
596
|
+
!o.id.trim() || !o.dataset.path?.trim() || this.currentRootIDsSet.add(
|
|
597
|
+
N({
|
|
598
|
+
id: o.id,
|
|
599
|
+
path: o.dataset.path ?? ""
|
|
588
600
|
})
|
|
589
601
|
);
|
|
590
602
|
}
|
|
591
603
|
this.removedIDs = this.removedIDs.filter(
|
|
592
|
-
(
|
|
604
|
+
(o) => o !== s && !S(o).path.startsWith(a + "/")
|
|
593
605
|
);
|
|
594
606
|
} else
|
|
595
|
-
this.removedIDs.push(s), this.currentRootIDsSet.has(s) && (this.currentRootIDsSet.delete(s),
|
|
596
|
-
[...this.currentRootIDsSet].forEach((
|
|
597
|
-
const l =
|
|
598
|
-
|
|
607
|
+
this.removedIDs.push(s), this.currentRootIDsSet.has(s) && (this.currentRootIDsSet.delete(s), lt(e, "multiple"));
|
|
608
|
+
[...this.currentRootIDsSet].forEach((o) => {
|
|
609
|
+
const l = R(a), h = S(o).path, _ = R(h);
|
|
610
|
+
_.startsWith(l) && _ !== l && (e.selected || this.currentRootIDsSet.delete(o));
|
|
599
611
|
}), this.currentRootIDsSet = new Set(this.currentRootIDsSet);
|
|
600
612
|
}
|
|
601
613
|
}
|
|
602
614
|
render() {
|
|
603
|
-
return
|
|
615
|
+
return n`
|
|
604
616
|
<div class="folder-tree selectable">
|
|
605
617
|
<cx-tree
|
|
606
618
|
class=${A({
|
|
@@ -611,14 +623,14 @@ let y = class extends Y {
|
|
|
611
623
|
disabled-auto-expand
|
|
612
624
|
disabled-sync-checkboxes
|
|
613
625
|
>
|
|
614
|
-
${
|
|
626
|
+
${U(
|
|
615
627
|
this.folders,
|
|
616
628
|
(t) => t.id,
|
|
617
629
|
(t) => this.renderFolder(t)
|
|
618
630
|
)}
|
|
619
|
-
${
|
|
631
|
+
${p(
|
|
620
632
|
this.folders && this.folders.length < this.totalCount,
|
|
621
|
-
() =>
|
|
633
|
+
() => n`
|
|
622
634
|
<div class="load-more-button">
|
|
623
635
|
<cx-button
|
|
624
636
|
variant="text"
|
|
@@ -635,361 +647,1078 @@ let y = class extends Y {
|
|
|
635
647
|
`;
|
|
636
648
|
}
|
|
637
649
|
};
|
|
638
|
-
y.styles = [
|
|
650
|
+
y.styles = [tt, Ie];
|
|
639
651
|
y.dependencies = {
|
|
640
652
|
"cx-folder-item": v,
|
|
641
|
-
"cx-tree":
|
|
653
|
+
"cx-tree": yt
|
|
642
654
|
};
|
|
643
|
-
|
|
644
|
-
|
|
655
|
+
I([
|
|
656
|
+
z("cx-tree")
|
|
645
657
|
], y.prototype, "tree", 2);
|
|
646
|
-
|
|
647
|
-
|
|
658
|
+
I([
|
|
659
|
+
d({ attribute: "site-url", reflect: !0, type: String })
|
|
648
660
|
], y.prototype, "siteUrl", 2);
|
|
649
|
-
|
|
650
|
-
|
|
661
|
+
I([
|
|
662
|
+
d({ attribute: "bearer-token", reflect: !0, type: String })
|
|
651
663
|
], y.prototype, "bearerToken", 2);
|
|
652
|
-
|
|
653
|
-
|
|
664
|
+
I([
|
|
665
|
+
d({ attribute: "token", reflect: !0, type: String })
|
|
654
666
|
], y.prototype, "token", 2);
|
|
655
|
-
|
|
656
|
-
|
|
667
|
+
I([
|
|
668
|
+
d({ attribute: "search-text", reflect: !0, type: String })
|
|
657
669
|
], y.prototype, "searchText", 2);
|
|
658
|
-
|
|
659
|
-
|
|
670
|
+
I([
|
|
671
|
+
d({ type: Array })
|
|
660
672
|
], y.prototype, "folders", 2);
|
|
661
|
-
|
|
662
|
-
|
|
673
|
+
I([
|
|
674
|
+
d({ attribute: "root-ids", reflect: !0, type: Array })
|
|
663
675
|
], y.prototype, "rootIDs", 2);
|
|
664
|
-
|
|
665
|
-
|
|
676
|
+
I([
|
|
677
|
+
d({ attribute: "total-count", reflect: !0, type: Number })
|
|
666
678
|
], y.prototype, "totalCount", 2);
|
|
667
|
-
|
|
668
|
-
|
|
679
|
+
I([
|
|
680
|
+
d({ attribute: "load-more", type: Function })
|
|
669
681
|
], y.prototype, "loadMore", 2);
|
|
670
|
-
|
|
671
|
-
|
|
682
|
+
I([
|
|
683
|
+
d({ attribute: "is-loading", reflect: !0, type: Boolean })
|
|
672
684
|
], y.prototype, "isLoading", 2);
|
|
673
|
-
|
|
674
|
-
|
|
685
|
+
I([
|
|
686
|
+
d({ attribute: "folder-paths-set", type: Object })
|
|
675
687
|
], y.prototype, "folderPathsSet", 2);
|
|
676
|
-
|
|
677
|
-
|
|
688
|
+
I([
|
|
689
|
+
u()
|
|
678
690
|
], y.prototype, "removedIDs", 2);
|
|
679
|
-
|
|
680
|
-
|
|
691
|
+
I([
|
|
692
|
+
u()
|
|
681
693
|
], y.prototype, "currentRootIDsSet", 2);
|
|
682
|
-
|
|
683
|
-
|
|
694
|
+
I([
|
|
695
|
+
P("rootIDs")
|
|
684
696
|
], y.prototype, "handleRootIDsChange", 1);
|
|
685
|
-
y =
|
|
686
|
-
|
|
697
|
+
y = I([
|
|
698
|
+
W("cx-folder-tree")
|
|
687
699
|
], y);
|
|
688
|
-
var
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
}
|
|
695
|
-
}, we = "^(?![a-zA-Z][a-zA-Z\\d+\\-.]*:\\/\\/)(?!([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}($|\\/))[^\\s]+$", Se = "^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[^\\s]*)?$", As = "^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.){2,}[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[^\\s]*)?$";
|
|
696
|
-
function Ie(t, e, i) {
|
|
697
|
-
switch (i.length) {
|
|
698
|
-
case 0:
|
|
699
|
-
return t.call(e);
|
|
700
|
-
case 1:
|
|
701
|
-
return t.call(e, i[0]);
|
|
702
|
-
case 2:
|
|
703
|
-
return t.call(e, i[0], i[1]);
|
|
704
|
-
case 3:
|
|
705
|
-
return t.call(e, i[0], i[1], i[2]);
|
|
706
|
-
}
|
|
707
|
-
return t.apply(e, i);
|
|
708
|
-
}
|
|
709
|
-
var rt = Math.max;
|
|
710
|
-
function Ce(t, e, i) {
|
|
711
|
-
return e = rt(e === void 0 ? t.length - 1 : e, 0), function() {
|
|
712
|
-
for (var o = arguments, s = -1, a = rt(o.length - e, 0), l = Array(a); ++s < a; )
|
|
713
|
-
l[s] = o[e + s];
|
|
714
|
-
s = -1;
|
|
715
|
-
for (var d = Array(e + 1); ++s < e; )
|
|
716
|
-
d[s] = o[s];
|
|
717
|
-
return d[e] = i(l), Ie(t, this, d);
|
|
718
|
-
};
|
|
719
|
-
}
|
|
720
|
-
function Ae(t) {
|
|
721
|
-
return function() {
|
|
722
|
-
return t;
|
|
723
|
-
};
|
|
724
|
-
}
|
|
725
|
-
var nt = function() {
|
|
726
|
-
try {
|
|
727
|
-
var t = wt(Object, "defineProperty");
|
|
728
|
-
return t({}, "", {}), t;
|
|
729
|
-
} catch {
|
|
730
|
-
}
|
|
731
|
-
}(), De = nt ? function(t, e) {
|
|
732
|
-
return nt(t, "toString", {
|
|
733
|
-
configurable: !0,
|
|
734
|
-
enumerable: !1,
|
|
735
|
-
value: Ae(e),
|
|
736
|
-
writable: !0
|
|
737
|
-
});
|
|
738
|
-
} : ft, Te = 800, ze = 16, Ee = Date.now;
|
|
739
|
-
function Le(t) {
|
|
740
|
-
var e = 0, i = 0;
|
|
741
|
-
return function() {
|
|
742
|
-
var o = Ee(), s = ze - (o - i);
|
|
743
|
-
if (i = o, s > 0) {
|
|
744
|
-
if (++e >= Te)
|
|
745
|
-
return arguments[0];
|
|
746
|
-
} else
|
|
747
|
-
e = 0;
|
|
748
|
-
return t.apply(void 0, arguments);
|
|
749
|
-
};
|
|
750
|
-
}
|
|
751
|
-
var Re = Le(De);
|
|
752
|
-
function Pe(t, e) {
|
|
753
|
-
return Re(Ce(t, e, ft), t + "");
|
|
754
|
-
}
|
|
755
|
-
var Fe = 200;
|
|
756
|
-
function Ue(t, e, i, o) {
|
|
757
|
-
var s = -1, a = Et, l = !0, d = t.length, m = [], u = e.length;
|
|
758
|
-
if (!d)
|
|
759
|
-
return m;
|
|
760
|
-
i && (e = Jt(e, St(i))), e.length >= Fe && (a = Ct, l = !1, e = new It(e));
|
|
700
|
+
var Ae = 200;
|
|
701
|
+
function De(t, e, i, a) {
|
|
702
|
+
var s = -1, o = kt, l = !0, h = t.length, _ = [], m = e.length;
|
|
703
|
+
if (!h)
|
|
704
|
+
return _;
|
|
705
|
+
i && (e = Jt(e, Pt(i))), e.length >= Ae && (o = zt, l = !1, e = new Tt(e));
|
|
761
706
|
t:
|
|
762
|
-
for (; ++s <
|
|
763
|
-
var
|
|
764
|
-
if (
|
|
765
|
-
for (var
|
|
766
|
-
if (e[
|
|
707
|
+
for (; ++s < h; ) {
|
|
708
|
+
var g = t[s], b = i == null ? g : i(g);
|
|
709
|
+
if (g = g !== 0 ? g : 0, l && b === b) {
|
|
710
|
+
for (var f = m; f--; )
|
|
711
|
+
if (e[f] === b)
|
|
767
712
|
continue t;
|
|
768
|
-
|
|
769
|
-
} else
|
|
713
|
+
_.push(g);
|
|
714
|
+
} else o(e, b, a) || _.push(g);
|
|
770
715
|
}
|
|
771
|
-
return
|
|
716
|
+
return _;
|
|
772
717
|
}
|
|
773
|
-
var
|
|
774
|
-
function
|
|
775
|
-
return
|
|
718
|
+
var _t = pt ? pt.isConcatSpreadable : void 0;
|
|
719
|
+
function Te(t) {
|
|
720
|
+
return $t(t) || Et(t) || !!(_t && t && t[_t]);
|
|
776
721
|
}
|
|
777
|
-
function
|
|
778
|
-
var
|
|
779
|
-
for (i || (i =
|
|
780
|
-
var
|
|
781
|
-
i(
|
|
722
|
+
function Pe(t, e, i, a, s) {
|
|
723
|
+
var o = -1, l = t.length;
|
|
724
|
+
for (i || (i = Te), s || (s = []); ++o < l; ) {
|
|
725
|
+
var h = t[o];
|
|
726
|
+
i(h) ? Ft(s, h) : a || (s[s.length] = h);
|
|
782
727
|
}
|
|
783
728
|
return s;
|
|
784
729
|
}
|
|
785
|
-
function
|
|
786
|
-
var
|
|
787
|
-
if (
|
|
788
|
-
return
|
|
789
|
-
for (var s = -1,
|
|
790
|
-
for (var l = t[s],
|
|
791
|
-
|
|
792
|
-
return
|
|
730
|
+
function ze(t, e, i) {
|
|
731
|
+
var a = t.length;
|
|
732
|
+
if (a < 2)
|
|
733
|
+
return a ? dt(t[0]) : [];
|
|
734
|
+
for (var s = -1, o = Array(a); ++s < a; )
|
|
735
|
+
for (var l = t[s], h = -1; ++h < a; )
|
|
736
|
+
h != s && (o[s] = De(o[s] || l, t[h], e, i));
|
|
737
|
+
return dt(Pe(o), e, i);
|
|
793
738
|
}
|
|
794
|
-
function
|
|
795
|
-
return Qt(t) &&
|
|
739
|
+
function Ee(t) {
|
|
740
|
+
return Qt(t) && bt(t);
|
|
796
741
|
}
|
|
797
|
-
var
|
|
798
|
-
return
|
|
799
|
-
})
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
--tooltip-max-width: min(80vw, 640px);
|
|
742
|
+
var st = Zt(function(t) {
|
|
743
|
+
return ze(Lt(t, Ee));
|
|
744
|
+
}), $ = /* @__PURE__ */ ((t) => (t.Canceled = "CANCELED", t.Failed = "FAILED", t.InProgress = "INPROGRESS", t.PendingComplete = "PENDINGCOMPLETE", t.Success = "SUCCESS", t))($ || {}), Fe = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, j = (t, e, i, a) => {
|
|
745
|
+
for (var s = a > 1 ? void 0 : a ? Le(e, i) : e, o = t.length - 1, l; o >= 0; o--)
|
|
746
|
+
(l = t[o]) && (s = (a ? l(e, i, s) : l(s)) || s);
|
|
747
|
+
return a && s && Fe(e, i, s), s;
|
|
748
|
+
};
|
|
749
|
+
let T = class extends H {
|
|
750
|
+
constructor() {
|
|
751
|
+
super(...arguments), this.localize = new q(this), this.size = 0, this.remainingSize = 0, this.childrenCount = 0, this.assetsCount = 0;
|
|
808
752
|
}
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
display: block;
|
|
812
|
-
height: 100%;
|
|
753
|
+
get cachedSize() {
|
|
754
|
+
return Math.max(0, this.size - this.remainingSize);
|
|
813
755
|
}
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
pointer-events: none;
|
|
817
|
-
user-select: none;
|
|
756
|
+
get percentage() {
|
|
757
|
+
return this.size ? this.cachedSize / this.size * 100 : 0;
|
|
818
758
|
}
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
position: absolute;
|
|
822
|
-
top: 0;
|
|
823
|
-
left: 0;
|
|
824
|
-
width: 100%;
|
|
825
|
-
height: 100%;
|
|
826
|
-
background-color: var(--cx-color-neutral-50);
|
|
827
|
-
opacity: 0.8;
|
|
828
|
-
display: flex;
|
|
829
|
-
justify-content: center;
|
|
830
|
-
align-items: center;
|
|
831
|
-
z-index: var(--cx-z-index-tooltip); /* Ensure it is above other content */
|
|
759
|
+
createRenderRoot() {
|
|
760
|
+
return this;
|
|
832
761
|
}
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
762
|
+
renderFolderSuccessText() {
|
|
763
|
+
return n`${this.childrenCount} ${this.localize.term("subfolders")},
|
|
764
|
+
${this.assetsCount} ${this.localize.term("assets")}`;
|
|
765
|
+
}
|
|
766
|
+
renderSuccess() {
|
|
767
|
+
return n`<div class="file-on-demand-pinned-status__success progress">
|
|
768
|
+
<cx-icon name="file_download" variant="filled"></cx-icon>
|
|
769
|
+
<cx-typography variant="small">
|
|
770
|
+
<cx-line-clamp lines="1">
|
|
771
|
+
${p(this.isFolder, this.renderFolderSuccessText.bind(this), () => n`${this.localize.term("cached")}`)}
|
|
772
|
+
</cx-line-clamp>
|
|
773
|
+
</cx-typography>
|
|
774
|
+
</div>`;
|
|
839
775
|
}
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
776
|
+
renderFailed() {
|
|
777
|
+
return n`<div class="file-on-demand-pinned-status__failed progress">
|
|
778
|
+
<cx-icon name="file_download_off" variant="filled"></cx-icon>
|
|
779
|
+
<cx-typography variant="small">
|
|
780
|
+
<cx-line-clamp lines="1">
|
|
781
|
+
${this.localize.term("syncFailedCacheFull")}
|
|
782
|
+
</cx-line-clamp>
|
|
783
|
+
</cx-typography>
|
|
784
|
+
</div>`;
|
|
845
785
|
}
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
786
|
+
renderCanceled() {
|
|
787
|
+
return n`<div class="file-on-demand-pinned-status__canceled progress">
|
|
788
|
+
<cx-icon name="file_download_off" variant="filled"></cx-icon>
|
|
789
|
+
<cx-typography variant="small">
|
|
790
|
+
<cx-line-clamp lines="1">
|
|
791
|
+
${this.localize.term("syncCanceled")}
|
|
792
|
+
</cx-line-clamp>
|
|
793
|
+
</cx-typography>
|
|
794
|
+
</div>`;
|
|
849
795
|
}
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
796
|
+
renderInProgress() {
|
|
797
|
+
return n`<div class="file-on-demand-pinned-status__in-progress progress">
|
|
798
|
+
<cx-icon name="downloading" variant="filled"></cx-icon>
|
|
799
|
+
<cx-typography variant="small">
|
|
800
|
+
<cx-line-clamp lines="1">
|
|
801
|
+
${this.localize.term("caching")} ${this.percentage}% (<cx-format-bytes .value=${this.cachedSize}></cx-format-bytes>/
|
|
802
|
+
<cx-format-bytes .value=${this.size}></cx-format-bytes>)
|
|
803
|
+
</cx-line-clamp>
|
|
804
|
+
</cx-typography>
|
|
805
|
+
</div>`;
|
|
806
|
+
}
|
|
807
|
+
render() {
|
|
808
|
+
return n`<div class="file-on-demand-pinned-status">
|
|
809
|
+
${ie(this.uploadStatus, [
|
|
810
|
+
[$.Success, this.renderSuccess.bind(this)],
|
|
811
|
+
[$.Failed, this.renderFailed.bind(this)],
|
|
812
|
+
[$.InProgress, this.renderInProgress.bind(this)],
|
|
813
|
+
[$.PendingComplete, this.renderInProgress.bind(this)],
|
|
814
|
+
[$.Canceled, this.renderCanceled.bind(this)]
|
|
815
|
+
])}
|
|
816
|
+
</div>`;
|
|
817
|
+
}
|
|
818
|
+
};
|
|
819
|
+
T.styles = [tt];
|
|
820
|
+
T.dependencies = {
|
|
821
|
+
"cx-format-bytes": ot,
|
|
822
|
+
"cx-icon": J,
|
|
823
|
+
"cx-line-clamp": Q,
|
|
824
|
+
"cx-typography": nt
|
|
825
|
+
};
|
|
826
|
+
j([
|
|
827
|
+
d({
|
|
828
|
+
attribute: "upload-status",
|
|
829
|
+
type: String
|
|
830
|
+
})
|
|
831
|
+
], T.prototype, "uploadStatus", 2);
|
|
832
|
+
j([
|
|
833
|
+
d({ type: Number })
|
|
834
|
+
], T.prototype, "size", 2);
|
|
835
|
+
j([
|
|
836
|
+
d({
|
|
837
|
+
attribute: "remaining-size",
|
|
838
|
+
type: Number
|
|
839
|
+
})
|
|
840
|
+
], T.prototype, "remainingSize", 2);
|
|
841
|
+
j([
|
|
842
|
+
d({
|
|
843
|
+
attribute: "is-folder",
|
|
844
|
+
type: Boolean
|
|
845
|
+
})
|
|
846
|
+
], T.prototype, "isFolder", 2);
|
|
847
|
+
j([
|
|
848
|
+
d({
|
|
849
|
+
attribute: "children-count",
|
|
850
|
+
type: Number
|
|
851
|
+
})
|
|
852
|
+
], T.prototype, "childrenCount", 2);
|
|
853
|
+
j([
|
|
854
|
+
d({
|
|
855
|
+
attribute: "assets-count",
|
|
856
|
+
type: Number
|
|
857
|
+
})
|
|
858
|
+
], T.prototype, "assetsCount", 2);
|
|
859
|
+
T = j([
|
|
860
|
+
W("cx-file-on-demand-pinned-status")
|
|
861
|
+
], T);
|
|
862
|
+
const Ue = at`
|
|
863
|
+
:host {
|
|
864
|
+
padding: var(--cx-spacing-2x-small) var(--cx-spacing-small);
|
|
865
|
+
display: block;
|
|
853
866
|
}
|
|
854
867
|
|
|
855
|
-
.
|
|
856
|
-
|
|
868
|
+
.asset {
|
|
869
|
+
max-height: var(--asset-height);
|
|
870
|
+
display: flex;
|
|
871
|
+
gap: var(--cx-spacing-small);
|
|
872
|
+
}
|
|
873
|
+
.asset:hover {
|
|
874
|
+
background-color: var(--cx-input-filled-background-color-hover);
|
|
857
875
|
}
|
|
858
876
|
|
|
859
|
-
|
|
877
|
+
.asset__description {
|
|
878
|
+
flex: 1;
|
|
879
|
+
width: 0;
|
|
860
880
|
display: flex;
|
|
881
|
+
flex-direction: column;
|
|
861
882
|
justify-content: center;
|
|
862
883
|
}
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
text-align: center;
|
|
884
|
+
.asset__description__label {
|
|
885
|
+
display: flex;
|
|
866
886
|
}
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
887
|
+
.asset__description__label__text {
|
|
888
|
+
flex-grow: 1;
|
|
889
|
+
flex-shrink: 1;
|
|
890
|
+
overflow: hidden;
|
|
870
891
|
}
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
892
|
+
.asset__description__status {
|
|
893
|
+
color: var(--cx-color-neutral-500);
|
|
894
|
+
line-height: var(--cx-line-height-medium);
|
|
874
895
|
}
|
|
875
896
|
|
|
876
|
-
.
|
|
877
|
-
|
|
878
|
-
min-
|
|
897
|
+
.asset__actions {
|
|
898
|
+
display: flex;
|
|
899
|
+
min-width: 64px;
|
|
900
|
+
justify-content: flex-end;
|
|
901
|
+
align-items: center;
|
|
902
|
+
}
|
|
903
|
+
.asset:hover .asset__actions {
|
|
904
|
+
visibility: visible;
|
|
905
|
+
opacity: 1;
|
|
906
|
+
}
|
|
907
|
+
.asset__actions {
|
|
908
|
+
visibility: hidden;
|
|
909
|
+
opacity: 0;
|
|
879
910
|
}
|
|
880
911
|
|
|
881
|
-
|
|
882
|
-
|
|
912
|
+
.asset__actions__spinner {
|
|
913
|
+
min-height: var(--cx-input-height-medium);
|
|
914
|
+
min-width: var(--cx-input-height-medium);
|
|
915
|
+
display: flex;
|
|
883
916
|
justify-content: center;
|
|
884
917
|
align-items: center;
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
918
|
+
}
|
|
919
|
+
.asset__actions__spinner::part(base) {
|
|
920
|
+
flex-grow: 0;
|
|
888
921
|
}
|
|
889
922
|
|
|
890
|
-
.
|
|
923
|
+
.asset__thumbnail {
|
|
924
|
+
width: 56px;
|
|
925
|
+
height: var(--asset-height);
|
|
891
926
|
display: flex;
|
|
892
|
-
flex-direction: column;
|
|
893
927
|
justify-content: center;
|
|
894
928
|
align-items: center;
|
|
895
|
-
|
|
929
|
+
position: relative;
|
|
930
|
+
border-radius: var(--cx-border-radius-medium);
|
|
931
|
+
}
|
|
932
|
+
.asset__thumbnail--placeholder {
|
|
933
|
+
background-color: var(--cx-color-primary-50);
|
|
934
|
+
}
|
|
935
|
+
.asset__thumbnail--folder {
|
|
936
|
+
background-color: var(--cx-color-neutral-100);
|
|
896
937
|
}
|
|
897
938
|
|
|
898
|
-
.
|
|
939
|
+
.asset__thumbnail__image {
|
|
940
|
+
height: 100%;
|
|
899
941
|
width: 100%;
|
|
900
|
-
|
|
901
|
-
flex-
|
|
902
|
-
|
|
903
|
-
|
|
942
|
+
object-fit: cover;
|
|
943
|
+
flex-shrink: 0;
|
|
944
|
+
border-radius: var(--cx-border-radius-medium);
|
|
945
|
+
}
|
|
946
|
+
.asset__thumbnail__icon {
|
|
947
|
+
--font-size: 38px;
|
|
948
|
+
display: none;
|
|
949
|
+
color: var(--cx-color-primary-400);
|
|
904
950
|
}
|
|
905
951
|
|
|
906
|
-
.
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
width: 100%;
|
|
952
|
+
.asset__folder__icon {
|
|
953
|
+
--font-size: var(--cx-font-size-x-large);
|
|
954
|
+
color: var(--cx-color-neutral-600);
|
|
910
955
|
}
|
|
911
956
|
|
|
912
|
-
.
|
|
913
|
-
|
|
957
|
+
.asset__thumbnail__extension {
|
|
958
|
+
display: none;
|
|
959
|
+
position: absolute;
|
|
960
|
+
bottom: var(--cx-spacing-3x-small);
|
|
961
|
+
left: 50%;
|
|
962
|
+
transform: translateX(-50%);
|
|
963
|
+
width: 26px;
|
|
964
|
+
color: var(--cx-color-primary-50);
|
|
914
965
|
}
|
|
915
966
|
|
|
916
|
-
.
|
|
967
|
+
.asset__thumbnail__extension__line-clamp {
|
|
968
|
+
width: 100%;
|
|
917
969
|
text-align: center;
|
|
918
970
|
}
|
|
919
971
|
|
|
920
|
-
|
|
921
|
-
.header {
|
|
922
|
-
display: flex;
|
|
923
|
-
justify-content: space-between;
|
|
924
|
-
background-color: var(--cx-color-neutral-50);
|
|
925
|
-
padding: var(--cx-spacing-x-small) var(--cx-spacing-small);
|
|
926
|
-
line-height: 1;
|
|
927
|
-
}
|
|
928
|
-
.header__user {
|
|
929
|
-
display: flex;
|
|
930
|
-
align-items: center;
|
|
931
|
-
gap: var(--cx-spacing-x-small);
|
|
932
|
-
overflow: hidden;
|
|
933
|
-
}
|
|
934
|
-
.header__username {
|
|
935
|
-
display: flex;
|
|
936
|
-
overflow: hidden;
|
|
937
|
-
}
|
|
938
|
-
.header__username__text {
|
|
972
|
+
.asset__thumbnail__extension__text {
|
|
939
973
|
flex-grow: 1;
|
|
940
974
|
flex-shrink: 1;
|
|
941
975
|
overflow: hidden;
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
--size: 24px;
|
|
945
|
-
}
|
|
946
|
-
.header__actions {
|
|
947
|
-
min-width: fit-content;
|
|
976
|
+
text-transform: uppercase;
|
|
977
|
+
display: contents;
|
|
948
978
|
}
|
|
949
979
|
|
|
950
|
-
.
|
|
951
|
-
|
|
952
|
-
padding: 0;
|
|
980
|
+
.asset__thumbnail--placeholder .asset__thumbnail__image {
|
|
981
|
+
display: none;
|
|
953
982
|
}
|
|
954
983
|
|
|
955
|
-
|
|
956
|
-
.
|
|
957
|
-
|
|
958
|
-
height: 0;
|
|
984
|
+
.asset__thumbnail--placeholder .asset__thumbnail__icon,
|
|
985
|
+
.asset__thumbnail--placeholder .asset__thumbnail__extension {
|
|
986
|
+
display: flex;
|
|
959
987
|
}
|
|
960
988
|
|
|
961
|
-
/**
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
.assets-list__tab-group cx-tab-panel,
|
|
968
|
-
.assets-list__tab-group cx-tab-panel::part(base) {
|
|
969
|
-
height: 100%;
|
|
970
|
-
overflow: hidden;
|
|
989
|
+
/** uploads assets */
|
|
990
|
+
cx-progress-bar {
|
|
991
|
+
--height: 4px;
|
|
992
|
+
--indicator-color: var(--color);
|
|
993
|
+
--track-color: var(--cx-color-neutral-300);
|
|
994
|
+
z-index: 0;
|
|
971
995
|
}
|
|
972
|
-
.
|
|
973
|
-
.assets-list__tab-group .favorites-empty,
|
|
974
|
-
.assets-list__tab-group .uploads-empty {
|
|
996
|
+
.progress {
|
|
975
997
|
display: flex;
|
|
976
|
-
flex-direction: column;
|
|
977
|
-
justify-content: center;
|
|
978
998
|
align-items: center;
|
|
979
|
-
|
|
999
|
+
width: 100%;
|
|
1000
|
+
gap: var(--cx-spacing-2x-small);
|
|
1001
|
+
margin-top: var(--cx-spacing-3x-small);
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
.syncing-progress,
|
|
1005
|
+
.completed-progress,
|
|
1006
|
+
.failed-progress,
|
|
1007
|
+
.canceled-progress {
|
|
1008
|
+
margin-top: var(--cx-spacing-2x-small);
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
.progress * {
|
|
1012
|
+
white-space: nowrap;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
.progress cx-icon {
|
|
1016
|
+
--font-size: var(--cx-font-size-medium);
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
.progress cx-typography::part(base) {
|
|
1020
|
+
line-height: var(--cx-font-size-medium);
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
.uploading-progress cx-icon {
|
|
1024
|
+
color: var(--cx-color-primary-500);
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
.syncing-progress cx-icon {
|
|
1028
|
+
color: var(--cx-color-warning);
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
.completed-progress cx-icon {
|
|
1032
|
+
color: var(--cx-color-success);
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
.failed-progress cx-icon,
|
|
1036
|
+
.failed-progress__text {
|
|
1037
|
+
color: var(--cx-color-danger);
|
|
1038
|
+
cursor: help;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
.canceled-progress cx-icon {
|
|
1042
|
+
color: var(--cx-color-neutral-600);
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
.file-on-demand-pinned-status__success cx-icon,
|
|
1046
|
+
.file-on-demand-pinned-status__in-progress cx-icon {
|
|
1047
|
+
color: var(--cx-color-success-500);
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
.file-on-demand-pinned-status__failed cx-icon {
|
|
1051
|
+
color: var(--cx-color-danger-500);
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
.file-on-demand-pinned-status__canceled cx-icon {
|
|
1055
|
+
color: var(--cx-color-neutral-500);
|
|
1056
|
+
}
|
|
1057
|
+
`;
|
|
1058
|
+
var Re = Object.defineProperty, ke = Object.getOwnPropertyDescriptor, V = (t, e, i, a) => {
|
|
1059
|
+
for (var s = a > 1 ? void 0 : a ? ke(e, i) : e, o = t.length - 1, l; o >= 0; o--)
|
|
1060
|
+
(l = t[o]) && (s = (a ? l(e, i, s) : l(s)) || s);
|
|
1061
|
+
return a && s && Re(e, i, s), s;
|
|
1062
|
+
};
|
|
1063
|
+
let F = class extends H {
|
|
1064
|
+
constructor() {
|
|
1065
|
+
super(...arguments), this.localize = new q(this), this.favoriteInProgressAssets = [], this.pinInProgressAssets = [], this.thumbnailLoadError = !1;
|
|
1066
|
+
}
|
|
1067
|
+
get showFailedActions() {
|
|
1068
|
+
return this.listType === x.PINNED ? !1 : this.asset.uploadStatus === $.Failed;
|
|
1069
|
+
}
|
|
1070
|
+
get showInProgressActions() {
|
|
1071
|
+
return this.listType === x.PINNED ? !1 : this.asset.uploadStatus === $.InProgress;
|
|
1072
|
+
}
|
|
1073
|
+
get showNormalActions() {
|
|
1074
|
+
return this.listType === x.PINNED ? !1 : [$.Success, $.PendingComplete].includes(
|
|
1075
|
+
this.asset.uploadStatus
|
|
1076
|
+
) || !this.asset.uploadStatus?.trim();
|
|
1077
|
+
}
|
|
1078
|
+
get showPinnedActions() {
|
|
1079
|
+
return this.listType === x.PINNED;
|
|
1080
|
+
}
|
|
1081
|
+
get isFolder() {
|
|
1082
|
+
return xe.includes((this.asset.docType ?? "").toLowerCase());
|
|
1083
|
+
}
|
|
1084
|
+
get thumbnailUrl() {
|
|
1085
|
+
return this.asset.thumbnail?.trim() ?? "";
|
|
1086
|
+
}
|
|
1087
|
+
get showThumbnailPlaceholder() {
|
|
1088
|
+
return !this.thumbnailUrl || this.thumbnailLoadError;
|
|
1089
|
+
}
|
|
1090
|
+
willUpdate(t) {
|
|
1091
|
+
if (super.willUpdate(t), !t.has("asset"))
|
|
1092
|
+
return;
|
|
1093
|
+
(t.get("asset")?.thumbnail?.trim() ?? "") !== this.thumbnailUrl && (this.thumbnailLoadError = !1);
|
|
1094
|
+
}
|
|
1095
|
+
handleImgError() {
|
|
1096
|
+
this.thumbnailLoadError = !0;
|
|
1097
|
+
}
|
|
1098
|
+
handleImgLoad() {
|
|
1099
|
+
this.thumbnailLoadError = !1;
|
|
1100
|
+
}
|
|
1101
|
+
handleOpenDriveClick() {
|
|
1102
|
+
this.openDrive(this.asset);
|
|
1103
|
+
}
|
|
1104
|
+
openDrive(t) {
|
|
1105
|
+
this.emit("cx-open-drive", {
|
|
1106
|
+
detail: {
|
|
1107
|
+
asset: t
|
|
1108
|
+
}
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1111
|
+
unmarkFavorite(t) {
|
|
1112
|
+
this.emit("cx-unmark-favorite", {
|
|
1113
|
+
detail: {
|
|
1114
|
+
assetId: t
|
|
1115
|
+
}
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1118
|
+
markFavorite(t) {
|
|
1119
|
+
this.emit("cx-mark-favorite", {
|
|
1120
|
+
detail: {
|
|
1121
|
+
assetId: t
|
|
1122
|
+
}
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
pinAsset(t) {
|
|
1126
|
+
this.emit("cx-file-on-demand-pin", {
|
|
1127
|
+
detail: {
|
|
1128
|
+
assetId: t
|
|
1129
|
+
}
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
unpinAsset(t) {
|
|
1133
|
+
this.emit("cx-file-on-demand-unpin", {
|
|
1134
|
+
detail: {
|
|
1135
|
+
assetId: t
|
|
1136
|
+
}
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1139
|
+
handlePinClick() {
|
|
1140
|
+
this.asset.isPinned ? this.unpinAsset(this.asset.recordId) : this.pinAsset(this.asset.recordId);
|
|
1141
|
+
}
|
|
1142
|
+
handleFavoriteClick() {
|
|
1143
|
+
this.asset.isInFavorite ? this.unmarkFavorite(this.asset.recordId) : this.markFavorite(this.asset.recordId);
|
|
1144
|
+
}
|
|
1145
|
+
retryUpload(t) {
|
|
1146
|
+
this.emit("cx-retry-upload", {
|
|
1147
|
+
detail: {
|
|
1148
|
+
assetId: t
|
|
1149
|
+
}
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
|
+
handleRetryUploadClick() {
|
|
1153
|
+
this.asset.uploadId && this.retryUpload(this.asset.uploadId);
|
|
1154
|
+
}
|
|
1155
|
+
resumeUpload(t) {
|
|
1156
|
+
this.emit("cx-resume-upload", {
|
|
1157
|
+
detail: {
|
|
1158
|
+
assetId: t
|
|
1159
|
+
}
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
pauseUpload(t) {
|
|
1163
|
+
this.emit("cx-pause-upload", {
|
|
1164
|
+
detail: {
|
|
1165
|
+
assetId: t
|
|
1166
|
+
}
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
handlePauseUploadClick() {
|
|
1170
|
+
this.asset.uploadId && (this.asset.isPaused ? this.resumeUpload(this.asset.uploadId) : this.pauseUpload(this.asset.uploadId));
|
|
1171
|
+
}
|
|
1172
|
+
renderProgress({
|
|
1173
|
+
isPaused: t = !1,
|
|
1174
|
+
progress: e = 0,
|
|
1175
|
+
remainingTime: i,
|
|
1176
|
+
size: a = 0,
|
|
1177
|
+
timestamp: s = Date.now(),
|
|
1178
|
+
uploadErrorMessage: o,
|
|
1179
|
+
uploadStatus: l = $.InProgress
|
|
1180
|
+
}) {
|
|
1181
|
+
const h = a > 0 ? e * 100 / a : 0, _ = l === $.InProgress ? h : 100, m = n`
|
|
1182
|
+
<div class="progress uploading-progress">
|
|
1183
|
+
${p(!t, () => n`<cx-icon name="arrow_upward"></cx-icon>`)}
|
|
1184
|
+
<cx-typography variant="small">
|
|
1185
|
+
<cx-line-clamp lines="1">
|
|
1186
|
+
${p(t, () => n`${this.localize.term("paused")} ‧`)}
|
|
1187
|
+
<cx-format-bytes .value=${e}></cx-format-bytes>
|
|
1188
|
+
${this.localize.term("of")}
|
|
1189
|
+
<cx-format-bytes .value=${a}></cx-format-bytes>
|
|
1190
|
+
(${new Intl.NumberFormat(void 0, {
|
|
1191
|
+
maximumFractionDigits: 2
|
|
1192
|
+
}).format(h)}%)
|
|
1193
|
+
${p(
|
|
1194
|
+
!!i && !t,
|
|
1195
|
+
() => n`‧
|
|
1196
|
+
<cx-relative-time
|
|
1197
|
+
format="narrow"
|
|
1198
|
+
numeric="always"
|
|
1199
|
+
date=${new Date(Date.now() + (i ?? 0))}
|
|
1200
|
+
sync
|
|
1201
|
+
sync-interval=${O}
|
|
1202
|
+
></cx-relative-time>`
|
|
1203
|
+
)}
|
|
1204
|
+
</cx-line-clamp>
|
|
1205
|
+
</cx-typography>
|
|
1206
|
+
</div>
|
|
1207
|
+
`, g = n`
|
|
1208
|
+
<div class="progress syncing-progress">
|
|
1209
|
+
<cx-icon name="cached"></cx-icon>
|
|
1210
|
+
<cx-typography variant="small">
|
|
1211
|
+
<cx-line-clamp lines="1">
|
|
1212
|
+
${this.localize.term("syncing")} ‧
|
|
1213
|
+
<cx-relative-time
|
|
1214
|
+
format="narrow"
|
|
1215
|
+
numeric="always"
|
|
1216
|
+
date=${new Date(s)}
|
|
1217
|
+
sync
|
|
1218
|
+
sync-interval=${O}
|
|
1219
|
+
></cx-relative-time>
|
|
1220
|
+
</cx-line-clamp>
|
|
1221
|
+
</cx-typography>
|
|
1222
|
+
</div>
|
|
1223
|
+
`, b = n`
|
|
1224
|
+
<div class="progress completed-progress">
|
|
1225
|
+
<cx-icon name="check"></cx-icon>
|
|
1226
|
+
<cx-typography variant="small">
|
|
1227
|
+
<cx-line-clamp lines="1">
|
|
1228
|
+
${this.localize.term("readyToUse")} ‧
|
|
1229
|
+
<cx-relative-time
|
|
1230
|
+
format="narrow"
|
|
1231
|
+
numeric="always"
|
|
1232
|
+
date=${new Date(s)}
|
|
1233
|
+
sync
|
|
1234
|
+
sync-interval=${O}
|
|
1235
|
+
></cx-relative-time>
|
|
1236
|
+
</cx-line-clamp>
|
|
1237
|
+
</cx-typography>
|
|
1238
|
+
</div>
|
|
1239
|
+
`, f = n`
|
|
1240
|
+
<div class="progress failed-progress">
|
|
1241
|
+
<cx-typography variant="small">
|
|
1242
|
+
<cx-line-clamp lines="1">
|
|
1243
|
+
<cx-tooltip content=${o || this.localize.term("uploadFailed")}>
|
|
1244
|
+
<span class="failed-progress__text">
|
|
1245
|
+
${this.localize.term("uploadFailed")} ‧
|
|
1246
|
+
</span>
|
|
1247
|
+
</cx-tooltip>
|
|
1248
|
+
<cx-relative-time
|
|
1249
|
+
format="narrow"
|
|
1250
|
+
numeric="always"
|
|
1251
|
+
date=${new Date(s)}
|
|
1252
|
+
sync
|
|
1253
|
+
sync-interval=${O}
|
|
1254
|
+
></cx-relative-time>
|
|
1255
|
+
</cx-line-clamp>
|
|
1256
|
+
</cx-typography>
|
|
1257
|
+
</div>
|
|
1258
|
+
`, L = n`
|
|
1259
|
+
<div class="progress canceled-progress">
|
|
1260
|
+
<cx-icon name="cancel"></cx-icon>
|
|
1261
|
+
<cx-typography variant="small">
|
|
1262
|
+
<cx-line-clamp lines="1">
|
|
1263
|
+
${this.localize.term("canceled")} ‧
|
|
1264
|
+
<cx-relative-time
|
|
1265
|
+
format="narrow"
|
|
1266
|
+
numeric="always"
|
|
1267
|
+
date=${new Date(s)}
|
|
1268
|
+
sync
|
|
1269
|
+
sync-interval=${O}
|
|
1270
|
+
></cx-relative-time>
|
|
1271
|
+
</cx-line-clamp>
|
|
1272
|
+
</cx-typography>
|
|
1273
|
+
</div>
|
|
1274
|
+
`;
|
|
1275
|
+
return n`
|
|
1276
|
+
${p(
|
|
1277
|
+
l === $.InProgress,
|
|
1278
|
+
() => n`<cx-progress-bar
|
|
1279
|
+
style=${se({
|
|
1280
|
+
"--color": t ? "var(--cx-color-warning-500)" : "var(--cx-color-primary-500)"
|
|
1281
|
+
})}
|
|
1282
|
+
.value=${_.toFixed(0)}
|
|
1283
|
+
class="progress-bar"
|
|
1284
|
+
></cx-progress-bar
|
|
1285
|
+
>${m}`
|
|
1286
|
+
)}
|
|
1287
|
+
${p(
|
|
1288
|
+
l === $.PendingComplete,
|
|
1289
|
+
() => g
|
|
1290
|
+
)}
|
|
1291
|
+
${p(l === $.Success, () => b)}
|
|
1292
|
+
${p(l === $.Failed, () => f)}
|
|
1293
|
+
${p(l === $.Canceled, () => L)}
|
|
1294
|
+
`;
|
|
1295
|
+
}
|
|
1296
|
+
renderUploadingStatus() {
|
|
1297
|
+
return n`
|
|
1298
|
+
${this.renderProgress({
|
|
1299
|
+
isPaused: this.asset.isPaused,
|
|
1300
|
+
progress: (this.asset.size ?? 0) - (this.asset.remainingSize ?? 0),
|
|
1301
|
+
remainingTime: this.asset.remainingTime,
|
|
1302
|
+
size: this.asset.size ?? 0,
|
|
1303
|
+
timestamp: this.asset.uploadTimestamp,
|
|
1304
|
+
uploadErrorMessage: this.asset.uploadErrorMessage,
|
|
1305
|
+
uploadStatus: this.asset.uploadStatus
|
|
1306
|
+
})}
|
|
1307
|
+
`;
|
|
1308
|
+
}
|
|
1309
|
+
renderPinnedStatus() {
|
|
1310
|
+
return n`<cx-file-on-demand-pinned-status
|
|
1311
|
+
size=${this.asset.size ?? 0}
|
|
1312
|
+
remaining-size=${this.asset.remainingSize ?? 0}
|
|
1313
|
+
upload-status=${this.asset.uploadStatus}
|
|
1314
|
+
?is-folder=${this.isFolder}
|
|
1315
|
+
children-count=${this.asset.childrenCount ?? 0}
|
|
1316
|
+
assets-count=${this.asset.assetsCount ?? 0}
|
|
1317
|
+
></cx-file-on-demand-pinned-status>`;
|
|
1318
|
+
}
|
|
1319
|
+
renderThumbnailContent() {
|
|
1320
|
+
return this.isFolder ? this.listType === x.FAVORITES ? n`<cx-icon
|
|
1321
|
+
class="asset__folder__icon"
|
|
1322
|
+
name="folder_special"
|
|
1323
|
+
></cx-icon>` : n`<cx-icon class="asset__folder__icon" name="topic"></cx-icon>` : n`${p(
|
|
1324
|
+
!!this.thumbnailUrl,
|
|
1325
|
+
() => n`<img
|
|
1326
|
+
alt=${this.asset.fileName}
|
|
1327
|
+
class="asset__thumbnail__image"
|
|
1328
|
+
src=${this.thumbnailUrl}
|
|
1329
|
+
@error=${this.handleImgError}
|
|
1330
|
+
@load=${this.handleImgLoad}
|
|
1331
|
+
/>`
|
|
1332
|
+
)}
|
|
1333
|
+
<cx-icon
|
|
1334
|
+
class="asset__thumbnail__icon"
|
|
1335
|
+
name="insert_drive_file"
|
|
1336
|
+
variant="filled"
|
|
1337
|
+
></cx-icon>
|
|
1338
|
+
<div class="asset__thumbnail__extension">
|
|
1339
|
+
<cx-line-clamp
|
|
1340
|
+
class="asset__thumbnail__extension__line-clamp"
|
|
1341
|
+
lines="1"
|
|
1342
|
+
>
|
|
1343
|
+
<cx-typography
|
|
1344
|
+
class="asset__thumbnail__extension__text"
|
|
1345
|
+
variant="small"
|
|
1346
|
+
>
|
|
1347
|
+
${fe(this.asset.fileName)}
|
|
1348
|
+
</cx-typography>
|
|
1349
|
+
</cx-line-clamp>
|
|
1350
|
+
</div>`;
|
|
1351
|
+
}
|
|
1352
|
+
renderThumbnail() {
|
|
1353
|
+
return n`<div
|
|
1354
|
+
class=${A({
|
|
1355
|
+
asset__thumbnail: !0,
|
|
1356
|
+
"asset__thumbnail--folder": this.isFolder,
|
|
1357
|
+
"asset__thumbnail--placeholder": this.showThumbnailPlaceholder
|
|
1358
|
+
})}
|
|
1359
|
+
>
|
|
1360
|
+
${this.renderThumbnailContent()}
|
|
1361
|
+
</div>`;
|
|
1362
|
+
}
|
|
1363
|
+
renderNormalActions() {
|
|
1364
|
+
return n`<cx-tooltip content=${this.localize.term("openInDrive")} hoist>
|
|
1365
|
+
<cx-icon-button
|
|
1366
|
+
data-testid="asset__drive-button"
|
|
1367
|
+
name="folder_open"
|
|
1368
|
+
@click=${this.handleOpenDriveClick}
|
|
1369
|
+
></cx-icon-button>
|
|
1370
|
+
</cx-tooltip>
|
|
1371
|
+
${p(
|
|
1372
|
+
this.favoriteInProgressAssets.includes(this.asset.recordId),
|
|
1373
|
+
() => n`<cx-spinner class="asset__actions__spinner"></cx-spinner>`,
|
|
1374
|
+
() => n`<cx-tooltip
|
|
1375
|
+
content=${this.asset.isInFavorite ? this.localize.term("unfavorite") : this.localize.term("favorite")}
|
|
1376
|
+
hoist
|
|
1377
|
+
>
|
|
1378
|
+
<cx-icon-button
|
|
1379
|
+
data-testid="asset__favorite-button"
|
|
1380
|
+
name="star"
|
|
1381
|
+
variant=${this.asset.isInFavorite ? "filled" : "outlined"}
|
|
1382
|
+
@click=${this.handleFavoriteClick}
|
|
1383
|
+
></cx-icon-button>
|
|
1384
|
+
</cx-tooltip>`
|
|
1385
|
+
)} `;
|
|
1386
|
+
}
|
|
1387
|
+
renderFailedActions() {
|
|
1388
|
+
return n`<cx-tooltip content=${this.localize.term("retry")} hoist>
|
|
1389
|
+
<cx-icon-button
|
|
1390
|
+
data-testid="asset__retry-button"
|
|
1391
|
+
name="refresh"
|
|
1392
|
+
@click=${this.handleRetryUploadClick}
|
|
1393
|
+
></cx-icon-button>
|
|
1394
|
+
</cx-tooltip>`;
|
|
1395
|
+
}
|
|
1396
|
+
renderInProgressActions() {
|
|
1397
|
+
return n`<cx-tooltip
|
|
1398
|
+
content=${this.asset.isPaused ? this.localize.term("resume") : this.localize.term("pause")}
|
|
1399
|
+
hoist
|
|
1400
|
+
>
|
|
1401
|
+
<cx-icon-button
|
|
1402
|
+
data-testid=${this.asset.isPaused ? "asset__resume-button" : "asset__pause-button"}
|
|
1403
|
+
name=${this.asset.isPaused ? "play_arrow" : "pause"}
|
|
1404
|
+
variant="filled"
|
|
1405
|
+
@click=${this.handlePauseUploadClick}
|
|
1406
|
+
></cx-icon-button>
|
|
1407
|
+
</cx-tooltip>`;
|
|
1408
|
+
}
|
|
1409
|
+
renderPinnedActions() {
|
|
1410
|
+
return n`${p(
|
|
1411
|
+
this.pinInProgressAssets.includes(this.asset.recordId),
|
|
1412
|
+
() => n`<cx-spinner class="asset__actions__spinner"></cx-spinner>`,
|
|
1413
|
+
() => n`<cx-tooltip
|
|
1414
|
+
content=${this.asset.isPinned ? this.localize.term("unpin") : this.localize.term("pin")}
|
|
1415
|
+
hoist
|
|
1416
|
+
>
|
|
1417
|
+
<cx-icon-button
|
|
1418
|
+
data-testid="asset__pin-button"
|
|
1419
|
+
name="keep"
|
|
1420
|
+
variant=${this.asset.isPinned ? "filled" : "outlined"}
|
|
1421
|
+
@click=${this.handlePinClick}
|
|
1422
|
+
></cx-icon-button>
|
|
1423
|
+
</cx-tooltip>`
|
|
1424
|
+
)} `;
|
|
1425
|
+
}
|
|
1426
|
+
render() {
|
|
1427
|
+
return n`
|
|
1428
|
+
<div
|
|
1429
|
+
data-id=${this.asset.recordId}
|
|
1430
|
+
data-testid=${`asset-${this.asset.uploadStatus}`}
|
|
1431
|
+
class="asset"
|
|
1432
|
+
>
|
|
1433
|
+
${this.renderThumbnail()}
|
|
1434
|
+
<div class="asset__description">
|
|
1435
|
+
<div class="asset__description__label">
|
|
1436
|
+
<cx-line-clamp class="asset__description__label__text" lines="1">
|
|
1437
|
+
<cx-typography variant="body3"
|
|
1438
|
+
>${this.asset.fileName}</cx-typography
|
|
1439
|
+
>
|
|
1440
|
+
</cx-line-clamp>
|
|
1441
|
+
</div>
|
|
1442
|
+
<div class="asset__description__status">
|
|
1443
|
+
${p(
|
|
1444
|
+
this.listType === x.RECENT,
|
|
1445
|
+
() => n`
|
|
1446
|
+
<cx-typography
|
|
1447
|
+
variant="small"
|
|
1448
|
+
class="asset__description__status__time"
|
|
1449
|
+
>
|
|
1450
|
+
<cx-relative-time
|
|
1451
|
+
format="narrow"
|
|
1452
|
+
numeric="always"
|
|
1453
|
+
date=${new Date(this.asset.uploadTimestamp)}
|
|
1454
|
+
sync
|
|
1455
|
+
sync-interval=${O}
|
|
1456
|
+
></cx-relative-time>
|
|
1457
|
+
</cx-typography>
|
|
1458
|
+
`
|
|
1459
|
+
)}
|
|
1460
|
+
${p(
|
|
1461
|
+
this.listType === x.UPLOADS,
|
|
1462
|
+
() => this.renderUploadingStatus()
|
|
1463
|
+
)}
|
|
1464
|
+
${p(
|
|
1465
|
+
this.listType === x.PINNED,
|
|
1466
|
+
() => this.renderPinnedStatus()
|
|
1467
|
+
)}
|
|
1468
|
+
</div>
|
|
1469
|
+
</div>
|
|
1470
|
+
<div class="asset__actions">
|
|
1471
|
+
${p(this.showNormalActions, () => this.renderNormalActions())}
|
|
1472
|
+
${p(
|
|
1473
|
+
this.showInProgressActions,
|
|
1474
|
+
() => this.renderInProgressActions()
|
|
1475
|
+
)}
|
|
1476
|
+
${p(this.showFailedActions, () => this.renderFailedActions())}
|
|
1477
|
+
${p(this.showPinnedActions, () => this.renderPinnedActions())}
|
|
1478
|
+
</div>
|
|
1479
|
+
</div>
|
|
1480
|
+
`;
|
|
1481
|
+
}
|
|
1482
|
+
};
|
|
1483
|
+
F.styles = [tt, Ue];
|
|
1484
|
+
F.dependencies = {
|
|
1485
|
+
"cx-file-on-demand-pinned-status": T,
|
|
1486
|
+
"cx-format-bytes": ot,
|
|
1487
|
+
"cx-icon": J,
|
|
1488
|
+
"cx-icon-button": St,
|
|
1489
|
+
"cx-line-clamp": Q,
|
|
1490
|
+
"cx-progress-bar": te,
|
|
1491
|
+
"cx-relative-time": It,
|
|
1492
|
+
"cx-spinner": ee,
|
|
1493
|
+
"cx-tooltip": wt,
|
|
1494
|
+
"cx-typography": nt
|
|
1495
|
+
};
|
|
1496
|
+
V([
|
|
1497
|
+
d({ type: Object })
|
|
1498
|
+
], F.prototype, "asset", 2);
|
|
1499
|
+
V([
|
|
1500
|
+
d({
|
|
1501
|
+
attribute: "list-type",
|
|
1502
|
+
type: String
|
|
1503
|
+
})
|
|
1504
|
+
], F.prototype, "listType", 2);
|
|
1505
|
+
V([
|
|
1506
|
+
d({
|
|
1507
|
+
attribute: "favorite-in-progress-assets",
|
|
1508
|
+
converter: {
|
|
1509
|
+
fromAttribute: (t) => t.split(" ").filter(Boolean),
|
|
1510
|
+
toAttribute: (t) => t.join(" ")
|
|
1511
|
+
},
|
|
1512
|
+
type: String
|
|
1513
|
+
})
|
|
1514
|
+
], F.prototype, "favoriteInProgressAssets", 2);
|
|
1515
|
+
V([
|
|
1516
|
+
d({
|
|
1517
|
+
attribute: "pin-in-progress-assets",
|
|
1518
|
+
converter: {
|
|
1519
|
+
fromAttribute: (t) => t.split(" ").filter(Boolean),
|
|
1520
|
+
toAttribute: (t) => t.join(" ")
|
|
1521
|
+
},
|
|
1522
|
+
type: String
|
|
1523
|
+
})
|
|
1524
|
+
], F.prototype, "pinInProgressAssets", 2);
|
|
1525
|
+
V([
|
|
1526
|
+
u()
|
|
1527
|
+
], F.prototype, "thumbnailLoadError", 2);
|
|
1528
|
+
F = V([
|
|
1529
|
+
W("cx-file-on-demand-asset")
|
|
1530
|
+
], F);
|
|
1531
|
+
const Oe = at`
|
|
1532
|
+
:host {
|
|
1533
|
+
--asset-height: 40px;
|
|
1534
|
+
display: block;
|
|
1535
|
+
color: var(--cx-color-neutral-900);
|
|
1536
|
+
height: 100%;
|
|
1537
|
+
--cx-button-text-transform: none;
|
|
1538
|
+
--tooltip-max-width: min(80vw, 640px);
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
.container {
|
|
1542
|
+
display: block;
|
|
1543
|
+
height: 100%;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
.container--user-interaction-blocked {
|
|
1547
|
+
pointer-events: none;
|
|
1548
|
+
user-select: none;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
.loading-overlay {
|
|
1552
|
+
position: absolute;
|
|
1553
|
+
top: 0;
|
|
1554
|
+
left: 0;
|
|
1555
|
+
width: 100%;
|
|
1556
|
+
height: 100%;
|
|
1557
|
+
background-color: var(--cx-color-neutral-50);
|
|
1558
|
+
opacity: 0.8;
|
|
1559
|
+
display: flex;
|
|
1560
|
+
justify-content: center;
|
|
1561
|
+
align-items: center;
|
|
1562
|
+
z-index: var(--cx-z-index-tooltip); /* Ensure it is above other content */
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
.assets,
|
|
1566
|
+
.welcome {
|
|
1567
|
+
height: 100%;
|
|
1568
|
+
display: flex;
|
|
1569
|
+
flex-direction: column;
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
/* #region Icons */
|
|
1573
|
+
.assets-list__tab-group .empty-icon {
|
|
1574
|
+
color: var(--cx-color-neutral-600);
|
|
1575
|
+
font-size: var(--cx-font-size-3x-large);
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
cx-tab {
|
|
1579
|
+
line-height: var(--cx-line-height-large);
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
.assets-list__tab-group cx-tab {
|
|
1583
|
+
width: calc(100% / 4);
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
.settings__tab-group cx-tab {
|
|
1587
|
+
width: calc(100% / 2);
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
cx-tab::part(base) {
|
|
1591
|
+
display: flex;
|
|
1592
|
+
justify-content: center;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
cx-tab::part(label) {
|
|
1596
|
+
text-align: center;
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
cx-tab-panel {
|
|
1600
|
+
--padding: 0 0 var(--cx-spacing-x-small) 0;
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
cx-icon[slot='prefix'] {
|
|
1604
|
+
font-size: var(--cx-font-size-large);
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
.error-message {
|
|
1608
|
+
color: var(--cx-color-danger);
|
|
1609
|
+
min-height: 1ch;
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
/** welcome */
|
|
1613
|
+
.welcome {
|
|
1614
|
+
justify-content: center;
|
|
1615
|
+
align-items: center;
|
|
1616
|
+
padding: var(--cx-spacing-x-large) var(--cx-spacing-medium)
|
|
1617
|
+
var(--cx-spacing-medium) var(--cx-spacing-medium);
|
|
1618
|
+
gap: var(--cx-spacing-x-large);
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
.welcome__message {
|
|
1622
|
+
display: flex;
|
|
1623
|
+
flex-direction: column;
|
|
1624
|
+
justify-content: center;
|
|
1625
|
+
align-items: center;
|
|
1626
|
+
gap: var(--cx-spacing-x-small);
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
.welcome__actions {
|
|
1630
|
+
width: 100%;
|
|
1631
|
+
display: flex;
|
|
1632
|
+
flex-direction: column;
|
|
1633
|
+
justify-content: center;
|
|
1634
|
+
gap: var(--cx-spacing-x-small);
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
.welcome__connect-button,
|
|
1638
|
+
.welcome__cancel-connection-button,
|
|
1639
|
+
.welcome__input {
|
|
1640
|
+
width: 100%;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
.welcome__connect-button--disabled::part(base) {
|
|
1644
|
+
cursor: help;
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
.welcome .error-message {
|
|
1648
|
+
text-align: center;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
/** header */
|
|
1652
|
+
.header {
|
|
1653
|
+
display: flex;
|
|
1654
|
+
justify-content: space-between;
|
|
1655
|
+
background-color: var(--cx-color-neutral-50);
|
|
1656
|
+
padding: var(--cx-spacing-x-small) var(--cx-spacing-small);
|
|
1657
|
+
line-height: 1;
|
|
1658
|
+
}
|
|
1659
|
+
.header__user {
|
|
1660
|
+
display: flex;
|
|
1661
|
+
align-items: center;
|
|
1662
|
+
gap: var(--cx-spacing-x-small);
|
|
1663
|
+
overflow: hidden;
|
|
1664
|
+
}
|
|
1665
|
+
.header__username {
|
|
1666
|
+
display: flex;
|
|
1667
|
+
overflow: hidden;
|
|
1668
|
+
}
|
|
1669
|
+
.header__username__text {
|
|
1670
|
+
flex-grow: 1;
|
|
1671
|
+
flex-shrink: 1;
|
|
1672
|
+
overflow: hidden;
|
|
1673
|
+
}
|
|
1674
|
+
.header__avatar {
|
|
1675
|
+
--size: 24px;
|
|
1676
|
+
}
|
|
1677
|
+
.header__actions {
|
|
1678
|
+
min-width: fit-content;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
.settings__version__badge::part(base) {
|
|
1682
|
+
width: var(--cx-spacing-x-small);
|
|
1683
|
+
padding: 0;
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
/** assets list */
|
|
1687
|
+
.assets-list {
|
|
1688
|
+
flex: 1;
|
|
1689
|
+
height: 0;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
/** Make sure the overflown element is .recent__list
|
|
1693
|
+
* to trigger scroll event for infinite scroll
|
|
1694
|
+
*/
|
|
1695
|
+
.assets-list__tab-group,
|
|
1696
|
+
.assets-list__tab-group::part(base),
|
|
1697
|
+
.assets-list__tab-group::part(body),
|
|
1698
|
+
.assets-list__tab-group cx-tab-panel,
|
|
1699
|
+
.assets-list__tab-group cx-tab-panel::part(base) {
|
|
1700
|
+
height: 100%;
|
|
1701
|
+
overflow: hidden;
|
|
1702
|
+
}
|
|
1703
|
+
.assets-list__tab-group .assets-list__tab-group__empty-message {
|
|
1704
|
+
display: flex;
|
|
1705
|
+
flex-direction: column;
|
|
1706
|
+
justify-content: center;
|
|
1707
|
+
align-items: center;
|
|
1708
|
+
gap: var(--cx-spacing-medium);
|
|
980
1709
|
font-size: var(--cx-font-size-x-large);
|
|
981
1710
|
padding: var(--cx-spacing-large) 0;
|
|
982
1711
|
text-align: center;
|
|
983
1712
|
}
|
|
984
1713
|
|
|
985
|
-
.assets-list__tab-group .
|
|
986
|
-
.assets-list__tab-group .uploads-empty {
|
|
1714
|
+
.assets-list__tab-group .assets-list__tab-group__empty-message:not(.favorites-empty) {
|
|
987
1715
|
margin-top: 40px; /** to that they are aligned with favorite tab */
|
|
988
1716
|
}
|
|
989
1717
|
|
|
990
1718
|
.assets-list__tab-group .recent__list,
|
|
991
1719
|
.assets-list__tab-group .favorites__list,
|
|
992
|
-
.assets-list__tab-group .uploads__list
|
|
1720
|
+
.assets-list__tab-group .uploads__list,
|
|
1721
|
+
.assets-list__tab-group .pinned__list {
|
|
993
1722
|
height: 100%;
|
|
994
1723
|
display: flex;
|
|
995
1724
|
flex-direction: column;
|
|
@@ -997,7 +1726,8 @@ const Me = gt`
|
|
|
997
1726
|
padding: 0 0 var(--cx-spacing-x-small) 0;
|
|
998
1727
|
}
|
|
999
1728
|
|
|
1000
|
-
.favorites-tab-panel__content
|
|
1729
|
+
.favorites-tab-panel__content,
|
|
1730
|
+
.pinned-tab-panel__content {
|
|
1001
1731
|
display: flex;
|
|
1002
1732
|
flex-direction: column;
|
|
1003
1733
|
height: 100%;
|
|
@@ -1009,7 +1739,8 @@ const Me = gt`
|
|
|
1009
1739
|
align-items: center;
|
|
1010
1740
|
}
|
|
1011
1741
|
|
|
1012
|
-
.assets-list__tab-group .favorites__list
|
|
1742
|
+
.assets-list__tab-group .favorites__list,
|
|
1743
|
+
.assets-list__tab-group .pinned__list {
|
|
1013
1744
|
flex: 1;
|
|
1014
1745
|
height: 0;
|
|
1015
1746
|
}
|
|
@@ -1038,293 +1769,115 @@ const Me = gt`
|
|
|
1038
1769
|
.status-footer .label {
|
|
1039
1770
|
color: var(--cx-color-neutral-600);
|
|
1040
1771
|
}
|
|
1772
|
+
.status-footer .cache-usage,
|
|
1041
1773
|
.status-footer .connected-url,
|
|
1042
1774
|
.status-footer .connection-status,
|
|
1043
|
-
.status-footer .asset-index-sync-status {
|
|
1044
|
-
display: flex;
|
|
1045
|
-
justify-content: space-between;
|
|
1046
|
-
align-items: center;
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
.status-footer .label {
|
|
1050
|
-
color: var(--cx-color-neutral-600);
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
.status-footer__divider {
|
|
1054
|
-
--spacing: 0;
|
|
1055
|
-
margin-bottom: var(--cx-spacing-small);
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
.connected-url .label {
|
|
1059
|
-
white-space: nowrap;
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
.connected-url .value-line-clamp {
|
|
1063
|
-
padding: 0 var(--cx-spacing-2x-small);
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
.connected-url .value::part(base) {
|
|
1067
|
-
font-weight: var(--cx-font-weight-medium);
|
|
1068
|
-
color: var(--cx-color-neutral-900);
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
.connection-status__value {
|
|
1072
|
-
display: flex;
|
|
1073
|
-
align-items: center;
|
|
1074
|
-
justify-content: center;
|
|
1075
|
-
gap: var(--cx-spacing-2x-small);
|
|
1076
|
-
cursor: help;
|
|
1077
|
-
}
|
|
1078
|
-
.connection-status__value cx-typography {
|
|
1079
|
-
display: inline-flex;
|
|
1080
|
-
}
|
|
1081
|
-
.connection-status__value cx-typography::part(base) {
|
|
1082
|
-
text-transform: capitalize;
|
|
1083
|
-
font-weight: var(--cx-font-weight-medium);
|
|
1084
|
-
}
|
|
1085
|
-
.connection-status--excellent .connection-status__value {
|
|
1086
|
-
color: var(--cx-color-success);
|
|
1087
|
-
}
|
|
1088
|
-
.connection-status--good .connection-status__value {
|
|
1089
|
-
color: var(--cx-color-warning);
|
|
1090
|
-
}
|
|
1091
|
-
.connection-status--bad .connection-status__value {
|
|
1092
|
-
color: var(--cx-color-danger);
|
|
1093
|
-
}
|
|
1094
|
-
.connection-status cx-icon {
|
|
1095
|
-
font-size: var(--cx-font-size-medium);
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
.asset-index-sync-status .value {
|
|
1099
|
-
display: flex;
|
|
1100
|
-
align-items: center;
|
|
1101
|
-
justify-content: center;
|
|
1102
|
-
gap: var(--cx-spacing-2x-small);
|
|
1103
|
-
}
|
|
1104
|
-
.asset-index-sync-status .value cx-typography {
|
|
1105
|
-
display: inline-flex;
|
|
1106
|
-
}
|
|
1107
|
-
.asset-index-sync-status .value cx-typography::part(base) {
|
|
1108
|
-
text-transform: capitalize;
|
|
1109
|
-
font-weight: var(--cx-font-weight-medium);
|
|
1110
|
-
}
|
|
1111
|
-
.asset-index-sync-status--loaded .value {
|
|
1112
|
-
color: var(--cx-color-success);
|
|
1113
|
-
}
|
|
1114
|
-
.asset-index-sync-status--loading .value {
|
|
1115
|
-
color: var(--cx-color-warning);
|
|
1116
|
-
}
|
|
1117
|
-
.asset-index-sync-status--error .value {
|
|
1118
|
-
color: var(--cx-color-danger);
|
|
1119
|
-
}
|
|
1120
|
-
.asset-index-sync-status cx-icon {
|
|
1121
|
-
font-size: var(--cx-font-size-medium);
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
/** asset */
|
|
1125
|
-
.asset {
|
|
1126
|
-
max-height: var(--asset-height);
|
|
1127
|
-
display: flex;
|
|
1128
|
-
gap: var(--cx-spacing-small);
|
|
1129
|
-
padding: var(--cx-spacing-2x-small) var(--cx-spacing-small);
|
|
1130
|
-
}
|
|
1131
|
-
.asset:hover {
|
|
1132
|
-
background-color: var(--cx-input-filled-background-color-hover);
|
|
1133
|
-
}
|
|
1134
|
-
.asset__actions {
|
|
1135
|
-
display: flex;
|
|
1136
|
-
min-width: 64px;
|
|
1137
|
-
justify-content: flex-end;
|
|
1138
|
-
align-items: center;
|
|
1139
|
-
}
|
|
1140
|
-
.asset:hover .asset__actions {
|
|
1141
|
-
visibility: visible;
|
|
1142
|
-
opacity: 1;
|
|
1143
|
-
}
|
|
1144
|
-
.asset__actions {
|
|
1145
|
-
visibility: hidden;
|
|
1146
|
-
opacity: 0;
|
|
1147
|
-
}
|
|
1148
|
-
.favorite__spinner {
|
|
1149
|
-
min-height: var(--cx-input-height-medium);
|
|
1150
|
-
min-width: var(--cx-input-height-medium);
|
|
1151
|
-
display: flex;
|
|
1152
|
-
justify-content: center;
|
|
1153
|
-
align-items: center;
|
|
1154
|
-
}
|
|
1155
|
-
.favorite__spinner::part(base) {
|
|
1156
|
-
flex-grow: 0;
|
|
1157
|
-
}
|
|
1158
|
-
.asset__thumbnail {
|
|
1159
|
-
width: 56px;
|
|
1160
|
-
height: var(--asset-height);
|
|
1161
|
-
display: flex;
|
|
1162
|
-
justify-content: center;
|
|
1163
|
-
align-items: center;
|
|
1164
|
-
position: relative;
|
|
1165
|
-
border-radius: var(--cx-border-radius-medium);
|
|
1166
|
-
}
|
|
1167
|
-
.asset__thumbnail--placeholder {
|
|
1168
|
-
background-color: var(--cx-color-primary-50);
|
|
1169
|
-
}
|
|
1170
|
-
.asset__thumbnail--folder {
|
|
1171
|
-
background-color: var(--cx-color-neutral-100);
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
.asset__thumbnail__image {
|
|
1175
|
-
height: 100%;
|
|
1176
|
-
width: 100%;
|
|
1177
|
-
object-fit: cover;
|
|
1178
|
-
flex-shrink: 0;
|
|
1179
|
-
border-radius: var(--cx-border-radius-medium);
|
|
1180
|
-
}
|
|
1181
|
-
.asset__thumbnail__icon {
|
|
1182
|
-
--font-size: 38px;
|
|
1183
|
-
display: none;
|
|
1184
|
-
color: var(--cx-color-primary-400);
|
|
1185
|
-
}
|
|
1186
|
-
.asset__folder__icon {
|
|
1187
|
-
--font-size: var(--cx-font-size-x-large);
|
|
1188
|
-
color: var(--cx-color-neutral-600);
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
.asset__thumbnail__extension {
|
|
1192
|
-
display: none;
|
|
1193
|
-
position: absolute;
|
|
1194
|
-
bottom: var(--cx-spacing-3x-small);
|
|
1195
|
-
left: 50%;
|
|
1196
|
-
transform: translateX(-50%);
|
|
1197
|
-
width: 26px;
|
|
1198
|
-
color: var(--cx-color-primary-50);
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
.asset__thumbnail__extension__line-clamp {
|
|
1202
|
-
width: 100%;
|
|
1203
|
-
text-align: center;
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
.asset__thumbnail__extension__text {
|
|
1207
|
-
flex-grow: 1;
|
|
1208
|
-
flex-shrink: 1;
|
|
1209
|
-
overflow: hidden;
|
|
1210
|
-
text-transform: uppercase;
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
.asset__thumbnail--placeholder .asset__thumbnail__image {
|
|
1214
|
-
display: none;
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
|
-
.asset__thumbnail--placeholder .asset__thumbnail__icon,
|
|
1218
|
-
.asset__thumbnail--placeholder .asset__thumbnail__extension {
|
|
1219
|
-
display: flex;
|
|
1220
|
-
}
|
|
1221
|
-
.asset__description {
|
|
1222
|
-
flex: 1;
|
|
1223
|
-
width: 0;
|
|
1224
|
-
display: flex;
|
|
1225
|
-
flex-direction: column;
|
|
1226
|
-
justify-content: center;
|
|
1227
|
-
}
|
|
1228
|
-
.asset__description__label {
|
|
1229
|
-
display: flex;
|
|
1230
|
-
}
|
|
1231
|
-
.asset__description__label__text {
|
|
1232
|
-
flex-grow: 1;
|
|
1233
|
-
flex-shrink: 1;
|
|
1234
|
-
overflow: hidden;
|
|
1235
|
-
}
|
|
1236
|
-
.asset__description__status {
|
|
1237
|
-
color: var(--cx-color-neutral-500);
|
|
1238
|
-
line-height: var(--cx-line-height-medium);
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
.uploads__list .asset-group__label {
|
|
1242
|
-
display: flex;
|
|
1243
|
-
justify-content: space-between;
|
|
1244
|
-
align-items: center;
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
.asset-group__clear-button::part(base) {
|
|
1248
|
-
color: var(--cx-color-primary-500);
|
|
1249
|
-
font-size: var(--cx-font-size-x-small);
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
|
-
.asset-group__label {
|
|
1253
|
-
padding: var(--cx-spacing-x-small) var(--cx-spacing-small);
|
|
1254
|
-
color: var(--cx-color-neutral-400);
|
|
1255
|
-
line-height: var(--cx-line-height-large);
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
/** uploads assets */
|
|
1259
|
-
cx-progress-bar {
|
|
1260
|
-
--height: 4px;
|
|
1261
|
-
--indicator-color: var(--color);
|
|
1262
|
-
--track-color: var(--cx-color-neutral-300);
|
|
1263
|
-
z-index: 0;
|
|
1264
|
-
}
|
|
1265
|
-
.uploading-progress,
|
|
1266
|
-
.syncing-progress,
|
|
1267
|
-
.completed-progress,
|
|
1268
|
-
.failed-progress,
|
|
1269
|
-
.canceled-progress {
|
|
1775
|
+
.status-footer .asset-index-sync-status {
|
|
1270
1776
|
display: flex;
|
|
1777
|
+
justify-content: space-between;
|
|
1271
1778
|
align-items: center;
|
|
1272
|
-
width: 100%;
|
|
1273
|
-
gap: var(--cx-spacing-2x-small);
|
|
1274
|
-
margin-top: var(--cx-spacing-3x-small);
|
|
1275
1779
|
}
|
|
1276
1780
|
|
|
1277
|
-
.
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1781
|
+
.status-footer .label {
|
|
1782
|
+
color: var(--cx-color-neutral-600);
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
.status-footer__divider {
|
|
1786
|
+
--spacing: 0;
|
|
1787
|
+
margin-bottom: var(--cx-spacing-small);
|
|
1282
1788
|
}
|
|
1283
1789
|
|
|
1284
|
-
.
|
|
1285
|
-
.syncing-progress *,
|
|
1286
|
-
.completed-progress *,
|
|
1287
|
-
.failed-progress *,
|
|
1288
|
-
.canceled-progress * {
|
|
1790
|
+
.connected-url .label {
|
|
1289
1791
|
white-space: nowrap;
|
|
1290
1792
|
}
|
|
1291
1793
|
|
|
1292
|
-
.
|
|
1293
|
-
|
|
1294
|
-
.completed-progress cx-icon,
|
|
1295
|
-
.failed-progress cx-icon,
|
|
1296
|
-
.canceled-progress cx-icon {
|
|
1297
|
-
--font-size: var(--cx-font-size-medium);
|
|
1794
|
+
.connected-url .value-line-clamp {
|
|
1795
|
+
padding: 0 var(--cx-spacing-2x-small);
|
|
1298
1796
|
}
|
|
1299
1797
|
|
|
1300
|
-
.
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
.failed-progress cx-typography::part(base),
|
|
1304
|
-
.canceled-progress cx-typography::part(base) {
|
|
1305
|
-
line-height: var(--cx-font-size-medium);
|
|
1798
|
+
.connected-url .value::part(base) {
|
|
1799
|
+
font-weight: var(--cx-font-weight-medium);
|
|
1800
|
+
color: var(--cx-color-neutral-900);
|
|
1306
1801
|
}
|
|
1307
1802
|
|
|
1308
|
-
.
|
|
1309
|
-
color: var(--cx-color-
|
|
1803
|
+
.cache-usage__warning-icon {
|
|
1804
|
+
color: var(--cx-color-warning-500);
|
|
1310
1805
|
}
|
|
1311
1806
|
|
|
1312
|
-
.
|
|
1313
|
-
color: var(--cx-color-
|
|
1807
|
+
.status-footer .cache-usage .label {
|
|
1808
|
+
color: var(--cx-color-primary-600);
|
|
1314
1809
|
}
|
|
1315
1810
|
|
|
1316
|
-
.
|
|
1811
|
+
.connection-status__value {
|
|
1812
|
+
display: flex;
|
|
1813
|
+
align-items: center;
|
|
1814
|
+
justify-content: center;
|
|
1815
|
+
gap: var(--cx-spacing-2x-small);
|
|
1816
|
+
cursor: help;
|
|
1817
|
+
}
|
|
1818
|
+
.connection-status__value cx-typography {
|
|
1819
|
+
display: inline-flex;
|
|
1820
|
+
}
|
|
1821
|
+
.connection-status__value cx-typography::part(base) {
|
|
1822
|
+
text-transform: capitalize;
|
|
1823
|
+
font-weight: var(--cx-font-weight-medium);
|
|
1824
|
+
}
|
|
1825
|
+
.connection-status--excellent .connection-status__value {
|
|
1317
1826
|
color: var(--cx-color-success);
|
|
1318
1827
|
}
|
|
1828
|
+
.connection-status--good .connection-status__value {
|
|
1829
|
+
color: var(--cx-color-warning);
|
|
1830
|
+
}
|
|
1831
|
+
.connection-status--bad .connection-status__value {
|
|
1832
|
+
color: var(--cx-color-danger);
|
|
1833
|
+
}
|
|
1834
|
+
.connection-status cx-icon {
|
|
1835
|
+
font-size: var(--cx-font-size-medium);
|
|
1836
|
+
}
|
|
1319
1837
|
|
|
1320
|
-
.
|
|
1321
|
-
|
|
1838
|
+
.asset-index-sync-status .value {
|
|
1839
|
+
display: flex;
|
|
1840
|
+
align-items: center;
|
|
1841
|
+
justify-content: center;
|
|
1842
|
+
gap: var(--cx-spacing-2x-small);
|
|
1843
|
+
}
|
|
1844
|
+
.asset-index-sync-status .value cx-typography {
|
|
1845
|
+
display: inline-flex;
|
|
1846
|
+
}
|
|
1847
|
+
.asset-index-sync-status .value cx-typography::part(base) {
|
|
1848
|
+
text-transform: capitalize;
|
|
1849
|
+
font-weight: var(--cx-font-weight-medium);
|
|
1850
|
+
}
|
|
1851
|
+
.asset-index-sync-status--loaded .value {
|
|
1852
|
+
color: var(--cx-color-success);
|
|
1853
|
+
}
|
|
1854
|
+
.asset-index-sync-status--loading .value {
|
|
1855
|
+
color: var(--cx-color-warning);
|
|
1856
|
+
}
|
|
1857
|
+
.asset-index-sync-status--error .value {
|
|
1322
1858
|
color: var(--cx-color-danger);
|
|
1323
|
-
cursor: help;
|
|
1324
1859
|
}
|
|
1860
|
+
.asset-index-sync-status cx-icon {
|
|
1861
|
+
font-size: var(--cx-font-size-medium);
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1325
1864
|
|
|
1326
|
-
|
|
1327
|
-
|
|
1865
|
+
/** asset */
|
|
1866
|
+
.uploads__list .asset-group__label {
|
|
1867
|
+
display: flex;
|
|
1868
|
+
justify-content: space-between;
|
|
1869
|
+
align-items: center;
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
.asset-group__clear-button::part(base) {
|
|
1873
|
+
color: var(--cx-color-primary-500);
|
|
1874
|
+
font-size: var(--cx-font-size-x-small);
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
.asset-group__label {
|
|
1878
|
+
padding: var(--cx-spacing-x-small) var(--cx-spacing-small);
|
|
1879
|
+
color: var(--cx-color-neutral-400);
|
|
1880
|
+
line-height: var(--cx-line-height-large);
|
|
1328
1881
|
}
|
|
1329
1882
|
|
|
1330
1883
|
/** #region Settings */
|
|
@@ -1423,8 +1976,9 @@ const Me = gt`
|
|
|
1423
1976
|
|
|
1424
1977
|
.settings__cache__size {
|
|
1425
1978
|
display: flex;
|
|
1426
|
-
gap: var(--cx-spacing-small);
|
|
1427
|
-
|
|
1979
|
+
gap: var(--cx-spacing-x-small);
|
|
1980
|
+
justify-content: center;
|
|
1981
|
+
flex-direction: column;
|
|
1428
1982
|
}
|
|
1429
1983
|
.settings__cache__size cx-input {
|
|
1430
1984
|
width: 150px;
|
|
@@ -1434,7 +1988,8 @@ const Me = gt`
|
|
|
1434
1988
|
flex-direction: column;
|
|
1435
1989
|
gap: var(--cx-spacing-small);
|
|
1436
1990
|
}
|
|
1437
|
-
.settings__cache__location__label
|
|
1991
|
+
.settings__cache__location__label,
|
|
1992
|
+
.settings__cache__size__label {
|
|
1438
1993
|
--color: var(--cx-color-neutral-600);
|
|
1439
1994
|
}
|
|
1440
1995
|
.settings__cache__location__value {
|
|
@@ -1513,16 +2068,17 @@ const Me = gt`
|
|
|
1513
2068
|
justify-content: flex-end;
|
|
1514
2069
|
}
|
|
1515
2070
|
`;
|
|
1516
|
-
var
|
|
1517
|
-
for (var s =
|
|
1518
|
-
(l = t[
|
|
1519
|
-
return
|
|
2071
|
+
var Ne = Object.defineProperty, je = Object.getOwnPropertyDescriptor, c = (t, e, i, a) => {
|
|
2072
|
+
for (var s = a > 1 ? void 0 : a ? je(e, i) : e, o = t.length - 1, l; o >= 0; o--)
|
|
2073
|
+
(l = t[o]) && (s = (a ? l(e, i, s) : l(s)) || s);
|
|
2074
|
+
return a && s && Ne(e, i, s), s;
|
|
1520
2075
|
};
|
|
1521
|
-
let
|
|
2076
|
+
let r = class extends H {
|
|
1522
2077
|
constructor() {
|
|
1523
|
-
super(...arguments), this.localize = new
|
|
2078
|
+
super(...arguments), this.localize = new q(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 = {
|
|
1524
2079
|
cacheLocation: "Default",
|
|
1525
2080
|
cacheSize: 0,
|
|
2081
|
+
cacheUsage: 0,
|
|
1526
2082
|
config: {
|
|
1527
2083
|
latestVersion: "",
|
|
1528
2084
|
monitoringActivated: !1,
|
|
@@ -1537,31 +2093,31 @@ let n = class extends Y {
|
|
|
1537
2093
|
// maxDownloadRate: 0,
|
|
1538
2094
|
// maxUploadRate: 0,
|
|
1539
2095
|
}
|
|
1540
|
-
}, 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 =
|
|
2096
|
+
}, this.pickCacheLocation = async () => "Default", this.hasNewVersion = !1, this.aboutContent = "", this.token = "", this.userInteractionBlocked = !1, this.isConnecting = !1, this.isCancellingConnection = !1, this.isDisconnecting = !1, this.isUpgrading = !1, this.isSettingsOpened = !1, this.rootIDs = this.settings.config.rootIDs, this._activeFoldersMode = this.rootIDs.length > 0, this.removedIds = [], this.cacheSize = et({
|
|
1541
2097
|
decimals: 2,
|
|
1542
2098
|
inputUnit: "B",
|
|
1543
|
-
targetUnit:
|
|
2099
|
+
targetUnit: Z,
|
|
1544
2100
|
value: this.settings.cacheSize ?? 0
|
|
1545
|
-
}), 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.connectError = "", this.disconnectError = "", this.upgradeError = "", this.totalCount = 0, this.folderPathsSet = /* @__PURE__ */ new Set(), this.validConnectionUrl = !1, this.isAddingRootIDs = !1, this.fetchFolders = async ({
|
|
2101
|
+
}), 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 ({
|
|
1546
2102
|
excludes: t = [],
|
|
1547
2103
|
folderId: e,
|
|
1548
2104
|
folderPathsSet: i,
|
|
1549
|
-
limit:
|
|
2105
|
+
limit: a = void 0,
|
|
1550
2106
|
start: s = 0
|
|
1551
2107
|
}) => {
|
|
1552
2108
|
try {
|
|
1553
|
-
return await
|
|
2109
|
+
return await Ct({
|
|
1554
2110
|
excludes: t,
|
|
1555
2111
|
folderId: e,
|
|
1556
2112
|
folderPathsSet: i,
|
|
1557
|
-
limit:
|
|
2113
|
+
limit: a,
|
|
1558
2114
|
searchText: this.searchText,
|
|
1559
2115
|
siteUrl: this.settings.config.siteUrl,
|
|
1560
2116
|
start: s,
|
|
1561
2117
|
token: this.token
|
|
1562
2118
|
});
|
|
1563
|
-
} catch (
|
|
1564
|
-
|
|
2119
|
+
} catch (o) {
|
|
2120
|
+
o instanceof Error && o.message === "Failed to fetch" && this.emit("cx-renew-token");
|
|
1565
2121
|
}
|
|
1566
2122
|
return {
|
|
1567
2123
|
data: this.availableFolderIdentifiers,
|
|
@@ -1591,7 +2147,7 @@ let n = class extends Y {
|
|
|
1591
2147
|
}
|
|
1592
2148
|
fetchData() {
|
|
1593
2149
|
if (!this.connectionEstablished) {
|
|
1594
|
-
this.validConnectionUrl =
|
|
2150
|
+
this.validConnectionUrl = K(this.settings.config.siteUrl);
|
|
1595
2151
|
return;
|
|
1596
2152
|
}
|
|
1597
2153
|
this.folderPathsSet = /* @__PURE__ */ new Set(), this.fetchFolders({
|
|
@@ -1603,24 +2159,24 @@ let n = class extends Y {
|
|
|
1603
2159
|
}
|
|
1604
2160
|
// set recent tab as active when connection is established
|
|
1605
2161
|
async showRecentTab() {
|
|
1606
|
-
this.connectionEstablished && (await this.updateComplete, await this.assetsListTabGroup?.updateComplete, this.assetsListTabGroup?.show(
|
|
2162
|
+
this.connectionEstablished && (await this.updateComplete, await this.assetsListTabGroup?.updateComplete, this.assetsListTabGroup?.show(x.RECENT));
|
|
1607
2163
|
}
|
|
1608
2164
|
updateSettingsStates() {
|
|
1609
|
-
this._activeFoldersMode = this.settings.config.rootIDs?.length > 0, this.rootIDs = this.settings.config.rootIDs ?? [], this.cacheSize =
|
|
2165
|
+
this._activeFoldersMode = this.settings.config.rootIDs?.length > 0, this.rootIDs = this.settings.config.rootIDs ?? [], this.cacheSize = et({
|
|
1610
2166
|
decimals: 2,
|
|
1611
2167
|
inputUnit: "B",
|
|
1612
|
-
targetUnit:
|
|
2168
|
+
targetUnit: Z,
|
|
1613
2169
|
value: this.settings.cacheSize ?? 0
|
|
1614
|
-
}), this.cacheLocation = this.settings.cacheLocation ?? "Default", this.proxyTypes = this.settings.config.proxyTypes ?? [], this.siteUrl = this.settings.config.siteUrl ?? "", this.validConnectionUrl =
|
|
2170
|
+
}), this.cacheLocation = this.settings.cacheLocation ?? "Default", this.proxyTypes = this.settings.config.proxyTypes ?? [], this.siteUrl = this.settings.config.siteUrl ?? "", this.validConnectionUrl = K(this.settings.config.siteUrl);
|
|
1615
2171
|
}
|
|
1616
2172
|
get formHasChanges() {
|
|
1617
|
-
return this.settings.cacheSize !== this.cacheSize || this.settings.cacheLocation !== this.cacheLocation || !!
|
|
2173
|
+
return this.settings.cacheSize !== this.cacheSize || this.settings.cacheLocation !== this.cacheLocation || !!st(this.settings.config.proxyTypes, this.proxyTypes).length || !!st(this.settings.config.rootIDs, this.rootIDs).length;
|
|
1618
2174
|
}
|
|
1619
2175
|
connect(t = null) {
|
|
1620
2176
|
if (t?.preventDefault(), this.connectError = "", !this.siteUrl?.trim())
|
|
1621
2177
|
return;
|
|
1622
|
-
const e =
|
|
1623
|
-
if (!
|
|
2178
|
+
const e = ht(this.siteUrl);
|
|
2179
|
+
if (!K(e)) {
|
|
1624
2180
|
this.connectError = this.localize.term("pleaseEnterAValidUrl");
|
|
1625
2181
|
return;
|
|
1626
2182
|
}
|
|
@@ -1663,34 +2219,6 @@ let n = class extends Y {
|
|
|
1663
2219
|
}
|
|
1664
2220
|
});
|
|
1665
2221
|
}
|
|
1666
|
-
retryUpload(t) {
|
|
1667
|
-
this.emit("cx-retry-upload", {
|
|
1668
|
-
detail: {
|
|
1669
|
-
assetId: t
|
|
1670
|
-
}
|
|
1671
|
-
});
|
|
1672
|
-
}
|
|
1673
|
-
pauseUpload(t) {
|
|
1674
|
-
this.emit("cx-pause-upload", {
|
|
1675
|
-
detail: {
|
|
1676
|
-
assetId: t
|
|
1677
|
-
}
|
|
1678
|
-
});
|
|
1679
|
-
}
|
|
1680
|
-
resumeUpload(t) {
|
|
1681
|
-
this.emit("cx-resume-upload", {
|
|
1682
|
-
detail: {
|
|
1683
|
-
assetId: t
|
|
1684
|
-
}
|
|
1685
|
-
});
|
|
1686
|
-
}
|
|
1687
|
-
cancelUpload(t) {
|
|
1688
|
-
this.emit("cx-cancel-upload", {
|
|
1689
|
-
detail: {
|
|
1690
|
-
assetId: t
|
|
1691
|
-
}
|
|
1692
|
-
});
|
|
1693
|
-
}
|
|
1694
2222
|
clearUpload() {
|
|
1695
2223
|
this.emit("cx-clear-upload");
|
|
1696
2224
|
}
|
|
@@ -1699,12 +2227,13 @@ let n = class extends Y {
|
|
|
1699
2227
|
detail: {
|
|
1700
2228
|
settings: {
|
|
1701
2229
|
cacheLocation: this.cacheLocation,
|
|
1702
|
-
cacheSize:
|
|
2230
|
+
cacheSize: et({
|
|
1703
2231
|
decimals: 2,
|
|
1704
|
-
inputUnit:
|
|
2232
|
+
inputUnit: Z,
|
|
1705
2233
|
targetUnit: "B",
|
|
1706
2234
|
value: this.cacheSize
|
|
1707
2235
|
}),
|
|
2236
|
+
cacheUsage: this.settings.cacheUsage,
|
|
1708
2237
|
config: {
|
|
1709
2238
|
latestVersion: this.settings.config.latestVersion,
|
|
1710
2239
|
monitoringActivated: this.settings.config.monitoringActivated,
|
|
@@ -1725,20 +2254,6 @@ let n = class extends Y {
|
|
|
1725
2254
|
}
|
|
1726
2255
|
});
|
|
1727
2256
|
}
|
|
1728
|
-
markFavorite(t) {
|
|
1729
|
-
this.emit("cx-mark-favorite", {
|
|
1730
|
-
detail: {
|
|
1731
|
-
assetId: t
|
|
1732
|
-
}
|
|
1733
|
-
});
|
|
1734
|
-
}
|
|
1735
|
-
unmarkFavorite(t) {
|
|
1736
|
-
this.emit("cx-unmark-favorite", {
|
|
1737
|
-
detail: {
|
|
1738
|
-
assetId: t
|
|
1739
|
-
}
|
|
1740
|
-
});
|
|
1741
|
-
}
|
|
1742
2257
|
openSearch() {
|
|
1743
2258
|
this.emit("cx-open-search");
|
|
1744
2259
|
}
|
|
@@ -1762,7 +2277,7 @@ let n = class extends Y {
|
|
|
1762
2277
|
if (!this.recentAssetsList)
|
|
1763
2278
|
return;
|
|
1764
2279
|
const { clientHeight: t, scrollHeight: e, scrollTop: i } = this.recentAssetsList;
|
|
1765
|
-
!this.isRecentAssetsLoading && this.recentAssets.hasMore && i + t >= e -
|
|
2280
|
+
!this.isRecentAssetsLoading && this.recentAssets.hasMore && i + t >= e - X && (this.isRecentAssetsLoading = !0, this.emit("cx-file-on-demand-load-more", {
|
|
1766
2281
|
detail: {
|
|
1767
2282
|
type: "recent"
|
|
1768
2283
|
}
|
|
@@ -1775,12 +2290,25 @@ let n = class extends Y {
|
|
|
1775
2290
|
if (!this.favoritesAssetsList)
|
|
1776
2291
|
return;
|
|
1777
2292
|
const { clientHeight: t, scrollHeight: e, scrollTop: i } = this.favoritesAssetsList;
|
|
1778
|
-
!this.isFavoriteAssetsLoading && this.favoriteAssets.hasMore && i + t >= e -
|
|
2293
|
+
!this.isFavoriteAssetsLoading && this.favoriteAssets.hasMore && i + t >= e - X && (this.isFavoriteAssetsLoading = !0, this.emit("cx-file-on-demand-load-more", {
|
|
1779
2294
|
detail: {
|
|
1780
2295
|
type: "favorites"
|
|
1781
2296
|
}
|
|
1782
2297
|
}));
|
|
1783
2298
|
}
|
|
2299
|
+
requestMorePinnedAssets() {
|
|
2300
|
+
if (!this.pinnedAssetsList)
|
|
2301
|
+
return;
|
|
2302
|
+
const { clientHeight: t, scrollHeight: e, scrollTop: i } = this.pinnedAssetsList;
|
|
2303
|
+
!this.isPinnedAssetsLoading && this.pinnedAssets.hasMore && i + t >= e - X && (this.isPinnedAssetsLoading = !0, this.emit("cx-file-on-demand-load-more", {
|
|
2304
|
+
detail: {
|
|
2305
|
+
type: "pinned"
|
|
2306
|
+
}
|
|
2307
|
+
}));
|
|
2308
|
+
}
|
|
2309
|
+
onPinnedAssetsChanged() {
|
|
2310
|
+
this.isPinnedAssetsLoading = !1;
|
|
2311
|
+
}
|
|
1784
2312
|
onFavoriteAssetsChanged() {
|
|
1785
2313
|
this.isFavoriteAssetsLoading = !1;
|
|
1786
2314
|
}
|
|
@@ -1788,7 +2316,7 @@ let n = class extends Y {
|
|
|
1788
2316
|
if (!this.uploadsAssetsList)
|
|
1789
2317
|
return;
|
|
1790
2318
|
const { clientHeight: t, scrollHeight: e, scrollTop: i } = this.uploadsAssetsList;
|
|
1791
|
-
!this.isUploadingAssetsLoading && this.uploadingAssets.hasMore && i + t >= e -
|
|
2319
|
+
!this.isUploadingAssetsLoading && this.uploadingAssets.hasMore && i + t >= e - X && (this.isUploadingAssetsLoading = !0, this.emit("cx-file-on-demand-load-more", {
|
|
1792
2320
|
detail: {
|
|
1793
2321
|
type: "uploads"
|
|
1794
2322
|
}
|
|
@@ -1800,9 +2328,9 @@ let n = class extends Y {
|
|
|
1800
2328
|
async updateActiveFolderIdentifiers(t) {
|
|
1801
2329
|
const e = this.rootIDs;
|
|
1802
2330
|
this.rootIDs = t, await this.updateComplete;
|
|
1803
|
-
const i = this.container.querySelectorAll("cx-tree-item"),
|
|
2331
|
+
const i = this.container.querySelectorAll("cx-tree-item"), a = st(this.rootIDs, e);
|
|
1804
2332
|
i.forEach((s) => {
|
|
1805
|
-
|
|
2333
|
+
a.includes(s.dataset.id ?? "") && vt(s);
|
|
1806
2334
|
});
|
|
1807
2335
|
}
|
|
1808
2336
|
// #region Render
|
|
@@ -1810,233 +2338,78 @@ let n = class extends Y {
|
|
|
1810
2338
|
const t = () => {
|
|
1811
2339
|
this.openDrive();
|
|
1812
2340
|
};
|
|
1813
|
-
return
|
|
2341
|
+
return n`
|
|
1814
2342
|
<div class="header">
|
|
1815
2343
|
<div class="header__user">
|
|
1816
2344
|
<cx-avatar
|
|
1817
2345
|
class="header__avatar"
|
|
1818
|
-
image=${this.userAvatarUrl}
|
|
1819
|
-
label=${this.username}
|
|
1820
|
-
></cx-avatar>
|
|
1821
|
-
<div class="header__username">
|
|
1822
|
-
<cx-line-clamp lines="1" class="header__username__text">
|
|
1823
|
-
<cx-typography variant="body3">${this.username}</cx-typography>
|
|
1824
|
-
</cx-line-clamp>
|
|
1825
|
-
</div>
|
|
1826
|
-
</div>
|
|
1827
|
-
<div class="header__actions">
|
|
1828
|
-
<cx-tooltip content=${this.localize.term("search")} hoist>
|
|
1829
|
-
<cx-icon-button
|
|
1830
|
-
data-testid="header__search-button"
|
|
1831
|
-
name="search"
|
|
1832
|
-
@click=${this.openSearch}
|
|
1833
|
-
></cx-icon-button>
|
|
1834
|
-
</cx-tooltip>
|
|
1835
|
-
<cx-tooltip content=${this.localize.term("openDrive")} hoist>
|
|
1836
|
-
<cx-icon-button
|
|
1837
|
-
data-testid="header__drive-button"
|
|
1838
|
-
name="folder_open"
|
|
1839
|
-
@click=${t}
|
|
1840
|
-
></cx-icon-button>
|
|
1841
|
-
</cx-tooltip>
|
|
1842
|
-
<cx-tooltip content=${this.localize.term("settings")} hoist>
|
|
1843
|
-
<cx-icon-button
|
|
1844
|
-
data-testid="header__settings-button"
|
|
1845
|
-
class="header__settings"
|
|
1846
|
-
name="settings"
|
|
1847
|
-
@click=${this.showSettings}
|
|
1848
|
-
>
|
|
1849
|
-
${g(
|
|
1850
|
-
this.hasNewVersion,
|
|
1851
|
-
() => r`<cx-badge
|
|
1852
|
-
class="settings__version__badge"
|
|
1853
|
-
slot="badge"
|
|
1854
|
-
variant="danger"
|
|
1855
|
-
pill
|
|
1856
|
-
size="x-small"
|
|
1857
|
-
></cx-badge>`
|
|
1858
|
-
)}
|
|
1859
|
-
</cx-icon-button>
|
|
1860
|
-
</cx-tooltip>
|
|
1861
|
-
</div>
|
|
1862
|
-
</div>
|
|
1863
|
-
`;
|
|
1864
|
-
}
|
|
1865
|
-
// #region Assets
|
|
1866
|
-
renderAsset(t, e) {
|
|
1867
|
-
const i = r`
|
|
1868
|
-
${this.renderProgress({
|
|
1869
|
-
isPaused: t.isPaused,
|
|
1870
|
-
progress: (t.size ?? 0) - (t.remainingSize ?? 0),
|
|
1871
|
-
remainingTime: t.remainingTime,
|
|
1872
|
-
size: t.size ?? 0,
|
|
1873
|
-
timestamp: t.uploadTimestamp,
|
|
1874
|
-
uploadErrorMessage: t.uploadErrorMessage,
|
|
1875
|
-
uploadStatus: t.uploadStatus
|
|
1876
|
-
})}
|
|
1877
|
-
`, o = (I) => {
|
|
1878
|
-
I.target && I.target.parentElement.classList.add("placeholder");
|
|
1879
|
-
}, s = (I) => {
|
|
1880
|
-
I.target && I.target.parentElement.classList.remove("placeholder");
|
|
1881
|
-
}, a = pe.includes(
|
|
1882
|
-
(t.docType ?? "").toLowerCase()
|
|
1883
|
-
), l = r`<div
|
|
1884
|
-
class=${A({
|
|
1885
|
-
asset__thumbnail: !0,
|
|
1886
|
-
"asset__thumbnail--folder": a,
|
|
1887
|
-
"asset__thumbnail--placeholder": !t.thumbnail?.trim()
|
|
1888
|
-
})}
|
|
1889
|
-
>
|
|
1890
|
-
${g(
|
|
1891
|
-
a,
|
|
1892
|
-
() => r`<cx-icon
|
|
1893
|
-
class="asset__folder__icon"
|
|
1894
|
-
name="folder_special"
|
|
1895
|
-
></cx-icon>`,
|
|
1896
|
-
() => r`<img
|
|
1897
|
-
class="asset__thumbnail__image"
|
|
1898
|
-
src=${t.thumbnail}
|
|
1899
|
-
@error=${o}
|
|
1900
|
-
@load=${s}
|
|
1901
|
-
/>
|
|
1902
|
-
<cx-icon
|
|
1903
|
-
class="asset__thumbnail__icon"
|
|
1904
|
-
name="insert_drive_file"
|
|
1905
|
-
variant="filled"
|
|
1906
|
-
></cx-icon>
|
|
1907
|
-
<div class="asset__thumbnail__extension">
|
|
1908
|
-
<cx-line-clamp
|
|
1909
|
-
class="asset__thumbnail__extension__line-clamp"
|
|
1910
|
-
lines="1"
|
|
1911
|
-
>
|
|
1912
|
-
<cx-typography
|
|
1913
|
-
class="asset__thumbnail__extension__text"
|
|
1914
|
-
variant="small"
|
|
1915
|
-
>
|
|
1916
|
-
${ge(t.fileName)}
|
|
1917
|
-
</cx-typography>
|
|
1918
|
-
</cx-line-clamp>
|
|
1919
|
-
</div>`
|
|
1920
|
-
)}
|
|
1921
|
-
</div>`, d = () => {
|
|
1922
|
-
this.openDrive(t);
|
|
1923
|
-
}, m = () => {
|
|
1924
|
-
t.isInFavorite ? this.unmarkFavorite(t.recordId) : this.markFavorite(t.recordId);
|
|
1925
|
-
}, u = r`<cx-tooltip
|
|
1926
|
-
content=${this.localize.term("openInDrive")}
|
|
1927
|
-
hoist
|
|
1928
|
-
>
|
|
1929
|
-
<cx-icon-button
|
|
1930
|
-
data-testid="asset__drive-button"
|
|
1931
|
-
name="folder_open"
|
|
1932
|
-
@click=${d}
|
|
1933
|
-
></cx-icon-button>
|
|
1934
|
-
</cx-tooltip>
|
|
1935
|
-
${g(
|
|
1936
|
-
this.favoriteInProgressAssets.includes(t.recordId),
|
|
1937
|
-
() => r`<cx-spinner class="favorite__spinner"></cx-spinner>`,
|
|
1938
|
-
() => r`<cx-tooltip
|
|
1939
|
-
content=${t.isInFavorite ? this.localize.term("unfavorite") : this.localize.term("favorite")}
|
|
1940
|
-
hoist
|
|
1941
|
-
>
|
|
1942
|
-
<cx-icon-button
|
|
1943
|
-
data-testid="asset__favorite-button"
|
|
1944
|
-
name="star"
|
|
1945
|
-
variant=${t.isInFavorite ? "filled" : "outlined"}
|
|
1946
|
-
@click=${m}
|
|
1947
|
-
></cx-icon-button>
|
|
1948
|
-
</cx-tooltip>`
|
|
1949
|
-
)} `, h = () => {
|
|
1950
|
-
t.uploadId && this.retryUpload(t.uploadId);
|
|
1951
|
-
}, f = () => {
|
|
1952
|
-
t.uploadId && (t.isPaused ? this.resumeUpload(t.uploadId) : this.pauseUpload(t.uploadId));
|
|
1953
|
-
}, _ = r`</cx-tooltip
|
|
1954
|
-
><cx-tooltip content=${this.localize.term("retry")} hoist>
|
|
1955
|
-
<cx-icon-button
|
|
1956
|
-
data-testid="asset__retry-button"
|
|
1957
|
-
name="refresh"
|
|
1958
|
-
@click=${h}
|
|
1959
|
-
></cx-icon-button>
|
|
1960
|
-
</cx-tooltip>`, z = r`<cx-tooltip
|
|
1961
|
-
content=${t.isPaused ? this.localize.term("resume") : this.localize.term("pause")}
|
|
1962
|
-
hoist
|
|
1963
|
-
>
|
|
1964
|
-
<cx-icon-button
|
|
1965
|
-
data-testid=${t.isPaused ? "asset__resume-button" : "asset__pause-button"}
|
|
1966
|
-
name=${t.isPaused ? "play_arrow" : "pause"}
|
|
1967
|
-
variant="filled"
|
|
1968
|
-
@click=${f}
|
|
1969
|
-
></cx-icon-button>
|
|
1970
|
-
</cx-tooltip>`;
|
|
1971
|
-
return r`
|
|
1972
|
-
<div
|
|
1973
|
-
data-id=${t.recordId}
|
|
1974
|
-
data-testid=${`asset-${t.uploadStatus}`}
|
|
1975
|
-
class="asset"
|
|
1976
|
-
>
|
|
1977
|
-
${l}
|
|
1978
|
-
<div class="asset__description">
|
|
1979
|
-
<div class="asset__description__label">
|
|
1980
|
-
<cx-line-clamp class="asset__description__label__text" lines="1">
|
|
1981
|
-
<cx-typography variant="body3">${t.fileName}</cx-typography>
|
|
1982
|
-
</cx-line-clamp>
|
|
1983
|
-
</div>
|
|
1984
|
-
<div class="asset__description__status">
|
|
1985
|
-
${g(
|
|
1986
|
-
e === b.RECENT,
|
|
1987
|
-
() => r`
|
|
1988
|
-
<cx-typography
|
|
1989
|
-
variant="small"
|
|
1990
|
-
class="asset__description__status__time"
|
|
1991
|
-
>
|
|
1992
|
-
<cx-relative-time
|
|
1993
|
-
format="narrow"
|
|
1994
|
-
numeric="always"
|
|
1995
|
-
date=${new Date(t.uploadTimestamp)}
|
|
1996
|
-
sync
|
|
1997
|
-
sync-interval=${U}
|
|
1998
|
-
></cx-relative-time>
|
|
1999
|
-
</cx-typography>
|
|
2000
|
-
`
|
|
2001
|
-
)}
|
|
2002
|
-
${g(
|
|
2003
|
-
e === b.UPLOADS,
|
|
2004
|
-
() => i
|
|
2005
|
-
)}
|
|
2346
|
+
image=${this.userAvatarUrl}
|
|
2347
|
+
label=${this.username}
|
|
2348
|
+
></cx-avatar>
|
|
2349
|
+
<div class="header__username">
|
|
2350
|
+
<cx-line-clamp lines="1" class="header__username__text">
|
|
2351
|
+
<cx-typography variant="body3">${this.username}</cx-typography>
|
|
2352
|
+
</cx-line-clamp>
|
|
2006
2353
|
</div>
|
|
2007
2354
|
</div>
|
|
2008
|
-
<div class="
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2355
|
+
<div class="header__actions">
|
|
2356
|
+
<cx-tooltip content=${this.localize.term("search")} hoist>
|
|
2357
|
+
<cx-icon-button
|
|
2358
|
+
data-testid="header__search-button"
|
|
2359
|
+
name="search"
|
|
2360
|
+
@click=${this.openSearch}
|
|
2361
|
+
></cx-icon-button>
|
|
2362
|
+
</cx-tooltip>
|
|
2363
|
+
<cx-tooltip content=${this.localize.term("openDrive")} hoist>
|
|
2364
|
+
<cx-icon-button
|
|
2365
|
+
data-testid="header__drive-button"
|
|
2366
|
+
name="folder_open"
|
|
2367
|
+
@click=${t}
|
|
2368
|
+
></cx-icon-button>
|
|
2369
|
+
</cx-tooltip>
|
|
2370
|
+
<cx-tooltip content=${this.localize.term("settings")} hoist>
|
|
2371
|
+
<cx-icon-button
|
|
2372
|
+
data-testid="header__settings-button"
|
|
2373
|
+
class="header__settings"
|
|
2374
|
+
name="settings"
|
|
2375
|
+
@click=${this.showSettings}
|
|
2376
|
+
>
|
|
2377
|
+
${p(
|
|
2378
|
+
this.hasNewVersion,
|
|
2379
|
+
() => n`<cx-badge
|
|
2380
|
+
class="settings__version__badge"
|
|
2381
|
+
slot="badge"
|
|
2382
|
+
variant="danger"
|
|
2383
|
+
pill
|
|
2384
|
+
size="x-small"
|
|
2385
|
+
></cx-badge>`
|
|
2024
2386
|
)}
|
|
2387
|
+
</cx-icon-button>
|
|
2388
|
+
</cx-tooltip>
|
|
2025
2389
|
</div>
|
|
2026
2390
|
</div>
|
|
2027
2391
|
`;
|
|
2028
2392
|
}
|
|
2393
|
+
// #region Assets
|
|
2394
|
+
renderAsset(t, e) {
|
|
2395
|
+
return n`<cx-file-on-demand-asset
|
|
2396
|
+
.asset=${t}
|
|
2397
|
+
.listType=${e}
|
|
2398
|
+
.favoriteInProgressAssets=${this.favoriteInProgressAssets}
|
|
2399
|
+
.pinInProgressAssets=${this.pinInProgressAssets}
|
|
2400
|
+
></cx-file-on-demand-asset>`;
|
|
2401
|
+
}
|
|
2029
2402
|
renderRecentAssets() {
|
|
2030
|
-
const t =
|
|
2031
|
-
<div class="recent-empty">
|
|
2403
|
+
const t = n`
|
|
2404
|
+
<div class="recent-empty assets-list__tab-group__empty-message">
|
|
2032
2405
|
<cx-icon class="empty-icon" name="explore"></cx-icon>
|
|
2033
2406
|
<cx-typography variant="body2">
|
|
2034
2407
|
${this.localize.term("allViewedAssetsWillBeVisibleHere")}
|
|
2035
2408
|
</cx-typography>
|
|
2036
2409
|
</div>
|
|
2037
|
-
`, [e, i] =
|
|
2410
|
+
`, [e, i] = ut(
|
|
2038
2411
|
this.recentAssets.assets
|
|
2039
|
-
),
|
|
2412
|
+
), a = n`
|
|
2040
2413
|
<div class="recent__list" @scroll=${this.requestMoreRecentAssets}>
|
|
2041
2414
|
<div
|
|
2042
2415
|
class=${A({
|
|
@@ -2050,10 +2423,10 @@ let n = class extends Y {
|
|
|
2050
2423
|
${this.localize.term("today")}
|
|
2051
2424
|
</cx-typography>
|
|
2052
2425
|
</div>
|
|
2053
|
-
${
|
|
2426
|
+
${U(
|
|
2054
2427
|
e,
|
|
2055
2428
|
(s) => s.recordId,
|
|
2056
|
-
(s) => this.renderAsset(s,
|
|
2429
|
+
(s) => this.renderAsset(s, x.RECENT)
|
|
2057
2430
|
)}
|
|
2058
2431
|
</div>
|
|
2059
2432
|
<div
|
|
@@ -2067,48 +2440,49 @@ let n = class extends Y {
|
|
|
2067
2440
|
${this.localize.term("allOther")}
|
|
2068
2441
|
</cx-typography>
|
|
2069
2442
|
</div>
|
|
2070
|
-
${
|
|
2443
|
+
${U(
|
|
2071
2444
|
i,
|
|
2072
2445
|
(s) => s.recordId,
|
|
2073
|
-
(s) => this.renderAsset(s,
|
|
2446
|
+
(s) => this.renderAsset(s, x.RECENT)
|
|
2074
2447
|
)}
|
|
2075
2448
|
</div>
|
|
2076
2449
|
</div>
|
|
2077
2450
|
`;
|
|
2078
|
-
return
|
|
2451
|
+
return n`
|
|
2079
2452
|
<cx-tab-panel
|
|
2080
|
-
name=${
|
|
2453
|
+
name=${x.RECENT}
|
|
2081
2454
|
class="assets-list__recent-tab-panel"
|
|
2082
2455
|
>
|
|
2083
|
-
${
|
|
2456
|
+
${p(
|
|
2084
2457
|
this.recentAssets.assets.length > 0,
|
|
2085
|
-
() =>
|
|
2458
|
+
() => a,
|
|
2086
2459
|
() => t
|
|
2087
2460
|
)}
|
|
2088
2461
|
</cx-tab-panel>
|
|
2089
2462
|
`;
|
|
2090
2463
|
}
|
|
2091
2464
|
renderFavoriteAssets() {
|
|
2092
|
-
const t =
|
|
2093
|
-
<div class="favorites-empty">
|
|
2465
|
+
const t = n`
|
|
2466
|
+
<div class="favorites-empty assets-list__tab-group__empty-message">
|
|
2094
2467
|
<cx-icon class="empty-icon" name="star"></cx-icon>
|
|
2095
2468
|
<cx-typography variant="body2">
|
|
2096
2469
|
${this.localize.term("allFavoriteAssetsWillBeVisibleHere")}
|
|
2097
2470
|
</cx-typography>
|
|
2098
2471
|
</div>
|
|
2099
|
-
`, e = this.favoriteAssets.assets
|
|
2100
|
-
(o, s) => s.uploadTimestamp - o.uploadTimestamp
|
|
2101
|
-
), i = r`
|
|
2472
|
+
`, e = mt(this.favoriteAssets.assets), i = n`
|
|
2102
2473
|
<div class="favorites__list" @scroll=${this.requestMoreFavoriteAssets}>
|
|
2103
|
-
${
|
|
2474
|
+
${U(
|
|
2104
2475
|
e,
|
|
2105
|
-
(
|
|
2106
|
-
(
|
|
2476
|
+
(a) => a.recordId,
|
|
2477
|
+
(a) => this.renderAsset(a, x.FAVORITES)
|
|
2107
2478
|
)}
|
|
2108
2479
|
</div>
|
|
2109
2480
|
`;
|
|
2110
|
-
return
|
|
2111
|
-
<cx-tab-panel
|
|
2481
|
+
return n`
|
|
2482
|
+
<cx-tab-panel
|
|
2483
|
+
name=${x.FAVORITES}
|
|
2484
|
+
class="assets-list__favorites-tab-panel"
|
|
2485
|
+
>
|
|
2112
2486
|
<div class="favorites-tab-panel__content">
|
|
2113
2487
|
<div class="asset-group__label favorites__sync-time">
|
|
2114
2488
|
<cx-typography variant="small">
|
|
@@ -2118,11 +2492,11 @@ let n = class extends Y {
|
|
|
2118
2492
|
numeric="always"
|
|
2119
2493
|
date=${new Date(this.favoritesLastSync)}
|
|
2120
2494
|
sync
|
|
2121
|
-
sync-interval=${
|
|
2495
|
+
sync-interval=${O}
|
|
2122
2496
|
></cx-relative-time>
|
|
2123
2497
|
</cx-typography>
|
|
2124
2498
|
</div>
|
|
2125
|
-
${
|
|
2499
|
+
${p(
|
|
2126
2500
|
e.length > 0,
|
|
2127
2501
|
() => i,
|
|
2128
2502
|
() => t
|
|
@@ -2131,141 +2505,17 @@ let n = class extends Y {
|
|
|
2131
2505
|
</cx-tab-panel>
|
|
2132
2506
|
`;
|
|
2133
2507
|
}
|
|
2134
|
-
renderProgress({
|
|
2135
|
-
isPaused: t = !1,
|
|
2136
|
-
progress: e = 0,
|
|
2137
|
-
remainingTime: i,
|
|
2138
|
-
size: o = 0,
|
|
2139
|
-
timestamp: s = Date.now(),
|
|
2140
|
-
uploadErrorMessage: a,
|
|
2141
|
-
uploadStatus: l = T.InProgress
|
|
2142
|
-
}) {
|
|
2143
|
-
const d = o > 0 ? e * 100 / o : 0, m = l === T.InProgress ? d : 100, u = r`
|
|
2144
|
-
<div class="uploading-progress">
|
|
2145
|
-
${g(!t, () => r`<cx-icon name="arrow_upward"></cx-icon>`)}
|
|
2146
|
-
<cx-typography variant="small">
|
|
2147
|
-
<cx-line-clamp lines="1">
|
|
2148
|
-
${g(t, () => r`${this.localize.term("paused")} ‧`)}
|
|
2149
|
-
<cx-format-bytes .value=${e}></cx-format-bytes>
|
|
2150
|
-
of
|
|
2151
|
-
<cx-format-bytes .value=${o}></cx-format-bytes>
|
|
2152
|
-
(${new Intl.NumberFormat("en-IN", {
|
|
2153
|
-
maximumFractionDigits: 2
|
|
2154
|
-
}).format(d)}%)
|
|
2155
|
-
${g(
|
|
2156
|
-
!!i && !t,
|
|
2157
|
-
() => r`‧
|
|
2158
|
-
<cx-relative-time
|
|
2159
|
-
format="narrow"
|
|
2160
|
-
numeric="always"
|
|
2161
|
-
date=${new Date(Date.now() + (i ?? 0))}
|
|
2162
|
-
sync
|
|
2163
|
-
sync-interval=${U}
|
|
2164
|
-
></cx-relative-time>`
|
|
2165
|
-
)}
|
|
2166
|
-
</cx-line-clamp>
|
|
2167
|
-
</cx-typography>
|
|
2168
|
-
</div>
|
|
2169
|
-
`, h = r`
|
|
2170
|
-
<div class="syncing-progress">
|
|
2171
|
-
<cx-icon name="cached"></cx-icon>
|
|
2172
|
-
<cx-typography variant="small">
|
|
2173
|
-
<cx-line-clamp lines="1">
|
|
2174
|
-
${this.localize.term("syncing")} ‧
|
|
2175
|
-
<cx-relative-time
|
|
2176
|
-
format="narrow"
|
|
2177
|
-
numeric="always"
|
|
2178
|
-
date=${new Date(s)}
|
|
2179
|
-
sync
|
|
2180
|
-
sync-interval=${U}
|
|
2181
|
-
></cx-relative-time>
|
|
2182
|
-
</cx-line-clamp>
|
|
2183
|
-
</cx-typography>
|
|
2184
|
-
</div>
|
|
2185
|
-
`, f = r`
|
|
2186
|
-
<div class="completed-progress">
|
|
2187
|
-
<cx-icon name="check"></cx-icon>
|
|
2188
|
-
<cx-typography variant="small">
|
|
2189
|
-
<cx-line-clamp lines="1">
|
|
2190
|
-
${this.localize.term("readyToUse")} ‧
|
|
2191
|
-
<cx-relative-time
|
|
2192
|
-
format="narrow"
|
|
2193
|
-
numeric="always"
|
|
2194
|
-
date=${new Date(s)}
|
|
2195
|
-
sync
|
|
2196
|
-
sync-interval=${U}
|
|
2197
|
-
></cx-relative-time>
|
|
2198
|
-
</cx-line-clamp>
|
|
2199
|
-
</cx-typography>
|
|
2200
|
-
</div>
|
|
2201
|
-
`, _ = r`
|
|
2202
|
-
<div class="failed-progress">
|
|
2203
|
-
<cx-typography variant="small">
|
|
2204
|
-
<cx-line-clamp lines="1">
|
|
2205
|
-
<cx-tooltip content=${a}>
|
|
2206
|
-
<span class="failed-progress__text">
|
|
2207
|
-
${this.localize.term("uploadFailed")} ‧
|
|
2208
|
-
</span>
|
|
2209
|
-
</cx-tooltip>
|
|
2210
|
-
<cx-relative-time
|
|
2211
|
-
format="narrow"
|
|
2212
|
-
numeric="always"
|
|
2213
|
-
date=${new Date(s)}
|
|
2214
|
-
sync
|
|
2215
|
-
sync-interval=${U}
|
|
2216
|
-
></cx-relative-time>
|
|
2217
|
-
</cx-line-clamp>
|
|
2218
|
-
</cx-typography>
|
|
2219
|
-
</div>
|
|
2220
|
-
`, z = r`
|
|
2221
|
-
<div class="canceled-progress">
|
|
2222
|
-
<cx-icon name="cancel"></cx-icon>
|
|
2223
|
-
<cx-typography variant="small">
|
|
2224
|
-
<cx-line-clamp lines="1">
|
|
2225
|
-
${this.localize.term("canceled")} ‧
|
|
2226
|
-
<cx-relative-time
|
|
2227
|
-
format="narrow"
|
|
2228
|
-
numeric="always"
|
|
2229
|
-
date=${new Date(s)}
|
|
2230
|
-
sync
|
|
2231
|
-
sync-interval=${U}
|
|
2232
|
-
></cx-relative-time>
|
|
2233
|
-
</cx-line-clamp>
|
|
2234
|
-
</cx-typography>
|
|
2235
|
-
</div>
|
|
2236
|
-
`;
|
|
2237
|
-
return r`
|
|
2238
|
-
${g(
|
|
2239
|
-
l === T.InProgress,
|
|
2240
|
-
() => r`<cx-progress-bar
|
|
2241
|
-
style=${Xt({
|
|
2242
|
-
"--color": t ? "var(--cx-color-warning-500)" : "var(--cx-color-primary-500)"
|
|
2243
|
-
})}
|
|
2244
|
-
.value=${m.toFixed(0)}
|
|
2245
|
-
class="progress-bar"
|
|
2246
|
-
></cx-progress-bar
|
|
2247
|
-
>${u}`
|
|
2248
|
-
)}
|
|
2249
|
-
${g(
|
|
2250
|
-
l === T.PendingComplete,
|
|
2251
|
-
() => h
|
|
2252
|
-
)}
|
|
2253
|
-
${g(l === T.Success, () => f)}
|
|
2254
|
-
${g(l === T.Failed, () => _)}
|
|
2255
|
-
${g(l === T.Canceled, () => z)}
|
|
2256
|
-
`;
|
|
2257
|
-
}
|
|
2258
2508
|
renderUploadingAssets() {
|
|
2259
|
-
const t =
|
|
2260
|
-
<div class="uploads-empty">
|
|
2509
|
+
const t = n`
|
|
2510
|
+
<div class="uploads-empty assets-list__tab-group__empty-message">
|
|
2261
2511
|
<cx-icon class="empty-icon" name="arrow_upward"></cx-icon>
|
|
2262
2512
|
<cx-typography variant="body2">
|
|
2263
2513
|
${this.localize.term("allAssetUploadsWillBeVisibleHere")}
|
|
2264
2514
|
</cx-typography>
|
|
2265
2515
|
</div>
|
|
2266
|
-
`, [e, i] =
|
|
2516
|
+
`, [e, i] = ut(
|
|
2267
2517
|
this.uploadingAssets.assets
|
|
2268
|
-
),
|
|
2518
|
+
), a = n`
|
|
2269
2519
|
<div class="uploads__list" @scroll=${this.requestMoreUploadingAssets}>
|
|
2270
2520
|
<div
|
|
2271
2521
|
class=${A({
|
|
@@ -2287,10 +2537,10 @@ let n = class extends Y {
|
|
|
2287
2537
|
${this.localize.term("clearAll")}
|
|
2288
2538
|
</cx-button>
|
|
2289
2539
|
</div>
|
|
2290
|
-
${
|
|
2540
|
+
${U(
|
|
2291
2541
|
e,
|
|
2292
2542
|
(s) => s.recordId,
|
|
2293
|
-
(s) => this.renderAsset(s,
|
|
2543
|
+
(s) => this.renderAsset(s, x.UPLOADS)
|
|
2294
2544
|
)}
|
|
2295
2545
|
</div>
|
|
2296
2546
|
<div
|
|
@@ -2304,39 +2554,77 @@ let n = class extends Y {
|
|
|
2304
2554
|
${this.localize.term("allOther")}
|
|
2305
2555
|
</cx-typography>
|
|
2306
2556
|
</div>
|
|
2307
|
-
${
|
|
2557
|
+
${U(
|
|
2308
2558
|
i,
|
|
2309
2559
|
(s) => s.recordId,
|
|
2310
|
-
(s) => this.renderAsset(s,
|
|
2560
|
+
(s) => this.renderAsset(s, x.UPLOADS)
|
|
2311
2561
|
)}
|
|
2312
2562
|
</div>
|
|
2313
2563
|
</div>
|
|
2314
2564
|
`;
|
|
2315
|
-
return
|
|
2316
|
-
<cx-tab-panel
|
|
2317
|
-
|
|
2565
|
+
return n`
|
|
2566
|
+
<cx-tab-panel
|
|
2567
|
+
name=${x.UPLOADS}
|
|
2568
|
+
class="assets-list__uploads-tab-panel"
|
|
2569
|
+
>
|
|
2570
|
+
${p(
|
|
2318
2571
|
this.uploadingAssets.assets.length > 0,
|
|
2319
|
-
() =>
|
|
2572
|
+
() => a,
|
|
2573
|
+
() => t
|
|
2574
|
+
)}
|
|
2575
|
+
</cx-tab-panel>
|
|
2576
|
+
`;
|
|
2577
|
+
}
|
|
2578
|
+
renderPinnedAssets() {
|
|
2579
|
+
const t = n`
|
|
2580
|
+
<div class="pinned-empty assets-list__tab-group__empty-message">
|
|
2581
|
+
<cx-icon class="empty-icon" name="keep"></cx-icon>
|
|
2582
|
+
<cx-typography variant="body2">
|
|
2583
|
+
${this.localize.term("allPinnedAssetsWillBeVisibleHere")}
|
|
2584
|
+
</cx-typography>
|
|
2585
|
+
</div>
|
|
2586
|
+
`, e = mt(this.pinnedAssets.assets), i = n`
|
|
2587
|
+
<div class="pinned__list" @scroll=${this.requestMorePinnedAssets}>
|
|
2588
|
+
${U(
|
|
2589
|
+
e,
|
|
2590
|
+
(a) => a.recordId,
|
|
2591
|
+
(a) => this.renderAsset(a, x.PINNED)
|
|
2592
|
+
)}
|
|
2593
|
+
</div>
|
|
2594
|
+
`;
|
|
2595
|
+
return n`
|
|
2596
|
+
<cx-tab-panel
|
|
2597
|
+
name=${x.PINNED}
|
|
2598
|
+
class="assets-list__pinned-tab-panel"
|
|
2599
|
+
>
|
|
2600
|
+
<div class="pinned-tab-panel__content">
|
|
2601
|
+
${p(
|
|
2602
|
+
e.length > 0,
|
|
2603
|
+
() => i,
|
|
2320
2604
|
() => t
|
|
2321
2605
|
)}
|
|
2606
|
+
</div>
|
|
2322
2607
|
</cx-tab-panel>
|
|
2323
2608
|
`;
|
|
2324
2609
|
}
|
|
2325
2610
|
renderAssetsList() {
|
|
2326
|
-
return
|
|
2611
|
+
return n`
|
|
2327
2612
|
<div class="assets-list">
|
|
2328
2613
|
<cx-tab-group
|
|
2329
2614
|
@cx-tab-show=${async (e) => {
|
|
2330
2615
|
switch (await e.target.updateComplete, e.detail.name) {
|
|
2331
|
-
case
|
|
2616
|
+
case x.RECENT:
|
|
2332
2617
|
this.requestMoreRecentAssets();
|
|
2333
2618
|
break;
|
|
2334
|
-
case
|
|
2619
|
+
case x.FAVORITES:
|
|
2335
2620
|
this.requestMoreFavoriteAssets();
|
|
2336
2621
|
break;
|
|
2337
|
-
case
|
|
2622
|
+
case x.UPLOADS:
|
|
2338
2623
|
this.requestMoreUploadingAssets();
|
|
2339
2624
|
break;
|
|
2625
|
+
case x.PINNED:
|
|
2626
|
+
this.requestMorePinnedAssets();
|
|
2627
|
+
break;
|
|
2340
2628
|
}
|
|
2341
2629
|
}}
|
|
2342
2630
|
no-scroll-controls
|
|
@@ -2346,32 +2634,39 @@ let n = class extends Y {
|
|
|
2346
2634
|
active
|
|
2347
2635
|
data-testid="assets-list__recent-tab"
|
|
2348
2636
|
slot="nav"
|
|
2349
|
-
panel=${
|
|
2637
|
+
panel=${x.RECENT}
|
|
2350
2638
|
>
|
|
2351
2639
|
${this.localize.term("recent")}
|
|
2352
2640
|
</cx-tab>
|
|
2641
|
+
<cx-tab
|
|
2642
|
+
data-testid="assets-list__pins-tab"
|
|
2643
|
+
slot="nav"
|
|
2644
|
+
panel=${x.PINNED}
|
|
2645
|
+
>
|
|
2646
|
+
${this.localize.term("pins")}
|
|
2647
|
+
</cx-tab>
|
|
2353
2648
|
<cx-tab
|
|
2354
2649
|
data-testid="assets-list__favorites-tab"
|
|
2355
2650
|
slot="nav"
|
|
2356
|
-
panel=${
|
|
2651
|
+
panel=${x.FAVORITES}
|
|
2357
2652
|
>
|
|
2358
2653
|
${this.localize.term("favorites")}
|
|
2359
2654
|
</cx-tab>
|
|
2360
2655
|
<cx-tab
|
|
2361
2656
|
data-testid="assets-list__uploads-tab"
|
|
2362
2657
|
slot="nav"
|
|
2363
|
-
panel=${
|
|
2658
|
+
panel=${x.UPLOADS}
|
|
2364
2659
|
>
|
|
2365
2660
|
${this.localize.term("uploads")}
|
|
2366
2661
|
</cx-tab>
|
|
2367
2662
|
${this.renderRecentAssets()} ${this.renderFavoriteAssets()}
|
|
2368
|
-
${this.renderUploadingAssets()}
|
|
2663
|
+
${this.renderUploadingAssets()} ${this.renderPinnedAssets()}
|
|
2369
2664
|
</cx-tab-group>
|
|
2370
2665
|
</div>
|
|
2371
2666
|
`;
|
|
2372
2667
|
}
|
|
2373
2668
|
renderAssetsView() {
|
|
2374
|
-
return
|
|
2669
|
+
return n`
|
|
2375
2670
|
<div class="assets">
|
|
2376
2671
|
${this.renderHeader()}${this.renderAssetsList()}${this.renderStatusFooter()}
|
|
2377
2672
|
</div>
|
|
@@ -2392,49 +2687,49 @@ let n = class extends Y {
|
|
|
2392
2687
|
s?.target && s.target !== this.dialog || (this.folderTree.resetTree(), this.folderTree.rootIDs = [], this.folderTree.removedIDs = [], this.dialog.hide(), this.searchText = "");
|
|
2393
2688
|
}, i = async () => {
|
|
2394
2689
|
this.isAddingRootIDs = !0, await this.updateComplete, this.searchText = "";
|
|
2395
|
-
const s = this.rootIDs.filter((
|
|
2690
|
+
const s = this.rootIDs.filter((h) => {
|
|
2396
2691
|
if (!this.folderTree.shadowRoot?.querySelector(
|
|
2397
|
-
`[data-id="${
|
|
2692
|
+
`[data-id="${S(h).id}"]`
|
|
2398
2693
|
))
|
|
2399
2694
|
return !0;
|
|
2400
|
-
}),
|
|
2695
|
+
}), o = /* @__PURE__ */ new Set([
|
|
2401
2696
|
...this.folderTree.currentRootIDs,
|
|
2402
2697
|
...s
|
|
2403
2698
|
]);
|
|
2404
|
-
for (const
|
|
2405
|
-
const
|
|
2406
|
-
(
|
|
2699
|
+
for (const h of o) {
|
|
2700
|
+
const _ = R(S(h).path), m = this.folderTree.removedIDs.filter(
|
|
2701
|
+
(g) => R(S(g).path).startsWith(_)
|
|
2407
2702
|
);
|
|
2408
|
-
if (
|
|
2409
|
-
const { totalCount:
|
|
2410
|
-
excludes:
|
|
2411
|
-
folderId:
|
|
2703
|
+
if (m.length > 0) {
|
|
2704
|
+
const { totalCount: g } = await this.fetchFolders({
|
|
2705
|
+
excludes: m.map((f) => S(f).id),
|
|
2706
|
+
folderId: S(h).id,
|
|
2412
2707
|
start: 0
|
|
2413
|
-
}), { data:
|
|
2414
|
-
excludes:
|
|
2415
|
-
folderId:
|
|
2416
|
-
limit:
|
|
2708
|
+
}), { data: b } = await this.fetchFolders({
|
|
2709
|
+
excludes: m.map((f) => S(f).id),
|
|
2710
|
+
folderId: S(h).id,
|
|
2711
|
+
limit: g || 10,
|
|
2417
2712
|
start: 0
|
|
2418
2713
|
});
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2714
|
+
b.forEach((f) => {
|
|
2715
|
+
o.add(
|
|
2716
|
+
N({ id: f.id, path: f.fullPath })
|
|
2422
2717
|
);
|
|
2423
|
-
}),
|
|
2718
|
+
}), o.delete(h);
|
|
2424
2719
|
}
|
|
2425
2720
|
}
|
|
2426
|
-
const l = Array.from(
|
|
2721
|
+
const l = Array.from(o);
|
|
2427
2722
|
this.updateActiveFolderIdentifiers(l), this.removedIds = l.filter(
|
|
2428
|
-
(
|
|
2429
|
-
const
|
|
2430
|
-
return
|
|
2723
|
+
(h) => [...l].some((_) => {
|
|
2724
|
+
const m = S(h), g = S(_), b = R(g.path);
|
|
2725
|
+
return _ !== h && m.path.startsWith(b);
|
|
2431
2726
|
})
|
|
2432
2727
|
), e(), this.isAddingRootIDs = !1;
|
|
2433
|
-
},
|
|
2434
|
-
const
|
|
2435
|
-
this.searchText = (
|
|
2728
|
+
}, a = (s) => {
|
|
2729
|
+
const o = s.target;
|
|
2730
|
+
this.searchText = (o.value ?? "").trim();
|
|
2436
2731
|
};
|
|
2437
|
-
return
|
|
2732
|
+
return n`
|
|
2438
2733
|
<cx-dialog
|
|
2439
2734
|
class="select-folders-popup"
|
|
2440
2735
|
no-header
|
|
@@ -2444,7 +2739,7 @@ let n = class extends Y {
|
|
|
2444
2739
|
<cx-input
|
|
2445
2740
|
autofocus
|
|
2446
2741
|
clearable
|
|
2447
|
-
@cx-input=${
|
|
2742
|
+
@cx-input=${a}
|
|
2448
2743
|
value=${this.searchText}
|
|
2449
2744
|
placeholder=${this.localize.term("search")}
|
|
2450
2745
|
>
|
|
@@ -2472,7 +2767,7 @@ let n = class extends Y {
|
|
|
2472
2767
|
}
|
|
2473
2768
|
renderSelectableFolderTree() {
|
|
2474
2769
|
const t = this.availableFolderIdentifiers;
|
|
2475
|
-
return
|
|
2770
|
+
return n`
|
|
2476
2771
|
<cx-folder-tree
|
|
2477
2772
|
class="selectable-folder-tree"
|
|
2478
2773
|
.siteUrl=${this.settings.config.siteUrl}
|
|
@@ -2489,20 +2784,20 @@ let n = class extends Y {
|
|
|
2489
2784
|
}
|
|
2490
2785
|
renderRootFolderTree() {
|
|
2491
2786
|
if (!this.rootIDs.length)
|
|
2492
|
-
return
|
|
2787
|
+
return Ut;
|
|
2493
2788
|
const t = this.rootIDs.filter(
|
|
2494
|
-
(
|
|
2495
|
-
), e = (
|
|
2789
|
+
(a) => !this.removedIds.includes(a)
|
|
2790
|
+
), e = (a) => {
|
|
2496
2791
|
this.updateActiveFolderIdentifiers(
|
|
2497
2792
|
t.filter(
|
|
2498
|
-
(s) =>
|
|
2793
|
+
(s) => S(s).id !== a
|
|
2499
2794
|
)
|
|
2500
2795
|
), this.folderTree.rootIDs = this.rootIDs, this.folderTree.resetTree();
|
|
2501
|
-
}, i = (
|
|
2502
|
-
const { id: s, path:
|
|
2796
|
+
}, i = (a) => {
|
|
2797
|
+
const { id: s, path: o } = S(a), l = () => {
|
|
2503
2798
|
e(s);
|
|
2504
2799
|
};
|
|
2505
|
-
return
|
|
2800
|
+
return n`
|
|
2506
2801
|
<cx-tree-item
|
|
2507
2802
|
data-id=${s}
|
|
2508
2803
|
class=${A({
|
|
@@ -2512,7 +2807,7 @@ let n = class extends Y {
|
|
|
2512
2807
|
<div class="folder-tree__label">
|
|
2513
2808
|
<cx-icon class="folder-tree__icon" name="folder"></cx-icon>
|
|
2514
2809
|
<cx-line-clamp lines="1" class="folder-tree__label__value">
|
|
2515
|
-
${
|
|
2810
|
+
${o}
|
|
2516
2811
|
</cx-line-clamp>
|
|
2517
2812
|
</div>
|
|
2518
2813
|
<cx-tooltip
|
|
@@ -2528,94 +2823,24 @@ let n = class extends Y {
|
|
|
2528
2823
|
</cx-tree-item>
|
|
2529
2824
|
`;
|
|
2530
2825
|
};
|
|
2531
|
-
return
|
|
2826
|
+
return n`
|
|
2532
2827
|
<div data-testid="root-folder-tree" class="folder-tree">
|
|
2533
2828
|
<cx-tree selection="none">
|
|
2534
|
-
${
|
|
2829
|
+
${U(
|
|
2535
2830
|
t,
|
|
2536
|
-
(
|
|
2537
|
-
(
|
|
2831
|
+
(a) => a,
|
|
2832
|
+
(a) => i(a)
|
|
2538
2833
|
)}
|
|
2539
2834
|
>
|
|
2540
2835
|
</cx-tree>
|
|
2541
2836
|
</div>
|
|
2542
2837
|
`;
|
|
2543
2838
|
}
|
|
2544
|
-
// renderUploadDownloadSettings(): TemplateResult {
|
|
2545
|
-
// const maxUploadRateInput = this._unlimitedUploadRate
|
|
2546
|
-
// ? ''
|
|
2547
|
-
// : html`<cx-input
|
|
2548
|
-
// class="settings__upload-rate-input"
|
|
2549
|
-
// label=${this.localize.term('maxUploadRate')}
|
|
2550
|
-
// type="number"
|
|
2551
|
-
// no-spin-buttons
|
|
2552
|
-
// value=${this.settings.maxUploadRate}
|
|
2553
|
-
// @cx-change=${(event: CxChangeEvent) => {
|
|
2554
|
-
// const target = event.target as CxInput;
|
|
2555
|
-
// const value = Number(target.value);
|
|
2556
|
-
// if (value < 0) {
|
|
2557
|
-
// target.setCustomValidity(
|
|
2558
|
-
// this.localize.term('maxUploadRateCannotBeNegative'),
|
|
2559
|
-
// );
|
|
2560
|
-
// return;
|
|
2561
|
-
// }
|
|
2562
|
-
// this._maxUploadRate = Number(target.value);
|
|
2563
|
-
// }}
|
|
2564
|
-
// ><cx-typography slot="suffix" variant="body2"
|
|
2565
|
-
// >Mb/s</cx-typography
|
|
2566
|
-
// ></cx-input
|
|
2567
|
-
// >`;
|
|
2568
|
-
// const uploadRateSetting = html`<cx-switch
|
|
2569
|
-
// class="settings__upload-rate-switch"
|
|
2570
|
-
// ?checked=${this.settings.unlimitedUploadRate}
|
|
2571
|
-
// @cx-change=${(event: CxChangeEvent) => {
|
|
2572
|
-
// this._unlimitedUploadRate = (event.target as HTMLInputElement).checked;
|
|
2573
|
-
// }}
|
|
2574
|
-
// >${this.localize.term('unlimitedUploadRate')}</cx-switch
|
|
2575
|
-
// >${maxUploadRateInput}`;
|
|
2576
|
-
// const maxDownloadRateInput = this._unlimitedDownloadRate
|
|
2577
|
-
// ? ''
|
|
2578
|
-
// : html`<cx-input
|
|
2579
|
-
// class="settings__download-rate-input"
|
|
2580
|
-
// label=${this.localize.term('maxDownloadRate')}
|
|
2581
|
-
// type="number"
|
|
2582
|
-
// no-spin-buttons
|
|
2583
|
-
// value=${this.settings.maxDownloadRate}
|
|
2584
|
-
// @cx-change=${(event: CxChangeEvent) => {
|
|
2585
|
-
// const target = event.target as CxInput;
|
|
2586
|
-
// const value = Number(target.value);
|
|
2587
|
-
// if (value < 0) {
|
|
2588
|
-
// target.setCustomValidity(
|
|
2589
|
-
// this.localize.term('maxDownloadRateCannotBeNegative'),
|
|
2590
|
-
// );
|
|
2591
|
-
// return;
|
|
2592
|
-
// }
|
|
2593
|
-
// this._maxDownloadRate = Number(target.value);
|
|
2594
|
-
// }}
|
|
2595
|
-
// ><cx-typography slot="suffix" variant="body2"
|
|
2596
|
-
// >Mb/s</cx-typography
|
|
2597
|
-
// ></cx-input
|
|
2598
|
-
// >`;
|
|
2599
|
-
// const downloadRateSetting = html`<cx-switch
|
|
2600
|
-
// class="settings__download-rate-switch"
|
|
2601
|
-
// ?checked=${this.settings.unlimitedDownloadRate}
|
|
2602
|
-
// @cx-change=${(event: CxChangeEvent) => {
|
|
2603
|
-
// this._unlimitedDownloadRate = (event.target as HTMLInputElement).checked;
|
|
2604
|
-
// }}
|
|
2605
|
-
// >${this.localize.term('unlimitedDownloadRate')}</cx-switch
|
|
2606
|
-
// >${maxDownloadRateInput}`;
|
|
2607
|
-
// return html`<div class="settings-group settings__upload-download">
|
|
2608
|
-
// <cx-typography variant="h5"
|
|
2609
|
-
// >${this.localize.term('uploadDownload')}</cx-typography
|
|
2610
|
-
// >
|
|
2611
|
-
// ${uploadRateSetting} ${downloadRateSetting}
|
|
2612
|
-
// </div>`;
|
|
2613
|
-
// }
|
|
2614
2839
|
handleActiveFolderChange(t) {
|
|
2615
2840
|
t.target.value === "custom" ? (this._activeFoldersMode = !0, this.rootIDs = this.settings.config.rootIDs ?? []) : (this._activeFoldersMode = !1, this.rootIDs = []);
|
|
2616
2841
|
}
|
|
2617
2842
|
renderGeneralSettings() {
|
|
2618
|
-
const t =
|
|
2843
|
+
const t = n`
|
|
2619
2844
|
<div class="settings-group settings__active-folder">
|
|
2620
2845
|
<cx-typography variant="h5">
|
|
2621
2846
|
${this.localize.term("activeFolders")}
|
|
@@ -2635,15 +2860,15 @@ let n = class extends Y {
|
|
|
2635
2860
|
</cx-option>
|
|
2636
2861
|
<cx-option value="custom">${this.localize.term("custom")}</cx-option>
|
|
2637
2862
|
</cx-select>
|
|
2638
|
-
${
|
|
2863
|
+
${p(
|
|
2639
2864
|
this._activeFoldersMode,
|
|
2640
|
-
() =>
|
|
2865
|
+
() => n`
|
|
2641
2866
|
${this.renderRootFolderTree()} ${this.renderSelectFoldersPopup()}
|
|
2642
2867
|
`
|
|
2643
2868
|
)}
|
|
2644
2869
|
</div>
|
|
2645
2870
|
`;
|
|
2646
|
-
return
|
|
2871
|
+
return n`
|
|
2647
2872
|
<div class="settings__general">
|
|
2648
2873
|
${t}
|
|
2649
2874
|
<div class="settings-group settings__software">
|
|
@@ -2658,13 +2883,13 @@ let n = class extends Y {
|
|
|
2658
2883
|
>
|
|
2659
2884
|
<cx-typography variant="body3">
|
|
2660
2885
|
${this.localize.term("currentVersion")}
|
|
2661
|
-
${
|
|
2886
|
+
${gt(this.settings.config.version ?? "")}
|
|
2662
2887
|
</cx-typography>
|
|
2663
2888
|
</cx-line-clamp>
|
|
2664
2889
|
</div>
|
|
2665
|
-
${
|
|
2890
|
+
${p(
|
|
2666
2891
|
this.hasNewVersion,
|
|
2667
|
-
() =>
|
|
2892
|
+
() => n`<div class="settings__software__version__value">
|
|
2668
2893
|
<cx-badge
|
|
2669
2894
|
class="settings__version__badge"
|
|
2670
2895
|
slot="badge"
|
|
@@ -2680,7 +2905,7 @@ let n = class extends Y {
|
|
|
2680
2905
|
<cx-typography variant="body3">
|
|
2681
2906
|
${this.localize.term(
|
|
2682
2907
|
"newVersionAvailable",
|
|
2683
|
-
|
|
2908
|
+
gt(
|
|
2684
2909
|
this.settings.config.latestVersion ?? ""
|
|
2685
2910
|
)
|
|
2686
2911
|
)}
|
|
@@ -2766,7 +2991,7 @@ let n = class extends Y {
|
|
|
2766
2991
|
await this.updateComplete, this.cacheLocationValueText?.handleResize();
|
|
2767
2992
|
}
|
|
2768
2993
|
renderAdvancedSettings() {
|
|
2769
|
-
const t =
|
|
2994
|
+
const t = n`<cx-tooltip
|
|
2770
2995
|
content=${this.localize.term("openDrive")}
|
|
2771
2996
|
hoist
|
|
2772
2997
|
>
|
|
@@ -2777,7 +3002,7 @@ let n = class extends Y {
|
|
|
2777
3002
|
@click=${this.openCacheLocation}
|
|
2778
3003
|
></cx-icon-button>
|
|
2779
3004
|
</cx-tooltip>`;
|
|
2780
|
-
return
|
|
3005
|
+
return n`
|
|
2781
3006
|
<div class="settings__advanced">
|
|
2782
3007
|
<div class="settings-group settings__proxy">
|
|
2783
3008
|
<cx-typography variant="h5">Proxy</cx-typography>
|
|
@@ -2789,9 +3014,21 @@ let n = class extends Y {
|
|
|
2789
3014
|
value=${(this.proxyTypes ?? []).join(" ")}
|
|
2790
3015
|
@cx-change=${this.handleProxyChange}
|
|
2791
3016
|
>
|
|
2792
|
-
<cx-option
|
|
2793
|
-
|
|
2794
|
-
|
|
3017
|
+
<cx-option
|
|
3018
|
+
value="Image"
|
|
3019
|
+
?disabled=${(this.proxyTypes ?? []).includes("All")}
|
|
3020
|
+
>${this.localize.term("image")}</cx-option
|
|
3021
|
+
>
|
|
3022
|
+
<cx-option
|
|
3023
|
+
value="Video"
|
|
3024
|
+
?disabled=${(this.proxyTypes ?? []).includes("All")}
|
|
3025
|
+
>${this.localize.term("video")}</cx-option
|
|
3026
|
+
>
|
|
3027
|
+
<cx-option
|
|
3028
|
+
value="Audio"
|
|
3029
|
+
?disabled=${(this.proxyTypes ?? []).includes("All")}
|
|
3030
|
+
>${this.localize.term("audio")}</cx-option
|
|
3031
|
+
>
|
|
2795
3032
|
<cx-option value="All">${this.localize.term("all")}</cx-option>
|
|
2796
3033
|
</cx-select>
|
|
2797
3034
|
<cx-typography variant="small">
|
|
@@ -2800,46 +3037,23 @@ let n = class extends Y {
|
|
|
2800
3037
|
)}
|
|
2801
3038
|
</cx-typography>
|
|
2802
3039
|
</div>
|
|
2803
|
-
<div class="settings-group settings__config">
|
|
2804
|
-
<cx-typography variant="h5">
|
|
2805
|
-
${this.localize.term("config")}
|
|
2806
|
-
</cx-typography>
|
|
2807
|
-
<div class="settings__config__buttons">
|
|
2808
|
-
<cx-button
|
|
2809
|
-
data-testid="settings__config__export-button"
|
|
2810
|
-
@click=${this.exportSettings}
|
|
2811
|
-
>
|
|
2812
|
-
<cx-icon name="file_download" slot="prefix"></cx-icon>
|
|
2813
|
-
${this.localize.term("export")}
|
|
2814
|
-
</cx-button>
|
|
2815
|
-
<cx-button
|
|
2816
|
-
@click=${this.importSettings}
|
|
2817
|
-
data-testid="settings__config__import-button"
|
|
2818
|
-
>
|
|
2819
|
-
<cx-icon name="file_upload" slot="prefix"></cx-icon>
|
|
2820
|
-
${this.localize.term("import")}
|
|
2821
|
-
</cx-button>
|
|
2822
|
-
</div>
|
|
2823
|
-
</div>
|
|
2824
|
-
<div class="settings-group settings__logs">
|
|
2825
|
-
<cx-typography variant="h5">
|
|
2826
|
-
${this.localize.term("logs")}
|
|
2827
|
-
</cx-typography>
|
|
2828
|
-
<div class="settings__logs__buttons">
|
|
2829
|
-
<cx-button
|
|
2830
|
-
data-testid="settings__logs__view-button"
|
|
2831
|
-
@click=${this.viewLogs}
|
|
2832
|
-
>
|
|
2833
|
-
<cx-icon name="code" slot="prefix"></cx-icon>
|
|
2834
|
-
${this.localize.term("view")}
|
|
2835
|
-
</cx-button>
|
|
2836
|
-
</div>
|
|
2837
|
-
</div>
|
|
2838
3040
|
<div class="settings-group settings__cache">
|
|
2839
3041
|
<cx-typography variant="h5">
|
|
2840
3042
|
${this.localize.term("cache")}
|
|
2841
3043
|
</cx-typography>
|
|
2842
3044
|
<div class="settings__cache__size">
|
|
3045
|
+
<cx-typography
|
|
3046
|
+
variant="body3"
|
|
3047
|
+
class="settings__cache__size__label"
|
|
3048
|
+
>
|
|
3049
|
+
${this.localize.term("currentUsage")}: <cx-format-bytes .value=${this.settings.cacheUsage}></cx-format-bytes>
|
|
3050
|
+
</cx-typography>
|
|
3051
|
+
<cx-typography
|
|
3052
|
+
variant="body3"
|
|
3053
|
+
class="settings__cache__size__label"
|
|
3054
|
+
>
|
|
3055
|
+
${this.localize.term("capacity")}
|
|
3056
|
+
</cx-typography>
|
|
2843
3057
|
<cx-input
|
|
2844
3058
|
data-testid="settings__cache__size__input"
|
|
2845
3059
|
label=${this.localize.term("size")}
|
|
@@ -2852,7 +3066,7 @@ let n = class extends Y {
|
|
|
2852
3066
|
@cx-change=${this.handleCacheSizeChange}
|
|
2853
3067
|
>
|
|
2854
3068
|
<cx-typography slot="suffix" variant="body2"
|
|
2855
|
-
>${
|
|
3069
|
+
>${Z}</cx-typography
|
|
2856
3070
|
>
|
|
2857
3071
|
</cx-input>
|
|
2858
3072
|
</div>
|
|
@@ -2899,6 +3113,41 @@ let n = class extends Y {
|
|
|
2899
3113
|
</cx-button>
|
|
2900
3114
|
</div>
|
|
2901
3115
|
</div>
|
|
3116
|
+
<div class="settings-group settings__config">
|
|
3117
|
+
<cx-typography variant="h5">
|
|
3118
|
+
${this.localize.term("config")}
|
|
3119
|
+
</cx-typography>
|
|
3120
|
+
<div class="settings__config__buttons">
|
|
3121
|
+
<cx-button
|
|
3122
|
+
data-testid="settings__config__export-button"
|
|
3123
|
+
@click=${this.exportSettings}
|
|
3124
|
+
>
|
|
3125
|
+
<cx-icon name="file_download" slot="prefix"></cx-icon>
|
|
3126
|
+
${this.localize.term("export")}
|
|
3127
|
+
</cx-button>
|
|
3128
|
+
<cx-button
|
|
3129
|
+
@click=${this.importSettings}
|
|
3130
|
+
data-testid="settings__config__import-button"
|
|
3131
|
+
>
|
|
3132
|
+
<cx-icon name="file_upload" slot="prefix"></cx-icon>
|
|
3133
|
+
${this.localize.term("import")}
|
|
3134
|
+
</cx-button>
|
|
3135
|
+
</div>
|
|
3136
|
+
</div>
|
|
3137
|
+
<div class="settings-group settings__logs">
|
|
3138
|
+
<cx-typography variant="h5">
|
|
3139
|
+
${this.localize.term("logs")}
|
|
3140
|
+
</cx-typography>
|
|
3141
|
+
<div class="settings__logs__buttons">
|
|
3142
|
+
<cx-button
|
|
3143
|
+
data-testid="settings__logs__view-button"
|
|
3144
|
+
@click=${this.viewLogs}
|
|
3145
|
+
>
|
|
3146
|
+
<cx-icon name="code" slot="prefix"></cx-icon>
|
|
3147
|
+
${this.localize.term("view")}
|
|
3148
|
+
</cx-button>
|
|
3149
|
+
</div>
|
|
3150
|
+
</div>
|
|
2902
3151
|
</div>
|
|
2903
3152
|
`;
|
|
2904
3153
|
}
|
|
@@ -2906,7 +3155,7 @@ let n = class extends Y {
|
|
|
2906
3155
|
const t = () => {
|
|
2907
3156
|
this.hideSettings();
|
|
2908
3157
|
};
|
|
2909
|
-
return
|
|
3158
|
+
return n`
|
|
2910
3159
|
<div class="settings">
|
|
2911
3160
|
<form class="settings__form" @submit=${(i) => {
|
|
2912
3161
|
i.preventDefault(), this.saveSettings();
|
|
@@ -2959,33 +3208,33 @@ let n = class extends Y {
|
|
|
2959
3208
|
}
|
|
2960
3209
|
// #endregion
|
|
2961
3210
|
renderStatusFooter() {
|
|
2962
|
-
const t =
|
|
3211
|
+
const t = n`
|
|
2963
3212
|
<cx-typography class="error-message" variant="small">
|
|
2964
3213
|
${this.localize.term("fileOnDemandSyncErrorMessage")}
|
|
2965
3214
|
</cx-typography>
|
|
2966
3215
|
`, e = () => {
|
|
2967
3216
|
switch (this.connectionStatus) {
|
|
2968
3217
|
case "excellent":
|
|
2969
|
-
return
|
|
3218
|
+
return n`
|
|
2970
3219
|
<cx-icon variant="filled" name="check_circle"></cx-icon>
|
|
2971
3220
|
`;
|
|
2972
3221
|
case "good":
|
|
2973
|
-
return
|
|
3222
|
+
return n` <cx-icon variant="filled" name="circle"></cx-icon> `;
|
|
2974
3223
|
case "bad":
|
|
2975
|
-
return
|
|
3224
|
+
return n` <cx-icon variant="filled" name="circle"></cx-icon> `;
|
|
2976
3225
|
}
|
|
2977
3226
|
}, i = () => {
|
|
2978
3227
|
switch (this.assetIndexSyncStatus) {
|
|
2979
3228
|
case "loaded":
|
|
2980
|
-
return
|
|
3229
|
+
return n`
|
|
2981
3230
|
<cx-icon variant="filled" name="check_circle"></cx-icon>
|
|
2982
3231
|
`;
|
|
2983
3232
|
case "loading":
|
|
2984
|
-
return
|
|
3233
|
+
return n` <cx-icon variant="filled" name="cached"></cx-icon> `;
|
|
2985
3234
|
case "error":
|
|
2986
|
-
return
|
|
3235
|
+
return n` <cx-icon variant="filled" name="error"></cx-icon> `;
|
|
2987
3236
|
}
|
|
2988
|
-
},
|
|
3237
|
+
}, a = n`<div
|
|
2989
3238
|
class=${A({
|
|
2990
3239
|
"connection-status": !0,
|
|
2991
3240
|
"connection-status--bad": this.connectionStatus === "bad",
|
|
@@ -3009,8 +3258,8 @@ let n = class extends Y {
|
|
|
3009
3258
|
${e()}
|
|
3010
3259
|
</div>
|
|
3011
3260
|
</cx-tooltip>
|
|
3012
|
-
</div
|
|
3013
|
-
return
|
|
3261
|
+
</div>`, s = this.settings.cacheUsage >= this.settings.cacheSize;
|
|
3262
|
+
return n`
|
|
3014
3263
|
<cx-divider class="status-footer__divider"></cx-divider>
|
|
3015
3264
|
<div class="status-footer">
|
|
3016
3265
|
<div class="connected-url">
|
|
@@ -3023,7 +3272,7 @@ let n = class extends Y {
|
|
|
3023
3272
|
</cx-typography>
|
|
3024
3273
|
</cx-line-clamp>
|
|
3025
3274
|
</div>
|
|
3026
|
-
${
|
|
3275
|
+
${a}
|
|
3027
3276
|
<div
|
|
3028
3277
|
class=${A({
|
|
3029
3278
|
"asset-index-sync-status": !0,
|
|
@@ -3037,22 +3286,39 @@ let n = class extends Y {
|
|
|
3037
3286
|
</cx-typography>
|
|
3038
3287
|
<div class="value">
|
|
3039
3288
|
<cx-typography variant="small">
|
|
3040
|
-
${
|
|
3289
|
+
${ue[this.assetIndexSyncStatus]}
|
|
3041
3290
|
</cx-typography>
|
|
3042
3291
|
${i()}
|
|
3043
3292
|
</div>
|
|
3044
3293
|
</div>
|
|
3045
|
-
|
|
3294
|
+
<div class="cache-usage">
|
|
3295
|
+
<cx-typography class="label" variant="small">
|
|
3296
|
+
${this.localize.term("cache")}
|
|
3297
|
+
</cx-typography>
|
|
3298
|
+
<cx-tooltip ?disabled=${!s} content=${this.localize.term("cacheUsageWarning")}>
|
|
3299
|
+
<cx-space spacing="3x-small">
|
|
3300
|
+
<cx-line-clamp class="value-line-clamp" lines="1">
|
|
3301
|
+
<cx-typography class="value" variant="small">
|
|
3302
|
+
<cx-format-bytes .value=${this.settings.cacheUsage}></cx-format-bytes>
|
|
3303
|
+
/
|
|
3304
|
+
<cx-format-bytes .value=${this.settings.cacheSize}></cx-format-bytes>
|
|
3305
|
+
</cx-typography>
|
|
3306
|
+
</cx-line-clamp>
|
|
3307
|
+
${p(s, () => n`<cx-icon class="cache-usage__warning-icon" name="warning" variant="filled"></cx-icon>`)}
|
|
3308
|
+
</cx-space>
|
|
3309
|
+
</cx-tooltip>
|
|
3310
|
+
</div>
|
|
3311
|
+
${p(this.assetIndexSyncStatus === "error", () => t)}
|
|
3046
3312
|
</div>
|
|
3047
3313
|
`;
|
|
3048
3314
|
}
|
|
3049
3315
|
handleConnectionURLInput(t) {
|
|
3050
3316
|
this.validConnectionUrl = !0, this.siteUrl = t.target.value.trim();
|
|
3051
|
-
const e =
|
|
3052
|
-
|
|
3317
|
+
const e = ht(this.siteUrl);
|
|
3318
|
+
K(e) || (this.validConnectionUrl = !1);
|
|
3053
3319
|
}
|
|
3054
3320
|
renderWelcomeView() {
|
|
3055
|
-
return
|
|
3321
|
+
return n`
|
|
3056
3322
|
<div class="welcome">
|
|
3057
3323
|
<div class="welcome__message">
|
|
3058
3324
|
<cx-typography variant="h5">
|
|
@@ -3101,7 +3367,7 @@ let n = class extends Y {
|
|
|
3101
3367
|
${this.localize.term("cancel")}
|
|
3102
3368
|
</cx-button>
|
|
3103
3369
|
<cx-typography class="error-message" variant="body3">
|
|
3104
|
-
${
|
|
3370
|
+
${p(
|
|
3105
3371
|
this.connectError,
|
|
3106
3372
|
() => this.connectError,
|
|
3107
3373
|
() => " "
|
|
@@ -3115,14 +3381,14 @@ let n = class extends Y {
|
|
|
3115
3381
|
return this.connectionEstablished ? this.isSettingsOpened ? this.renderSettingsView() : this.renderAssetsView() : this.renderWelcomeView();
|
|
3116
3382
|
}
|
|
3117
3383
|
renderLoadingOverlay() {
|
|
3118
|
-
return
|
|
3384
|
+
return n`
|
|
3119
3385
|
<div class="loading-overlay">
|
|
3120
3386
|
<cx-spinner></cx-spinner>
|
|
3121
3387
|
</div>
|
|
3122
3388
|
`;
|
|
3123
3389
|
}
|
|
3124
3390
|
render() {
|
|
3125
|
-
return
|
|
3391
|
+
return n`
|
|
3126
3392
|
<div
|
|
3127
3393
|
class=${A({
|
|
3128
3394
|
container: !0,
|
|
@@ -3131,288 +3397,307 @@ let n = class extends Y {
|
|
|
3131
3397
|
})}
|
|
3132
3398
|
>
|
|
3133
3399
|
${this.renderView()}
|
|
3134
|
-
${
|
|
3400
|
+
${p(this.userInteractionBlocked, () => this.renderLoadingOverlay())}
|
|
3135
3401
|
</div>
|
|
3136
3402
|
`;
|
|
3137
3403
|
}
|
|
3138
3404
|
// #endregion
|
|
3139
3405
|
};
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
"cx-avatar":
|
|
3143
|
-
"cx-button":
|
|
3406
|
+
r.styles = Oe;
|
|
3407
|
+
r.dependencies = {
|
|
3408
|
+
"cx-avatar": Ot,
|
|
3409
|
+
"cx-button": Nt,
|
|
3144
3410
|
"cx-confirm-popover": Kt,
|
|
3145
|
-
"cx-dialog":
|
|
3146
|
-
"cx-divider":
|
|
3411
|
+
"cx-dialog": jt,
|
|
3412
|
+
"cx-divider": Bt,
|
|
3413
|
+
"cx-file-on-demand-asset": F,
|
|
3147
3414
|
"cx-folder-tree": y,
|
|
3148
|
-
"cx-format-bytes":
|
|
3149
|
-
"cx-icon":
|
|
3150
|
-
"cx-icon-button":
|
|
3151
|
-
"cx-input":
|
|
3152
|
-
"cx-line-clamp":
|
|
3153
|
-
"cx-option":
|
|
3154
|
-
"cx-
|
|
3155
|
-
"cx-
|
|
3156
|
-
"cx-
|
|
3157
|
-
"cx-
|
|
3158
|
-
"cx-tab":
|
|
3159
|
-
"cx-tab-
|
|
3160
|
-
"cx-
|
|
3161
|
-
"cx-
|
|
3162
|
-
"cx-tree":
|
|
3163
|
-
"cx-
|
|
3164
|
-
"cx-typography": Yt
|
|
3415
|
+
"cx-format-bytes": ot,
|
|
3416
|
+
"cx-icon": J,
|
|
3417
|
+
"cx-icon-button": St,
|
|
3418
|
+
"cx-input": Mt,
|
|
3419
|
+
"cx-line-clamp": Q,
|
|
3420
|
+
"cx-option": Vt,
|
|
3421
|
+
"cx-relative-time": It,
|
|
3422
|
+
"cx-select": Ht,
|
|
3423
|
+
"cx-space": Wt,
|
|
3424
|
+
"cx-tab": qt,
|
|
3425
|
+
"cx-tab-group": Gt,
|
|
3426
|
+
"cx-tab-panel": Yt,
|
|
3427
|
+
"cx-tooltip": wt,
|
|
3428
|
+
"cx-tree": yt,
|
|
3429
|
+
"cx-tree-item": ft,
|
|
3430
|
+
"cx-typography": nt
|
|
3165
3431
|
};
|
|
3166
3432
|
c([
|
|
3167
|
-
|
|
3168
|
-
],
|
|
3433
|
+
z(".container")
|
|
3434
|
+
], r.prototype, "container", 2);
|
|
3169
3435
|
c([
|
|
3170
|
-
|
|
3171
|
-
],
|
|
3436
|
+
z("cx-folder-tree")
|
|
3437
|
+
], r.prototype, "folderTree", 2);
|
|
3172
3438
|
c([
|
|
3173
|
-
|
|
3174
|
-
],
|
|
3439
|
+
z("cx-dialog")
|
|
3440
|
+
], r.prototype, "dialog", 2);
|
|
3175
3441
|
c([
|
|
3176
|
-
|
|
3177
|
-
],
|
|
3442
|
+
z(".recent__list")
|
|
3443
|
+
], r.prototype, "recentAssetsList", 2);
|
|
3178
3444
|
c([
|
|
3179
|
-
|
|
3180
|
-
],
|
|
3445
|
+
z(".favorites__list")
|
|
3446
|
+
], r.prototype, "favoritesAssetsList", 2);
|
|
3181
3447
|
c([
|
|
3182
|
-
|
|
3183
|
-
],
|
|
3448
|
+
z(".uploads__list")
|
|
3449
|
+
], r.prototype, "uploadsAssetsList", 2);
|
|
3184
3450
|
c([
|
|
3185
|
-
|
|
3186
|
-
],
|
|
3451
|
+
z(".pinned__list")
|
|
3452
|
+
], r.prototype, "pinnedAssetsList", 2);
|
|
3187
3453
|
c([
|
|
3188
|
-
|
|
3189
|
-
],
|
|
3454
|
+
z(".assets-list__tab-group")
|
|
3455
|
+
], r.prototype, "assetsListTabGroup", 2);
|
|
3190
3456
|
c([
|
|
3191
|
-
|
|
3457
|
+
z(".settings__cache__location__value__text")
|
|
3458
|
+
], r.prototype, "cacheLocationValueText", 2);
|
|
3459
|
+
c([
|
|
3460
|
+
d({
|
|
3192
3461
|
attribute: "connection-established",
|
|
3193
3462
|
type: Boolean
|
|
3194
3463
|
})
|
|
3195
|
-
],
|
|
3464
|
+
], r.prototype, "connectionEstablished", 2);
|
|
3196
3465
|
c([
|
|
3197
|
-
|
|
3466
|
+
d({
|
|
3198
3467
|
attribute: "connection-status",
|
|
3199
3468
|
reflect: !0,
|
|
3200
3469
|
type: String
|
|
3201
3470
|
})
|
|
3202
|
-
],
|
|
3471
|
+
], r.prototype, "connectionStatus", 2);
|
|
3203
3472
|
c([
|
|
3204
|
-
|
|
3473
|
+
d({
|
|
3205
3474
|
attribute: "connection-status-tooltip",
|
|
3206
3475
|
type: String
|
|
3207
3476
|
})
|
|
3208
|
-
],
|
|
3477
|
+
], r.prototype, "connectionStatusTooltip", 2);
|
|
3209
3478
|
c([
|
|
3210
|
-
|
|
3479
|
+
d({
|
|
3211
3480
|
attribute: "asset-index-sync-status",
|
|
3212
3481
|
reflect: !0,
|
|
3213
3482
|
type: String
|
|
3214
3483
|
})
|
|
3215
|
-
],
|
|
3484
|
+
], r.prototype, "assetIndexSyncStatus", 2);
|
|
3216
3485
|
c([
|
|
3217
|
-
|
|
3486
|
+
d({
|
|
3218
3487
|
attribute: "user-avatar-url",
|
|
3219
3488
|
type: String
|
|
3220
3489
|
})
|
|
3221
|
-
],
|
|
3490
|
+
], r.prototype, "userAvatarUrl", 2);
|
|
3222
3491
|
c([
|
|
3223
|
-
|
|
3492
|
+
d({
|
|
3224
3493
|
type: String
|
|
3225
3494
|
})
|
|
3226
|
-
],
|
|
3495
|
+
], r.prototype, "username", 2);
|
|
3227
3496
|
c([
|
|
3228
|
-
|
|
3497
|
+
d({
|
|
3229
3498
|
attribute: "recent-assets",
|
|
3230
3499
|
type: Object
|
|
3231
3500
|
})
|
|
3232
|
-
],
|
|
3501
|
+
], r.prototype, "recentAssets", 2);
|
|
3233
3502
|
c([
|
|
3234
|
-
|
|
3503
|
+
d({
|
|
3235
3504
|
attribute: "favorite-assets",
|
|
3236
3505
|
type: Object
|
|
3237
3506
|
})
|
|
3238
|
-
],
|
|
3507
|
+
], r.prototype, "favoriteAssets", 2);
|
|
3239
3508
|
c([
|
|
3240
|
-
|
|
3509
|
+
d({
|
|
3241
3510
|
attribute: "favorite-last-sync",
|
|
3242
3511
|
type: Number
|
|
3243
3512
|
})
|
|
3244
|
-
],
|
|
3513
|
+
], r.prototype, "favoritesLastSync", 2);
|
|
3245
3514
|
c([
|
|
3246
|
-
|
|
3515
|
+
d({
|
|
3247
3516
|
attribute: "favorite-in-progress-assets",
|
|
3248
3517
|
converter: {
|
|
3249
|
-
fromAttribute: (t) => t.split(" ").
|
|
3518
|
+
fromAttribute: (t) => t.split(" ").filter(Boolean),
|
|
3519
|
+
toAttribute: (t) => t.join(" ")
|
|
3520
|
+
},
|
|
3521
|
+
type: String
|
|
3522
|
+
})
|
|
3523
|
+
], r.prototype, "favoriteInProgressAssets", 2);
|
|
3524
|
+
c([
|
|
3525
|
+
d({
|
|
3526
|
+
attribute: "pin-in-progress-assets",
|
|
3527
|
+
converter: {
|
|
3528
|
+
fromAttribute: (t) => t.split(" ").filter(Boolean),
|
|
3250
3529
|
toAttribute: (t) => t.join(" ")
|
|
3251
3530
|
},
|
|
3252
3531
|
type: String
|
|
3253
3532
|
})
|
|
3254
|
-
],
|
|
3533
|
+
], r.prototype, "pinInProgressAssets", 2);
|
|
3255
3534
|
c([
|
|
3256
|
-
|
|
3535
|
+
d({
|
|
3257
3536
|
attribute: "uploading-assets",
|
|
3258
3537
|
type: Object
|
|
3259
3538
|
})
|
|
3260
|
-
],
|
|
3539
|
+
], r.prototype, "uploadingAssets", 2);
|
|
3540
|
+
c([
|
|
3541
|
+
d({
|
|
3542
|
+
attribute: "pinned-assets",
|
|
3543
|
+
type: Object
|
|
3544
|
+
})
|
|
3545
|
+
], r.prototype, "pinnedAssets", 2);
|
|
3261
3546
|
c([
|
|
3262
|
-
|
|
3263
|
-
],
|
|
3547
|
+
u()
|
|
3548
|
+
], r.prototype, "availableFolderIdentifiers", 2);
|
|
3264
3549
|
c([
|
|
3265
|
-
|
|
3266
|
-
],
|
|
3550
|
+
u()
|
|
3551
|
+
], r.prototype, "isLoading", 2);
|
|
3267
3552
|
c([
|
|
3268
|
-
|
|
3553
|
+
d({
|
|
3269
3554
|
attribute: "settings",
|
|
3270
3555
|
type: Object
|
|
3271
3556
|
})
|
|
3272
|
-
],
|
|
3557
|
+
], r.prototype, "settings", 2);
|
|
3273
3558
|
c([
|
|
3274
|
-
|
|
3275
|
-
],
|
|
3559
|
+
d({ attribute: "pick-cache-location", type: Function })
|
|
3560
|
+
], r.prototype, "pickCacheLocation", 2);
|
|
3276
3561
|
c([
|
|
3277
|
-
|
|
3562
|
+
d({
|
|
3278
3563
|
attribute: "has-new-version",
|
|
3279
3564
|
type: Boolean
|
|
3280
3565
|
})
|
|
3281
|
-
],
|
|
3566
|
+
], r.prototype, "hasNewVersion", 2);
|
|
3282
3567
|
c([
|
|
3283
|
-
|
|
3568
|
+
d({
|
|
3284
3569
|
attribute: "about-content",
|
|
3285
3570
|
type: String
|
|
3286
3571
|
})
|
|
3287
|
-
],
|
|
3572
|
+
], r.prototype, "aboutContent", 2);
|
|
3288
3573
|
c([
|
|
3289
|
-
|
|
3290
|
-
],
|
|
3574
|
+
d({ type: String })
|
|
3575
|
+
], r.prototype, "token", 2);
|
|
3291
3576
|
c([
|
|
3292
|
-
|
|
3577
|
+
d({
|
|
3293
3578
|
attribute: "user-interaction-blocked",
|
|
3294
3579
|
type: Boolean
|
|
3295
3580
|
})
|
|
3296
|
-
],
|
|
3581
|
+
], r.prototype, "userInteractionBlocked", 2);
|
|
3297
3582
|
c([
|
|
3298
|
-
|
|
3583
|
+
d({
|
|
3299
3584
|
attribute: "is-connecting",
|
|
3300
3585
|
type: Boolean
|
|
3301
3586
|
})
|
|
3302
|
-
],
|
|
3587
|
+
], r.prototype, "isConnecting", 2);
|
|
3303
3588
|
c([
|
|
3304
|
-
|
|
3589
|
+
d({
|
|
3305
3590
|
attribute: "is-cancelling-connection",
|
|
3306
3591
|
type: Boolean
|
|
3307
3592
|
})
|
|
3308
|
-
],
|
|
3593
|
+
], r.prototype, "isCancellingConnection", 2);
|
|
3309
3594
|
c([
|
|
3310
|
-
|
|
3595
|
+
d({
|
|
3311
3596
|
attribute: "is-disconnecting",
|
|
3312
3597
|
type: Boolean
|
|
3313
3598
|
})
|
|
3314
|
-
],
|
|
3599
|
+
], r.prototype, "isDisconnecting", 2);
|
|
3315
3600
|
c([
|
|
3316
|
-
|
|
3601
|
+
d({
|
|
3317
3602
|
attribute: "is-upgrading",
|
|
3318
3603
|
type: Boolean
|
|
3319
3604
|
})
|
|
3320
|
-
],
|
|
3605
|
+
], r.prototype, "isUpgrading", 2);
|
|
3606
|
+
c([
|
|
3607
|
+
u()
|
|
3608
|
+
], r.prototype, "isSettingsOpened", 2);
|
|
3609
|
+
c([
|
|
3610
|
+
u()
|
|
3611
|
+
], r.prototype, "rootIDs", 2);
|
|
3321
3612
|
c([
|
|
3322
|
-
|
|
3323
|
-
],
|
|
3613
|
+
u()
|
|
3614
|
+
], r.prototype, "_activeFoldersMode", 2);
|
|
3324
3615
|
c([
|
|
3325
|
-
|
|
3326
|
-
],
|
|
3616
|
+
u()
|
|
3617
|
+
], r.prototype, "removedIds", 2);
|
|
3327
3618
|
c([
|
|
3328
|
-
|
|
3329
|
-
],
|
|
3619
|
+
u()
|
|
3620
|
+
], r.prototype, "cacheSize", 2);
|
|
3330
3621
|
c([
|
|
3331
|
-
|
|
3332
|
-
],
|
|
3622
|
+
u()
|
|
3623
|
+
], r.prototype, "cacheLocation", 2);
|
|
3333
3624
|
c([
|
|
3334
|
-
|
|
3335
|
-
],
|
|
3625
|
+
u()
|
|
3626
|
+
], r.prototype, "proxyTypes", 2);
|
|
3336
3627
|
c([
|
|
3337
|
-
|
|
3338
|
-
],
|
|
3628
|
+
u()
|
|
3629
|
+
], r.prototype, "siteUrl", 2);
|
|
3339
3630
|
c([
|
|
3340
|
-
|
|
3341
|
-
],
|
|
3631
|
+
u()
|
|
3632
|
+
], r.prototype, "isRecentAssetsLoading", 2);
|
|
3342
3633
|
c([
|
|
3343
|
-
|
|
3344
|
-
],
|
|
3634
|
+
u()
|
|
3635
|
+
], r.prototype, "isFavoriteAssetsLoading", 2);
|
|
3345
3636
|
c([
|
|
3346
|
-
|
|
3347
|
-
],
|
|
3637
|
+
u()
|
|
3638
|
+
], r.prototype, "isUploadingAssetsLoading", 2);
|
|
3348
3639
|
c([
|
|
3349
|
-
|
|
3350
|
-
],
|
|
3640
|
+
u()
|
|
3641
|
+
], r.prototype, "isPinnedAssetsLoading", 2);
|
|
3351
3642
|
c([
|
|
3352
|
-
|
|
3353
|
-
],
|
|
3643
|
+
u()
|
|
3644
|
+
], r.prototype, "connectError", 2);
|
|
3354
3645
|
c([
|
|
3355
|
-
|
|
3356
|
-
],
|
|
3646
|
+
u()
|
|
3647
|
+
], r.prototype, "disconnectError", 2);
|
|
3357
3648
|
c([
|
|
3358
|
-
|
|
3359
|
-
],
|
|
3649
|
+
u()
|
|
3650
|
+
], r.prototype, "upgradeError", 2);
|
|
3360
3651
|
c([
|
|
3361
|
-
|
|
3362
|
-
],
|
|
3652
|
+
u()
|
|
3653
|
+
], r.prototype, "totalCount", 2);
|
|
3363
3654
|
c([
|
|
3364
|
-
|
|
3365
|
-
],
|
|
3655
|
+
u()
|
|
3656
|
+
], r.prototype, "folderPathsSet", 2);
|
|
3366
3657
|
c([
|
|
3367
|
-
|
|
3368
|
-
],
|
|
3658
|
+
u()
|
|
3659
|
+
], r.prototype, "validConnectionUrl", 2);
|
|
3369
3660
|
c([
|
|
3370
|
-
|
|
3371
|
-
],
|
|
3661
|
+
u()
|
|
3662
|
+
], r.prototype, "isAddingRootIDs", 2);
|
|
3372
3663
|
c([
|
|
3373
|
-
|
|
3374
|
-
],
|
|
3664
|
+
P(["connectionEstablished", "token"])
|
|
3665
|
+
], r.prototype, "fetchData", 1);
|
|
3375
3666
|
c([
|
|
3376
|
-
|
|
3377
|
-
],
|
|
3667
|
+
P(["connectionEstablished"])
|
|
3668
|
+
], r.prototype, "showRecentTab", 1);
|
|
3378
3669
|
c([
|
|
3379
|
-
|
|
3380
|
-
],
|
|
3670
|
+
P("settings")
|
|
3671
|
+
], r.prototype, "updateSettingsStates", 1);
|
|
3381
3672
|
c([
|
|
3382
|
-
|
|
3383
|
-
],
|
|
3673
|
+
P("recentAssets")
|
|
3674
|
+
], r.prototype, "onRecentAssetsChanged", 1);
|
|
3384
3675
|
c([
|
|
3385
|
-
|
|
3386
|
-
],
|
|
3676
|
+
P("pinnedAssets")
|
|
3677
|
+
], r.prototype, "onPinnedAssetsChanged", 1);
|
|
3387
3678
|
c([
|
|
3388
|
-
|
|
3389
|
-
],
|
|
3679
|
+
P("favoriteAssets")
|
|
3680
|
+
], r.prototype, "onFavoriteAssetsChanged", 1);
|
|
3390
3681
|
c([
|
|
3391
|
-
|
|
3392
|
-
],
|
|
3682
|
+
P("uploadingAssets")
|
|
3683
|
+
], r.prototype, "onUploadingAssetsChanged", 1);
|
|
3393
3684
|
c([
|
|
3394
|
-
|
|
3395
|
-
],
|
|
3685
|
+
u()
|
|
3686
|
+
], r.prototype, "searchText", 2);
|
|
3396
3687
|
c([
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
],
|
|
3688
|
+
P(["searchText"]),
|
|
3689
|
+
Xt(200)
|
|
3690
|
+
], r.prototype, "onSearch", 1);
|
|
3400
3691
|
c([
|
|
3401
|
-
|
|
3402
|
-
],
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
],
|
|
3692
|
+
P("cacheLocation")
|
|
3693
|
+
], r.prototype, "handleCacheLocationChange", 1);
|
|
3694
|
+
r = c([
|
|
3695
|
+
W("cx-file-on-demand")
|
|
3696
|
+
], r);
|
|
3406
3697
|
export {
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
at as a,
|
|
3698
|
+
r as C,
|
|
3699
|
+
De as a,
|
|
3410
3700
|
Pe as b,
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
Ue as e,
|
|
3414
|
-
Ne as f,
|
|
3415
|
-
je as i,
|
|
3416
|
-
Ce as o,
|
|
3417
|
-
Re as s
|
|
3701
|
+
ze as c,
|
|
3702
|
+
Ee as i
|
|
3418
3703
|
};
|