@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,105 +1,111 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { C as
|
|
5
|
-
import { n as r, C as
|
|
6
|
-
import { h as
|
|
7
|
-
import { c as R } from "./component.styles.
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import A from "../components/icon.js";
|
|
2
|
+
import X from "../components/input.js";
|
|
3
|
+
import Y from "../components/select.js";
|
|
4
|
+
import { C as $, a as ee } from "./tree.CNbrP8cY.js";
|
|
5
|
+
import { n as r, C as O } from "./lib-cortex-element.CVMmyPMC.js";
|
|
6
|
+
import { h as I, F as te, b as re } from "./endpoints.B7lcoc1N.js";
|
|
7
|
+
import { c as R } from "./component.styles.DMSLciL5.js";
|
|
8
|
+
import { c as D } from "./custom-element.L4WJXn1j.js";
|
|
9
|
+
import { L as w } from "./i18n.DrzK7TPf.js";
|
|
10
|
+
import { w as m } from "./watch.q1sEjPWL.js";
|
|
11
|
+
import { x as f, i as ae } from "./lit-element.jLBm65_O.js";
|
|
12
|
+
import { r as x } from "./state.CSDxrqLd.js";
|
|
11
13
|
import { e as B } from "./query.BBf1UFkC.js";
|
|
12
|
-
import { r as
|
|
13
|
-
import { C as
|
|
14
|
-
import { d as
|
|
15
|
-
import { o as
|
|
16
|
-
import { c as
|
|
17
|
-
import { n as
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { M } from "./asset-link-format.BSRDqHg7.js";
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
import { r as se } from "./choose.BTbF6BAn.js";
|
|
15
|
+
import { C as W } from "./button.P71VJ5xh.js";
|
|
16
|
+
import { d as le } from "./debounce.DaHuiSGU.js";
|
|
17
|
+
import { o as y } from "./if-defined.BRoBj_Rp.js";
|
|
18
|
+
import { c as q } from "./repeat.DbF2p5ae.js";
|
|
19
|
+
import { n as C } from "./when.Dr1es41R.js";
|
|
20
|
+
import ie from "../components/line-clamp.js";
|
|
21
|
+
import oe from "../components/space.js";
|
|
22
|
+
import { M as P } from "./asset-link-format.BSRDqHg7.js";
|
|
23
|
+
import { g as ne } from "./template.CsJd8Pb_.js";
|
|
24
|
+
import { e as ce } from "./class-map.BiVq-cVR.js";
|
|
25
|
+
var v = /* @__PURE__ */ ((e) => (e.CortexPath = "Document.CortexPath", e.DocType = "CoreField.DocType", e.HasBrowserChildren = "Document.HasBrowserChildren", e.RepresentativeAssetId = "Document.DocumentDirectRepresentativeRID", e.TitleWithFallback = "CoreField.TitleWithFallback", e.rawDocSubtype = "Document.RawDocSubType", e))(v || {});
|
|
26
|
+
const he = 50;
|
|
27
|
+
async function V({
|
|
25
28
|
allowedFolders: e,
|
|
26
29
|
baseUrl: t,
|
|
27
|
-
bearerToken:
|
|
28
|
-
excludeVirtualFolders:
|
|
29
|
-
folderId:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
bearerToken: a,
|
|
31
|
+
excludeVirtualFolders: i,
|
|
32
|
+
folderId: l,
|
|
33
|
+
includeDirectChild: p,
|
|
34
|
+
limit: u = he,
|
|
35
|
+
searchTerm: U,
|
|
36
|
+
self: E,
|
|
37
|
+
start: M = 0,
|
|
38
|
+
token: Z
|
|
35
39
|
}) {
|
|
36
|
-
let
|
|
37
|
-
e && e.length > 0 && !
|
|
40
|
+
let k = [], L = p ?? !0;
|
|
41
|
+
e && e.length > 0 && !l ? (k = e, E = !0, L = !1) : l && (k = [l]);
|
|
38
42
|
try {
|
|
39
|
-
return (await
|
|
43
|
+
return (await I.request({
|
|
40
44
|
baseURL: t,
|
|
41
45
|
headers: {
|
|
42
|
-
Authorization: `Bearer ${
|
|
46
|
+
Authorization: `Bearer ${a}`
|
|
43
47
|
},
|
|
44
48
|
method: "GET",
|
|
45
49
|
params: {
|
|
46
|
-
IncludeDirectChild:
|
|
47
|
-
IncludeVirtualFolders: !
|
|
50
|
+
IncludeDirectChild: L,
|
|
51
|
+
IncludeVirtualFolders: !i,
|
|
48
52
|
Limit: u,
|
|
49
|
-
ObjectRecordIDs:
|
|
50
|
-
SeeThru: !!
|
|
51
|
-
Self:
|
|
52
|
-
Start:
|
|
53
|
-
Text:
|
|
54
|
-
Token:
|
|
53
|
+
ObjectRecordIDs: k,
|
|
54
|
+
SeeThru: !!U,
|
|
55
|
+
Self: E,
|
|
56
|
+
Start: M,
|
|
57
|
+
Text: U || void 0,
|
|
58
|
+
Token: Z || void 0
|
|
55
59
|
},
|
|
56
60
|
paramsSerializer: {
|
|
57
61
|
indexes: null
|
|
58
62
|
},
|
|
59
63
|
responseType: "json",
|
|
60
64
|
transformResponse: [
|
|
61
|
-
...Array.isArray(
|
|
62
|
-
(
|
|
63
|
-
if (
|
|
65
|
+
...Array.isArray(I.defaults.transformResponse) ? I.defaults.transformResponse : [],
|
|
66
|
+
(g, Te, _) => {
|
|
67
|
+
if (_ !== void 0 && (_ < 200 || _ >= 300))
|
|
64
68
|
return {
|
|
65
69
|
data: [],
|
|
66
|
-
hasMore: !1
|
|
70
|
+
hasMore: !1,
|
|
71
|
+
totalCount: 0
|
|
67
72
|
};
|
|
68
|
-
if (
|
|
73
|
+
if (!g || typeof g != "object")
|
|
69
74
|
throw new Error("Invalid response format");
|
|
70
|
-
const
|
|
75
|
+
const K = g.contentItems?.length ?? 0;
|
|
71
76
|
return {
|
|
72
|
-
data:
|
|
77
|
+
data: g.contentItems?.map((b) => ({
|
|
73
78
|
docType: b.fields[v.DocType] ?? "",
|
|
74
79
|
fullPath: b.fields[v.CortexPath] ?? "",
|
|
75
80
|
hasChildren: b.fields[v.HasBrowserChildren] === "1",
|
|
76
81
|
id: b.recordID,
|
|
82
|
+
isShared: b.fields[v.rawDocSubtype] === "DO_OR1ND000001913488",
|
|
77
83
|
representativeAssetId: b.fields[v.RepresentativeAssetId] ?? "",
|
|
78
84
|
title: b.fields[v.TitleWithFallback] ?? ""
|
|
79
85
|
})) ?? [],
|
|
80
|
-
hasMore:
|
|
86
|
+
hasMore: M + K < g.totalCount,
|
|
87
|
+
totalCount: g.totalCount
|
|
81
88
|
};
|
|
82
89
|
}
|
|
83
90
|
],
|
|
84
|
-
url:
|
|
91
|
+
url: te
|
|
85
92
|
})).data;
|
|
86
|
-
} catch
|
|
87
|
-
if (T instanceof A && T.response?.status === 401)
|
|
88
|
-
throw T;
|
|
93
|
+
} catch {
|
|
89
94
|
return {
|
|
90
95
|
data: [],
|
|
91
|
-
hasMore: !1
|
|
96
|
+
hasMore: !1,
|
|
97
|
+
totalCount: 0
|
|
92
98
|
};
|
|
93
99
|
}
|
|
94
100
|
}
|
|
95
|
-
var
|
|
96
|
-
for (var
|
|
97
|
-
(
|
|
98
|
-
return
|
|
101
|
+
var F = /* @__PURE__ */ ((e) => (e.Input = "input", e.Select = "select", e))(F || {}), de = Object.defineProperty, pe = Object.getOwnPropertyDescriptor, d = (e, t, a, i) => {
|
|
102
|
+
for (var l = i > 1 ? void 0 : i ? pe(t, a) : t, p = e.length - 1, u; p >= 0; p--)
|
|
103
|
+
(u = e[p]) && (l = (i ? u(t, a, l) : u(l)) || l);
|
|
104
|
+
return i && l && de(t, a, l), l;
|
|
99
105
|
};
|
|
100
|
-
let
|
|
106
|
+
let n = class extends O {
|
|
101
107
|
constructor() {
|
|
102
|
-
super(...arguments), this.localize = new
|
|
108
|
+
super(...arguments), this.localize = new w(this), this.role = "treeitem", this.folderId = "", this.hasChildren = !1, this.fullPath = "", this.docType = P.Story, this.name = "", this.representativeAssetId = "", this.selectedValue = "", this.token = "", this.bearerToken = "", this.baseUrl = "", this.searchTerm = "", this.api = V, this.excludeVirtualFolders = !1, this.url = "", this.data = null, this.hasMore = !1, this.loading = !1;
|
|
103
109
|
}
|
|
104
110
|
/**
|
|
105
111
|
* This is used to render the cx-tree-item inside the cx-folder-item without the shadow root so that the cx-tree can query select the cx-tree-item inside
|
|
@@ -114,7 +120,7 @@ let o = class extends I {
|
|
|
114
120
|
if (!this.api)
|
|
115
121
|
return { data: [], hasMore: !1 };
|
|
116
122
|
try {
|
|
117
|
-
const { data:
|
|
123
|
+
const { data: a, hasMore: i } = await this.api({
|
|
118
124
|
baseUrl: this.baseUrl,
|
|
119
125
|
bearerToken: this.bearerToken,
|
|
120
126
|
excludeVirtualFolders: this.excludeVirtualFolders,
|
|
@@ -122,7 +128,7 @@ let o = class extends I {
|
|
|
122
128
|
start: t,
|
|
123
129
|
token: this.token
|
|
124
130
|
});
|
|
125
|
-
return { data:
|
|
131
|
+
return { data: a, hasMore: i };
|
|
126
132
|
} catch {
|
|
127
133
|
return { data: [], hasMore: !1 };
|
|
128
134
|
}
|
|
@@ -132,11 +138,11 @@ let o = class extends I {
|
|
|
132
138
|
const t = this.data?.length || 0;
|
|
133
139
|
this.loading = !0;
|
|
134
140
|
try {
|
|
135
|
-
const { data:
|
|
141
|
+
const { data: a, hasMore: i } = await this.fetchFolders({
|
|
136
142
|
folderId: this.folderId,
|
|
137
143
|
start: t
|
|
138
144
|
});
|
|
139
|
-
this.data = [...this.data || [], ...
|
|
145
|
+
this.data = [...this.data || [], ...a], this.hasMore = i;
|
|
140
146
|
} catch {
|
|
141
147
|
} finally {
|
|
142
148
|
this.loading = !1;
|
|
@@ -146,11 +152,11 @@ let o = class extends I {
|
|
|
146
152
|
e.stopPropagation(), this.treeItem.expanded = !0;
|
|
147
153
|
const t = this.data?.length || 0;
|
|
148
154
|
try {
|
|
149
|
-
const { data:
|
|
155
|
+
const { data: a, hasMore: i } = await this.fetchFolders({
|
|
150
156
|
folderId: this.folderId,
|
|
151
157
|
start: t
|
|
152
158
|
});
|
|
153
|
-
this.data =
|
|
159
|
+
this.data = a, this.hasMore = i;
|
|
154
160
|
} catch {
|
|
155
161
|
this.treeItem.expanded = !1;
|
|
156
162
|
}
|
|
@@ -158,13 +164,13 @@ let o = class extends I {
|
|
|
158
164
|
render() {
|
|
159
165
|
return f`
|
|
160
166
|
<cx-tree-item
|
|
161
|
-
class=${
|
|
167
|
+
class=${ce({
|
|
162
168
|
"folder-select-tree-item": !0
|
|
163
169
|
})}
|
|
164
170
|
data-id=${this.folderId}
|
|
165
|
-
data-url=${
|
|
166
|
-
data-name=${
|
|
167
|
-
data-representative-asset-id=${
|
|
171
|
+
data-url=${y(this.url)}
|
|
172
|
+
data-name=${y(this.name?.trim() || void 0)}
|
|
173
|
+
data-representative-asset-id=${y(
|
|
168
174
|
this.representativeAssetId || void 0
|
|
169
175
|
)}
|
|
170
176
|
role="option"
|
|
@@ -182,13 +188,13 @@ let o = class extends I {
|
|
|
182
188
|
<cx-icon
|
|
183
189
|
class="folder-select-tree__item__icon"
|
|
184
190
|
name="folder"
|
|
185
|
-
variant=${this.docType ===
|
|
191
|
+
variant=${this.docType === P.Album ? "outlined" : "filled"}
|
|
186
192
|
></cx-icon>
|
|
187
193
|
<cx-line-clamp lines="1" class="folder-select-tree-item__title">
|
|
188
|
-
${this.name}
|
|
194
|
+
${ne(this.name, this.searchTerm)}
|
|
189
195
|
</cx-line-clamp>
|
|
190
196
|
</cx-space>
|
|
191
|
-
${
|
|
197
|
+
${q(
|
|
192
198
|
this.data || [],
|
|
193
199
|
(e) => e.id,
|
|
194
200
|
(e) => f`<cx-folder-select-tree-item
|
|
@@ -203,13 +209,13 @@ let o = class extends I {
|
|
|
203
209
|
?exclude-virtual-folders=${this.excludeVirtualFolders}
|
|
204
210
|
?has-children=${e.hasChildren}
|
|
205
211
|
base-url=${this.baseUrl}
|
|
206
|
-
url=${
|
|
212
|
+
url=${y(e.url ?? void 0)}
|
|
207
213
|
.api=${this.api}
|
|
208
214
|
value=${e.url}
|
|
209
215
|
></cx-folder-select-tree-item>`
|
|
210
216
|
)}
|
|
211
217
|
</cx-tree-item>
|
|
212
|
-
${
|
|
218
|
+
${C(
|
|
213
219
|
this.hasMore,
|
|
214
220
|
() => f`
|
|
215
221
|
<div slot="children" class="load-more-button">
|
|
@@ -226,84 +232,89 @@ let o = class extends I {
|
|
|
226
232
|
`;
|
|
227
233
|
}
|
|
228
234
|
};
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
"cx-button":
|
|
232
|
-
"cx-icon":
|
|
233
|
-
"cx-line-clamp":
|
|
234
|
-
"cx-space":
|
|
235
|
-
"cx-tree-item":
|
|
235
|
+
n.styles = [R];
|
|
236
|
+
n.dependencies = {
|
|
237
|
+
"cx-button": W,
|
|
238
|
+
"cx-icon": A,
|
|
239
|
+
"cx-line-clamp": ie,
|
|
240
|
+
"cx-space": oe,
|
|
241
|
+
"cx-tree-item": $
|
|
236
242
|
};
|
|
237
|
-
|
|
243
|
+
d([
|
|
238
244
|
B("cx-tree-item")
|
|
239
|
-
],
|
|
240
|
-
|
|
245
|
+
], n.prototype, "treeItem", 2);
|
|
246
|
+
d([
|
|
241
247
|
r({ attribute: "folder-id", reflect: !0, type: String })
|
|
242
|
-
],
|
|
243
|
-
|
|
248
|
+
], n.prototype, "folderId", 2);
|
|
249
|
+
d([
|
|
244
250
|
r({ attribute: "has-children", reflect: !0, type: Boolean })
|
|
245
|
-
],
|
|
246
|
-
|
|
251
|
+
], n.prototype, "hasChildren", 2);
|
|
252
|
+
d([
|
|
247
253
|
r({ attribute: "full-path", reflect: !0, type: String })
|
|
248
|
-
],
|
|
249
|
-
|
|
254
|
+
], n.prototype, "fullPath", 2);
|
|
255
|
+
d([
|
|
250
256
|
r({ attribute: "doc-type", reflect: !0, type: String })
|
|
251
|
-
],
|
|
252
|
-
|
|
257
|
+
], n.prototype, "docType", 2);
|
|
258
|
+
d([
|
|
253
259
|
r({ reflect: !0, type: String })
|
|
254
|
-
],
|
|
255
|
-
|
|
260
|
+
], n.prototype, "name", 2);
|
|
261
|
+
d([
|
|
256
262
|
r({
|
|
257
263
|
attribute: "representative-asset-id",
|
|
258
264
|
reflect: !0,
|
|
259
265
|
type: String
|
|
260
266
|
})
|
|
261
|
-
],
|
|
262
|
-
|
|
267
|
+
], n.prototype, "representativeAssetId", 2);
|
|
268
|
+
d([
|
|
263
269
|
r({ attribute: "selected-value", reflect: !0, type: String })
|
|
264
|
-
],
|
|
265
|
-
|
|
270
|
+
], n.prototype, "selectedValue", 2);
|
|
271
|
+
d([
|
|
266
272
|
r({ reflect: !0, type: String })
|
|
267
|
-
],
|
|
268
|
-
|
|
273
|
+
], n.prototype, "token", 2);
|
|
274
|
+
d([
|
|
269
275
|
r({ attribute: "bearer-token", reflect: !0, type: String })
|
|
270
|
-
],
|
|
271
|
-
|
|
276
|
+
], n.prototype, "bearerToken", 2);
|
|
277
|
+
d([
|
|
272
278
|
r({ attribute: "base-url", reflect: !0, type: String })
|
|
273
|
-
],
|
|
274
|
-
|
|
279
|
+
], n.prototype, "baseUrl", 2);
|
|
280
|
+
d([
|
|
281
|
+
r({ attribute: "search-term", reflect: !0, type: String })
|
|
282
|
+
], n.prototype, "searchTerm", 2);
|
|
283
|
+
d([
|
|
275
284
|
r({ type: Function })
|
|
276
|
-
],
|
|
277
|
-
|
|
285
|
+
], n.prototype, "api", 2);
|
|
286
|
+
d([
|
|
278
287
|
r({
|
|
279
288
|
attribute: "exclude-virtual-folders",
|
|
280
289
|
reflect: !0,
|
|
281
290
|
type: Boolean
|
|
282
291
|
})
|
|
283
|
-
],
|
|
284
|
-
|
|
292
|
+
], n.prototype, "excludeVirtualFolders", 2);
|
|
293
|
+
d([
|
|
285
294
|
r({ reflect: !0, type: String })
|
|
286
|
-
],
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
],
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
],
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
],
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
],
|
|
299
|
-
var
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
295
|
+
], n.prototype, "url", 2);
|
|
296
|
+
d([
|
|
297
|
+
x()
|
|
298
|
+
], n.prototype, "data", 2);
|
|
299
|
+
d([
|
|
300
|
+
x()
|
|
301
|
+
], n.prototype, "hasMore", 2);
|
|
302
|
+
d([
|
|
303
|
+
x()
|
|
304
|
+
], n.prototype, "loading", 2);
|
|
305
|
+
n = d([
|
|
306
|
+
D("cx-folder-select-tree-item")
|
|
307
|
+
], n);
|
|
308
|
+
var ue = Object.defineProperty, fe = Object.getOwnPropertyDescriptor, Q = (e) => {
|
|
309
|
+
throw TypeError(e);
|
|
310
|
+
}, h = (e, t, a, i) => {
|
|
311
|
+
for (var l = i > 1 ? void 0 : i ? fe(t, a) : t, p = e.length - 1, u; p >= 0; p--)
|
|
312
|
+
(u = e[p]) && (l = (i ? u(t, a, l) : u(l)) || l);
|
|
313
|
+
return i && l && ue(t, a, l), l;
|
|
314
|
+
}, N = (e, t, a) => t.has(e) || Q("Cannot " + a), me = (e, t, a) => (N(e, t, "read from private field"), t.get(e)), ye = (e, t, a) => t.has(e) ? Q("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, a), xe = (e, t, a, i) => (N(e, t, "write to private field"), t.set(e, a), a), S;
|
|
315
|
+
let c = class extends O {
|
|
305
316
|
constructor() {
|
|
306
|
-
super(...arguments), this.localize = new
|
|
317
|
+
super(...arguments), this.localize = new w(this), this.minQueryLength = 1, this.selection = "single", this.searchTerm = "", this.selectedValue = "", this.token = "", this.bearerToken = "", this.baseUrl = "", this.extraFolderId = "", this.extraFolderTitle = "", this.seeThru = !1, this.extraFolderData = null, this.api = V, this.excludeVirtualFolders = !1, this.firstFetchCallback = null, this.data = [], this.hasMore = !1, this.loading = !1, ye(this, S, !1);
|
|
307
318
|
}
|
|
308
319
|
get empty() {
|
|
309
320
|
return !this.loading && this.data.length === 0;
|
|
@@ -317,27 +328,60 @@ let h = class extends I {
|
|
|
317
328
|
runFirstUpdated() {
|
|
318
329
|
this.searchTerm = "", this.handleFetchFolders();
|
|
319
330
|
}
|
|
331
|
+
async handleExtraFolderIdChange() {
|
|
332
|
+
if (!this.extraFolderId || !this.api) {
|
|
333
|
+
this.extraFolderData = null;
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
const { data: e } = await this.api({
|
|
337
|
+
baseUrl: this.baseUrl,
|
|
338
|
+
bearerToken: this.bearerToken,
|
|
339
|
+
excludeVirtualFolders: this.excludeVirtualFolders,
|
|
340
|
+
folderId: this.extraFolderId,
|
|
341
|
+
includeDirectChild: !1,
|
|
342
|
+
limit: 1,
|
|
343
|
+
searchTerm: this.searchTerm,
|
|
344
|
+
seeThru: this.seeThru,
|
|
345
|
+
self: !0,
|
|
346
|
+
start: 0,
|
|
347
|
+
token: this.token
|
|
348
|
+
});
|
|
349
|
+
this.extraFolderData = e[0] ?? null;
|
|
350
|
+
}
|
|
320
351
|
async loadMore(e) {
|
|
321
352
|
if (!this.api)
|
|
322
353
|
return;
|
|
323
354
|
e.stopPropagation();
|
|
324
355
|
const t = this.data.length;
|
|
325
356
|
this.loading = !0;
|
|
326
|
-
const { data:
|
|
357
|
+
const { data: a, hasMore: i } = await this.api({
|
|
327
358
|
baseUrl: this.baseUrl,
|
|
328
359
|
bearerToken: this.bearerToken,
|
|
329
360
|
excludeVirtualFolders: this.excludeVirtualFolders,
|
|
330
361
|
folderId: "",
|
|
331
362
|
limit: 10,
|
|
332
363
|
searchTerm: this.searchTerm,
|
|
364
|
+
seeThru: this.seeThru,
|
|
333
365
|
start: t,
|
|
334
366
|
token: this.token
|
|
335
367
|
});
|
|
336
|
-
this.data = [...this.data, ...
|
|
368
|
+
this.data = [...this.data, ...a], this.hasMore = i, this.loading = !1;
|
|
337
369
|
}
|
|
338
370
|
async handleFetchFolders() {
|
|
339
|
-
|
|
340
|
-
|
|
371
|
+
const { data: e, hasMore: t } = await this.fetchFolders();
|
|
372
|
+
me(this, S) || e.length > 0 && (this.firstFetchCallback?.(e), xe(this, S, !0)), this.data = e, this.hasMore = t, this.loading = !1;
|
|
373
|
+
}
|
|
374
|
+
async fetchFolders() {
|
|
375
|
+
if (!this.api)
|
|
376
|
+
return {
|
|
377
|
+
data: [],
|
|
378
|
+
hasMore: !1
|
|
379
|
+
};
|
|
380
|
+
if (this.searchTerm.length > 0 && this.searchTerm.length < this.minQueryLength)
|
|
381
|
+
return {
|
|
382
|
+
data: [],
|
|
383
|
+
hasMore: !1
|
|
384
|
+
};
|
|
341
385
|
this.loading = !0;
|
|
342
386
|
const { data: e, hasMore: t } = await this.api({
|
|
343
387
|
baseUrl: this.baseUrl,
|
|
@@ -346,10 +390,14 @@ let h = class extends I {
|
|
|
346
390
|
folderId: "",
|
|
347
391
|
limit: 10,
|
|
348
392
|
searchTerm: this.searchTerm,
|
|
393
|
+
seeThru: this.seeThru,
|
|
349
394
|
start: 0,
|
|
350
395
|
token: this.token
|
|
351
396
|
});
|
|
352
|
-
this.data = e, this.hasMore = t, this.loading = !1
|
|
397
|
+
return this.data = e, this.hasMore = t, this.loading = !1, {
|
|
398
|
+
data: e,
|
|
399
|
+
hasMore: t
|
|
400
|
+
};
|
|
353
401
|
}
|
|
354
402
|
renderFolder(e) {
|
|
355
403
|
return f`<cx-folder-select-tree-item
|
|
@@ -357,12 +405,13 @@ let h = class extends I {
|
|
|
357
405
|
base-url=${this.baseUrl}
|
|
358
406
|
doc-type=${e.docType}
|
|
359
407
|
folder-id=${e.id}
|
|
360
|
-
full-path=${e.fullPath}
|
|
408
|
+
full-path=${y(e.fullPath ?? void 0)}
|
|
361
409
|
name=${e.title}
|
|
410
|
+
search-term=${this.searchTerm}
|
|
362
411
|
selected-value=${this.selectedValue}
|
|
363
412
|
token=${this.token}
|
|
364
413
|
bearer-token=${this.bearerToken}
|
|
365
|
-
url=${
|
|
414
|
+
url=${y(e.url ?? void 0)}
|
|
366
415
|
?has-children=${e.hasChildren}
|
|
367
416
|
?exclude-virtual-folders=${this.excludeVirtualFolders}
|
|
368
417
|
></cx-folder-select-tree-item>`;
|
|
@@ -375,7 +424,7 @@ let h = class extends I {
|
|
|
375
424
|
disabled-auto-expand
|
|
376
425
|
disabled-sync-checkboxes
|
|
377
426
|
>
|
|
378
|
-
${
|
|
427
|
+
${C(
|
|
379
428
|
this.empty,
|
|
380
429
|
() => f`<div
|
|
381
430
|
class="folder-select-tree__empty-message"
|
|
@@ -387,12 +436,30 @@ let h = class extends I {
|
|
|
387
436
|
</cx-typography>
|
|
388
437
|
</div>`
|
|
389
438
|
)}
|
|
390
|
-
${
|
|
439
|
+
${C(
|
|
440
|
+
this.extraFolderData,
|
|
441
|
+
() => f`<cx-folder-select-tree-item
|
|
442
|
+
.api=${this.api}
|
|
443
|
+
base-url=${this.baseUrl}
|
|
444
|
+
doc-type=${y(this.extraFolderData?.docType ?? void 0)}
|
|
445
|
+
folder-id=${y(this.extraFolderData?.id ?? void 0)}
|
|
446
|
+
full-path=${y(this.extraFolderData?.fullPath ?? void 0)}
|
|
447
|
+
name=${this.extraFolderTitle || this.extraFolderData?.title}
|
|
448
|
+
search-term=${this.searchTerm}
|
|
449
|
+
selected-value=${this.selectedValue}
|
|
450
|
+
token=${this.token}
|
|
451
|
+
bearer-token=${this.bearerToken}
|
|
452
|
+
url=${y(this.extraFolderData?.url ?? void 0)}
|
|
453
|
+
?has-children=${this.extraFolderData?.hasChildren}
|
|
454
|
+
?exclude-virtual-folders=${this.excludeVirtualFolders}
|
|
455
|
+
></cx-folder-select-tree-item>`
|
|
456
|
+
)}
|
|
457
|
+
${q(
|
|
391
458
|
this.data,
|
|
392
459
|
(e) => e.id,
|
|
393
460
|
(e) => this.renderFolder(e)
|
|
394
461
|
)}
|
|
395
|
-
${
|
|
462
|
+
${C(
|
|
396
463
|
this.hasMore,
|
|
397
464
|
() => f`
|
|
398
465
|
<cx-button
|
|
@@ -408,62 +475,81 @@ let h = class extends I {
|
|
|
408
475
|
</cx-tree>`;
|
|
409
476
|
}
|
|
410
477
|
};
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
"cx-
|
|
414
|
-
"cx-tree":
|
|
478
|
+
S = /* @__PURE__ */ new WeakMap();
|
|
479
|
+
c.dependencies = {
|
|
480
|
+
"cx-button": W,
|
|
481
|
+
"cx-folder-select-tree-item": n,
|
|
482
|
+
"cx-tree": ee
|
|
415
483
|
};
|
|
416
|
-
|
|
484
|
+
h([
|
|
417
485
|
r({ attribute: "min-query-length", reflect: !0, type: Number })
|
|
418
|
-
],
|
|
419
|
-
|
|
486
|
+
], c.prototype, "minQueryLength", 2);
|
|
487
|
+
h([
|
|
420
488
|
r({ attribute: "selection", reflect: !0, type: String })
|
|
421
|
-
],
|
|
422
|
-
|
|
489
|
+
], c.prototype, "selection", 2);
|
|
490
|
+
h([
|
|
423
491
|
r({ attribute: "search-term", reflect: !0, type: String })
|
|
424
|
-
],
|
|
425
|
-
|
|
492
|
+
], c.prototype, "searchTerm", 2);
|
|
493
|
+
h([
|
|
426
494
|
r({ attribute: "selected-value", reflect: !0, type: String })
|
|
427
|
-
],
|
|
428
|
-
|
|
495
|
+
], c.prototype, "selectedValue", 2);
|
|
496
|
+
h([
|
|
429
497
|
r({ reflect: !0, type: String })
|
|
430
|
-
],
|
|
431
|
-
|
|
498
|
+
], c.prototype, "token", 2);
|
|
499
|
+
h([
|
|
432
500
|
r({ attribute: "bearer-token", reflect: !0, type: String })
|
|
433
|
-
],
|
|
434
|
-
|
|
501
|
+
], c.prototype, "bearerToken", 2);
|
|
502
|
+
h([
|
|
435
503
|
r({ attribute: "base-url", reflect: !0, type: String })
|
|
436
|
-
],
|
|
437
|
-
|
|
504
|
+
], c.prototype, "baseUrl", 2);
|
|
505
|
+
h([
|
|
506
|
+
r({ attribute: "extra-folder-id", reflect: !0, type: String })
|
|
507
|
+
], c.prototype, "extraFolderId", 2);
|
|
508
|
+
h([
|
|
509
|
+
r({ attribute: "extra-folder-title", reflect: !0, type: String })
|
|
510
|
+
], c.prototype, "extraFolderTitle", 2);
|
|
511
|
+
h([
|
|
512
|
+
r({ attribute: "see-thru", reflect: !0, type: Boolean })
|
|
513
|
+
], c.prototype, "seeThru", 2);
|
|
514
|
+
h([
|
|
515
|
+
x()
|
|
516
|
+
], c.prototype, "extraFolderData", 2);
|
|
517
|
+
h([
|
|
438
518
|
r({ type: Function })
|
|
439
|
-
],
|
|
440
|
-
|
|
519
|
+
], c.prototype, "api", 2);
|
|
520
|
+
h([
|
|
441
521
|
r({
|
|
442
522
|
attribute: "exclude-virtual-folders",
|
|
443
523
|
reflect: !0,
|
|
444
524
|
type: Boolean
|
|
445
525
|
})
|
|
446
|
-
],
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
],
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
],
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
],
|
|
456
|
-
|
|
526
|
+
], c.prototype, "excludeVirtualFolders", 2);
|
|
527
|
+
h([
|
|
528
|
+
r({ attribute: "first-fetch-callback", reflect: !1, type: Function })
|
|
529
|
+
], c.prototype, "firstFetchCallback", 2);
|
|
530
|
+
h([
|
|
531
|
+
x()
|
|
532
|
+
], c.prototype, "data", 2);
|
|
533
|
+
h([
|
|
534
|
+
x()
|
|
535
|
+
], c.prototype, "hasMore", 2);
|
|
536
|
+
h([
|
|
537
|
+
x()
|
|
538
|
+
], c.prototype, "loading", 2);
|
|
539
|
+
h([
|
|
540
|
+
m("extraFolderId")
|
|
541
|
+
], c.prototype, "handleExtraFolderIdChange", 1);
|
|
542
|
+
h([
|
|
457
543
|
m("baseUrl", { waitUntilFirstUpdate: !0 }),
|
|
458
544
|
m("token", { waitUntilFirstUpdate: !0 }),
|
|
459
545
|
m("searchTerm", { waitUntilFirstUpdate: !0 }),
|
|
460
546
|
m("excludeVirtualFolders", { waitUntilFirstUpdate: !0 }),
|
|
461
|
-
|
|
462
|
-
],
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
],
|
|
466
|
-
const
|
|
547
|
+
le(500)
|
|
548
|
+
], c.prototype, "handleFetchFolders", 1);
|
|
549
|
+
c = h([
|
|
550
|
+
D("cx-folder-select-tree")
|
|
551
|
+
], c);
|
|
552
|
+
const be = ae`
|
|
467
553
|
:host {
|
|
468
554
|
display: block;
|
|
469
555
|
width: 100%;
|
|
@@ -472,6 +558,7 @@ const he = X`
|
|
|
472
558
|
.folder-select {
|
|
473
559
|
display: flex;
|
|
474
560
|
flex-direction: column;
|
|
561
|
+
gap: var(--cx-spacing-x-small);
|
|
475
562
|
}
|
|
476
563
|
|
|
477
564
|
.folder-select-tree {
|
|
@@ -503,27 +590,34 @@ const he = X`
|
|
|
503
590
|
overflow: hidden;
|
|
504
591
|
}
|
|
505
592
|
`;
|
|
506
|
-
var
|
|
593
|
+
var ve = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, H = (e) => {
|
|
507
594
|
throw TypeError(e);
|
|
508
|
-
},
|
|
509
|
-
for (var
|
|
510
|
-
(
|
|
511
|
-
return
|
|
512
|
-
}, j = (e, t,
|
|
513
|
-
let
|
|
595
|
+
}, o = (e, t, a, i) => {
|
|
596
|
+
for (var l = i > 1 ? void 0 : i ? ge(t, a) : t, p = e.length - 1, u; p >= 0; p--)
|
|
597
|
+
(u = e[p]) && (l = (i ? u(t, a, l) : u(l)) || l);
|
|
598
|
+
return i && l && ve(t, a, l), l;
|
|
599
|
+
}, j = (e, t, a) => t.has(e) || H("Cannot " + a), G = (e, t, a) => (j(e, t, "read from private field"), a ? a.call(e) : t.get(e)), $e = (e, t, a) => t.has(e) ? H("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, a), z = (e, t, a, i) => (j(e, t, "write to private field"), t.set(e, a), a), T;
|
|
600
|
+
let s = class extends O {
|
|
514
601
|
constructor() {
|
|
515
|
-
super(), this.localize = new
|
|
602
|
+
super(), this.localize = new w(this), this.minQueryLength = 1, this.selection = "single", this.variant = F.Input, this.value = "", this.name = "", this.selectedLabel = "", this.baseUrl = "", this.open = !1, this.token = "", this.bearerToken = "", this.seeThru = !1, this.api = V, this.required = !1, this.form = void 0, this.excludeVirtualFolders = !1, this.extraFolderId = "", this.extraFolderTitle = "", this.firstFetchCallback = null, this.searchTerm = "", $e(this, T), this.selectGetOptionValue = this.selectGetOptionValue.bind(this), this.selectGetOptionLabel = this.selectGetOptionLabel.bind(this), this.selectGetOptionSelected = this.selectGetOptionSelected.bind(this), this.selectFilterCallback = this.selectFilterCallback.bind(this), this.selectSetOptionSelected = this.selectSetOptionSelected.bind(this), this.updateWrappedApi();
|
|
516
603
|
}
|
|
517
604
|
updateWrappedApi() {
|
|
518
605
|
if (!this.api) {
|
|
519
|
-
z(this,
|
|
606
|
+
z(this, T, void 0);
|
|
520
607
|
return;
|
|
521
608
|
}
|
|
522
|
-
z(this,
|
|
609
|
+
z(this, T, async (e) => {
|
|
523
610
|
try {
|
|
524
611
|
return await this.api(e);
|
|
525
612
|
} catch (t) {
|
|
526
|
-
return t instanceof
|
|
613
|
+
return t instanceof re && t.response?.status === 401 && this.emit("cx-renew-token"), { data: [], hasMore: !1, totalCount: 0 };
|
|
614
|
+
}
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
handleSearchTermChange() {
|
|
618
|
+
this.emit("cx-folder-select-search-term-change", {
|
|
619
|
+
detail: {
|
|
620
|
+
value: this.searchTerm
|
|
527
621
|
}
|
|
528
622
|
});
|
|
529
623
|
}
|
|
@@ -534,20 +628,20 @@ let i = class extends I {
|
|
|
534
628
|
this.searchTerm = e.target.displayInput.value;
|
|
535
629
|
}
|
|
536
630
|
selectGetOptionValue(e) {
|
|
537
|
-
return !e || !(e instanceof
|
|
631
|
+
return !e || !(e instanceof $) ? this.value : e.dataset.id || this.value;
|
|
538
632
|
}
|
|
539
633
|
selectGetOptionLabel(e) {
|
|
540
|
-
return !e || !(e instanceof
|
|
634
|
+
return !e || !(e instanceof $) ? this.selectedLabel : e.dataset.name || this.selectedLabel;
|
|
541
635
|
}
|
|
542
636
|
selectGetOptionSelected(e) {
|
|
543
|
-
if (!(!e || !(e instanceof
|
|
637
|
+
if (!(!e || !(e instanceof $)))
|
|
544
638
|
return e.selected;
|
|
545
639
|
}
|
|
546
640
|
selectFilterCallback(e) {
|
|
547
|
-
return !(!e || !(e instanceof
|
|
641
|
+
return !(!e || !(e instanceof $));
|
|
548
642
|
}
|
|
549
643
|
selectSetOptionSelected(e, t) {
|
|
550
|
-
if (!(!e || !(e instanceof
|
|
644
|
+
if (!(!e || !(e instanceof $))) {
|
|
551
645
|
if (t === void 0) {
|
|
552
646
|
e.selected = !e.selected;
|
|
553
647
|
return;
|
|
@@ -568,16 +662,16 @@ let i = class extends I {
|
|
|
568
662
|
}
|
|
569
663
|
}
|
|
570
664
|
async handleVariantChange() {
|
|
571
|
-
this.variant ===
|
|
665
|
+
this.variant === F.Select && (await this.updateComplete, this.updateFunctionProps());
|
|
572
666
|
}
|
|
573
667
|
handleValueChange() {
|
|
574
668
|
this.selectEl && (this.searchTerm = "", this.selectEl.getOptionValue = this.selectGetOptionValue, this.selectEl.getOptionLabel = this.selectGetOptionLabel, this.selectEl.getOptionSelected = this.selectGetOptionSelected, this.selectEl.filterCallback = this.selectFilterCallback, this.selectEl.setOptionSelected = this.selectSetOptionSelected, this.selectEl.handleDefaultSlotChange());
|
|
575
669
|
}
|
|
576
670
|
render() {
|
|
577
671
|
return f`<div class="folder-select">
|
|
578
|
-
${
|
|
672
|
+
${se(this.variant, [
|
|
579
673
|
[
|
|
580
|
-
|
|
674
|
+
F.Input,
|
|
581
675
|
() => f`
|
|
582
676
|
<cx-input
|
|
583
677
|
aria-label=${this.localize.term("searchFolders")}
|
|
@@ -590,6 +684,8 @@ let i = class extends I {
|
|
|
590
684
|
</cx-input>
|
|
591
685
|
<cx-folder-select-tree
|
|
592
686
|
base-url=${this.baseUrl}
|
|
687
|
+
extra-folder-id=${this.extraFolderId}
|
|
688
|
+
extra-folder-title=${this.extraFolderTitle}
|
|
593
689
|
min-query-length=${this.minQueryLength}
|
|
594
690
|
search-term=${this.searchTerm}
|
|
595
691
|
selected-value=${this.value}
|
|
@@ -597,13 +693,15 @@ let i = class extends I {
|
|
|
597
693
|
token=${this.token}
|
|
598
694
|
bearer-token=${this.bearerToken}
|
|
599
695
|
?exclude-virtual-folders=${this.excludeVirtualFolders}
|
|
600
|
-
|
|
696
|
+
?see-thru=${this.seeThru}
|
|
697
|
+
.api=${G(this, T)}
|
|
698
|
+
.firstFetchCallback=${this.firstFetchCallback}
|
|
601
699
|
>
|
|
602
700
|
</cx-folder-select-tree>
|
|
603
701
|
`
|
|
604
702
|
],
|
|
605
703
|
[
|
|
606
|
-
|
|
704
|
+
F.Select,
|
|
607
705
|
() => f`
|
|
608
706
|
<cx-select
|
|
609
707
|
clearable
|
|
@@ -619,6 +717,8 @@ let i = class extends I {
|
|
|
619
717
|
>
|
|
620
718
|
<cx-folder-select-tree
|
|
621
719
|
base-url=${this.baseUrl}
|
|
720
|
+
extra-folder-id=${this.extraFolderId}
|
|
721
|
+
extra-folder-title=${this.extraFolderTitle}
|
|
622
722
|
min-query-length=${this.minQueryLength}
|
|
623
723
|
search-term=${this.searchTerm}
|
|
624
724
|
selected-value=${this.value}
|
|
@@ -626,7 +726,9 @@ let i = class extends I {
|
|
|
626
726
|
token=${this.token}
|
|
627
727
|
bearer-token=${this.bearerToken}
|
|
628
728
|
?exclude-virtual-folders=${this.excludeVirtualFolders}
|
|
629
|
-
|
|
729
|
+
?see-thru=${this.seeThru}
|
|
730
|
+
.api=${G(this, T)}
|
|
731
|
+
.firstFetchCallback=${this.firstFetchCallback}
|
|
630
732
|
>
|
|
631
733
|
</cx-folder-select-tree>
|
|
632
734
|
</cx-select>
|
|
@@ -636,84 +738,107 @@ let i = class extends I {
|
|
|
636
738
|
</div>`;
|
|
637
739
|
}
|
|
638
740
|
};
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
"cx-folder-select-tree":
|
|
643
|
-
"cx-icon":
|
|
644
|
-
"cx-input":
|
|
645
|
-
"cx-select":
|
|
741
|
+
T = /* @__PURE__ */ new WeakMap();
|
|
742
|
+
s.styles = [R, be];
|
|
743
|
+
s.dependencies = {
|
|
744
|
+
"cx-folder-select-tree": c,
|
|
745
|
+
"cx-icon": A,
|
|
746
|
+
"cx-input": X,
|
|
747
|
+
"cx-select": Y
|
|
646
748
|
};
|
|
647
|
-
|
|
749
|
+
o([
|
|
648
750
|
B("cx-select")
|
|
649
|
-
],
|
|
650
|
-
|
|
751
|
+
], s.prototype, "selectEl", 2);
|
|
752
|
+
o([
|
|
651
753
|
r({ attribute: "min-query-length", reflect: !0, type: Number })
|
|
652
|
-
],
|
|
653
|
-
|
|
754
|
+
], s.prototype, "minQueryLength", 2);
|
|
755
|
+
o([
|
|
654
756
|
r({ attribute: "selection", reflect: !0, type: String })
|
|
655
|
-
],
|
|
656
|
-
|
|
757
|
+
], s.prototype, "selection", 2);
|
|
758
|
+
o([
|
|
657
759
|
r({ attribute: "variant", reflect: !0, type: String })
|
|
658
|
-
],
|
|
659
|
-
|
|
760
|
+
], s.prototype, "variant", 2);
|
|
761
|
+
o([
|
|
660
762
|
r({ reflect: !0, type: String })
|
|
661
|
-
],
|
|
662
|
-
|
|
763
|
+
], s.prototype, "value", 2);
|
|
764
|
+
o([
|
|
663
765
|
r({ reflect: !0, type: String })
|
|
664
|
-
],
|
|
665
|
-
|
|
766
|
+
], s.prototype, "name", 2);
|
|
767
|
+
o([
|
|
666
768
|
r({ attribute: "selected-label", reflect: !0, type: String })
|
|
667
|
-
],
|
|
668
|
-
|
|
769
|
+
], s.prototype, "selectedLabel", 2);
|
|
770
|
+
o([
|
|
669
771
|
r({ attribute: "base-url", reflect: !0, type: String })
|
|
670
|
-
],
|
|
671
|
-
|
|
772
|
+
], s.prototype, "baseUrl", 2);
|
|
773
|
+
o([
|
|
672
774
|
r({ reflect: !0, type: Boolean })
|
|
673
|
-
],
|
|
674
|
-
|
|
775
|
+
], s.prototype, "open", 2);
|
|
776
|
+
o([
|
|
675
777
|
r({ reflect: !1, type: String })
|
|
676
|
-
],
|
|
677
|
-
|
|
778
|
+
], s.prototype, "token", 2);
|
|
779
|
+
o([
|
|
678
780
|
r({ attribute: "bearer-token", reflect: !0, type: String })
|
|
679
|
-
],
|
|
680
|
-
|
|
781
|
+
], s.prototype, "bearerToken", 2);
|
|
782
|
+
o([
|
|
783
|
+
r({ attribute: "see-thru", reflect: !0, type: Boolean })
|
|
784
|
+
], s.prototype, "seeThru", 2);
|
|
785
|
+
o([
|
|
681
786
|
r({ type: Function })
|
|
682
|
-
],
|
|
683
|
-
|
|
787
|
+
], s.prototype, "api", 2);
|
|
788
|
+
o([
|
|
684
789
|
r({ reflect: !0, type: Boolean })
|
|
685
|
-
],
|
|
686
|
-
|
|
790
|
+
], s.prototype, "required", 2);
|
|
791
|
+
o([
|
|
687
792
|
r({ reflect: !1 })
|
|
688
|
-
],
|
|
689
|
-
|
|
793
|
+
], s.prototype, "form", 2);
|
|
794
|
+
o([
|
|
690
795
|
r({
|
|
691
796
|
attribute: "exclude-virtual-folders",
|
|
692
797
|
reflect: !0,
|
|
693
798
|
type: Boolean
|
|
694
799
|
})
|
|
695
|
-
],
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
800
|
+
], s.prototype, "excludeVirtualFolders", 2);
|
|
801
|
+
o([
|
|
802
|
+
r({
|
|
803
|
+
attribute: "extra-folder-id",
|
|
804
|
+
reflect: !0,
|
|
805
|
+
type: String
|
|
806
|
+
})
|
|
807
|
+
], s.prototype, "extraFolderId", 2);
|
|
808
|
+
o([
|
|
809
|
+
r({
|
|
810
|
+
attribute: "extra-folder-title",
|
|
811
|
+
reflect: !0,
|
|
812
|
+
type: String
|
|
813
|
+
})
|
|
814
|
+
], s.prototype, "extraFolderTitle", 2);
|
|
815
|
+
o([
|
|
816
|
+
r({ attribute: "first-fetch-callback", reflect: !1, type: Function })
|
|
817
|
+
], s.prototype, "firstFetchCallback", 2);
|
|
818
|
+
o([
|
|
819
|
+
x()
|
|
820
|
+
], s.prototype, "searchTerm", 2);
|
|
821
|
+
o([
|
|
700
822
|
m("api")
|
|
701
|
-
],
|
|
702
|
-
|
|
823
|
+
], s.prototype, "updateWrappedApi", 1);
|
|
824
|
+
o([
|
|
825
|
+
m("searchTerm", { waitUntilFirstUpdate: !0 })
|
|
826
|
+
], s.prototype, "handleSearchTermChange", 1);
|
|
827
|
+
o([
|
|
703
828
|
m("open")
|
|
704
|
-
],
|
|
705
|
-
|
|
829
|
+
], s.prototype, "handleOpenChange", 1);
|
|
830
|
+
o([
|
|
706
831
|
m("variant")
|
|
707
|
-
],
|
|
708
|
-
|
|
832
|
+
], s.prototype, "handleVariantChange", 1);
|
|
833
|
+
o([
|
|
709
834
|
m("selectedLabel", { waitUntilFirstUpdate: !0 }),
|
|
710
835
|
m("value", { waitUntilFirstUpdate: !0 })
|
|
711
|
-
],
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
],
|
|
836
|
+
], s.prototype, "handleValueChange", 1);
|
|
837
|
+
s = o([
|
|
838
|
+
D("cx-folder-select")
|
|
839
|
+
], s);
|
|
715
840
|
export {
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
841
|
+
s as C,
|
|
842
|
+
F,
|
|
843
|
+
V as a
|
|
719
844
|
};
|