@namroodinc/liquid-editorial 0.13.5 → 0.15.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 (275) hide show
  1. package/README.md +2 -2
  2. package/UPGRADING.md +94 -0
  3. package/dist/chunks/{Avatar-BY0dAItT.cjs → Avatar-BZGFSE6C.cjs} +2 -2
  4. package/dist/chunks/{Avatar-BY0dAItT.cjs.map → Avatar-BZGFSE6C.cjs.map} +1 -1
  5. package/dist/chunks/{Avatar-UjhjcHh5.js → Avatar-C4W-g8nU.js} +2 -2
  6. package/dist/chunks/{Avatar-UjhjcHh5.js.map → Avatar-C4W-g8nU.js.map} +1 -1
  7. package/dist/chunks/{Board-DUX76d2R.js → Board-Cbi5FMW-.js} +2 -2
  8. package/dist/chunks/{Board-DUX76d2R.js.map → Board-Cbi5FMW-.js.map} +1 -1
  9. package/dist/chunks/{Board-CQ1GTuRB.cjs → Board-_agEjTy8.cjs} +2 -2
  10. package/dist/chunks/{Board-CQ1GTuRB.cjs.map → Board-_agEjTy8.cjs.map} +1 -1
  11. package/dist/chunks/{CollectionView-CIJdNwcq.cjs → CollectionView-BfX2Lxre.cjs} +2 -2
  12. package/dist/chunks/{CollectionView-CIJdNwcq.cjs.map → CollectionView-BfX2Lxre.cjs.map} +1 -1
  13. package/dist/chunks/{CollectionView-JRNdXHti.js → CollectionView-DPJGtSP5.js} +2 -2
  14. package/dist/chunks/{CollectionView-JRNdXHti.js.map → CollectionView-DPJGtSP5.js.map} +1 -1
  15. package/dist/chunks/{ColourField-DFvRASVe.cjs → ColourField-BVGnW8Wh.cjs} +2 -2
  16. package/dist/chunks/{ColourField-DFvRASVe.cjs.map → ColourField-BVGnW8Wh.cjs.map} +1 -1
  17. package/dist/chunks/{ColourField-BG5oGj9f.js → ColourField-BcuARZY4.js} +6 -6
  18. package/dist/chunks/{ColourField-BG5oGj9f.js.map → ColourField-BcuARZY4.js.map} +1 -1
  19. package/dist/chunks/{DatePicker-LqaePc57.js → DatePicker-VQUsbYdo.js} +3 -3
  20. package/dist/chunks/{DatePicker-LqaePc57.js.map → DatePicker-VQUsbYdo.js.map} +1 -1
  21. package/dist/chunks/{DatePicker-ClOqS6oH.cjs → DatePicker-zA0bWVBp.cjs} +2 -2
  22. package/dist/chunks/{DatePicker-ClOqS6oH.cjs.map → DatePicker-zA0bWVBp.cjs.map} +1 -1
  23. package/dist/chunks/{Drawer-Ck5XKT_V.js → Drawer-2cf0SaG4.js} +3 -3
  24. package/dist/chunks/{Drawer-Ck5XKT_V.js.map → Drawer-2cf0SaG4.js.map} +1 -1
  25. package/dist/chunks/{Drawer-DdIH9jpe.cjs → Drawer-BzvSfkCL.cjs} +2 -2
  26. package/dist/chunks/{Drawer-DdIH9jpe.cjs.map → Drawer-BzvSfkCL.cjs.map} +1 -1
  27. package/dist/chunks/EntryPicker-BGWxiLJ_.js +877 -0
  28. package/dist/chunks/EntryPicker-BGWxiLJ_.js.map +1 -0
  29. package/dist/chunks/EntryPicker-wVjzdlAO.cjs +2 -0
  30. package/dist/chunks/EntryPicker-wVjzdlAO.cjs.map +1 -0
  31. package/dist/chunks/FormEditor-BHVJG23r.js +30 -0
  32. package/dist/chunks/FormEditor-BHVJG23r.js.map +1 -0
  33. package/dist/chunks/FormEditor-DjUz7qQo.cjs +2 -0
  34. package/dist/chunks/FormEditor-DjUz7qQo.cjs.map +1 -0
  35. package/dist/chunks/Icon-QLZH31JA.cjs +2 -0
  36. package/dist/chunks/Icon-QLZH31JA.cjs.map +1 -0
  37. package/dist/chunks/Icon-kLLQC54Z.js +107 -0
  38. package/dist/chunks/Icon-kLLQC54Z.js.map +1 -0
  39. package/dist/chunks/{Message-d6lqiMQ6.js → Message-DM6pTq7N.js} +2 -2
  40. package/dist/chunks/{Message-d6lqiMQ6.js.map → Message-DM6pTq7N.js.map} +1 -1
  41. package/dist/chunks/{Message-yhdaBpaz.cjs → Message-yZJDVzb8.cjs} +2 -2
  42. package/dist/chunks/{Message-yhdaBpaz.cjs.map → Message-yZJDVzb8.cjs.map} +1 -1
  43. package/dist/chunks/RichTextEditor-BgfeOrEe.cjs +2 -0
  44. package/dist/chunks/RichTextEditor-BgfeOrEe.cjs.map +1 -0
  45. package/dist/chunks/RichTextEditor-CS2ED0HP.js +2702 -0
  46. package/dist/chunks/RichTextEditor-CS2ED0HP.js.map +1 -0
  47. package/dist/chunks/dialogLabel-Dx-WEEzI.cjs +2 -0
  48. package/dist/chunks/dialogLabel-Dx-WEEzI.cjs.map +1 -0
  49. package/dist/chunks/dialogLabel-nB1gwKz0.js +157 -0
  50. package/dist/chunks/dialogLabel-nB1gwKz0.js.map +1 -0
  51. package/dist/chunks/overlayLayer-CPd3zj_u.cjs +2 -0
  52. package/dist/chunks/overlayLayer-CPd3zj_u.cjs.map +1 -0
  53. package/dist/chunks/overlayLayer-Dv1vmfaI.js +199 -0
  54. package/dist/chunks/overlayLayer-Dv1vmfaI.js.map +1 -0
  55. package/dist/chunks/{useTooltip-DnJEFBLg.js → useTooltip-COyAcujL.js} +2 -2
  56. package/dist/chunks/{useTooltip-DnJEFBLg.js.map → useTooltip-COyAcujL.js.map} +1 -1
  57. package/dist/chunks/{useTooltip-C7ON4nkV.cjs → useTooltip-nEDN0ObI.cjs} +2 -2
  58. package/dist/chunks/{useTooltip-C7ON4nkV.cjs.map → useTooltip-nEDN0ObI.cjs.map} +1 -1
  59. package/dist/components/AppShell/index.cjs +1 -1
  60. package/dist/components/AppShell/index.js +1 -1
  61. package/dist/components/AssetCard/index.cjs +1 -1
  62. package/dist/components/AssetCard/index.js +1 -1
  63. package/dist/components/AssetGrid/index.cjs +1 -1
  64. package/dist/components/AssetGrid/index.js +1 -1
  65. package/dist/components/Avatar/index.cjs +1 -1
  66. package/dist/components/Avatar/index.js +1 -1
  67. package/dist/components/Banner/index.cjs +1 -1
  68. package/dist/components/Banner/index.js +1 -1
  69. package/dist/components/Board/index.cjs +1 -1
  70. package/dist/components/Board/index.js +1 -1
  71. package/dist/components/Button/index.cjs +1 -1
  72. package/dist/components/Button/index.js +1 -1
  73. package/dist/components/Choice/index.cjs +1 -1
  74. package/dist/components/Choice/index.cjs.map +1 -1
  75. package/dist/components/Choice/index.js +5 -5
  76. package/dist/components/CollectionView/index.cjs +1 -1
  77. package/dist/components/CollectionView/index.js +1 -1
  78. package/dist/components/ColourField/index.cjs +1 -1
  79. package/dist/components/ColourField/index.js +1 -1
  80. package/dist/components/DatePicker/index.cjs +1 -1
  81. package/dist/components/DatePicker/index.js +1 -1
  82. package/dist/components/Drawer/index.cjs +1 -1
  83. package/dist/components/Drawer/index.js +1 -1
  84. package/dist/components/EditLayout/index.cjs +1 -1
  85. package/dist/components/EditLayout/index.cjs.map +1 -1
  86. package/dist/components/EditLayout/index.js +6 -7
  87. package/dist/components/EditLayout/index.js.map +1 -1
  88. package/dist/components/EntryPicker/dialog.d.cts +11 -1
  89. package/dist/components/EntryPicker/dialog.d.cts.map +1 -1
  90. package/dist/components/EntryPicker/dialog.d.ts +11 -1
  91. package/dist/components/EntryPicker/dialog.d.ts.map +1 -1
  92. package/dist/components/EntryPicker/index.cjs +1 -1
  93. package/dist/components/EntryPicker/index.js +1 -1
  94. package/dist/components/EntryPicker/style.css +1 -1
  95. package/dist/components/EntryPicker/use-picker-data.d.cts +1 -1
  96. package/dist/components/EntryPicker/use-picker-data.d.cts.map +1 -1
  97. package/dist/components/EntryPicker/use-picker-data.d.ts +1 -1
  98. package/dist/components/EntryPicker/use-picker-data.d.ts.map +1 -1
  99. package/dist/components/EntryPicker/use-picker-session.d.cts +4 -1
  100. package/dist/components/EntryPicker/use-picker-session.d.cts.map +1 -1
  101. package/dist/components/EntryPicker/use-picker-session.d.ts +4 -1
  102. package/dist/components/EntryPicker/use-picker-session.d.ts.map +1 -1
  103. package/dist/components/EntryPicker/use-selected-items.d.cts +2 -0
  104. package/dist/components/EntryPicker/use-selected-items.d.cts.map +1 -1
  105. package/dist/components/EntryPicker/use-selected-items.d.ts +2 -0
  106. package/dist/components/EntryPicker/use-selected-items.d.ts.map +1 -1
  107. package/dist/components/FormEditor/README.md +197 -28
  108. package/dist/components/FormEditor/control.d.cts +11 -2
  109. package/dist/components/FormEditor/control.d.cts.map +1 -1
  110. package/dist/components/FormEditor/control.d.ts +11 -2
  111. package/dist/components/FormEditor/control.d.ts.map +1 -1
  112. package/dist/components/FormEditor/form.d.cts +33 -0
  113. package/dist/components/FormEditor/form.d.cts.map +1 -0
  114. package/dist/components/FormEditor/form.d.ts +33 -0
  115. package/dist/components/FormEditor/form.d.ts.map +1 -0
  116. package/dist/components/FormEditor/index.cjs +1 -1
  117. package/dist/components/FormEditor/index.d.cts +3 -27
  118. package/dist/components/FormEditor/index.d.cts.map +1 -1
  119. package/dist/components/FormEditor/index.d.ts +3 -27
  120. package/dist/components/FormEditor/index.d.ts.map +1 -1
  121. package/dist/components/FormEditor/index.js +3 -3
  122. package/dist/components/FormEditor/model.d.cts +2 -0
  123. package/dist/components/FormEditor/model.d.cts.map +1 -1
  124. package/dist/components/FormEditor/model.d.ts +2 -0
  125. package/dist/components/FormEditor/model.d.ts.map +1 -1
  126. package/dist/components/FormEditor/rich-text-control.d.cts +4 -0
  127. package/dist/components/FormEditor/rich-text-control.d.cts.map +1 -0
  128. package/dist/components/FormEditor/rich-text-control.d.ts +4 -0
  129. package/dist/components/FormEditor/rich-text-control.d.ts.map +1 -0
  130. package/dist/components/Icon/icons.d.cts +16 -0
  131. package/dist/components/Icon/icons.d.cts.map +1 -1
  132. package/dist/components/Icon/icons.d.ts +16 -0
  133. package/dist/components/Icon/icons.d.ts.map +1 -1
  134. package/dist/components/Icon/index.cjs +1 -1
  135. package/dist/components/Icon/index.js +1 -1
  136. package/dist/components/ImageCropper/index.cjs +1 -1
  137. package/dist/components/ImageCropper/index.cjs.map +1 -1
  138. package/dist/components/ImageCropper/index.js +6 -6
  139. package/dist/components/Menu/index.cjs +1 -1
  140. package/dist/components/Menu/index.cjs.map +1 -1
  141. package/dist/components/Menu/index.d.cts +3 -2
  142. package/dist/components/Menu/index.d.cts.map +1 -1
  143. package/dist/components/Menu/index.d.ts +3 -2
  144. package/dist/components/Menu/index.d.ts.map +1 -1
  145. package/dist/components/Menu/index.js +65 -52
  146. package/dist/components/Menu/index.js.map +1 -1
  147. package/dist/components/Modal/index.cjs +1 -1
  148. package/dist/components/Modal/index.js +2 -2
  149. package/dist/components/Popover/index.cjs +1 -1
  150. package/dist/components/Popover/index.cjs.map +1 -1
  151. package/dist/components/Popover/index.d.cts.map +1 -1
  152. package/dist/components/Popover/index.d.ts.map +1 -1
  153. package/dist/components/Popover/index.js +67 -64
  154. package/dist/components/Popover/index.js.map +1 -1
  155. package/dist/components/RichTextEditor/content-block-frame.d.cts +32 -0
  156. package/dist/components/RichTextEditor/content-block-frame.d.cts.map +1 -0
  157. package/dist/components/RichTextEditor/content-block-frame.d.ts +32 -0
  158. package/dist/components/RichTextEditor/content-block-frame.d.ts.map +1 -0
  159. package/dist/components/RichTextEditor/content-block-view.d.cts +3 -0
  160. package/dist/components/RichTextEditor/content-block-view.d.cts.map +1 -0
  161. package/dist/components/RichTextEditor/content-block-view.d.ts +3 -0
  162. package/dist/components/RichTextEditor/content-block-view.d.ts.map +1 -0
  163. package/dist/components/RichTextEditor/content-block.d.cts +24 -0
  164. package/dist/components/RichTextEditor/content-block.d.cts.map +1 -0
  165. package/dist/components/RichTextEditor/content-block.d.ts +24 -0
  166. package/dist/components/RichTextEditor/content-block.d.ts.map +1 -0
  167. package/dist/components/RichTextEditor/document.d.cts +15 -8
  168. package/dist/components/RichTextEditor/document.d.cts.map +1 -1
  169. package/dist/components/RichTextEditor/document.d.ts +15 -8
  170. package/dist/components/RichTextEditor/document.d.ts.map +1 -1
  171. package/dist/components/RichTextEditor/embed-context.d.cts +5 -0
  172. package/dist/components/RichTextEditor/embed-context.d.cts.map +1 -1
  173. package/dist/components/RichTextEditor/embed-context.d.ts +5 -0
  174. package/dist/components/RichTextEditor/embed-context.d.ts.map +1 -1
  175. package/dist/components/RichTextEditor/embed-types.d.cts +6 -4
  176. package/dist/components/RichTextEditor/embed-types.d.cts.map +1 -1
  177. package/dist/components/RichTextEditor/embed-types.d.ts +6 -4
  178. package/dist/components/RichTextEditor/embed-types.d.ts.map +1 -1
  179. package/dist/components/RichTextEditor/index.cjs +1 -1
  180. package/dist/components/RichTextEditor/index.d.cts +9 -1
  181. package/dist/components/RichTextEditor/index.d.cts.map +1 -1
  182. package/dist/components/RichTextEditor/index.d.ts +9 -1
  183. package/dist/components/RichTextEditor/index.d.ts.map +1 -1
  184. package/dist/components/RichTextEditor/index.js +1 -2
  185. package/dist/components/RichTextEditor/style.css +161 -86
  186. package/dist/components/RichTextEditor/table-actions.d.cts +11 -0
  187. package/dist/components/RichTextEditor/table-actions.d.cts.map +1 -0
  188. package/dist/components/RichTextEditor/table-actions.d.ts +11 -0
  189. package/dist/components/RichTextEditor/table-actions.d.ts.map +1 -0
  190. package/dist/components/RichTextEditor/table-bands.d.cts +19 -0
  191. package/dist/components/RichTextEditor/table-bands.d.cts.map +1 -0
  192. package/dist/components/RichTextEditor/table-bands.d.ts +19 -0
  193. package/dist/components/RichTextEditor/table-bands.d.ts.map +1 -0
  194. package/dist/components/RichTextEditor/table-view.d.cts +4 -0
  195. package/dist/components/RichTextEditor/table-view.d.cts.map +1 -0
  196. package/dist/components/RichTextEditor/table-view.d.ts +4 -0
  197. package/dist/components/RichTextEditor/table-view.d.ts.map +1 -0
  198. package/dist/components/RichTextEditor/tables.d.cts +7 -0
  199. package/dist/components/RichTextEditor/tables.d.cts.map +1 -0
  200. package/dist/components/RichTextEditor/tables.d.ts +7 -0
  201. package/dist/components/RichTextEditor/tables.d.ts.map +1 -0
  202. package/dist/components/RichTextEditor/use-embeds.d.cts.map +1 -1
  203. package/dist/components/RichTextEditor/use-embeds.d.ts.map +1 -1
  204. package/dist/components/SearchField/index.cjs +1 -1
  205. package/dist/components/SearchField/index.js +1 -1
  206. package/dist/components/Select/index.cjs +1 -1
  207. package/dist/components/Select/index.js +2 -2
  208. package/dist/components/SelectionCard/index.cjs +1 -1
  209. package/dist/components/SelectionCard/index.cjs.map +1 -1
  210. package/dist/components/SelectionCard/index.js +4 -4
  211. package/dist/components/SelectionCard/index.js.map +1 -1
  212. package/dist/components/SideNav/index.cjs +1 -1
  213. package/dist/components/SideNav/index.js +1 -1
  214. package/dist/components/SortableList/index.cjs +1 -1
  215. package/dist/components/SortableList/index.js +1 -1
  216. package/dist/components/Stepper/index.cjs +1 -1
  217. package/dist/components/Stepper/index.js +1 -1
  218. package/dist/components/SubNav/index.cjs +1 -1
  219. package/dist/components/SubNav/index.js +1 -1
  220. package/dist/components/Switch/style.css +2 -6
  221. package/dist/components/Table/index.cjs +1 -1
  222. package/dist/components/Table/index.js +1 -1
  223. package/dist/components/Time/index.cjs +1 -1
  224. package/dist/components/Time/index.js +1 -1
  225. package/dist/components/Toast/index.cjs +1 -1
  226. package/dist/components/Toast/index.js +1 -1
  227. package/dist/components/TopNav/index.cjs +1 -1
  228. package/dist/components/TopNav/index.js +1 -1
  229. package/dist/index.cjs +1 -1
  230. package/dist/index.d.cts +1 -1
  231. package/dist/index.d.cts.map +1 -1
  232. package/dist/index.d.ts +1 -1
  233. package/dist/index.d.ts.map +1 -1
  234. package/dist/index.js +28 -28
  235. package/dist/internal/dialogFocus.d.cts +6 -1
  236. package/dist/internal/dialogFocus.d.cts.map +1 -1
  237. package/dist/internal/dialogFocus.d.ts +6 -1
  238. package/dist/internal/dialogFocus.d.ts.map +1 -1
  239. package/package.json +8 -6
  240. package/dist/chunks/EntryPicker-B4dAsObz.cjs +0 -2
  241. package/dist/chunks/EntryPicker-B4dAsObz.cjs.map +0 -1
  242. package/dist/chunks/EntryPicker-DDXHytMN.js +0 -160
  243. package/dist/chunks/EntryPicker-DDXHytMN.js.map +0 -1
  244. package/dist/chunks/FormEditor-BGzE-rqk.cjs +0 -2
  245. package/dist/chunks/FormEditor-BGzE-rqk.cjs.map +0 -1
  246. package/dist/chunks/FormEditor-ChH4e5sB.js +0 -693
  247. package/dist/chunks/FormEditor-ChH4e5sB.js.map +0 -1
  248. package/dist/chunks/Icon-3ucBRgrd.cjs +0 -2
  249. package/dist/chunks/Icon-3ucBRgrd.cjs.map +0 -1
  250. package/dist/chunks/Icon-dPXyBYe5.js +0 -91
  251. package/dist/chunks/Icon-dPXyBYe5.js.map +0 -1
  252. package/dist/chunks/RichTextEditor-BFblqw8m.js +0 -1144
  253. package/dist/chunks/RichTextEditor-BFblqw8m.js.map +0 -1
  254. package/dist/chunks/RichTextEditor-DU9CVeRD.cjs +0 -2
  255. package/dist/chunks/RichTextEditor-DU9CVeRD.cjs.map +0 -1
  256. package/dist/chunks/dialogLabel-DT7rCr3_.js +0 -176
  257. package/dist/chunks/dialogLabel-DT7rCr3_.js.map +0 -1
  258. package/dist/chunks/dialogLabel-_-MTckE_.cjs +0 -2
  259. package/dist/chunks/dialogLabel-_-MTckE_.cjs.map +0 -1
  260. package/dist/chunks/overlayLayer-iGhuAByk.cjs +0 -2
  261. package/dist/chunks/overlayLayer-iGhuAByk.cjs.map +0 -1
  262. package/dist/chunks/overlayLayer-lU4iWSjO.js +0 -162
  263. package/dist/chunks/overlayLayer-lU4iWSjO.js.map +0 -1
  264. package/dist/chunks/use-picker-session-BSpOwnQ-.js +0 -712
  265. package/dist/chunks/use-picker-session-BSpOwnQ-.js.map +0 -1
  266. package/dist/chunks/use-picker-session-ouqHBmVA.cjs +0 -2
  267. package/dist/chunks/use-picker-session-ouqHBmVA.cjs.map +0 -1
  268. package/dist/components/RichTextEditor/storyblock-view.d.cts +0 -3
  269. package/dist/components/RichTextEditor/storyblock-view.d.cts.map +0 -1
  270. package/dist/components/RichTextEditor/storyblock-view.d.ts +0 -3
  271. package/dist/components/RichTextEditor/storyblock-view.d.ts.map +0 -1
  272. package/dist/components/RichTextEditor/storyblock.d.cts +0 -19
  273. package/dist/components/RichTextEditor/storyblock.d.cts.map +0 -1
  274. package/dist/components/RichTextEditor/storyblock.d.ts +0 -19
  275. package/dist/components/RichTextEditor/storyblock.d.ts.map +0 -1
@@ -1,712 +0,0 @@
1
- import { t as e } from "./Icon-dPXyBYe5.js";
2
- import { Button as t } from "../components/Button/index.js";
3
- import { d as n, g as r, u as i } from "./overlayLayer-lU4iWSjO.js";
4
- import { Badge as a } from "../components/Badge/index.js";
5
- import { r as o } from "./limit-s9zfxIMC.js";
6
- import { LimitReading as s } from "../components/LimitReading/index.js";
7
- import { Modal as c } from "../components/Modal/index.js";
8
- import { n as l, r as u, t as d } from "./LoadState-B056EPu7.js";
9
- import { SearchField as f } from "../components/SearchField/index.js";
10
- import { Checkbox as p } from "../components/Choice/index.js";
11
- import { useEffect as m, useId as h, useMemo as g, useRef as _, useState as v } from "react";
12
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
13
- //#region src/components/EntryPicker/item.tsx
14
- function S(e) {
15
- return e.isDisabled ? e.disabledReason : void 0;
16
- }
17
- function C(e) {
18
- return e.tone === "removed";
19
- }
20
- function w(e) {
21
- return C(e) ? void 0 : S(e);
22
- }
23
- function T({ item: t, reasonId: n }) {
24
- let r = S(t);
25
- return /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
26
- className: "ds-entry__thumb",
27
- children: t.imageUrl ? /* @__PURE__ */ b("img", {
28
- src: t.imageUrl,
29
- alt: "",
30
- loading: "lazy"
31
- }) : /* @__PURE__ */ b(e, {
32
- name: "file-text",
33
- size: 20
34
- })
35
- }), /* @__PURE__ */ x("span", {
36
- className: "ds-entry__body",
37
- children: [
38
- /* @__PURE__ */ b("span", {
39
- className: "ds-entry__title",
40
- "data-unavailable": t.isUnavailable || void 0,
41
- children: t.title
42
- }),
43
- t.metadata != null && /* @__PURE__ */ b("span", {
44
- className: "ds-entry__meta",
45
- children: t.metadata
46
- }),
47
- r && /* @__PURE__ */ x("span", {
48
- id: n,
49
- className: "ds-entry__reason",
50
- children: [
51
- /* @__PURE__ */ b(a, {
52
- shape: "tag",
53
- size: "sm",
54
- children: r.label
55
- }),
56
- " ",
57
- /* @__PURE__ */ b("span", { children: r.description })
58
- ]
59
- })
60
- ]
61
- })] });
62
- }
63
- function E({ item: e, reasonId: t }) {
64
- return C(e) ? /* @__PURE__ */ x("span", {
65
- className: "ds-entry__removed",
66
- children: [
67
- /* @__PURE__ */ b("strong", { children: e.title }),
68
- " ",
69
- e.metadata ?? /* @__PURE__ */ b("code", { children: e.id })
70
- ]
71
- }) : /* @__PURE__ */ b(T, {
72
- item: e,
73
- reasonId: t
74
- });
75
- }
76
- function D({ item: e }) {
77
- return C(e) ? /* @__PURE__ */ b(a, {
78
- shape: "tag",
79
- children: e.removedLabel ?? "Removed on save"
80
- }) : null;
81
- }
82
- function O({ item: e, onEdit: n, isDisabled: r }) {
83
- return !n || e.isUnavailable || e.isDisabled ? null : /* @__PURE__ */ b(t, {
84
- variant: "simple",
85
- size: "sm",
86
- isIconOnly: !0,
87
- iconStart: "pencil",
88
- "aria-label": `Edit ${e.title}`,
89
- isDisabled: r,
90
- onClick: () => n(e)
91
- });
92
- }
93
- //#endregion
94
- //#region src/components/EntryPicker/chosen.ts
95
- function k(e, t, n) {
96
- return {
97
- id: e,
98
- title: t,
99
- metadata: n,
100
- isUnavailable: !0
101
- };
102
- }
103
- function A({ selected: e, items: t, pageItems: n, known: r, failures: i, hasResolver: a, itemLabel: o }) {
104
- let s = new Map(t.map((e) => [e.id, e])), c = new Map(n.map((e) => [e.id, e]));
105
- return e.map((e) => (s.get(e) ?? (r.has(e) ? r.get(e) : c.get(e))) || (r.has(e) ? k(e, `${`${o.charAt(0).toUpperCase()}${o.slice(1)}`} no longer available`, "Replace or clear this selection.") : a ? k(e, i.has(e) ? `Couldn't load ${o}` : "Loading…") : {
106
- id: e,
107
- title: e
108
- }));
109
- }
110
- //#endregion
111
- //#region src/components/EntryPicker/use-selected-items.ts
112
- function j(e) {
113
- return e instanceof Error ? e : null;
114
- }
115
- function M(e, t) {
116
- if (!t.some((t) => e.has(t))) return e;
117
- let n = new Map(e);
118
- for (let e of t) n.delete(e);
119
- return n;
120
- }
121
- function N(e, t, n) {
122
- let r = n ? t.flatMap((t) => {
123
- let r = n(t);
124
- return r?.item.id === t && e.seeds.get(t) !== r ? [r] : [];
125
- }) : [];
126
- if (r.length === 0) return e;
127
- let i = r.filter((t) => Object.is(t.revision, e.refreshKey)), a = r.filter((t) => !Object.is(t.revision, e.refreshKey) && !e.known.has(t.item.id) && !e.stale.has(t.item.id)), o = (e) => e.map((e) => [e.item.id, e.item]);
128
- return {
129
- ...e,
130
- seeds: new Map([...e.seeds, ...r.map((e) => [e.item.id, e])]),
131
- known: i.length ? new Map([...e.known, ...o(i)]) : e.known,
132
- stale: a.length ? new Map([...e.stale, ...o(a)]) : e.stale,
133
- failures: M(e.failures, i.map((e) => e.item.id))
134
- };
135
- }
136
- function P(e, t) {
137
- return e !== t && (e.length !== t.length || t.some((t) => !e.includes(t)));
138
- }
139
- function F(e, t, n, r) {
140
- let i = e;
141
- if (Object.is(i.refreshKey, n) || (i = {
142
- ...i,
143
- refreshKey: n,
144
- known: /* @__PURE__ */ new Map(),
145
- stale: new Map([...i.stale, ...i.known]),
146
- failures: /* @__PURE__ */ new Map()
147
- }), P(i.selected, t)) {
148
- let e = i.selected.filter((e) => !t.includes(e));
149
- i = {
150
- ...i,
151
- selected: t,
152
- known: M(i.known, e),
153
- stale: M(i.stale, e),
154
- failures: M(i.failures, e),
155
- seeds: M(i.seeds, e)
156
- };
157
- }
158
- return N(i, t, r);
159
- }
160
- function I(e, t, n, r, a) {
161
- let o = i(n), s = i(e), [c, l] = v(() => N({
162
- refreshKey: r,
163
- selected: e,
164
- known: /* @__PURE__ */ new Map(),
165
- stale: /* @__PURE__ */ new Map(),
166
- failures: /* @__PURE__ */ new Map(),
167
- seeds: /* @__PURE__ */ new Map()
168
- }, e, a)), u = F(c, e, r, a);
169
- u !== c && l(u);
170
- let { known: d, stale: f, failures: p } = u, h = g(() => f.size === 0 ? d : new Map([...f, ...d]), [f, d]), y = (e, t, n = s.current) => {
171
- let r = e.filter((e) => e !== void 0 && n.includes(e.id)).map((e) => [e.id, e]);
172
- r.length !== 0 && l((e) => {
173
- if (Object.is(e.refreshKey, t)) return {
174
- ...e,
175
- known: new Map([...e.known, ...r])
176
- };
177
- let n = r.filter(([t]) => !e.known.has(t) && !e.stale.has(t));
178
- return n.length === 0 ? e : {
179
- ...e,
180
- stale: new Map([...e.stale, ...n])
181
- };
182
- });
183
- }, b = new Set(t.map((e) => e.id)), x = n ? e.filter((e) => !b.has(e) && !d.has(e) && !p.has(e)) : [], S = JSON.stringify(x), C = _({
184
- refreshKey: r,
185
- tokens: /* @__PURE__ */ new Map()
186
- });
187
- m(() => {
188
- let e = o.current;
189
- if (!e) return;
190
- let t = JSON.parse(S);
191
- Object.is(C.current.refreshKey, r) || (C.current = {
192
- refreshKey: r,
193
- tokens: /* @__PURE__ */ new Map()
194
- });
195
- let { tokens: n } = C.current;
196
- for (let e of n.keys()) t.includes(e) || n.delete(e);
197
- for (let i of t.filter((e) => !n.has(e))) {
198
- let t = Symbol(i);
199
- n.set(i, t);
200
- let a = (e) => {
201
- C.current.tokens.get(i) === t && (C.current.tokens.delete(i), l((t) => Object.is(t.refreshKey, r) && t.selected.includes(i) ? e(t) : t));
202
- };
203
- Promise.resolve().then(() => e(i)).then((e) => a((t) => t.known.has(i) ? t : {
204
- ...t,
205
- known: new Map(t.known).set(i, e ?? null)
206
- }), (e) => a((t) => ({
207
- ...t,
208
- failures: new Map(t.failures).set(i, j(e))
209
- })));
210
- }
211
- }, [
212
- S,
213
- r,
214
- o
215
- ]);
216
- let w = e.filter((e) => p.has(e) && !d.has(e));
217
- return {
218
- known: h,
219
- failures: p,
220
- remember: y,
221
- status: x.length > 0 ? "loading" : w.length > 0 ? "error" : "ready",
222
- error: w.length > 0 ? p.get(w[0]) ?? null : null,
223
- retry: () => l((e) => ({
224
- ...e,
225
- failures: M(e.failures, w)
226
- }))
227
- };
228
- }
229
- //#endregion
230
- //#region src/components/EntryPicker/feedback.tsx
231
- function L(e, t, n, r) {
232
- let i = l(t, n, r);
233
- return t !== "error" && i.state !== "pending" ? null : /* @__PURE__ */ b(u, {
234
- title: e,
235
- error: i.error,
236
- onRetry: i.retry,
237
- retryState: i.state
238
- });
239
- }
240
- function R({ query: e, itemLabel: t, itemsLabel: n, canCreate: r }) {
241
- let i = e.trim();
242
- return /* @__PURE__ */ x("div", {
243
- className: "ds-entry-picker__no-results",
244
- children: [/* @__PURE__ */ b("p", { children: i ? `No ${n} match “${i}”` : `No ${n} yet` }), i && /* @__PURE__ */ x("p", { children: ["Try a different search.", r ? ` Or create the ${t} you need.` : ""] })]
245
- });
246
- }
247
- function z(e, t) {
248
- let n = e.closest(".ds-entry-picker__scroll") ?? e.parentElement, i = Array.from(n?.querySelectorAll(".ds-entry-picker__result") ?? []);
249
- for (let e of [...i.slice(t), ...i.slice(0, t).reverse()]) {
250
- let t = r(e)[0];
251
- if (t) return t;
252
- }
253
- }
254
- function B(e) {
255
- let t = _(null), i = _(null), { more: a, offset: o } = e;
256
- return m(() => {
257
- let e = i.current, o = t.current;
258
- e !== null && a.status !== "loading" && (i.current = null, o && n(document.activeElement) && (a.status === "error" ? r(o)[0] : z(o, e))?.focus());
259
- }, [a.status, o]), {
260
- pagingRef: t,
261
- load: () => {
262
- i.current = t.current?.contains(document.activeElement) ? o : null, a.load();
263
- }
264
- };
265
- }
266
- function V(e, t) {
267
- let i = _(t);
268
- m(() => {
269
- if (i.current === t) return;
270
- i.current = t;
271
- let a = e.current;
272
- a && n(document.activeElement) && (r(a)[0] ?? z(a, Infinity))?.focus();
273
- }, [e, t]);
274
- }
275
- function H({ count: e, total: n, isRemote: r, pageSize: i, remote: a, itemsLabel: o }) {
276
- let { more: s } = a, { pagingRef: c, load: l } = B(a), u = L(`Couldn't load more ${o}`, s.status, s.error, l);
277
- return V(c, u ? "failure" : r && a.hasMore ? "more" : "none"), n === 0 ? null : /* @__PURE__ */ x("div", {
278
- ref: c,
279
- className: "ds-entry-picker__paging",
280
- children: [u ?? (r && a.hasMore && /* @__PURE__ */ x(t, {
281
- isPending: s.status === "loading",
282
- isFocusableWhenDisabled: !0,
283
- isDisabled: !s.isAvailable,
284
- onClick: l,
285
- children: [
286
- "Load ",
287
- Math.min(i, n - a.offset),
288
- " more"
289
- ]
290
- })), /* @__PURE__ */ b("span", { children: e < n ? `Showing ${e} of ${n}` : `All ${e} shown` })]
291
- });
292
- }
293
- //#endregion
294
- //#region src/components/EntryPicker/blocked.ts
295
- function U(e, t, { isDisabled: n, searching: r, atMax: i }) {
296
- if (n || r) return "inactive";
297
- if (e.isDisabled) return "restricted";
298
- if (!t && i) return "full";
299
- }
300
- //#endregion
301
- //#region src/components/EntryPicker/results.tsx
302
- function W({ items: e, selected: t, block: n, onToggle: r, onEdit: i }) {
303
- let a = h(), o = `${a}-full`;
304
- return /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
305
- id: o,
306
- hidden: !0,
307
- children: "The selection is full. Remove one to choose another."
308
- }), /* @__PURE__ */ b("ul", {
309
- className: "ds-entry-picker__results",
310
- "data-searching": n.searching || void 0,
311
- children: e.map((e, s) => {
312
- let c = t.includes(e.id), l = U(e, c, n), u = S(e) ? `${a}-reason-${s}` : void 0;
313
- return /* @__PURE__ */ x("li", {
314
- className: "ds-entry-picker__result ds-field-surface",
315
- "data-selected": c || void 0,
316
- "data-blocked": l ? !0 : void 0,
317
- onClick: (t) => {
318
- let n = t.target instanceof Element ? t.target.closest("button, input, label, a, select, textarea, summary, [tabindex]") : null;
319
- (!n || !t.currentTarget.contains(n)) && r(e.id);
320
- },
321
- children: [
322
- /* @__PURE__ */ b(p, {
323
- checked: c,
324
- "aria-checked": c,
325
- "aria-label": `Select ${e.title}`,
326
- "aria-describedby": l === "full" ? o : u,
327
- disabled: !!l,
328
- isFocusableWhenDisabled: l !== "inactive",
329
- onChange: () => r(e.id)
330
- }),
331
- /* @__PURE__ */ b("span", {
332
- className: "ds-entry",
333
- children: /* @__PURE__ */ b(T, {
334
- item: e,
335
- reasonId: u
336
- })
337
- }),
338
- /* @__PURE__ */ b(O, {
339
- item: e,
340
- onEdit: i,
341
- isDisabled: l === "inactive"
342
- })
343
- ]
344
- }, e.id);
345
- })
346
- })] });
347
- }
348
- //#endregion
349
- //#region src/components/EntryPicker/use-picker-scroll.ts
350
- function G() {
351
- let e = _(null), [t, n] = v(!1);
352
- return {
353
- ref: e,
354
- scrolled: t,
355
- toTop: () => {
356
- n(!1), e.current && (e.current.scrollTop = 0);
357
- },
358
- onScroll: (e) => {
359
- n(e.currentTarget.scrollTop > 0);
360
- }
361
- };
362
- }
363
- //#endregion
364
- //#region src/components/EntryPicker/dialog.tsx
365
- function K({ isOpen: e, onClose: n, query: r, onQuery: i, selected: a, results: o, cap: l, block: u, isRemote: f, pageSize: p, remote: m, onToggle: h, onEdit: g, itemLabel: _, itemsLabel: v, addLabel: S, onCreate: C, isCreating: w, dialogTitle: T, dialogDescription: E, isDialogHidden: D }) {
366
- let O = L(`Couldn't refresh ${v}`, m.refresh.status, m.refresh.error, m.refresh.retry);
367
- return /* @__PURE__ */ b(c, {
368
- isOpen: e,
369
- isHidden: D,
370
- onClose: n,
371
- title: T ?? S,
372
- description: E ?? l.description,
373
- className: "ds-entry-picker__dialog",
374
- footer: /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
375
- className: "ds-entry-picker__selection",
376
- role: "status",
377
- children: l.reading ? /* @__PURE__ */ b(s, {
378
- ...l.reading,
379
- size: "lg"
380
- }) : `${a.length} selected`
381
- }), /* @__PURE__ */ b(t, {
382
- variant: "primary",
383
- onClick: n,
384
- children: "Done"
385
- })] }),
386
- children: /* @__PURE__ */ b(q, {
387
- query: r,
388
- onQuery: i,
389
- itemsLabel: v,
390
- isSearching: m.loading,
391
- action: C && /* @__PURE__ */ b(t, {
392
- variant: "primary",
393
- isPending: w,
394
- isFocusableWhenDisabled: !0,
395
- iconStart: "plus",
396
- isDisabled: u.isDisabled || l.atMax,
397
- onClick: C,
398
- children: `New ${_}`
399
- }),
400
- banner: O,
401
- isBusy: m.loading || m.more.status === "loading" || m.refresh.status === "loading",
402
- children: /* @__PURE__ */ x(d, {
403
- status: m.status,
404
- errorTitle: `Couldn't load ${v}`,
405
- error: m.error,
406
- onRetry: m.retry,
407
- children: [
408
- /* @__PURE__ */ b(W, {
409
- items: o,
410
- selected: a,
411
- block: u,
412
- onToggle: h,
413
- onEdit: g
414
- }),
415
- !m.searching && o.length === 0 && /* @__PURE__ */ b(R, {
416
- query: r,
417
- itemLabel: _,
418
- itemsLabel: v,
419
- canCreate: !!C
420
- }),
421
- /* @__PURE__ */ b(H, {
422
- count: o.length,
423
- total: f ? m.total : o.length,
424
- isRemote: f,
425
- pageSize: p,
426
- remote: m,
427
- itemsLabel: v
428
- })
429
- ]
430
- })
431
- })
432
- });
433
- }
434
- function q({ query: e, onQuery: t, itemsLabel: n, isSearching: r, action: i, banner: a, isBusy: o, children: s }) {
435
- let { ref: c, scrolled: l, onScroll: u, toTop: d } = G(), p = (e) => {
436
- d(), t(e);
437
- };
438
- return /* @__PURE__ */ x(y, { children: [
439
- /* @__PURE__ */ x("div", {
440
- className: "ds-entry-picker__search ds-field-surface",
441
- "data-scrolled": l || void 0,
442
- children: [/* @__PURE__ */ b(f, {
443
- "aria-label": `Search ${n}`,
444
- value: e,
445
- isBusy: r,
446
- placeholder: `Search ${n}`,
447
- onChange: (e) => p(e.target.value),
448
- onClear: () => p("")
449
- }), i]
450
- }),
451
- a && /* @__PURE__ */ b("div", {
452
- className: "ds-entry-picker__refresh",
453
- children: a
454
- }),
455
- /* @__PURE__ */ b("div", {
456
- className: "ds-entry-picker__scroll",
457
- ref: c,
458
- onScroll: u,
459
- "aria-busy": o,
460
- children: s
461
- })
462
- ] });
463
- }
464
- //#endregion
465
- //#region src/components/EntryPicker/limit.ts
466
- function J(e, t) {
467
- return e === "single" || t === 1;
468
- }
469
- function Y(e, t, n) {
470
- return J(e, n) ? {
471
- count: t,
472
- max: 1,
473
- tone: "neutral"
474
- } : e === "multiple" && n !== void 0 ? {
475
- count: t,
476
- max: n
477
- } : void 0;
478
- }
479
- function X(e, t, n) {
480
- return J(e, n) ? void 0 : t;
481
- }
482
- function ee(e, t, n, { itemLabel: r, itemsLabel: i }) {
483
- let a = Y(e, t, n), s = e === "multiple" && a && Number.isFinite(a.max) ? a.max : void 0, c = `Choose as many ${i} as you need.`;
484
- return e === "single" || s === 1 ? c = `Choose one ${r}.` : s !== void 0 && (c = `Choose up to ${s} ${i}.`), {
485
- limit: a,
486
- atMax: s !== void 0 && t >= s,
487
- description: c,
488
- reading: e === "multiple" && o(a) ? a : void 0
489
- };
490
- }
491
- //#endregion
492
- //#region src/components/EntryPicker/use-picker-data.ts
493
- var te = 250;
494
- function ne(e) {
495
- return Array.from(new Map(e.map((e) => [e.id, e])).values());
496
- }
497
- var Z = {
498
- items: [],
499
- offset: 0,
500
- total: 0
501
- }, Q = {
502
- ...Z,
503
- key: null,
504
- revision: void 0,
505
- status: "ready",
506
- error: null
507
- };
508
- function re(e, t) {
509
- let n = e?.status === "error" && t;
510
- return {
511
- status: e?.status === "loading" ? "loading" : n ? "error" : "ready",
512
- error: n ? e.error ?? null : null,
513
- isAvailable: t
514
- };
515
- }
516
- function $(e, t) {
517
- return {
518
- items: ne([...e.items, ...t.items]),
519
- offset: e.offset + t.items.length,
520
- total: t.items.length === 0 ? Math.min(t.total, e.offset) : t.total
521
- };
522
- }
523
- function ie(e, t, n, r) {
524
- return e.key !== t || e.offset !== n ? e : {
525
- ...e,
526
- ...$(e, r)
527
- };
528
- }
529
- async function ae(e, t, n, r, i) {
530
- let a = Math.max(1, Math.ceil(r / n)), o = await Promise.all(Array.from({ length: a }, (r, i) => e({
531
- offset: i * n,
532
- limit: n
533
- }, { query: t }))), s = Z;
534
- for (let [e, t] of o.entries()) {
535
- if (s.offset !== e * n) break;
536
- s = $(s, t);
537
- }
538
- for (; s.offset < r && s.offset < s.total && i();) s = $(s, await e({
539
- offset: s.offset,
540
- limit: n
541
- }, { query: t }));
542
- return s;
543
- }
544
- function oe(e, t, n, r) {
545
- let i = e !== null && t.key === e, a = i && Object.is(t.revision, n), o = e !== null && !a && (!i || t.status === "error"), s = o && t.key !== null && t.status === "ready", c = o && !s ? "loading" : t.status === "error" ? "error" : "ready", l = t.status === "ready" && t.offset < t.total, u = i && !a && t.status === "ready", d = u && r?.key === e && Object.is(r.revision, n);
546
- return {
547
- loading: o,
548
- searching: s,
549
- status: c,
550
- hasMore: l,
551
- refresh: u ? d ? "error" : "loading" : "ready",
552
- refreshFailed: d
553
- };
554
- }
555
- function se(e, t, n, r, a, o) {
556
- let s = i(e), c = i(a), l = i(o), [u, d] = v(0), [f, p] = v(Q), [h, g] = v(null), [y, b] = v(null), [x, S] = v(r);
557
- x !== r && (S(r), r || (p(Q), g(null), b(null), d((e) => e + 1)));
558
- let C = n.trim(), w = e && r ? JSON.stringify([
559
- C,
560
- t,
561
- u
562
- ]) : null, T = i(f), E = _(null), D = _(C), { loading: O, searching: k, status: A, hasMore: M, refresh: N, refreshFailed: P } = oe(w, f, o, y), F = !O && N === "ready", I = O ? "load" : N === "loading" ? "refresh" : null;
563
- m(() => {
564
- if (w === null) return;
565
- let e = I === "load" && C !== D.current ? te : 0;
566
- if (D.current = C, I === null) return;
567
- let n = I === "refresh" ? T.current.offset + (E.current ? t : 0) : 0, r = !0, i = window.setTimeout(() => {
568
- let e = s.current;
569
- e && ae(e, C, t, n, () => r).then((e) => {
570
- r && (E.current = null, p({
571
- ...e,
572
- key: w,
573
- revision: o,
574
- status: "ready",
575
- error: null
576
- }), g(null), b(null), c.current(e.items, o));
577
- }, (e) => {
578
- r && (I === "refresh" ? b({
579
- key: w,
580
- revision: o,
581
- error: j(e)
582
- }) : (E.current = null, p({
583
- ...Q,
584
- key: w,
585
- revision: o,
586
- status: "error",
587
- error: j(e)
588
- }), g(null)));
589
- });
590
- }, e);
591
- return () => {
592
- r = !1, window.clearTimeout(i);
593
- };
594
- }, [
595
- w,
596
- I,
597
- o,
598
- C,
599
- t,
600
- s,
601
- c,
602
- T
603
- ]);
604
- let L = () => {
605
- let e = s.current, n = f.key, { offset: r } = f;
606
- if (!e || n === null || !F || !M || E.current) return;
607
- let i = Symbol("load more"), a = o;
608
- E.current = i, g({
609
- token: i,
610
- status: "loading",
611
- error: null
612
- });
613
- let u = () => E.current === i && T.current.key === n && T.current.offset === r && Object.is(l.current, a), d = (e) => {
614
- E.current === i && (E.current = null), g((t) => t?.token === i ? e : t);
615
- };
616
- Promise.resolve().then(() => e({
617
- offset: r,
618
- limit: t
619
- }, { query: C })).then((e) => {
620
- u() && (p((t) => ie(t, n, r, e)), c.current(e.items, a)), d(null);
621
- }, (e) => d(u() ? {
622
- token: i,
623
- status: "error",
624
- error: j(e)
625
- } : null));
626
- };
627
- return {
628
- items: f.items,
629
- total: f.total,
630
- offset: f.offset,
631
- hasMore: M,
632
- pageRevision: f.revision,
633
- loading: O,
634
- searching: k,
635
- status: A,
636
- error: f.error,
637
- retry: () => d((e) => e + 1),
638
- more: {
639
- ...re(h, F),
640
- load: L
641
- },
642
- refresh: {
643
- status: N,
644
- error: P ? y?.error ?? null : null,
645
- retry: () => b(null)
646
- }
647
- };
648
- }
649
- //#endregion
650
- //#region src/components/EntryPicker/use-picker-session.ts
651
- var ce = [];
652
- function le(e, t) {
653
- return t ? e.map((e) => {
654
- let n = e.isDisabled ? void 0 : t(e);
655
- return n ? {
656
- ...e,
657
- isDisabled: !0,
658
- disabledReason: n
659
- } : e;
660
- }) : e;
661
- }
662
- function ue(e, t, n, { isOpen: r, isDisabled: i, itemLabel: a, itemsLabel: o, close: s, restrict: c }) {
663
- let [l, u] = v(""), { resolveItem: d, refreshKey: f, loadPage: p, pageSize: m = 10, mode: h = "multiple", max: _, onEditItem: y } = n, b = I(e, t, d, f), x = se(p, m, l, r, b.remember, f), S = !!p, C = g(() => {
664
- let e = l.trim().toLowerCase();
665
- return S ? ce : t.filter((t) => !e || [t.title, ...t.keywords ?? []].join(" ").toLowerCase().includes(e));
666
- }, [
667
- S,
668
- t,
669
- l
670
- ]), w = S ? x.items : C, T = g(() => le(w, c), [w, c]), E = ee(h, e.length, _, {
671
- itemLabel: a,
672
- itemsLabel: o
673
- }), D = {
674
- isDisabled: i,
675
- searching: x.searching,
676
- atMax: E.atMax
677
- }, O = y ? (e) => {
678
- y(e) === !1 && s();
679
- } : void 0;
680
- return {
681
- selection: b,
682
- remote: x,
683
- isRemote: S,
684
- results: T,
685
- cap: E,
686
- block: D,
687
- editItem: O,
688
- revision: S ? x.pageRevision : f,
689
- choice: (t) => {
690
- let n = T.find((e) => e.id === t);
691
- return n && !U(n, e.includes(t), D) ? n : void 0;
692
- },
693
- dialog: {
694
- query: l,
695
- onQuery: u,
696
- selected: e,
697
- results: T,
698
- cap: E,
699
- block: D,
700
- isRemote: S,
701
- pageSize: m,
702
- remote: x,
703
- onEdit: O,
704
- itemLabel: a,
705
- itemsLabel: o
706
- }
707
- };
708
- }
709
- //#endregion
710
- export { L as a, O as c, E as d, w as f, K as i, T as l, X as n, I as o, Y as r, A as s, ue as t, D as u };
711
-
712
- //# sourceMappingURL=use-picker-session-BSpOwnQ-.js.map