@orangelogic/design-system 2.60.0 → 2.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/library/apps/cortex/src/types.d.ts +2 -0
  2. package/library/chunks/_baseRest.ClTMQtN1.js +67 -0
  3. package/library/chunks/{_baseUniq.BUihBa8c.js → _baseUniq.Df-fLIBx.js} +53 -56
  4. package/library/chunks/{amazon_s3.DeaMdPPn.js → amazon_s3.BEMtqafk.js} +1 -1
  5. package/library/chunks/animate.El-MpOws.js +37 -0
  6. package/library/chunks/animation-registry.HmpwNuGH.js +34 -0
  7. package/library/chunks/{animation.B7d72NVK.js → animation.DfUHRQry.js} +10 -8
  8. package/library/chunks/array.DCtvHiLS.js +81 -0
  9. package/library/chunks/asset.CG_yXtWK.js +288 -0
  10. package/library/chunks/{browser.Va59Ix3P.js → browser.BHOCIF_A.js} +18 -16
  11. package/library/chunks/{button.CtCSNRB3.js → button.P71VJ5xh.js} +75 -74
  12. package/library/chunks/{button.styles.C8AIO8fd.js → button.styles.Dl5IQLHU.js} +1 -1
  13. package/library/chunks/{capitalize.CNStXZBq.js → capitalize.WSkCXkNE.js} +1 -1
  14. package/library/chunks/{chatbot.sm4Rph1v.js → chatbot.BmpIu59L.js} +2 -2
  15. package/library/chunks/{class-map.CoZTSvbM.js → class-map.BiVq-cVR.js} +1 -1
  16. package/library/chunks/{color-swatch-group.qJevXs50.js → color-swatch-group.DlLmydlB.js} +116 -127
  17. package/library/chunks/color-swatch.Bpb_hW2H.js +407 -0
  18. package/library/chunks/color.vLD2sNTs.js +164 -0
  19. package/library/chunks/{component.styles.CI-v8BZa.js → component.styles.DMSLciL5.js} +1 -1
  20. package/library/chunks/{confirm-popover.D2TF1x6K.js → confirm-popover.C1uA36JR.js} +15 -13
  21. package/library/chunks/{content-builder.WranV3P4.js → content-builder.Bf7kqzDI.js} +1 -1
  22. package/library/chunks/converters.DkDtLstb.js +11 -0
  23. package/library/chunks/{cropper.aA0v16xS.js → cropper.BraEEykE.js} +5004 -5024
  24. package/library/chunks/custom-element.L4WJXn1j.js +14 -0
  25. package/library/chunks/debounce.DaHuiSGU.js +15 -0
  26. package/library/chunks/{default-value.CIKAvD5l.js → default-value.COZopaet.js} +1 -1
  27. package/library/chunks/{dialog.B1TORO6S.js → dialog.C_75RVVz.js} +52 -49
  28. package/library/chunks/{directive-helpers.DBHob-_L.js → directive-helpers.Dm4rc594.js} +1 -1
  29. package/library/chunks/dom.CZrJ64Dm.js +92 -0
  30. package/library/chunks/{dot-pagination.8f2oX_ge.js → dot-pagination.CoCIJsHC.js} +24 -22
  31. package/library/chunks/{endpoints.BgyupJys.js → endpoints.B7lcoc1N.js} +1 -3
  32. package/library/chunks/{file-on-demand.Cwgabdyw.js → file-on-demand.B2jNilAj.js} +1829 -1544
  33. package/library/chunks/{folder-select.DiWCwR-T.js → folder-select.CSEQxIXF.js} +380 -255
  34. package/library/chunks/{form-control.styles.NE2Q-quE.js → form-control.styles.CUGhvlfT.js} +1 -1
  35. package/library/chunks/{form.B8u0ywni.js → form.CO12-VK0.js} +1 -1
  36. package/library/chunks/{guard.BDP4A85K.js → guard.D4axKaMo.js} +1 -1
  37. package/library/chunks/{header.B_FD8uLt.js → header.Bd3G0-oA.js} +11 -9
  38. package/library/chunks/{hub-connection.CxfaT11o.js → hub-connection.BxT2b7Nq.js} +4 -3
  39. package/library/chunks/{i18n.BP2FRO1v.js → i18n.DrzK7TPf.js} +54 -7
  40. package/library/chunks/identity.ByMq8VxU.js +6 -0
  41. package/library/chunks/{if-defined.MfEgpxEN.js → if-defined.BRoBj_Rp.js} +1 -1
  42. package/library/chunks/{iframe.DZm7FiCl.js → iframe.UCj6Ze2A.js} +18 -16
  43. package/library/chunks/{image.Ycf8RudS.js → image.DZCRhE3G.js} +82 -79
  44. package/library/chunks/image.mbpyiQpQ.js +82 -0
  45. package/library/chunks/index.S0wy3rzm.js +373 -0
  46. package/library/chunks/isObjectLike.D3cpZO39.js +81 -0
  47. package/library/chunks/{isSymbol.L0C2ND_U.js → isSymbol.huJ_Cvxt.js} +1 -1
  48. package/library/chunks/lib-cortex-element.CVMmyPMC.js +146 -0
  49. package/library/chunks/{list-editor.COkw5JKG.js → list-editor.CrLntuM7.js} +75 -79
  50. package/library/chunks/{custom-element.vnXBMQxc.js → lit-element.jLBm65_O.js} +123 -277
  51. package/library/chunks/{live.LdB9xEhp.js → live.SCz6M8Gs.js} +2 -2
  52. package/library/chunks/{mailchimp.BjbPJfd-.js → mailchimp.Bs6uJVsf.js} +1 -1
  53. package/library/chunks/{modal.BqNLxgs1.js → modal.U1QltQKe.js} +25 -19
  54. package/library/chunks/{option.D9KJhzHs.js → option.D1u5-cTt.js} +21 -19
  55. package/library/chunks/{orangelogic.BgbQXkBv.js → orangelogic.TdFfoPUN.js} +1 -1
  56. package/library/chunks/{overlayscrollbars.aFuRG5Rs.js → overlayscrollbars.XhGWx9Zk.js} +1 -1
  57. package/library/chunks/{pagination.C2FN4fmO.js → pagination.BI3LONVU.js} +17 -15
  58. package/library/chunks/{ref.BaCjlzLO.js → ref.bzeTdX0K.js} +2 -2
  59. package/library/chunks/{repeat.CauKaXyy.js → repeat.DbF2p5ae.js} +2 -2
  60. package/library/chunks/responsive.CA6dcNiM.js +17 -0
  61. package/library/chunks/{scroll.DwPiX2Ox.js → scroll.xtO5yojm.js} +3 -2
  62. package/library/chunks/{slot.DJLm4Dig.js → slot.j5oheLJC.js} +12 -4
  63. package/library/chunks/{state.Cw55xXlb.js → state.CSDxrqLd.js} +1 -1
  64. package/library/chunks/{static.BjNkqt7_.js → static.UA3G1Deq.js} +1 -1
  65. package/library/chunks/string.Cp_XNbnV.js +160 -0
  66. package/library/chunks/{style-map.CZovMmo_.js → style-map.llVFPd__.js} +1 -1
  67. package/library/chunks/{tab-group.5fLnWflv.js → tab-group.DxSlcWK0.js} +20 -18
  68. package/library/chunks/{table.BAr8KKc6.js → table.CY-iMTWV.js} +457 -505
  69. package/library/chunks/template.CsJd8Pb_.js +20 -0
  70. package/library/chunks/time.D_uFZqqe.js +118 -0
  71. package/library/chunks/{toString.CL_lYXbK.js → toString.CRT5zqEU.js} +3 -3
  72. package/library/chunks/toast.BXNbwZV8.js +25 -0
  73. package/library/chunks/{tree.CUfvIDyA.js → tree.CNbrP8cY.js} +33 -36
  74. package/library/chunks/{typography.BFpl0WMA.js → typography.oDzoLbZS.js} +16 -14
  75. package/library/chunks/{unsafe-html.DyO9_Rsq.js → unsafe-html.Dff7-rCx.js} +1 -1
  76. package/library/chunks/url.LjsR2sB5.js +15 -0
  77. package/library/chunks/user-agent.D9aPuOyL.js +4 -0
  78. package/library/chunks/watch.q1sEjPWL.js +501 -0
  79. package/library/components/alert.js +38 -35
  80. package/library/components/animated-image.js +25 -23
  81. package/library/components/animation.js +7 -5
  82. package/library/components/array-line-clamp.d.ts +3 -0
  83. package/library/components/array-line-clamp.js +195 -0
  84. package/library/components/asset-link-format.js +223 -212
  85. package/library/components/atoms.js +164 -162
  86. package/library/components/avatar.js +28 -26
  87. package/library/components/badge.js +10 -8
  88. package/library/components/bicolor-picker.js +21 -19
  89. package/library/components/border-input-group.js +11 -9
  90. package/library/components/breadcrumb-item.js +14 -12
  91. package/library/components/breadcrumb.js +24 -22
  92. package/library/components/button-group.js +26 -24
  93. package/library/components/button.js +14 -13
  94. package/library/components/card.js +28 -19
  95. package/library/components/checkbox.js +29 -23
  96. package/library/components/color-picker.js +19 -17
  97. package/library/components/color-swatch-group.js +20 -17
  98. package/library/components/color-swatch.js +16 -13
  99. package/library/components/confirm-popover.js +11 -9
  100. package/library/components/copy-button.js +15 -13
  101. package/library/components/corner-position-input-group.js +13 -11
  102. package/library/components/cortex-element.d.ts +3 -0
  103. package/library/components/cortex-element.js +5 -0
  104. package/library/components/cropper.js +7 -5
  105. package/library/components/details.js +23 -20
  106. package/library/components/dialog.js +19 -16
  107. package/library/components/divider.js +13 -11
  108. package/library/components/dot-pagination.js +11 -9
  109. package/library/components/dot-status.js +10 -8
  110. package/library/components/drawer.js +63 -51
  111. package/library/components/dropdown.js +29 -26
  112. package/library/components/dynamic-select.js +12 -10
  113. package/library/components/element-clamp.js +28 -25
  114. package/library/components/file-on-demand.js +21 -20
  115. package/library/components/folder-select.js +12 -10
  116. package/library/components/format-bytes.js +11 -10
  117. package/library/components/format-date.js +11 -9
  118. package/library/components/format-number.js +16 -15
  119. package/library/components/format-time.js +118 -9
  120. package/library/components/grid-item.js +48 -46
  121. package/library/components/grid.js +31 -29
  122. package/library/components/header.js +10 -9
  123. package/library/components/hub-connection.js +6 -5
  124. package/library/components/icon-button.js +20 -18
  125. package/library/components/icon.js +17 -15
  126. package/library/components/iframe.js +10 -8
  127. package/library/components/image-comparer.js +27 -25
  128. package/library/components/image.js +14 -11
  129. package/library/components/include.js +26 -24
  130. package/library/components/input-group.js +15 -13
  131. package/library/components/input.js +23 -21
  132. package/library/components/line-clamp.js +12 -10
  133. package/library/components/list-editor.js +17 -15
  134. package/library/components/markdown.js +80 -78
  135. package/library/components/masonry.js +46 -44
  136. package/library/components/menu-item.js +151 -136
  137. package/library/components/menu-label.js +15 -13
  138. package/library/components/menu-section.js +18 -16
  139. package/library/components/menu.js +10 -8
  140. package/library/components/molecules.js +5 -5
  141. package/library/components/mutation-observer.js +12 -10
  142. package/library/components/option.js +10 -8
  143. package/library/components/organisms.js +2 -2
  144. package/library/components/padding-input-group.js +30 -28
  145. package/library/components/pagination.js +14 -12
  146. package/library/components/popup.js +3296 -9
  147. package/library/components/position-picker.js +12 -10
  148. package/library/components/progress-bar.js +13 -11
  149. package/library/components/progress-ring.js +15 -13
  150. package/library/components/qr-code.js +54 -52
  151. package/library/components/radio-button.js +19 -17
  152. package/library/components/radio-card.js +14 -12
  153. package/library/components/radio-group.js +20 -18
  154. package/library/components/radio.js +15 -13
  155. package/library/components/range.js +25 -23
  156. package/library/components/rating.js +17 -15
  157. package/library/components/relative-time.js +16 -14
  158. package/library/components/resize-observer.js +21 -19
  159. package/library/components/select.js +1442 -25
  160. package/library/components/shadow-input-group.js +19 -17
  161. package/library/components/share-option-list.js +20 -18
  162. package/library/components/sidebar.js +14 -12
  163. package/library/components/size-input-group.js +35 -33
  164. package/library/components/skeleton.js +12 -10
  165. package/library/components/space.js +12 -10
  166. package/library/components/spinner.js +17 -15
  167. package/library/components/split-panel.js +15 -13
  168. package/library/components/step.js +18 -16
  169. package/library/components/stepper-wizard.js +11 -9
  170. package/library/components/stepper.js +13 -11
  171. package/library/components/switch.js +21 -19
  172. package/library/components/tab-group.js +15 -13
  173. package/library/components/tab-panel.js +20 -18
  174. package/library/components/tab.js +18 -16
  175. package/library/components/table.js +69 -67
  176. package/library/components/tag.js +11 -9
  177. package/library/components/textarea.js +20 -18
  178. package/library/components/timecode.js +98 -8
  179. package/library/components/tooltip.js +24 -21
  180. package/library/components/tree-item.js +14 -11
  181. package/library/components/tree.js +12 -10
  182. package/library/components/typeface.js +13 -11
  183. package/library/components/types.js +15487 -15444
  184. package/library/components/typography.js +6 -4
  185. package/library/components/video.js +13 -11
  186. package/library/components/visually-hidden.js +15 -13
  187. package/library/events.d.ts +1 -0
  188. package/library/events.js +1 -0
  189. package/library/package.json +11 -2
  190. package/library/packages/atoms/src/components/array-line-clamp/array-line-clamp.d.ts +45 -0
  191. package/library/packages/atoms/src/components/array-line-clamp/array-line-clamp.styles.d.ts +2 -0
  192. package/library/packages/atoms/src/components/checkbox/checkbox.d.ts +2 -0
  193. package/library/packages/atoms/src/components/drawer/drawer.d.ts +7 -1
  194. package/library/packages/atoms/src/components/include/include.d.ts +1 -0
  195. package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +2 -0
  196. package/library/packages/atoms/src/components/tree/tree.d.ts +0 -4
  197. package/library/packages/atoms/src/index.d.ts +1 -0
  198. package/library/packages/events/src/cx-file-on-demand-load-more.d.ts +8 -0
  199. package/library/packages/events/src/cx-file-on-demand-pin.d.ts +8 -0
  200. package/library/packages/events/src/cx-file-on-demand-unpin.d.ts +8 -0
  201. package/library/packages/events/src/cx-folder-select-search-term-change.d.ts +8 -0
  202. package/library/packages/events/src/cx-share-option-list-item-selected.d.ts +8 -0
  203. package/library/packages/events/src/events.d.ts +6 -2
  204. package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +2 -0
  205. package/library/packages/molecules/src/cropper/cropper.d.ts +1 -0
  206. package/library/packages/molecules/src/cropper/react/Cropper.d.ts +1 -0
  207. package/library/packages/molecules/src/download-format-picker/download-format-picker.d.ts +1 -0
  208. package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +8 -0
  209. package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +1 -0
  210. package/library/packages/molecules/src/folder-select/folder-select.d.ts +6 -1
  211. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +3 -7
  212. package/library/packages/organisms/src/content-builder/styleController.d.ts +8 -8
  213. package/library/packages/organisms/src/file-on-demand/components/file-on-demand-asset/file-on-demand-asset.d.ts +80 -0
  214. package/library/packages/organisms/src/file-on-demand/components/file-on-demand-asset/file-on-demand-asset.styles.d.ts +2 -0
  215. package/library/packages/organisms/src/file-on-demand/components/file-on-demand-pinned-status.ts/file-on-demand-pinned-status.d.ts +44 -0
  216. package/library/packages/organisms/src/file-on-demand/file-on-demand.constants.d.ts +1 -0
  217. package/library/packages/organisms/src/file-on-demand/file-on-demand.d.ts +11 -18
  218. package/library/packages/organisms/src/file-on-demand/file-on-demand.utils.d.ts +6 -0
  219. package/library/packages/services/src/api/folder/folder.d.ts +4 -8
  220. package/library/packages/services/src/api/folder/folder.types.d.ts +2 -1
  221. package/library/packages/types/src/file-on-demand.d.ts +4 -0
  222. package/library/packages/types/src/folder-select.d.ts +9 -2
  223. package/library/packages/utils/src/custom-element/i18n.d.ts +40 -2
  224. package/library/packages/utils/src/drag-scroll/drag-scroll.d.ts +22 -0
  225. package/library/packages/utils/src/drag-scroll/index.d.ts +1 -0
  226. package/library/packages/utils/src/font/font.d.ts +26 -0
  227. package/library/packages/utils/src/font/index.d.ts +1 -0
  228. package/library/packages/utils/src/history-manager/history-manager.d.ts +13 -0
  229. package/library/packages/utils/src/history-manager/index.d.ts +1 -0
  230. package/library/packages/utils/src/index.d.ts +45 -0
  231. package/library/packages/utils/src/template/index.d.ts +1 -0
  232. package/library/packages/utils/src/template/template.d.ts +3 -0
  233. package/library/react-web-component.d.ts +418 -360
  234. package/library/utils.d.ts +1 -0
  235. package/library/utils.js +180 -0
  236. package/package.json +11 -2
  237. package/library/chunks/animation-registry.DavRkTTr.js +0 -69
  238. package/library/chunks/asset.Ba-CxnNM.js +0 -309
  239. package/library/chunks/color-swatch.DUe3iLLo.js +0 -558
  240. package/library/chunks/dom.C0OFx7ND.js +0 -78
  241. package/library/chunks/format-time.BW6-ZWCX.js +0 -226
  242. package/library/chunks/isObjectLike.z36Fu426.js +0 -34
  243. package/library/chunks/popup._w5T7x8f.js +0 -3307
  244. package/library/chunks/select.DfO4de04.js +0 -1441
  245. package/library/chunks/string.BCk3SmdZ.js +0 -144
  246. package/library/chunks/timecode.D7XTiQ_3.js +0 -105
  247. package/library/chunks/watch.BCJD77bD.js +0 -547
  248. package/library/packages/events/src/cx-load-more.d.ts +0 -8
@@ -1,105 +1,111 @@
1
- import G from "../components/icon.js";
2
- import Z from "../components/input.js";
3
- import { C as J } from "./select.DfO4de04.js";
4
- import { C as x, a as K } from "./tree.CUfvIDyA.js";
5
- import { n as r, C as I, x as f, c as w, i as X } from "./custom-element.vnXBMQxc.js";
6
- import { h as k, F as Y, b as A } from "./endpoints.BgyupJys.js";
7
- import { c as R } from "./component.styles.CI-v8BZa.js";
8
- import { L as V } from "./i18n.BP2FRO1v.js";
9
- import { w as m } from "./watch.BCJD77bD.js";
10
- import { r as y } from "./state.Cw55xXlb.js";
1
+ import A from "../components/icon.js";
2
+ import X from "../components/input.js";
3
+ import Y from "../components/select.js";
4
+ import { C as $, a as ee } from "./tree.CNbrP8cY.js";
5
+ import { n as r, C as O } from "./lib-cortex-element.CVMmyPMC.js";
6
+ import { h as I, F as te, b as re } from "./endpoints.B7lcoc1N.js";
7
+ import { c as R } from "./component.styles.DMSLciL5.js";
8
+ import { c as D } from "./custom-element.L4WJXn1j.js";
9
+ import { L as w } from "./i18n.DrzK7TPf.js";
10
+ import { w as m } from "./watch.q1sEjPWL.js";
11
+ import { x as f, i as ae } from "./lit-element.jLBm65_O.js";
12
+ import { r as x } from "./state.CSDxrqLd.js";
11
13
  import { e as B } from "./query.BBf1UFkC.js";
12
- import { r as ee } from "./choose.BTbF6BAn.js";
13
- import { C as q } from "./button.CtCSNRB3.js";
14
- import { d as te } from "./popup._w5T7x8f.js";
15
- import { o as S } from "./if-defined.MfEgpxEN.js";
16
- import { c as W } from "./repeat.CauKaXyy.js";
17
- import { n as O } from "./when.Dr1es41R.js";
18
- import re from "../components/line-clamp.js";
19
- import se from "../components/space.js";
20
- import { M } from "./asset-link-format.BSRDqHg7.js";
21
- import { e as ae } from "./class-map.CoZTSvbM.js";
22
- 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))(v || {});
23
- const le = 50;
24
- async function U({
14
+ import { r as se } from "./choose.BTbF6BAn.js";
15
+ import { C as W } from "./button.P71VJ5xh.js";
16
+ import { d as le } from "./debounce.DaHuiSGU.js";
17
+ import { o as y } from "./if-defined.BRoBj_Rp.js";
18
+ import { c as q } from "./repeat.DbF2p5ae.js";
19
+ import { n as C } from "./when.Dr1es41R.js";
20
+ import ie from "../components/line-clamp.js";
21
+ import oe from "../components/space.js";
22
+ import { M as P } from "./asset-link-format.BSRDqHg7.js";
23
+ import { g as ne } from "./template.CsJd8Pb_.js";
24
+ import { e as ce } from "./class-map.BiVq-cVR.js";
25
+ var v = /* @__PURE__ */ ((e) => (e.CortexPath = "Document.CortexPath", e.DocType = "CoreField.DocType", e.HasBrowserChildren = "Document.HasBrowserChildren", e.RepresentativeAssetId = "Document.DocumentDirectRepresentativeRID", e.TitleWithFallback = "CoreField.TitleWithFallback", e.rawDocSubtype = "Document.RawDocSubType", e))(v || {});
26
+ const he = 50;
27
+ async function V({
25
28
  allowedFolders: e,
26
29
  baseUrl: t,
27
- bearerToken: s,
28
- excludeVirtualFolders: l,
29
- folderId: a,
30
- limit: u = le,
31
- searchTerm: d,
32
- self: L,
33
- start: E = 0,
34
- token: N
30
+ bearerToken: a,
31
+ excludeVirtualFolders: i,
32
+ folderId: l,
33
+ includeDirectChild: p,
34
+ limit: u = he,
35
+ searchTerm: U,
36
+ self: E,
37
+ start: M = 0,
38
+ token: Z
35
39
  }) {
36
- let _ = [], P = !0;
37
- e && e.length > 0 && !a ? (_ = e, L = !0, P = !1) : a && (_ = [a]);
40
+ let k = [], L = p ?? !0;
41
+ e && e.length > 0 && !l ? (k = e, E = !0, L = !1) : l && (k = [l]);
38
42
  try {
39
- return (await k.request({
43
+ return (await I.request({
40
44
  baseURL: t,
41
45
  headers: {
42
- Authorization: `Bearer ${s}`
46
+ Authorization: `Bearer ${a}`
43
47
  },
44
48
  method: "GET",
45
49
  params: {
46
- IncludeDirectChild: P,
47
- IncludeVirtualFolders: !l,
50
+ IncludeDirectChild: L,
51
+ IncludeVirtualFolders: !i,
48
52
  Limit: u,
49
- ObjectRecordIDs: _,
50
- SeeThru: !!d,
51
- Self: L,
52
- Start: E,
53
- Text: d || void 0,
54
- Token: N || void 0
53
+ ObjectRecordIDs: k,
54
+ SeeThru: !!U,
55
+ Self: E,
56
+ Start: M,
57
+ Text: U || void 0,
58
+ Token: Z || void 0
55
59
  },
56
60
  paramsSerializer: {
57
61
  indexes: null
58
62
  },
59
63
  responseType: "json",
60
64
  transformResponse: [
61
- ...Array.isArray(k.defaults.transformResponse) ? k.defaults.transformResponse : [],
62
- ($, fe, F) => {
63
- if (F !== void 0 && (F < 200 || F >= 300))
65
+ ...Array.isArray(I.defaults.transformResponse) ? I.defaults.transformResponse : [],
66
+ (g, Te, _) => {
67
+ if (_ !== void 0 && (_ < 200 || _ >= 300))
64
68
  return {
65
69
  data: [],
66
- hasMore: !1
70
+ hasMore: !1,
71
+ totalCount: 0
67
72
  };
68
- if (!$ || typeof $ != "object")
73
+ if (!g || typeof g != "object")
69
74
  throw new Error("Invalid response format");
70
- const H = $.contentItems?.length ?? 0;
75
+ const K = g.contentItems?.length ?? 0;
71
76
  return {
72
- data: $.contentItems?.map((b) => ({
77
+ data: g.contentItems?.map((b) => ({
73
78
  docType: b.fields[v.DocType] ?? "",
74
79
  fullPath: b.fields[v.CortexPath] ?? "",
75
80
  hasChildren: b.fields[v.HasBrowserChildren] === "1",
76
81
  id: b.recordID,
82
+ isShared: b.fields[v.rawDocSubtype] === "DO_OR1ND000001913488",
77
83
  representativeAssetId: b.fields[v.RepresentativeAssetId] ?? "",
78
84
  title: b.fields[v.TitleWithFallback] ?? ""
79
85
  })) ?? [],
80
- hasMore: E + H < $.totalCount
86
+ hasMore: M + K < g.totalCount,
87
+ totalCount: g.totalCount
81
88
  };
82
89
  }
83
90
  ],
84
- url: Y
91
+ url: te
85
92
  })).data;
86
- } catch (T) {
87
- if (T instanceof A && T.response?.status === 401)
88
- throw T;
93
+ } catch {
89
94
  return {
90
95
  data: [],
91
- hasMore: !1
96
+ hasMore: !1,
97
+ totalCount: 0
92
98
  };
93
99
  }
94
100
  }
95
- var C = /* @__PURE__ */ ((e) => (e.Input = "input", e.Select = "select", e))(C || {}), ie = Object.defineProperty, oe = Object.getOwnPropertyDescriptor, c = (e, t, s, l) => {
96
- for (var a = l > 1 ? void 0 : l ? oe(t, s) : t, u = e.length - 1, d; u >= 0; u--)
97
- (d = e[u]) && (a = (l ? d(t, s, a) : d(a)) || a);
98
- return l && a && ie(t, s, a), a;
101
+ var F = /* @__PURE__ */ ((e) => (e.Input = "input", e.Select = "select", e))(F || {}), de = Object.defineProperty, pe = Object.getOwnPropertyDescriptor, d = (e, t, a, i) => {
102
+ for (var l = i > 1 ? void 0 : i ? pe(t, a) : t, p = e.length - 1, u; p >= 0; p--)
103
+ (u = e[p]) && (l = (i ? u(t, a, l) : u(l)) || l);
104
+ return i && l && de(t, a, l), l;
99
105
  };
100
- let o = class extends I {
106
+ let n = class extends O {
101
107
  constructor() {
102
- super(...arguments), this.localize = new V(this), this.role = "treeitem", this.folderId = "", this.hasChildren = !1, this.fullPath = "", this.docType = M.Story, this.name = "", this.representativeAssetId = "", this.selectedValue = "", this.token = "", this.bearerToken = "", this.baseUrl = "", this.api = U, this.excludeVirtualFolders = !1, this.url = "", this.data = null, this.hasMore = !1, this.loading = !1;
108
+ super(...arguments), this.localize = new w(this), this.role = "treeitem", this.folderId = "", this.hasChildren = !1, this.fullPath = "", this.docType = P.Story, this.name = "", this.representativeAssetId = "", this.selectedValue = "", this.token = "", this.bearerToken = "", this.baseUrl = "", this.searchTerm = "", this.api = V, this.excludeVirtualFolders = !1, this.url = "", this.data = null, this.hasMore = !1, this.loading = !1;
103
109
  }
104
110
  /**
105
111
  * This is used to render the cx-tree-item inside the cx-folder-item without the shadow root so that the cx-tree can query select the cx-tree-item inside
@@ -114,7 +120,7 @@ let o = class extends I {
114
120
  if (!this.api)
115
121
  return { data: [], hasMore: !1 };
116
122
  try {
117
- const { data: s, hasMore: l } = await this.api({
123
+ const { data: a, hasMore: i } = await this.api({
118
124
  baseUrl: this.baseUrl,
119
125
  bearerToken: this.bearerToken,
120
126
  excludeVirtualFolders: this.excludeVirtualFolders,
@@ -122,7 +128,7 @@ let o = class extends I {
122
128
  start: t,
123
129
  token: this.token
124
130
  });
125
- return { data: s, hasMore: l };
131
+ return { data: a, hasMore: i };
126
132
  } catch {
127
133
  return { data: [], hasMore: !1 };
128
134
  }
@@ -132,11 +138,11 @@ let o = class extends I {
132
138
  const t = this.data?.length || 0;
133
139
  this.loading = !0;
134
140
  try {
135
- const { data: s, hasMore: l } = await this.fetchFolders({
141
+ const { data: a, hasMore: i } = await this.fetchFolders({
136
142
  folderId: this.folderId,
137
143
  start: t
138
144
  });
139
- this.data = [...this.data || [], ...s], this.hasMore = l;
145
+ this.data = [...this.data || [], ...a], this.hasMore = i;
140
146
  } catch {
141
147
  } finally {
142
148
  this.loading = !1;
@@ -146,11 +152,11 @@ let o = class extends I {
146
152
  e.stopPropagation(), this.treeItem.expanded = !0;
147
153
  const t = this.data?.length || 0;
148
154
  try {
149
- const { data: s, hasMore: l } = await this.fetchFolders({
155
+ const { data: a, hasMore: i } = await this.fetchFolders({
150
156
  folderId: this.folderId,
151
157
  start: t
152
158
  });
153
- this.data = s, this.hasMore = l;
159
+ this.data = a, this.hasMore = i;
154
160
  } catch {
155
161
  this.treeItem.expanded = !1;
156
162
  }
@@ -158,13 +164,13 @@ let o = class extends I {
158
164
  render() {
159
165
  return f`
160
166
  <cx-tree-item
161
- class=${ae({
167
+ class=${ce({
162
168
  "folder-select-tree-item": !0
163
169
  })}
164
170
  data-id=${this.folderId}
165
- data-url=${S(this.url)}
166
- data-name=${S(this.name?.trim() || void 0)}
167
- data-representative-asset-id=${S(
171
+ data-url=${y(this.url)}
172
+ data-name=${y(this.name?.trim() || void 0)}
173
+ data-representative-asset-id=${y(
168
174
  this.representativeAssetId || void 0
169
175
  )}
170
176
  role="option"
@@ -182,13 +188,13 @@ let o = class extends I {
182
188
  <cx-icon
183
189
  class="folder-select-tree__item__icon"
184
190
  name="folder"
185
- variant=${this.docType === M.Album ? "outlined" : "filled"}
191
+ variant=${this.docType === P.Album ? "outlined" : "filled"}
186
192
  ></cx-icon>
187
193
  <cx-line-clamp lines="1" class="folder-select-tree-item__title">
188
- ${this.name}
194
+ ${ne(this.name, this.searchTerm)}
189
195
  </cx-line-clamp>
190
196
  </cx-space>
191
- ${W(
197
+ ${q(
192
198
  this.data || [],
193
199
  (e) => e.id,
194
200
  (e) => f`<cx-folder-select-tree-item
@@ -203,13 +209,13 @@ let o = class extends I {
203
209
  ?exclude-virtual-folders=${this.excludeVirtualFolders}
204
210
  ?has-children=${e.hasChildren}
205
211
  base-url=${this.baseUrl}
206
- url=${S(e.url ?? void 0)}
212
+ url=${y(e.url ?? void 0)}
207
213
  .api=${this.api}
208
214
  value=${e.url}
209
215
  ></cx-folder-select-tree-item>`
210
216
  )}
211
217
  </cx-tree-item>
212
- ${O(
218
+ ${C(
213
219
  this.hasMore,
214
220
  () => f`
215
221
  <div slot="children" class="load-more-button">
@@ -226,84 +232,89 @@ let o = class extends I {
226
232
  `;
227
233
  }
228
234
  };
229
- o.styles = [R];
230
- o.dependencies = {
231
- "cx-button": q,
232
- "cx-icon": G,
233
- "cx-line-clamp": re,
234
- "cx-space": se,
235
- "cx-tree-item": x
235
+ n.styles = [R];
236
+ n.dependencies = {
237
+ "cx-button": W,
238
+ "cx-icon": A,
239
+ "cx-line-clamp": ie,
240
+ "cx-space": oe,
241
+ "cx-tree-item": $
236
242
  };
237
- c([
243
+ d([
238
244
  B("cx-tree-item")
239
- ], o.prototype, "treeItem", 2);
240
- c([
245
+ ], n.prototype, "treeItem", 2);
246
+ d([
241
247
  r({ attribute: "folder-id", reflect: !0, type: String })
242
- ], o.prototype, "folderId", 2);
243
- c([
248
+ ], n.prototype, "folderId", 2);
249
+ d([
244
250
  r({ attribute: "has-children", reflect: !0, type: Boolean })
245
- ], o.prototype, "hasChildren", 2);
246
- c([
251
+ ], n.prototype, "hasChildren", 2);
252
+ d([
247
253
  r({ attribute: "full-path", reflect: !0, type: String })
248
- ], o.prototype, "fullPath", 2);
249
- c([
254
+ ], n.prototype, "fullPath", 2);
255
+ d([
250
256
  r({ attribute: "doc-type", reflect: !0, type: String })
251
- ], o.prototype, "docType", 2);
252
- c([
257
+ ], n.prototype, "docType", 2);
258
+ d([
253
259
  r({ reflect: !0, type: String })
254
- ], o.prototype, "name", 2);
255
- c([
260
+ ], n.prototype, "name", 2);
261
+ d([
256
262
  r({
257
263
  attribute: "representative-asset-id",
258
264
  reflect: !0,
259
265
  type: String
260
266
  })
261
- ], o.prototype, "representativeAssetId", 2);
262
- c([
267
+ ], n.prototype, "representativeAssetId", 2);
268
+ d([
263
269
  r({ attribute: "selected-value", reflect: !0, type: String })
264
- ], o.prototype, "selectedValue", 2);
265
- c([
270
+ ], n.prototype, "selectedValue", 2);
271
+ d([
266
272
  r({ reflect: !0, type: String })
267
- ], o.prototype, "token", 2);
268
- c([
273
+ ], n.prototype, "token", 2);
274
+ d([
269
275
  r({ attribute: "bearer-token", reflect: !0, type: String })
270
- ], o.prototype, "bearerToken", 2);
271
- c([
276
+ ], n.prototype, "bearerToken", 2);
277
+ d([
272
278
  r({ attribute: "base-url", reflect: !0, type: String })
273
- ], o.prototype, "baseUrl", 2);
274
- c([
279
+ ], n.prototype, "baseUrl", 2);
280
+ d([
281
+ r({ attribute: "search-term", reflect: !0, type: String })
282
+ ], n.prototype, "searchTerm", 2);
283
+ d([
275
284
  r({ type: Function })
276
- ], o.prototype, "api", 2);
277
- c([
285
+ ], n.prototype, "api", 2);
286
+ d([
278
287
  r({
279
288
  attribute: "exclude-virtual-folders",
280
289
  reflect: !0,
281
290
  type: Boolean
282
291
  })
283
- ], o.prototype, "excludeVirtualFolders", 2);
284
- c([
292
+ ], n.prototype, "excludeVirtualFolders", 2);
293
+ d([
285
294
  r({ reflect: !0, type: String })
286
- ], o.prototype, "url", 2);
287
- c([
288
- y()
289
- ], o.prototype, "data", 2);
290
- c([
291
- y()
292
- ], o.prototype, "hasMore", 2);
293
- c([
294
- y()
295
- ], o.prototype, "loading", 2);
296
- o = c([
297
- w("cx-folder-select-tree-item")
298
- ], o);
299
- var ne = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, p = (e, t, s, l) => {
300
- for (var a = l > 1 ? void 0 : l ? ce(t, s) : t, u = e.length - 1, d; u >= 0; u--)
301
- (d = e[u]) && (a = (l ? d(t, s, a) : d(a)) || a);
302
- return l && a && ne(t, s, a), a;
303
- };
304
- let h = class extends I {
295
+ ], n.prototype, "url", 2);
296
+ d([
297
+ x()
298
+ ], n.prototype, "data", 2);
299
+ d([
300
+ x()
301
+ ], n.prototype, "hasMore", 2);
302
+ d([
303
+ x()
304
+ ], n.prototype, "loading", 2);
305
+ n = d([
306
+ D("cx-folder-select-tree-item")
307
+ ], n);
308
+ var ue = Object.defineProperty, fe = Object.getOwnPropertyDescriptor, Q = (e) => {
309
+ throw TypeError(e);
310
+ }, h = (e, t, a, i) => {
311
+ for (var l = i > 1 ? void 0 : i ? fe(t, a) : t, p = e.length - 1, u; p >= 0; p--)
312
+ (u = e[p]) && (l = (i ? u(t, a, l) : u(l)) || l);
313
+ return i && l && ue(t, a, l), l;
314
+ }, N = (e, t, a) => t.has(e) || Q("Cannot " + a), me = (e, t, a) => (N(e, t, "read from private field"), t.get(e)), ye = (e, t, a) => t.has(e) ? Q("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, a), xe = (e, t, a, i) => (N(e, t, "write to private field"), t.set(e, a), a), S;
315
+ let c = class extends O {
305
316
  constructor() {
306
- super(...arguments), this.localize = new V(this), this.minQueryLength = 1, this.selection = "single", this.searchTerm = "", this.selectedValue = "", this.token = "", this.bearerToken = "", this.baseUrl = "", this.api = U, this.excludeVirtualFolders = !1, this.data = [], this.hasMore = !1, this.loading = !1;
317
+ super(...arguments), this.localize = new w(this), this.minQueryLength = 1, this.selection = "single", this.searchTerm = "", this.selectedValue = "", this.token = "", this.bearerToken = "", this.baseUrl = "", this.extraFolderId = "", this.extraFolderTitle = "", this.seeThru = !1, this.extraFolderData = null, this.api = V, this.excludeVirtualFolders = !1, this.firstFetchCallback = null, this.data = [], this.hasMore = !1, this.loading = !1, ye(this, S, !1);
307
318
  }
308
319
  get empty() {
309
320
  return !this.loading && this.data.length === 0;
@@ -317,27 +328,60 @@ let h = class extends I {
317
328
  runFirstUpdated() {
318
329
  this.searchTerm = "", this.handleFetchFolders();
319
330
  }
331
+ async handleExtraFolderIdChange() {
332
+ if (!this.extraFolderId || !this.api) {
333
+ this.extraFolderData = null;
334
+ return;
335
+ }
336
+ const { data: e } = await this.api({
337
+ baseUrl: this.baseUrl,
338
+ bearerToken: this.bearerToken,
339
+ excludeVirtualFolders: this.excludeVirtualFolders,
340
+ folderId: this.extraFolderId,
341
+ includeDirectChild: !1,
342
+ limit: 1,
343
+ searchTerm: this.searchTerm,
344
+ seeThru: this.seeThru,
345
+ self: !0,
346
+ start: 0,
347
+ token: this.token
348
+ });
349
+ this.extraFolderData = e[0] ?? null;
350
+ }
320
351
  async loadMore(e) {
321
352
  if (!this.api)
322
353
  return;
323
354
  e.stopPropagation();
324
355
  const t = this.data.length;
325
356
  this.loading = !0;
326
- const { data: s, hasMore: l } = await this.api({
357
+ const { data: a, hasMore: i } = await this.api({
327
358
  baseUrl: this.baseUrl,
328
359
  bearerToken: this.bearerToken,
329
360
  excludeVirtualFolders: this.excludeVirtualFolders,
330
361
  folderId: "",
331
362
  limit: 10,
332
363
  searchTerm: this.searchTerm,
364
+ seeThru: this.seeThru,
333
365
  start: t,
334
366
  token: this.token
335
367
  });
336
- this.data = [...this.data, ...s], this.hasMore = l, this.loading = !1;
368
+ this.data = [...this.data, ...a], this.hasMore = i, this.loading = !1;
337
369
  }
338
370
  async handleFetchFolders() {
339
- if (!this.api || this.searchTerm.length > 0 && this.searchTerm.length < this.minQueryLength)
340
- return;
371
+ const { data: e, hasMore: t } = await this.fetchFolders();
372
+ me(this, S) || e.length > 0 && (this.firstFetchCallback?.(e), xe(this, S, !0)), this.data = e, this.hasMore = t, this.loading = !1;
373
+ }
374
+ async fetchFolders() {
375
+ if (!this.api)
376
+ return {
377
+ data: [],
378
+ hasMore: !1
379
+ };
380
+ if (this.searchTerm.length > 0 && this.searchTerm.length < this.minQueryLength)
381
+ return {
382
+ data: [],
383
+ hasMore: !1
384
+ };
341
385
  this.loading = !0;
342
386
  const { data: e, hasMore: t } = await this.api({
343
387
  baseUrl: this.baseUrl,
@@ -346,10 +390,14 @@ let h = class extends I {
346
390
  folderId: "",
347
391
  limit: 10,
348
392
  searchTerm: this.searchTerm,
393
+ seeThru: this.seeThru,
349
394
  start: 0,
350
395
  token: this.token
351
396
  });
352
- this.data = e, this.hasMore = t, this.loading = !1;
397
+ return this.data = e, this.hasMore = t, this.loading = !1, {
398
+ data: e,
399
+ hasMore: t
400
+ };
353
401
  }
354
402
  renderFolder(e) {
355
403
  return f`<cx-folder-select-tree-item
@@ -357,12 +405,13 @@ let h = class extends I {
357
405
  base-url=${this.baseUrl}
358
406
  doc-type=${e.docType}
359
407
  folder-id=${e.id}
360
- full-path=${e.fullPath}
408
+ full-path=${y(e.fullPath ?? void 0)}
361
409
  name=${e.title}
410
+ search-term=${this.searchTerm}
362
411
  selected-value=${this.selectedValue}
363
412
  token=${this.token}
364
413
  bearer-token=${this.bearerToken}
365
- url=${S(e.url ?? void 0)}
414
+ url=${y(e.url ?? void 0)}
366
415
  ?has-children=${e.hasChildren}
367
416
  ?exclude-virtual-folders=${this.excludeVirtualFolders}
368
417
  ></cx-folder-select-tree-item>`;
@@ -375,7 +424,7 @@ let h = class extends I {
375
424
  disabled-auto-expand
376
425
  disabled-sync-checkboxes
377
426
  >
378
- ${O(
427
+ ${C(
379
428
  this.empty,
380
429
  () => f`<div
381
430
  class="folder-select-tree__empty-message"
@@ -387,12 +436,30 @@ let h = class extends I {
387
436
  </cx-typography>
388
437
  </div>`
389
438
  )}
390
- ${W(
439
+ ${C(
440
+ this.extraFolderData,
441
+ () => f`<cx-folder-select-tree-item
442
+ .api=${this.api}
443
+ base-url=${this.baseUrl}
444
+ doc-type=${y(this.extraFolderData?.docType ?? void 0)}
445
+ folder-id=${y(this.extraFolderData?.id ?? void 0)}
446
+ full-path=${y(this.extraFolderData?.fullPath ?? void 0)}
447
+ name=${this.extraFolderTitle || this.extraFolderData?.title}
448
+ search-term=${this.searchTerm}
449
+ selected-value=${this.selectedValue}
450
+ token=${this.token}
451
+ bearer-token=${this.bearerToken}
452
+ url=${y(this.extraFolderData?.url ?? void 0)}
453
+ ?has-children=${this.extraFolderData?.hasChildren}
454
+ ?exclude-virtual-folders=${this.excludeVirtualFolders}
455
+ ></cx-folder-select-tree-item>`
456
+ )}
457
+ ${q(
391
458
  this.data,
392
459
  (e) => e.id,
393
460
  (e) => this.renderFolder(e)
394
461
  )}
395
- ${O(
462
+ ${C(
396
463
  this.hasMore,
397
464
  () => f`
398
465
  <cx-button
@@ -408,62 +475,81 @@ let h = class extends I {
408
475
  </cx-tree>`;
409
476
  }
410
477
  };
411
- h.dependencies = {
412
- "cx-button": q,
413
- "cx-folder-select-tree-item": o,
414
- "cx-tree": K
478
+ S = /* @__PURE__ */ new WeakMap();
479
+ c.dependencies = {
480
+ "cx-button": W,
481
+ "cx-folder-select-tree-item": n,
482
+ "cx-tree": ee
415
483
  };
416
- p([
484
+ h([
417
485
  r({ attribute: "min-query-length", reflect: !0, type: Number })
418
- ], h.prototype, "minQueryLength", 2);
419
- p([
486
+ ], c.prototype, "minQueryLength", 2);
487
+ h([
420
488
  r({ attribute: "selection", reflect: !0, type: String })
421
- ], h.prototype, "selection", 2);
422
- p([
489
+ ], c.prototype, "selection", 2);
490
+ h([
423
491
  r({ attribute: "search-term", reflect: !0, type: String })
424
- ], h.prototype, "searchTerm", 2);
425
- p([
492
+ ], c.prototype, "searchTerm", 2);
493
+ h([
426
494
  r({ attribute: "selected-value", reflect: !0, type: String })
427
- ], h.prototype, "selectedValue", 2);
428
- p([
495
+ ], c.prototype, "selectedValue", 2);
496
+ h([
429
497
  r({ reflect: !0, type: String })
430
- ], h.prototype, "token", 2);
431
- p([
498
+ ], c.prototype, "token", 2);
499
+ h([
432
500
  r({ attribute: "bearer-token", reflect: !0, type: String })
433
- ], h.prototype, "bearerToken", 2);
434
- p([
501
+ ], c.prototype, "bearerToken", 2);
502
+ h([
435
503
  r({ attribute: "base-url", reflect: !0, type: String })
436
- ], h.prototype, "baseUrl", 2);
437
- p([
504
+ ], c.prototype, "baseUrl", 2);
505
+ h([
506
+ r({ attribute: "extra-folder-id", reflect: !0, type: String })
507
+ ], c.prototype, "extraFolderId", 2);
508
+ h([
509
+ r({ attribute: "extra-folder-title", reflect: !0, type: String })
510
+ ], c.prototype, "extraFolderTitle", 2);
511
+ h([
512
+ r({ attribute: "see-thru", reflect: !0, type: Boolean })
513
+ ], c.prototype, "seeThru", 2);
514
+ h([
515
+ x()
516
+ ], c.prototype, "extraFolderData", 2);
517
+ h([
438
518
  r({ type: Function })
439
- ], h.prototype, "api", 2);
440
- p([
519
+ ], c.prototype, "api", 2);
520
+ h([
441
521
  r({
442
522
  attribute: "exclude-virtual-folders",
443
523
  reflect: !0,
444
524
  type: Boolean
445
525
  })
446
- ], h.prototype, "excludeVirtualFolders", 2);
447
- p([
448
- y()
449
- ], h.prototype, "data", 2);
450
- p([
451
- y()
452
- ], h.prototype, "hasMore", 2);
453
- p([
454
- y()
455
- ], h.prototype, "loading", 2);
456
- p([
526
+ ], c.prototype, "excludeVirtualFolders", 2);
527
+ h([
528
+ r({ attribute: "first-fetch-callback", reflect: !1, type: Function })
529
+ ], c.prototype, "firstFetchCallback", 2);
530
+ h([
531
+ x()
532
+ ], c.prototype, "data", 2);
533
+ h([
534
+ x()
535
+ ], c.prototype, "hasMore", 2);
536
+ h([
537
+ x()
538
+ ], c.prototype, "loading", 2);
539
+ h([
540
+ m("extraFolderId")
541
+ ], c.prototype, "handleExtraFolderIdChange", 1);
542
+ h([
457
543
  m("baseUrl", { waitUntilFirstUpdate: !0 }),
458
544
  m("token", { waitUntilFirstUpdate: !0 }),
459
545
  m("searchTerm", { waitUntilFirstUpdate: !0 }),
460
546
  m("excludeVirtualFolders", { waitUntilFirstUpdate: !0 }),
461
- te(500)
462
- ], h.prototype, "handleFetchFolders", 1);
463
- h = p([
464
- w("cx-folder-select-tree")
465
- ], h);
466
- const he = X`
547
+ le(500)
548
+ ], c.prototype, "handleFetchFolders", 1);
549
+ c = h([
550
+ D("cx-folder-select-tree")
551
+ ], c);
552
+ const be = ae`
467
553
  :host {
468
554
  display: block;
469
555
  width: 100%;
@@ -472,6 +558,7 @@ const he = X`
472
558
  .folder-select {
473
559
  display: flex;
474
560
  flex-direction: column;
561
+ gap: var(--cx-spacing-x-small);
475
562
  }
476
563
 
477
564
  .folder-select-tree {
@@ -503,27 +590,34 @@ const he = X`
503
590
  overflow: hidden;
504
591
  }
505
592
  `;
506
- var de = Object.defineProperty, pe = Object.getOwnPropertyDescriptor, Q = (e) => {
593
+ var ve = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, H = (e) => {
507
594
  throw TypeError(e);
508
- }, n = (e, t, s, l) => {
509
- for (var a = l > 1 ? void 0 : l ? pe(t, s) : t, u = e.length - 1, d; u >= 0; u--)
510
- (d = e[u]) && (a = (l ? d(t, s, a) : d(a)) || a);
511
- return l && a && de(t, s, a), a;
512
- }, j = (e, t, s) => t.has(e) || Q("Cannot " + s), D = (e, t, s) => (j(e, t, "read from private field"), s ? s.call(e) : t.get(e)), ue = (e, t, s) => t.has(e) ? Q("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), z = (e, t, s, l) => (j(e, t, "write to private field"), t.set(e, s), s), g;
513
- let i = class extends I {
595
+ }, o = (e, t, a, i) => {
596
+ for (var l = i > 1 ? void 0 : i ? ge(t, a) : t, p = e.length - 1, u; p >= 0; p--)
597
+ (u = e[p]) && (l = (i ? u(t, a, l) : u(l)) || l);
598
+ return i && l && ve(t, a, l), l;
599
+ }, j = (e, t, a) => t.has(e) || H("Cannot " + a), G = (e, t, a) => (j(e, t, "read from private field"), a ? a.call(e) : t.get(e)), $e = (e, t, a) => t.has(e) ? H("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, a), z = (e, t, a, i) => (j(e, t, "write to private field"), t.set(e, a), a), T;
600
+ let s = class extends O {
514
601
  constructor() {
515
- super(), this.localize = new V(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.api = U, this.required = !1, this.form = void 0, this.excludeVirtualFolders = !1, this.searchTerm = "", ue(this, g), 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();
602
+ super(), this.localize = new w(this), this.minQueryLength = 1, this.selection = "single", this.variant = F.Input, this.value = "", this.name = "", this.selectedLabel = "", this.baseUrl = "", this.open = !1, this.token = "", this.bearerToken = "", this.seeThru = !1, this.api = V, this.required = !1, this.form = void 0, this.excludeVirtualFolders = !1, this.extraFolderId = "", this.extraFolderTitle = "", this.firstFetchCallback = null, this.searchTerm = "", $e(this, T), this.selectGetOptionValue = this.selectGetOptionValue.bind(this), this.selectGetOptionLabel = this.selectGetOptionLabel.bind(this), this.selectGetOptionSelected = this.selectGetOptionSelected.bind(this), this.selectFilterCallback = this.selectFilterCallback.bind(this), this.selectSetOptionSelected = this.selectSetOptionSelected.bind(this), this.updateWrappedApi();
516
603
  }
517
604
  updateWrappedApi() {
518
605
  if (!this.api) {
519
- z(this, g, void 0);
606
+ z(this, T, void 0);
520
607
  return;
521
608
  }
522
- z(this, g, async (e) => {
609
+ z(this, T, async (e) => {
523
610
  try {
524
611
  return await this.api(e);
525
612
  } catch (t) {
526
- return t instanceof A && t.response?.status === 401 && this.emit("cx-renew-token"), { data: [], hasMore: !1 };
613
+ return t instanceof re && t.response?.status === 401 && this.emit("cx-renew-token"), { data: [], hasMore: !1, totalCount: 0 };
614
+ }
615
+ });
616
+ }
617
+ handleSearchTermChange() {
618
+ this.emit("cx-folder-select-search-term-change", {
619
+ detail: {
620
+ value: this.searchTerm
527
621
  }
528
622
  });
529
623
  }
@@ -534,20 +628,20 @@ let i = class extends I {
534
628
  this.searchTerm = e.target.displayInput.value;
535
629
  }
536
630
  selectGetOptionValue(e) {
537
- return !e || !(e instanceof x) ? this.value : e.dataset.id || this.value;
631
+ return !e || !(e instanceof $) ? this.value : e.dataset.id || this.value;
538
632
  }
539
633
  selectGetOptionLabel(e) {
540
- return !e || !(e instanceof x) ? this.selectedLabel : e.dataset.name || this.selectedLabel;
634
+ return !e || !(e instanceof $) ? this.selectedLabel : e.dataset.name || this.selectedLabel;
541
635
  }
542
636
  selectGetOptionSelected(e) {
543
- if (!(!e || !(e instanceof x)))
637
+ if (!(!e || !(e instanceof $)))
544
638
  return e.selected;
545
639
  }
546
640
  selectFilterCallback(e) {
547
- return !(!e || !(e instanceof x));
641
+ return !(!e || !(e instanceof $));
548
642
  }
549
643
  selectSetOptionSelected(e, t) {
550
- if (!(!e || !(e instanceof x))) {
644
+ if (!(!e || !(e instanceof $))) {
551
645
  if (t === void 0) {
552
646
  e.selected = !e.selected;
553
647
  return;
@@ -568,16 +662,16 @@ let i = class extends I {
568
662
  }
569
663
  }
570
664
  async handleVariantChange() {
571
- this.variant === C.Select && (await this.updateComplete, this.updateFunctionProps());
665
+ this.variant === F.Select && (await this.updateComplete, this.updateFunctionProps());
572
666
  }
573
667
  handleValueChange() {
574
668
  this.selectEl && (this.searchTerm = "", this.selectEl.getOptionValue = this.selectGetOptionValue, this.selectEl.getOptionLabel = this.selectGetOptionLabel, this.selectEl.getOptionSelected = this.selectGetOptionSelected, this.selectEl.filterCallback = this.selectFilterCallback, this.selectEl.setOptionSelected = this.selectSetOptionSelected, this.selectEl.handleDefaultSlotChange());
575
669
  }
576
670
  render() {
577
671
  return f`<div class="folder-select">
578
- ${ee(this.variant, [
672
+ ${se(this.variant, [
579
673
  [
580
- C.Input,
674
+ F.Input,
581
675
  () => f`
582
676
  <cx-input
583
677
  aria-label=${this.localize.term("searchFolders")}
@@ -590,6 +684,8 @@ let i = class extends I {
590
684
  </cx-input>
591
685
  <cx-folder-select-tree
592
686
  base-url=${this.baseUrl}
687
+ extra-folder-id=${this.extraFolderId}
688
+ extra-folder-title=${this.extraFolderTitle}
593
689
  min-query-length=${this.minQueryLength}
594
690
  search-term=${this.searchTerm}
595
691
  selected-value=${this.value}
@@ -597,13 +693,15 @@ let i = class extends I {
597
693
  token=${this.token}
598
694
  bearer-token=${this.bearerToken}
599
695
  ?exclude-virtual-folders=${this.excludeVirtualFolders}
600
- .api=${D(this, g)}
696
+ ?see-thru=${this.seeThru}
697
+ .api=${G(this, T)}
698
+ .firstFetchCallback=${this.firstFetchCallback}
601
699
  >
602
700
  </cx-folder-select-tree>
603
701
  `
604
702
  ],
605
703
  [
606
- C.Select,
704
+ F.Select,
607
705
  () => f`
608
706
  <cx-select
609
707
  clearable
@@ -619,6 +717,8 @@ let i = class extends I {
619
717
  >
620
718
  <cx-folder-select-tree
621
719
  base-url=${this.baseUrl}
720
+ extra-folder-id=${this.extraFolderId}
721
+ extra-folder-title=${this.extraFolderTitle}
622
722
  min-query-length=${this.minQueryLength}
623
723
  search-term=${this.searchTerm}
624
724
  selected-value=${this.value}
@@ -626,7 +726,9 @@ let i = class extends I {
626
726
  token=${this.token}
627
727
  bearer-token=${this.bearerToken}
628
728
  ?exclude-virtual-folders=${this.excludeVirtualFolders}
629
- .api=${D(this, g)}
729
+ ?see-thru=${this.seeThru}
730
+ .api=${G(this, T)}
731
+ .firstFetchCallback=${this.firstFetchCallback}
630
732
  >
631
733
  </cx-folder-select-tree>
632
734
  </cx-select>
@@ -636,84 +738,107 @@ let i = class extends I {
636
738
  </div>`;
637
739
  }
638
740
  };
639
- g = /* @__PURE__ */ new WeakMap();
640
- i.styles = [R, he];
641
- i.dependencies = {
642
- "cx-folder-select-tree": h,
643
- "cx-icon": G,
644
- "cx-input": Z,
645
- "cx-select": J
741
+ T = /* @__PURE__ */ new WeakMap();
742
+ s.styles = [R, be];
743
+ s.dependencies = {
744
+ "cx-folder-select-tree": c,
745
+ "cx-icon": A,
746
+ "cx-input": X,
747
+ "cx-select": Y
646
748
  };
647
- n([
749
+ o([
648
750
  B("cx-select")
649
- ], i.prototype, "selectEl", 2);
650
- n([
751
+ ], s.prototype, "selectEl", 2);
752
+ o([
651
753
  r({ attribute: "min-query-length", reflect: !0, type: Number })
652
- ], i.prototype, "minQueryLength", 2);
653
- n([
754
+ ], s.prototype, "minQueryLength", 2);
755
+ o([
654
756
  r({ attribute: "selection", reflect: !0, type: String })
655
- ], i.prototype, "selection", 2);
656
- n([
757
+ ], s.prototype, "selection", 2);
758
+ o([
657
759
  r({ attribute: "variant", reflect: !0, type: String })
658
- ], i.prototype, "variant", 2);
659
- n([
760
+ ], s.prototype, "variant", 2);
761
+ o([
660
762
  r({ reflect: !0, type: String })
661
- ], i.prototype, "value", 2);
662
- n([
763
+ ], s.prototype, "value", 2);
764
+ o([
663
765
  r({ reflect: !0, type: String })
664
- ], i.prototype, "name", 2);
665
- n([
766
+ ], s.prototype, "name", 2);
767
+ o([
666
768
  r({ attribute: "selected-label", reflect: !0, type: String })
667
- ], i.prototype, "selectedLabel", 2);
668
- n([
769
+ ], s.prototype, "selectedLabel", 2);
770
+ o([
669
771
  r({ attribute: "base-url", reflect: !0, type: String })
670
- ], i.prototype, "baseUrl", 2);
671
- n([
772
+ ], s.prototype, "baseUrl", 2);
773
+ o([
672
774
  r({ reflect: !0, type: Boolean })
673
- ], i.prototype, "open", 2);
674
- n([
775
+ ], s.prototype, "open", 2);
776
+ o([
675
777
  r({ reflect: !1, type: String })
676
- ], i.prototype, "token", 2);
677
- n([
778
+ ], s.prototype, "token", 2);
779
+ o([
678
780
  r({ attribute: "bearer-token", reflect: !0, type: String })
679
- ], i.prototype, "bearerToken", 2);
680
- n([
781
+ ], s.prototype, "bearerToken", 2);
782
+ o([
783
+ r({ attribute: "see-thru", reflect: !0, type: Boolean })
784
+ ], s.prototype, "seeThru", 2);
785
+ o([
681
786
  r({ type: Function })
682
- ], i.prototype, "api", 2);
683
- n([
787
+ ], s.prototype, "api", 2);
788
+ o([
684
789
  r({ reflect: !0, type: Boolean })
685
- ], i.prototype, "required", 2);
686
- n([
790
+ ], s.prototype, "required", 2);
791
+ o([
687
792
  r({ reflect: !1 })
688
- ], i.prototype, "form", 2);
689
- n([
793
+ ], s.prototype, "form", 2);
794
+ o([
690
795
  r({
691
796
  attribute: "exclude-virtual-folders",
692
797
  reflect: !0,
693
798
  type: Boolean
694
799
  })
695
- ], i.prototype, "excludeVirtualFolders", 2);
696
- n([
697
- y()
698
- ], i.prototype, "searchTerm", 2);
699
- n([
800
+ ], s.prototype, "excludeVirtualFolders", 2);
801
+ o([
802
+ r({
803
+ attribute: "extra-folder-id",
804
+ reflect: !0,
805
+ type: String
806
+ })
807
+ ], s.prototype, "extraFolderId", 2);
808
+ o([
809
+ r({
810
+ attribute: "extra-folder-title",
811
+ reflect: !0,
812
+ type: String
813
+ })
814
+ ], s.prototype, "extraFolderTitle", 2);
815
+ o([
816
+ r({ attribute: "first-fetch-callback", reflect: !1, type: Function })
817
+ ], s.prototype, "firstFetchCallback", 2);
818
+ o([
819
+ x()
820
+ ], s.prototype, "searchTerm", 2);
821
+ o([
700
822
  m("api")
701
- ], i.prototype, "updateWrappedApi", 1);
702
- n([
823
+ ], s.prototype, "updateWrappedApi", 1);
824
+ o([
825
+ m("searchTerm", { waitUntilFirstUpdate: !0 })
826
+ ], s.prototype, "handleSearchTermChange", 1);
827
+ o([
703
828
  m("open")
704
- ], i.prototype, "handleOpenChange", 1);
705
- n([
829
+ ], s.prototype, "handleOpenChange", 1);
830
+ o([
706
831
  m("variant")
707
- ], i.prototype, "handleVariantChange", 1);
708
- n([
832
+ ], s.prototype, "handleVariantChange", 1);
833
+ o([
709
834
  m("selectedLabel", { waitUntilFirstUpdate: !0 }),
710
835
  m("value", { waitUntilFirstUpdate: !0 })
711
- ], i.prototype, "handleValueChange", 1);
712
- i = n([
713
- w("cx-folder-select")
714
- ], i);
836
+ ], s.prototype, "handleValueChange", 1);
837
+ s = o([
838
+ D("cx-folder-select")
839
+ ], s);
715
840
  export {
716
- i as C,
717
- C as F,
718
- U as a
841
+ s as C,
842
+ F,
843
+ V as a
719
844
  };