@orangelogic/design-system 2.0.0-29DUO2-beta-3 → 2.0.0-29IORR-beta-2
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/{AxisLabelRadial.CgPb7ghO.js → AxisLabelRadial.Bs1P_q_F.js} +1 -1
- package/library/chunks/{BaseColumnSeries.B6rG-Ylz.js → BaseColumnSeries.C7jwOxIJ.js} +1 -1
- package/library/chunks/{CandlestickSeries.C-YfO-57.js → CandlestickSeries.CkXGtRWE.js} +2 -2
- package/library/chunks/{Circle.DhoXSsjo.js → Circle.DBa5Ok8V.js} +1 -1
- package/library/chunks/{ColumnSeries.CZi2LBZ2.js → ColumnSeries.DGazbfza.js} +2 -2
- package/library/chunks/{EditableAxisLabel.CykTMTsG.js → EditableAxisLabel.wN0t_G2B.js} +2 -2
- package/library/chunks/{EditableLabel.BlQ7B4D0.js → EditableLabel.BWeq6fgX.js} +1 -1
- package/library/chunks/{Gradient.BQ0JzFEe.js → Gradient.CdcsPIru.js} +1 -1
- package/library/chunks/{LinearGradient.DuVS2EHe.js → LinearGradient.B1z9AGUt.js} +2 -2
- package/library/chunks/{Picture.DRO0jnR6.js → Picture.YSPC0l0Q.js} +1 -1
- package/library/chunks/{Polygon.DEO3f_qs.js → Polygon.BwMvXN2H.js} +1 -1
- package/library/chunks/{ProgressPie.Bryx2w1J.js → ProgressPie.DlCwXN17.js} +5 -5
- package/library/chunks/{RadialLabel.TyXECvYG.js → RadialLabel.DyVOf2K8.js} +1 -1
- package/library/chunks/{Scrollbar.DK48nKk4.js → Scrollbar.BdZVb_Z-.js} +1 -1
- package/library/chunks/{Slice.DbXRplXx.js → Slice.DiEswWa6.js} +1 -1
- package/library/chunks/{Slider.B27osQYu.js → Slider.C20No2z5.js} +1 -1
- package/library/chunks/{SpriteResizer.C4wFzD_x.js → SpriteResizer.DFnmcy0h.js} +1 -1
- package/library/chunks/{Triangle.BEmFiHyd.js → Triangle.BaOef7HV.js} +1 -1
- package/library/chunks/{ZoomTools.CBqjLDqb.js → ZoomTools.D5JPehoL.js} +1 -1
- package/library/chunks/{_baseUniq.Df-fLIBx.js → _baseUniq.BUihBa8c.js} +56 -53
- package/library/chunks/{am-chart.B_OdX4Q-.js → am-chart.H2jnOzFc.js} +254 -262
- package/library/chunks/{animation.DfUHRQry.js → animation.7ifl4x2S.js} +4 -8
- package/library/chunks/array.DCtvHiLS.js +81 -0
- package/library/chunks/asset.D7E0-cUV.js +460 -0
- package/library/chunks/{button.KnE3mcyM.js → button.CauAHfdl.js} +10 -45
- package/library/chunks/button.styles.CKqn956w.js +5 -0
- package/library/chunks/{capitalize.WSkCXkNE.js → capitalize.CNStXZBq.js} +1 -1
- package/library/chunks/{color-swatch-group.p3Sdqlat.js → color-swatch-group.D5BP2W3P.js} +50 -220
- package/library/chunks/{color-swatch.C0oPHfOu.js → color-swatch.2HS4bc3N.js} +20 -204
- package/library/chunks/{colorPicker.CJwbdhtn.js → colorPicker.06n6P3aK.js} +5 -5
- package/library/chunks/component.styles.CRO4Odto.js +5 -0
- package/library/chunks/confirm-popover.DmGAMS8X.js +121 -0
- package/library/chunks/{cropper.tSDgXKqJ.js → cropper.ZU2Dy-MM.js} +8182 -8540
- package/library/chunks/{dialog.DpZBbTCn.js → dialog.2UW1LNm1.js} +117 -314
- package/library/chunks/{dom.BQVKDNd8.js → dom.BslZF2Y_.js} +1 -1
- package/library/chunks/dot-pagination.DsAfSNzr.js +204 -0
- package/library/chunks/{endpoints.B7lcoc1N.js → endpoints.Fpyb8xvv.js} +214 -203
- package/library/chunks/{exporting.DCqJtW6l.js → exporting.Chnl3UWi.js} +2 -2
- package/library/chunks/file-on-demand.Dig_iVvx.js +1956 -0
- package/library/chunks/{flow.Ch1rU01m.js → flow.D2CqFQa7.js} +5 -5
- package/library/chunks/folder-select.BT1drT8C.js +775 -0
- package/library/chunks/form-control.styles.CaGWmeAS.js +5 -0
- package/library/chunks/{form.DgwYWi0O.js → form.CFc09rKh.js} +1 -1
- package/library/chunks/{gantt.rWdF_jmG.js → gantt.DSHD2gjO.js} +8 -8
- package/library/chunks/header.BePZwMCQ.js +170 -0
- package/library/chunks/{hierarchy.HoRJAu6S.js → hierarchy.DwVsMmsP.js} +5 -5
- package/library/chunks/{hub-connection.CfARlehM.js → hub-connection.Ot2odiCz.js} +1 -1
- package/library/chunks/{i18n.C0iakJkV.js → i18n.BFqTRDCA.js} +19 -12
- package/library/chunks/icon-button.rKe0N4VB.js +149 -0
- package/library/chunks/iframe.DznmlYpV.js +73 -0
- package/library/chunks/{image.C9avagDq.js → image.CEtCGsNL.js} +275 -488
- package/library/chunks/{index.D2JPKXqq.js → index.C9khsiad.js} +17 -17
- package/library/chunks/isObjectLike.z36Fu426.js +34 -0
- package/library/chunks/{isSymbol.huJ_Cvxt.js → isSymbol.L0C2ND_U.js} +1 -1
- package/library/chunks/{json.DHNMAC-m.js → json.zyETMOw-.js} +3 -3
- package/library/chunks/{list-editor.B2mFE9f7.js → list-editor.CJ96S1Np.js} +58 -372
- package/library/chunks/{map.BHmZ4Crx.js → map.CqM2O6LB.js} +2 -2
- package/library/chunks/option.COnEtd3X.js +123 -0
- package/library/chunks/{overlayscrollbars.XhGWx9Zk.js → overlayscrollbars.BMav4RQ4.js} +252 -958
- package/library/chunks/pagination.DaD9Yul6.js +334 -0
- package/library/chunks/{percent.CM9cr1H3.js → percent.DuQwbCCg.js} +3 -3
- package/library/chunks/{radar.CQUnnhGk.js → radar.FpYl3UH5.js} +4 -4
- package/library/chunks/{responsive.CrX-HUow.js → responsive.BndCeSg0.js} +1 -1
- package/library/chunks/{sliceGrouper.iv1p8MAK.js → sliceGrouper.BsE7fGMt.js} +1 -1
- package/library/chunks/{stock.CU0y6a5P.js → stock.BR-ag4Pt.js} +9 -9
- package/library/chunks/string.BigZhczf.js +185 -0
- package/library/chunks/{tab-group.05PY0smt.js → tab-group.0Po0eoxR.js} +33 -584
- package/library/chunks/{table.DNTm_GMS.js → table.WNd284in.js} +3535 -4852
- package/library/chunks/{timeline.yzdwtGKM.js → timeline.DkzkmgEM.js} +5 -5
- package/library/chunks/{toString.CRT5zqEU.js → toString.CL_lYXbK.js} +3 -3
- package/library/chunks/toast.B2cJgW5u.js +71 -0
- package/library/chunks/transformation.CzBptarI.js +140 -0
- package/library/chunks/{tree.CeMLCbs-.js → tree.QCQd_cuc.js} +32 -400
- package/library/chunks/typography.DJC_UXgs.js +52 -0
- package/library/chunks/url.Cj9cIQXJ.js +27 -0
- package/library/chunks/{venn.BOEi13la.js → venn.D739bOV3.js} +1 -1
- package/library/chunks/watch.BCJD77bD.js +547 -0
- package/library/chunks/{wc.V-lq02JF.js → wc.DzW311D-.js} +1 -1
- package/library/chunks/{xy.Df1hy9ac.js → xy.DCRDfTsa.js} +10 -10
- package/library/components/alert.js +11 -179
- package/library/components/am-chart.js +3 -3
- package/library/components/animated-image.js +13 -101
- package/library/components/animation.js +3 -3
- package/library/components/array-line-clamp.js +8 -89
- package/library/components/asset-link-format.js +718 -1380
- package/library/components/atoms.js +18 -18
- package/library/components/avatar.js +6 -95
- package/library/components/badge.js +11 -139
- package/library/components/bicolor-picker.js +4 -23
- package/library/components/border-input-group.js +5 -26
- package/library/components/breadcrumb-item.js +25 -156
- package/library/components/breadcrumb.js +4 -22
- package/library/components/button-group.js +3 -28
- package/library/components/button.js +6 -6
- package/library/components/card.js +4 -126
- package/library/components/checkbox.js +13 -254
- package/library/components/color-picker.js +57 -728
- package/library/components/color-swatch-group.js +9 -9
- package/library/components/color-swatch.js +5 -5
- package/library/components/confirm-popover.js +6 -6
- package/library/components/copy-button.js +11 -256
- package/library/components/corner-position-input-group.js +5 -58
- package/library/components/cropper.js +2 -2
- package/library/components/details.js +6 -152
- package/library/components/dialog.js +6 -6
- package/library/components/divider.js +6 -68
- package/library/components/dot-pagination.js +4 -4
- package/library/components/dot-status.js +25 -95
- package/library/components/drawer.js +11 -242
- package/library/components/dropdown.js +49 -151
- package/library/components/dynamic-select.js +10 -75
- package/library/components/e-chart.js +8 -51
- package/library/components/element-clamp.js +7 -80
- package/library/components/file-on-demand.js +13 -13
- package/library/components/folder-select.js +9 -7
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +3 -7
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +4 -14
- package/library/components/grid-item.js +5 -172
- package/library/components/grid.js +5 -41
- package/library/components/header.js +4 -4
- package/library/components/hub-connection.js +2 -2
- package/library/components/icon-button.js +14 -679
- package/library/components/icon.js +9 -2449
- package/library/components/iframe.js +4 -4
- package/library/components/image-comparer.js +9 -129
- package/library/components/image.js +4 -4
- package/library/components/include.js +3 -7
- package/library/components/input-group.js +4 -29
- package/library/components/input.js +358 -966
- package/library/components/line-clamp.js +7 -83
- package/library/components/list-editor.js +9 -9
- package/library/components/markdown.js +2 -4
- package/library/components/masonry.js +24 -223
- package/library/components/menu-item.js +155 -445
- package/library/components/menu-label.js +3 -20
- package/library/components/menu-section.js +3 -17
- package/library/components/menu.js +5 -113
- package/library/components/molecules.js +5 -5
- package/library/components/mutation-observer.js +3 -7
- package/library/components/option.js +4 -4
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +5 -16
- package/library/components/pagination.js +10 -8
- package/library/components/popup.js +385 -682
- package/library/components/position-picker.js +4 -94
- package/library/components/progress-bar.js +19 -136
- package/library/components/progress-ring.js +4 -95
- package/library/components/qr-code.js +5 -17
- package/library/components/radio-button.js +5 -25
- package/library/components/radio-card.js +8 -176
- package/library/components/radio-group.js +22 -153
- package/library/components/radio.js +14 -171
- package/library/components/range.js +123 -660
- package/library/components/rating.js +58 -238
- package/library/components/relative-time.js +3 -13
- package/library/components/resize-observer.js +4 -8
- package/library/components/select.js +305 -1012
- package/library/components/shadow-input-group.js +5 -24
- package/library/components/share-option-list.js +21 -313
- package/library/components/sidebar.js +15 -221
- package/library/components/size-input-group.js +12 -77
- package/library/components/skeleton.js +7 -80
- package/library/components/space.js +6 -143
- package/library/components/spinner.js +7 -76
- package/library/components/split-panel.js +18 -125
- package/library/components/step.js +21 -272
- package/library/components/stepper-wizard.js +9 -43
- package/library/components/stepper.js +17 -34
- package/library/components/switch.js +13 -276
- package/library/components/tab-group.js +7 -7
- package/library/components/tab-panel.js +5 -32
- package/library/components/tab.js +11 -257
- package/library/components/table.js +8 -8
- package/library/components/tag.js +15 -166
- package/library/components/textarea.js +183 -504
- package/library/components/timecode.js +6 -25
- package/library/components/tooltip.js +10 -94
- package/library/components/tree-item.js +4 -4
- package/library/components/tree.js +4 -4
- package/library/components/typeface.js +24 -123
- package/library/components/types.js +37225 -47339
- package/library/components/typography.js +2 -2
- package/library/components/video.js +3875 -6263
- package/library/components/visually-hidden.js +3 -15
- package/library/package.json +4 -1
- package/library/packages/atoms/src/components/dialog/dialog.d.ts +10 -0
- package/library/packages/atoms/src/components/icon-button/icon-button.d.ts +2 -1
- package/library/packages/atoms/src/components/image/image.d.ts +15 -1
- package/library/packages/atoms/src/components/input/auto-grow-controller.d.ts +23 -0
- package/library/packages/atoms/src/components/input/input.d.ts +10 -2
- package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +4 -0
- package/library/packages/atoms/src/components/pagination/pagination.d.ts +32 -2
- package/library/packages/atoms/src/components/popup/overlay/Overlay.d.ts +10 -0
- package/library/packages/atoms/src/components/popup/popup.d.ts +1 -1
- package/library/packages/atoms/src/components/select/select.d.ts +11 -0
- package/library/packages/atoms/src/components/table/table.d.ts +49 -8
- package/library/packages/atoms/src/components/table/tabulator-tables/core/Tabulator.d.ts +1 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/core/TabulatorFull.d.ts +1 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/core/tools/DataLoader.d.ts +3 -1
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Ajax/Ajax.d.ts +1 -1
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Edit/Edit.d.ts +1 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Edit/List.d.ts +40 -1
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Filter/Filter.d.ts +10 -3
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Filter/formatter-display-resolvers.d.ts +93 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/Group.d.ts +8 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupComponent.d.ts +3 -1
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupLoadMore.d.ts +7 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupRows.d.ts +2 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/modules/Page/Page.d.ts +2 -2
- package/library/packages/atoms/src/components/textarea/textarea.d.ts +19 -4
- package/library/packages/atoms/src/components/video/video.d.ts +3 -1
- package/library/packages/events/src/cx-asset-transformation-dialog-cancel.d.ts +6 -0
- package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +11 -0
- package/library/packages/events/src/cx-asset-transformation-dialog-delete.d.ts +6 -0
- package/library/packages/events/src/cx-bento-range-change.d.ts +9 -0
- package/library/packages/events/src/cx-content-builder-gallery-fetched.d.ts +10 -0
- package/library/packages/events/src/cx-lightbox-close.d.ts +6 -0
- package/library/packages/events/src/cx-lightbox-download.d.ts +11 -0
- package/library/packages/events/src/cx-unauthorized.d.ts +10 -0
- package/library/packages/events/src/cx-video-format-picker-delete.d.ts +6 -0
- package/library/packages/events/src/cx-video-format-picker-select.d.ts +8 -0
- package/library/packages/events/src/events.d.ts +11 -1
- package/library/packages/molecules/src/cropper/cropper.d.ts +2 -0
- package/library/packages/molecules/src/cropper/react/Cropper.d.ts +2 -0
- package/library/packages/molecules/src/estimated-reading-time/estimated-reading-time.d.ts +3 -2
- package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +26 -0
- package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +46 -0
- package/library/packages/molecules/src/folder-select/folder-select.d.ts +25 -0
- package/library/packages/molecules/src/index.d.ts +1 -0
- package/library/packages/molecules/src/storybook/storybook.d.ts +60 -23
- package/library/packages/molecules/src/timeline/timeline.d.ts +14 -0
- package/library/packages/molecules/src/video-format-picker/video-format-picker.d.ts +55 -0
- package/library/packages/molecules/src/video-format-picker/video-format-picker.styles.d.ts +2 -0
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +9 -1
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-rotation/asset-link-format-rotation.d.ts +7 -7
- package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +95 -0
- package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.styles.d.ts +2 -0
- package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +57 -26
- package/library/packages/organisms/src/bento-grid/bento-layout.d.ts +44 -0
- package/library/packages/organisms/src/carousel/carousel.d.ts +5 -1
- package/library/packages/organisms/src/comment/comment.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/components/block-picker/block-picker.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +11 -0
- package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +10 -0
- package/library/packages/organisms/src/content-builder/components/folder-picker/folder-picker.d.ts +6 -0
- package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +6 -2
- package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +6 -2
- package/library/packages/organisms/src/content-builder/configs/image.d.ts +7 -4
- package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +5 -2
- package/library/packages/organisms/src/content-builder/configs/video.d.ts +11 -2
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +45 -4
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +13 -0
- package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +45 -1
- package/library/packages/organisms/src/content-builder/styleController.d.ts +20 -2
- package/library/packages/organisms/src/index.d.ts +2 -0
- package/library/packages/organisms/src/lightbox/lightbox.d.ts +79 -0
- package/library/packages/organisms/src/lightbox/lightbox.styles.d.ts +2 -0
- package/library/packages/services/src/api/asset/asset.d.ts +3 -2
- package/library/packages/services/src/api/asset/asset.types.d.ts +84 -0
- package/library/packages/services/src/api/asset/asset.utils.d.ts +9 -0
- package/library/packages/services/src/api/endpoints.d.ts +1 -1
- package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -1
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +17 -5
- package/library/packages/types/src/asset-click-action.d.ts +3 -1
- package/library/packages/types/src/bento-grid.d.ts +37 -0
- package/library/packages/types/src/content-builder.d.ts +27 -1
- package/library/packages/types/src/gallery.d.ts +0 -6
- package/library/packages/types/src/icon-button.d.ts +7 -0
- package/library/packages/types/src/menu-item.d.ts +33 -0
- package/library/packages/types/src/storybook.d.ts +19 -0
- package/library/packages/types/src/table.d.ts +37 -1
- package/library/packages/types/src/textarea.d.ts +4 -0
- package/library/packages/types/src/video-format-picker.d.ts +11 -0
- package/library/packages/utils/src/actions/asset-click.d.ts +1 -3
- package/library/packages/utils/src/custom-element/i18n.d.ts +10 -3
- package/library/packages/utils/src/index.d.ts +1 -0
- package/library/packages/utils/src/string/string.d.ts +33 -0
- package/library/packages/utils/src/transformation/index.d.ts +1 -0
- package/library/packages/utils/src/url/url.d.ts +9 -0
- package/library/react-web-component.d.ts +293 -29
- package/library/utils.js +483 -178
- package/package.json +4 -1
- package/library/chunks/_baseRest.ClTMQtN1.js +0 -67
- package/library/chunks/asset.CG_yXtWK.js +0 -288
- package/library/chunks/button.styles.Dl5IQLHU.js +0 -718
- package/library/chunks/component.styles.DMSLciL5.js +0 -71
- package/library/chunks/confirm-popover.zmOFI4e-.js +0 -288
- package/library/chunks/content-builder.D_phDrlo.js +0 -127
- package/library/chunks/dot-pagination.COBkyhoJ.js +0 -325
- package/library/chunks/file-on-demand.CbE-qsiP.js +0 -3740
- package/library/chunks/folder-select.Bl_WkhVE.js +0 -844
- package/library/chunks/form-control.styles.CUGhvlfT.js +0 -67
- package/library/chunks/header.BduX6KJP.js +0 -777
- package/library/chunks/identity.ByMq8VxU.js +0 -6
- package/library/chunks/iframe.BPKV2K7z.js +0 -160
- package/library/chunks/index.B3wJT3XS.js +0 -373
- package/library/chunks/isObjectLike.D3cpZO39.js +0 -81
- package/library/chunks/option.DnpkE8Xi.js +0 -296
- package/library/chunks/pagination.C30LoTya.js +0 -341
- package/library/chunks/string.B_rEG27K.js +0 -160
- package/library/chunks/toast.BXNbwZV8.js +0 -25
- package/library/chunks/typography.oDzoLbZS.js +0 -149
- package/library/chunks/url.LjsR2sB5.js +0 -15
- package/library/chunks/watch.q1sEjPWL.js +0 -501
- /package/library/packages/{organisms/src/asset-link-format/asset-link-format.utils.d.ts → utils/src/transformation/transformation.d.ts} +0 -0
|
@@ -1,844 +0,0 @@
|
|
|
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.CeMLCbs-.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.C0iakJkV.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";
|
|
13
|
-
import { e as B } from "./query.BBf1UFkC.js";
|
|
14
|
-
import { r as se } from "./choose.BTbF6BAn.js";
|
|
15
|
-
import { C as W } from "./button.KnE3mcyM.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({
|
|
28
|
-
allowedFolders: e,
|
|
29
|
-
baseUrl: t,
|
|
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
|
|
39
|
-
}) {
|
|
40
|
-
let k = [], L = p ?? !0;
|
|
41
|
-
e && e.length > 0 && !l ? (k = e, E = !0, L = !1) : l && (k = [l]);
|
|
42
|
-
try {
|
|
43
|
-
return (await I.request({
|
|
44
|
-
baseURL: t,
|
|
45
|
-
headers: {
|
|
46
|
-
Authorization: `Bearer ${a}`
|
|
47
|
-
},
|
|
48
|
-
method: "GET",
|
|
49
|
-
params: {
|
|
50
|
-
IncludeDirectChild: L,
|
|
51
|
-
IncludeVirtualFolders: !i,
|
|
52
|
-
Limit: u,
|
|
53
|
-
ObjectRecordIDs: k,
|
|
54
|
-
SeeThru: !!U,
|
|
55
|
-
Self: E,
|
|
56
|
-
Start: M,
|
|
57
|
-
Text: U || void 0,
|
|
58
|
-
Token: Z || void 0
|
|
59
|
-
},
|
|
60
|
-
paramsSerializer: {
|
|
61
|
-
indexes: null
|
|
62
|
-
},
|
|
63
|
-
responseType: "json",
|
|
64
|
-
transformResponse: [
|
|
65
|
-
...Array.isArray(I.defaults.transformResponse) ? I.defaults.transformResponse : [],
|
|
66
|
-
(g, Te, _) => {
|
|
67
|
-
if (_ !== void 0 && (_ < 200 || _ >= 300))
|
|
68
|
-
return {
|
|
69
|
-
data: [],
|
|
70
|
-
hasMore: !1,
|
|
71
|
-
totalCount: 0
|
|
72
|
-
};
|
|
73
|
-
if (!g || typeof g != "object")
|
|
74
|
-
throw new Error("Invalid response format");
|
|
75
|
-
const K = g.contentItems?.length ?? 0;
|
|
76
|
-
return {
|
|
77
|
-
data: g.contentItems?.map((b) => ({
|
|
78
|
-
docType: b.fields[v.DocType] ?? "",
|
|
79
|
-
fullPath: b.fields[v.CortexPath] ?? "",
|
|
80
|
-
hasChildren: b.fields[v.HasBrowserChildren] === "1",
|
|
81
|
-
id: b.recordID,
|
|
82
|
-
isShared: b.fields[v.rawDocSubtype] === "DO_OR1ND000001913488",
|
|
83
|
-
representativeAssetId: b.fields[v.RepresentativeAssetId] ?? "",
|
|
84
|
-
title: b.fields[v.TitleWithFallback] ?? ""
|
|
85
|
-
})) ?? [],
|
|
86
|
-
hasMore: M + K < g.totalCount,
|
|
87
|
-
totalCount: g.totalCount
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
],
|
|
91
|
-
url: te
|
|
92
|
-
})).data;
|
|
93
|
-
} catch {
|
|
94
|
-
return {
|
|
95
|
-
data: [],
|
|
96
|
-
hasMore: !1,
|
|
97
|
-
totalCount: 0
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
}
|
|
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;
|
|
105
|
-
};
|
|
106
|
-
let n = class extends O {
|
|
107
|
-
constructor() {
|
|
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;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
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
|
|
112
|
-
*/
|
|
113
|
-
createRenderRoot() {
|
|
114
|
-
return this;
|
|
115
|
-
}
|
|
116
|
-
async fetchFolders({
|
|
117
|
-
folderId: e,
|
|
118
|
-
start: t = 0
|
|
119
|
-
}) {
|
|
120
|
-
if (!this.api)
|
|
121
|
-
return { data: [], hasMore: !1 };
|
|
122
|
-
try {
|
|
123
|
-
const { data: a, hasMore: i } = await this.api({
|
|
124
|
-
baseUrl: this.baseUrl,
|
|
125
|
-
bearerToken: this.bearerToken,
|
|
126
|
-
excludeVirtualFolders: this.excludeVirtualFolders,
|
|
127
|
-
folderId: e,
|
|
128
|
-
start: t,
|
|
129
|
-
token: this.token
|
|
130
|
-
});
|
|
131
|
-
return { data: a, hasMore: i };
|
|
132
|
-
} catch {
|
|
133
|
-
return { data: [], hasMore: !1 };
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
async loadMore(e) {
|
|
137
|
-
e.stopPropagation();
|
|
138
|
-
const t = this.data?.length || 0;
|
|
139
|
-
this.loading = !0;
|
|
140
|
-
try {
|
|
141
|
-
const { data: a, hasMore: i } = await this.fetchFolders({
|
|
142
|
-
folderId: this.folderId,
|
|
143
|
-
start: t
|
|
144
|
-
});
|
|
145
|
-
this.data = [...this.data || [], ...a], this.hasMore = i;
|
|
146
|
-
} catch {
|
|
147
|
-
} finally {
|
|
148
|
-
this.loading = !1;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
async handleLazyLoad(e) {
|
|
152
|
-
e.stopPropagation(), this.treeItem.expanded = !0;
|
|
153
|
-
const t = this.data?.length || 0;
|
|
154
|
-
try {
|
|
155
|
-
const { data: a, hasMore: i } = await this.fetchFolders({
|
|
156
|
-
folderId: this.folderId,
|
|
157
|
-
start: t
|
|
158
|
-
});
|
|
159
|
-
this.data = a, this.hasMore = i;
|
|
160
|
-
} catch {
|
|
161
|
-
this.treeItem.expanded = !1;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
render() {
|
|
165
|
-
return f`
|
|
166
|
-
<cx-tree-item
|
|
167
|
-
class=${ce({
|
|
168
|
-
"folder-select-tree-item": !0
|
|
169
|
-
})}
|
|
170
|
-
data-id=${this.folderId}
|
|
171
|
-
data-url=${y(this.url)}
|
|
172
|
-
data-name=${y(this.name?.trim() || void 0)}
|
|
173
|
-
data-representative-asset-id=${y(
|
|
174
|
-
this.representativeAssetId || void 0
|
|
175
|
-
)}
|
|
176
|
-
role="option"
|
|
177
|
-
?lazy=${this.hasChildren && this.data === null}
|
|
178
|
-
?selected=${this.selectedValue === this.folderId}
|
|
179
|
-
@cx-lazy-load=${this.handleLazyLoad}
|
|
180
|
-
>
|
|
181
|
-
<cx-space
|
|
182
|
-
class="folder-select-tree-item__label"
|
|
183
|
-
direction="horizontal"
|
|
184
|
-
spacing="x-small"
|
|
185
|
-
align-items="center"
|
|
186
|
-
wrap="nowrap"
|
|
187
|
-
>
|
|
188
|
-
<cx-icon
|
|
189
|
-
class="folder-select-tree__item__icon"
|
|
190
|
-
name="folder"
|
|
191
|
-
variant=${this.docType === P.Album ? "outlined" : "filled"}
|
|
192
|
-
></cx-icon>
|
|
193
|
-
<cx-line-clamp lines="1" class="folder-select-tree-item__title">
|
|
194
|
-
${ne(this.name, this.searchTerm)}
|
|
195
|
-
</cx-line-clamp>
|
|
196
|
-
</cx-space>
|
|
197
|
-
${q(
|
|
198
|
-
this.data || [],
|
|
199
|
-
(e) => e.id,
|
|
200
|
-
(e) => f`<cx-folder-select-tree-item
|
|
201
|
-
slot="children"
|
|
202
|
-
folder-id=${e.id}
|
|
203
|
-
full-path=${e.fullPath}
|
|
204
|
-
name=${e.title}
|
|
205
|
-
representative-asset-id=${e.representativeAssetId}
|
|
206
|
-
selected-value=${this.selectedValue}
|
|
207
|
-
token=${this.token}
|
|
208
|
-
bearer-token=${this.bearerToken}
|
|
209
|
-
?exclude-virtual-folders=${this.excludeVirtualFolders}
|
|
210
|
-
?has-children=${e.hasChildren}
|
|
211
|
-
base-url=${this.baseUrl}
|
|
212
|
-
url=${y(e.url ?? void 0)}
|
|
213
|
-
.api=${this.api}
|
|
214
|
-
value=${e.url}
|
|
215
|
-
></cx-folder-select-tree-item>`
|
|
216
|
-
)}
|
|
217
|
-
</cx-tree-item>
|
|
218
|
-
${C(
|
|
219
|
-
this.hasMore,
|
|
220
|
-
() => f`
|
|
221
|
-
<div slot="children" class="load-more-button">
|
|
222
|
-
<cx-button
|
|
223
|
-
variant="text"
|
|
224
|
-
@click=${this.loadMore}
|
|
225
|
-
?loading=${this.loading}
|
|
226
|
-
>
|
|
227
|
-
${this.localize.term("more")}
|
|
228
|
-
</cx-button>
|
|
229
|
-
</div>
|
|
230
|
-
`
|
|
231
|
-
)}
|
|
232
|
-
`;
|
|
233
|
-
}
|
|
234
|
-
};
|
|
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": $
|
|
242
|
-
};
|
|
243
|
-
d([
|
|
244
|
-
B("cx-tree-item")
|
|
245
|
-
], n.prototype, "treeItem", 2);
|
|
246
|
-
d([
|
|
247
|
-
r({ attribute: "folder-id", reflect: !0, type: String })
|
|
248
|
-
], n.prototype, "folderId", 2);
|
|
249
|
-
d([
|
|
250
|
-
r({ attribute: "has-children", reflect: !0, type: Boolean })
|
|
251
|
-
], n.prototype, "hasChildren", 2);
|
|
252
|
-
d([
|
|
253
|
-
r({ attribute: "full-path", reflect: !0, type: String })
|
|
254
|
-
], n.prototype, "fullPath", 2);
|
|
255
|
-
d([
|
|
256
|
-
r({ attribute: "doc-type", reflect: !0, type: String })
|
|
257
|
-
], n.prototype, "docType", 2);
|
|
258
|
-
d([
|
|
259
|
-
r({ reflect: !0, type: String })
|
|
260
|
-
], n.prototype, "name", 2);
|
|
261
|
-
d([
|
|
262
|
-
r({
|
|
263
|
-
attribute: "representative-asset-id",
|
|
264
|
-
reflect: !0,
|
|
265
|
-
type: String
|
|
266
|
-
})
|
|
267
|
-
], n.prototype, "representativeAssetId", 2);
|
|
268
|
-
d([
|
|
269
|
-
r({ attribute: "selected-value", reflect: !0, type: String })
|
|
270
|
-
], n.prototype, "selectedValue", 2);
|
|
271
|
-
d([
|
|
272
|
-
r({ reflect: !0, type: String })
|
|
273
|
-
], n.prototype, "token", 2);
|
|
274
|
-
d([
|
|
275
|
-
r({ attribute: "bearer-token", reflect: !0, type: String })
|
|
276
|
-
], n.prototype, "bearerToken", 2);
|
|
277
|
-
d([
|
|
278
|
-
r({ attribute: "base-url", reflect: !0, type: String })
|
|
279
|
-
], n.prototype, "baseUrl", 2);
|
|
280
|
-
d([
|
|
281
|
-
r({ attribute: "search-term", reflect: !0, type: String })
|
|
282
|
-
], n.prototype, "searchTerm", 2);
|
|
283
|
-
d([
|
|
284
|
-
r({ type: Function })
|
|
285
|
-
], n.prototype, "api", 2);
|
|
286
|
-
d([
|
|
287
|
-
r({
|
|
288
|
-
attribute: "exclude-virtual-folders",
|
|
289
|
-
reflect: !0,
|
|
290
|
-
type: Boolean
|
|
291
|
-
})
|
|
292
|
-
], n.prototype, "excludeVirtualFolders", 2);
|
|
293
|
-
d([
|
|
294
|
-
r({ reflect: !0, type: String })
|
|
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 {
|
|
316
|
-
constructor() {
|
|
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);
|
|
318
|
-
}
|
|
319
|
-
get empty() {
|
|
320
|
-
return !this.loading && this.data.length === 0;
|
|
321
|
-
}
|
|
322
|
-
/**
|
|
323
|
-
* 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
|
|
324
|
-
*/
|
|
325
|
-
createRenderRoot() {
|
|
326
|
-
return this;
|
|
327
|
-
}
|
|
328
|
-
runFirstUpdated() {
|
|
329
|
-
this.searchTerm = "", this.handleFetchFolders();
|
|
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
|
-
}
|
|
351
|
-
async loadMore(e) {
|
|
352
|
-
if (!this.api)
|
|
353
|
-
return;
|
|
354
|
-
e.stopPropagation();
|
|
355
|
-
const t = this.data.length;
|
|
356
|
-
this.loading = !0;
|
|
357
|
-
const { data: a, hasMore: i } = await this.api({
|
|
358
|
-
baseUrl: this.baseUrl,
|
|
359
|
-
bearerToken: this.bearerToken,
|
|
360
|
-
excludeVirtualFolders: this.excludeVirtualFolders,
|
|
361
|
-
folderId: "",
|
|
362
|
-
limit: 10,
|
|
363
|
-
searchTerm: this.searchTerm,
|
|
364
|
-
seeThru: this.seeThru,
|
|
365
|
-
start: t,
|
|
366
|
-
token: this.token
|
|
367
|
-
});
|
|
368
|
-
this.data = [...this.data, ...a], this.hasMore = i, this.loading = !1;
|
|
369
|
-
}
|
|
370
|
-
async handleFetchFolders() {
|
|
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
|
-
};
|
|
385
|
-
this.loading = !0;
|
|
386
|
-
const { data: e, hasMore: t } = await this.api({
|
|
387
|
-
baseUrl: this.baseUrl,
|
|
388
|
-
bearerToken: this.bearerToken,
|
|
389
|
-
excludeVirtualFolders: this.excludeVirtualFolders,
|
|
390
|
-
folderId: "",
|
|
391
|
-
limit: 10,
|
|
392
|
-
searchTerm: this.searchTerm,
|
|
393
|
-
seeThru: this.seeThru,
|
|
394
|
-
start: 0,
|
|
395
|
-
token: this.token
|
|
396
|
-
});
|
|
397
|
-
return this.data = e, this.hasMore = t, this.loading = !1, {
|
|
398
|
-
data: e,
|
|
399
|
-
hasMore: t
|
|
400
|
-
};
|
|
401
|
-
}
|
|
402
|
-
renderFolder(e) {
|
|
403
|
-
return f`<cx-folder-select-tree-item
|
|
404
|
-
.api=${this.api}
|
|
405
|
-
base-url=${this.baseUrl}
|
|
406
|
-
doc-type=${e.docType}
|
|
407
|
-
folder-id=${e.id}
|
|
408
|
-
full-path=${y(e.fullPath ?? void 0)}
|
|
409
|
-
name=${e.title}
|
|
410
|
-
search-term=${this.searchTerm}
|
|
411
|
-
selected-value=${this.selectedValue}
|
|
412
|
-
token=${this.token}
|
|
413
|
-
bearer-token=${this.bearerToken}
|
|
414
|
-
url=${y(e.url ?? void 0)}
|
|
415
|
-
?has-children=${e.hasChildren}
|
|
416
|
-
?exclude-virtual-folders=${this.excludeVirtualFolders}
|
|
417
|
-
></cx-folder-select-tree-item>`;
|
|
418
|
-
}
|
|
419
|
-
render() {
|
|
420
|
-
return f`<cx-tree
|
|
421
|
-
class="folder-select-tree"
|
|
422
|
-
selection=${this.selection}
|
|
423
|
-
force-on-change
|
|
424
|
-
disabled-auto-expand
|
|
425
|
-
disabled-sync-checkboxes
|
|
426
|
-
>
|
|
427
|
-
${C(
|
|
428
|
-
this.empty,
|
|
429
|
-
() => f`<div
|
|
430
|
-
class="folder-select-tree__empty-message"
|
|
431
|
-
role="status"
|
|
432
|
-
aria-live="polite"
|
|
433
|
-
>
|
|
434
|
-
<cx-typography variant="body3">
|
|
435
|
-
${this.localize.term("noResults")}
|
|
436
|
-
</cx-typography>
|
|
437
|
-
</div>`
|
|
438
|
-
)}
|
|
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(
|
|
458
|
-
this.data,
|
|
459
|
-
(e) => e.id,
|
|
460
|
-
(e) => this.renderFolder(e)
|
|
461
|
-
)}
|
|
462
|
-
${C(
|
|
463
|
-
this.hasMore,
|
|
464
|
-
() => f`
|
|
465
|
-
<cx-button
|
|
466
|
-
class="folder-select-tree__load-more"
|
|
467
|
-
variant="text"
|
|
468
|
-
@click=${this.loadMore}
|
|
469
|
-
?loading=${this.loading}
|
|
470
|
-
>
|
|
471
|
-
${this.localize.term("more")}
|
|
472
|
-
</cx-button>
|
|
473
|
-
`
|
|
474
|
-
)}
|
|
475
|
-
</cx-tree>`;
|
|
476
|
-
}
|
|
477
|
-
};
|
|
478
|
-
S = /* @__PURE__ */ new WeakMap();
|
|
479
|
-
c.dependencies = {
|
|
480
|
-
"cx-button": W,
|
|
481
|
-
"cx-folder-select-tree-item": n,
|
|
482
|
-
"cx-tree": ee
|
|
483
|
-
};
|
|
484
|
-
h([
|
|
485
|
-
r({ attribute: "min-query-length", reflect: !0, type: Number })
|
|
486
|
-
], c.prototype, "minQueryLength", 2);
|
|
487
|
-
h([
|
|
488
|
-
r({ attribute: "selection", reflect: !0, type: String })
|
|
489
|
-
], c.prototype, "selection", 2);
|
|
490
|
-
h([
|
|
491
|
-
r({ attribute: "search-term", reflect: !0, type: String })
|
|
492
|
-
], c.prototype, "searchTerm", 2);
|
|
493
|
-
h([
|
|
494
|
-
r({ attribute: "selected-value", reflect: !0, type: String })
|
|
495
|
-
], c.prototype, "selectedValue", 2);
|
|
496
|
-
h([
|
|
497
|
-
r({ reflect: !0, type: String })
|
|
498
|
-
], c.prototype, "token", 2);
|
|
499
|
-
h([
|
|
500
|
-
r({ attribute: "bearer-token", reflect: !0, type: String })
|
|
501
|
-
], c.prototype, "bearerToken", 2);
|
|
502
|
-
h([
|
|
503
|
-
r({ attribute: "base-url", reflect: !0, type: String })
|
|
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([
|
|
518
|
-
r({ type: Function })
|
|
519
|
-
], c.prototype, "api", 2);
|
|
520
|
-
h([
|
|
521
|
-
r({
|
|
522
|
-
attribute: "exclude-virtual-folders",
|
|
523
|
-
reflect: !0,
|
|
524
|
-
type: Boolean
|
|
525
|
-
})
|
|
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([
|
|
543
|
-
m("baseUrl", { waitUntilFirstUpdate: !0 }),
|
|
544
|
-
m("token", { waitUntilFirstUpdate: !0 }),
|
|
545
|
-
m("searchTerm", { waitUntilFirstUpdate: !0 }),
|
|
546
|
-
m("excludeVirtualFolders", { waitUntilFirstUpdate: !0 }),
|
|
547
|
-
le(500)
|
|
548
|
-
], c.prototype, "handleFetchFolders", 1);
|
|
549
|
-
c = h([
|
|
550
|
-
D("cx-folder-select-tree")
|
|
551
|
-
], c);
|
|
552
|
-
const be = ae`
|
|
553
|
-
:host {
|
|
554
|
-
display: block;
|
|
555
|
-
width: 100%;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
.folder-select {
|
|
559
|
-
display: flex;
|
|
560
|
-
flex-direction: column;
|
|
561
|
-
gap: var(--cx-spacing-x-small);
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
.folder-select-tree {
|
|
565
|
-
overflow: auto;
|
|
566
|
-
flex: 1;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
.folder-select-tree__item__icon {
|
|
570
|
-
color: var(--cx-color-primary);
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
.folder-select-tree__empty-message {
|
|
574
|
-
font-size: var(--cx-font-size-small);
|
|
575
|
-
color: var(--cx-color-neutral-500);
|
|
576
|
-
padding-block: var(--cx-spacing-2x-small);
|
|
577
|
-
padding-inline: var(--cx-spacing-small);
|
|
578
|
-
text-align: center;
|
|
579
|
-
cursor: default;
|
|
580
|
-
user-select: none;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
.folder-select-tree__load-more {
|
|
584
|
-
margin-inline: var(--cx-spacing-small);
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
.folder-select-tree-item::part(label),
|
|
588
|
-
.folder-select-tree-item__label,
|
|
589
|
-
.folder-select-tree-item__title {
|
|
590
|
-
overflow: hidden;
|
|
591
|
-
}
|
|
592
|
-
`;
|
|
593
|
-
var ve = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, H = (e) => {
|
|
594
|
-
throw TypeError(e);
|
|
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 {
|
|
601
|
-
constructor() {
|
|
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();
|
|
603
|
-
}
|
|
604
|
-
updateWrappedApi() {
|
|
605
|
-
if (!this.api) {
|
|
606
|
-
z(this, T, void 0);
|
|
607
|
-
return;
|
|
608
|
-
}
|
|
609
|
-
z(this, T, async (e) => {
|
|
610
|
-
try {
|
|
611
|
-
return await this.api(e);
|
|
612
|
-
} catch (t) {
|
|
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
|
|
621
|
-
}
|
|
622
|
-
});
|
|
623
|
-
}
|
|
624
|
-
handleSearchTermInputChange(e) {
|
|
625
|
-
this.searchTerm = e.target.value;
|
|
626
|
-
}
|
|
627
|
-
handleSearchTermSelectChange(e) {
|
|
628
|
-
this.searchTerm = e.target.displayInput.value;
|
|
629
|
-
}
|
|
630
|
-
selectGetOptionValue(e) {
|
|
631
|
-
return !e || !(e instanceof $) ? this.value : e.dataset.id || this.value;
|
|
632
|
-
}
|
|
633
|
-
selectGetOptionLabel(e) {
|
|
634
|
-
return !e || !(e instanceof $) ? this.selectedLabel : e.dataset.name || this.selectedLabel;
|
|
635
|
-
}
|
|
636
|
-
selectGetOptionSelected(e) {
|
|
637
|
-
if (!(!e || !(e instanceof $)))
|
|
638
|
-
return e.selected;
|
|
639
|
-
}
|
|
640
|
-
selectFilterCallback(e) {
|
|
641
|
-
return !(!e || !(e instanceof $));
|
|
642
|
-
}
|
|
643
|
-
selectSetOptionSelected(e, t) {
|
|
644
|
-
if (!(!e || !(e instanceof $))) {
|
|
645
|
-
if (t === void 0) {
|
|
646
|
-
e.selected = !e.selected;
|
|
647
|
-
return;
|
|
648
|
-
}
|
|
649
|
-
e.selected = t;
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
updateFunctionProps() {
|
|
653
|
-
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.handleDefaultSlotChange());
|
|
654
|
-
}
|
|
655
|
-
handleOpenChange() {
|
|
656
|
-
if (this.selectEl) {
|
|
657
|
-
if (!this.open) {
|
|
658
|
-
this.selectEl.hide();
|
|
659
|
-
return;
|
|
660
|
-
}
|
|
661
|
-
this.updateFunctionProps();
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
async handleVariantChange() {
|
|
665
|
-
this.variant === F.Select && (await this.updateComplete, this.updateFunctionProps());
|
|
666
|
-
}
|
|
667
|
-
handleValueChange() {
|
|
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());
|
|
669
|
-
}
|
|
670
|
-
render() {
|
|
671
|
-
return f`<div class="folder-select">
|
|
672
|
-
${se(this.variant, [
|
|
673
|
-
[
|
|
674
|
-
F.Input,
|
|
675
|
-
() => f`
|
|
676
|
-
<cx-input
|
|
677
|
-
aria-label=${this.localize.term("searchFolders")}
|
|
678
|
-
placeholder=${`${this.localize.term("searchFolders")}...`}
|
|
679
|
-
value=${this.searchTerm}
|
|
680
|
-
clearable
|
|
681
|
-
@cx-input=${this.handleSearchTermInputChange}
|
|
682
|
-
>
|
|
683
|
-
<cx-icon name="search" slot="prefix"></cx-icon>
|
|
684
|
-
</cx-input>
|
|
685
|
-
<cx-folder-select-tree
|
|
686
|
-
base-url=${this.baseUrl}
|
|
687
|
-
extra-folder-id=${this.extraFolderId}
|
|
688
|
-
extra-folder-title=${this.extraFolderTitle}
|
|
689
|
-
min-query-length=${this.minQueryLength}
|
|
690
|
-
search-term=${this.searchTerm}
|
|
691
|
-
selected-value=${this.value}
|
|
692
|
-
selection=${this.selection}
|
|
693
|
-
token=${this.token}
|
|
694
|
-
bearer-token=${this.bearerToken}
|
|
695
|
-
?exclude-virtual-folders=${this.excludeVirtualFolders}
|
|
696
|
-
?see-thru=${this.seeThru}
|
|
697
|
-
.api=${G(this, T)}
|
|
698
|
-
.firstFetchCallback=${this.firstFetchCallback}
|
|
699
|
-
>
|
|
700
|
-
</cx-folder-select-tree>
|
|
701
|
-
`
|
|
702
|
-
],
|
|
703
|
-
[
|
|
704
|
-
F.Select,
|
|
705
|
-
() => f`
|
|
706
|
-
<cx-select
|
|
707
|
-
clearable
|
|
708
|
-
hoist
|
|
709
|
-
lazy
|
|
710
|
-
name=${this.name}
|
|
711
|
-
value=${this.value}
|
|
712
|
-
.form=${this.form}
|
|
713
|
-
?required=${this.required}
|
|
714
|
-
@input=${this.handleSearchTermSelectChange}
|
|
715
|
-
@cx-clear=${this.handleSearchTermSelectChange}
|
|
716
|
-
allow-freetext
|
|
717
|
-
>
|
|
718
|
-
<cx-folder-select-tree
|
|
719
|
-
base-url=${this.baseUrl}
|
|
720
|
-
extra-folder-id=${this.extraFolderId}
|
|
721
|
-
extra-folder-title=${this.extraFolderTitle}
|
|
722
|
-
min-query-length=${this.minQueryLength}
|
|
723
|
-
search-term=${this.searchTerm}
|
|
724
|
-
selected-value=${this.value}
|
|
725
|
-
selection=${this.selection}
|
|
726
|
-
token=${this.token}
|
|
727
|
-
bearer-token=${this.bearerToken}
|
|
728
|
-
?exclude-virtual-folders=${this.excludeVirtualFolders}
|
|
729
|
-
?see-thru=${this.seeThru}
|
|
730
|
-
.api=${G(this, T)}
|
|
731
|
-
.firstFetchCallback=${this.firstFetchCallback}
|
|
732
|
-
>
|
|
733
|
-
</cx-folder-select-tree>
|
|
734
|
-
</cx-select>
|
|
735
|
-
`
|
|
736
|
-
]
|
|
737
|
-
])}
|
|
738
|
-
</div>`;
|
|
739
|
-
}
|
|
740
|
-
};
|
|
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
|
|
748
|
-
};
|
|
749
|
-
o([
|
|
750
|
-
B("cx-select")
|
|
751
|
-
], s.prototype, "selectEl", 2);
|
|
752
|
-
o([
|
|
753
|
-
r({ attribute: "min-query-length", reflect: !0, type: Number })
|
|
754
|
-
], s.prototype, "minQueryLength", 2);
|
|
755
|
-
o([
|
|
756
|
-
r({ attribute: "selection", reflect: !0, type: String })
|
|
757
|
-
], s.prototype, "selection", 2);
|
|
758
|
-
o([
|
|
759
|
-
r({ attribute: "variant", reflect: !0, type: String })
|
|
760
|
-
], s.prototype, "variant", 2);
|
|
761
|
-
o([
|
|
762
|
-
r({ reflect: !0, type: String })
|
|
763
|
-
], s.prototype, "value", 2);
|
|
764
|
-
o([
|
|
765
|
-
r({ reflect: !0, type: String })
|
|
766
|
-
], s.prototype, "name", 2);
|
|
767
|
-
o([
|
|
768
|
-
r({ attribute: "selected-label", reflect: !0, type: String })
|
|
769
|
-
], s.prototype, "selectedLabel", 2);
|
|
770
|
-
o([
|
|
771
|
-
r({ attribute: "base-url", reflect: !0, type: String })
|
|
772
|
-
], s.prototype, "baseUrl", 2);
|
|
773
|
-
o([
|
|
774
|
-
r({ reflect: !0, type: Boolean })
|
|
775
|
-
], s.prototype, "open", 2);
|
|
776
|
-
o([
|
|
777
|
-
r({ reflect: !1, type: String })
|
|
778
|
-
], s.prototype, "token", 2);
|
|
779
|
-
o([
|
|
780
|
-
r({ attribute: "bearer-token", reflect: !0, type: String })
|
|
781
|
-
], s.prototype, "bearerToken", 2);
|
|
782
|
-
o([
|
|
783
|
-
r({ attribute: "see-thru", reflect: !0, type: Boolean })
|
|
784
|
-
], s.prototype, "seeThru", 2);
|
|
785
|
-
o([
|
|
786
|
-
r({ type: Function })
|
|
787
|
-
], s.prototype, "api", 2);
|
|
788
|
-
o([
|
|
789
|
-
r({ reflect: !0, type: Boolean })
|
|
790
|
-
], s.prototype, "required", 2);
|
|
791
|
-
o([
|
|
792
|
-
r({ reflect: !1 })
|
|
793
|
-
], s.prototype, "form", 2);
|
|
794
|
-
o([
|
|
795
|
-
r({
|
|
796
|
-
attribute: "exclude-virtual-folders",
|
|
797
|
-
reflect: !0,
|
|
798
|
-
type: Boolean
|
|
799
|
-
})
|
|
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([
|
|
822
|
-
m("api")
|
|
823
|
-
], s.prototype, "updateWrappedApi", 1);
|
|
824
|
-
o([
|
|
825
|
-
m("searchTerm", { waitUntilFirstUpdate: !0 })
|
|
826
|
-
], s.prototype, "handleSearchTermChange", 1);
|
|
827
|
-
o([
|
|
828
|
-
m("open")
|
|
829
|
-
], s.prototype, "handleOpenChange", 1);
|
|
830
|
-
o([
|
|
831
|
-
m("variant")
|
|
832
|
-
], s.prototype, "handleVariantChange", 1);
|
|
833
|
-
o([
|
|
834
|
-
m("selectedLabel", { waitUntilFirstUpdate: !0 }),
|
|
835
|
-
m("value", { waitUntilFirstUpdate: !0 })
|
|
836
|
-
], s.prototype, "handleValueChange", 1);
|
|
837
|
-
s = o([
|
|
838
|
-
D("cx-folder-select")
|
|
839
|
-
], s);
|
|
840
|
-
export {
|
|
841
|
-
s as C,
|
|
842
|
-
F,
|
|
843
|
-
V as a
|
|
844
|
-
};
|