@orangelogic/design-system 2.133.0 → 2.135.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/library/chunks/asset-link-format.BBWyY5fn.js +2627 -0
- package/library/chunks/{button.DYoFn504.js → button.3giRMk79.js} +2 -2
- package/library/chunks/{checkbox.uH0uF0OV.js → checkbox.B-2O517F.js} +3 -3
- package/library/chunks/{table.DuP4v5FN.js → color-swatch-group.DC6vIYo4.js} +3133 -2887
- package/library/chunks/{color-swatch.0zyBEfL_.js → color-swatch.g3FPUnxM.js} +2 -2
- package/library/chunks/{confirm-popover.DpVYvK20.js → confirm-popover.DtndPsMa.js} +3 -3
- package/library/chunks/{dialog.BwBD_hJi.js → dialog.BQq3xBeH.js} +2 -2
- package/library/chunks/directive-helpers.DEDMV45_.js +42 -0
- package/library/chunks/{document-viewer.BM716ovi.js → document-viewer.BQPJD2lJ.js} +8 -8
- package/library/chunks/{dom.BXeuEG1b.js → dom.acWb8KCK.js} +1 -1
- package/library/chunks/{dot-pagination.B70lV5Av.js → dot-pagination.DBk9Rz1e.js} +1 -1
- package/library/chunks/{endpoints.6E17hFiK.js → endpoints.tU0_RZ_7.js} +4 -4
- package/library/chunks/{file-on-demand.D-Ectby2.js → file-on-demand.Bnloo9Ui.js} +12 -12
- package/library/chunks/folder-select.DuG4dSPm.js +942 -0
- package/library/chunks/{form.3af0bYrm.js → form.K1XOtu3S.js} +1 -1
- package/library/chunks/{header.BMGvKrdP.js → header.Bpjw08j7.js} +1 -1
- package/library/chunks/{i18n.DoMIwXr2.js → i18n.DJikbkDK.js} +48 -12
- package/library/chunks/{icon-button.B-Jf9W3v.js → icon-button.xobY-9OH.js} +1 -1
- package/library/chunks/{iframe.Cdv6esyS.js → iframe.BkvxcywO.js} +1 -1
- package/library/chunks/{image.SLqIVjqc.js → image.KZRXIthe.js} +241 -229
- package/library/chunks/{input.CQNhMu4z.js → input.GUw7x9tK.js} +3 -3
- package/library/chunks/{keyed.C0rkKrxH.js → keyed.DdOUTIg-.js} +1 -1
- package/library/chunks/{live.SCz6M8Gs.js → live.DCegntDo.js} +1 -1
- package/library/chunks/{option.SCVixE2L.js → option.uHye0aDT.js} +1 -1
- package/library/chunks/{pagination.BFE6Nk3_.js → pagination.D8Hzwlan.js} +6 -6
- package/library/chunks/{ref.bzeTdX0K.js → ref.DktKp7fP.js} +1 -1
- package/library/chunks/{repeat.DbF2p5ae.js → repeat.CFjcER6_.js} +1 -1
- package/library/chunks/{resizable-component.styles.BVhOesNE.js → resizable-component.styles.CAfXABBc.js} +5 -5
- package/library/chunks/{string.CbnVBzsd.js → string.CjJ09HK3.js} +14 -11
- package/library/chunks/{tab-group.C-p2Dljr.js → tab-group.0_aOE22R.js} +5 -5
- package/library/chunks/toast.Bz-j7zP2.js +109 -0
- package/library/chunks/{tree.9PK8ifJd.js → tree.C14rLLol.js} +3 -3
- package/library/chunks/url.-WDYqplj.js +42 -0
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +16 -2163
- package/library/components/atoms.js +49 -51
- package/library/components/audio.js +3 -3
- package/library/components/border-input-group.js +2 -2
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +3 -3
- package/library/components/checkbox.js +3 -3
- package/library/components/color-picker.js +4 -4
- package/library/components/color-swatch-group.js +6 -7
- package/library/components/color-swatch.js +3 -3
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.js +2 -2
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/diff.js +1 -1
- package/library/components/document-viewer.js +4 -4
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +88 -85
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +13 -13
- package/library/components/folder-select.js +5 -5
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +6 -5
- package/library/components/input.js +4 -4
- package/library/components/line-clamp.js +1 -1
- package/library/components/masonry.js +3 -3
- package/library/components/menu-item.js +2 -2
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +27 -29
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +6 -6
- package/library/components/padding-input-group.js +2 -2
- package/library/components/pagination.js +7 -7
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/radio-group.js +1 -1
- package/library/components/range.js +5 -5
- package/library/components/rating.js +2 -2
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +10 -7
- package/library/components/shadow-input-group.js +2 -2
- package/library/components/share-option-list.js +3 -3
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +3 -3
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/stepper-wizard.js +1 -1
- package/library/components/switch.js +2 -2
- package/library/components/tab-group.js +5 -5
- package/library/components/tab.js +2 -2
- package/library/components/tag.js +2 -2
- package/library/components/textarea.js +2 -2
- package/library/components/timecode.js +1 -1
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +4 -4
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +46083 -43779
- package/library/components/video.js +3 -3
- package/library/package.json +3 -1
- package/library/packages/atoms/src/components/image/image.d.ts +3 -0
- package/library/packages/atoms/src/components/select/select.d.ts +6 -0
- package/library/packages/atoms/src/components/tab-group/tab-group.d.ts +1 -0
- package/library/packages/atoms/src/index.d.ts +0 -1
- package/library/packages/events/src/cx-folder-select-selection-seeded.d.ts +6 -0
- package/library/packages/events/src/cx-image-src-resolved.d.ts +9 -0
- package/library/packages/events/src/cx-pdf-viewer-annotation-draw-mode-change.d.ts +10 -0
- package/library/packages/events/src/cx-pdf-viewer-annotation-draw-params-change.d.ts +11 -0
- package/library/packages/events/src/cx-pdf-viewer-more-options-select.d.ts +8 -0
- package/library/packages/events/src/cx-pdf-viewer-toolbar-annotation-mode-change.d.ts +10 -0
- package/library/packages/events/src/cx-pdf-viewer-toolbar-annotation-params-change.d.ts +11 -0
- package/library/packages/events/src/cx-pdf-viewer-toolbar-click.d.ts +8 -0
- package/library/packages/events/src/cx-pdf-viewer-toolbar-page-change.d.ts +8 -0
- package/library/packages/events/src/cx-pdf-viewer-toolbar-scale-change.d.ts +8 -0
- package/library/packages/events/src/cx-pdf-viewer-toolbar-view-toggle.d.ts +11 -0
- package/library/packages/events/src/cx-pdf-viewer-view-on-asset-toggle.d.ts +11 -0
- package/library/packages/events/src/cx-video-src-resolved.d.ts +8 -0
- package/library/packages/events/src/events.d.ts +13 -0
- package/library/packages/hybrid/table-core/src/index.d.ts +3 -0
- package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-row-actions/table-row-actions-dropdown.d.ts +8 -8
- package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-row-actions/table-row-actions.d.ts +6 -5
- package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-toolbar/table-dropdown-filter.d.ts +4 -4
- package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-toolbar/table-group-by-dropdown.d.ts +4 -4
- package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-toolbar/table-saved-search-dropdown.d.ts +6 -5
- package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-toolbar/table-toolbar.d.ts +12 -12
- package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/table.d.ts +11 -11
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Clipboard/Clipboard.d.ts +1 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Clipboard/extensions/extensions.d.ts +1 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/History/History.d.ts +1 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/History/extensions/extensions.d.ts +1 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/HoverMenu/HoverMenu.d.ts +1 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Import/defaults/importers.d.ts +1 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/SelectRange/SelectRange.d.ts +4 -4
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/SelectRange/extensions/extensions.d.ts +2 -2
- package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +1 -1
- package/library/packages/molecules/src/dynamic-select/dynamic-select.d.ts +5 -0
- package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +32 -0
- package/library/packages/molecules/src/folder-select/folder-select.d.ts +20 -3
- package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +5 -0
- package/library/packages/molecules/src/index.d.ts +1 -1
- package/library/packages/molecules/src/library-index.d.ts +0 -1
- package/library/packages/molecules/src/pdf-viewer-toolbar/components/index.d.ts +3 -0
- package/library/packages/molecules/src/pdf-viewer-toolbar/components/pdf-viewer-annotation-draw/pdf-viewer-annotation-draw.d.ts +92 -0
- package/library/packages/molecules/src/pdf-viewer-toolbar/components/pdf-viewer-more-options/pdf-viewer-more-options.d.ts +43 -0
- package/library/packages/molecules/src/pdf-viewer-toolbar/components/pdf-viewer-more-options/pdf-viewer-more-options.styles.d.ts +2 -0
- package/library/packages/molecules/src/pdf-viewer-toolbar/components/pdf-viewer-view-on-asset/pdf-viewer-view-on-asset.d.ts +42 -0
- package/library/packages/molecules/src/pdf-viewer-toolbar/components/pdf-viewer-view-on-asset/pdf-viewer-view-on-asset.styles.d.ts +2 -0
- package/library/packages/molecules/src/pdf-viewer-toolbar/pdf-viewer-toolbar.d.ts +101 -0
- package/library/packages/molecules/src/pdf-viewer-toolbar/pdf-viewer-toolbar.styles.d.ts +2 -0
- package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +66 -0
- package/library/packages/organisms/src/color-swatch-group/color-swatch-group.constants.d.ts +1 -1
- package/library/packages/organisms/src/color-swatch-group/color-swatch-group.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/components/color-swatch-picker/color-swatch-picker.constants.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/components/color-swatch-picker/color-swatch-picker.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +2 -9
- package/library/packages/organisms/src/content-builder/configs/dam-view.d.ts +1 -7
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +2 -14
- package/library/packages/organisms/src/content-builder/styleController.d.ts +1 -1
- package/library/packages/organisms/src/dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor.d.ts +9 -1
- package/library/packages/organisms/src/dashboard-table/dashboard-table.d.ts +1 -1
- package/library/packages/organisms/src/index.d.ts +1 -0
- package/library/packages/{molecules → organisms}/src/list-editor/list-editor.d.ts +9 -3
- package/library/packages/organisms/src/list-editor/list-editor.styles.d.ts +2 -0
- package/library/packages/organisms/src/video-chapters-manager/video-chapters-manager.d.ts +1 -1
- package/library/packages/services/src/api/folder/folder.types.d.ts +9 -2
- package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +16 -0
- package/library/packages/types/src/content-builder.d.ts +1 -1
- package/library/packages/types/src/dam-view.d.ts +1 -0
- package/library/packages/types/src/folder-select.d.ts +8 -1
- package/library/packages/types/src/pdf-viewer-toolbar.d.ts +82 -0
- package/library/packages/utils/src/custom-element/i18n.d.ts +43 -7
- package/library/packages/utils/src/string/string.d.ts +1 -1
- package/library/packages/utils/src/url/url.d.ts +12 -2
- package/library/react-web-component.d.ts +514 -913
- package/library/utils.js +200 -199
- package/package.json +3 -1
- package/library/chunks/asset.CcxcYY9d.js +0 -469
- package/library/chunks/color-swatch-group.DlTVQ3Ul.js +0 -362
- package/library/chunks/directive-helpers.Dm4rc594.js +0 -37
- package/library/chunks/folder-select.DHV6f6TA.js +0 -884
- package/library/chunks/list-editor.BXY4UIAI.js +0 -1394
- package/library/chunks/responsive.Cf65FCWd.js +0 -17
- package/library/chunks/toast.D3AW3RWv.js +0 -94
- package/library/chunks/url.Cj9cIQXJ.js +0 -27
- package/library/components/list-editor.d.ts +0 -3
- package/library/components/list-editor.js +0 -33
- package/library/components/table.d.ts +0 -3
- package/library/components/table.js +0 -84
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/index.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-footer/table-footer.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-footer/table-footer.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-row-actions/table-row-actions.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-toolbar/table-toolbar.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/controllers/ajax-facets/ajax-facet-data-controller.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/controllers/ajax-facets/ajax-facet-filter-controller.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/controllers/filter-controller.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/controllers/select-all-controller.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-alert.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-base.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-calcs.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-clickable-cell.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-data-tree.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-edit.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-footer.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-format.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-group-rows.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-header.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-hover-menu.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-move-rows.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-page.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-placeholder.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-popup.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-print.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-resize.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-responsive-layout.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-rows.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-rtl.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-select-range.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-spreadsheet.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/table-data-loader.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/table.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/table.utils.d.ts +0 -0
- /package/library/packages/molecules/src/{list-editor/list-editor.styles.d.ts → pdf-viewer-toolbar/components/pdf-viewer-annotation-draw/pdf-viewer-annotation-draw.styles.d.ts} +0 -0
|
@@ -1,884 +0,0 @@
|
|
|
1
|
-
import { C as Y } from "./icon.DnBh6-56.js";
|
|
2
|
-
import { C as de } from "./input.CQNhMu4z.js";
|
|
3
|
-
import ee from "../components/line-clamp.js";
|
|
4
|
-
import pe from "../components/select.js";
|
|
5
|
-
import ue from "../components/tag.js";
|
|
6
|
-
import { C as $, a as fe } from "./tree.9PK8ifJd.js";
|
|
7
|
-
import { n as l, C as B } from "./lib-cortex-element.CVMmyPMC.js";
|
|
8
|
-
import { h as L, F as me, c as ye } from "./endpoints.6E17hFiK.js";
|
|
9
|
-
import { M as P } from "./asset-link-format.QzzboHHE.js";
|
|
10
|
-
import { c as te } from "./component.styles.CRO4Odto.js";
|
|
11
|
-
import { c as W } from "./custom-element.L4WJXn1j.js";
|
|
12
|
-
import { L as q } from "./i18n.DoMIwXr2.js";
|
|
13
|
-
import { w as f } from "./watch.CThbualB.js";
|
|
14
|
-
import { x as m, i as xe } from "./lit-element.jLBm65_O.js";
|
|
15
|
-
import { r as x } from "./state.CSDxrqLd.js";
|
|
16
|
-
import { e as re } from "./query.BBf1UFkC.js";
|
|
17
|
-
import { r as ge } from "./choose.BTbF6BAn.js";
|
|
18
|
-
import { C as se } from "./button.DYoFn504.js";
|
|
19
|
-
import { d as be } from "./debounce.DaHuiSGU.js";
|
|
20
|
-
import { g as G, p as Z, e as $e } from "./string.CbnVBzsd.js";
|
|
21
|
-
import { o as y } from "./if-defined.BRoBj_Rp.js";
|
|
22
|
-
import { c as A } from "./repeat.DbF2p5ae.js";
|
|
23
|
-
import { o as Se } from "./style-map.llVFPd__.js";
|
|
24
|
-
import { n as w } from "./when.Dr1es41R.js";
|
|
25
|
-
import ve from "../components/space.js";
|
|
26
|
-
import { g as Fe } from "./template.ClovJacp.js";
|
|
27
|
-
import { e as Te } from "./class-map.BiVq-cVR.js";
|
|
28
|
-
var S = /* @__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))(S || {});
|
|
29
|
-
const Ie = 50;
|
|
30
|
-
async function H({
|
|
31
|
-
allowedFolders: e,
|
|
32
|
-
baseUrl: t,
|
|
33
|
-
bearerToken: r,
|
|
34
|
-
excludeVirtualFolders: a,
|
|
35
|
-
folderId: s,
|
|
36
|
-
includeDirectChild: p,
|
|
37
|
-
limit: u = Ie,
|
|
38
|
-
searchTerm: g,
|
|
39
|
-
self: I,
|
|
40
|
-
start: N = 0,
|
|
41
|
-
token: ne
|
|
42
|
-
}) {
|
|
43
|
-
let O = [], Q = p ?? !0;
|
|
44
|
-
e && e.length > 0 && !s ? (O = e, I = !0, Q = !1) : s && (O = [s]);
|
|
45
|
-
try {
|
|
46
|
-
return (await L.request({
|
|
47
|
-
baseURL: t,
|
|
48
|
-
headers: {
|
|
49
|
-
Authorization: `Bearer ${r}`
|
|
50
|
-
},
|
|
51
|
-
method: "GET",
|
|
52
|
-
params: {
|
|
53
|
-
IncludeDirectChild: Q,
|
|
54
|
-
IncludeVirtualFolders: !a,
|
|
55
|
-
Limit: u,
|
|
56
|
-
ObjectRecordIDs: O,
|
|
57
|
-
SeeThru: !!g,
|
|
58
|
-
Self: I,
|
|
59
|
-
Start: N,
|
|
60
|
-
Text: g || void 0,
|
|
61
|
-
Token: ne || void 0
|
|
62
|
-
},
|
|
63
|
-
paramsSerializer: {
|
|
64
|
-
indexes: null
|
|
65
|
-
},
|
|
66
|
-
responseType: "json",
|
|
67
|
-
transformResponse: [
|
|
68
|
-
...Array.isArray(L.defaults.transformResponse) ? L.defaults.transformResponse : [],
|
|
69
|
-
(v, Re, R) => {
|
|
70
|
-
if (R !== void 0 && (R < 200 || R >= 300))
|
|
71
|
-
return {
|
|
72
|
-
data: [],
|
|
73
|
-
hasMore: !1,
|
|
74
|
-
totalCount: 0
|
|
75
|
-
};
|
|
76
|
-
if (!v || typeof v != "object")
|
|
77
|
-
throw new Error("Invalid response format");
|
|
78
|
-
const he = v.contentItems?.length ?? 0;
|
|
79
|
-
return {
|
|
80
|
-
data: v.contentItems?.map((b) => {
|
|
81
|
-
const E = b.fields[S.DocType] ?? "", U = b.fields[S.TitleWithFallback] ?? "", k = b.fields[S.CortexPath] ?? "", M = k.endsWith("/") && k.length > 1 ? k.slice(0, -1) : k;
|
|
82
|
-
let j = M;
|
|
83
|
-
return (E === P.Album || E === P.ProjectDocument) && (j = M ? `${M}/${U}` : U), {
|
|
84
|
-
docType: E,
|
|
85
|
-
fullPath: j,
|
|
86
|
-
hasChildren: b.fields[S.HasBrowserChildren] === "1",
|
|
87
|
-
id: b.recordID,
|
|
88
|
-
isShared: b.fields[S.rawDocSubtype] === "DO_OR1ND000001913488",
|
|
89
|
-
representativeAssetId: b.fields[S.RepresentativeAssetId] ?? "",
|
|
90
|
-
title: U
|
|
91
|
-
};
|
|
92
|
-
}) ?? [],
|
|
93
|
-
hasMore: N + he < v.totalCount,
|
|
94
|
-
totalCount: v.totalCount
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
],
|
|
98
|
-
url: me
|
|
99
|
-
})).data;
|
|
100
|
-
} catch {
|
|
101
|
-
return {
|
|
102
|
-
data: [],
|
|
103
|
-
hasMore: !1,
|
|
104
|
-
totalCount: 0
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
var C = /* @__PURE__ */ ((e) => (e.Input = "input", e.Select = "select", e))(C || {}), Ce = Object.defineProperty, _e = Object.getOwnPropertyDescriptor, d = (e, t, r, a) => {
|
|
109
|
-
for (var s = a > 1 ? void 0 : a ? _e(t, r) : t, p = e.length - 1, u; p >= 0; p--)
|
|
110
|
-
(u = e[p]) && (s = (a ? u(t, r, s) : u(s)) || s);
|
|
111
|
-
return a && s && Ce(t, r, s), s;
|
|
112
|
-
};
|
|
113
|
-
let o = class extends B {
|
|
114
|
-
constructor() {
|
|
115
|
-
super(...arguments), this.localize = new q(this), this.role = "treeitem", this.disabledSyncCheckboxes = !0, this.folderId = "", this.hasChildren = !1, this.selectable = !1, this.fullPath = "", this.docType = P.Story, this.name = "", this.representativeAssetId = "", this.selectedValue = "", this.selection = "single", this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], this.token = "", this.bearerToken = "", this.baseUrl = "", this.searchTerm = "", this.api = H, this.excludeVirtualFolders = !1, this.url = "", this.icon = "", this.data = null, this.hasMore = !1, this.loading = !1;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* 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
|
|
119
|
-
*/
|
|
120
|
-
createRenderRoot() {
|
|
121
|
-
return this;
|
|
122
|
-
}
|
|
123
|
-
async fetchFolders({
|
|
124
|
-
folderId: e,
|
|
125
|
-
start: t = 0
|
|
126
|
-
}) {
|
|
127
|
-
if (!this.api)
|
|
128
|
-
return {
|
|
129
|
-
data: [],
|
|
130
|
-
hasMore: !1,
|
|
131
|
-
totalCount: 0
|
|
132
|
-
};
|
|
133
|
-
try {
|
|
134
|
-
const { data: r, hasMore: a, totalCount: s } = await this.api({
|
|
135
|
-
baseUrl: this.baseUrl,
|
|
136
|
-
bearerToken: this.bearerToken,
|
|
137
|
-
excludeVirtualFolders: this.excludeVirtualFolders,
|
|
138
|
-
folderId: e,
|
|
139
|
-
start: t,
|
|
140
|
-
token: this.token
|
|
141
|
-
});
|
|
142
|
-
return {
|
|
143
|
-
data: r,
|
|
144
|
-
hasMore: a,
|
|
145
|
-
totalCount: s
|
|
146
|
-
};
|
|
147
|
-
} catch {
|
|
148
|
-
return {
|
|
149
|
-
data: [],
|
|
150
|
-
hasMore: !1,
|
|
151
|
-
totalCount: 0
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
async loadMore(e) {
|
|
156
|
-
e.stopPropagation();
|
|
157
|
-
const t = this.data?.length || 0;
|
|
158
|
-
this.loading = !0;
|
|
159
|
-
try {
|
|
160
|
-
const { data: r, hasMore: a } = await this.fetchFolders({
|
|
161
|
-
folderId: this.folderId,
|
|
162
|
-
start: t
|
|
163
|
-
});
|
|
164
|
-
this.data = [...this.data || [], ...r], this.hasMore = a, this.emit("cx-folder-select-children-loaded", { detail: { folders: r } });
|
|
165
|
-
} catch {
|
|
166
|
-
} finally {
|
|
167
|
-
this.loading = !1;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
async handleLazyLoad(e) {
|
|
171
|
-
e.stopPropagation(), this.treeItem.expanded = !0;
|
|
172
|
-
const t = this.data?.length || 0;
|
|
173
|
-
try {
|
|
174
|
-
const { data: r, hasMore: a } = await this.fetchFolders({
|
|
175
|
-
folderId: this.folderId,
|
|
176
|
-
start: t
|
|
177
|
-
});
|
|
178
|
-
this.data = r, this.hasMore = a, this.emit("cx-folder-select-children-loaded", { detail: { folders: r } });
|
|
179
|
-
} catch {
|
|
180
|
-
this.treeItem.expanded = !1;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
async syncBoxes() {
|
|
184
|
-
if (this.selection !== "multiple" || (await this.updateComplete, !this.treeItem))
|
|
185
|
-
return;
|
|
186
|
-
const e = this.fullPath, t = G({ id: this.folderId, path: e }), r = Z(e), a = this.currentRootIDsSet.has(t);
|
|
187
|
-
let s = !1;
|
|
188
|
-
if (e)
|
|
189
|
-
for (const u of this.currentRootIDsSet) {
|
|
190
|
-
const g = $e(u);
|
|
191
|
-
if (!g.path.trim() || !g.id.trim())
|
|
192
|
-
continue;
|
|
193
|
-
const I = Z(g.path);
|
|
194
|
-
if (I.startsWith(r) && I !== r) {
|
|
195
|
-
s = !0;
|
|
196
|
-
break;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
const p = !a && s;
|
|
200
|
-
this.treeItem.selected = a, await this.treeItem.updateComplete, this.treeItem.indeterminate = p;
|
|
201
|
-
}
|
|
202
|
-
render() {
|
|
203
|
-
let e = "filled";
|
|
204
|
-
return this.docType === P.Album && (e = "outlined"), m`<cx-tree-item class=${Te({
|
|
205
|
-
"folder-select-tree-item": !0
|
|
206
|
-
})} data-id=${this.folderId} data-url=${y(this.url)} data-name=${y(this.name?.trim() || void 0)} data-representative-asset-id=${y(
|
|
207
|
-
this.representativeAssetId || void 0
|
|
208
|
-
)} role="option" ?lazy=${this.hasChildren && this.data === null} ?selected=${this.selection !== "multiple" && this.selectedValue === this.folderId} ?disabled-sync-checkboxes=${this.selection === "multiple"} .selectable=${this.selectable} @cx-lazy-load=${this.handleLazyLoad}><cx-space class="folder-select-tree-item__label" direction="horizontal" spacing="x-small" align-items="center" wrap="nowrap"><cx-icon class="folder-select-tree__item__icon" name=${this.icon || "folder"} variant=${e}></cx-icon><cx-line-clamp lines="1" class="folder-select-tree-item__title">${Fe(this.name, this.searchTerm)}</cx-line-clamp></cx-space>${A(
|
|
209
|
-
this.data || [],
|
|
210
|
-
(t) => t.id,
|
|
211
|
-
(t) => m`<cx-folder-select-tree-item slot="children" folder-id=${t.id} full-path=${t.fullPath} name=${t.title} representative-asset-id=${t.representativeAssetId} selected-value=${this.selectedValue} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} ?exclude-virtual-folders=${this.excludeVirtualFolders} ?has-children=${t.hasChildren} ?selectable=${this.selectable} base-url=${this.baseUrl} url=${y(t.url ?? void 0)} .api=${this.api} .currentRootIDsSet=${this.currentRootIDsSet} .removedIDs=${this.removedIDs} value=${t.url}></cx-folder-select-tree-item>`
|
|
212
|
-
)}
|
|
213
|
-
${w(
|
|
214
|
-
this.hasMore,
|
|
215
|
-
() => m`<div slot="children" class="load-more-button"><cx-button variant="text" @click=${this.loadMore} ?loading=${this.loading}>${this.localize.term("more")}</cx-button></div>`
|
|
216
|
-
)}</cx-tree-item>`;
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
o.styles = [te];
|
|
220
|
-
o.dependencies = {
|
|
221
|
-
"cx-button": se,
|
|
222
|
-
"cx-icon": Y,
|
|
223
|
-
"cx-line-clamp": ee,
|
|
224
|
-
"cx-space": ve,
|
|
225
|
-
"cx-tree-item": $
|
|
226
|
-
};
|
|
227
|
-
d([
|
|
228
|
-
re("cx-tree-item")
|
|
229
|
-
], o.prototype, "treeItem", 2);
|
|
230
|
-
d([
|
|
231
|
-
l({ attribute: "folder-id", reflect: !0, type: String })
|
|
232
|
-
], o.prototype, "folderId", 2);
|
|
233
|
-
d([
|
|
234
|
-
l({ attribute: "has-children", reflect: !0, type: Boolean })
|
|
235
|
-
], o.prototype, "hasChildren", 2);
|
|
236
|
-
d([
|
|
237
|
-
l({ reflect: !0, type: Boolean })
|
|
238
|
-
], o.prototype, "selectable", 2);
|
|
239
|
-
d([
|
|
240
|
-
l({ attribute: "full-path", reflect: !0, type: String })
|
|
241
|
-
], o.prototype, "fullPath", 2);
|
|
242
|
-
d([
|
|
243
|
-
l({ attribute: "doc-type", reflect: !0, type: String })
|
|
244
|
-
], o.prototype, "docType", 2);
|
|
245
|
-
d([
|
|
246
|
-
l({ reflect: !0, type: String })
|
|
247
|
-
], o.prototype, "name", 2);
|
|
248
|
-
d([
|
|
249
|
-
l({
|
|
250
|
-
attribute: "representative-asset-id",
|
|
251
|
-
reflect: !0,
|
|
252
|
-
type: String
|
|
253
|
-
})
|
|
254
|
-
], o.prototype, "representativeAssetId", 2);
|
|
255
|
-
d([
|
|
256
|
-
l({ attribute: "selected-value", reflect: !0, type: String })
|
|
257
|
-
], o.prototype, "selectedValue", 2);
|
|
258
|
-
d([
|
|
259
|
-
l({ attribute: "selection", reflect: !0, type: String })
|
|
260
|
-
], o.prototype, "selection", 2);
|
|
261
|
-
d([
|
|
262
|
-
l({ attribute: !1, type: Object })
|
|
263
|
-
], o.prototype, "currentRootIDsSet", 2);
|
|
264
|
-
d([
|
|
265
|
-
l({ attribute: !1, type: Array })
|
|
266
|
-
], o.prototype, "removedIDs", 2);
|
|
267
|
-
d([
|
|
268
|
-
l({ reflect: !0, type: String })
|
|
269
|
-
], o.prototype, "token", 2);
|
|
270
|
-
d([
|
|
271
|
-
l({ attribute: "bearer-token", reflect: !0, type: String })
|
|
272
|
-
], o.prototype, "bearerToken", 2);
|
|
273
|
-
d([
|
|
274
|
-
l({ attribute: "base-url", reflect: !0, type: String })
|
|
275
|
-
], o.prototype, "baseUrl", 2);
|
|
276
|
-
d([
|
|
277
|
-
l({ attribute: "search-term", reflect: !0, type: String })
|
|
278
|
-
], o.prototype, "searchTerm", 2);
|
|
279
|
-
d([
|
|
280
|
-
l({ type: Function })
|
|
281
|
-
], o.prototype, "api", 2);
|
|
282
|
-
d([
|
|
283
|
-
l({
|
|
284
|
-
attribute: "exclude-virtual-folders",
|
|
285
|
-
reflect: !0,
|
|
286
|
-
type: Boolean
|
|
287
|
-
})
|
|
288
|
-
], o.prototype, "excludeVirtualFolders", 2);
|
|
289
|
-
d([
|
|
290
|
-
l({ reflect: !0, type: String })
|
|
291
|
-
], o.prototype, "url", 2);
|
|
292
|
-
d([
|
|
293
|
-
l({ reflect: !0, type: String })
|
|
294
|
-
], o.prototype, "icon", 2);
|
|
295
|
-
d([
|
|
296
|
-
x()
|
|
297
|
-
], o.prototype, "data", 2);
|
|
298
|
-
d([
|
|
299
|
-
x()
|
|
300
|
-
], o.prototype, "hasMore", 2);
|
|
301
|
-
d([
|
|
302
|
-
x()
|
|
303
|
-
], o.prototype, "loading", 2);
|
|
304
|
-
d([
|
|
305
|
-
f("currentRootIDsSet"),
|
|
306
|
-
f("removedIDs"),
|
|
307
|
-
f("fullPath"),
|
|
308
|
-
f("folderId")
|
|
309
|
-
], o.prototype, "syncBoxes", 1);
|
|
310
|
-
o = d([
|
|
311
|
-
W("cx-folder-select-tree-item")
|
|
312
|
-
], o);
|
|
313
|
-
var De = Object.defineProperty, ke = Object.getOwnPropertyDescriptor, le = (e) => {
|
|
314
|
-
throw TypeError(e);
|
|
315
|
-
}, h = (e, t, r, a) => {
|
|
316
|
-
for (var s = a > 1 ? void 0 : a ? ke(t, r) : t, p = e.length - 1, u; p >= 0; p--)
|
|
317
|
-
(u = e[p]) && (s = (a ? u(t, r, s) : u(s)) || s);
|
|
318
|
-
return a && s && De(t, r, s), s;
|
|
319
|
-
}, ae = (e, t, r) => t.has(e) || le("Cannot " + r), F = (e, t, r) => (ae(e, t, "read from private field"), t.get(e)), z = (e, t, r) => t.has(e) ? le("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), J = (e, t, r, a) => (ae(e, t, "write to private field"), t.set(e, r), r), _, V, D;
|
|
320
|
-
let n = class extends B {
|
|
321
|
-
constructor() {
|
|
322
|
-
super(...arguments), this.localize = new q(this), this.minQueryLength = 1, this.selection = "single", this.searchTerm = "", this.selectedValue = "", this.token = "", this.bearerToken = "", this.baseUrl = "", this.extraFolderId = "", this.extraFolderTitle = "", this.extraFolderIcon = "", this.seeThru = !1, this.extraFolderData = null, this.api = H, this.excludeVirtualFolders = !1, this.firstFetchCallback = null, this.autoPageSize = !1, this.data = [], this.hasMore = !1, this.loading = !1, this.preloadedFolders = [], this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], z(this, _, !1), z(this, V, 10), z(this, D, /* @__PURE__ */ new Set());
|
|
323
|
-
}
|
|
324
|
-
get empty() {
|
|
325
|
-
return !this.loading && this.data.length === 0;
|
|
326
|
-
}
|
|
327
|
-
/**
|
|
328
|
-
* This is used to render the cx-tree inside the cx-folder-select without the shadow root so that the cx-folder-select can query select the cx-tree inside
|
|
329
|
-
*/
|
|
330
|
-
createRenderRoot() {
|
|
331
|
-
return this;
|
|
332
|
-
}
|
|
333
|
-
computeInitialLimit() {
|
|
334
|
-
const t = this.getRootNode();
|
|
335
|
-
let r = t instanceof ShadowRoot ? t.host : this.parentElement;
|
|
336
|
-
for (; r; ) {
|
|
337
|
-
if (r instanceof HTMLElement && r.offsetHeight > 0)
|
|
338
|
-
return Math.max(10, Math.ceil(r.offsetHeight / 32) + 2);
|
|
339
|
-
const a = r.getRootNode();
|
|
340
|
-
r = a instanceof ShadowRoot ? a.host : r.parentElement;
|
|
341
|
-
}
|
|
342
|
-
return 10;
|
|
343
|
-
}
|
|
344
|
-
runFirstUpdated() {
|
|
345
|
-
this.searchTerm = "", this.autoPageSize && J(this, V, this.computeInitialLimit()), this.handleFetchFolders();
|
|
346
|
-
}
|
|
347
|
-
async handleExtraFolderIdChange() {
|
|
348
|
-
if (!this.extraFolderId || !this.api) {
|
|
349
|
-
this.extraFolderData = null;
|
|
350
|
-
return;
|
|
351
|
-
}
|
|
352
|
-
const { data: e } = await this.api({
|
|
353
|
-
baseUrl: this.baseUrl,
|
|
354
|
-
bearerToken: this.bearerToken,
|
|
355
|
-
excludeVirtualFolders: this.excludeVirtualFolders,
|
|
356
|
-
folderId: this.extraFolderId,
|
|
357
|
-
includeDirectChild: !1,
|
|
358
|
-
limit: 1,
|
|
359
|
-
searchTerm: this.searchTerm,
|
|
360
|
-
seeThru: this.seeThru,
|
|
361
|
-
self: !0,
|
|
362
|
-
start: 0,
|
|
363
|
-
token: this.token
|
|
364
|
-
});
|
|
365
|
-
this.extraFolderData = e[0] ?? null;
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* Update `currentRootIDsSet` from a tree-item's toggle. Per-folder
|
|
369
|
-
* selection: each folder is independent, so a click only adds/removes
|
|
370
|
-
* the clicked folder — never its ancestors or descendants. Parents
|
|
371
|
-
* showing an indeterminate hint is purely visual (computed in
|
|
372
|
-
* `cx-folder-select-tree-item.syncBoxes` from path-prefix matches),
|
|
373
|
-
* not a real selection.
|
|
374
|
-
*
|
|
375
|
-
* Only runs in multiple mode — single mode is still driven by `selectedValue`.
|
|
376
|
-
*/
|
|
377
|
-
async handleSelectedChange(e) {
|
|
378
|
-
if (this.selection !== "multiple")
|
|
379
|
-
return;
|
|
380
|
-
const t = e.target, r = t.dataset.id ?? "", a = t.closest(
|
|
381
|
-
"cx-folder-select-tree-item"
|
|
382
|
-
)?.fullPath;
|
|
383
|
-
if (await t.updateComplete, !r.trim() || !a?.trim())
|
|
384
|
-
return;
|
|
385
|
-
const s = G({ id: r, path: a });
|
|
386
|
-
t.indeterminate && !t.selected || (t.selected ? this.currentRootIDsSet.add(s) : this.currentRootIDsSet.delete(s), this.currentRootIDsSet = new Set(this.currentRootIDsSet));
|
|
387
|
-
}
|
|
388
|
-
async loadMore(e) {
|
|
389
|
-
if (!this.api)
|
|
390
|
-
return;
|
|
391
|
-
e.stopPropagation();
|
|
392
|
-
const t = this.data.length;
|
|
393
|
-
this.loading = !0;
|
|
394
|
-
const { data: r, hasMore: a } = await this.api({
|
|
395
|
-
baseUrl: this.baseUrl,
|
|
396
|
-
bearerToken: this.bearerToken,
|
|
397
|
-
excludeVirtualFolders: this.excludeVirtualFolders,
|
|
398
|
-
folderId: "",
|
|
399
|
-
limit: 10,
|
|
400
|
-
searchTerm: this.searchTerm,
|
|
401
|
-
seeThru: this.seeThru,
|
|
402
|
-
start: t,
|
|
403
|
-
token: this.token
|
|
404
|
-
});
|
|
405
|
-
this.data = [...this.data, ...r], this.hasMore = a, this.loading = !1, this.seedSelectionFromValue(r), this.removePreloadedFolders(r);
|
|
406
|
-
}
|
|
407
|
-
async handleFetchFolders() {
|
|
408
|
-
const { data: e, hasMore: t } = await this.fetchFolders();
|
|
409
|
-
F(this, _) || (e.length > 0 && this.firstFetchCallback?.(e), J(this, _, !0)), this.data = e, this.hasMore = t, this.loading = !1, this.seedSelectionFromValue(e), this.removePreloadedFolders(e), await this.preloadSelectedFolders();
|
|
410
|
-
}
|
|
411
|
-
async handleSelectedValueChange() {
|
|
412
|
-
if (!F(this, _))
|
|
413
|
-
return;
|
|
414
|
-
const e = new Set(
|
|
415
|
-
this.selectedValue.split(/[\s,]+/).filter(Boolean)
|
|
416
|
-
), t = this.preloadedFolders.filter((r) => e.has(r.id));
|
|
417
|
-
t.length !== this.preloadedFolders.length && (this.preloadedFolders = t), await this.preloadSelectedFolders();
|
|
418
|
-
}
|
|
419
|
-
async fetchFolders() {
|
|
420
|
-
if (!this.api)
|
|
421
|
-
return {
|
|
422
|
-
data: [],
|
|
423
|
-
hasMore: !1
|
|
424
|
-
};
|
|
425
|
-
if (this.searchTerm.length > 0 && this.searchTerm.length < this.minQueryLength)
|
|
426
|
-
return {
|
|
427
|
-
data: [],
|
|
428
|
-
hasMore: !1
|
|
429
|
-
};
|
|
430
|
-
this.loading = !0;
|
|
431
|
-
const { data: e, hasMore: t } = await this.api({
|
|
432
|
-
baseUrl: this.baseUrl,
|
|
433
|
-
bearerToken: this.bearerToken,
|
|
434
|
-
excludeVirtualFolders: this.excludeVirtualFolders,
|
|
435
|
-
folderId: "",
|
|
436
|
-
limit: F(this, V),
|
|
437
|
-
searchTerm: this.searchTerm,
|
|
438
|
-
seeThru: this.seeThru,
|
|
439
|
-
start: 0,
|
|
440
|
-
token: this.token
|
|
441
|
-
});
|
|
442
|
-
return this.data = e, this.hasMore = t, this.loading = !1, {
|
|
443
|
-
data: e,
|
|
444
|
-
hasMore: t
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
handleChildrenLoaded(e) {
|
|
448
|
-
this.seedSelectionFromValue(e.detail.folders), this.removePreloadedFolders(e.detail.folders);
|
|
449
|
-
}
|
|
450
|
-
removePreloadedFolders(e) {
|
|
451
|
-
if (this.preloadedFolders.length === 0)
|
|
452
|
-
return;
|
|
453
|
-
const t = new Set(e.map((a) => a.id)), r = this.preloadedFolders.filter((a) => !t.has(a.id));
|
|
454
|
-
r.length !== this.preloadedFolders.length && (this.preloadedFolders = r);
|
|
455
|
-
}
|
|
456
|
-
async preloadSelectedFolders() {
|
|
457
|
-
if (this.selection !== "multiple" || !this.selectedValue || !this.api)
|
|
458
|
-
return;
|
|
459
|
-
const e = new Set(
|
|
460
|
-
this.selectedValue.split(/[\s,]+/).filter(Boolean)
|
|
461
|
-
), t = /* @__PURE__ */ new Set([
|
|
462
|
-
...this.data.map((s) => s.id),
|
|
463
|
-
...this.extraFolderData ? [this.extraFolderData.id] : [],
|
|
464
|
-
...this.preloadedFolders.map((s) => s.id),
|
|
465
|
-
...F(this, D),
|
|
466
|
-
...[
|
|
467
|
-
...this.querySelectorAll(
|
|
468
|
-
"cx-folder-select-tree-item"
|
|
469
|
-
)
|
|
470
|
-
].map((s) => s.getAttribute("folder-id") ?? "").filter(Boolean)
|
|
471
|
-
]), r = [...e].filter(
|
|
472
|
-
(s) => !t.has(s)
|
|
473
|
-
);
|
|
474
|
-
if (r.length === 0)
|
|
475
|
-
return;
|
|
476
|
-
r.forEach((s) => F(this, D).add(s));
|
|
477
|
-
const a = [];
|
|
478
|
-
if (await Promise.all(
|
|
479
|
-
r.map(async (s) => {
|
|
480
|
-
try {
|
|
481
|
-
const { data: p } = await this.api({
|
|
482
|
-
baseUrl: this.baseUrl,
|
|
483
|
-
bearerToken: this.bearerToken,
|
|
484
|
-
excludeVirtualFolders: this.excludeVirtualFolders,
|
|
485
|
-
folderId: s,
|
|
486
|
-
includeDirectChild: !1,
|
|
487
|
-
limit: 1,
|
|
488
|
-
searchTerm: "",
|
|
489
|
-
seeThru: this.seeThru,
|
|
490
|
-
self: !0,
|
|
491
|
-
start: 0,
|
|
492
|
-
token: this.token
|
|
493
|
-
});
|
|
494
|
-
p[0] && a.push(p[0]);
|
|
495
|
-
} catch {
|
|
496
|
-
}
|
|
497
|
-
})
|
|
498
|
-
), r.forEach((s) => F(this, D).delete(s)), a.length > 0) {
|
|
499
|
-
const s = new Set(this.preloadedFolders.map((u) => u.id)), p = a.filter((u) => !s.has(u.id));
|
|
500
|
-
p.length > 0 && (this.preloadedFolders = [...this.preloadedFolders, ...p].sort(
|
|
501
|
-
(u, g) => u.title.localeCompare(g.title)
|
|
502
|
-
), this.seedSelectionFromValue(p));
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
seedSelectionFromValue(e) {
|
|
506
|
-
if (this.selection !== "multiple" || !this.selectedValue)
|
|
507
|
-
return;
|
|
508
|
-
const t = new Set(
|
|
509
|
-
this.selectedValue.split(/[\s,]+/).map((a) => a.trim()).filter(Boolean)
|
|
510
|
-
);
|
|
511
|
-
let r = !1;
|
|
512
|
-
for (const a of e)
|
|
513
|
-
if (a.fullPath && t.has(a.id)) {
|
|
514
|
-
const s = G({ id: a.id, path: a.fullPath });
|
|
515
|
-
this.currentRootIDsSet.has(s) || (this.currentRootIDsSet.add(s), r = !0);
|
|
516
|
-
}
|
|
517
|
-
r && (this.currentRootIDsSet = new Set(this.currentRootIDsSet));
|
|
518
|
-
}
|
|
519
|
-
renderFolder(e) {
|
|
520
|
-
return m`<cx-folder-select-tree-item .api=${this.api} .currentRootIDsSet=${this.currentRootIDsSet} .removedIDs=${this.removedIDs} base-url=${this.baseUrl} doc-type=${e.docType} folder-id=${e.id} full-path=${y(e.fullPath ?? void 0)} name=${e.title} search-term=${this.searchTerm} selected-value=${this.selectedValue} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} url=${y(e.url ?? void 0)} ?has-children=${e.hasChildren} ?selectable=${this.selection === "multiple"} ?exclude-virtual-folders=${this.excludeVirtualFolders}></cx-folder-select-tree-item>`;
|
|
521
|
-
}
|
|
522
|
-
render() {
|
|
523
|
-
return m`<cx-tree class="folder-select-tree" selection=${this.selection} force-on-change disabled-auto-expand disabled-sync-checkboxes @cx-selected-change=${this.handleSelectedChange} @cx-folder-select-children-loaded=${this.handleChildrenLoaded}>${w(
|
|
524
|
-
this.empty,
|
|
525
|
-
() => m`<div class="folder-select-tree__empty-message" role="status" aria-live="polite"><cx-typography variant="body3">${this.localize.term("noResults")}</cx-typography></div>`
|
|
526
|
-
)}
|
|
527
|
-
${w(
|
|
528
|
-
this.extraFolderData,
|
|
529
|
-
() => m`<cx-folder-select-tree-item .api=${this.api} .currentRootIDsSet=${this.currentRootIDsSet} .removedIDs=${this.removedIDs} base-url=${this.baseUrl} doc-type=${y(this.extraFolderData?.docType ?? void 0)} folder-id=${y(this.extraFolderData?.id ?? void 0)} full-path=${y(this.extraFolderData?.fullPath ?? void 0)} icon=${this.extraFolderIcon} name=${this.extraFolderTitle || this.extraFolderData?.title} search-term=${this.searchTerm} selected-value=${this.selectedValue} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} url=${y(this.extraFolderData?.url ?? void 0)} ?has-children=${this.extraFolderData?.hasChildren} ?selectable=${this.selection === "multiple"} ?exclude-virtual-folders=${this.excludeVirtualFolders}></cx-folder-select-tree-item>`
|
|
530
|
-
)}
|
|
531
|
-
${A(
|
|
532
|
-
this.data,
|
|
533
|
-
(e) => e.id,
|
|
534
|
-
(e) => this.renderFolder(e)
|
|
535
|
-
)}
|
|
536
|
-
${w(
|
|
537
|
-
this.hasMore,
|
|
538
|
-
() => m`<cx-button class="folder-select-tree__load-more" variant="text" @click=${this.loadMore} ?loading=${this.loading}>${this.localize.term("more")}</cx-button>`
|
|
539
|
-
)}</cx-tree>${A(
|
|
540
|
-
this.preloadedFolders,
|
|
541
|
-
(e) => `preloaded-${e.id}`,
|
|
542
|
-
(e) => m`<cx-folder-select-tree-item style=${Se({ display: "none" })} .api=${this.api} .currentRootIDsSet=${this.currentRootIDsSet} .removedIDs=${this.removedIDs} base-url=${this.baseUrl} doc-type=${e.docType} folder-id=${e.id} full-path=${y(e.fullPath ?? void 0)} name=${e.title} search-term=${this.searchTerm} selected-value=${this.selectedValue} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} url=${y(e.url ?? void 0)} ?has-children=${!1} ?selectable=${this.selection === "multiple"} ?exclude-virtual-folders=${this.excludeVirtualFolders}></cx-folder-select-tree-item>`
|
|
543
|
-
)}`;
|
|
544
|
-
}
|
|
545
|
-
};
|
|
546
|
-
_ = /* @__PURE__ */ new WeakMap();
|
|
547
|
-
V = /* @__PURE__ */ new WeakMap();
|
|
548
|
-
D = /* @__PURE__ */ new WeakMap();
|
|
549
|
-
n.dependencies = {
|
|
550
|
-
"cx-button": se,
|
|
551
|
-
"cx-folder-select-tree-item": o,
|
|
552
|
-
"cx-tree": fe
|
|
553
|
-
};
|
|
554
|
-
h([
|
|
555
|
-
l({ attribute: "min-query-length", reflect: !0, type: Number })
|
|
556
|
-
], n.prototype, "minQueryLength", 2);
|
|
557
|
-
h([
|
|
558
|
-
l({ attribute: "selection", reflect: !0, type: String })
|
|
559
|
-
], n.prototype, "selection", 2);
|
|
560
|
-
h([
|
|
561
|
-
l({ attribute: "search-term", reflect: !0, type: String })
|
|
562
|
-
], n.prototype, "searchTerm", 2);
|
|
563
|
-
h([
|
|
564
|
-
l({ attribute: "selected-value", reflect: !0, type: String })
|
|
565
|
-
], n.prototype, "selectedValue", 2);
|
|
566
|
-
h([
|
|
567
|
-
l({ reflect: !0, type: String })
|
|
568
|
-
], n.prototype, "token", 2);
|
|
569
|
-
h([
|
|
570
|
-
l({ attribute: "bearer-token", reflect: !0, type: String })
|
|
571
|
-
], n.prototype, "bearerToken", 2);
|
|
572
|
-
h([
|
|
573
|
-
l({ attribute: "base-url", reflect: !0, type: String })
|
|
574
|
-
], n.prototype, "baseUrl", 2);
|
|
575
|
-
h([
|
|
576
|
-
l({ attribute: "extra-folder-id", reflect: !0, type: String })
|
|
577
|
-
], n.prototype, "extraFolderId", 2);
|
|
578
|
-
h([
|
|
579
|
-
l({ attribute: "extra-folder-title", reflect: !0, type: String })
|
|
580
|
-
], n.prototype, "extraFolderTitle", 2);
|
|
581
|
-
h([
|
|
582
|
-
l({ attribute: "extra-folder-icon", reflect: !0, type: String })
|
|
583
|
-
], n.prototype, "extraFolderIcon", 2);
|
|
584
|
-
h([
|
|
585
|
-
l({ attribute: "see-thru", reflect: !0, type: Boolean })
|
|
586
|
-
], n.prototype, "seeThru", 2);
|
|
587
|
-
h([
|
|
588
|
-
x()
|
|
589
|
-
], n.prototype, "extraFolderData", 2);
|
|
590
|
-
h([
|
|
591
|
-
l({ type: Function })
|
|
592
|
-
], n.prototype, "api", 2);
|
|
593
|
-
h([
|
|
594
|
-
l({
|
|
595
|
-
attribute: "exclude-virtual-folders",
|
|
596
|
-
reflect: !0,
|
|
597
|
-
type: Boolean
|
|
598
|
-
})
|
|
599
|
-
], n.prototype, "excludeVirtualFolders", 2);
|
|
600
|
-
h([
|
|
601
|
-
l({ attribute: "first-fetch-callback", reflect: !1, type: Function })
|
|
602
|
-
], n.prototype, "firstFetchCallback", 2);
|
|
603
|
-
h([
|
|
604
|
-
l({ attribute: "auto-page-size", reflect: !0, type: Boolean })
|
|
605
|
-
], n.prototype, "autoPageSize", 2);
|
|
606
|
-
h([
|
|
607
|
-
x()
|
|
608
|
-
], n.prototype, "data", 2);
|
|
609
|
-
h([
|
|
610
|
-
x()
|
|
611
|
-
], n.prototype, "hasMore", 2);
|
|
612
|
-
h([
|
|
613
|
-
x()
|
|
614
|
-
], n.prototype, "loading", 2);
|
|
615
|
-
h([
|
|
616
|
-
x()
|
|
617
|
-
], n.prototype, "preloadedFolders", 2);
|
|
618
|
-
h([
|
|
619
|
-
x()
|
|
620
|
-
], n.prototype, "currentRootIDsSet", 2);
|
|
621
|
-
h([
|
|
622
|
-
x()
|
|
623
|
-
], n.prototype, "removedIDs", 2);
|
|
624
|
-
h([
|
|
625
|
-
f("extraFolderId")
|
|
626
|
-
], n.prototype, "handleExtraFolderIdChange", 1);
|
|
627
|
-
h([
|
|
628
|
-
f("baseUrl", { waitUntilFirstUpdate: !0 }),
|
|
629
|
-
f("token", { waitUntilFirstUpdate: !0 }),
|
|
630
|
-
f("searchTerm", { waitUntilFirstUpdate: !0 }),
|
|
631
|
-
f("excludeVirtualFolders", { waitUntilFirstUpdate: !0 }),
|
|
632
|
-
be(500)
|
|
633
|
-
], n.prototype, "handleFetchFolders", 1);
|
|
634
|
-
h([
|
|
635
|
-
f("selectedValue", { waitUntilFirstUpdate: !0 })
|
|
636
|
-
], n.prototype, "handleSelectedValueChange", 1);
|
|
637
|
-
n = h([
|
|
638
|
-
W("cx-folder-select-tree")
|
|
639
|
-
], n);
|
|
640
|
-
const we = xe`:host{flex-direction:column;width:100%;height:100%;min-height:0;max-height:100%;display:flex}.folder-select{gap:var(--cx-spacing-x-small);flex-direction:column;flex:1;width:100%;min-height:0;display:flex}.folder-select__search{flex-shrink:0}.folder-select__tree{flex-direction:column;flex:1;min-height:0;display:flex}.folder-select-tree{flex:1;min-height:0;overflow:auto}.folder-select-tree__item__icon{color:var(--cx-color-primary)}.folder-select-tree__empty-message{font-size:var(--cx-font-size-small);color:var(--cx-color-neutral-500);padding-block:var(--cx-spacing-2x-small);padding-inline:var(--cx-spacing-small);text-align:center;cursor:default;user-select:none}.folder-select-tree__load-more{margin-inline:var(--cx-spacing-small)}.folder-select-tree-item::part(label),.folder-select-tree-item__label,.folder-select-tree-item__title{overflow:hidden}`;
|
|
641
|
-
var Ve = Object.defineProperty, Pe = Object.getOwnPropertyDescriptor, ie = (e) => {
|
|
642
|
-
throw TypeError(e);
|
|
643
|
-
}, c = (e, t, r, a) => {
|
|
644
|
-
for (var s = a > 1 ? void 0 : a ? Pe(t, r) : t, p = e.length - 1, u; p >= 0; p--)
|
|
645
|
-
(u = e[p]) && (s = (a ? u(t, r, s) : u(s)) || s);
|
|
646
|
-
return a && s && Ve(t, r, s), s;
|
|
647
|
-
}, oe = (e, t, r) => t.has(e) || ie("Cannot " + r), K = (e, t, r) => (oe(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Oe = (e, t, r) => t.has(e) ? ie("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), X = (e, t, r, a) => (oe(e, t, "write to private field"), t.set(e, r), r), T;
|
|
648
|
-
let i = class extends B {
|
|
649
|
-
constructor() {
|
|
650
|
-
super(), this.localize = new q(this), this.minQueryLength = 1, this.selection = "single", this.variant = C.Input, this.value = "", this.name = "", this.selectedLabel = "", this.baseUrl = "", this.open = !1, this.token = "", this.bearerToken = "", this.seeThru = !1, this.api = H, this.required = !1, this.form = void 0, this.excludeVirtualFolders = !1, this.extraFolderId = "", this.extraFolderTitle = "", this.extraFolderIcon = "", this.autoPageSize = !1, this.firstFetchCallback = null, this.searchTerm = "", Oe(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.selectGetTag = this.selectGetTag.bind(this), this.updateWrappedApi();
|
|
651
|
-
}
|
|
652
|
-
updateWrappedApi() {
|
|
653
|
-
if (!this.api) {
|
|
654
|
-
X(this, T, void 0);
|
|
655
|
-
return;
|
|
656
|
-
}
|
|
657
|
-
X(this, T, async (e) => {
|
|
658
|
-
try {
|
|
659
|
-
return await this.api(e);
|
|
660
|
-
} catch (t) {
|
|
661
|
-
return t instanceof ye && t.response?.status === 401 && this.emit("cx-renew-token"), { data: [], hasMore: !1, totalCount: 0 };
|
|
662
|
-
}
|
|
663
|
-
});
|
|
664
|
-
}
|
|
665
|
-
handleSearchTermChange() {
|
|
666
|
-
this.emit("cx-folder-select-search-term-change", {
|
|
667
|
-
detail: {
|
|
668
|
-
value: this.searchTerm
|
|
669
|
-
}
|
|
670
|
-
});
|
|
671
|
-
}
|
|
672
|
-
handleSearchTermInputChange(e) {
|
|
673
|
-
this.searchTerm = e.target.value;
|
|
674
|
-
}
|
|
675
|
-
handleSearchTermSelectChange(e) {
|
|
676
|
-
e.target === e.currentTarget && (this.searchTerm = e.currentTarget.displayInput.value);
|
|
677
|
-
}
|
|
678
|
-
handleSelectClear() {
|
|
679
|
-
if (this.searchTerm = "", this.selection !== "multiple")
|
|
680
|
-
return;
|
|
681
|
-
const e = this.shadowRoot?.querySelector("cx-folder-select-tree");
|
|
682
|
-
e && (e.currentRootIDsSet = /* @__PURE__ */ new Set(), e.removedIDs = []);
|
|
683
|
-
}
|
|
684
|
-
/**
|
|
685
|
-
* cx-select's selectedOptions cache (which drives the tag UI in
|
|
686
|
-
* `multiple` mode) is only recomputed during its own `selectionChanged`
|
|
687
|
-
* flow — that flow doesn't run in our setup because we no-op
|
|
688
|
-
* `selectSetOptionSelected` for multi-select (cx-tree owns selection).
|
|
689
|
-
* After the tree's selection change propagates through `syncBoxes` and
|
|
690
|
-
* lands on each tree-item's `.selected`, ask cx-select to re-read its
|
|
691
|
-
* options so the rendered tag list matches.
|
|
692
|
-
*/
|
|
693
|
-
async handleTreeSelectedChange() {
|
|
694
|
-
this.selection !== "multiple" || !this.selectEl || (await new Promise(
|
|
695
|
-
(e) => requestAnimationFrame(() => e())
|
|
696
|
-
), this.selectEl.handleDefaultSlotChange(), await this.selectEl.updateComplete, this.selectEl.displayLabel = this.searchTerm);
|
|
697
|
-
}
|
|
698
|
-
selectGetOptionValue(e) {
|
|
699
|
-
return !e || !(e instanceof $) ? this.value : e.dataset.id || this.value;
|
|
700
|
-
}
|
|
701
|
-
selectGetOptionLabel(e) {
|
|
702
|
-
return !e || !(e instanceof $) ? this.selectedLabel : e.dataset.name || this.selectedLabel;
|
|
703
|
-
}
|
|
704
|
-
selectGetOptionSelected(e) {
|
|
705
|
-
if (!(!e || !(e instanceof $)))
|
|
706
|
-
return e.selected;
|
|
707
|
-
}
|
|
708
|
-
selectFilterCallback(e) {
|
|
709
|
-
return !(!e || !(e instanceof $));
|
|
710
|
-
}
|
|
711
|
-
/**
|
|
712
|
-
* Custom tag renderer for cx-select multi mode. Identical visuals to the
|
|
713
|
-
* default tag, but the X click goes through cx-tree's selection flow
|
|
714
|
-
* (`option.selected = false` → `cx-selected-change` →
|
|
715
|
-
* cx-folder-select-tree.handleSelectedChange) rather than
|
|
716
|
-
* cx-select.toggleOptionSelection (which our `selectSetOptionSelected`
|
|
717
|
-
* no-ops in multi mode, so the default X click would do nothing).
|
|
718
|
-
*/
|
|
719
|
-
selectGetTag(e) {
|
|
720
|
-
return m`<cx-tag part="tag" exportparts="
|
|
721
|
-
base:tag__base,
|
|
722
|
-
content:tag__content,
|
|
723
|
-
remove-button:tag__remove-button,
|
|
724
|
-
remove-button__base:tag__remove-button__base
|
|
725
|
-
" removable @cx-remove=${(r) => {
|
|
726
|
-
r.stopPropagation(), e instanceof $ && (e.selected = !1);
|
|
727
|
-
}}><cx-line-clamp lines="1">${this.selectGetOptionLabel(e)}</cx-line-clamp></cx-tag>`;
|
|
728
|
-
}
|
|
729
|
-
selectSetOptionSelected(e, t) {
|
|
730
|
-
if (!(!e || !(e instanceof $)) && this.selection !== "multiple") {
|
|
731
|
-
if (t === void 0) {
|
|
732
|
-
e.selected = !e.selected;
|
|
733
|
-
return;
|
|
734
|
-
}
|
|
735
|
-
e.selected = t;
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
updateFunctionProps() {
|
|
739
|
-
this.selectEl && (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.getTag = this.selectGetTag, this.selectEl.handleDefaultSlotChange());
|
|
740
|
-
}
|
|
741
|
-
handleOpenChange() {
|
|
742
|
-
if (this.selectEl) {
|
|
743
|
-
if (!this.open) {
|
|
744
|
-
this.selectEl.hide();
|
|
745
|
-
return;
|
|
746
|
-
}
|
|
747
|
-
this.updateFunctionProps();
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
async handleVariantChange() {
|
|
751
|
-
this.variant === C.Select && (await this.updateComplete, this.updateFunctionProps());
|
|
752
|
-
}
|
|
753
|
-
handleValueChange() {
|
|
754
|
-
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.getTag = this.selectGetTag, this.selectEl.handleDefaultSlotChange());
|
|
755
|
-
}
|
|
756
|
-
render() {
|
|
757
|
-
return m`<div class="folder-select">${ge(this.variant, [
|
|
758
|
-
[
|
|
759
|
-
C.Input,
|
|
760
|
-
() => m`<cx-input class="folder-select__search" aria-label=${this.localize.term("searchFolders")} placeholder=${`${this.localize.term("searchFolders")}...`} value=${this.searchTerm} clearable @cx-input=${this.handleSearchTermInputChange}><cx-icon name="search" slot="prefix"></cx-icon></cx-input><cx-folder-select-tree class="folder-select__tree" base-url=${this.baseUrl} extra-folder-id=${this.extraFolderId} extra-folder-title=${this.extraFolderTitle} extra-folder-icon=${this.extraFolderIcon} min-query-length=${this.minQueryLength} search-term=${this.searchTerm} selected-value=${this.value} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} ?exclude-virtual-folders=${this.excludeVirtualFolders} ?see-thru=${this.seeThru} ?auto-page-size=${this.autoPageSize} .api=${K(this, T)} .firstFetchCallback=${this.firstFetchCallback}></cx-folder-select-tree>`
|
|
761
|
-
],
|
|
762
|
-
[
|
|
763
|
-
C.Select,
|
|
764
|
-
() => m`<cx-select clearable hoist lazy name=${this.name} value=${this.value} .form=${this.form} ?required=${this.required} ?multiple=${this.selection === "multiple"} @input=${this.handleSearchTermSelectChange} @cx-clear=${this.handleSelectClear} @cx-selected-change=${this.handleTreeSelectedChange} allow-freetext><cx-folder-select-tree base-url=${this.baseUrl} extra-folder-id=${this.extraFolderId} extra-folder-title=${this.extraFolderTitle} extra-folder-icon=${this.extraFolderIcon} min-query-length=${this.minQueryLength} search-term=${this.searchTerm} selected-value=${this.value} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} ?exclude-virtual-folders=${this.excludeVirtualFolders} ?see-thru=${this.seeThru} ?auto-page-size=${this.autoPageSize} .api=${K(this, T)} .firstFetchCallback=${this.firstFetchCallback}></cx-folder-select-tree></cx-select>`
|
|
765
|
-
]
|
|
766
|
-
])}</div>`;
|
|
767
|
-
}
|
|
768
|
-
};
|
|
769
|
-
T = /* @__PURE__ */ new WeakMap();
|
|
770
|
-
i.styles = [te, we];
|
|
771
|
-
i.dependencies = {
|
|
772
|
-
"cx-folder-select-tree": n,
|
|
773
|
-
"cx-icon": Y,
|
|
774
|
-
"cx-input": de,
|
|
775
|
-
"cx-line-clamp": ee,
|
|
776
|
-
"cx-select": pe,
|
|
777
|
-
"cx-tag": ue
|
|
778
|
-
};
|
|
779
|
-
c([
|
|
780
|
-
re("cx-select")
|
|
781
|
-
], i.prototype, "selectEl", 2);
|
|
782
|
-
c([
|
|
783
|
-
l({ attribute: "min-query-length", reflect: !0, type: Number })
|
|
784
|
-
], i.prototype, "minQueryLength", 2);
|
|
785
|
-
c([
|
|
786
|
-
l({ attribute: "selection", reflect: !0, type: String })
|
|
787
|
-
], i.prototype, "selection", 2);
|
|
788
|
-
c([
|
|
789
|
-
l({ attribute: "variant", reflect: !0, type: String })
|
|
790
|
-
], i.prototype, "variant", 2);
|
|
791
|
-
c([
|
|
792
|
-
l({ reflect: !0, type: String })
|
|
793
|
-
], i.prototype, "value", 2);
|
|
794
|
-
c([
|
|
795
|
-
l({ reflect: !0, type: String })
|
|
796
|
-
], i.prototype, "name", 2);
|
|
797
|
-
c([
|
|
798
|
-
l({ attribute: "selected-label", reflect: !0, type: String })
|
|
799
|
-
], i.prototype, "selectedLabel", 2);
|
|
800
|
-
c([
|
|
801
|
-
l({ attribute: "base-url", reflect: !0, type: String })
|
|
802
|
-
], i.prototype, "baseUrl", 2);
|
|
803
|
-
c([
|
|
804
|
-
l({ reflect: !0, type: Boolean })
|
|
805
|
-
], i.prototype, "open", 2);
|
|
806
|
-
c([
|
|
807
|
-
l({ reflect: !1, type: String })
|
|
808
|
-
], i.prototype, "token", 2);
|
|
809
|
-
c([
|
|
810
|
-
l({ attribute: "bearer-token", reflect: !0, type: String })
|
|
811
|
-
], i.prototype, "bearerToken", 2);
|
|
812
|
-
c([
|
|
813
|
-
l({ attribute: "see-thru", reflect: !0, type: Boolean })
|
|
814
|
-
], i.prototype, "seeThru", 2);
|
|
815
|
-
c([
|
|
816
|
-
l({ type: Function })
|
|
817
|
-
], i.prototype, "api", 2);
|
|
818
|
-
c([
|
|
819
|
-
l({ reflect: !0, type: Boolean })
|
|
820
|
-
], i.prototype, "required", 2);
|
|
821
|
-
c([
|
|
822
|
-
l({ reflect: !1 })
|
|
823
|
-
], i.prototype, "form", 2);
|
|
824
|
-
c([
|
|
825
|
-
l({
|
|
826
|
-
attribute: "exclude-virtual-folders",
|
|
827
|
-
reflect: !0,
|
|
828
|
-
type: Boolean
|
|
829
|
-
})
|
|
830
|
-
], i.prototype, "excludeVirtualFolders", 2);
|
|
831
|
-
c([
|
|
832
|
-
l({
|
|
833
|
-
attribute: "extra-folder-id",
|
|
834
|
-
reflect: !0,
|
|
835
|
-
type: String
|
|
836
|
-
})
|
|
837
|
-
], i.prototype, "extraFolderId", 2);
|
|
838
|
-
c([
|
|
839
|
-
l({
|
|
840
|
-
attribute: "extra-folder-title",
|
|
841
|
-
reflect: !0,
|
|
842
|
-
type: String
|
|
843
|
-
})
|
|
844
|
-
], i.prototype, "extraFolderTitle", 2);
|
|
845
|
-
c([
|
|
846
|
-
l({
|
|
847
|
-
attribute: "extra-folder-icon",
|
|
848
|
-
reflect: !0,
|
|
849
|
-
type: String
|
|
850
|
-
})
|
|
851
|
-
], i.prototype, "extraFolderIcon", 2);
|
|
852
|
-
c([
|
|
853
|
-
l({ attribute: "auto-page-size", reflect: !0, type: Boolean })
|
|
854
|
-
], i.prototype, "autoPageSize", 2);
|
|
855
|
-
c([
|
|
856
|
-
l({ attribute: "first-fetch-callback", reflect: !1, type: Function })
|
|
857
|
-
], i.prototype, "firstFetchCallback", 2);
|
|
858
|
-
c([
|
|
859
|
-
x()
|
|
860
|
-
], i.prototype, "searchTerm", 2);
|
|
861
|
-
c([
|
|
862
|
-
f("api")
|
|
863
|
-
], i.prototype, "updateWrappedApi", 1);
|
|
864
|
-
c([
|
|
865
|
-
f("searchTerm", { waitUntilFirstUpdate: !0 })
|
|
866
|
-
], i.prototype, "handleSearchTermChange", 1);
|
|
867
|
-
c([
|
|
868
|
-
f("open")
|
|
869
|
-
], i.prototype, "handleOpenChange", 1);
|
|
870
|
-
c([
|
|
871
|
-
f("variant")
|
|
872
|
-
], i.prototype, "handleVariantChange", 1);
|
|
873
|
-
c([
|
|
874
|
-
f("selectedLabel", { waitUntilFirstUpdate: !0 }),
|
|
875
|
-
f("value", { waitUntilFirstUpdate: !0 })
|
|
876
|
-
], i.prototype, "handleValueChange", 1);
|
|
877
|
-
i = c([
|
|
878
|
-
W("cx-folder-select")
|
|
879
|
-
], i);
|
|
880
|
-
export {
|
|
881
|
-
i as C,
|
|
882
|
-
C as F,
|
|
883
|
-
H as a
|
|
884
|
-
};
|