@lucca-front/ng 22.0.0-rc.2 → 22.0.0-rc.4

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 (324) hide show
  1. package/fesm2022/lucca-front-ng-a11y.mjs +125 -8
  2. package/fesm2022/lucca-front-ng-a11y.mjs.map +1 -1
  3. package/fesm2022/lucca-front-ng-activity-feed.mjs +74 -27
  4. package/fesm2022/lucca-front-ng-activity-feed.mjs.map +1 -1
  5. package/fesm2022/lucca-front-ng-api.mjs +116 -78
  6. package/fesm2022/lucca-front-ng-api.mjs.map +1 -1
  7. package/fesm2022/lucca-front-ng-app-layout.mjs +4 -4
  8. package/fesm2022/lucca-front-ng-app-layout.mjs.map +1 -1
  9. package/fesm2022/lucca-front-ng-box.mjs +44 -6
  10. package/fesm2022/lucca-front-ng-box.mjs.map +1 -1
  11. package/fesm2022/lucca-front-ng-breadcrumbs.mjs +15 -9
  12. package/fesm2022/lucca-front-ng-breadcrumbs.mjs.map +1 -1
  13. package/fesm2022/lucca-front-ng-bubble-icon.mjs +28 -13
  14. package/fesm2022/lucca-front-ng-bubble-icon.mjs.map +1 -1
  15. package/fesm2022/lucca-front-ng-bubble-illustration.mjs +20 -10
  16. package/fesm2022/lucca-front-ng-bubble-illustration.mjs.map +1 -1
  17. package/fesm2022/lucca-front-ng-callout.mjs +105 -63
  18. package/fesm2022/lucca-front-ng-callout.mjs.map +1 -1
  19. package/fesm2022/lucca-front-ng-chip.mjs +33 -13
  20. package/fesm2022/lucca-front-ng-chip.mjs.map +1 -1
  21. package/fesm2022/lucca-front-ng-clear.mjs +17 -8
  22. package/fesm2022/lucca-front-ng-clear.mjs.map +1 -1
  23. package/fesm2022/lucca-front-ng-code.mjs +4 -4
  24. package/fesm2022/lucca-front-ng-code.mjs.map +1 -1
  25. package/fesm2022/lucca-front-ng-color.mjs +16 -8
  26. package/fesm2022/lucca-front-ng-color.mjs.map +1 -1
  27. package/fesm2022/lucca-front-ng-comment.mjs +48 -27
  28. package/fesm2022/lucca-front-ng-comment.mjs.map +1 -1
  29. package/fesm2022/lucca-front-ng-container.mjs +13 -6
  30. package/fesm2022/lucca-front-ng-container.mjs.map +1 -1
  31. package/fesm2022/lucca-front-ng-core-select-api.mjs +70 -24
  32. package/fesm2022/lucca-front-ng-core-select-api.mjs.map +1 -1
  33. package/fesm2022/lucca-front-ng-core-select-department.mjs +31 -18
  34. package/fesm2022/lucca-front-ng-core-select-department.mjs.map +1 -1
  35. package/fesm2022/lucca-front-ng-core-select-establishment.mjs +21 -15
  36. package/fesm2022/lucca-front-ng-core-select-establishment.mjs.map +1 -1
  37. package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs +12 -9
  38. package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs.map +1 -1
  39. package/fesm2022/lucca-front-ng-core-select-legal-units.mjs +168 -0
  40. package/fesm2022/lucca-front-ng-core-select-legal-units.mjs.map +1 -0
  41. package/fesm2022/lucca-front-ng-core-select-occupation-category.mjs +9 -6
  42. package/fesm2022/lucca-front-ng-core-select-occupation-category.mjs.map +1 -1
  43. package/fesm2022/lucca-front-ng-core-select-user.mjs +65 -41
  44. package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
  45. package/fesm2022/lucca-front-ng-core-select.mjs +355 -236
  46. package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
  47. package/fesm2022/lucca-front-ng-core.mjs +86 -29
  48. package/fesm2022/lucca-front-ng-core.mjs.map +1 -1
  49. package/fesm2022/lucca-front-ng-data-table.mjs +143 -81
  50. package/fesm2022/lucca-front-ng-data-table.mjs.map +1 -1
  51. package/fesm2022/lucca-front-ng-date.mjs +91 -62
  52. package/fesm2022/lucca-front-ng-date.mjs.map +1 -1
  53. package/fesm2022/lucca-front-ng-date2.mjs +375 -161
  54. package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
  55. package/fesm2022/lucca-front-ng-department.mjs +31 -27
  56. package/fesm2022/lucca-front-ng-department.mjs.map +1 -1
  57. package/fesm2022/lucca-front-ng-dialog.mjs +71 -51
  58. package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
  59. package/fesm2022/lucca-front-ng-divider.mjs +16 -8
  60. package/fesm2022/lucca-front-ng-divider.mjs.map +1 -1
  61. package/fesm2022/lucca-front-ng-dropdown.mjs +42 -41
  62. package/fesm2022/lucca-front-ng-dropdown.mjs.map +1 -1
  63. package/fesm2022/lucca-front-ng-empty-state.mjs +56 -30
  64. package/fesm2022/lucca-front-ng-empty-state.mjs.map +1 -1
  65. package/fesm2022/lucca-front-ng-error-page.mjs +15 -7
  66. package/fesm2022/lucca-front-ng-error-page.mjs.map +1 -1
  67. package/fesm2022/lucca-front-ng-establishment.mjs +57 -45
  68. package/fesm2022/lucca-front-ng-establishment.mjs.map +1 -1
  69. package/fesm2022/lucca-front-ng-fancy-box.mjs +23 -11
  70. package/fesm2022/lucca-front-ng-fancy-box.mjs.map +1 -1
  71. package/fesm2022/lucca-front-ng-file-upload.mjs +135 -69
  72. package/fesm2022/lucca-front-ng-file-upload.mjs.map +1 -1
  73. package/fesm2022/lucca-front-ng-filter-pills.mjs +83 -52
  74. package/fesm2022/lucca-front-ng-filter-pills.mjs.map +1 -1
  75. package/fesm2022/lucca-front-ng-footer.mjs +17 -8
  76. package/fesm2022/lucca-front-ng-footer.mjs.map +1 -1
  77. package/fesm2022/lucca-front-ng-form-field.mjs +124 -71
  78. package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
  79. package/fesm2022/lucca-front-ng-form-header.mjs +12 -6
  80. package/fesm2022/lucca-front-ng-form-header.mjs.map +1 -1
  81. package/fesm2022/lucca-front-ng-form-label.mjs +65 -42
  82. package/fesm2022/lucca-front-ng-form-label.mjs.map +1 -1
  83. package/fesm2022/lucca-front-ng-form.mjs +9 -6
  84. package/fesm2022/lucca-front-ng-form.mjs.map +1 -1
  85. package/fesm2022/lucca-front-ng-formly.mjs +58 -58
  86. package/fesm2022/lucca-front-ng-formly.mjs.map +1 -1
  87. package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs +58 -40
  88. package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs.map +1 -1
  89. package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-html.mjs +3 -3
  90. package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-html.mjs.map +1 -1
  91. package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-markdown.mjs +8 -9
  92. package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-markdown.mjs.map +1 -1
  93. package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-plain-text.mjs +3 -3
  94. package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-plain-text.mjs.map +1 -1
  95. package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs +263 -105
  96. package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs.map +1 -1
  97. package/fesm2022/lucca-front-ng-forms.mjs +370 -154
  98. package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
  99. package/fesm2022/lucca-front-ng-gauge.mjs +23 -13
  100. package/fesm2022/lucca-front-ng-gauge.mjs.map +1 -1
  101. package/fesm2022/lucca-front-ng-grid.mjs +39 -18
  102. package/fesm2022/lucca-front-ng-grid.mjs.map +1 -1
  103. package/fesm2022/lucca-front-ng-highlight-data.mjs +50 -15
  104. package/fesm2022/lucca-front-ng-highlight-data.mjs.map +1 -1
  105. package/fesm2022/lucca-front-ng-highlight-text.mjs +28 -0
  106. package/fesm2022/lucca-front-ng-highlight-text.mjs.map +1 -0
  107. package/fesm2022/lucca-front-ng-horizontal-navigation.mjs +174 -17
  108. package/fesm2022/lucca-front-ng-horizontal-navigation.mjs.map +1 -1
  109. package/fesm2022/lucca-front-ng-impersonation.mjs +124 -0
  110. package/fesm2022/lucca-front-ng-impersonation.mjs.map +1 -0
  111. package/fesm2022/lucca-front-ng-index-table.mjs +82 -54
  112. package/fesm2022/lucca-front-ng-index-table.mjs.map +1 -1
  113. package/fesm2022/lucca-front-ng-inline-message.mjs +17 -7
  114. package/fesm2022/lucca-front-ng-inline-message.mjs.map +1 -1
  115. package/fesm2022/lucca-front-ng-input.mjs +27 -24
  116. package/fesm2022/lucca-front-ng-input.mjs.map +1 -1
  117. package/fesm2022/lucca-front-ng-link.mjs +54 -23
  118. package/fesm2022/lucca-front-ng-link.mjs.map +1 -1
  119. package/fesm2022/lucca-front-ng-listbox.mjs +31 -18
  120. package/fesm2022/lucca-front-ng-listbox.mjs.map +1 -1
  121. package/fesm2022/lucca-front-ng-listing.mjs +16 -12
  122. package/fesm2022/lucca-front-ng-listing.mjs.map +1 -1
  123. package/fesm2022/lucca-front-ng-loading.mjs +13 -6
  124. package/fesm2022/lucca-front-ng-loading.mjs.map +1 -1
  125. package/fesm2022/lucca-front-ng-main-layout.mjs +6 -6
  126. package/fesm2022/lucca-front-ng-main-layout.mjs.map +1 -1
  127. package/fesm2022/lucca-front-ng-mobile-push.mjs +15 -5
  128. package/fesm2022/lucca-front-ng-mobile-push.mjs.map +1 -1
  129. package/fesm2022/lucca-front-ng-modal.mjs +32 -26
  130. package/fesm2022/lucca-front-ng-modal.mjs.map +1 -1
  131. package/fesm2022/lucca-front-ng-multi-select.mjs +247 -123
  132. package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
  133. package/fesm2022/lucca-front-ng-new-badge.mjs +5 -4
  134. package/fesm2022/lucca-front-ng-new-badge.mjs.map +1 -1
  135. package/fesm2022/lucca-front-ng-number-format.mjs +14 -10
  136. package/fesm2022/lucca-front-ng-number-format.mjs.map +1 -1
  137. package/fesm2022/lucca-front-ng-number.mjs +7 -7
  138. package/fesm2022/lucca-front-ng-number.mjs.map +1 -1
  139. package/fesm2022/lucca-front-ng-numeric-badge.mjs +24 -12
  140. package/fesm2022/lucca-front-ng-numeric-badge.mjs.map +1 -1
  141. package/fesm2022/lucca-front-ng-option.mjs +160 -140
  142. package/fesm2022/lucca-front-ng-option.mjs.map +1 -1
  143. package/fesm2022/lucca-front-ng-page-header.mjs +12 -8
  144. package/fesm2022/lucca-front-ng-page-header.mjs.map +1 -1
  145. package/fesm2022/lucca-front-ng-pagination.mjs +26 -10
  146. package/fesm2022/lucca-front-ng-pagination.mjs.map +1 -1
  147. package/fesm2022/lucca-front-ng-plg-push.mjs +14 -8
  148. package/fesm2022/lucca-front-ng-plg-push.mjs.map +1 -1
  149. package/fesm2022/lucca-front-ng-popover.mjs +23 -20
  150. package/fesm2022/lucca-front-ng-popover.mjs.map +1 -1
  151. package/fesm2022/lucca-front-ng-popover2.mjs +107 -35
  152. package/fesm2022/lucca-front-ng-popover2.mjs.map +1 -1
  153. package/fesm2022/lucca-front-ng-popup.mjs +10 -10
  154. package/fesm2022/lucca-front-ng-popup.mjs.map +1 -1
  155. package/fesm2022/lucca-front-ng-progress-bar.mjs +13 -6
  156. package/fesm2022/lucca-front-ng-progress-bar.mjs.map +1 -1
  157. package/fesm2022/lucca-front-ng-progress-stepper.mjs +22 -12
  158. package/fesm2022/lucca-front-ng-progress-stepper.mjs.map +1 -1
  159. package/fesm2022/lucca-front-ng-read-more.mjs +38 -17
  160. package/fesm2022/lucca-front-ng-read-more.mjs.map +1 -1
  161. package/fesm2022/lucca-front-ng-resource-card.mjs +26 -17
  162. package/fesm2022/lucca-front-ng-resource-card.mjs.map +1 -1
  163. package/fesm2022/lucca-front-ng-safe-content.mjs +10 -10
  164. package/fesm2022/lucca-front-ng-safe-content.mjs.map +1 -1
  165. package/fesm2022/lucca-front-ng-scroll-box.mjs +8 -6
  166. package/fesm2022/lucca-front-ng-scroll-box.mjs.map +1 -1
  167. package/fesm2022/lucca-front-ng-scroll.mjs +14 -10
  168. package/fesm2022/lucca-front-ng-scroll.mjs.map +1 -1
  169. package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs +26 -14
  170. package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs.map +1 -1
  171. package/fesm2022/lucca-front-ng-segmented-control.mjs +12 -10
  172. package/fesm2022/lucca-front-ng-segmented-control.mjs.map +1 -1
  173. package/fesm2022/lucca-front-ng-select.mjs +30 -23
  174. package/fesm2022/lucca-front-ng-select.mjs.map +1 -1
  175. package/fesm2022/lucca-front-ng-sidepanel.mjs +7 -7
  176. package/fesm2022/lucca-front-ng-sidepanel.mjs.map +1 -1
  177. package/fesm2022/lucca-front-ng-simple-select.mjs +66 -50
  178. package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
  179. package/fesm2022/lucca-front-ng-skeleton.mjs +131 -62
  180. package/fesm2022/lucca-front-ng-skeleton.mjs.map +1 -1
  181. package/fesm2022/lucca-front-ng-software-icon-wrapper.mjs +16 -11
  182. package/fesm2022/lucca-front-ng-software-icon-wrapper.mjs.map +1 -1
  183. package/fesm2022/lucca-front-ng-software-icon.mjs +34 -25
  184. package/fesm2022/lucca-front-ng-software-icon.mjs.map +1 -1
  185. package/fesm2022/lucca-front-ng-sortable-list.mjs +14 -11
  186. package/fesm2022/lucca-front-ng-sortable-list.mjs.map +1 -1
  187. package/fesm2022/lucca-front-ng-status-badge.mjs +15 -7
  188. package/fesm2022/lucca-front-ng-status-badge.mjs.map +1 -1
  189. package/fesm2022/lucca-front-ng-table-of-content.mjs +8 -7
  190. package/fesm2022/lucca-front-ng-table-of-content.mjs.map +1 -1
  191. package/fesm2022/lucca-front-ng-tag.mjs +22 -11
  192. package/fesm2022/lucca-front-ng-tag.mjs.map +1 -1
  193. package/fesm2022/lucca-front-ng-text-flow.mjs +4 -4
  194. package/fesm2022/lucca-front-ng-text-flow.mjs.map +1 -1
  195. package/fesm2022/lucca-front-ng-time.mjs +416 -80
  196. package/fesm2022/lucca-front-ng-time.mjs.map +1 -1
  197. package/fesm2022/lucca-front-ng-title.mjs +34 -15
  198. package/fesm2022/lucca-front-ng-title.mjs.map +1 -1
  199. package/fesm2022/lucca-front-ng-toast.mjs +20 -14
  200. package/fesm2022/lucca-front-ng-toast.mjs.map +1 -1
  201. package/fesm2022/lucca-front-ng-tooltip.mjs +60 -30
  202. package/fesm2022/lucca-front-ng-tooltip.mjs.map +1 -1
  203. package/fesm2022/lucca-front-ng-tree-select.mjs +20 -13
  204. package/fesm2022/lucca-front-ng-tree-select.mjs.map +1 -1
  205. package/fesm2022/lucca-front-ng-user-popover.mjs +28 -23
  206. package/fesm2022/lucca-front-ng-user-popover.mjs.map +1 -1
  207. package/fesm2022/lucca-front-ng-user.mjs +172 -113
  208. package/fesm2022/lucca-front-ng-user.mjs.map +1 -1
  209. package/fesm2022/lucca-front-ng-vertical-navigation.mjs +34 -24
  210. package/fesm2022/lucca-front-ng-vertical-navigation.mjs.map +1 -1
  211. package/package.json +20 -8
  212. package/schematics/action-icon/index.js +34 -1
  213. package/schematics/action-icon/migration.spec.js +36 -3
  214. package/schematics/alignment-utilities/migration.spec.js +36 -3
  215. package/schematics/cdn-urls/migration.spec.js +36 -3
  216. package/schematics/class-prefix/migration.spec.js +36 -3
  217. package/schematics/collection.json +10 -0
  218. package/schematics/color-text/migration.spec.js +36 -3
  219. package/schematics/component-path/migration.spec.js +36 -3
  220. package/schematics/deprecated-resolver/index.js +73 -0
  221. package/schematics/deprecated-resolver/migration.spec.js +58 -0
  222. package/schematics/deprecated-resolver/schema.json +23 -0
  223. package/schematics/empty-state-title/migration.spec.js +35 -2
  224. package/schematics/lib/css-mapper.js +44 -6
  225. package/schematics/lib/deprecated-mapper.js +109 -0
  226. package/schematics/lib/index.js +1 -0
  227. package/schematics/lib/lf-schematic-context.js +34 -1
  228. package/schematics/lib/local-deps/package-lock.json +17 -79
  229. package/schematics/lib/local-deps/package.json +1 -1
  230. package/schematics/lib/local-deps/postcss.js +34 -1
  231. package/schematics/lib/migration-test.js +5 -2
  232. package/schematics/lib/scss-ast.js +53 -0
  233. package/schematics/lu-button/migration.spec.js +34 -1
  234. package/schematics/lu-container/migration.spec.js +34 -1
  235. package/schematics/lu-grid/index.js +23 -0
  236. package/schematics/lu-grid/migration.js +237 -0
  237. package/schematics/lu-grid/migration.spec.js +56 -0
  238. package/schematics/lu-grid/migration.utils.js +60 -0
  239. package/schematics/lu-grid/schema.json +23 -0
  240. package/schematics/lu-icon/migration.spec.js +34 -1
  241. package/schematics/lu-loading/migration.spec.js +34 -1
  242. package/schematics/lu-select/migration.spec.js +34 -1
  243. package/schematics/lu-text-input/migration.spec.js +34 -1
  244. package/schematics/new-icons/index.js +35 -2
  245. package/schematics/new-icons/migration.spec.js +36 -3
  246. package/schematics/package.json +3 -0
  247. package/schematics/palettes/index.js +17 -2
  248. package/schematics/palettes/migration.spec.js +36 -3
  249. package/schematics/tokens-radius/migration.spec.js +36 -3
  250. package/schematics/tokens-spacing/migration.spec.js +36 -3
  251. package/schematics/tokens-typo/migration.spec.js +36 -3
  252. package/src/components/_picker.scss +6 -1
  253. package/src/components/_popover.scss +1 -2
  254. package/src/definitions/option/_option-item.scss +6 -25
  255. package/types/lucca-front-ng-a11y.d.ts +30 -2
  256. package/types/lucca-front-ng-activity-feed.d.ts +18 -3
  257. package/types/lucca-front-ng-api.d.ts +14 -8
  258. package/types/lucca-front-ng-box.d.ts +6 -1
  259. package/types/lucca-front-ng-bubble-icon.d.ts +12 -3
  260. package/types/lucca-front-ng-bubble-illustration.d.ts +11 -5
  261. package/types/lucca-front-ng-callout.d.ts +24 -16
  262. package/types/lucca-front-ng-chip.d.ts +10 -1
  263. package/types/lucca-front-ng-clear.d.ts +9 -3
  264. package/types/lucca-front-ng-color.d.ts +8 -1
  265. package/types/lucca-front-ng-comment.d.ts +8 -1
  266. package/types/lucca-front-ng-container.d.ts +8 -1
  267. package/types/lucca-front-ng-core-select-api.d.ts +13 -1
  268. package/types/lucca-front-ng-core-select-department.d.ts +3 -2
  269. package/types/lucca-front-ng-core-select-legal-units.d.ts +56 -0
  270. package/types/lucca-front-ng-core-select-user.d.ts +2 -1
  271. package/types/lucca-front-ng-core-select.d.ts +34 -15
  272. package/types/lucca-front-ng-core.d.ts +31 -8
  273. package/types/lucca-front-ng-data-table.d.ts +18 -3
  274. package/types/lucca-front-ng-date2.d.ts +28 -9
  275. package/types/lucca-front-ng-dialog.d.ts +13 -2
  276. package/types/lucca-front-ng-divider.d.ts +8 -1
  277. package/types/lucca-front-ng-empty-state.d.ts +16 -8
  278. package/types/lucca-front-ng-error-page.d.ts +9 -4
  279. package/types/lucca-front-ng-fancy-box.d.ts +8 -1
  280. package/types/lucca-front-ng-file-upload.d.ts +23 -11
  281. package/types/lucca-front-ng-filter-pills.d.ts +0 -1
  282. package/types/lucca-front-ng-footer.d.ts +11 -2
  283. package/types/lucca-front-ng-form-field.d.ts +34 -17
  284. package/types/lucca-front-ng-form-header.d.ts +9 -2
  285. package/types/lucca-front-ng-form-label.d.ts +13 -5
  286. package/types/lucca-front-ng-form.d.ts +2 -0
  287. package/types/lucca-front-ng-forms-phone-number-input.d.ts +19 -12
  288. package/types/lucca-front-ng-forms-rich-text-input.d.ts +17 -2
  289. package/types/lucca-front-ng-forms.d.ts +90 -22
  290. package/types/lucca-front-ng-gauge.d.ts +1 -1
  291. package/types/lucca-front-ng-grid.d.ts +23 -8
  292. package/types/lucca-front-ng-highlight-data.d.ts +16 -1
  293. package/types/lucca-front-ng-highlight-text.d.ts +12 -0
  294. package/types/lucca-front-ng-horizontal-navigation.d.ts +40 -3
  295. package/types/lucca-front-ng-impersonation.d.ts +33 -0
  296. package/types/lucca-front-ng-index-table.d.ts +19 -4
  297. package/types/lucca-front-ng-inline-message.d.ts +11 -4
  298. package/types/lucca-front-ng-input.d.ts +2 -1
  299. package/types/lucca-front-ng-link.d.ts +13 -3
  300. package/types/lucca-front-ng-listbox.d.ts +8 -1
  301. package/types/lucca-front-ng-listing.d.ts +1 -1
  302. package/types/lucca-front-ng-loading.d.ts +8 -1
  303. package/types/lucca-front-ng-modal.d.ts +1 -1
  304. package/types/lucca-front-ng-multi-select.d.ts +3 -0
  305. package/types/lucca-front-ng-numeric-badge.d.ts +9 -2
  306. package/types/lucca-front-ng-pagination.d.ts +8 -1
  307. package/types/lucca-front-ng-popover2.d.ts +23 -2
  308. package/types/lucca-front-ng-progress-bar.d.ts +8 -1
  309. package/types/lucca-front-ng-progress-stepper.d.ts +8 -1
  310. package/types/lucca-front-ng-read-more.d.ts +8 -1
  311. package/types/lucca-front-ng-resource-card.d.ts +10 -1
  312. package/types/lucca-front-ng-segmented-control-tabs.d.ts +2 -0
  313. package/types/lucca-front-ng-segmented-control.d.ts +4 -2
  314. package/types/lucca-front-ng-simple-select.d.ts +16 -17
  315. package/types/lucca-front-ng-skeleton.d.ts +51 -19
  316. package/types/lucca-front-ng-software-icon.d.ts +11 -6
  317. package/types/lucca-front-ng-sortable-list.d.ts +2 -1
  318. package/types/lucca-front-ng-status-badge.d.ts +9 -2
  319. package/types/lucca-front-ng-tag.d.ts +9 -2
  320. package/types/lucca-front-ng-time.d.ts +89 -8
  321. package/types/lucca-front-ng-title.d.ts +6 -1
  322. package/types/lucca-front-ng-tooltip.d.ts +7 -2
  323. package/types/lucca-front-ng-user.d.ts +19 -5
  324. package/types/lucca-front-ng-vertical-navigation.d.ts +1 -1
@@ -3,7 +3,7 @@ import * as i0 from '@angular/core';
3
3
  import { inject, Directive, input, forwardRef, model, computed } from '@angular/core';
4
4
  import { toObservable, toSignal } from '@angular/core/rxjs-interop';
5
5
  import { ALuSelectInputComponent, coreSelectDefaultOptionComparer, coreSelectDefaultOptionKey, CORE_SELECT_API_TOTAL_COUNT_PROVIDER, applySearchDelimiter } from '@lucca-front/ng/core-select';
6
- import { Subject, scan, startWith, debounceTime, takeUntil, merge, map, distinctUntilChanged, combineLatest, pairwise, tap, switchMap, concatMap, of, catchError, take } from 'rxjs';
6
+ import { Subject, scan, startWith, BehaviorSubject, takeUntil, of, take, switchMap, tap, map, merge, distinctUntilChanged, combineLatest, debounceTime, pairwise, concatMap, catchError } from 'rxjs';
7
7
 
8
8
  const LU_SELECT_MAGIC_PAGE_SIZE = 20;
9
9
  const MAGIC_DEBOUNCE_DURATION = 250;
@@ -14,12 +14,22 @@ class ALuCoreSelectApiDirective {
14
14
  this.debounceDuration = MAGIC_DEBOUNCE_DURATION;
15
15
  this.select = inject(ALuSelectInputComponent);
16
16
  this.page$ = this.select.nextPage$.pipe(scan((page) => page + 1, 0), startWith(0));
17
- this.clue$ = this.select.clueChange$.pipe(debounceTime(this.debounceDuration), startWith(''));
17
+ /**
18
+ * Current clue — updated by clueChange$ subscription (keeps select in searchable mode)
19
+ * and by direct getOptions calls from the select component.
20
+ */
21
+ this.currentClue$ = new BehaviorSubject('');
22
+ /**
23
+ * Clue observable — no debounce (debounce is now handled by the select component).
24
+ */
25
+ this.clue$ = this.currentClue$.asObservable();
18
26
  /**
19
27
  * Compare two options to know if they are the same. For example, compare by id or by JSON
20
28
  */
21
29
  this.optionComparer = (a, b) => this.optionKey(a) === this.optionKey(b);
22
30
  }
31
+ #lastClue;
32
+ #lastPage;
23
33
  ngOnInit() {
24
34
  if (this.select.optionComparer() === coreSelectDefaultOptionComparer) {
25
35
  this.select.optionComparer.set(this.optionComparer);
@@ -27,9 +37,34 @@ class ALuCoreSelectApiDirective {
27
37
  if (this.select.optionKey() === coreSelectDefaultOptionKey) {
28
38
  this.select.optionKey.set(this.optionKey);
29
39
  }
30
- this.buildOptions()
31
- .pipe(takeUntil(this.destroy$))
32
- .subscribe((options) => this.select.options.set(options));
40
+ // Subscribe to clueChange$ to (1) keep the select in searchable mode and (2) drive currentClue$
41
+ this.select.clueChange$.pipe(takeUntil(this.destroy$)).subscribe((clue) => {
42
+ this.currentClue$.next(clue);
43
+ this.clearLastPageByClue();
44
+ });
45
+ const dataSource = {
46
+ paramsChange: this.params$,
47
+ clueDebounceMs: this.debounceDuration,
48
+ getTotalCount: () => this.totalCount$,
49
+ reset: () => this.clearLastPageByClue(),
50
+ getOptions: ({ clue, page }) => {
51
+ const lastPage = clue === this.#lastClue ? this.#lastPage : undefined;
52
+ if (lastPage !== undefined && page > lastPage) {
53
+ return of([]);
54
+ }
55
+ return this.buildParamsFromClue(clue).pipe(take(1), switchMap((params) => this.getOptionsPage(params, page).pipe(tap(({ isLastPage }) => {
56
+ if (isLastPage) {
57
+ this.#lastClue = clue;
58
+ this.#lastPage = page;
59
+ }
60
+ }), map(({ items }) => items))));
61
+ },
62
+ };
63
+ this.select.dataSource.set(dataSource);
64
+ }
65
+ buildParamsFromClue(clue) {
66
+ this.currentClue$.next(clue);
67
+ return this.params$.pipe(take(1));
33
68
  }
34
69
  buildOptions() {
35
70
  // Prevent a double call to getOptions when the clue is changed while the panel is closed
@@ -57,18 +92,21 @@ class ALuCoreSelectApiDirective {
57
92
  : of([]);
58
93
  }));
59
94
  }
95
+ clearLastPageByClue() {
96
+ this.#lastClue = undefined;
97
+ this.#lastPage = undefined;
98
+ }
60
99
  getOptionsPage(params, page) {
61
- this.select.loading.set(true);
62
- return this.getOptions(params, page).pipe(catchError(() => of([])), tap(() => this.select.loading.set(false)), map((items) => ({ items, isLastPage: items.length < this.pageSize })));
100
+ return this.getOptions(params, page).pipe(catchError(() => of([])), map((items) => ({ items, isLastPage: items.length < this.pageSize })));
63
101
  }
64
102
  ngOnDestroy() {
65
103
  this.destroy$.next();
66
104
  this.destroy$.complete();
67
105
  }
68
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ALuCoreSelectApiDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
69
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: ALuCoreSelectApiDirective, isStandalone: true, ngImport: i0 }); }
106
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ALuCoreSelectApiDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
107
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: ALuCoreSelectApiDirective, isStandalone: true, ngImport: i0 }); }
70
108
  }
71
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ALuCoreSelectApiDirective, decorators: [{
109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ALuCoreSelectApiDirective, decorators: [{
72
110
  type: Directive
73
111
  }] });
74
112
 
@@ -76,10 +114,14 @@ class LuCoreSelectApiV3Directive extends ALuCoreSelectApiDirective {
76
114
  constructor() {
77
115
  super(...arguments);
78
116
  this.httpClient = inject(HttpClient);
79
- this.apiV3 = input.required(...(ngDevMode ? [{ debugName: "apiV3" }] : /* istanbul ignore next */ []));
80
- this.fields = input('id,name', ...(ngDevMode ? [{ debugName: "fields" }] : /* istanbul ignore next */ []));
81
- this.orderBy = input('name,asc', ...(ngDevMode ? [{ debugName: "orderBy" }] : /* istanbul ignore next */ []));
82
- this.filters = input({}, ...(ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []));
117
+ this.apiV3 = input.required(/* @ts-ignore */
118
+ ...(ngDevMode ? [{ debugName: "apiV3" }] : /* istanbul ignore next */ []));
119
+ this.fields = input('id,name', /* @ts-ignore */
120
+ ...(ngDevMode ? [{ debugName: "fields" }] : /* istanbul ignore next */ []));
121
+ this.orderBy = input('name,asc', /* @ts-ignore */
122
+ ...(ngDevMode ? [{ debugName: "orderBy" }] : /* istanbul ignore next */ []));
123
+ this.filters = input({}, /* @ts-ignore */
124
+ ...(ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []));
83
125
  this.url$ = toObservable(this.apiV3);
84
126
  this.fields$ = toObservable(this.fields);
85
127
  this.orderBy$ = toObservable(this.orderBy);
@@ -106,15 +148,15 @@ class LuCoreSelectApiV3Directive extends ALuCoreSelectApiDirective {
106
148
  },
107
149
  })), map((res) => res.data.items));
108
150
  }
109
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: LuCoreSelectApiV3Directive, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
110
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: LuCoreSelectApiV3Directive, isStandalone: true, selector: "lu-simple-select[apiV3],lu-multi-select[apiV3]", inputs: { apiV3: { classPropertyName: "apiV3", publicName: "apiV3", isSignal: true, isRequired: true, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null }, orderBy: { classPropertyName: "orderBy", publicName: "orderBy", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
151
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectApiV3Directive, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
152
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: LuCoreSelectApiV3Directive, isStandalone: true, selector: "lu-simple-select[apiV3],lu-multi-select[apiV3]", inputs: { apiV3: { classPropertyName: "apiV3", publicName: "apiV3", isSignal: true, isRequired: true, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null }, orderBy: { classPropertyName: "orderBy", publicName: "orderBy", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
111
153
  {
112
154
  provide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,
113
155
  useExisting: forwardRef(() => LuCoreSelectApiV3Directive),
114
156
  },
115
157
  ], usesInheritance: true, ngImport: i0 }); }
116
158
  }
117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: LuCoreSelectApiV3Directive, decorators: [{
159
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectApiV3Directive, decorators: [{
118
160
  type: Directive,
119
161
  args: [{
120
162
  // The attribute is already prefixed with "lu-simple-select"
@@ -132,10 +174,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
132
174
  class LuCoreSelectApiV4Directive extends ALuCoreSelectApiDirective {
133
175
  constructor() {
134
176
  super(...arguments);
135
- this.apiV4 = model.required(...(ngDevMode ? [{ debugName: "apiV4" }] : /* istanbul ignore next */ []));
136
- this.sort = input('+name', ...(ngDevMode ? [{ debugName: "sort" }] : /* istanbul ignore next */ []));
137
- this.filters = input({}, ...(ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []));
138
- this.searchDelimiter = input(' ', ...(ngDevMode ? [{ debugName: "searchDelimiter" }] : /* istanbul ignore next */ []));
177
+ this.apiV4 = model.required(/* @ts-ignore */
178
+ ...(ngDevMode ? [{ debugName: "apiV4" }] : /* istanbul ignore next */ []));
179
+ this.sort = input('+name', /* @ts-ignore */
180
+ ...(ngDevMode ? [{ debugName: "sort" }] : /* istanbul ignore next */ []));
181
+ this.filters = input({}, /* @ts-ignore */
182
+ ...(ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []));
183
+ this.searchDelimiter = input(' ', /* @ts-ignore */
184
+ ...(ngDevMode ? [{ debugName: "searchDelimiter" }] : /* istanbul ignore next */ []));
139
185
  this.httpClient = inject(HttpClient);
140
186
  this.clue = toSignal(this.clue$);
141
187
  this.params$ = toObservable(computed(() => {
@@ -167,15 +213,15 @@ class LuCoreSelectApiV4Directive extends ALuCoreSelectApiDirective {
167
213
  })
168
214
  .pipe(map((res) => (Array.isArray(res) ? res : res?.items) ?? []));
169
215
  }
170
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: LuCoreSelectApiV4Directive, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
171
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: LuCoreSelectApiV4Directive, isStandalone: true, selector: "lu-simple-select[apiV4],lu-multi-select[apiV4]", inputs: { apiV4: { classPropertyName: "apiV4", publicName: "apiV4", isSignal: true, isRequired: true, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, searchDelimiter: { classPropertyName: "searchDelimiter", publicName: "searchDelimiter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { apiV4: "apiV4Change" }, providers: [
216
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectApiV4Directive, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
217
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: LuCoreSelectApiV4Directive, isStandalone: true, selector: "lu-simple-select[apiV4],lu-multi-select[apiV4]", inputs: { apiV4: { classPropertyName: "apiV4", publicName: "apiV4", isSignal: true, isRequired: true, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, searchDelimiter: { classPropertyName: "searchDelimiter", publicName: "searchDelimiter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { apiV4: "apiV4Change" }, providers: [
172
218
  {
173
219
  provide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,
174
220
  useExisting: forwardRef(() => LuCoreSelectApiV4Directive),
175
221
  },
176
222
  ], usesInheritance: true, ngImport: i0 }); }
177
223
  }
178
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: LuCoreSelectApiV4Directive, decorators: [{
224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectApiV4Directive, decorators: [{
179
225
  type: Directive,
180
226
  args: [{
181
227
  // The attribute is already prefixed with "lu-simple-select"
@@ -1 +1 @@
1
- {"version":3,"file":"lucca-front-ng-core-select-api.mjs","sources":["../../../packages/ng/core-select/api/api.directive.ts","../../../packages/ng/core-select/api/api-v3.directive.ts","../../../packages/ng/core-select/api/api-v4.directive.ts","../../../packages/ng/core-select/api/lucca-front-ng-core-select-api.ts"],"sourcesContent":["import { Directive, inject, OnDestroy, OnInit } from '@angular/core';\nimport { ALuSelectInputComponent, coreSelectDefaultOptionComparer, coreSelectDefaultOptionKey, LuOptionComparer } from '@lucca-front/ng/core-select';\nimport { catchError, combineLatest, concatMap, debounceTime, distinctUntilChanged, map, merge, Observable, of, pairwise, scan, startWith, Subject, switchMap, takeUntil, tap } from 'rxjs';\n\nexport const LU_SELECT_MAGIC_PAGE_SIZE = 20;\nexport const MAGIC_DEBOUNCE_DURATION = 250;\n\n@Directive()\nexport abstract class ALuCoreSelectApiDirective<TOption, TParams = Record<string, string | number | boolean> | null> implements OnDestroy, OnInit {\n\tprotected readonly destroy$ = new Subject<void>();\n\tprotected pageSize = LU_SELECT_MAGIC_PAGE_SIZE;\n\tprotected debounceDuration = MAGIC_DEBOUNCE_DURATION;\n\n\tpublic select = inject<ALuSelectInputComponent<TOption, unknown>>(ALuSelectInputComponent);\n\n\tprotected readonly page$ = this.select.nextPage$.pipe(\n\t\tscan((page) => page + 1, 0),\n\t\tstartWith(0),\n\t);\n\n\tprotected readonly clue$ = this.select.clueChange$.pipe(debounceTime(this.debounceDuration), startWith(''));\n\n\t/**\n\t * Create an object that will be used as params for the api call\n\t */\n\tprotected abstract params$: Observable<TParams>;\n\n\t/**\n\t * Compare two options to know if they are the same. For example, compare by id or by JSON\n\t */\n\tprotected optionComparer: LuOptionComparer<TOption> = (a, b) => this.optionKey(a) === this.optionKey(b);\n\n\t/**\n\t * Return a unique key to identify the option in for-of loops\n\t */\n\tprotected abstract optionKey: (option: TOption) => unknown;\n\n\t/**\n\t * Return the options for the given params and page\n\t */\n\tprotected abstract getOptions(params: TParams, page: number): Observable<TOption[]>;\n\n\tpublic ngOnInit(): void {\n\t\tif (this.select.optionComparer() === coreSelectDefaultOptionComparer) {\n\t\t\tthis.select.optionComparer.set(this.optionComparer);\n\t\t}\n\n\t\tif (this.select.optionKey() === coreSelectDefaultOptionKey) {\n\t\t\tthis.select.optionKey.set(this.optionKey);\n\t\t}\n\n\t\tthis.buildOptions()\n\t\t\t.pipe(takeUntil(this.destroy$))\n\t\t\t.subscribe((options) => this.select.options.set(options));\n\t}\n\n\tprotected buildOptions(): Observable<TOption[]> {\n\t\t// Prevent a double call to getOptions when the clue is changed while the panel is closed\n\t\tconst clueIsPendingDebounce$ = merge(this.select.clueChange$.pipe(map(() => true)), this.clue$.pipe(map(() => false))).pipe(distinctUntilChanged());\n\t\tconst isOpen$ = combineLatest([this.select.isPanelOpen$, clueIsPendingDebounce$]).pipe(\n\t\t\tdebounceTime(0),\n\t\t\tstartWith([false, false]),\n\t\t\tpairwise(),\n\t\t\ttap(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => {\n\t\t\t\t// Start the loader as soon as the panel is opened to avoid a short display of the \"no result\" message\n\t\t\t\tif (!wasOpen && isOpen && clueIsPendingDebounce) {\n\t\t\t\t\tthis.select.loading.set(true);\n\t\t\t\t}\n\t\t\t}),\n\t\t\tmap(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => (isOpen && !wasOpen ? !clueIsPendingDebounce : isOpen)),\n\t\t\tdistinctUntilChanged(),\n\t\t);\n\n\t\treturn combineLatest([this.params$, isOpen$]).pipe(\n\t\t\tswitchMap(([params, isOpened]) => {\n\t\t\t\tconst hasNextPage$ = new Subject<void>();\n\n\t\t\t\treturn isOpened\n\t\t\t\t\t? this.page$.pipe(\n\t\t\t\t\t\t\ttakeUntil(hasNextPage$),\n\t\t\t\t\t\t\tconcatMap((page) => this.getOptionsPage(params, page).pipe(map(({ items, isLastPage }) => ({ items, isLastPage, page })))),\n\t\t\t\t\t\t\ttap(({ isLastPage }) => {\n\t\t\t\t\t\t\t\tif (isLastPage) {\n\t\t\t\t\t\t\t\t\t// `getOptionsPage` can emit multiple times (for example, when adding homonyms additional information),\n\t\t\t\t\t\t\t\t\t// so we cannot use takeWhile here.\n\t\t\t\t\t\t\t\t\thasNextPage$.next();\n\t\t\t\t\t\t\t\t\thasNextPage$.complete();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tscan(\n\t\t\t\t\t\t\t\t(acc, { items, page }) => {\n\t\t\t\t\t\t\t\t\tacc[page] = items;\n\t\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{} as Record<number, TOption[]>,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tmap((pages) => Object.values(pages).flat()),\n\t\t\t\t\t\t)\n\t\t\t\t\t: of([] as TOption[]);\n\t\t\t}),\n\t\t);\n\t}\n\n\tprotected getOptionsPage(params: TParams, page: number): Observable<{ items: TOption[]; isLastPage: boolean }> {\n\t\tthis.select.loading.set(true);\n\n\t\treturn this.getOptions(params, page).pipe(\n\t\t\tcatchError(() => of([] as TOption[])),\n\t\t\ttap(() => this.select.loading.set(false)),\n\t\t\tmap((items) => ({ items, isLastPage: items.length < this.pageSize })),\n\t\t);\n\t}\n\n\tpublic ngOnDestroy(): void {\n\t\tthis.destroy$.next();\n\t\tthis.destroy$.complete();\n\t}\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Directive, forwardRef, inject, input } from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { ILuApiCollectionResponse, ILuApiItem } from '@lucca-front/ng/api';\nimport { CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider } from '@lucca-front/ng/core-select';\nimport { combineLatest, debounceTime, map, Observable, switchMap, take } from 'rxjs';\nimport { ALuCoreSelectApiDirective } from './api.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[apiV3],lu-multi-select[apiV3]',\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectApiV3Directive),\n\t\t},\n\t],\n})\nexport class LuCoreSelectApiV3Directive<T extends ILuApiItem> extends ALuCoreSelectApiDirective<T> implements CoreSelectApiTotalCountProvider {\n\tprotected httpClient = inject(HttpClient);\n\n\treadonly apiV3 = input.required<string>();\n\n\treadonly fields = input('id,name');\n\n\treadonly orderBy = input<string | null>('name,asc');\n\n\treadonly filters = input<Record<string, string | number | boolean>>({});\n\n\tprotected readonly url$ = toObservable(this.apiV3);\n\tprotected readonly fields$ = toObservable(this.fields);\n\tprotected readonly orderBy$ = toObservable(this.orderBy);\n\tprotected readonly filters$ = toObservable(this.filters);\n\n\tprotected override params$ = combineLatest([this.fields$, this.filters$, this.orderBy$, this.clue$]).pipe(\n\t\tmap(([fields, filters, orderBy, clue]) => ({\n\t\t\t...filters,\n\t\t\t...(fields ? { fields } : {}),\n\t\t\t...(orderBy ? { orderBy } : {}),\n\t\t\t...(clue ? { name: `like,${clue}` } : {}),\n\t\t})),\n\t);\n\n\tpublic totalCount$ = combineLatest([this.url$, this.filters$]).pipe(\n\t\tdebounceTime(250),\n\t\tswitchMap(([url, params]) =>\n\t\t\tthis.httpClient.get<{ data: { count: number } }>(url, {\n\t\t\t\tparams: {\n\t\t\t\t\t...params,\n\t\t\t\t\tfields: 'collection.count',\n\t\t\t\t},\n\t\t\t}),\n\t\t),\n\t\tmap((res) => res.data?.count ?? 0),\n\t);\n\n\tprotected override getOptions(params: Record<string, string | number | boolean>, page: number): Observable<T[]> {\n\t\treturn this.url$.pipe(\n\t\t\ttake(1),\n\t\t\tswitchMap((url) =>\n\t\t\t\tthis.httpClient.get<ILuApiCollectionResponse<T>>(url, {\n\t\t\t\t\tparams: {\n\t\t\t\t\t\t...params,\n\t\t\t\t\t\tpaging: `${page * this.pageSize},${this.pageSize}`,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t\tmap((res) => res.data.items),\n\t\t);\n\t}\n\n\tprotected override optionKey = (option: T) => option.id;\n}\n","import { HttpClient } from '@angular/common/http';\nimport { computed, Directive, forwardRef, inject, input, model } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { ILuApiItem } from '@lucca-front/ng/api';\nimport { applySearchDelimiter, CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider } from '@lucca-front/ng/core-select';\nimport { debounceTime, map, Observable, switchMap } from 'rxjs';\nimport { ALuCoreSelectApiDirective } from './api.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[apiV4],lu-multi-select[apiV4]',\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectApiV4Directive),\n\t\t},\n\t],\n})\nexport class LuCoreSelectApiV4Directive<T extends ILuApiItem> extends ALuCoreSelectApiDirective<T> implements CoreSelectApiTotalCountProvider {\n\treadonly apiV4 = model.required<string>();\n\treadonly sort = input<string | null>('+name');\n\treadonly filters = input<Record<string, string | number | boolean>>({});\n\treadonly searchDelimiter = input<string>(' ');\n\n\tprotected httpClient = inject(HttpClient);\n\n\tprotected readonly clue = toSignal(this.clue$);\n\n\tprotected override readonly params$: Observable<Record<string, string | number | boolean>> = toObservable(\n\t\tcomputed(() => {\n\t\t\tconst sort = this.sort();\n\t\t\tconst clue = this.clue();\n\t\t\tconst searchDelimiter = this.searchDelimiter();\n\t\t\treturn {\n\t\t\t\t...this.filters(),\n\t\t\t\t...(sort ? { sort } : {}),\n\t\t\t\t...(clue ? { search: applySearchDelimiter(clue, searchDelimiter) } : {}),\n\t\t\t};\n\t\t}),\n\t);\n\n\tpublic readonly totalCount$ = toObservable(computed(() => ({ url: this.apiV4(), filters: this.filters() }))).pipe(\n\t\tdebounceTime(250),\n\t\tswitchMap(({ url, filters }) =>\n\t\t\tthis.httpClient.get<{ count: number }>(url, {\n\t\t\t\tparams: {\n\t\t\t\t\t...filters,\n\t\t\t\t\t['fields.root']: 'count',\n\t\t\t\t},\n\t\t\t}),\n\t\t),\n\t\tmap((res) => res?.count ?? 0),\n\t);\n\n\tprotected override getOptions(params: Record<string, string | number | boolean>, page: number): Observable<T[]> {\n\t\treturn this.httpClient\n\t\t\t.get<T[] | { items: T[] }>(this.apiV4(), {\n\t\t\t\tparams: {\n\t\t\t\t\t...params,\n\t\t\t\t\tpage: page + 1,\n\t\t\t\t\tlimit: this.pageSize,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.pipe(map((res) => (Array.isArray(res) ? res : res?.items) ?? []));\n\t}\n\n\tprotected override optionKey = (option: T) => option.id;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAIO,MAAM,yBAAyB,GAAG;AAClC,MAAM,uBAAuB,GAAG,GAAG;MAGpB,yBAAyB,CAAA;AAD/C,IAAA,WAAA,GAAA;AAEoB,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,OAAO,EAAQ;QACvC,IAAA,CAAA,QAAQ,GAAG,yBAAyB;QACpC,IAAA,CAAA,gBAAgB,GAAG,uBAAuB;AAE7C,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAA4C,uBAAuB,CAAC;AAEvE,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CACpD,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,EAC3B,SAAS,CAAC,CAAC,CAAC,CACZ;QAEkB,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,YA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AA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,eAAA,EAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,KAAA,EAAA,aAAA,EAAA,EAAA,SAAA,EAP3B;AACV,YAAA;AACC,gBAAA,OAAO,EAAE,oCAAoC;AAC7C,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,0BAA0B,CAAC;AACzD,aAAA;AACD,SAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAEW,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAXtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;;AAGV,oBAAA,QAAQ,EAAE,gDAAgD;AAC1D,oBAAA,SAAS,EAAE;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,oCAAoC;AAC7C,4BAAA,WAAW,EAAE,UAAU,CAAC,gCAAgC,CAAC;AACzD,yBAAA;AACD,qBAAA;AACD,iBAAA;;;AClBD;;AAEG;;;;"}
1
+ {"version":3,"file":"lucca-front-ng-core-select-api.mjs","sources":["../../../packages/ng/core-select/api/api.directive.ts","../../../packages/ng/core-select/api/api-v3.directive.ts","../../../packages/ng/core-select/api/api-v4.directive.ts","../../../packages/ng/core-select/api/lucca-front-ng-core-select-api.ts"],"sourcesContent":["import { Directive, inject, OnDestroy, OnInit } from '@angular/core';\nimport { ALuSelectInputComponent, coreSelectDefaultOptionComparer, coreSelectDefaultOptionKey, LuOptionComparer, SelectDataSource } from '@lucca-front/ng/core-select';\nimport {\n\tBehaviorSubject,\n\tcatchError,\n\tcombineLatest,\n\tconcatMap,\n\tdebounceTime,\n\tdistinctUntilChanged,\n\tmap,\n\tmerge,\n\tObservable,\n\tof,\n\tpairwise,\n\tscan,\n\tstartWith,\n\tSubject,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n} from 'rxjs';\n\nexport const LU_SELECT_MAGIC_PAGE_SIZE = 20;\nexport const MAGIC_DEBOUNCE_DURATION = 250;\n\n@Directive()\nexport abstract class ALuCoreSelectApiDirective<TOption, TParams = Record<string, string | number | boolean> | null> implements OnDestroy, OnInit {\n\tprotected readonly destroy$ = new Subject<void>();\n\tprotected pageSize = LU_SELECT_MAGIC_PAGE_SIZE;\n\tprotected debounceDuration = MAGIC_DEBOUNCE_DURATION;\n\n\tpublic select = inject<ALuSelectInputComponent<TOption, unknown>>(ALuSelectInputComponent);\n\n\tprotected readonly page$ = this.select.nextPage$.pipe(\n\t\tscan((page) => page + 1, 0),\n\t\tstartWith(0),\n\t);\n\n\t/**\n\t * Current clue — updated by clueChange$ subscription (keeps select in searchable mode)\n\t * and by direct getOptions calls from the select component.\n\t */\n\tprotected readonly currentClue$ = new BehaviorSubject<string>('');\n\n\t/**\n\t * Clue observable — no debounce (debounce is now handled by the select component).\n\t */\n\tprotected readonly clue$ = this.currentClue$.asObservable();\n\n\t/**\n\t * Create an object that will be used as params for the api call\n\t */\n\tprotected abstract params$: Observable<TParams>;\n\n\t/**\n\t * Compare two options to know if they are the same. For example, compare by id or by JSON\n\t */\n\tprotected optionComparer: LuOptionComparer<TOption> = (a, b) => this.optionKey(a) === this.optionKey(b);\n\n\t/**\n\t * Return a unique key to identify the option in for-of loops\n\t */\n\tprotected abstract optionKey: (option: TOption) => unknown;\n\n\t/**\n\t * Return the options for the given params and page\n\t */\n\tprotected abstract getOptions(params: TParams, page: number): Observable<TOption[]>;\n\n\t#lastClue?: string;\n\t#lastPage?: number;\n\n\tpublic ngOnInit(): void {\n\t\tif (this.select.optionComparer() === coreSelectDefaultOptionComparer) {\n\t\t\tthis.select.optionComparer.set(this.optionComparer);\n\t\t}\n\n\t\tif (this.select.optionKey() === coreSelectDefaultOptionKey) {\n\t\t\tthis.select.optionKey.set(this.optionKey);\n\t\t}\n\n\t\t// Subscribe to clueChange$ to (1) keep the select in searchable mode and (2) drive currentClue$\n\t\tthis.select.clueChange$.pipe(takeUntil(this.destroy$)).subscribe((clue) => {\n\t\t\tthis.currentClue$.next(clue);\n\t\t\tthis.clearLastPageByClue();\n\t\t});\n\n\t\tconst dataSource: SelectDataSource<TOption> = {\n\t\t\tparamsChange: this.params$,\n\t\t\tclueDebounceMs: this.debounceDuration,\n\t\t\tgetTotalCount: () => this.totalCount$,\n\t\t\treset: () => this.clearLastPageByClue(),\n\t\t\tgetOptions: ({ clue, page }) => {\n\t\t\t\tconst lastPage = clue === this.#lastClue ? this.#lastPage : undefined;\n\t\t\t\tif (lastPage !== undefined && page > lastPage) {\n\t\t\t\t\treturn of([] as readonly TOption[]);\n\t\t\t\t}\n\t\t\t\treturn this.buildParamsFromClue(clue).pipe(\n\t\t\t\t\ttake(1),\n\t\t\t\t\tswitchMap((params) =>\n\t\t\t\t\t\tthis.getOptionsPage(params, page).pipe(\n\t\t\t\t\t\t\ttap(({ isLastPage }) => {\n\t\t\t\t\t\t\t\tif (isLastPage) {\n\t\t\t\t\t\t\t\t\tthis.#lastClue = clue;\n\t\t\t\t\t\t\t\t\tthis.#lastPage = page;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tmap(({ items }) => items as readonly TOption[]),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\n\t\tthis.select.dataSource.set(dataSource);\n\t}\n\n\tprotected buildParamsFromClue(clue: string): Observable<TParams> {\n\t\tthis.currentClue$.next(clue);\n\t\treturn this.params$.pipe(take(1));\n\t}\n\n\tpublic abstract totalCount$: Observable<number>;\n\n\tprotected buildOptions(): Observable<TOption[]> {\n\t\t// Prevent a double call to getOptions when the clue is changed while the panel is closed\n\t\tconst clueIsPendingDebounce$ = merge(this.select.clueChange$.pipe(map(() => true)), this.clue$.pipe(map(() => false))).pipe(distinctUntilChanged());\n\t\tconst isOpen$ = combineLatest([this.select.isPanelOpen$, clueIsPendingDebounce$]).pipe(\n\t\t\tdebounceTime(0),\n\t\t\tstartWith([false, false]),\n\t\t\tpairwise(),\n\t\t\ttap(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => {\n\t\t\t\t// Start the loader as soon as the panel is opened to avoid a short display of the \"no result\" message\n\t\t\t\tif (!wasOpen && isOpen && clueIsPendingDebounce) {\n\t\t\t\t\tthis.select.loading.set(true);\n\t\t\t\t}\n\t\t\t}),\n\t\t\tmap(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => (isOpen && !wasOpen ? !clueIsPendingDebounce : isOpen)),\n\t\t\tdistinctUntilChanged(),\n\t\t);\n\n\t\treturn combineLatest([this.params$, isOpen$]).pipe(\n\t\t\tswitchMap(([params, isOpened]) => {\n\t\t\t\tconst hasNextPage$ = new Subject<void>();\n\n\t\t\t\treturn isOpened\n\t\t\t\t\t? this.page$.pipe(\n\t\t\t\t\t\t\ttakeUntil(hasNextPage$),\n\t\t\t\t\t\t\tconcatMap((page) => this.getOptionsPage(params, page).pipe(map(({ items, isLastPage }) => ({ items, isLastPage, page })))),\n\t\t\t\t\t\t\ttap(({ isLastPage }) => {\n\t\t\t\t\t\t\t\tif (isLastPage) {\n\t\t\t\t\t\t\t\t\t// `getOptionsPage` can emit multiple times (for example, when adding homonyms additional information),\n\t\t\t\t\t\t\t\t\t// so we cannot use takeWhile here.\n\t\t\t\t\t\t\t\t\thasNextPage$.next();\n\t\t\t\t\t\t\t\t\thasNextPage$.complete();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tscan(\n\t\t\t\t\t\t\t\t(acc, { items, page }) => {\n\t\t\t\t\t\t\t\t\tacc[page] = items;\n\t\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{} as Record<number, TOption[]>,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tmap((pages) => Object.values(pages).flat()),\n\t\t\t\t\t\t)\n\t\t\t\t\t: of([] as TOption[]);\n\t\t\t}),\n\t\t);\n\t}\n\n\tprotected clearLastPageByClue() {\n\t\tthis.#lastClue = undefined;\n\t\tthis.#lastPage = undefined;\n\t}\n\n\tprotected getOptionsPage(params: TParams, page: number): Observable<{ items: TOption[]; isLastPage: boolean }> {\n\t\treturn this.getOptions(params, page).pipe(\n\t\t\tcatchError(() => of([] as TOption[])),\n\t\t\tmap((items) => ({ items, isLastPage: items.length < this.pageSize })),\n\t\t);\n\t}\n\n\tpublic ngOnDestroy(): void {\n\t\tthis.destroy$.next();\n\t\tthis.destroy$.complete();\n\t}\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Directive, forwardRef, inject, input } from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { ILuApiCollectionResponse, ILuApiItem } from '@lucca-front/ng/api';\nimport { CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider } from '@lucca-front/ng/core-select';\nimport { combineLatest, debounceTime, map, Observable, switchMap, take } from 'rxjs';\nimport { ALuCoreSelectApiDirective } from './api.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[apiV3],lu-multi-select[apiV3]',\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectApiV3Directive),\n\t\t},\n\t],\n})\nexport class LuCoreSelectApiV3Directive<T extends ILuApiItem> extends ALuCoreSelectApiDirective<T> implements CoreSelectApiTotalCountProvider {\n\tprotected httpClient = inject(HttpClient);\n\n\treadonly apiV3 = input.required<string>();\n\n\treadonly fields = input('id,name');\n\n\treadonly orderBy = input<string | null>('name,asc');\n\n\treadonly filters = input<Record<string, string | number | boolean>>({});\n\n\tprotected readonly url$ = toObservable(this.apiV3);\n\tprotected readonly fields$ = toObservable(this.fields);\n\tprotected readonly orderBy$ = toObservable(this.orderBy);\n\tprotected readonly filters$ = toObservable(this.filters);\n\n\tprotected override params$ = combineLatest([this.fields$, this.filters$, this.orderBy$, this.clue$]).pipe(\n\t\tmap(([fields, filters, orderBy, clue]) => ({\n\t\t\t...filters,\n\t\t\t...(fields ? { fields } : {}),\n\t\t\t...(orderBy ? { orderBy } : {}),\n\t\t\t...(clue ? { name: `like,${clue}` } : {}),\n\t\t})),\n\t);\n\n\tpublic totalCount$ = combineLatest([this.url$, this.filters$]).pipe(\n\t\tdebounceTime(250),\n\t\tswitchMap(([url, params]) =>\n\t\t\tthis.httpClient.get<{ data: { count: number } }>(url, {\n\t\t\t\tparams: {\n\t\t\t\t\t...params,\n\t\t\t\t\tfields: 'collection.count',\n\t\t\t\t},\n\t\t\t}),\n\t\t),\n\t\tmap((res) => res.data?.count ?? 0),\n\t);\n\n\tprotected override getOptions(params: Record<string, string | number | boolean>, page: number): Observable<T[]> {\n\t\treturn this.url$.pipe(\n\t\t\ttake(1),\n\t\t\tswitchMap((url) =>\n\t\t\t\tthis.httpClient.get<ILuApiCollectionResponse<T>>(url, {\n\t\t\t\t\tparams: {\n\t\t\t\t\t\t...params,\n\t\t\t\t\t\tpaging: `${page * this.pageSize},${this.pageSize}`,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t\tmap((res) => res.data.items),\n\t\t);\n\t}\n\n\tprotected override optionKey = (option: T) => option.id;\n}\n","import { HttpClient } from '@angular/common/http';\nimport { computed, Directive, forwardRef, inject, input, model } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { ILuApiItem } from '@lucca-front/ng/api';\nimport { applySearchDelimiter, CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider } from '@lucca-front/ng/core-select';\nimport { debounceTime, map, Observable, switchMap } from 'rxjs';\nimport { ALuCoreSelectApiDirective } from './api.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[apiV4],lu-multi-select[apiV4]',\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectApiV4Directive),\n\t\t},\n\t],\n})\nexport class LuCoreSelectApiV4Directive<T extends ILuApiItem> extends ALuCoreSelectApiDirective<T> implements CoreSelectApiTotalCountProvider {\n\treadonly apiV4 = model.required<string>();\n\treadonly sort = input<string | null>('+name');\n\treadonly filters = input<Record<string, string | number | boolean>>({});\n\treadonly searchDelimiter = input<string>(' ');\n\n\tprotected httpClient = inject(HttpClient);\n\n\tprotected readonly clue = toSignal(this.clue$);\n\n\tprotected override readonly params$: Observable<Record<string, string | number | boolean>> = toObservable(\n\t\tcomputed(() => {\n\t\t\tconst sort = this.sort();\n\t\t\tconst clue = this.clue();\n\t\t\tconst searchDelimiter = this.searchDelimiter();\n\t\t\treturn {\n\t\t\t\t...this.filters(),\n\t\t\t\t...(sort ? { sort } : {}),\n\t\t\t\t...(clue ? { search: applySearchDelimiter(clue, searchDelimiter) } : {}),\n\t\t\t};\n\t\t}),\n\t);\n\n\tpublic readonly totalCount$ = toObservable(computed(() => ({ url: this.apiV4(), filters: this.filters() }))).pipe(\n\t\tdebounceTime(250),\n\t\tswitchMap(({ url, filters }) =>\n\t\t\tthis.httpClient.get<{ count: number }>(url, {\n\t\t\t\tparams: {\n\t\t\t\t\t...filters,\n\t\t\t\t\t['fields.root']: 'count',\n\t\t\t\t},\n\t\t\t}),\n\t\t),\n\t\tmap((res) => res?.count ?? 0),\n\t);\n\n\tprotected override getOptions(params: Record<string, string | number | boolean>, page: number): Observable<T[]> {\n\t\treturn this.httpClient\n\t\t\t.get<T[] | { items: T[] }>(this.apiV4(), {\n\t\t\t\tparams: {\n\t\t\t\t\t...params,\n\t\t\t\t\tpage: page + 1,\n\t\t\t\t\tlimit: this.pageSize,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.pipe(map((res) => (Array.isArray(res) ? res : res?.items) ?? []));\n\t}\n\n\tprotected override optionKey = (option: T) => option.id;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAuBO,MAAM,yBAAyB,GAAG;AAClC,MAAM,uBAAuB,GAAG,GAAG;MAGpB,yBAAyB,CAAA;AAD/C,IAAA,WAAA,GAAA;AAEoB,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,OAAO,EAAQ;QACvC,IAAA,CAAA,QAAQ,GAAG,yBAAyB;QACpC,IAAA,CAAA,gBAAgB,GAAG,uBAAuB;AAE7C,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAA4C,uBAAuB,CAAC;AAEvE,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CACpD,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,EAC3B,SAAS,CAAC,CAAC,CAAC,CACZ;AAED;;;AAGG;AACgB,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,eAAe,CAAS,EAAE,CAAC;AAEjE;;AAEG;AACgB,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE;AAO3D;;AAEG;QACO,IAAA,CAAA,cAAc,GAA8B,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;AAkIvG,IAAA;AAtHA,IAAA,SAAS;AACT,IAAA,SAAS;IAEF,QAAQ,GAAA;QACd,IAAI,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,KAAK,+BAA+B,EAAE;YACrE,IAAI,CAAC,MAAM,CAAC,cAAc,CA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AA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAEW,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAXtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;;AAGV,oBAAA,QAAQ,EAAE,gDAAgD;AAC1D,oBAAA,SAAS,EAAE;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,oCAAoC;AAC7C,4BAAA,WAAW,EAAE,UAAU,CAAC,gCAAgC,CAAC;AACzD,yBAAA;AACD,qBAAA;AACD,iBAAA;;;AClBD;;AAEG;;;;"}
@@ -6,7 +6,7 @@ import { isNotNil } from '@lucca-front/ng/core';
6
6
  import { ALuSelectInputComponent, CORE_SELECT_API_TOTAL_COUNT_PROVIDER } from '@lucca-front/ng/core-select';
7
7
  import { ALuCoreSelectApiDirective } from '@lucca-front/ng/core-select/api';
8
8
  import { map, combineLatest, of } from 'rxjs';
9
- import { filter } from 'rxjs/operators';
9
+ import { debounceTime, switchMap } from 'rxjs/operators';
10
10
 
11
11
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
12
  class NoopTreeSelectDirective {
@@ -14,16 +14,17 @@ class NoopTreeSelectDirective {
14
14
  constructor() {
15
15
  this.#select = inject(ALuSelectInputComponent);
16
16
  this.groupingFnInput = input(() => null, { ...(ngDevMode ? { debugName: "groupingFnInput" } : /* istanbul ignore next */ {}), alias: 'noopTreeSelect' });
17
- this.groupingFn = linkedSignal(() => this.groupingFnInput(), ...(ngDevMode ? [{ debugName: "groupingFn" }] : /* istanbul ignore next */ []));
17
+ this.groupingFn = linkedSignal(() => this.groupingFnInput(), /* @ts-ignore */
18
+ ...(ngDevMode ? [{ debugName: "groupingFn" }] : /* istanbul ignore next */ []));
18
19
  this.#select.treeGenerator = this;
19
20
  }
20
21
  generateTrees(items) {
21
22
  return items;
22
23
  }
23
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NoopTreeSelectDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
24
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NoopTreeSelectDirective, isStandalone: true, selector: "lu-simple-select[noopTreeSelect],lu-multi-select[noopTreeSelect]", inputs: { groupingFnInput: { classPropertyName: "groupingFnInput", publicName: "noopTreeSelect", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
24
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: NoopTreeSelectDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
25
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: NoopTreeSelectDirective, isStandalone: true, selector: "lu-simple-select[noopTreeSelect],lu-multi-select[noopTreeSelect]", inputs: { groupingFnInput: { classPropertyName: "groupingFnInput", publicName: "noopTreeSelect", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
25
26
  }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NoopTreeSelectDirective, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: NoopTreeSelectDirective, decorators: [{
27
28
  type: Directive,
28
29
  args: [{
29
30
  // eslint-disable-next-line @angular-eslint/directive-selector
@@ -35,12 +36,20 @@ class LuCoreSelectDepartmentsDirective extends ALuCoreSelectApiDirective {
35
36
  constructor() {
36
37
  super(...arguments);
37
38
  this.httpClient = inject(HttpClient);
38
- this.url = input('/organization/structure/api/departments/tree', ...(ngDevMode ? [{ debugName: "url" }] : /* istanbul ignore next */ []));
39
- this.filters = input(null, ...(ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []));
40
- this.operationIds = input(null, ...(ngDevMode ? [{ debugName: "operationIds" }] : /* istanbul ignore next */ []));
41
- this.uniqueOperationIds = input(null, ...(ngDevMode ? [{ debugName: "uniqueOperationIds" }] : /* istanbul ignore next */ []));
42
- this.appInstanceId = input(null, ...(ngDevMode ? [{ debugName: "appInstanceId" }] : /* istanbul ignore next */ []));
43
- this.searchDelimiter = input(' ', ...(ngDevMode ? [{ debugName: "searchDelimiter" }] : /* istanbul ignore next */ []));
39
+ this.url = input('/organization/structure/api/departments/tree', /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "url" }] : /* istanbul ignore next */ []));
41
+ this.countUrl = input('/organization/structure/api/departments', /* @ts-ignore */
42
+ ...(ngDevMode ? [{ debugName: "countUrl" }] : /* istanbul ignore next */ []));
43
+ this.filters = input(null, /* @ts-ignore */
44
+ ...(ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []));
45
+ this.operationIds = input(null, /* @ts-ignore */
46
+ ...(ngDevMode ? [{ debugName: "operationIds" }] : /* istanbul ignore next */ []));
47
+ this.uniqueOperationIds = input(null, /* @ts-ignore */
48
+ ...(ngDevMode ? [{ debugName: "uniqueOperationIds" }] : /* istanbul ignore next */ []));
49
+ this.appInstanceId = input(null, /* @ts-ignore */
50
+ ...(ngDevMode ? [{ debugName: "appInstanceId" }] : /* istanbul ignore next */ []));
51
+ this.searchDelimiter = input(' ', /* @ts-ignore */
52
+ ...(ngDevMode ? [{ debugName: "searchDelimiter" }] : /* istanbul ignore next */ []));
44
53
  this.params$ = toObservable(computed(() => {
45
54
  const operationIds = this.operationIds();
46
55
  const uniqueOperationIds = this.uniqueOperationIds();
@@ -52,9 +61,13 @@ class LuCoreSelectDepartmentsDirective extends ALuCoreSelectApiDirective {
52
61
  ...(appInstanceId ? { appInstanceId } : {}),
53
62
  };
54
63
  }));
55
- this.totalCount$ = this.select.options$.pipe(filter((opts) => opts.length > 0), map((opts) => {
56
- return opts.map((branch) => this.flattenTree(branch)).flat().length;
57
- }));
64
+ this.totalCount$ = toObservable(computed(() => ({ url: this.countUrl(), filters: this.filters() }))).pipe(debounceTime(250), switchMap(({ url, filters }) => this.httpClient.get(url, {
65
+ params: {
66
+ ...filters,
67
+ limit: 0,
68
+ ['fields.root']: 'count',
69
+ },
70
+ })), map((res) => res?.count ?? 0));
58
71
  this.optionKey = (option) => {
59
72
  if (!option) {
60
73
  return null;
@@ -107,15 +120,15 @@ class LuCoreSelectDepartmentsDirective extends ALuCoreSelectApiDirective {
107
120
  }
108
121
  return result;
109
122
  }
110
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: LuCoreSelectDepartmentsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
111
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: LuCoreSelectDepartmentsDirective, isStandalone: true, selector: "lu-simple-select[departments],lu-multi-select[departments]", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, operationIds: { classPropertyName: "operationIds", publicName: "operationIds", isSignal: true, isRequired: false, transformFunction: null }, uniqueOperationIds: { classPropertyName: "uniqueOperationIds", publicName: "uniqueOperationIds", isSignal: true, isRequired: false, transformFunction: null }, appInstanceId: { classPropertyName: "appInstanceId", publicName: "appInstanceId", isSignal: true, isRequired: false, transformFunction: null }, searchDelimiter: { classPropertyName: "searchDelimiter", publicName: "searchDelimiter", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
123
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectDepartmentsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
124
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: LuCoreSelectDepartmentsDirective, isStandalone: true, selector: "lu-simple-select[departments],lu-multi-select[departments]", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, countUrl: { classPropertyName: "countUrl", publicName: "countUrl", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, operationIds: { classPropertyName: "operationIds", publicName: "operationIds", isSignal: true, isRequired: false, transformFunction: null }, uniqueOperationIds: { classPropertyName: "uniqueOperationIds", publicName: "uniqueOperationIds", isSignal: true, isRequired: false, transformFunction: null }, appInstanceId: { classPropertyName: "appInstanceId", publicName: "appInstanceId", isSignal: true, isRequired: false, transformFunction: null }, searchDelimiter: { classPropertyName: "searchDelimiter", publicName: "searchDelimiter", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
112
125
  {
113
126
  provide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,
114
127
  useExisting: forwardRef(() => LuCoreSelectDepartmentsDirective),
115
128
  },
116
129
  ], exportAs: ["luDepartments"], usesInheritance: true, hostDirectives: [{ directive: NoopTreeSelectDirective }], ngImport: i0 }); }
117
130
  }
118
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: LuCoreSelectDepartmentsDirective, decorators: [{
131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectDepartmentsDirective, decorators: [{
119
132
  type: Directive,
120
133
  args: [{
121
134
  // The attribute is already prefixed with "lu-simple-select" / "lu-multi-select"
@@ -130,7 +143,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
130
143
  ],
131
144
  hostDirectives: [NoopTreeSelectDirective],
132
145
  }]
133
- }], propDecorators: { url: [{ type: i0.Input, args: [{ isSignal: true, alias: "url", required: false }] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }], operationIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "operationIds", required: false }] }], uniqueOperationIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "uniqueOperationIds", required: false }] }], appInstanceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "appInstanceId", required: false }] }], searchDelimiter: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchDelimiter", required: false }] }] } });
146
+ }], propDecorators: { url: [{ type: i0.Input, args: [{ isSignal: true, alias: "url", required: false }] }], countUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "countUrl", required: false }] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }], operationIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "operationIds", required: false }] }], uniqueOperationIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "uniqueOperationIds", required: false }] }], appInstanceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "appInstanceId", required: false }] }], searchDelimiter: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchDelimiter", required: false }] }] } });
134
147
 
135
148
  /**
136
149
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"lucca-front-ng-core-select-department.mjs","sources":["../../../packages/ng/core-select/department/noop-tree-select.directive.ts","../../../packages/ng/core-select/department/departments.directive.ts","../../../packages/ng/core-select/department/lucca-front-ng-core-select-department.ts"],"sourcesContent":["import { Directive, inject, input, linkedSignal } from '@angular/core';\nimport { ALuSelectInputComponent, TreeGenerator, TreeGroupingFn, TreeNode } from '@lucca-front/ng/core-select';\n\n@Directive({\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[noopTreeSelect],lu-multi-select[noopTreeSelect]',\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class NoopTreeSelectDirective<T extends TreeNode<any>, V> implements TreeGenerator<T, T> {\n\t#select = inject<ALuSelectInputComponent<T, V>>(ALuSelectInputComponent);\n\n\treadonly groupingFnInput = input<TreeGroupingFn<T>>(() => null, { alias: 'noopTreeSelect' });\n\n\treadonly groupingFn = linkedSignal(() => this.groupingFnInput());\n\n\tconstructor() {\n\t\tthis.#select.treeGenerator = this;\n\t}\n\n\tgenerateTrees(items: T[]): T[] {\n\t\treturn items;\n\t}\n}\n","import { HttpClient } from '@angular/common/http';\nimport { computed, Directive, forwardRef, inject, input, OnInit } from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { isNotNil } from '@lucca-front/ng/core';\nimport { CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider, TreeNode } from '@lucca-front/ng/core-select';\nimport { ALuCoreSelectApiDirective } from '@lucca-front/ng/core-select/api';\nimport { ILuDepartment } from '@lucca-front/ng/department';\nimport { combineLatest, map, Observable, of } from 'rxjs';\nimport { filter } from 'rxjs/operators';\nimport { NoopTreeSelectDirective } from './noop-tree-select.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\" / \"lu-multi-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[departments],lu-multi-select[departments]',\n\texportAs: 'luDepartments',\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectDepartmentsDirective),\n\t\t},\n\t],\n\thostDirectives: [NoopTreeSelectDirective],\n})\nexport class LuCoreSelectDepartmentsDirective<T extends ILuDepartment = ILuDepartment> extends ALuCoreSelectApiDirective<TreeNode<T>> implements OnInit, CoreSelectApiTotalCountProvider {\n\tprotected httpClient = inject(HttpClient);\n\n\treadonly url = input<string>('/organization/structure/api/departments/tree');\n\treadonly filters = input<Record<string, string | number | boolean> | null>(null);\n\treadonly operationIds = input<readonly number[] | null>(null);\n\treadonly uniqueOperationIds = input<readonly number[] | null>(null);\n\treadonly appInstanceId = input<number | null>(null);\n\treadonly searchDelimiter = input<string>(' ');\n\n\tpublic override ngOnInit(): void {\n\t\tsuper.ngOnInit();\n\t}\n\n\tprotected override buildOptions(): Observable<TreeNode<T>[]> {\n\t\treturn combineLatest([super.buildOptions(), this.clue$]).pipe(\n\t\t\tmap(([data, clue]) => {\n\t\t\t\treturn this.trim(data, clue);\n\t\t\t}),\n\t\t);\n\t}\n\n\tprotected override getOptionsPage(params: Record<string, string | number | boolean> | null, page: number): Observable<{ items: TreeNode<T>[]; isLastPage: boolean }> {\n\t\tif (page > 0) {\n\t\t\treturn of({ items: [], isLastPage: true });\n\t\t}\n\n\t\treturn super.getOptionsPage(params, page).pipe(map((result) => ({ ...result, isLastPage: true })));\n\t}\n\n\tprotected override getOptions(params: Record<string, string | number | boolean> | null): Observable<TreeNode<T>[]> {\n\t\treturn this.httpClient\n\t\t\t.get<{ children?: TreeNode<T>[] }>(this.url(), {\n\t\t\t\tparams: params ?? {},\n\t\t\t})\n\t\t\t.pipe(\n\t\t\t\tmap((data) => {\n\t\t\t\t\treturn data.children ?? [];\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\ttrim(options: TreeNode<T>[], clue: string): TreeNode<T>[] {\n\t\treturn options\n\t\t\t.map((option) => {\n\t\t\t\tif (option.node.name.toLowerCase().includes(clue.toLowerCase())) {\n\t\t\t\t\treturn { ...option };\n\t\t\t\t}\n\t\t\t\tconst trimmedChildren = option.children ? this.trim(option.children, clue) : [];\n\t\t\t\tif (trimmedChildren.length) {\n\t\t\t\t\treturn { ...option, children: trimmedChildren };\n\t\t\t\t}\n\t\t\t\treturn undefined;\n\t\t\t})\n\t\t\t.filter(isNotNil);\n\t}\n\n\tprotected override readonly params$: Observable<Record<string, string | number | boolean>> = toObservable(\n\t\tcomputed(() => {\n\t\t\tconst operationIds = this.operationIds();\n\t\t\tconst uniqueOperationIds = this.uniqueOperationIds();\n\t\t\tconst appInstanceId = this.appInstanceId();\n\t\t\treturn {\n\t\t\t\t...this.filters(),\n\t\t\t\t...(operationIds ? { operations: operationIds.join(',') } : {}),\n\t\t\t\t...(uniqueOperationIds ? { uniqueOperations: uniqueOperationIds.join(',') } : {}),\n\t\t\t\t...(appInstanceId ? { appInstanceId } : {}),\n\t\t\t};\n\t\t}),\n\t);\n\n\tpublic readonly totalCount$ = this.select.options$.pipe(\n\t\tfilter((opts) => opts.length > 0),\n\t\tmap((opts) => {\n\t\t\treturn opts.map((branch) => this.flattenTree(branch)).flat().length;\n\t\t}),\n\t);\n\n\tprotected flattenTree(branch: TreeNode<T>): T[] {\n\t\tconst result: T[] = [branch.node];\n\t\tconst children = branch.children ?? [];\n\t\tif (children.length > 0) {\n\t\t\tresult.push(...children.map((child) => this.flattenTree(child)).flat());\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected override optionKey = (option: TreeNode<T> | T) => {\n\t\tif (!option) {\n\t\t\treturn null;\n\t\t}\n\t\treturn 'node' in option ? option.node.id : option.id;\n\t};\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.NoopTreeSelectDirective"],"mappings":";;;;;;;;;;AAOA;MACa,uBAAuB,CAAA;AACnC,IAAA,OAAO;AAMP,IAAA,WAAA,GAAA;AANA,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAgC,uBAAuB,CAAC;AAE/D,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAoB,MAAM,IAAI,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,KAAK,EAAE,gBAAgB,EAAA,CAAG;QAEnF,IAAA,CAAA,UAAU,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,eAAe,EAAE,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,YAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAC;AAG/D,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,GAAG,IAAI;IAClC;AAEA,IAAA,aAAa,CAAC,KAAU,EAAA;AACvB,QAAA,OAAO,KAAK;IACb;+GAbY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAvB,uBA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IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,aAAA,EAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,UAAA,EAAA,eAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,eAAA,EAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EARjC;AACV,YAAA;AACC,gBAAA,OAAO,EAAE,oCAAoC;AAC7C,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,gCAAgC,CAAC;AAC/D,aAAA;AACD,SAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAA,uBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAGW,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAb5C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;;AAGV,oBAAA,QAAQ,EAAE,4DAA4D;AACtE,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,SAAS,EAAE;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,oCAAoC;AAC7C,4BAAA,WAAW,EAAE,UAAU,CAAC,sCAAsC,CAAC;AAC/D,yBAAA;AACD,qBAAA;oBACD,cAAc,EAAE,CAAC,uBAAuB,CAAC;AACzC,iBAAA;;;ACvBD;;AAEG;;;;"}
1
+ {"version":3,"file":"lucca-front-ng-core-select-department.mjs","sources":["../../../packages/ng/core-select/department/noop-tree-select.directive.ts","../../../packages/ng/core-select/department/departments.directive.ts","../../../packages/ng/core-select/department/lucca-front-ng-core-select-department.ts"],"sourcesContent":["import { Directive, inject, input, linkedSignal } from '@angular/core';\nimport { ALuSelectInputComponent, TreeGenerator, TreeGroupingFn, TreeNode } from '@lucca-front/ng/core-select';\n\n@Directive({\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[noopTreeSelect],lu-multi-select[noopTreeSelect]',\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class NoopTreeSelectDirective<T extends TreeNode<any>, V> implements TreeGenerator<T, T> {\n\t#select = inject<ALuSelectInputComponent<T, V>>(ALuSelectInputComponent);\n\n\treadonly groupingFnInput = input<TreeGroupingFn<T>>(() => null, { alias: 'noopTreeSelect' });\n\n\treadonly groupingFn = linkedSignal(() => this.groupingFnInput());\n\n\tconstructor() {\n\t\tthis.#select.treeGenerator = this;\n\t}\n\n\tgenerateTrees(items: T[]): T[] {\n\t\treturn items;\n\t}\n}\n","import { HttpClient } from '@angular/common/http';\nimport { computed, Directive, forwardRef, inject, input, OnInit } from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { isNotNil } from '@lucca-front/ng/core';\nimport { CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectApiTotalCountProvider, TreeNode } from '@lucca-front/ng/core-select';\nimport { ALuCoreSelectApiDirective } from '@lucca-front/ng/core-select/api';\nimport { ILuDepartment } from '@lucca-front/ng/department';\nimport { combineLatest, map, Observable, of } from 'rxjs';\nimport { debounceTime, switchMap } from 'rxjs/operators';\nimport { NoopTreeSelectDirective } from './noop-tree-select.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\" / \"lu-multi-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[departments],lu-multi-select[departments]',\n\texportAs: 'luDepartments',\n\tproviders: [\n\t\t{\n\t\t\tprovide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,\n\t\t\tuseExisting: forwardRef(() => LuCoreSelectDepartmentsDirective),\n\t\t},\n\t],\n\thostDirectives: [NoopTreeSelectDirective],\n})\nexport class LuCoreSelectDepartmentsDirective<T extends ILuDepartment = ILuDepartment> extends ALuCoreSelectApiDirective<TreeNode<T>> implements OnInit, CoreSelectApiTotalCountProvider {\n\tprotected httpClient = inject(HttpClient);\n\n\treadonly url = input<string>('/organization/structure/api/departments/tree');\n\treadonly countUrl = input<string>('/organization/structure/api/departments');\n\treadonly filters = input<Record<string, string | number | boolean> | null>(null);\n\treadonly operationIds = input<readonly number[] | null>(null);\n\treadonly uniqueOperationIds = input<readonly number[] | null>(null);\n\treadonly appInstanceId = input<number | null>(null);\n\treadonly searchDelimiter = input<string>(' ');\n\n\tpublic override ngOnInit(): void {\n\t\tsuper.ngOnInit();\n\t}\n\n\tprotected override buildOptions(): Observable<TreeNode<T>[]> {\n\t\treturn combineLatest([super.buildOptions(), this.clue$]).pipe(\n\t\t\tmap(([data, clue]) => {\n\t\t\t\treturn this.trim(data, clue);\n\t\t\t}),\n\t\t);\n\t}\n\n\tprotected override getOptionsPage(params: Record<string, string | number | boolean> | null, page: number): Observable<{ items: TreeNode<T>[]; isLastPage: boolean }> {\n\t\tif (page > 0) {\n\t\t\treturn of({ items: [], isLastPage: true });\n\t\t}\n\n\t\treturn super.getOptionsPage(params, page).pipe(map((result) => ({ ...result, isLastPage: true })));\n\t}\n\n\tprotected override getOptions(params: Record<string, string | number | boolean> | null): Observable<TreeNode<T>[]> {\n\t\treturn this.httpClient\n\t\t\t.get<{ children?: TreeNode<T>[] }>(this.url(), {\n\t\t\t\tparams: params ?? {},\n\t\t\t})\n\t\t\t.pipe(\n\t\t\t\tmap((data) => {\n\t\t\t\t\treturn data.children ?? [];\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\ttrim(options: readonly TreeNode<T>[], clue: string): TreeNode<T>[] {\n\t\treturn options\n\t\t\t.map((option) => {\n\t\t\t\tif (option.node.name.toLowerCase().includes(clue.toLowerCase())) {\n\t\t\t\t\treturn { ...option };\n\t\t\t\t}\n\t\t\t\tconst trimmedChildren = option.children ? this.trim(option.children, clue) : [];\n\t\t\t\tif (trimmedChildren.length) {\n\t\t\t\t\treturn { ...option, children: trimmedChildren };\n\t\t\t\t}\n\t\t\t\treturn undefined;\n\t\t\t})\n\t\t\t.filter(isNotNil);\n\t}\n\n\tprotected override readonly params$: Observable<Record<string, string | number | boolean>> = toObservable(\n\t\tcomputed(() => {\n\t\t\tconst operationIds = this.operationIds();\n\t\t\tconst uniqueOperationIds = this.uniqueOperationIds();\n\t\t\tconst appInstanceId = this.appInstanceId();\n\t\t\treturn {\n\t\t\t\t...this.filters(),\n\t\t\t\t...(operationIds ? { operations: operationIds.join(',') } : {}),\n\t\t\t\t...(uniqueOperationIds ? { uniqueOperations: uniqueOperationIds.join(',') } : {}),\n\t\t\t\t...(appInstanceId ? { appInstanceId } : {}),\n\t\t\t};\n\t\t}),\n\t);\n\n\tpublic readonly totalCount$ = toObservable(computed(() => ({ url: this.countUrl(), filters: this.filters() }))).pipe(\n\t\tdebounceTime(250),\n\t\tswitchMap(({ url, filters }) =>\n\t\t\tthis.httpClient.get<{ count: number }>(url, {\n\t\t\t\tparams: {\n\t\t\t\t\t...filters,\n\t\t\t\t\tlimit: 0,\n\t\t\t\t\t['fields.root']: 'count',\n\t\t\t\t},\n\t\t\t}),\n\t\t),\n\t\tmap((res) => res?.count ?? 0),\n\t);\n\n\tprotected flattenTree(branch: TreeNode<T>): T[] {\n\t\tconst result: T[] = [branch.node];\n\t\tconst children = branch.children ?? [];\n\t\tif (children.length > 0) {\n\t\t\tresult.push(...children.map((child) => this.flattenTree(child)).flat());\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected override optionKey = (option: TreeNode<T> | T) => {\n\t\tif (!option) {\n\t\t\treturn null;\n\t\t}\n\t\treturn 'node' in option ? option.node.id : option.id;\n\t};\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.NoopTreeSelectDirective"],"mappings":";;;;;;;;;;AAOA;MACa,uBAAuB,CAAA;AACnC,IAAA,OAAO;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AAA,EAAA,iBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EARjC;AACV,YAAA;AACC,gBAAA,OAAO,EAAE,oCAAoC;AAC7C,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,gCAAgC,CAAC;AAC/D,aAAA;AACD,SAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAA,uBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAGW,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAb5C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;;AAGV,oBAAA,QAAQ,EAAE,4DAA4D;AACtE,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,SAAS,EAAE;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,oCAAoC;AAC7C,4BAAA,WAAW,EAAE,UAAU,CAAC,sCAAsC,CAAC;AAC/D,yBAAA;AACD,qBAAA;oBACD,cAAc,EAAE,CAAC,uBAAuB,CAAC;AACzC,iBAAA;;;ACvBD;;AAEG;;;;"}
@@ -17,10 +17,10 @@ class EstablishmentGroupingService {
17
17
  this.legalUnitsCount$ = this.http.get(this.legalUnitsUrl, { params: this.countParams }).pipe(map((res) => res.count));
18
18
  this.useGrouping$ = combineLatest([this.legalUnitsCount$, this.establishmentsCount$]).pipe(map(([luCount, establishmentCount]) => luCount > 1 && establishmentCount > 1 && luCount !== establishmentCount), shareReplay());
19
19
  }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: EstablishmentGroupingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
21
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: EstablishmentGroupingService, providedIn: 'root' }); }
20
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: EstablishmentGroupingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
21
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: EstablishmentGroupingService, providedIn: 'root' }); }
22
22
  }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: EstablishmentGroupingService, decorators: [{
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: EstablishmentGroupingService, decorators: [{
24
24
  type: Injectable,
25
25
  args: [{ providedIn: 'root' }]
26
26
  }] });
@@ -29,10 +29,10 @@ class LuEstablishmentGroupingComponent {
29
29
  constructor() {
30
30
  this.group = inject(PORTAL_CONTEXT).$implicit;
31
31
  }
32
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: LuEstablishmentGroupingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
33
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.14", type: LuEstablishmentGroupingComponent, isStandalone: true, selector: "lu-establishment-grouping", ngImport: i0, template: `{{ group.options[0].legalUnit.name }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
32
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuEstablishmentGroupingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
33
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.7", type: LuEstablishmentGroupingComponent, isStandalone: true, selector: "lu-establishment-grouping", ngImport: i0, template: `{{ group.options[0].legalUnit.name }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
34
34
  }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: LuEstablishmentGroupingComponent, decorators: [{
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuEstablishmentGroupingComponent, decorators: [{
36
36
  type: Component,
37
37
  args: [{
38
38
  selector: 'lu-establishment-grouping',
@@ -47,12 +47,18 @@ class LuCoreSelectEstablishmentsDirective extends ALuCoreSelectApiDirective {
47
47
  this.#groupingService = inject(EstablishmentGroupingService);
48
48
  this.#destroyRef = inject(DestroyRef);
49
49
  this.httpClient = inject(HttpClient);
50
- this.url = input('/organization/structure/api/establishments', ...(ngDevMode ? [{ debugName: "url" }] : /* istanbul ignore next */ []));
51
- this.filters = input(null, ...(ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []));
52
- this.operationIds = input(null, ...(ngDevMode ? [{ debugName: "operationIds" }] : /* istanbul ignore next */ []));
53
- this.uniqueOperationIds = input(null, ...(ngDevMode ? [{ debugName: "uniqueOperationIds" }] : /* istanbul ignore next */ []));
54
- this.appInstanceId = input(null, ...(ngDevMode ? [{ debugName: "appInstanceId" }] : /* istanbul ignore next */ []));
55
- this.searchDelimiter = input(' ', ...(ngDevMode ? [{ debugName: "searchDelimiter" }] : /* istanbul ignore next */ []));
50
+ this.url = input('/organization/structure/api/establishments', /* @ts-ignore */
51
+ ...(ngDevMode ? [{ debugName: "url" }] : /* istanbul ignore next */ []));
52
+ this.filters = input(null, /* @ts-ignore */
53
+ ...(ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []));
54
+ this.operationIds = input(null, /* @ts-ignore */
55
+ ...(ngDevMode ? [{ debugName: "operationIds" }] : /* istanbul ignore next */ []));
56
+ this.uniqueOperationIds = input(null, /* @ts-ignore */
57
+ ...(ngDevMode ? [{ debugName: "uniqueOperationIds" }] : /* istanbul ignore next */ []));
58
+ this.appInstanceId = input(null, /* @ts-ignore */
59
+ ...(ngDevMode ? [{ debugName: "appInstanceId" }] : /* istanbul ignore next */ []));
60
+ this.searchDelimiter = input(' ', /* @ts-ignore */
61
+ ...(ngDevMode ? [{ debugName: "searchDelimiter" }] : /* istanbul ignore next */ []));
56
62
  this.clue = toSignal(this.clue$);
57
63
  this.params$ = toObservable(computed(() => {
58
64
  const operationIds = this.operationIds();
@@ -106,15 +112,15 @@ class LuCoreSelectEstablishmentsDirective extends ALuCoreSelectApiDirective {
106
112
  .pipe(map((res) => (Array.isArray(res) ? res : res?.items) ?? []));
107
113
  return this.#groupingService.useGrouping$.pipe(switchMap(() => options$));
108
114
  }
109
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: LuCoreSelectEstablishmentsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
110
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: LuCoreSelectEstablishmentsDirective, isStandalone: true, selector: "lu-simple-select[establishments],lu-multi-select[establishments]", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, operationIds: { classPropertyName: "operationIds", publicName: "operationIds", isSignal: true, isRequired: false, transformFunction: null }, uniqueOperationIds: { classPropertyName: "uniqueOperationIds", publicName: "uniqueOperationIds", isSignal: true, isRequired: false, transformFunction: null }, appInstanceId: { classPropertyName: "appInstanceId", publicName: "appInstanceId", isSignal: true, isRequired: false, transformFunction: null }, searchDelimiter: { classPropertyName: "searchDelimiter", publicName: "searchDelimiter", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
115
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectEstablishmentsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
116
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: LuCoreSelectEstablishmentsDirective, isStandalone: true, selector: "lu-simple-select[establishments],lu-multi-select[establishments]", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, operationIds: { classPropertyName: "operationIds", publicName: "operationIds", isSignal: true, isRequired: false, transformFunction: null }, uniqueOperationIds: { classPropertyName: "uniqueOperationIds", publicName: "uniqueOperationIds", isSignal: true, isRequired: false, transformFunction: null }, appInstanceId: { classPropertyName: "appInstanceId", publicName: "appInstanceId", isSignal: true, isRequired: false, transformFunction: null }, searchDelimiter: { classPropertyName: "searchDelimiter", publicName: "searchDelimiter", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
111
117
  {
112
118
  provide: CORE_SELECT_API_TOTAL_COUNT_PROVIDER,
113
119
  useExisting: forwardRef(() => LuCoreSelectEstablishmentsDirective),
114
120
  },
115
121
  ], exportAs: ["luEstablishments"], usesInheritance: true, ngImport: i0 }); }
116
122
  }
117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: LuCoreSelectEstablishmentsDirective, decorators: [{
123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuCoreSelectEstablishmentsDirective, decorators: [{
118
124
  type: Directive,
119
125
  args: [{
120
126
  // The attribute is already prefixed with "lu-simple-select" / "lu-multi-select"