@portnet/ui 5.0.27 → 6.0.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 (736) hide show
  1. package/CHANGELOG.md +524 -0
  2. package/README.md +101 -38
  3. package/dist/index.d.ts +59 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +174 -203
  6. package/dist/index.js.map +1 -0
  7. package/dist/v2/__tests__/MobileRowCard.test.js +337 -0
  8. package/dist/v2/__tests__/MobileRowCard.test.js.map +1 -0
  9. package/dist/v2/__tests__/apiError.test.js +182 -0
  10. package/dist/v2/__tests__/apiError.test.js.map +1 -0
  11. package/dist/v2/__tests__/banned-patterns.test.js +272 -0
  12. package/dist/v2/__tests__/banned-patterns.test.js.map +1 -0
  13. package/dist/v2/__tests__/contrast-palette.test.js +225 -0
  14. package/dist/v2/__tests__/contrast-palette.test.js.map +1 -0
  15. package/dist/v2/__tests__/cssVariables.test.js +158 -0
  16. package/dist/v2/__tests__/cssVariables.test.js.map +1 -0
  17. package/dist/v2/__tests__/labels-merge.test.js +153 -0
  18. package/dist/v2/__tests__/labels-merge.test.js.map +1 -0
  19. package/dist/v2/__tests__/locale-fallback.test.js +111 -0
  20. package/dist/v2/__tests__/locale-fallback.test.js.map +1 -0
  21. package/dist/v2/__tests__/useFocusTrap.test.js +517 -0
  22. package/dist/v2/__tests__/useFocusTrap.test.js.map +1 -0
  23. package/dist/v2/components/Accordion.d.ts +56 -0
  24. package/dist/v2/components/Accordion.d.ts.map +1 -0
  25. package/dist/v2/components/Accordion.js +238 -0
  26. package/dist/v2/components/Accordion.js.map +1 -0
  27. package/dist/v2/components/ActionStrip.d.ts +67 -0
  28. package/dist/v2/components/ActionStrip.d.ts.map +1 -0
  29. package/dist/v2/components/ActionStrip.js +154 -0
  30. package/dist/v2/components/ActionStrip.js.map +1 -0
  31. package/dist/v2/components/Banner.d.ts +49 -0
  32. package/dist/v2/components/Banner.d.ts.map +1 -0
  33. package/dist/v2/components/Banner.js +183 -0
  34. package/dist/v2/components/Banner.js.map +1 -0
  35. package/dist/v2/components/Busy.d.ts +18 -0
  36. package/dist/v2/components/Busy.d.ts.map +1 -0
  37. package/dist/v2/components/Busy.js +104 -0
  38. package/dist/v2/components/Busy.js.map +1 -0
  39. package/dist/v2/components/Button.d.ts +36 -0
  40. package/dist/v2/components/Button.d.ts.map +1 -0
  41. package/dist/v2/components/Button.js +122 -0
  42. package/dist/v2/components/Button.js.map +1 -0
  43. package/dist/v2/components/CategoryTag.d.ts +45 -0
  44. package/dist/v2/components/CategoryTag.d.ts.map +1 -0
  45. package/dist/v2/components/CategoryTag.js +89 -0
  46. package/dist/v2/components/CategoryTag.js.map +1 -0
  47. package/dist/v2/components/Checkbox.d.ts +59 -0
  48. package/dist/v2/components/Checkbox.d.ts.map +1 -0
  49. package/dist/v2/components/Checkbox.js +134 -0
  50. package/dist/v2/components/Checkbox.js.map +1 -0
  51. package/dist/v2/components/Chip.d.ts +48 -0
  52. package/dist/v2/components/Chip.d.ts.map +1 -0
  53. package/dist/v2/components/Chip.js +131 -0
  54. package/dist/v2/components/Chip.js.map +1 -0
  55. package/dist/v2/components/Combobox.d.ts +134 -0
  56. package/dist/v2/components/Combobox.d.ts.map +1 -0
  57. package/dist/v2/components/Combobox.js +399 -0
  58. package/dist/v2/components/Combobox.js.map +1 -0
  59. package/dist/v2/components/CommandPalette.d.ts +36 -0
  60. package/dist/v2/components/CommandPalette.d.ts.map +1 -0
  61. package/dist/v2/components/CommandPalette.js +672 -0
  62. package/dist/v2/components/CommandPalette.js.map +1 -0
  63. package/dist/v2/components/ConfirmDialog.d.ts +23 -0
  64. package/dist/v2/components/ConfirmDialog.d.ts.map +1 -0
  65. package/dist/v2/components/ConfirmDialog.js +150 -0
  66. package/dist/v2/components/ConfirmDialog.js.map +1 -0
  67. package/dist/v2/components/DatePicker.d.ts +21 -0
  68. package/dist/v2/components/DatePicker.d.ts.map +1 -0
  69. package/dist/v2/components/DatePicker.js +207 -0
  70. package/dist/v2/components/DatePicker.js.map +1 -0
  71. package/dist/v2/components/DateRangePicker.d.ts +81 -0
  72. package/dist/v2/components/DateRangePicker.d.ts.map +1 -0
  73. package/dist/v2/components/DateRangePicker.js +295 -0
  74. package/dist/v2/components/DateRangePicker.js.map +1 -0
  75. package/dist/v2/components/DateTimePicker.d.ts +21 -0
  76. package/dist/v2/components/DateTimePicker.d.ts.map +1 -0
  77. package/dist/v2/components/DateTimePicker.js +189 -0
  78. package/dist/v2/components/DateTimePicker.js.map +1 -0
  79. package/dist/v2/components/Drawer.d.ts +34 -0
  80. package/dist/v2/components/Drawer.d.ts.map +1 -0
  81. package/dist/v2/components/Drawer.js +339 -0
  82. package/dist/v2/components/Drawer.js.map +1 -0
  83. package/dist/v2/components/Dropzone.d.ts +150 -0
  84. package/dist/v2/components/Dropzone.d.ts.map +1 -0
  85. package/dist/v2/components/Dropzone.js +539 -0
  86. package/dist/v2/components/Dropzone.js.map +1 -0
  87. package/dist/v2/components/EmptyState.d.ts +36 -0
  88. package/dist/v2/components/EmptyState.d.ts.map +1 -0
  89. package/dist/v2/components/EmptyState.js +112 -0
  90. package/dist/v2/components/EmptyState.js.map +1 -0
  91. package/dist/v2/components/FavoriteToggle.d.ts +22 -0
  92. package/dist/v2/components/FavoriteToggle.d.ts.map +1 -0
  93. package/dist/v2/components/FavoriteToggle.js +134 -0
  94. package/dist/v2/components/FavoriteToggle.js.map +1 -0
  95. package/dist/v2/components/Field.d.ts +58 -0
  96. package/dist/v2/components/Field.d.ts.map +1 -0
  97. package/dist/v2/components/Field.js +186 -0
  98. package/dist/v2/components/Field.js.map +1 -0
  99. package/dist/v2/components/FieldHelp.d.ts +54 -0
  100. package/dist/v2/components/FieldHelp.d.ts.map +1 -0
  101. package/dist/v2/components/FieldHelp.js +209 -0
  102. package/dist/v2/components/FieldHelp.js.map +1 -0
  103. package/dist/v2/components/FilterTab.d.ts +35 -0
  104. package/dist/v2/components/FilterTab.d.ts.map +1 -0
  105. package/dist/v2/components/FilterTab.js +144 -0
  106. package/dist/v2/components/FilterTab.js.map +1 -0
  107. package/dist/v2/components/ForbiddenPage.d.ts +40 -0
  108. package/dist/v2/components/ForbiddenPage.d.ts.map +1 -0
  109. package/dist/v2/components/ForbiddenPage.js +81 -0
  110. package/dist/v2/components/ForbiddenPage.js.map +1 -0
  111. package/dist/v2/components/FormGrid.d.ts +76 -0
  112. package/dist/v2/components/FormGrid.d.ts.map +1 -0
  113. package/dist/v2/components/FormGrid.js +177 -0
  114. package/dist/v2/components/FormGrid.js.map +1 -0
  115. package/dist/v2/components/FormikDisplay.d.ts +38 -0
  116. package/dist/v2/components/FormikDisplay.d.ts.map +1 -0
  117. package/dist/v2/components/FormikDisplay.js +125 -0
  118. package/dist/v2/components/FormikDisplay.js.map +1 -0
  119. package/dist/v2/components/Input.d.ts +62 -0
  120. package/dist/v2/components/Input.d.ts.map +1 -0
  121. package/dist/v2/components/Input.js +115 -0
  122. package/dist/v2/components/Input.js.map +1 -0
  123. package/dist/v2/components/KPICard.d.ts +22 -0
  124. package/dist/v2/components/KPICard.d.ts.map +1 -0
  125. package/dist/v2/components/KPICard.js +205 -0
  126. package/dist/v2/components/KPICard.js.map +1 -0
  127. package/dist/v2/components/KV.d.ts +25 -0
  128. package/dist/v2/components/KV.d.ts.map +1 -0
  129. package/dist/v2/components/KV.js +82 -0
  130. package/dist/v2/components/KV.js.map +1 -0
  131. package/dist/v2/components/KVGrid.d.ts +44 -0
  132. package/dist/v2/components/KVGrid.d.ts.map +1 -0
  133. package/dist/v2/components/KVGrid.js +73 -0
  134. package/dist/v2/components/KVGrid.js.map +1 -0
  135. package/dist/v2/components/Layout.d.ts +78 -0
  136. package/dist/v2/components/Layout.d.ts.map +1 -0
  137. package/dist/v2/components/Layout.js +284 -0
  138. package/dist/v2/components/Layout.js.map +1 -0
  139. package/dist/v2/components/MobileRowCard.d.ts +63 -0
  140. package/dist/v2/components/MobileRowCard.d.ts.map +1 -0
  141. package/dist/v2/components/MobileRowCard.js +321 -0
  142. package/dist/v2/components/MobileRowCard.js.map +1 -0
  143. package/dist/v2/components/Modal.d.ts +21 -0
  144. package/dist/v2/components/Modal.d.ts.map +1 -0
  145. package/dist/v2/components/Modal.js +281 -0
  146. package/dist/v2/components/Modal.js.map +1 -0
  147. package/dist/v2/components/NetworkErrorPage.d.ts +11 -0
  148. package/dist/v2/components/NetworkErrorPage.d.ts.map +1 -0
  149. package/dist/v2/components/NetworkErrorPage.js +86 -0
  150. package/dist/v2/components/NetworkErrorPage.js.map +1 -0
  151. package/dist/v2/components/NotFoundPage.d.ts +9 -0
  152. package/dist/v2/components/NotFoundPage.d.ts.map +1 -0
  153. package/dist/v2/components/NotFoundPage.js +66 -0
  154. package/dist/v2/components/NotFoundPage.js.map +1 -0
  155. package/dist/v2/components/NumberInput.d.ts +83 -0
  156. package/dist/v2/components/NumberInput.d.ts.map +1 -0
  157. package/dist/v2/components/NumberInput.js +316 -0
  158. package/dist/v2/components/NumberInput.js.map +1 -0
  159. package/dist/v2/components/OverflowMenu.d.ts +55 -0
  160. package/dist/v2/components/OverflowMenu.d.ts.map +1 -0
  161. package/dist/v2/components/OverflowMenu.js +196 -0
  162. package/dist/v2/components/OverflowMenu.js.map +1 -0
  163. package/dist/v2/components/PdfViewer.d.ts +56 -0
  164. package/dist/v2/components/PdfViewer.d.ts.map +1 -0
  165. package/dist/v2/components/PdfViewer.js +132 -0
  166. package/dist/v2/components/PdfViewer.js.map +1 -0
  167. package/dist/v2/components/ProgressBar.d.ts +53 -0
  168. package/dist/v2/components/ProgressBar.d.ts.map +1 -0
  169. package/dist/v2/components/ProgressBar.js +209 -0
  170. package/dist/v2/components/ProgressBar.js.map +1 -0
  171. package/dist/v2/components/Radio.d.ts +78 -0
  172. package/dist/v2/components/Radio.d.ts.map +1 -0
  173. package/dist/v2/components/Radio.js +238 -0
  174. package/dist/v2/components/Radio.js.map +1 -0
  175. package/dist/v2/components/SectionHeader.d.ts +53 -0
  176. package/dist/v2/components/SectionHeader.d.ts.map +1 -0
  177. package/dist/v2/components/SectionHeader.js +140 -0
  178. package/dist/v2/components/SectionHeader.js.map +1 -0
  179. package/dist/v2/components/Segmented.d.ts +61 -0
  180. package/dist/v2/components/Segmented.d.ts.map +1 -0
  181. package/dist/v2/components/Segmented.js +261 -0
  182. package/dist/v2/components/Segmented.js.map +1 -0
  183. package/dist/v2/components/Select.d.ts +72 -0
  184. package/dist/v2/components/Select.d.ts.map +1 -0
  185. package/dist/v2/components/Select.js +382 -0
  186. package/dist/v2/components/Select.js.map +1 -0
  187. package/dist/v2/components/ServerErrorPage.d.ts +11 -0
  188. package/dist/v2/components/ServerErrorPage.d.ts.map +1 -0
  189. package/dist/v2/components/ServerErrorPage.js +82 -0
  190. package/dist/v2/components/ServerErrorPage.js.map +1 -0
  191. package/dist/v2/components/Skeleton.d.ts +56 -0
  192. package/dist/v2/components/Skeleton.d.ts.map +1 -0
  193. package/dist/v2/components/Skeleton.js +281 -0
  194. package/dist/v2/components/Skeleton.js.map +1 -0
  195. package/dist/v2/components/SkipLink.d.ts +30 -0
  196. package/dist/v2/components/SkipLink.d.ts.map +1 -0
  197. package/dist/v2/components/SkipLink.js +58 -0
  198. package/dist/v2/components/SkipLink.js.map +1 -0
  199. package/dist/v2/components/Spinner.d.ts +40 -0
  200. package/dist/v2/components/Spinner.d.ts.map +1 -0
  201. package/dist/v2/components/Spinner.js +76 -0
  202. package/dist/v2/components/Spinner.js.map +1 -0
  203. package/dist/v2/components/Status.d.ts +42 -0
  204. package/dist/v2/components/Status.d.ts.map +1 -0
  205. package/dist/v2/components/Status.js +71 -0
  206. package/dist/v2/components/Status.js.map +1 -0
  207. package/dist/v2/components/Stepper.d.ts +136 -0
  208. package/dist/v2/components/Stepper.d.ts.map +1 -0
  209. package/dist/v2/components/Stepper.js +415 -0
  210. package/dist/v2/components/Stepper.js.map +1 -0
  211. package/dist/v2/components/Switch.d.ts +30 -0
  212. package/dist/v2/components/Switch.d.ts.map +1 -0
  213. package/dist/v2/components/Switch.js +136 -0
  214. package/dist/v2/components/Switch.js.map +1 -0
  215. package/dist/v2/components/Tabs.d.ts +49 -0
  216. package/dist/v2/components/Tabs.d.ts.map +1 -0
  217. package/dist/v2/components/Tabs.js +160 -0
  218. package/dist/v2/components/Tabs.js.map +1 -0
  219. package/dist/v2/components/TelInput.d.ts +33 -0
  220. package/dist/v2/components/TelInput.d.ts.map +1 -0
  221. package/dist/v2/components/TelInput.js +282 -0
  222. package/dist/v2/components/TelInput.js.map +1 -0
  223. package/dist/v2/components/Textarea.d.ts +23 -0
  224. package/dist/v2/components/Textarea.d.ts.map +1 -0
  225. package/dist/v2/components/Textarea.js +80 -0
  226. package/dist/v2/components/Textarea.js.map +1 -0
  227. package/dist/v2/components/TimePicker.d.ts +21 -0
  228. package/dist/v2/components/TimePicker.d.ts.map +1 -0
  229. package/dist/v2/components/TimePicker.js +141 -0
  230. package/dist/v2/components/TimePicker.js.map +1 -0
  231. package/dist/v2/components/Toast.d.ts +32 -0
  232. package/dist/v2/components/Toast.d.ts.map +1 -0
  233. package/dist/v2/components/Toast.js +384 -0
  234. package/dist/v2/components/Toast.js.map +1 -0
  235. package/dist/v2/components/Tooltip.d.ts +9 -0
  236. package/dist/v2/components/Tooltip.d.ts.map +1 -0
  237. package/dist/v2/components/Tooltip.js +169 -0
  238. package/dist/v2/components/Tooltip.js.map +1 -0
  239. package/dist/v2/components/_ErrorPageBody.d.ts +48 -0
  240. package/dist/v2/components/_ErrorPageBody.d.ts.map +1 -0
  241. package/dist/v2/components/_ErrorPageBody.js +96 -0
  242. package/dist/v2/components/_ErrorPageBody.js.map +1 -0
  243. package/dist/v2/components/_pickerShared.d.ts +47 -0
  244. package/dist/v2/components/_pickerShared.d.ts.map +1 -0
  245. package/dist/v2/components/_pickerShared.js +68 -0
  246. package/dist/v2/components/_pickerShared.js.map +1 -0
  247. package/dist/v2/components/index.d.ts +83 -0
  248. package/dist/v2/components/index.d.ts.map +1 -0
  249. package/dist/v2/components/index.js +477 -0
  250. package/dist/v2/components/index.js.map +1 -0
  251. package/dist/v2/hooks/index.d.ts +11 -0
  252. package/dist/v2/hooks/index.d.ts.map +1 -0
  253. package/dist/v2/hooks/index.js +85 -0
  254. package/dist/v2/hooks/index.js.map +1 -0
  255. package/dist/v2/hooks/useDelayedFlag.d.ts +22 -0
  256. package/dist/v2/hooks/useDelayedFlag.d.ts.map +1 -0
  257. package/dist/v2/hooks/useDelayedFlag.js +60 -0
  258. package/dist/v2/hooks/useDelayedFlag.js.map +1 -0
  259. package/dist/v2/hooks/useDensity.d.ts +23 -0
  260. package/dist/v2/hooks/useDensity.d.ts.map +1 -0
  261. package/dist/v2/hooks/useDensity.js +124 -0
  262. package/dist/v2/hooks/useDensity.js.map +1 -0
  263. package/dist/v2/hooks/useFocusFirstError.d.ts +121 -0
  264. package/dist/v2/hooks/useFocusFirstError.d.ts.map +1 -0
  265. package/dist/v2/hooks/useFocusFirstError.js +203 -0
  266. package/dist/v2/hooks/useFocusFirstError.js.map +1 -0
  267. package/dist/v2/hooks/useFocusTrap.d.ts +3 -0
  268. package/dist/v2/hooks/useFocusTrap.d.ts.map +1 -0
  269. package/dist/v2/hooks/useFocusTrap.js +207 -0
  270. package/dist/v2/hooks/useFocusTrap.js.map +1 -0
  271. package/dist/v2/hooks/useFormAutoSave.d.ts +42 -0
  272. package/dist/v2/hooks/useFormAutoSave.d.ts.map +1 -0
  273. package/dist/v2/hooks/useFormAutoSave.js +186 -0
  274. package/dist/v2/hooks/useFormAutoSave.js.map +1 -0
  275. package/dist/v2/hooks/useFormCompletionProgress.d.ts +52 -0
  276. package/dist/v2/hooks/useFormCompletionProgress.d.ts.map +1 -0
  277. package/dist/v2/hooks/useFormCompletionProgress.js +136 -0
  278. package/dist/v2/hooks/useFormCompletionProgress.js.map +1 -0
  279. package/dist/v2/hooks/useResolvedDensity.d.ts +31 -0
  280. package/dist/v2/hooks/useResolvedDensity.d.ts.map +1 -0
  281. package/dist/v2/hooks/useResolvedDensity.js +50 -0
  282. package/dist/v2/hooks/useResolvedDensity.js.map +1 -0
  283. package/dist/v2/hooks/useSortedRows.d.ts +25 -0
  284. package/dist/v2/hooks/useSortedRows.d.ts.map +1 -0
  285. package/dist/v2/hooks/useSortedRows.js +38 -0
  286. package/dist/v2/hooks/useSortedRows.js.map +1 -0
  287. package/dist/v2/hooks/useTabLoading.d.ts +39 -0
  288. package/dist/v2/hooks/useTabLoading.d.ts.map +1 -0
  289. package/dist/v2/hooks/useTabLoading.js +85 -0
  290. package/dist/v2/hooks/useTabLoading.js.map +1 -0
  291. package/dist/v2/index.d.ts +115 -0
  292. package/dist/v2/index.d.ts.map +1 -0
  293. package/dist/v2/index.js +1127 -0
  294. package/dist/v2/index.js.map +1 -0
  295. package/dist/v2/modalContext.d.ts +96 -0
  296. package/dist/v2/modalContext.d.ts.map +1 -0
  297. package/dist/v2/modalContext.js +113 -0
  298. package/dist/v2/modalContext.js.map +1 -0
  299. package/dist/v2/models/favorite.d.ts +14 -0
  300. package/dist/v2/models/favorite.d.ts.map +1 -0
  301. package/dist/v2/models/favorite.js +6 -0
  302. package/dist/v2/models/favorite.js.map +1 -0
  303. package/dist/v2/models/index.d.ts +11 -0
  304. package/dist/v2/models/index.d.ts.map +1 -0
  305. package/dist/v2/models/index.js +50 -0
  306. package/dist/v2/models/index.js.map +1 -0
  307. package/dist/v2/models/personalization.d.ts +65 -0
  308. package/dist/v2/models/personalization.d.ts.map +1 -0
  309. package/dist/v2/models/personalization.js +6 -0
  310. package/dist/v2/models/personalization.js.map +1 -0
  311. package/dist/v2/models/referentiel.d.ts +67 -0
  312. package/dist/v2/models/referentiel.d.ts.map +1 -0
  313. package/dist/v2/models/referentiel.js +6 -0
  314. package/dist/v2/models/referentiel.js.map +1 -0
  315. package/dist/v2/models/savedFilter.d.ts +22 -0
  316. package/dist/v2/models/savedFilter.d.ts.map +1 -0
  317. package/dist/v2/models/savedFilter.js +6 -0
  318. package/dist/v2/models/savedFilter.js.map +1 -0
  319. package/dist/v2/patterns/ActionBar.d.ts +137 -0
  320. package/dist/v2/patterns/ActionBar.d.ts.map +1 -0
  321. package/dist/v2/patterns/ActionBar.js +601 -0
  322. package/dist/v2/patterns/ActionBar.js.map +1 -0
  323. package/dist/v2/patterns/BulkActionBar.d.ts +63 -0
  324. package/dist/v2/patterns/BulkActionBar.d.ts.map +1 -0
  325. package/dist/v2/patterns/BulkActionBar.js +153 -0
  326. package/dist/v2/patterns/BulkActionBar.js.map +1 -0
  327. package/dist/v2/patterns/CollapsibleDataGrid.d.ts +62 -0
  328. package/dist/v2/patterns/CollapsibleDataGrid.d.ts.map +1 -0
  329. package/dist/v2/patterns/CollapsibleDataGrid.js +306 -0
  330. package/dist/v2/patterns/CollapsibleDataGrid.js.map +1 -0
  331. package/dist/v2/patterns/ColumnsToggle.d.ts +55 -0
  332. package/dist/v2/patterns/ColumnsToggle.d.ts.map +1 -0
  333. package/dist/v2/patterns/ColumnsToggle.js +314 -0
  334. package/dist/v2/patterns/ColumnsToggle.js.map +1 -0
  335. package/dist/v2/patterns/DataGrid.d.ts +7 -0
  336. package/dist/v2/patterns/DataGrid.d.ts.map +1 -0
  337. package/dist/v2/patterns/DataGrid.js +834 -0
  338. package/dist/v2/patterns/DataGrid.js.map +1 -0
  339. package/dist/v2/patterns/DataGridSettingsMenu.d.ts +68 -0
  340. package/dist/v2/patterns/DataGridSettingsMenu.d.ts.map +1 -0
  341. package/dist/v2/patterns/DataGridSettingsMenu.js +381 -0
  342. package/dist/v2/patterns/DataGridSettingsMenu.js.map +1 -0
  343. package/dist/v2/patterns/DataGridToolbar.d.ts +81 -0
  344. package/dist/v2/patterns/DataGridToolbar.d.ts.map +1 -0
  345. package/dist/v2/patterns/DataGridToolbar.js +255 -0
  346. package/dist/v2/patterns/DataGridToolbar.js.map +1 -0
  347. package/dist/v2/patterns/DataGridVirtualized.d.ts +76 -0
  348. package/dist/v2/patterns/DataGridVirtualized.d.ts.map +1 -0
  349. package/dist/v2/patterns/DataGridVirtualized.js +528 -0
  350. package/dist/v2/patterns/DataGridVirtualized.js.map +1 -0
  351. package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts +46 -0
  352. package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts.map +1 -0
  353. package/dist/v2/patterns/DeleteResourceConfirmDialog.js +77 -0
  354. package/dist/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -0
  355. package/dist/v2/patterns/FavoriteColumn.d.ts +72 -0
  356. package/dist/v2/patterns/FavoriteColumn.d.ts.map +1 -0
  357. package/dist/v2/patterns/FavoriteColumn.js +171 -0
  358. package/dist/v2/patterns/FavoriteColumn.js.map +1 -0
  359. package/dist/v2/patterns/FavoritesFilter.d.ts +51 -0
  360. package/dist/v2/patterns/FavoritesFilter.d.ts.map +1 -0
  361. package/dist/v2/patterns/FavoritesFilter.js +97 -0
  362. package/dist/v2/patterns/FavoritesFilter.js.map +1 -0
  363. package/dist/v2/patterns/FormErrorSummary.d.ts +39 -0
  364. package/dist/v2/patterns/FormErrorSummary.d.ts.map +1 -0
  365. package/dist/v2/patterns/FormErrorSummary.js +111 -0
  366. package/dist/v2/patterns/FormErrorSummary.js.map +1 -0
  367. package/dist/v2/patterns/FormPageShell.d.ts +55 -0
  368. package/dist/v2/patterns/FormPageShell.d.ts.map +1 -0
  369. package/dist/v2/patterns/FormPageShell.js +133 -0
  370. package/dist/v2/patterns/FormPageShell.js.map +1 -0
  371. package/dist/v2/patterns/FormSection.d.ts +53 -0
  372. package/dist/v2/patterns/FormSection.d.ts.map +1 -0
  373. package/dist/v2/patterns/FormSection.js +162 -0
  374. package/dist/v2/patterns/FormSection.js.map +1 -0
  375. package/dist/v2/patterns/FormikCheckboxGroup.d.ts +51 -0
  376. package/dist/v2/patterns/FormikCheckboxGroup.d.ts.map +1 -0
  377. package/dist/v2/patterns/FormikCheckboxGroup.js +117 -0
  378. package/dist/v2/patterns/FormikCheckboxGroup.js.map +1 -0
  379. package/dist/v2/patterns/FormikCombobox.d.ts +43 -0
  380. package/dist/v2/patterns/FormikCombobox.d.ts.map +1 -0
  381. package/dist/v2/patterns/FormikCombobox.js +121 -0
  382. package/dist/v2/patterns/FormikCombobox.js.map +1 -0
  383. package/dist/v2/patterns/FormikDatePicker.d.ts +87 -0
  384. package/dist/v2/patterns/FormikDatePicker.d.ts.map +1 -0
  385. package/dist/v2/patterns/FormikDatePicker.js +177 -0
  386. package/dist/v2/patterns/FormikDatePicker.js.map +1 -0
  387. package/dist/v2/patterns/FormikErrorFocus.d.ts +59 -0
  388. package/dist/v2/patterns/FormikErrorFocus.d.ts.map +1 -0
  389. package/dist/v2/patterns/FormikErrorFocus.js +83 -0
  390. package/dist/v2/patterns/FormikErrorFocus.js.map +1 -0
  391. package/dist/v2/patterns/FormikFile.d.ts +43 -0
  392. package/dist/v2/patterns/FormikFile.d.ts.map +1 -0
  393. package/dist/v2/patterns/FormikFile.js +156 -0
  394. package/dist/v2/patterns/FormikFile.js.map +1 -0
  395. package/dist/v2/patterns/FormikInput.d.ts +37 -0
  396. package/dist/v2/patterns/FormikInput.d.ts.map +1 -0
  397. package/dist/v2/patterns/FormikInput.js +87 -0
  398. package/dist/v2/patterns/FormikInput.js.map +1 -0
  399. package/dist/v2/patterns/FormikReferentielField.d.ts +33 -0
  400. package/dist/v2/patterns/FormikReferentielField.d.ts.map +1 -0
  401. package/dist/v2/patterns/FormikReferentielField.js +124 -0
  402. package/dist/v2/patterns/FormikReferentielField.js.map +1 -0
  403. package/dist/v2/patterns/FormikSelect.d.ts +40 -0
  404. package/dist/v2/patterns/FormikSelect.d.ts.map +1 -0
  405. package/dist/v2/patterns/FormikSelect.js +139 -0
  406. package/dist/v2/patterns/FormikSelect.js.map +1 -0
  407. package/dist/v2/patterns/FormikTextarea.d.ts +31 -0
  408. package/dist/v2/patterns/FormikTextarea.d.ts.map +1 -0
  409. package/dist/v2/patterns/FormikTextarea.js +84 -0
  410. package/dist/v2/patterns/FormikTextarea.js.map +1 -0
  411. package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts +44 -0
  412. package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts.map +1 -0
  413. package/dist/v2/patterns/KeyboardShortcutsHelp.js +207 -0
  414. package/dist/v2/patterns/KeyboardShortcutsHelp.js.map +1 -0
  415. package/dist/v2/patterns/NetworkErrorBanner.d.ts +26 -0
  416. package/dist/v2/patterns/NetworkErrorBanner.d.ts.map +1 -0
  417. package/dist/v2/patterns/NetworkErrorBanner.js +82 -0
  418. package/dist/v2/patterns/NetworkErrorBanner.js.map +1 -0
  419. package/dist/v2/patterns/PageContent.d.ts +40 -0
  420. package/dist/v2/patterns/PageContent.d.ts.map +1 -0
  421. package/dist/v2/patterns/PageContent.js +69 -0
  422. package/dist/v2/patterns/PageContent.js.map +1 -0
  423. package/dist/v2/patterns/ReferentielField.d.ts +118 -0
  424. package/dist/v2/patterns/ReferentielField.d.ts.map +1 -0
  425. package/dist/v2/patterns/ReferentielField.js +617 -0
  426. package/dist/v2/patterns/ReferentielField.js.map +1 -0
  427. package/dist/v2/patterns/SaveFilterDialog.d.ts +68 -0
  428. package/dist/v2/patterns/SaveFilterDialog.d.ts.map +1 -0
  429. package/dist/v2/patterns/SaveFilterDialog.js +203 -0
  430. package/dist/v2/patterns/SaveFilterDialog.js.map +1 -0
  431. package/dist/v2/patterns/SavedFiltersMenu.d.ts +74 -0
  432. package/dist/v2/patterns/SavedFiltersMenu.d.ts.map +1 -0
  433. package/dist/v2/patterns/SavedFiltersMenu.js +412 -0
  434. package/dist/v2/patterns/SavedFiltersMenu.js.map +1 -0
  435. package/dist/v2/patterns/SkeletonPageShell.d.ts +76 -0
  436. package/dist/v2/patterns/SkeletonPageShell.d.ts.map +1 -0
  437. package/dist/v2/patterns/SkeletonPageShell.js +347 -0
  438. package/dist/v2/patterns/SkeletonPageShell.js.map +1 -0
  439. package/dist/v2/patterns/SortableHeader.d.ts +47 -0
  440. package/dist/v2/patterns/SortableHeader.d.ts.map +1 -0
  441. package/dist/v2/patterns/SortableHeader.js +193 -0
  442. package/dist/v2/patterns/SortableHeader.js.map +1 -0
  443. package/dist/v2/patterns/Tour.d.ts +55 -0
  444. package/dist/v2/patterns/Tour.d.ts.map +1 -0
  445. package/dist/v2/patterns/Tour.js +473 -0
  446. package/dist/v2/patterns/Tour.js.map +1 -0
  447. package/dist/v2/patterns/_dataGridShared.d.ts +125 -0
  448. package/dist/v2/patterns/_dataGridShared.d.ts.map +1 -0
  449. package/dist/v2/patterns/_dataGridShared.js +406 -0
  450. package/dist/v2/patterns/_dataGridShared.js.map +1 -0
  451. package/dist/v2/patterns/_sort.d.ts +22 -0
  452. package/dist/v2/patterns/_sort.d.ts.map +1 -0
  453. package/dist/v2/patterns/_sort.js +118 -0
  454. package/dist/v2/patterns/_sort.js.map +1 -0
  455. package/dist/v2/patterns/_useColumnReorder.d.ts +69 -0
  456. package/dist/v2/patterns/_useColumnReorder.d.ts.map +1 -0
  457. package/dist/v2/patterns/_useColumnReorder.js +264 -0
  458. package/dist/v2/patterns/_useColumnReorder.js.map +1 -0
  459. package/dist/v2/patterns/_useColumnResize.d.ts +49 -0
  460. package/dist/v2/patterns/_useColumnResize.d.ts.map +1 -0
  461. package/dist/v2/patterns/_useColumnResize.js +198 -0
  462. package/dist/v2/patterns/_useColumnResize.js.map +1 -0
  463. package/dist/v2/patterns/index.d.ts +62 -0
  464. package/dist/v2/patterns/index.d.ts.map +1 -0
  465. package/dist/v2/patterns/index.js +246 -0
  466. package/dist/v2/patterns/index.js.map +1 -0
  467. package/dist/v2/personalization/PersonalizationProvider.d.ts +80 -0
  468. package/dist/v2/personalization/PersonalizationProvider.d.ts.map +1 -0
  469. package/dist/v2/personalization/PersonalizationProvider.js +177 -0
  470. package/dist/v2/personalization/PersonalizationProvider.js.map +1 -0
  471. package/dist/v2/personalization/adapters/_storageKey.d.ts +35 -0
  472. package/dist/v2/personalization/adapters/_storageKey.d.ts.map +1 -0
  473. package/dist/v2/personalization/adapters/_storageKey.js +69 -0
  474. package/dist/v2/personalization/adapters/_storageKey.js.map +1 -0
  475. package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts +31 -0
  476. package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts.map +1 -0
  477. package/dist/v2/personalization/adapters/createLocalStorageAdapter.js +128 -0
  478. package/dist/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -0
  479. package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts +25 -0
  480. package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts.map +1 -0
  481. package/dist/v2/personalization/adapters/createMemoryAdapter.js +76 -0
  482. package/dist/v2/personalization/adapters/createMemoryAdapter.js.map +1 -0
  483. package/dist/v2/personalization/adapters/index.d.ts +10 -0
  484. package/dist/v2/personalization/adapters/index.d.ts.map +1 -0
  485. package/dist/v2/personalization/adapters/index.js +21 -0
  486. package/dist/v2/personalization/adapters/index.js.map +1 -0
  487. package/dist/v2/personalization/capabilities/favorites.d.ts +53 -0
  488. package/dist/v2/personalization/capabilities/favorites.d.ts.map +1 -0
  489. package/dist/v2/personalization/capabilities/favorites.js +223 -0
  490. package/dist/v2/personalization/capabilities/favorites.js.map +1 -0
  491. package/dist/v2/personalization/capabilities/favoritesView.d.ts +58 -0
  492. package/dist/v2/personalization/capabilities/favoritesView.d.ts.map +1 -0
  493. package/dist/v2/personalization/capabilities/favoritesView.js +121 -0
  494. package/dist/v2/personalization/capabilities/favoritesView.js.map +1 -0
  495. package/dist/v2/personalization/capabilities/index.d.ts +16 -0
  496. package/dist/v2/personalization/capabilities/index.d.ts.map +1 -0
  497. package/dist/v2/personalization/capabilities/index.js +69 -0
  498. package/dist/v2/personalization/capabilities/index.js.map +1 -0
  499. package/dist/v2/personalization/capabilities/savedFilters.d.ts +61 -0
  500. package/dist/v2/personalization/capabilities/savedFilters.d.ts.map +1 -0
  501. package/dist/v2/personalization/capabilities/savedFilters.js +297 -0
  502. package/dist/v2/personalization/capabilities/savedFilters.js.map +1 -0
  503. package/dist/v2/personalization/createPersonalizationStore.d.ts +76 -0
  504. package/dist/v2/personalization/createPersonalizationStore.d.ts.map +1 -0
  505. package/dist/v2/personalization/createPersonalizationStore.js +475 -0
  506. package/dist/v2/personalization/createPersonalizationStore.js.map +1 -0
  507. package/dist/v2/personalization/index.d.ts +33 -0
  508. package/dist/v2/personalization/index.d.ts.map +1 -0
  509. package/dist/v2/personalization/index.js +111 -0
  510. package/dist/v2/personalization/index.js.map +1 -0
  511. package/dist/v2/personalization/personalizationContext.d.ts +78 -0
  512. package/dist/v2/personalization/personalizationContext.d.ts.map +1 -0
  513. package/dist/v2/personalization/personalizationContext.js +121 -0
  514. package/dist/v2/personalization/personalizationContext.js.map +1 -0
  515. package/dist/v2/personalization/schema.d.ts +60 -0
  516. package/dist/v2/personalization/schema.d.ts.map +1 -0
  517. package/dist/v2/personalization/schema.js +102 -0
  518. package/dist/v2/personalization/schema.js.map +1 -0
  519. package/dist/v2/personalization/types.d.ts +81 -0
  520. package/dist/v2/personalization/types.d.ts.map +1 -0
  521. package/dist/v2/personalization/types.js +6 -0
  522. package/dist/v2/personalization/types.js.map +1 -0
  523. package/dist/v2/referentiel/ReferentielProvider.d.ts +53 -0
  524. package/dist/v2/referentiel/ReferentielProvider.d.ts.map +1 -0
  525. package/dist/v2/referentiel/ReferentielProvider.js +94 -0
  526. package/dist/v2/referentiel/ReferentielProvider.js.map +1 -0
  527. package/dist/v2/referentiel/index.d.ts +18 -0
  528. package/dist/v2/referentiel/index.d.ts.map +1 -0
  529. package/dist/v2/referentiel/index.js +44 -0
  530. package/dist/v2/referentiel/index.js.map +1 -0
  531. package/dist/v2/referentiel/useReferentielClient.d.ts +15 -0
  532. package/dist/v2/referentiel/useReferentielClient.d.ts.map +1 -0
  533. package/dist/v2/referentiel/useReferentielClient.js +46 -0
  534. package/dist/v2/referentiel/useReferentielClient.js.map +1 -0
  535. package/dist/v2/referentiel/useReferentielOptions.d.ts +40 -0
  536. package/dist/v2/referentiel/useReferentielOptions.d.ts.map +1 -0
  537. package/dist/v2/referentiel/useReferentielOptions.js +177 -0
  538. package/dist/v2/referentiel/useReferentielOptions.js.map +1 -0
  539. package/dist/v2/referentiel/useReferentielSearch.d.ts +76 -0
  540. package/dist/v2/referentiel/useReferentielSearch.d.ts.map +1 -0
  541. package/dist/v2/referentiel/useReferentielSearch.js +140 -0
  542. package/dist/v2/referentiel/useReferentielSearch.js.map +1 -0
  543. package/dist/v2/styles/base.css +425 -0
  544. package/dist/v2/styles/css.d.ts +10 -0
  545. package/dist/v2/styles/index.d.ts +12 -0
  546. package/dist/v2/styles/index.d.ts.map +1 -0
  547. package/dist/v2/styles/index.js +4 -0
  548. package/dist/v2/styles/index.js.map +1 -0
  549. package/dist/v2/theme/_brand.d.ts +29 -0
  550. package/dist/v2/theme/_brand.d.ts.map +1 -0
  551. package/dist/v2/theme/_brand.js +69 -0
  552. package/dist/v2/theme/_brand.js.map +1 -0
  553. package/dist/v2/theme/_brandSecondary.d.ts +26 -0
  554. package/dist/v2/theme/_brandSecondary.d.ts.map +1 -0
  555. package/dist/v2/theme/_brandSecondary.js +65 -0
  556. package/dist/v2/theme/_brandSecondary.js.map +1 -0
  557. package/dist/v2/theme/createPortnetTheme.d.ts +50 -0
  558. package/dist/v2/theme/createPortnetTheme.d.ts.map +1 -0
  559. package/dist/v2/theme/createPortnetTheme.js +529 -0
  560. package/dist/v2/theme/createPortnetTheme.js.map +1 -0
  561. package/dist/v2/theme/cssVariables.d.ts +41 -0
  562. package/dist/v2/theme/cssVariables.d.ts.map +1 -0
  563. package/dist/v2/theme/cssVariables.js +205 -0
  564. package/dist/v2/theme/cssVariables.js.map +1 -0
  565. package/dist/v2/theme/index.d.ts +33 -0
  566. package/dist/v2/theme/index.d.ts.map +1 -0
  567. package/dist/v2/theme/index.js +60 -0
  568. package/dist/v2/theme/index.js.map +1 -0
  569. package/dist/v2/tokens/breakpoints.d.ts +74 -0
  570. package/dist/v2/tokens/breakpoints.d.ts.map +1 -0
  571. package/dist/v2/tokens/breakpoints.js +114 -0
  572. package/dist/v2/tokens/breakpoints.js.map +1 -0
  573. package/dist/v2/tokens/colors.d.ts +228 -0
  574. package/dist/v2/tokens/colors.d.ts.map +1 -0
  575. package/dist/v2/tokens/colors.js +225 -0
  576. package/dist/v2/tokens/colors.js.map +1 -0
  577. package/dist/v2/tokens/density.d.ts +142 -0
  578. package/dist/v2/tokens/density.d.ts.map +1 -0
  579. package/dist/v2/tokens/density.js +111 -0
  580. package/dist/v2/tokens/density.js.map +1 -0
  581. package/dist/v2/tokens/index.d.ts +556 -0
  582. package/dist/v2/tokens/index.d.ts.map +1 -0
  583. package/dist/v2/tokens/index.js +313 -0
  584. package/dist/v2/tokens/index.js.map +1 -0
  585. package/dist/v2/tokens/motion.d.ts +85 -0
  586. package/dist/v2/tokens/motion.d.ts.map +1 -0
  587. package/dist/v2/tokens/motion.js +94 -0
  588. package/dist/v2/tokens/motion.js.map +1 -0
  589. package/dist/v2/tokens/radius.d.ts +18 -0
  590. package/dist/v2/tokens/radius.d.ts.map +1 -0
  591. package/dist/v2/tokens/radius.js +28 -0
  592. package/dist/v2/tokens/radius.js.map +1 -0
  593. package/dist/v2/tokens/shadows.d.ts +25 -0
  594. package/dist/v2/tokens/shadows.d.ts.map +1 -0
  595. package/dist/v2/tokens/shadows.js +46 -0
  596. package/dist/v2/tokens/shadows.js.map +1 -0
  597. package/dist/v2/tokens/spacing.d.ts +38 -0
  598. package/dist/v2/tokens/spacing.d.ts.map +1 -0
  599. package/dist/v2/tokens/spacing.js +57 -0
  600. package/dist/v2/tokens/spacing.js.map +1 -0
  601. package/dist/v2/tokens/state.d.ts +40 -0
  602. package/dist/v2/tokens/state.d.ts.map +1 -0
  603. package/dist/v2/tokens/state.js +47 -0
  604. package/dist/v2/tokens/state.js.map +1 -0
  605. package/dist/v2/tokens/statusPalette.d.ts +54 -0
  606. package/dist/v2/tokens/statusPalette.d.ts.map +1 -0
  607. package/dist/v2/tokens/statusPalette.js +72 -0
  608. package/dist/v2/tokens/statusPalette.js.map +1 -0
  609. package/dist/v2/tokens/tokens.json +153 -0
  610. package/dist/v2/tokens/typography.d.ts +206 -0
  611. package/dist/v2/tokens/typography.d.ts.map +1 -0
  612. package/dist/v2/tokens/typography.js +155 -0
  613. package/dist/v2/tokens/typography.js.map +1 -0
  614. package/dist/v2/tokens/zIndex.d.ts +33 -0
  615. package/dist/v2/tokens/zIndex.d.ts.map +1 -0
  616. package/dist/v2/tokens/zIndex.js +50 -0
  617. package/dist/v2/tokens/zIndex.js.map +1 -0
  618. package/dist/v2/types/common.d.ts +24 -0
  619. package/dist/v2/types/common.d.ts.map +1 -0
  620. package/dist/v2/types/common.js +6 -0
  621. package/dist/v2/types/common.js.map +1 -0
  622. package/dist/v2/types/datagrid.d.ts +131 -0
  623. package/dist/v2/types/datagrid.d.ts.map +1 -0
  624. package/dist/v2/types/datagrid.js +6 -0
  625. package/dist/v2/types/datagrid.js.map +1 -0
  626. package/dist/v2/types/index.d.ts +11 -0
  627. package/dist/v2/types/index.d.ts.map +1 -0
  628. package/dist/v2/types/index.js +28 -0
  629. package/dist/v2/types/index.js.map +1 -0
  630. package/dist/v2/utils/apiError.d.ts +90 -0
  631. package/dist/v2/utils/apiError.d.ts.map +1 -0
  632. package/dist/v2/utils/apiError.js +227 -0
  633. package/dist/v2/utils/apiError.js.map +1 -0
  634. package/dist/v2/utils/contrast.d.ts +68 -0
  635. package/dist/v2/utils/contrast.d.ts.map +1 -0
  636. package/dist/v2/utils/contrast.js +167 -0
  637. package/dist/v2/utils/contrast.js.map +1 -0
  638. package/dist/v2/utils/cx.d.ts +9 -0
  639. package/dist/v2/utils/cx.d.ts.map +1 -0
  640. package/dist/v2/utils/cx.js +45 -0
  641. package/dist/v2/utils/cx.js.map +1 -0
  642. package/dist/v2/utils/fileDownload.d.ts +94 -0
  643. package/dist/v2/utils/fileDownload.d.ts.map +1 -0
  644. package/dist/v2/utils/fileDownload.js +236 -0
  645. package/dist/v2/utils/fileDownload.js.map +1 -0
  646. package/dist/v2/utils/fmtMoney.d.ts +28 -0
  647. package/dist/v2/utils/fmtMoney.d.ts.map +1 -0
  648. package/dist/v2/utils/fmtMoney.js +84 -0
  649. package/dist/v2/utils/fmtMoney.js.map +1 -0
  650. package/dist/v2/utils/index.d.ts +8 -0
  651. package/dist/v2/utils/index.d.ts.map +1 -0
  652. package/dist/v2/utils/index.js +90 -0
  653. package/dist/v2/utils/index.js.map +1 -0
  654. package/dist/v2/utils/networkStatus.d.ts +88 -0
  655. package/dist/v2/utils/networkStatus.d.ts.map +1 -0
  656. package/dist/v2/utils/networkStatus.js +121 -0
  657. package/dist/v2/utils/networkStatus.js.map +1 -0
  658. package/package.json +191 -73
  659. package/dist/api/guideApi.js +0 -12
  660. package/dist/api/guideImageService.js +0 -119
  661. package/dist/api/reclamationApi.js +0 -102
  662. package/dist/assets/guides/FAQ.json +0 -118
  663. package/dist/assets/guides/index.js +0 -11
  664. package/dist/assets/images/tijariaLogo.ico +0 -0
  665. package/dist/components/buttons/PuiButton.js +0 -217
  666. package/dist/components/buttons/PuiIconButton.js +0 -98
  667. package/dist/components/common/PuiAlertContext.js +0 -12
  668. package/dist/components/common/PuiHelpWidgetContext.js +0 -17
  669. package/dist/components/common/StyledMuiButton.js +0 -48
  670. package/dist/components/common/StyledMuiTextField.js +0 -180
  671. package/dist/components/inputs/PuiAutocomplete.js +0 -352
  672. package/dist/components/inputs/PuiCheckbox.js +0 -308
  673. package/dist/components/inputs/PuiCheckboxGroup.js +0 -215
  674. package/dist/components/inputs/PuiCheckboxItem.js +0 -162
  675. package/dist/components/inputs/PuiDateField.js +0 -280
  676. package/dist/components/inputs/PuiDateTimeField.js +0 -276
  677. package/dist/components/inputs/PuiFileField.js +0 -265
  678. package/dist/components/inputs/PuiRadioGroup.js +0 -197
  679. package/dist/components/inputs/PuiRadioItem.js +0 -100
  680. package/dist/components/inputs/PuiSelect.js +0 -427
  681. package/dist/components/inputs/PuiTextField.js +0 -263
  682. package/dist/components/others/PuiBadge.js +0 -58
  683. package/dist/components/others/PuiChip.js +0 -150
  684. package/dist/components/others/PuiDialog.js +0 -102
  685. package/dist/components/others/PuiFormikForm.js +0 -70
  686. package/dist/components/others/PuiGrid.js +0 -23
  687. package/dist/components/others/PuiIcon.js +0 -92
  688. package/dist/components/others/PuiLoadingBackdrop.js +0 -32
  689. package/dist/components/others/PuiMainContainer.js +0 -41
  690. package/dist/components/others/PuiNavigation.js +0 -68
  691. package/dist/components/others/PuiSection.js +0 -187
  692. package/dist/components/others/PuiTooltip.js +0 -86
  693. package/dist/components/providers/PuiAlertProvider.js +0 -134
  694. package/dist/components/providers/PuiHelpWidgetProvider.js +0 -91
  695. package/dist/components/providers/PuiLocalizationProvider.js +0 -34
  696. package/dist/components/referentiel/common/ReferetielContext.js +0 -12
  697. package/dist/components/referentiel/common/constants/specificReferentielsApis.js +0 -22
  698. package/dist/components/referentiel/common/constants/specificReferentielsBaseColumns.js +0 -691
  699. package/dist/components/referentiel/common/constants/specificReferentielsBaseFilters.js +0 -598
  700. package/dist/components/referentiel/common/constants/specificReferentielsInitialValues.js +0 -80
  701. package/dist/components/referentiel/common/constants/specificReferentielsKeys.js +0 -18
  702. package/dist/components/referentiel/common/constants/specificReferentielsTitles.js +0 -22
  703. package/dist/components/referentiel/common/constants/specificReferentielsValidationSchemas.js +0 -85
  704. package/dist/components/referentiel/components/PuiBasePopupReferentielField.js +0 -356
  705. package/dist/components/referentiel/components/PuiCustomPopupReferentielField.js +0 -181
  706. package/dist/components/referentiel/components/PuiSimplePopupReferentielField.js +0 -325
  707. package/dist/components/referentiel/components/PuiSimpleReferentielField.js +0 -203
  708. package/dist/components/referentiel/components/PuiSpecificReferentielField.js +0 -352
  709. package/dist/components/referentiel/providers/PuiReferentielProvider.js +0 -66
  710. package/dist/components/tab/PuiTab.js +0 -25
  711. package/dist/components/tab/PuiTabs.js +0 -148
  712. package/dist/components/table/PuiTable.js +0 -643
  713. package/dist/components/table/PuiTableAction.js +0 -75
  714. package/dist/components/typography/PuiDefinition.js +0 -42
  715. package/dist/components/typography/PuiIndication.js +0 -80
  716. package/dist/components/typography/PuiMainTitle.js +0 -144
  717. package/dist/components/ui/dialogs/PuiSearchDialog.js +0 -106
  718. package/dist/components/ui/pages/errors/PuiErrorBasePage.js +0 -73
  719. package/dist/components/ui/pages/errors/PuiForbiddenErrorPage.js +0 -36
  720. package/dist/components/ui/pages/errors/PuiNetworkErrorPage.js +0 -36
  721. package/dist/components/ui/pages/errors/PuiNotFoundErrorPage.js +0 -30
  722. package/dist/components/ui/pages/errors/PuiServerErrorPage.js +0 -37
  723. package/dist/components/ui/pages/general/PuiDefaultPage.js +0 -68
  724. package/dist/components/ui/pages/general/PuiSearchPage.js +0 -203
  725. package/dist/components/widgets/GuideImage.js +0 -251
  726. package/dist/components/widgets/PuiHelpWidget.js +0 -4153
  727. package/dist/config/apperance.js +0 -26
  728. package/dist/config/mapping.js +0 -26
  729. package/dist/config/referentiel.js +0 -10
  730. package/dist/general/yupValidationErrors.js +0 -8
  731. package/dist/hooks/useAlert.js +0 -19
  732. package/dist/hooks/useAxios.js +0 -23
  733. package/dist/hooks/useQuery.js +0 -21
  734. package/dist/hooks/useReclamation.js +0 -100
  735. package/dist/styles/ReclamationFormModal.css +0 -629
  736. package/dist/styles/help-widget.css +0 -621
@@ -0,0 +1,223 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.FAVORITES_CAPABILITY_ID = void 0;
7
+ exports.useFavorites = useFavorites;
8
+ exports.useIsFavorite = useIsFavorite;
9
+ var React = _interopRequireWildcard(require("react"));
10
+ var _schema = require("../schema");
11
+ var _personalizationContext = require("../personalizationContext");
12
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
15
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
17
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } /**
18
+ * favorites — Portnet UI v2 · personalization capability
19
+ *
20
+ * The Favorites framework. Self-registers the "favorites" capability with
21
+ * the schema registry at import time, so the capability-agnostic
22
+ * foundation discovers its schemaVersion / defaultState / migrate without
23
+ * any hardcoding.
24
+ *
25
+ * State model (the capability payload):
26
+ * { [resourceKey]: FavoriteRef[] } FavoriteRef = { id, addedAt }
27
+ *
28
+ * `resourceKey` namespaces favorites per list/entity type (e.g.
29
+ * "ti:list", "declarations:list"), so one user's favorites across
30
+ * different screens never collide. `id` is the business row id.
31
+ *
32
+ * Performance: the pure helpers below rebuild only the touched
33
+ * resourceKey's array and shallow-copy the map, so the store's structural
34
+ * sharing keeps every OTHER resource's list referentially stable —
35
+ * toggling a favorite on screen B does not re-render screen A, and a
36
+ * boolean per-row selector lets each grid cell re-render only when its own
37
+ * membership flips.
38
+ */
39
+ /** The favorites capability payload: favorites arrays keyed by resourceKey. */
40
+
41
+ var FAVORITES_CAPABILITY_ID = exports.FAVORITES_CAPABILITY_ID = "favorites";
42
+ var SCHEMA_VERSION = 1;
43
+ var EMPTY_LIST = Object.freeze([]);
44
+ var EMPTY_MAP = Object.freeze({});
45
+
46
+ /* Register at import time — the foundation reads this at hydration. */
47
+ (0, _schema.registerCapability)({
48
+ id: FAVORITES_CAPABILITY_ID,
49
+ schemaVersion: SCHEMA_VERSION,
50
+ defaultState: EMPTY_MAP,
51
+ // { [resourceKey]: FavoriteRef[] }
52
+ migrate: function migrateFavorites(_fromVersion, payload) {
53
+ // v1 is the initial schema. Defensive normalisation only.
54
+ return payload && _typeof(payload) === "object" ? payload : {};
55
+ }
56
+ });
57
+
58
+ /* ── pure, resourceKey-scoped state helpers (structural sharing) ────── */
59
+
60
+ function listFor(map, resourceKey) {
61
+ var list = map ? map[resourceKey] : undefined;
62
+ return Array.isArray(list) ? list : EMPTY_LIST;
63
+ }
64
+ function hasRef(map, resourceKey, id) {
65
+ var list = listFor(map, resourceKey);
66
+ var _iterator = _createForOfIteratorHelper(list),
67
+ _step;
68
+ try {
69
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
70
+ var ref = _step.value;
71
+ if (ref.id === id) return true;
72
+ }
73
+ } catch (err) {
74
+ _iterator.e(err);
75
+ } finally {
76
+ _iterator.f();
77
+ }
78
+ return false;
79
+ }
80
+ function addRef(map, resourceKey, id) {
81
+ var base = map || EMPTY_MAP;
82
+ if (hasRef(base, resourceKey, id)) return base; // no-op → store short-circuits
83
+ var nextList = listFor(base, resourceKey).concat([{
84
+ id: id,
85
+ addedAt: new Date().toISOString()
86
+ }]);
87
+ var next = Object.assign({}, base);
88
+ next[resourceKey] = nextList;
89
+ return next;
90
+ }
91
+ function removeRef(map, resourceKey, id) {
92
+ var base = map || EMPTY_MAP;
93
+ if (!hasRef(base, resourceKey, id)) return base; // no-op
94
+ var nextList = listFor(base, resourceKey).filter(function keep(r) {
95
+ return r.id !== id;
96
+ });
97
+ var next = Object.assign({}, base);
98
+ if (nextList.length === 0) delete next[resourceKey]; // keep the map tidy
99
+ else next[resourceKey] = nextList;
100
+ return next;
101
+ }
102
+ function toggleRef(map, resourceKey, id) {
103
+ return hasRef(map, resourceKey, id) ? removeRef(map, resourceKey, id) : addRef(map, resourceKey, id);
104
+ }
105
+ function clearRefs(map, resourceKey) {
106
+ var base = map || EMPTY_MAP;
107
+ if (!base[resourceKey]) return base;
108
+ var next = Object.assign({}, base);
109
+ delete next[resourceKey];
110
+ return next;
111
+ }
112
+
113
+ /* ── hooks ──────────────────────────────────────────────────────────── */
114
+
115
+ function useEnsureFavorites(store) {
116
+ React.useEffect(function ensure() {
117
+ store.ensureCapability(FAVORITES_CAPABILITY_ID);
118
+ }, [store]);
119
+ }
120
+ /**
121
+ * useFavorites(resourceKey) — list, membership and actions for one resource.
122
+ */
123
+ function useFavorites(resourceKey) {
124
+ var store = (0, _personalizationContext.usePersonalizationStore)();
125
+ useEnsureFavorites(store);
126
+ var selectList = React.useCallback(function selectList(snapshot) {
127
+ var slice = snapshot[FAVORITES_CAPABILITY_ID];
128
+ return slice ? listFor(slice, resourceKey) : EMPTY_LIST;
129
+ }, [resourceKey]);
130
+ var items = (0, _personalizationContext.useStoreSelector)(selectList);
131
+
132
+ // Stable while `items` is stable (structural sharing) → O(1) membership.
133
+ var ids = React.useMemo(function buildIdSet() {
134
+ var set = new Set();
135
+ var _iterator2 = _createForOfIteratorHelper(items),
136
+ _step2;
137
+ try {
138
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
139
+ var ref = _step2.value;
140
+ set.add(ref.id);
141
+ }
142
+ } catch (err) {
143
+ _iterator2.e(err);
144
+ } finally {
145
+ _iterator2.f();
146
+ }
147
+ return set;
148
+ }, [items]);
149
+ var add = React.useCallback(function add(id) {
150
+ store.write(FAVORITES_CAPABILITY_ID, function (prev) {
151
+ return addRef(prev, resourceKey, id);
152
+ });
153
+ }, [store, resourceKey]);
154
+ var remove = React.useCallback(function remove(id) {
155
+ store.write(FAVORITES_CAPABILITY_ID, function (prev) {
156
+ return removeRef(prev, resourceKey, id);
157
+ });
158
+ }, [store, resourceKey]);
159
+ var toggle = React.useCallback(function toggle(id) {
160
+ store.write(FAVORITES_CAPABILITY_ID, function (prev) {
161
+ return toggleRef(prev, resourceKey, id);
162
+ });
163
+ }, [store, resourceKey]);
164
+ var clear = React.useCallback(function clear() {
165
+ store.write(FAVORITES_CAPABILITY_ID, function (prev) {
166
+ return clearRefs(prev, resourceKey);
167
+ });
168
+ }, [store, resourceKey]);
169
+ var isFavorite = React.useCallback(function isFavorite(id) {
170
+ return ids.has(id);
171
+ }, [ids]);
172
+ return React.useMemo(function value() {
173
+ return {
174
+ items: items,
175
+ ids: ids,
176
+ count: items.length,
177
+ isFavorite: isFavorite,
178
+ add: add,
179
+ remove: remove,
180
+ toggle: toggle,
181
+ clear: clear
182
+ };
183
+ }, [items, ids, isFavorite, add, remove, toggle, clear]);
184
+ }
185
+ /**
186
+ * useIsFavorite(resourceKey, id) — focused per-row hook. Returns a boolean
187
+ * (Object.is bail-out: a row re-renders only when ITS membership flips)
188
+ * plus a bound toggle/add/remove. This is the cell-level hook the DataGrid
189
+ * favorite column consumes (Batch 5).
190
+ */
191
+ function useIsFavorite(resourceKey, id) {
192
+ var store = (0, _personalizationContext.usePersonalizationStore)();
193
+ useEnsureFavorites(store);
194
+ var selectIsFavorite = React.useCallback(function selectIsFavorite(snapshot) {
195
+ var slice = snapshot[FAVORITES_CAPABILITY_ID];
196
+ return slice ? hasRef(slice, resourceKey, id) : false;
197
+ }, [resourceKey, id]);
198
+ var isFavorite = (0, _personalizationContext.useStoreSelector)(selectIsFavorite);
199
+ var toggle = React.useCallback(function toggle() {
200
+ store.write(FAVORITES_CAPABILITY_ID, function (prev) {
201
+ return toggleRef(prev, resourceKey, id);
202
+ });
203
+ }, [store, resourceKey, id]);
204
+ var add = React.useCallback(function add() {
205
+ store.write(FAVORITES_CAPABILITY_ID, function (prev) {
206
+ return addRef(prev, resourceKey, id);
207
+ });
208
+ }, [store, resourceKey, id]);
209
+ var remove = React.useCallback(function remove() {
210
+ store.write(FAVORITES_CAPABILITY_ID, function (prev) {
211
+ return removeRef(prev, resourceKey, id);
212
+ });
213
+ }, [store, resourceKey, id]);
214
+ return React.useMemo(function value() {
215
+ return {
216
+ isFavorite: isFavorite,
217
+ toggle: toggle,
218
+ add: add,
219
+ remove: remove
220
+ };
221
+ }, [isFavorite, toggle, add, remove]);
222
+ }
223
+ //# sourceMappingURL=favorites.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"favorites.js","names":["React","_interopRequireWildcard","require","_schema","_personalizationContext","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","step","next","_e2","minLen","_arrayLikeToArray","toString","slice","constructor","name","from","test","arr","len","arr2","FAVORITES_CAPABILITY_ID","exports","SCHEMA_VERSION","EMPTY_LIST","freeze","EMPTY_MAP","registerCapability","id","schemaVersion","defaultState","migrate","migrateFavorites","_fromVersion","payload","listFor","map","resourceKey","list","undefined","hasRef","_iterator","_step","ref","addRef","base","nextList","concat","addedAt","Date","toISOString","assign","removeRef","filter","keep","r","toggleRef","clearRefs","useEnsureFavorites","store","useEffect","ensure","ensureCapability","useFavorites","usePersonalizationStore","selectList","useCallback","snapshot","items","useStoreSelector","ids","useMemo","buildIdSet","Set","_iterator2","_step2","add","write","prev","remove","toggle","clear","isFavorite","count","useIsFavorite","selectIsFavorite"],"sources":["../../../../src/lib/v2/personalization/capabilities/favorites.ts"],"sourcesContent":["/**\r\n * favorites — Portnet UI v2 · personalization capability\r\n *\r\n * The Favorites framework. Self-registers the \"favorites\" capability with\r\n * the schema registry at import time, so the capability-agnostic\r\n * foundation discovers its schemaVersion / defaultState / migrate without\r\n * any hardcoding.\r\n *\r\n * State model (the capability payload):\r\n * { [resourceKey]: FavoriteRef[] } FavoriteRef = { id, addedAt }\r\n *\r\n * `resourceKey` namespaces favorites per list/entity type (e.g.\r\n * \"ti:list\", \"declarations:list\"), so one user's favorites across\r\n * different screens never collide. `id` is the business row id.\r\n *\r\n * Performance: the pure helpers below rebuild only the touched\r\n * resourceKey's array and shallow-copy the map, so the store's structural\r\n * sharing keeps every OTHER resource's list referentially stable —\r\n * toggling a favorite on screen B does not re-render screen A, and a\r\n * boolean per-row selector lets each grid cell re-render only when its own\r\n * membership flips.\r\n */\r\n\r\nimport * as React from \"react\";\r\n\r\nimport { registerCapability } from \"../schema\";\r\nimport {\r\n usePersonalizationStore,\r\n useStoreSelector,\r\n} from \"../personalizationContext\";\r\nimport type {\r\n PersonalizationSnapshot,\r\n PersonalizationStore,\r\n} from \"../createPersonalizationStore\";\r\nimport type { FavoriteRef } from \"../types\";\r\nimport type { RowId } from \"../../types/common\";\r\n\r\n/** The favorites capability payload: favorites arrays keyed by resourceKey. */\r\ntype FavoritesState = Record<string, FavoriteRef[]>;\r\n\r\nexport const FAVORITES_CAPABILITY_ID = \"favorites\";\r\nconst SCHEMA_VERSION = 1;\r\n\r\nconst EMPTY_LIST: readonly FavoriteRef[] = Object.freeze([]);\r\nconst EMPTY_MAP: FavoritesState = Object.freeze({});\r\n\r\n/* Register at import time — the foundation reads this at hydration. */\r\nregisterCapability({\r\n id: FAVORITES_CAPABILITY_ID,\r\n schemaVersion: SCHEMA_VERSION,\r\n defaultState: EMPTY_MAP, // { [resourceKey]: FavoriteRef[] }\r\n migrate: function migrateFavorites(\r\n _fromVersion: number,\r\n payload: unknown\r\n ): unknown {\r\n // v1 is the initial schema. Defensive normalisation only.\r\n return payload && typeof payload === \"object\" ? payload : {};\r\n },\r\n});\r\n\r\n/* ── pure, resourceKey-scoped state helpers (structural sharing) ────── */\r\n\r\nfunction listFor(\r\n map: FavoritesState | null | undefined,\r\n resourceKey: string\r\n): readonly FavoriteRef[] {\r\n const list = map ? map[resourceKey] : undefined;\r\n return Array.isArray(list) ? list : EMPTY_LIST;\r\n}\r\n\r\nfunction hasRef(\r\n map: FavoritesState | null | undefined,\r\n resourceKey: string,\r\n id: RowId\r\n): boolean {\r\n const list = listFor(map, resourceKey);\r\n for (const ref of list) {\r\n if (ref.id === id) return true;\r\n }\r\n return false;\r\n}\r\n\r\nfunction addRef(\r\n map: FavoritesState | null | undefined,\r\n resourceKey: string,\r\n id: RowId\r\n): FavoritesState {\r\n const base = map || EMPTY_MAP;\r\n if (hasRef(base, resourceKey, id)) return base; // no-op → store short-circuits\r\n const nextList = listFor(base, resourceKey).concat([\r\n { id: id, addedAt: new Date().toISOString() },\r\n ]);\r\n const next: FavoritesState = Object.assign({}, base);\r\n next[resourceKey] = nextList;\r\n return next;\r\n}\r\n\r\nfunction removeRef(\r\n map: FavoritesState | null | undefined,\r\n resourceKey: string,\r\n id: RowId\r\n): FavoritesState {\r\n const base = map || EMPTY_MAP;\r\n if (!hasRef(base, resourceKey, id)) return base; // no-op\r\n const nextList = listFor(base, resourceKey).filter(function keep(r) {\r\n return r.id !== id;\r\n });\r\n const next: FavoritesState = Object.assign({}, base);\r\n if (nextList.length === 0) delete next[resourceKey]; // keep the map tidy\r\n else next[resourceKey] = nextList;\r\n return next;\r\n}\r\n\r\nfunction toggleRef(\r\n map: FavoritesState | null | undefined,\r\n resourceKey: string,\r\n id: RowId\r\n): FavoritesState {\r\n return hasRef(map, resourceKey, id)\r\n ? removeRef(map, resourceKey, id)\r\n : addRef(map, resourceKey, id);\r\n}\r\n\r\nfunction clearRefs(\r\n map: FavoritesState | null | undefined,\r\n resourceKey: string\r\n): FavoritesState {\r\n const base = map || EMPTY_MAP;\r\n if (!base[resourceKey]) return base;\r\n const next: FavoritesState = Object.assign({}, base);\r\n delete next[resourceKey];\r\n return next;\r\n}\r\n\r\n/* ── hooks ──────────────────────────────────────────────────────────── */\r\n\r\nfunction useEnsureFavorites(store: PersonalizationStore): void {\r\n React.useEffect(\r\n function ensure() {\r\n store.ensureCapability(FAVORITES_CAPABILITY_ID);\r\n },\r\n [store]\r\n );\r\n}\r\n\r\nexport interface UseFavoritesResult {\r\n items: readonly FavoriteRef[];\r\n ids: Set<RowId>;\r\n count: number;\r\n isFavorite: (id: RowId) => boolean;\r\n add: (id: RowId) => void;\r\n remove: (id: RowId) => void;\r\n toggle: (id: RowId) => void;\r\n clear: () => void;\r\n}\r\n\r\n/**\r\n * useFavorites(resourceKey) — list, membership and actions for one resource.\r\n */\r\nexport function useFavorites(resourceKey: string): UseFavoritesResult {\r\n const store = usePersonalizationStore();\r\n useEnsureFavorites(store);\r\n\r\n const selectList = React.useCallback(\r\n function selectList(snapshot: PersonalizationSnapshot): readonly FavoriteRef[] {\r\n const slice = snapshot[FAVORITES_CAPABILITY_ID] as\r\n | FavoritesState\r\n | undefined;\r\n return slice ? listFor(slice, resourceKey) : EMPTY_LIST;\r\n },\r\n [resourceKey]\r\n );\r\n const items = useStoreSelector(selectList);\r\n\r\n // Stable while `items` is stable (structural sharing) → O(1) membership.\r\n const ids = React.useMemo(\r\n function buildIdSet(): Set<RowId> {\r\n const set = new Set<RowId>();\r\n for (const ref of items) set.add(ref.id);\r\n return set;\r\n },\r\n [items]\r\n );\r\n\r\n const add = React.useCallback(\r\n function add(id: RowId): void {\r\n store.write<FavoritesState>(FAVORITES_CAPABILITY_ID, function (prev) {\r\n return addRef(prev, resourceKey, id);\r\n });\r\n },\r\n [store, resourceKey]\r\n );\r\n const remove = React.useCallback(\r\n function remove(id: RowId): void {\r\n store.write<FavoritesState>(FAVORITES_CAPABILITY_ID, function (prev) {\r\n return removeRef(prev, resourceKey, id);\r\n });\r\n },\r\n [store, resourceKey]\r\n );\r\n const toggle = React.useCallback(\r\n function toggle(id: RowId): void {\r\n store.write<FavoritesState>(FAVORITES_CAPABILITY_ID, function (prev) {\r\n return toggleRef(prev, resourceKey, id);\r\n });\r\n },\r\n [store, resourceKey]\r\n );\r\n const clear = React.useCallback(\r\n function clear(): void {\r\n store.write<FavoritesState>(FAVORITES_CAPABILITY_ID, function (prev) {\r\n return clearRefs(prev, resourceKey);\r\n });\r\n },\r\n [store, resourceKey]\r\n );\r\n const isFavorite = React.useCallback(\r\n function isFavorite(id: RowId): boolean {\r\n return ids.has(id);\r\n },\r\n [ids]\r\n );\r\n\r\n return React.useMemo(\r\n function value(): UseFavoritesResult {\r\n return {\r\n items: items,\r\n ids: ids,\r\n count: items.length,\r\n isFavorite: isFavorite,\r\n add: add,\r\n remove: remove,\r\n toggle: toggle,\r\n clear: clear,\r\n };\r\n },\r\n [items, ids, isFavorite, add, remove, toggle, clear]\r\n );\r\n}\r\n\r\nexport interface UseIsFavoriteResult {\r\n isFavorite: boolean;\r\n toggle: () => void;\r\n add: () => void;\r\n remove: () => void;\r\n}\r\n\r\n/**\r\n * useIsFavorite(resourceKey, id) — focused per-row hook. Returns a boolean\r\n * (Object.is bail-out: a row re-renders only when ITS membership flips)\r\n * plus a bound toggle/add/remove. This is the cell-level hook the DataGrid\r\n * favorite column consumes (Batch 5).\r\n */\r\nexport function useIsFavorite(\r\n resourceKey: string,\r\n id: RowId\r\n): UseIsFavoriteResult {\r\n const store = usePersonalizationStore();\r\n useEnsureFavorites(store);\r\n\r\n const selectIsFavorite = React.useCallback(\r\n function selectIsFavorite(snapshot: PersonalizationSnapshot): boolean {\r\n const slice = snapshot[FAVORITES_CAPABILITY_ID] as\r\n | FavoritesState\r\n | undefined;\r\n return slice ? hasRef(slice, resourceKey, id) : false;\r\n },\r\n [resourceKey, id]\r\n );\r\n const isFavorite = useStoreSelector(selectIsFavorite);\r\n\r\n const toggle = React.useCallback(\r\n function toggle(): void {\r\n store.write<FavoritesState>(FAVORITES_CAPABILITY_ID, function (prev) {\r\n return toggleRef(prev, resourceKey, id);\r\n });\r\n },\r\n [store, resourceKey, id]\r\n );\r\n const add = React.useCallback(\r\n function add(): void {\r\n store.write<FavoritesState>(FAVORITES_CAPABILITY_ID, function (prev) {\r\n return addRef(prev, resourceKey, id);\r\n });\r\n },\r\n [store, resourceKey, id]\r\n );\r\n const remove = React.useCallback(\r\n function remove(): void {\r\n store.write<FavoritesState>(FAVORITES_CAPABILITY_ID, function (prev) {\r\n return removeRef(prev, resourceKey, id);\r\n });\r\n },\r\n [store, resourceKey, id]\r\n );\r\n\r\n return React.useMemo(\r\n function value(): UseIsFavoriteResult {\r\n return {\r\n isFavorite: isFavorite,\r\n toggle: toggle,\r\n add: add,\r\n remove: remove,\r\n };\r\n },\r\n [isFavorite, toggle, add,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OvE,KAAK,CAACkH,OAAO,CAClB,SAASxE,KAAKA,CAAA,EAAwB;IACpC,OAAO;MACLmF,UAAU,EAAEA,UAAU;MACtBF,MAAM,EAAEA,MAAM;MACdJ,GAAG,EAAEA,GAAG;MACRG,MAAM,EAAEA;IACV,CAAC;EACH,CAAC,EACD,CAACG,UAAU,EAAEF,MAAM,EAAEJ,GAAG,EAAEG,MAAM,CAClC,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * favoritesView — Portnet UI v2 · personalization
3
+ *
4
+ * Grid-agnostic favorites VIEW logic: filter (all / favorites-only) and
5
+ * sort (favorites-first / favorites-last). Pure helpers usable anywhere,
6
+ * plus a useFavoritesView hook that wires them to the favorites capability.
7
+ *
8
+ * The host owns its row id contract and the toggle UI (use FavoritesFilter
9
+ * or any control bound to `filterMode` / `sortPlacement`). These helpers
10
+ * only reorder/subset the rows array the host already has — they never
11
+ * fetch or mutate.
12
+ */
13
+ import type { RowId } from "../../types/common";
14
+ export declare const FAVORITES_FILTER: Readonly<{
15
+ readonly ALL: "all";
16
+ readonly ONLY: "only";
17
+ }>;
18
+ export declare const FAVORITES_SORT: Readonly<{
19
+ readonly NONE: "none";
20
+ readonly FIRST: "first";
21
+ readonly LAST: "last";
22
+ }>;
23
+ export type FavoritesFilterMode = (typeof FAVORITES_FILTER)[keyof typeof FAVORITES_FILTER];
24
+ export type FavoritesSortPlacement = (typeof FAVORITES_SORT)[keyof typeof FAVORITES_SORT];
25
+ /**
26
+ * Keep only favorited rows when mode === "only"; otherwise return `rows`
27
+ * unchanged (same reference).
28
+ */
29
+ export declare function filterRowsByFavorites<T>(rows: readonly T[], favoriteIds: Set<RowId> | readonly RowId[] | null | undefined, getRowId: ((row: T) => RowId) | undefined, mode: FavoritesFilterMode): readonly T[];
30
+ /**
31
+ * Move favorited rows to the front ("first") or back ("last"), preserving
32
+ * the host's existing order WITHIN each group (stable partition). Returns
33
+ * `rows` unchanged when placement is "none" or when reordering is a no-op.
34
+ */
35
+ export declare function sortRowsByFavorites<T>(rows: readonly T[], favoriteIds: Set<RowId> | readonly RowId[] | null | undefined, getRowId: ((row: T) => RowId) | undefined, placement: FavoritesSortPlacement): readonly T[];
36
+ export interface UseFavoritesViewOptions<T> {
37
+ /** Should be stable; MUST match the grid's getRowId. Defaults to (r) => r.id. */
38
+ getRowId?: (row: T) => RowId;
39
+ /** @default "all" */
40
+ filterMode?: FavoritesFilterMode;
41
+ /** @default "none" */
42
+ sortPlacement?: FavoritesSortPlacement;
43
+ }
44
+ export interface UseFavoritesViewResult<T> {
45
+ rows: readonly T[];
46
+ favoriteIds: Set<RowId>;
47
+ favoriteCount: number;
48
+ isFiltering: boolean;
49
+ }
50
+ /**
51
+ * useFavoritesView(resourceKey, rows, options)
52
+ *
53
+ * Reads the favorites id Set for `resourceKey` and applies the favorites
54
+ * filter + sort to `rows`. In the all/none case the original `rows`
55
+ * reference is returned unchanged.
56
+ */
57
+ export declare function useFavoritesView<T>(resourceKey: string, rows: readonly T[], options?: UseFavoritesViewOptions<T>): UseFavoritesViewResult<T>;
58
+ //# sourceMappingURL=favoritesView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"favoritesView.d.ts","sourceRoot":"","sources":["../../../../src/lib/v2/personalization/capabilities/favoritesView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,eAAO,MAAM,gBAAgB;;;EAGlB,CAAC;AACZ,eAAO,MAAM,cAAc;;;;EAIhB,CAAC;AAEZ,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAC3D,MAAM,MAAM,sBAAsB,GAChC,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAkBvD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,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strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.FAVORITES_SORT = exports.FAVORITES_FILTER = void 0;
8
+ exports.filterRowsByFavorites = filterRowsByFavorites;
9
+ exports.sortRowsByFavorites = sortRowsByFavorites;
10
+ exports.useFavoritesView = useFavoritesView;
11
+ var React = _interopRequireWildcard(require("react"));
12
+ var _favorites = require("./favorites");
13
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
16
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
17
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } /**
18
+ * favoritesView — Portnet UI v2 · personalization
19
+ *
20
+ * Grid-agnostic favorites VIEW logic: filter (all / favorites-only) and
21
+ * sort (favorites-first / favorites-last). Pure helpers usable anywhere,
22
+ * plus a useFavoritesView hook that wires them to the favorites capability.
23
+ *
24
+ * The host owns its row id contract and the toggle UI (use FavoritesFilter
25
+ * or any control bound to `filterMode` / `sortPlacement`). These helpers
26
+ * only reorder/subset the rows array the host already has — they never
27
+ * fetch or mutate.
28
+ */
29
+ var FAVORITES_FILTER = exports.FAVORITES_FILTER = Object.freeze({
30
+ ALL: "all",
31
+ ONLY: "only"
32
+ });
33
+ var FAVORITES_SORT = exports.FAVORITES_SORT = Object.freeze({
34
+ NONE: "none",
35
+ FIRST: "first",
36
+ LAST: "last"
37
+ });
38
+ var EMPTY_ROWS = Object.freeze([]);
39
+ function toIdSet(ids) {
40
+ return ids instanceof Set ? ids : new Set(ids || []);
41
+ }
42
+ function resolveGetRowId(getRowId) {
43
+ return typeof getRowId === "function" ? getRowId : function defaultGetRowId(r) {
44
+ return r.id;
45
+ };
46
+ }
47
+
48
+ /**
49
+ * Keep only favorited rows when mode === "only"; otherwise return `rows`
50
+ * unchanged (same reference).
51
+ */
52
+ function filterRowsByFavorites(rows, favoriteIds, getRowId, mode) {
53
+ if (mode !== FAVORITES_FILTER.ONLY || !Array.isArray(rows)) return rows;
54
+ // Array.isArray widened `rows` to any[]; re-establish the element type.
55
+ var source = rows;
56
+ var ids = toIdSet(favoriteIds);
57
+ var getId = resolveGetRowId(getRowId);
58
+ return source.filter(function keepFavorite(r) {
59
+ return ids.has(getId(r));
60
+ });
61
+ }
62
+
63
+ /**
64
+ * Move favorited rows to the front ("first") or back ("last"), preserving
65
+ * the host's existing order WITHIN each group (stable partition). Returns
66
+ * `rows` unchanged when placement is "none" or when reordering is a no-op.
67
+ */
68
+ function sortRowsByFavorites(rows, favoriteIds, getRowId, placement) {
69
+ if (placement !== FAVORITES_SORT.FIRST && placement !== FAVORITES_SORT.LAST || !Array.isArray(rows)) {
70
+ return rows;
71
+ }
72
+ // Array.isArray widened `rows` to any[]; re-establish the element type.
73
+ var source = rows;
74
+ var ids = toIdSet(favoriteIds);
75
+ var getId = resolveGetRowId(getRowId);
76
+ var fav = [];
77
+ var rest = [];
78
+ var _iterator = _createForOfIteratorHelper(source),
79
+ _step;
80
+ try {
81
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
82
+ var row = _step.value;
83
+ if (ids.has(getId(row))) fav.push(row);else rest.push(row);
84
+ }
85
+ } catch (err) {
86
+ _iterator.e(err);
87
+ } finally {
88
+ _iterator.f();
89
+ }
90
+ if (fav.length === 0 || rest.length === 0) return source; // nothing to reorder
91
+ return placement === FAVORITES_SORT.FIRST ? fav.concat(rest) : rest.concat(fav);
92
+ }
93
+ /**
94
+ * useFavoritesView(resourceKey, rows, options)
95
+ *
96
+ * Reads the favorites id Set for `resourceKey` and applies the favorites
97
+ * filter + sort to `rows`. In the all/none case the original `rows`
98
+ * reference is returned unchanged.
99
+ */
100
+ function useFavoritesView(resourceKey, rows, options) {
101
+ var opts = options || {};
102
+ var getRowId = opts.getRowId;
103
+ var filterMode = opts.filterMode || FAVORITES_FILTER.ALL;
104
+ var sortPlacement = opts.sortPlacement || FAVORITES_SORT.NONE;
105
+ var fav = (0, _favorites.useFavorites)(resourceKey);
106
+ var ids = fav.ids;
107
+ var processed = React.useMemo(function compute() {
108
+ var base = Array.isArray(rows) ? rows : EMPTY_ROWS;
109
+ var filtered = filterRowsByFavorites(base, ids, getRowId, filterMode);
110
+ return sortRowsByFavorites(filtered, ids, getRowId, sortPlacement);
111
+ }, [rows, ids, getRowId, filterMode, sortPlacement]);
112
+ return React.useMemo(function value() {
113
+ return {
114
+ rows: processed,
115
+ favoriteIds: ids,
116
+ favoriteCount: fav.count,
117
+ isFiltering: filterMode === FAVORITES_FILTER.ONLY
118
+ };
119
+ }, [processed, ids, fav.count, filterMode]);
120
+ }
121
+ //# sourceMappingURL=favoritesView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"favoritesView.js","names":["React","_interopRequireWildcard","require","_favorites","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","step","next","_e2","minLen","_arrayLikeToArray","toString","slice","constructor","name","from","test","arr","len","arr2","FAVORITES_FILTER","exports","freeze","ALL","ONLY","FAVORITES_SORT","NONE","FIRST","LAST","EMPTY_ROWS","toIdSet","ids","Set","resolveGetRowId","getRowId","defaultGetRowId","r","id","filterRowsByFavorites","rows","favoriteIds","mode","source","getId","filter","keepFavorite","sortRowsByFavorites","placement","fav","rest","_iterator","_step","row","push","concat","useFavoritesView","resourceKey","options","opts","filterMode","sortPlacement","useFavorites","processed","useMemo","compute","base","filtered","favoriteCount","count","isFiltering"],"sources":["../../../../src/lib/v2/personalization/capabilities/favoritesView.ts"],"sourcesContent":["/**\r\n * favoritesView — Portnet UI v2 · personalization\r\n *\r\n * Grid-agnostic favorites VIEW logic: filter (all / favorites-only) and\r\n * sort (favorites-first / favorites-last). Pure helpers usable anywhere,\r\n * plus a useFavoritesView hook that wires them to the favorites capability.\r\n *\r\n * The host owns its row id contract and the toggle UI (use FavoritesFilter\r\n * or any control bound to `filterMode` / `sortPlacement`). These helpers\r\n * only reorder/subset the rows array the host already has — they never\r\n * fetch or mutate.\r\n */\r\n\r\nimport * as React from \"react\";\r\n\r\nimport { useFavorites } from \"./favorites\";\r\nimport type { RowId } from \"../../types/common\";\r\n\r\nexport const FAVORITES_FILTER = Object.freeze({\r\n ALL: \"all\",\r\n ONLY: \"only\",\r\n} as const);\r\nexport const FAVORITES_SORT = Object.freeze({\r\n NONE: \"none\",\r\n FIRST: \"first\",\r\n LAST: \"last\",\r\n} as const);\r\n\r\nexport type FavoritesFilterMode =\r\n (typeof FAVORITES_FILTER)[keyof typeof FAVORITES_FILTER];\r\nexport type FavoritesSortPlacement =\r\n (typeof FAVORITES_SORT)[keyof typeof FAVORITES_SORT];\r\n\r\nconst EMPTY_ROWS: readonly never[] = Object.freeze([]);\r\n\r\nfunction toIdSet(\r\n ids: Set<RowId> | readonly RowId[] | null | undefined\r\n): Set<RowId> {\r\n return ids instanceof Set ? ids : new Set(ids || []);\r\n}\r\n\r\nfunction resolveGetRowId<T>(getRowId?: (row: T) => RowId): (row: T) => RowId {\r\n return typeof getRowId === \"function\"\r\n ? getRowId\r\n : function defaultGetRowId(r: T): RowId {\r\n return (r as { id: RowId }).id;\r\n };\r\n}\r\n\r\n/**\r\n * Keep only favorited rows when mode === \"only\"; otherwise return `rows`\r\n * unchanged (same reference).\r\n */\r\nexport function filterRowsByFavorites<T>(\r\n rows: readonly T[],\r\n favoriteIds: Set<RowId> | readonly RowId[] | null | undefined,\r\n getRowId: ((row: T) => RowId) | undefined,\r\n mode: FavoritesFilterMode\r\n): readonly T[] {\r\n if (mode !== FAVORITES_FILTER.ONLY || !Array.isArray(rows)) return rows;\r\n // Array.isArray widened `rows` to any[]; re-establish the element type.\r\n const source: readonly T[] = rows;\r\n const ids = toIdSet(favoriteIds);\r\n const getId = resolveGetRowId(getRowId);\r\n return source.filter(function keepFavorite(r) {\r\n return ids.has(getId(r));\r\n });\r\n}\r\n\r\n/**\r\n * Move favorited rows to the front (\"first\") or back (\"last\"), preserving\r\n * the host's existing order WITHIN each group (stable partition). Returns\r\n * `rows` unchanged when placement is \"none\" or when reordering is a no-op.\r\n */\r\nexport function sortRowsByFavorites<T>(\r\n rows: readonly T[],\r\n favoriteIds: Set<RowId> | readonly RowId[] | null | undefined,\r\n getRowId: ((row: T) => RowId) | undefined,\r\n placement: FavoritesSortPlacement\r\n): readonly T[] {\r\n if (\r\n (placement !== FAVORITES_SORT.FIRST && placement !== FAVORITES_SORT.LAST) ||\r\n !Array.isArray(rows)\r\n ) {\r\n return rows;\r\n }\r\n // Array.isArray widened `rows` to any[]; re-establish the element type.\r\n const source: readonly T[] = rows;\r\n const ids = toIdSet(favoriteIds);\r\n const getId = resolveGetRowId(getRowId);\r\n const fav: T[] = [];\r\n const rest: T[] = [];\r\n for (const row of source) {\r\n if (ids.has(getId(row))) fav.push(row);\r\n else rest.push(row);\r\n }\r\n if (fav.length === 0 || rest.length === 0) return source; // nothing to reorder\r\n return placement === FAVORITES_SORT.FIRST\r\n ? fav.concat(rest)\r\n : rest.concat(fav);\r\n}\r\n\r\nexport interface UseFavoritesViewOptions<T> {\r\n /** Should be stable; MUST match the grid's getRowId. Defaults to (r) => r.id. */\r\n getRowId?: (row: T) => RowId;\r\n /** @default \"all\" */\r\n filterMode?: FavoritesFilterMode;\r\n /** @default \"none\" */\r\n sortPlacement?: FavoritesSortPlacement;\r\n}\r\n\r\nexport interface UseFavoritesViewResult<T> {\r\n rows: readonly T[];\r\n favoriteIds: Set<RowId>;\r\n favoriteCount: number;\r\n isFiltering: boolean;\r\n}\r\n\r\n/**\r\n * useFavoritesView(resourceKey, rows, options)\r\n *\r\n * Reads the favorites id Set for `resourceKey` and applies the favorites\r\n * filter + sort to `rows`. In the all/none case the original `rows`\r\n * reference is returned unchanged.\r\n */\r\nexport function useFavoritesView<T>(\r\n resourceKey: string,\r\n rows: readonly T[],\r\n options?: UseFavoritesViewOptions<T>\r\n): UseFavoritesViewResult<T> {\r\n const opts: UseFavoritesViewOptions<T> = options || {};\r\n const getRowId = opts.getRowId;\r\n const filterMode = opts.filterMode || FAVORITES_FILTER.ALL;\r\n const sortPlacement = opts.sortPlacement || FAVORITES_SORT.NONE;\r\n\r\n const fav = useFavorites(resourceKey);\r\n const ids = fav.ids;\r\n\r\n const processed = React.useMemo(\r\n function compute(): readonly T[] {\r\n const base: readonly T[] = Array.isArray(rows) ? rows : EMPTY_ROWS;\r\n const filtered = filterRowsByFavorites(base, ids, getRowId, filterMode);\r\n return sortRowsByFavorites(filtered, ids, getRowId, sortPlacement);\r\n },\r\n [rows, ids, getRowId, filterMode, sortPlacement]\r\n );\r\n\r\n return React.useMemo(\r\n function value(): UseFavoritesViewResult<T> {\r\n return {\r\n rows: processed,\r\n favoriteIds: ids,\r\n favoriteCount: fav.count,\r\n isFiltering: filterMode === FAVORITES_FILTER.ONLY,\r\n };\r\n },\r\n [processed, ids, fav.count, filterMode]\r\n );\r\n}\r\n"],"mappings":";;;;;;;;;;AAaA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAA2C,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WA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B,UAAU,EAAEC,aAAa,CACjD,CAAC;EAED,OAAOvG,KAAK,CAAC0G,OAAO,CAClB,SAASjE,KAAKA,CAAA,EAA8B;IAC1C,OAAO;MACLyC,IAAI,EAAEuB,SAAS;MACftB,WAAW,EAAET,GAAG;MAChBoC,aAAa,EAAEnB,GAAG,CAACoB,KAAK;MACxBC,WAAW,EAAEV,UAAU,KAAKvC,gBAAgB,CAACI;IAC/C,CAAC;EACH,CAAC,EACD,CAACsC,SAAS,EAAE/B,GAAG,EAAEiB,GAAG,CAACoB,KAAK,EAAET,UAAU,CACxC,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * capabilities — Portnet UI v2 · personalization
3
+ *
4
+ * Capability slices. Each slice self-registers with the schema registry
5
+ * at import time, so importing a slice's hook is enough to activate its
6
+ * capability — no manual wiring on the host.
7
+ *
8
+ * - favorites (Batch 3) — useFavorites, useIsFavorite
9
+ * (Batch 5) — useFavoritesView + filter/sort helpers
10
+ * - savedFilters (Batch 4) — useSavedFilters (+ SaveFilterDialog,
11
+ * SavedFiltersMenu in patterns/)
12
+ */
13
+ export { useFavorites, useIsFavorite, FAVORITES_CAPABILITY_ID, } from "./favorites";
14
+ export { useSavedFilters, SAVED_FILTERS_CAPABILITY_ID } from "./savedFilters";
15
+ export { useFavoritesView, filterRowsByFavorites, sortRowsByFavorites, FAVORITES_FILTER, FAVORITES_SORT, } from "./favoritesView";
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/v2/personalization/capabilities/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,YAAY,EACZ,aAAa,EACb,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,GACf,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "FAVORITES_CAPABILITY_ID", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _favorites.FAVORITES_CAPABILITY_ID;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "FAVORITES_FILTER", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _favoritesView.FAVORITES_FILTER;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "FAVORITES_SORT", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _favoritesView.FAVORITES_SORT;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "SAVED_FILTERS_CAPABILITY_ID", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _savedFilters.SAVED_FILTERS_CAPABILITY_ID;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "filterRowsByFavorites", {
31
+ enumerable: true,
32
+ get: function get() {
33
+ return _favoritesView.filterRowsByFavorites;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "sortRowsByFavorites", {
37
+ enumerable: true,
38
+ get: function get() {
39
+ return _favoritesView.sortRowsByFavorites;
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "useFavorites", {
43
+ enumerable: true,
44
+ get: function get() {
45
+ return _favorites.useFavorites;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "useFavoritesView", {
49
+ enumerable: true,
50
+ get: function get() {
51
+ return _favoritesView.useFavoritesView;
52
+ }
53
+ });
54
+ Object.defineProperty(exports, "useIsFavorite", {
55
+ enumerable: true,
56
+ get: function get() {
57
+ return _favorites.useIsFavorite;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, "useSavedFilters", {
61
+ enumerable: true,
62
+ get: function get() {
63
+ return _savedFilters.useSavedFilters;
64
+ }
65
+ });
66
+ var _favorites = require("./favorites");
67
+ var _savedFilters = require("./savedFilters");
68
+ var _favoritesView = require("./favoritesView");
69
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_favorites","require","_savedFilters","_favoritesView"],"sources":["../../../../src/lib/v2/personalization/capabilities/index.ts"],"sourcesContent":["/**\r\n * capabilities — Portnet UI v2 · personalization\r\n *\r\n * Capability slices. Each slice self-registers with the schema registry\r\n * at import time, so importing a slice's hook is enough to activate its\r\n * capability — no manual wiring on the host.\r\n *\r\n * - favorites (Batch 3) — useFavorites, useIsFavorite\r\n * (Batch 5) — useFavoritesView + filter/sort helpers\r\n * - savedFilters (Batch 4) — useSavedFilters (+ SaveFilterDialog,\r\n * SavedFiltersMenu in patterns/)\r\n */\r\n\r\nexport {\r\n useFavorites,\r\n useIsFavorite,\r\n FAVORITES_CAPABILITY_ID,\r\n} from \"./favorites\";\r\nexport { useSavedFilters, SAVED_FILTERS_CAPABILITY_ID } from \"./savedFilters\";\r\nexport {\r\n useFavoritesView,\r\n filterRowsByFavorites,\r\n sortRowsByFavorites,\r\n FAVORITES_FILTER,\r\n FAVORITES_SORT,\r\n} from \"./favoritesView\";\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAAA,UAAA,GAAAC,OAAA;AAKA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA","ignoreList":[]}