@ngbase/adk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (355) hide show
  1. package/README.md +57 -0
  2. package/a11y/accessibility-group.d.ts +49 -0
  3. package/a11y/accessibility-item.d.ts +49 -0
  4. package/a11y/accessibility.service.d.ts +17 -0
  5. package/a11y/autofocus.d.ts +12 -0
  6. package/a11y/focus-trap.d.ts +15 -0
  7. package/a11y/index.d.ts +5 -0
  8. package/a11y/public-api.d.ts +4 -0
  9. package/accordion/accordion-content.d.ts +8 -0
  10. package/accordion/accordion-group.d.ts +10 -0
  11. package/accordion/accordion-header.d.ts +7 -0
  12. package/accordion/accordion-item.d.ts +10 -0
  13. package/accordion/index.d.ts +5 -0
  14. package/accordion/public-api.d.ts +4 -0
  15. package/autocomplete/autocomplete-input.d.ts +21 -0
  16. package/autocomplete/autocomplete.d.ts +25 -0
  17. package/autocomplete/index.d.ts +5 -0
  18. package/autocomplete/public-api.d.ts +2 -0
  19. package/avatar/avatar.d.ts +22 -0
  20. package/avatar/index.d.ts +5 -0
  21. package/avatar/public-api.d.ts +1 -0
  22. package/bidi/direction.service.d.ts +14 -0
  23. package/bidi/index.d.ts +5 -0
  24. package/bidi/public-api.d.ts +1 -0
  25. package/breadcrumb/breadcrumb-link.d.ts +7 -0
  26. package/breadcrumb/breadcrumb-separator.d.ts +10 -0
  27. package/breadcrumb/breadcrumb.d.ts +12 -0
  28. package/breadcrumb/breadcrumbs.d.ts +7 -0
  29. package/breadcrumb/index.d.ts +5 -0
  30. package/breadcrumb/public-api.d.ts +4 -0
  31. package/cache/cache-config.d.ts +22 -0
  32. package/cache/cache.d.ts +17 -0
  33. package/cache/cache.interecptor.d.ts +2 -0
  34. package/cache/index.d.ts +5 -0
  35. package/cache/public-api.d.ts +3 -0
  36. package/carousel/carousel-item.d.ts +7 -0
  37. package/carousel/carousel-next.d.ts +8 -0
  38. package/carousel/carousel.d.ts +61 -0
  39. package/carousel/index.d.ts +5 -0
  40. package/carousel/public-api.d.ts +3 -0
  41. package/checkbox/checkbox.d.ts +22 -0
  42. package/checkbox/index.d.ts +5 -0
  43. package/checkbox/public-api.d.ts +1 -0
  44. package/chip/chip-group.d.ts +7 -0
  45. package/chip/chip.d.ts +19 -0
  46. package/chip/index.d.ts +5 -0
  47. package/chip/public-api.d.ts +2 -0
  48. package/clipboard/clipboard.d.ts +7 -0
  49. package/clipboard/index.d.ts +5 -0
  50. package/clipboard/public-api.d.ts +1 -0
  51. package/collections/SelectionModel.d.ts +14 -0
  52. package/collections/index.d.ts +5 -0
  53. package/collections/public-api.d.ts +1 -0
  54. package/color-picker/color-input.d.ts +16 -0
  55. package/color-picker/color-picker-trigger.d.ts +30 -0
  56. package/color-picker/color-picker.d.ts +72 -0
  57. package/color-picker/index.d.ts +5 -0
  58. package/color-picker/public-api.d.ts +3 -0
  59. package/color-picker/utils.d.ts +21 -0
  60. package/cookies/cookie.service.d.ts +32 -0
  61. package/cookies/index.d.ts +5 -0
  62. package/cookies/public-api.d.ts +1 -0
  63. package/datepicker/calendar.d.ts +121 -0
  64. package/datepicker/datepicker-trigger.d.ts +49 -0
  65. package/datepicker/datepicker.d.ts +54 -0
  66. package/datepicker/index.d.ts +5 -0
  67. package/datepicker/native-date-adapter.d.ts +33 -0
  68. package/datepicker/public-api.d.ts +5 -0
  69. package/datepicker/time.d.ts +42 -0
  70. package/dialog/dialog.animation.d.ts +3 -0
  71. package/dialog/dialog.d.ts +49 -0
  72. package/dialog/dialog.service.d.ts +7 -0
  73. package/dialog/index.d.ts +5 -0
  74. package/dialog/public-api.d.ts +3 -0
  75. package/drag/drag-drop.d.ts +37 -0
  76. package/drag/drag-move.d.ts +17 -0
  77. package/drag/drag.d.ts +53 -0
  78. package/drag/index.d.ts +5 -0
  79. package/drag/public-api.d.ts +3 -0
  80. package/fesm2022/ngbase-adk-a11y.mjs +617 -0
  81. package/fesm2022/ngbase-adk-a11y.mjs.map +1 -0
  82. package/fesm2022/ngbase-adk-accordion.mjs +117 -0
  83. package/fesm2022/ngbase-adk-accordion.mjs.map +1 -0
  84. package/fesm2022/ngbase-adk-autocomplete.mjs +150 -0
  85. package/fesm2022/ngbase-adk-autocomplete.mjs.map +1 -0
  86. package/fesm2022/ngbase-adk-avatar.mjs +69 -0
  87. package/fesm2022/ngbase-adk-avatar.mjs.map +1 -0
  88. package/fesm2022/ngbase-adk-bidi.mjs +42 -0
  89. package/fesm2022/ngbase-adk-bidi.mjs.map +1 -0
  90. package/fesm2022/ngbase-adk-breadcrumb.mjs +103 -0
  91. package/fesm2022/ngbase-adk-breadcrumb.mjs.map +1 -0
  92. package/fesm2022/ngbase-adk-cache.mjs +127 -0
  93. package/fesm2022/ngbase-adk-cache.mjs.map +1 -0
  94. package/fesm2022/ngbase-adk-carousel.mjs +337 -0
  95. package/fesm2022/ngbase-adk-carousel.mjs.map +1 -0
  96. package/fesm2022/ngbase-adk-checkbox.mjs +78 -0
  97. package/fesm2022/ngbase-adk-checkbox.mjs.map +1 -0
  98. package/fesm2022/ngbase-adk-chip.mjs +60 -0
  99. package/fesm2022/ngbase-adk-chip.mjs.map +1 -0
  100. package/fesm2022/ngbase-adk-clipboard.mjs +41 -0
  101. package/fesm2022/ngbase-adk-clipboard.mjs.map +1 -0
  102. package/fesm2022/ngbase-adk-collections.mjs +39 -0
  103. package/fesm2022/ngbase-adk-collections.mjs.map +1 -0
  104. package/fesm2022/ngbase-adk-color-picker.mjs +580 -0
  105. package/fesm2022/ngbase-adk-color-picker.mjs.map +1 -0
  106. package/fesm2022/ngbase-adk-cookies.mjs +81 -0
  107. package/fesm2022/ngbase-adk-cookies.mjs.map +1 -0
  108. package/fesm2022/ngbase-adk-datepicker.mjs +1130 -0
  109. package/fesm2022/ngbase-adk-datepicker.mjs.map +1 -0
  110. package/fesm2022/ngbase-adk-dialog.mjs +223 -0
  111. package/fesm2022/ngbase-adk-dialog.mjs.map +1 -0
  112. package/fesm2022/ngbase-adk-drag.mjs +406 -0
  113. package/fesm2022/ngbase-adk-drag.mjs.map +1 -0
  114. package/fesm2022/ngbase-adk-form-field.mjs +364 -0
  115. package/fesm2022/ngbase-adk-form-field.mjs.map +1 -0
  116. package/fesm2022/ngbase-adk-hover-card.mjs +79 -0
  117. package/fesm2022/ngbase-adk-hover-card.mjs.map +1 -0
  118. package/fesm2022/ngbase-adk-icon.mjs +90 -0
  119. package/fesm2022/ngbase-adk-icon.mjs.map +1 -0
  120. package/fesm2022/ngbase-adk-inline-edit.mjs +127 -0
  121. package/fesm2022/ngbase-adk-inline-edit.mjs.map +1 -0
  122. package/fesm2022/ngbase-adk-jwt.mjs +90 -0
  123. package/fesm2022/ngbase-adk-jwt.mjs.map +1 -0
  124. package/fesm2022/ngbase-adk-keys.mjs +219 -0
  125. package/fesm2022/ngbase-adk-keys.mjs.map +1 -0
  126. package/fesm2022/ngbase-adk-layout.mjs +100 -0
  127. package/fesm2022/ngbase-adk-layout.mjs.map +1 -0
  128. package/fesm2022/ngbase-adk-list.mjs +110 -0
  129. package/fesm2022/ngbase-adk-list.mjs.map +1 -0
  130. package/fesm2022/ngbase-adk-mask.mjs +234 -0
  131. package/fesm2022/ngbase-adk-mask.mjs.map +1 -0
  132. package/fesm2022/ngbase-adk-menu.mjs +546 -0
  133. package/fesm2022/ngbase-adk-menu.mjs.map +1 -0
  134. package/fesm2022/ngbase-adk-network.mjs +90 -0
  135. package/fesm2022/ngbase-adk-network.mjs.map +1 -0
  136. package/fesm2022/ngbase-adk-pagination.mjs +187 -0
  137. package/fesm2022/ngbase-adk-pagination.mjs.map +1 -0
  138. package/fesm2022/ngbase-adk-popover.mjs +953 -0
  139. package/fesm2022/ngbase-adk-popover.mjs.map +1 -0
  140. package/fesm2022/ngbase-adk-portal.mjs +279 -0
  141. package/fesm2022/ngbase-adk-portal.mjs.map +1 -0
  142. package/fesm2022/ngbase-adk-progress.mjs +57 -0
  143. package/fesm2022/ngbase-adk-progress.mjs.map +1 -0
  144. package/fesm2022/ngbase-adk-radio.mjs +129 -0
  145. package/fesm2022/ngbase-adk-radio.mjs.map +1 -0
  146. package/fesm2022/ngbase-adk-resizable.mjs +367 -0
  147. package/fesm2022/ngbase-adk-resizable.mjs.map +1 -0
  148. package/fesm2022/ngbase-adk-scroll-area.mjs +232 -0
  149. package/fesm2022/ngbase-adk-scroll-area.mjs.map +1 -0
  150. package/fesm2022/ngbase-adk-select.mjs +599 -0
  151. package/fesm2022/ngbase-adk-select.mjs.map +1 -0
  152. package/fesm2022/ngbase-adk-selectable.mjs +79 -0
  153. package/fesm2022/ngbase-adk-selectable.mjs.map +1 -0
  154. package/fesm2022/ngbase-adk-sidenav.mjs +209 -0
  155. package/fesm2022/ngbase-adk-sidenav.mjs.map +1 -0
  156. package/fesm2022/ngbase-adk-slider.mjs +337 -0
  157. package/fesm2022/ngbase-adk-slider.mjs.map +1 -0
  158. package/fesm2022/ngbase-adk-sonner.mjs +176 -0
  159. package/fesm2022/ngbase-adk-sonner.mjs.map +1 -0
  160. package/fesm2022/ngbase-adk-stepper.mjs +211 -0
  161. package/fesm2022/ngbase-adk-stepper.mjs.map +1 -0
  162. package/fesm2022/ngbase-adk-switch.mjs +115 -0
  163. package/fesm2022/ngbase-adk-switch.mjs.map +1 -0
  164. package/fesm2022/ngbase-adk-table.mjs +348 -0
  165. package/fesm2022/ngbase-adk-table.mjs.map +1 -0
  166. package/fesm2022/ngbase-adk-tabs.mjs +386 -0
  167. package/fesm2022/ngbase-adk-tabs.mjs.map +1 -0
  168. package/fesm2022/ngbase-adk-test.mjs +267 -0
  169. package/fesm2022/ngbase-adk-test.mjs.map +1 -0
  170. package/fesm2022/ngbase-adk-toggle-group.mjs +114 -0
  171. package/fesm2022/ngbase-adk-toggle-group.mjs.map +1 -0
  172. package/fesm2022/ngbase-adk-toggle.mjs +48 -0
  173. package/fesm2022/ngbase-adk-toggle.mjs.map +1 -0
  174. package/fesm2022/ngbase-adk-tooltip.mjs +237 -0
  175. package/fesm2022/ngbase-adk-tooltip.mjs.map +1 -0
  176. package/fesm2022/ngbase-adk-tour.mjs +312 -0
  177. package/fesm2022/ngbase-adk-tour.mjs.map +1 -0
  178. package/fesm2022/ngbase-adk-translate.mjs +162 -0
  179. package/fesm2022/ngbase-adk-translate.mjs.map +1 -0
  180. package/fesm2022/ngbase-adk-tree.mjs +301 -0
  181. package/fesm2022/ngbase-adk-tree.mjs.map +1 -0
  182. package/fesm2022/ngbase-adk-utils.mjs +228 -0
  183. package/fesm2022/ngbase-adk-utils.mjs.map +1 -0
  184. package/fesm2022/ngbase-adk-virtualizer.mjs +198 -0
  185. package/fesm2022/ngbase-adk-virtualizer.mjs.map +1 -0
  186. package/fesm2022/ngbase-adk.mjs +6 -0
  187. package/fesm2022/ngbase-adk.mjs.map +1 -0
  188. package/form-field/auto-height.d.ts +9 -0
  189. package/form-field/error.d.ts +18 -0
  190. package/form-field/form-field.d.ts +14 -0
  191. package/form-field/index.d.ts +5 -0
  192. package/form-field/input.d.ts +16 -0
  193. package/form-field/label.d.ts +7 -0
  194. package/form-field/otp.d.ts +48 -0
  195. package/form-field/public-api.d.ts +6 -0
  196. package/hover-card/hover-card.d.ts +18 -0
  197. package/hover-card/index.d.ts +5 -0
  198. package/hover-card/public-api.d.ts +1 -0
  199. package/icon/icon.d.ts +12 -0
  200. package/icon/icon.service.d.ts +12 -0
  201. package/icon/index.d.ts +5 -0
  202. package/icon/public-api.d.ts +2 -0
  203. package/index.d.ts +5 -0
  204. package/inline-edit/index.d.ts +5 -0
  205. package/inline-edit/inline-edit.d.ts +47 -0
  206. package/inline-edit/public-api.d.ts +1 -0
  207. package/jwt/index.d.ts +5 -0
  208. package/jwt/jwt.service.d.ts +27 -0
  209. package/jwt/public-api.d.ts +1 -0
  210. package/keys/index.d.ts +5 -0
  211. package/keys/keys.service.d.ts +13 -0
  212. package/keys/public-api.d.ts +2 -0
  213. package/keys/shortcuts.service.d.ts +38 -0
  214. package/layout/index.d.ts +5 -0
  215. package/layout/layout.d.ts +16 -0
  216. package/layout/public-api.d.ts +1 -0
  217. package/list/index.d.ts +5 -0
  218. package/list/list.d.ts +20 -0
  219. package/list/list.directive.d.ts +12 -0
  220. package/list/public-api.d.ts +2 -0
  221. package/mask/index.d.ts +5 -0
  222. package/mask/mask-pipe.d.ts +7 -0
  223. package/mask/mask.d.ts +25 -0
  224. package/mask/public-api.d.ts +2 -0
  225. package/menu/context-menu.d.ts +21 -0
  226. package/menu/index.d.ts +5 -0
  227. package/menu/mention.d.ts +18 -0
  228. package/menu/menu-trigger.d.ts +34 -0
  229. package/menu/menu.d.ts +52 -0
  230. package/menu/navigation-menu.d.ts +19 -0
  231. package/menu/public-api.d.ts +5 -0
  232. package/network/index.d.ts +5 -0
  233. package/network/network.interceptor.d.ts +6 -0
  234. package/network/network.service.d.ts +18 -0
  235. package/network/public-api.d.ts +2 -0
  236. package/package.json +247 -0
  237. package/pagination/index.d.ts +5 -0
  238. package/pagination/pagination.d.ts +28 -0
  239. package/pagination/public-api.d.ts +1 -0
  240. package/popover/base-popover.service.d.ts +16 -0
  241. package/popover/index.d.ts +5 -0
  242. package/popover/popover-trigger.d.ts +21 -0
  243. package/popover/popover.d.ts +50 -0
  244. package/popover/popover.service.d.ts +42 -0
  245. package/popover/public-api.d.ts +5 -0
  246. package/popover/utils.d.ts +85 -0
  247. package/portal/dialog-ref.d.ts +71 -0
  248. package/portal/index.d.ts +5 -0
  249. package/portal/portal-base.service.d.ts +19 -0
  250. package/portal/portal-close.directive.d.ts +8 -0
  251. package/portal/portal.component.d.ts +7 -0
  252. package/portal/portal.service.d.ts +16 -0
  253. package/portal/public-api.d.ts +5 -0
  254. package/progress/index.d.ts +5 -0
  255. package/progress/progress.d.ts +13 -0
  256. package/progress/public-api.d.ts +1 -0
  257. package/public-api.d.ts +2 -0
  258. package/radio/index.d.ts +5 -0
  259. package/radio/public-api.d.ts +2 -0
  260. package/radio/radio-group.d.ts +19 -0
  261. package/radio/radio.d.ts +22 -0
  262. package/resizable/index.d.ts +5 -0
  263. package/resizable/public-api.d.ts +2 -0
  264. package/resizable/resizable-group.d.ts +22 -0
  265. package/resizable/resizable.d.ts +50 -0
  266. package/scroll-area/index.d.ts +5 -0
  267. package/scroll-area/public-api.d.ts +1 -0
  268. package/scroll-area/scroll-area.d.ts +56 -0
  269. package/select/index.d.ts +5 -0
  270. package/select/list-selection.d.ts +7 -0
  271. package/select/option-group.d.ts +7 -0
  272. package/select/option.d.ts +25 -0
  273. package/select/public-api.d.ts +6 -0
  274. package/select/select-base.d.ts +64 -0
  275. package/select/select-input.d.ts +23 -0
  276. package/select/select.d.ts +50 -0
  277. package/selectable/index.d.ts +5 -0
  278. package/selectable/public-api.d.ts +2 -0
  279. package/selectable/selectable-item.d.ts +12 -0
  280. package/selectable/selectable.d.ts +19 -0
  281. package/sidenav/index.d.ts +5 -0
  282. package/sidenav/public-api.d.ts +3 -0
  283. package/sidenav/sidenav-header.d.ts +31 -0
  284. package/sidenav/sidenav.d.ts +23 -0
  285. package/sidenav/sidenav.service.d.ts +18 -0
  286. package/slider/index.d.ts +5 -0
  287. package/slider/public-api.d.ts +1 -0
  288. package/slider/slider.d.ts +73 -0
  289. package/sonner/index.d.ts +5 -0
  290. package/sonner/public-api.d.ts +2 -0
  291. package/sonner/sonner.d.ts +24 -0
  292. package/sonner/sonner.service.d.ts +21 -0
  293. package/stepper/animation.d.ts +1 -0
  294. package/stepper/index.d.ts +5 -0
  295. package/stepper/public-api.d.ts +3 -0
  296. package/stepper/step.d.ts +24 -0
  297. package/stepper/stepper.d.ts +26 -0
  298. package/switch/index.d.ts +5 -0
  299. package/switch/public-api.d.ts +1 -0
  300. package/switch/switch.d.ts +44 -0
  301. package/table/body-cell.d.ts +11 -0
  302. package/table/body-row.d.ts +21 -0
  303. package/table/column.d.ts +10 -0
  304. package/table/head-cell.d.ts +12 -0
  305. package/table/head-row.d.ts +21 -0
  306. package/table/index.d.ts +5 -0
  307. package/table/public-api.d.ts +8 -0
  308. package/table/table.d.ts +32 -0
  309. package/tabs/index.d.ts +5 -0
  310. package/tabs/public-api.d.ts +2 -0
  311. package/tabs/tab-group.d.ts +52 -0
  312. package/tabs/tab.d.ts +31 -0
  313. package/test/index.d.ts +5 -0
  314. package/test/public-api.d.ts +1 -0
  315. package/test/utils.d.ts +62 -0
  316. package/toggle/index.d.ts +5 -0
  317. package/toggle/public-api.d.ts +1 -0
  318. package/toggle/toggle.d.ts +13 -0
  319. package/toggle-group/index.d.ts +5 -0
  320. package/toggle-group/public-api.d.ts +2 -0
  321. package/toggle-group/toggle-group.d.ts +25 -0
  322. package/toggle-group/toggle-item.d.ts +14 -0
  323. package/tooltip/index.d.ts +5 -0
  324. package/tooltip/public-api.d.ts +2 -0
  325. package/tooltip/tooltip.d.ts +20 -0
  326. package/tooltip/tooltip.directive.d.ts +34 -0
  327. package/tooltip/tooltip.service.d.ts +26 -0
  328. package/tour/animation.d.ts +2 -0
  329. package/tour/index.d.ts +5 -0
  330. package/tour/public-api.d.ts +5 -0
  331. package/tour/tour-base.d.ts +21 -0
  332. package/tour/tour-step.d.ts +11 -0
  333. package/tour/tour.d.ts +9 -0
  334. package/tour/tour.service.d.ts +30 -0
  335. package/translate/config.d.ts +16 -0
  336. package/translate/index.d.ts +5 -0
  337. package/translate/public-api.d.ts +3 -0
  338. package/translate/translate.d.ts +11 -0
  339. package/translate/translate.service.d.ts +31 -0
  340. package/tree/index.d.ts +5 -0
  341. package/tree/public-api.d.ts +3 -0
  342. package/tree/tree-node.d.ts +28 -0
  343. package/tree/tree-toggle.d.ts +16 -0
  344. package/tree/tree.d.ts +55 -0
  345. package/utils/animation.d.ts +3 -0
  346. package/utils/disposals.d.ts +7 -0
  347. package/utils/index.d.ts +5 -0
  348. package/utils/number-only.d.ts +22 -0
  349. package/utils/public-api.d.ts +6 -0
  350. package/utils/range.pipe.d.ts +7 -0
  351. package/utils/ssr.d.ts +2 -0
  352. package/utils/utils.d.ts +27 -0
  353. package/virtualizer/index.d.ts +5 -0
  354. package/virtualizer/public-api.d.ts +1 -0
  355. package/virtualizer/virtualizer.d.ts +42 -0
@@ -0,0 +1,337 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, linkedSignal, Directive, ElementRef, computed, viewChild, viewChildren, model, input, numberAttribute, booleanAttribute, effect, untracked, afterNextRender, Component, ChangeDetectionStrategy } from '@angular/core';
3
+ import { Directionality } from '@ngbase/adk/bidi';
4
+ import * as i1 from '@ngbase/adk/drag';
5
+ import { Drag } from '@ngbase/adk/drag';
6
+ import { provideValueAccessor } from '@ngbase/adk/utils';
7
+
8
+ class SliderTrack {
9
+ constructor() {
10
+ this.slider = inject(NgbSlider);
11
+ this.drag = inject(Drag);
12
+ this.drag._disabled = linkedSignal(this.slider.disabled);
13
+ }
14
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SliderTrack, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
15
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0", type: SliderTrack, isStandalone: true, selector: "[ngbSliderTrack]", host: { properties: { "attr.aria-disabled": "slider.disabled()" }, styleAttribute: "overflow: hidden; position: relative;" }, hostDirectives: [{ directive: i1.Drag }], ngImport: i0 }); }
16
+ }
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SliderTrack, decorators: [{
18
+ type: Directive,
19
+ args: [{
20
+ selector: '[ngbSliderTrack]',
21
+ hostDirectives: [Drag],
22
+ host: {
23
+ style: 'overflow: hidden; position: relative;',
24
+ '[attr.aria-disabled]': 'slider.disabled()',
25
+ },
26
+ }]
27
+ }], ctorParameters: () => [] });
28
+ class SliderRange {
29
+ constructor() {
30
+ this.slider = inject(NgbSlider);
31
+ }
32
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SliderRange, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
33
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0", type: SliderRange, isStandalone: true, selector: "[ngbSliderRange]", host: { properties: { "attr.aria-disabled": "slider.disabled()" }, styleAttribute: "position: absolute;" }, ngImport: i0 }); }
34
+ }
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SliderRange, decorators: [{
36
+ type: Directive,
37
+ args: [{
38
+ selector: '[ngbSliderRange]',
39
+ host: {
40
+ '[attr.aria-disabled]': 'slider.disabled()',
41
+ style: 'position: absolute;',
42
+ },
43
+ }]
44
+ }] });
45
+ class SliderThumb {
46
+ constructor() {
47
+ this.slider = inject(NgbSlider);
48
+ this.el = inject(ElementRef);
49
+ this.index = computed(() => {
50
+ return this.slider.thumbs().findIndex(t => t.nativeElement === this.el.nativeElement);
51
+ });
52
+ this.value = computed(() => {
53
+ const values = this.slider.value();
54
+ if (!values)
55
+ return values;
56
+ return this.slider.range() > 1 ? values[this.index()] : values;
57
+ });
58
+ }
59
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SliderThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
60
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0", type: SliderThumb, isStandalone: true, selector: "[ngbSliderThumb]", host: { attributes: { "type": "button", "role": "slider" }, properties: { "attr.tabindex": "slider.disabled() ? -1 : 0", "attr.aria-disabled": "slider.disabled()", "attr.aria-valuemin": "slider.min()", "attr.aria-valuemax": "slider.max()", "attr.aria-valuenow": "value()" }, styleAttribute: "position: absolute; pointer-events: none;" }, ngImport: i0 }); }
61
+ }
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SliderThumb, decorators: [{
63
+ type: Directive,
64
+ args: [{
65
+ selector: '[ngbSliderThumb]',
66
+ host: {
67
+ type: 'button',
68
+ role: 'slider',
69
+ style: 'position: absolute; pointer-events: none;',
70
+ '[attr.tabindex]': 'slider.disabled() ? -1 : 0',
71
+ '[attr.aria-disabled]': 'slider.disabled()',
72
+ '[attr.aria-valuemin]': 'slider.min()',
73
+ '[attr.aria-valuemax]': 'slider.max()',
74
+ '[attr.aria-valuenow]': 'value()',
75
+ },
76
+ }]
77
+ }] });
78
+ class NgbSlider {
79
+ constructor() {
80
+ this.el = inject(ElementRef);
81
+ this.dir = inject(Directionality); // this.dir.isRtl();
82
+ this.drag = viewChild.required(Drag);
83
+ this.track = viewChild.required(SliderRange, {
84
+ read: ElementRef,
85
+ });
86
+ this.thumbs = viewChildren(SliderThumb, {
87
+ read: ElementRef,
88
+ });
89
+ this.value = model();
90
+ this.step = input(1, { transform: numberAttribute });
91
+ this.min = input(0, { transform: numberAttribute });
92
+ this.max = input(100, { transform: numberAttribute });
93
+ this.range = input(1, { transform: numberAttribute });
94
+ this.disabled = input(false, { transform: booleanAttribute });
95
+ this.orientation = input('horizontal');
96
+ this.noOfThumbs = computed(() => Array.from({ length: this.range() }, (_, i) => i));
97
+ this.totalSteps = computed(() => (this.max() - this.min()) / this.step());
98
+ this.values = [];
99
+ this.activeIndex = 0;
100
+ this.totalWidth = 0;
101
+ this.totalSliderWidth = 0;
102
+ effect(() => {
103
+ const value = this.value() || 0;
104
+ // we need to update the value direction when direction changes
105
+ const _ = this.dir.isRtl();
106
+ if (this.thumbs().length) {
107
+ untracked(() => this.handleValueUpdate(value));
108
+ }
109
+ });
110
+ afterNextRender(() => {
111
+ this.drag().events.subscribe(data => this.move(data));
112
+ });
113
+ }
114
+ handleValueUpdate(value) {
115
+ const values = this.values;
116
+ const range = this.range() > 1;
117
+ if ((range && value !== values) || (!range && value !== values[0])) {
118
+ const v = Array.isArray(value) ? value : [value];
119
+ this.values = v.map(v => this.fixStep(v));
120
+ }
121
+ this.updateElement();
122
+ }
123
+ updateElement() {
124
+ const positions = this.values.map(x => this.toPercentage(x));
125
+ const isVertical = this.orientation() === 'vertical';
126
+ const isRtl = !isVertical && this.dir.isRtl();
127
+ const track = this.track().nativeElement;
128
+ // Update thumb positions
129
+ this.thumbs().forEach((thumb, i) => {
130
+ const value = this.values[i];
131
+ let pos = isVertical ? 100 - positions[i] : positions[i];
132
+ // Invert position for RTL
133
+ if (isRtl) {
134
+ pos = 100 - pos;
135
+ }
136
+ const prop = isVertical ? 'top' : 'left';
137
+ const thumbSize = this.getThumbSize(value, thumb.nativeElement.offsetWidth);
138
+ const offset = isVertical || isRtl ? -thumbSize : thumbSize;
139
+ thumb.nativeElement.style[prop] = `calc(${pos}% + ${offset}px)`;
140
+ });
141
+ // Update track position
142
+ const [min, max] = positions.length > 1 ? [Math.min(...positions), Math.max(...positions)] : [0, positions[0]];
143
+ if (isVertical) {
144
+ track.style.top = 100 - max + '%';
145
+ track.style.bottom = min + '%';
146
+ track.style.width = '100%';
147
+ }
148
+ else {
149
+ track.style.left = (isRtl ? 100 - max : min) + '%';
150
+ track.style.right = (isRtl ? min : 100 - max) + '%';
151
+ track.style.height = '100%';
152
+ }
153
+ }
154
+ getThumbSize(value, thumbSize = 0) {
155
+ const currentStep = (value - this.min()) / this.step();
156
+ const halfSteps = this.totalSteps() / 2;
157
+ const halfThumbSize = thumbSize / 2;
158
+ // Return 0 for middle, positive offset for first half, negative for second half
159
+ const offset = currentStep - halfSteps;
160
+ return -(offset / halfSteps) * halfThumbSize;
161
+ }
162
+ writeValue(value) {
163
+ this.value.set(value);
164
+ }
165
+ registerOnChange(fn) {
166
+ this.onChange = fn;
167
+ }
168
+ registerOnTouched(fn) {
169
+ this.onTouched = fn;
170
+ }
171
+ get width() {
172
+ return this.orientation() === 'vertical'
173
+ ? this.el.nativeElement.clientHeight
174
+ : this.el.nativeElement.clientWidth;
175
+ }
176
+ // We need to consider the min value also because the slider can be negative
177
+ toPercentage(value) {
178
+ const min = this.min();
179
+ const max = this.max();
180
+ const range = max - min;
181
+ const percentage = ((value - min) / range) * 100;
182
+ return percentage;
183
+ }
184
+ fromPercentage(percentage) {
185
+ const min = this.min();
186
+ const max = this.max();
187
+ const range = max - min;
188
+ const value = (percentage / 100) * range + min;
189
+ return value;
190
+ }
191
+ move(data) {
192
+ requestAnimationFrame(() => this.moveSlider(data));
193
+ }
194
+ clicked(clientX) {
195
+ const slider = this.el.nativeElement;
196
+ const rect = slider.getBoundingClientRect();
197
+ const isVertical = this.orientation() === 'vertical';
198
+ const isRtl = !isVertical && this.dir.isRtl();
199
+ let position;
200
+ if (isVertical) {
201
+ position = rect.top;
202
+ }
203
+ else {
204
+ position = isRtl ? rect.right : rect.left;
205
+ clientX = isRtl ? -clientX : clientX; // Invert the click position for RTL
206
+ }
207
+ return this.perRound(clientX + (isRtl ? position : -position), this.width, isVertical);
208
+ }
209
+ perRound(x, width, reverse = false) {
210
+ // the new percentage of the slider
211
+ let percentage = (x / width) * 100;
212
+ if (reverse) {
213
+ percentage = 100 - percentage;
214
+ }
215
+ // convert percentage to value
216
+ return this.fromPercentage(percentage);
217
+ }
218
+ fixStep(value = this.min()) {
219
+ // make sure the value is within the min and max
220
+ // we need to make the percentage to be a multiple of the step
221
+ value = parseFloat((Math.round(value / this.step()) * this.step()).toFixed(10));
222
+ return Math.max(this.min(), Math.min(this.max(), value));
223
+ }
224
+ moveSlider(data) {
225
+ data.event?.preventDefault();
226
+ const isVertical = this.orientation() === 'vertical';
227
+ const isRtl = !isVertical && this.dir.isRtl();
228
+ let cx = data.clientX;
229
+ let x = data.x;
230
+ if (isVertical) {
231
+ cx = data.clientY;
232
+ x = -data.y;
233
+ }
234
+ else if (isRtl) {
235
+ x = -x; // Invert the movement for RTL
236
+ }
237
+ // convert value to percentage based on the max value
238
+ if (data.type === 'start') {
239
+ const clickedValue = this.clicked(cx);
240
+ const valuePercentage = this.toPercentage(clickedValue);
241
+ // total width of the slider
242
+ this.totalWidth = this.width;
243
+ // the width of the slider using current percentage
244
+ this.totalSliderWidth = this.totalWidth * (valuePercentage / 100);
245
+ // make sure the values are equal length as the range
246
+ if (this.values.length !== this.range()) {
247
+ this.values = Array.from({ length: this.range() }, (_, i) => this.values[i] || this.min());
248
+ }
249
+ // sort the values
250
+ this.values = this.values.sort((a, b) => a - b);
251
+ // find the nearest value index based on the percentage
252
+ this.activeIndex = this.values.reduce((closestIndex, value, index) => {
253
+ const diff = Math.abs(this.toPercentage(value) - valuePercentage);
254
+ return diff < Math.abs(this.toPercentage(this.values[closestIndex]) - valuePercentage)
255
+ ? index
256
+ : closestIndex;
257
+ }, 0);
258
+ this.updateValue(this.activeIndex, clickedValue);
259
+ if (this.values[this.activeIndex] !== this.value()) {
260
+ this.notifyChange();
261
+ }
262
+ }
263
+ else if (data.type === 'move') {
264
+ // the new percentage of the slider
265
+ const newSize = this.totalSliderWidth + x;
266
+ const percentage = this.perRound(newSize, this.totalWidth);
267
+ // update the value only when the percentage is different and within the range
268
+ const prevValue = this.values[this.activeIndex];
269
+ const currentValue = this.updateValue(this.activeIndex, percentage);
270
+ if (prevValue !== currentValue) {
271
+ this.notifyChange();
272
+ }
273
+ }
274
+ else {
275
+ this.totalWidth = 0;
276
+ this.totalSliderWidth = 0;
277
+ }
278
+ }
279
+ updateValue(index, value) {
280
+ const values = this.values;
281
+ let stepValue = this.fixStep(value);
282
+ // Clamp the value between min and max
283
+ stepValue = Math.max(this.min(), Math.min(this.max(), stepValue));
284
+ values[index] = stepValue;
285
+ this.values = values.sort((a, b) => a - b);
286
+ this.activeIndex = this.values.findIndex(v => v === stepValue);
287
+ return stepValue;
288
+ }
289
+ notifyChange() {
290
+ const percentage = this.range() > 1 ? [...this.values] : this.values[0];
291
+ this.value.set(percentage);
292
+ this.onChange?.(percentage);
293
+ this.onTouched?.();
294
+ }
295
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbSlider, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
296
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", type: NgbSlider, isStandalone: true, selector: "[ngbSlider]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, range: { classPropertyName: "range", publicName: "range", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [provideValueAccessor(NgbSlider)], viewQueries: [{ propertyName: "drag", first: true, predicate: Drag, descendants: true, isSignal: true }, { propertyName: "track", first: true, predicate: SliderRange, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "thumbs", predicate: SliderThumb, descendants: true, read: ElementRef, isSignal: true }], exportAs: ["ngbSlider"], ngImport: i0, template: `
297
+ <div ngbSliderTrack>
298
+ <div ngbSliderRange></div>
299
+ </div>
300
+ @for (thumb of noOfThumbs(); track thumb) {
301
+ <button ngbSliderThumb></button>
302
+ }
303
+ `, isInline: true, dependencies: [{ kind: "directive", type: SliderTrack, selector: "[ngbSliderTrack]" }, { kind: "directive", type: SliderRange, selector: "[ngbSliderRange]" }, { kind: "directive", type: SliderThumb, selector: "[ngbSliderThumb]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
304
+ }
305
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbSlider, decorators: [{
306
+ type: Component,
307
+ args: [{
308
+ selector: '[ngbSlider]',
309
+ exportAs: 'ngbSlider',
310
+ changeDetection: ChangeDetectionStrategy.OnPush,
311
+ providers: [provideValueAccessor(NgbSlider)],
312
+ imports: [SliderTrack, SliderRange, SliderThumb],
313
+ template: `
314
+ <div ngbSliderTrack>
315
+ <div ngbSliderRange></div>
316
+ </div>
317
+ @for (thumb of noOfThumbs(); track thumb) {
318
+ <button ngbSliderThumb></button>
319
+ }
320
+ `,
321
+ }]
322
+ }], ctorParameters: () => [] });
323
+ const provideSlider = (slider) => [
324
+ { provide: NgbSlider, useExisting: slider },
325
+ provideValueAccessor(slider),
326
+ ];
327
+
328
+ /*
329
+ * Public API Surface of slider
330
+ */
331
+
332
+ /**
333
+ * Generated bundle index. Do not edit.
334
+ */
335
+
336
+ export { NgbSlider, SliderRange, SliderThumb, SliderTrack, provideSlider };
337
+ //# sourceMappingURL=ngbase-adk-slider.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngbase-adk-slider.mjs","sources":["../../../projects/adk/slider/slider.ts","../../../projects/adk/slider/public-api.ts","../../../projects/adk/slider/ngbase-adk-slider.ts"],"sourcesContent":["import {\n afterNextRender,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n model,\n numberAttribute,\n Type,\n untracked,\n viewChild,\n viewChildren,\n} from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { Directionality } from '@ngbase/adk/bidi';\nimport { Drag, DragData } from '@ngbase/adk/drag';\nimport { provideValueAccessor } from '@ngbase/adk/utils';\n\n@Directive({\n selector: '[ngbSliderTrack]',\n hostDirectives: [Drag],\n host: {\n style: 'overflow: hidden; position: relative;',\n '[attr.aria-disabled]': 'slider.disabled()',\n },\n})\nexport class SliderTrack {\n readonly slider = inject(NgbSlider);\n private readonly drag = inject(Drag);\n\n constructor() {\n this.drag._disabled = linkedSignal(this.slider.disabled);\n }\n}\n\n@Directive({\n selector: '[ngbSliderRange]',\n host: {\n '[attr.aria-disabled]': 'slider.disabled()',\n style: 'position: absolute;',\n },\n})\nexport class SliderRange {\n readonly slider = inject(NgbSlider);\n}\n\n@Directive({\n selector: '[ngbSliderThumb]',\n host: {\n type: 'button',\n role: 'slider',\n style: 'position: absolute; pointer-events: none;',\n '[attr.tabindex]': 'slider.disabled() ? -1 : 0',\n '[attr.aria-disabled]': 'slider.disabled()',\n '[attr.aria-valuemin]': 'slider.min()',\n '[attr.aria-valuemax]': 'slider.max()',\n '[attr.aria-valuenow]': 'value()',\n },\n})\nexport class SliderThumb {\n readonly slider = inject(NgbSlider);\n readonly el = inject(ElementRef);\n\n readonly index = computed(() => {\n return this.slider.thumbs().findIndex(t => t.nativeElement === this.el.nativeElement);\n });\n readonly value = computed(() => {\n const values = this.slider.value();\n if (!values) return values;\n return this.slider.range() > 1 ? (values as number[])[this.index()] : values;\n });\n}\n\n@Component({\n selector: '[ngbSlider]',\n exportAs: 'ngbSlider',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [provideValueAccessor(NgbSlider)],\n imports: [SliderTrack, SliderRange, SliderThumb],\n template: `\n <div ngbSliderTrack>\n <div ngbSliderRange></div>\n </div>\n @for (thumb of noOfThumbs(); track thumb) {\n <button ngbSliderThumb></button>\n }\n `,\n})\nexport class NgbSlider implements ControlValueAccessor {\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly dir = inject(Directionality); // this.dir.isRtl();\n private readonly drag = viewChild.required(Drag);\n private readonly track = viewChild.required<SliderRange, ElementRef<HTMLElement>>(SliderRange, {\n read: ElementRef,\n });\n readonly thumbs = viewChildren<SliderThumb, ElementRef<HTMLElement>>(SliderThumb, {\n read: ElementRef,\n });\n\n readonly value = model<number | number[]>();\n readonly step = input(1, { transform: numberAttribute });\n readonly min = input(0, { transform: numberAttribute });\n readonly max = input(100, { transform: numberAttribute });\n readonly range = input(1, { transform: numberAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n\n private onChange?: (value: number | number[]) => {};\n private onTouched?: () => {};\n\n readonly noOfThumbs = computed(() => Array.from({ length: this.range() }, (_, i) => i));\n private readonly totalSteps = computed(() => (this.max() - this.min()) / this.step());\n private values: number[] = [];\n private activeIndex = 0;\n private totalWidth = 0;\n private totalSliderWidth = 0;\n\n constructor() {\n effect(() => {\n const value = this.value() || 0;\n // we need to update the value direction when direction changes\n const _ = this.dir.isRtl();\n if (this.thumbs().length) {\n untracked(() => this.handleValueUpdate(value));\n }\n });\n\n afterNextRender(() => {\n this.drag().events.subscribe(data => this.move(data));\n });\n }\n\n private handleValueUpdate(value: number | number[]) {\n const values = this.values;\n const range = this.range() > 1;\n if ((range && value !== values) || (!range && value !== values[0])) {\n const v = Array.isArray(value) ? value : [value];\n this.values = v.map(v => this.fixStep(v));\n }\n\n this.updateElement();\n }\n\n private updateElement() {\n const positions = this.values.map(x => this.toPercentage(x));\n const isVertical = this.orientation() === 'vertical';\n const isRtl = !isVertical && this.dir.isRtl();\n const track = this.track().nativeElement;\n\n // Update thumb positions\n this.thumbs().forEach((thumb, i) => {\n const value = this.values[i];\n let pos = isVertical ? 100 - positions[i] : positions[i];\n // Invert position for RTL\n if (isRtl) {\n pos = 100 - pos;\n }\n const prop = isVertical ? 'top' : 'left';\n const thumbSize = this.getThumbSize(value, thumb.nativeElement.offsetWidth);\n const offset = isVertical || isRtl ? -thumbSize : thumbSize;\n thumb.nativeElement.style[prop] = `calc(${pos}% + ${offset}px)`;\n });\n\n // Update track position\n const [min, max] =\n positions.length > 1 ? [Math.min(...positions), Math.max(...positions)] : [0, positions[0]];\n\n if (isVertical) {\n track.style.top = 100 - max + '%';\n track.style.bottom = min + '%';\n track.style.width = '100%';\n } else {\n track.style.left = (isRtl ? 100 - max : min) + '%';\n track.style.right = (isRtl ? min : 100 - max) + '%';\n track.style.height = '100%';\n }\n }\n\n private getThumbSize(value: number, thumbSize: number = 0) {\n const currentStep = (value - this.min()) / this.step();\n const halfSteps = this.totalSteps() / 2;\n const halfThumbSize = thumbSize / 2;\n\n // Return 0 for middle, positive offset for first half, negative for second half\n const offset = currentStep - halfSteps;\n return -(offset / halfSteps) * halfThumbSize;\n }\n\n writeValue(value: number | number[]): void {\n this.value.set(value);\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n private get width() {\n return this.orientation() === 'vertical'\n ? this.el.nativeElement.clientHeight\n : this.el.nativeElement.clientWidth;\n }\n\n // We need to consider the min value also because the slider can be negative\n private toPercentage(value: number) {\n const min = this.min();\n const max = this.max();\n const range = max - min;\n const percentage = ((value - min) / range) * 100;\n return percentage;\n }\n\n private fromPercentage(percentage: number) {\n const min = this.min();\n const max = this.max();\n const range = max - min;\n const value = (percentage / 100) * range + min;\n return value;\n }\n\n private move(data: DragData) {\n requestAnimationFrame(() => this.moveSlider(data));\n }\n\n private clicked(clientX: number) {\n const slider = this.el.nativeElement;\n const rect = slider.getBoundingClientRect();\n const isVertical = this.orientation() === 'vertical';\n const isRtl = !isVertical && this.dir.isRtl();\n\n let position: number;\n if (isVertical) {\n position = rect.top;\n } else {\n position = isRtl ? rect.right : rect.left;\n clientX = isRtl ? -clientX : clientX; // Invert the click position for RTL\n }\n\n return this.perRound(clientX + (isRtl ? position : -position), this.width, isVertical);\n }\n\n private perRound(x: number, width: number, reverse = false) {\n // the new percentage of the slider\n let percentage = (x / width) * 100;\n if (reverse) {\n percentage = 100 - percentage;\n }\n // convert percentage to value\n return this.fromPercentage(percentage);\n }\n\n private fixStep(value = this.min()) {\n // make sure the value is within the min and max\n // we need to make the percentage to be a multiple of the step\n value = parseFloat((Math.round(value / this.step()) * this.step()).toFixed(10));\n return Math.max(this.min(), Math.min(this.max(), value));\n }\n\n private moveSlider(data: DragData) {\n data.event?.preventDefault();\n const isVertical = this.orientation() === 'vertical';\n const isRtl = !isVertical && this.dir.isRtl();\n\n let cx = data.clientX!;\n let x = data.x!;\n\n if (isVertical) {\n cx = data.clientY!;\n x = -data.y!;\n } else if (isRtl) {\n x = -x; // Invert the movement for RTL\n }\n // convert value to percentage based on the max value\n if (data.type === 'start') {\n const clickedValue = this.clicked(cx);\n const valuePercentage = this.toPercentage(clickedValue);\n // total width of the slider\n this.totalWidth = this.width;\n // the width of the slider using current percentage\n this.totalSliderWidth = this.totalWidth * (valuePercentage / 100);\n\n // make sure the values are equal length as the range\n if (this.values.length !== this.range()) {\n this.values = Array.from({ length: this.range() }, (_, i) => this.values[i] || this.min());\n }\n // sort the values\n this.values = this.values.sort((a, b) => a - b);\n\n // find the nearest value index based on the percentage\n this.activeIndex = this.values.reduce((closestIndex, value, index) => {\n const diff = Math.abs(this.toPercentage(value) - valuePercentage);\n return diff < Math.abs(this.toPercentage(this.values[closestIndex]) - valuePercentage)\n ? index\n : closestIndex;\n }, 0);\n this.updateValue(this.activeIndex, clickedValue);\n if (this.values[this.activeIndex] !== this.value()) {\n this.notifyChange();\n }\n } else if (data.type === 'move') {\n // the new percentage of the slider\n const newSize = this.totalSliderWidth + x;\n const percentage = this.perRound(newSize, this.totalWidth);\n // update the value only when the percentage is different and within the range\n const prevValue = this.values[this.activeIndex];\n const currentValue = this.updateValue(this.activeIndex, percentage);\n if (prevValue !== currentValue) {\n this.notifyChange();\n }\n } else {\n this.totalWidth = 0;\n this.totalSliderWidth = 0;\n }\n }\n\n private updateValue(index: number, value: number) {\n const values = this.values;\n let stepValue = this.fixStep(value);\n\n // Clamp the value between min and max\n stepValue = Math.max(this.min(), Math.min(this.max(), stepValue));\n values[index] = stepValue;\n\n this.values = values.sort((a, b) => a - b);\n this.activeIndex = this.values.findIndex(v => v === stepValue);\n return stepValue;\n }\n\n private notifyChange() {\n const percentage = this.range() > 1 ? [...this.values] : this.values[0];\n this.value.set(percentage);\n this.onChange?.(percentage);\n this.onTouched?.();\n }\n}\n\nexport const provideSlider = (slider: Type<NgbSlider>) => [\n { provide: NgbSlider, useExisting: slider },\n provideValueAccessor(slider),\n];\n","/*\n * Public API Surface of slider\n */\n\nexport { NgbSlider, SliderTrack, SliderRange, SliderThumb, provideSlider } from './slider';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"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CAAA,CAAA;;2FA6BX,SAAS,EAAA,UAAA,EAAA,CAAA;kBAfrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;oBACrB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,SAAS,EAAE,CAAC,oBAAoB,CAAA,SAAA,CAAW,CAAC;AAC5C,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,CAAC;AAChD,oBAAA,QAAQ,EAAE;;;;;;;AAOT,EAAA,CAAA;AACF,iBAAA;;MA4PY,aAAa,GAAG,CAAC,MAAuB,KAAK;AACxD,IAAA,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE;IAC3C,oBAAoB,CAAC,MAAM,CAAC;;;AC3V9B;;AAEG;;ACFH;;AAEG;;;;"}
@@ -0,0 +1,176 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, Directive, signal, Component, ChangeDetectionStrategy, Injectable, inject } from '@angular/core';
3
+ import { basePortal } from '@ngbase/adk/portal';
4
+ import { trigger, state, style, transition, animate } from '@angular/animations';
5
+ import { uniqueId } from '@ngbase/adk/utils';
6
+
7
+ class SonnerBase {
8
+ constructor() {
9
+ this.ngbSonnerBase = input.required();
10
+ }
11
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SonnerBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
12
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.0", type: SonnerBase, isStandalone: true, selector: "[ngbSonnerBase]", inputs: { ngbSonnerBase: { classPropertyName: "ngbSonnerBase", publicName: "ngbSonnerBase", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "style": "{\n 'z-index': -ngbSonnerBase(),\n bottom: 16 * ngbSonnerBase() + 'px',\n visibility: ngbSonnerBase() < 3 ? 'visible' : 'hidden',\n transform: 'scale(' + (1 - ngbSonnerBase() * 0.08) + ')',\n opacity: ngbSonnerBase() < 3 ? 1 : 0,\n }", "@slideInOutAnimation": "" }, styleAttribute: "position: absolute; right: 0; display: flex; flex-direction: column;" }, exportAs: ["ngbSonnerBase"], ngImport: i0 }); }
13
+ }
14
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SonnerBase, decorators: [{
15
+ type: Directive,
16
+ args: [{
17
+ selector: '[ngbSonnerBase]',
18
+ exportAs: 'ngbSonnerBase',
19
+ host: {
20
+ style: `position: absolute; right: 0; display: flex; flex-direction: column;`,
21
+ '[style]': `{
22
+ 'z-index': -ngbSonnerBase(),
23
+ bottom: 16 * ngbSonnerBase() + 'px',
24
+ visibility: ngbSonnerBase() < 3 ? 'visible' : 'hidden',
25
+ transform: 'scale(' + (1 - ngbSonnerBase() * 0.08) + ')',
26
+ opacity: ngbSonnerBase() < 3 ? 1 : 0,
27
+ }`,
28
+ '[@slideInOutAnimation]': '',
29
+ },
30
+ }]
31
+ }] });
32
+ class NgbSonner {
33
+ constructor() {
34
+ this.messages = signal([]);
35
+ }
36
+ addMessage(message, type, data) {
37
+ const id = uniqueId();
38
+ const { timeout = 3000 } = data ?? {};
39
+ // push the new message to the top of the list
40
+ // so that it will be displayed first
41
+ // also the index is less than 3, the message will be visible
42
+ this.messages.update(x => [{ id, message, data, type }, ...x]);
43
+ if (timeout === 0)
44
+ return;
45
+ setTimeout(() => {
46
+ this.messages.update(x => x.filter(msg => msg.id !== id));
47
+ }, timeout);
48
+ }
49
+ clear() {
50
+ this.messages.set([]);
51
+ }
52
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbSonner, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
53
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", type: NgbSonner, isStandalone: true, selector: "ngb-sonner", ngImport: i0, template: `
54
+ <ul class="fixed bottom-0 right-0 flex flex-col gap-2">
55
+ @for (msg of messages(); track msg.id) {
56
+ <li
57
+ [ngbSonnerBase]="$index"
58
+ class="{{
59
+ 'm-4 w-96 gap-b rounded-base border bg-foreground p-4 shadow-lg transition-all duration-300' +
60
+ (msg.type === 'success' ? ' bg-green-50 text-green-600' : '') +
61
+ (msg.type === 'error' ? ' bg-red-50 text-red-600' : '') +
62
+ (msg.type === 'warning' ? ' bg-yellow-50 text-yellow-600' : '')
63
+ }}"
64
+ >
65
+ <h4 class="flex items-center gap-b2 font-semibold">{{ msg.message }}</h4>
66
+ @if (msg.data?.description) {
67
+ <p class="text-muted">{{ msg.data?.description }}</p>
68
+ }
69
+ </li>
70
+ }
71
+ </ul>
72
+ `, isInline: true, dependencies: [{ kind: "directive", type: SonnerBase, selector: "[ngbSonnerBase]", inputs: ["ngbSonnerBase"], exportAs: ["ngbSonnerBase"] }], animations: [
73
+ trigger('slideInOutAnimation', [
74
+ state('1', style({ transform: 'none', opacity: 1 })),
75
+ state('void', style({ transform: 'translateY(100%)', opacity: 0 })),
76
+ state('0', style({ transform: 'translateY(100%)', opacity: 0 })),
77
+ transition('* => *', animate('300ms ease-out')),
78
+ ]),
79
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
80
+ }
81
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbSonner, decorators: [{
82
+ type: Component,
83
+ args: [{
84
+ selector: 'ngb-sonner',
85
+ changeDetection: ChangeDetectionStrategy.OnPush,
86
+ imports: [SonnerBase],
87
+ template: `
88
+ <ul class="fixed bottom-0 right-0 flex flex-col gap-2">
89
+ @for (msg of messages(); track msg.id) {
90
+ <li
91
+ [ngbSonnerBase]="$index"
92
+ class="{{
93
+ 'm-4 w-96 gap-b rounded-base border bg-foreground p-4 shadow-lg transition-all duration-300' +
94
+ (msg.type === 'success' ? ' bg-green-50 text-green-600' : '') +
95
+ (msg.type === 'error' ? ' bg-red-50 text-red-600' : '') +
96
+ (msg.type === 'warning' ? ' bg-yellow-50 text-yellow-600' : '')
97
+ }}"
98
+ >
99
+ <h4 class="flex items-center gap-b2 font-semibold">{{ msg.message }}</h4>
100
+ @if (msg.data?.description) {
101
+ <p class="text-muted">{{ msg.data?.description }}</p>
102
+ }
103
+ </li>
104
+ }
105
+ </ul>
106
+ `,
107
+ animations: [
108
+ trigger('slideInOutAnimation', [
109
+ state('1', style({ transform: 'none', opacity: 1 })),
110
+ state('void', style({ transform: 'translateY(100%)', opacity: 0 })),
111
+ state('0', style({ transform: 'translateY(100%)', opacity: 0 })),
112
+ transition('* => *', animate('300ms ease-out')),
113
+ ]),
114
+ ],
115
+ }]
116
+ }] });
117
+
118
+ class SonnerService {
119
+ constructor() {
120
+ this.NAME = 'sonner';
121
+ this.base = basePortal(this.NAME, NgbSonner);
122
+ }
123
+ updateSonner(component = NgbSonner) {
124
+ this.base.updateBaseComponent(component);
125
+ }
126
+ addMessage(message, type, data) {
127
+ if (!this.sonner) {
128
+ const { parent, diaRef } = this.base.open();
129
+ this.sonner = { parent, diaRef };
130
+ }
131
+ this.sonner.parent.instance.addMessage(message, type, data);
132
+ }
133
+ closeAll() {
134
+ this.sonner?.parent.instance.clear();
135
+ }
136
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SonnerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
137
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SonnerService, providedIn: 'root' }); }
138
+ }
139
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SonnerService, decorators: [{
140
+ type: Injectable,
141
+ args: [{ providedIn: 'root' }]
142
+ }] });
143
+ function ngbSonnerPortal(component) {
144
+ const sonnerService = inject(SonnerService);
145
+ sonnerService.updateSonner(component);
146
+ function closeAll() {
147
+ sonnerService.closeAll();
148
+ }
149
+ function message(message, data) {
150
+ sonnerService.addMessage(message, 'default', data);
151
+ }
152
+ function success(message, data) {
153
+ sonnerService.addMessage(message, 'success', data);
154
+ }
155
+ function error(message, data) {
156
+ sonnerService.addMessage(message, 'error', data);
157
+ }
158
+ function warning(message, data) {
159
+ sonnerService.addMessage(message, 'warning', data);
160
+ }
161
+ function info(message, data) {
162
+ sonnerService.addMessage(message, 'info', data);
163
+ }
164
+ return { message, success, error, warning, info, closeAll };
165
+ }
166
+
167
+ /*
168
+ * Public API Surface of sonner
169
+ */
170
+
171
+ /**
172
+ * Generated bundle index. Do not edit.
173
+ */
174
+
175
+ export { NgbSonner, SonnerBase, SonnerService, ngbSonnerPortal };
176
+ //# sourceMappingURL=ngbase-adk-sonner.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngbase-adk-sonner.mjs","sources":["../../../projects/adk/sonner/sonner.ts","../../../projects/adk/sonner/sonner.service.ts","../../../projects/adk/sonner/public-api.ts","../../../projects/adk/sonner/ngbase-adk-sonner.ts"],"sourcesContent":["import { animate, state, style, transition, trigger } from '@angular/animations';\nimport { ChangeDetectionStrategy, Component, Directive, input, signal } from '@angular/core';\nimport { uniqueId } from '@ngbase/adk/utils';\n\n@Directive({\n selector: '[ngbSonnerBase]',\n exportAs: 'ngbSonnerBase',\n host: {\n style: `position: absolute; right: 0; display: flex; flex-direction: column;`,\n '[style]': `{\n 'z-index': -ngbSonnerBase(),\n bottom: 16 * ngbSonnerBase() + 'px',\n visibility: ngbSonnerBase() < 3 ? 'visible' : 'hidden',\n transform: 'scale(' + (1 - ngbSonnerBase() * 0.08) + ')',\n opacity: ngbSonnerBase() < 3 ? 1 : 0,\n }`,\n '[@slideInOutAnimation]': '',\n },\n})\nexport class SonnerBase {\n readonly ngbSonnerBase = input.required<number>();\n}\n\n@Component({\n selector: 'ngb-sonner',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [SonnerBase],\n template: `\n <ul class=\"fixed bottom-0 right-0 flex flex-col gap-2\">\n @for (msg of messages(); track msg.id) {\n <li\n [ngbSonnerBase]=\"$index\"\n class=\"{{\n 'm-4 w-96 gap-b rounded-base border bg-foreground p-4 shadow-lg transition-all duration-300' +\n (msg.type === 'success' ? ' bg-green-50 text-green-600' : '') +\n (msg.type === 'error' ? ' bg-red-50 text-red-600' : '') +\n (msg.type === 'warning' ? ' bg-yellow-50 text-yellow-600' : '')\n }}\"\n >\n <h4 class=\"flex items-center gap-b2 font-semibold\">{{ msg.message }}</h4>\n @if (msg.data?.description) {\n <p class=\"text-muted\">{{ msg.data?.description }}</p>\n }\n </li>\n }\n </ul>\n `,\n animations: [\n trigger('slideInOutAnimation', [\n state('1', style({ transform: 'none', opacity: 1 })),\n state('void', style({ transform: 'translateY(100%)', opacity: 0 })),\n state('0', style({ transform: 'translateY(100%)', opacity: 0 })),\n transition('* => *', animate('300ms ease-out')),\n ]),\n ],\n})\nexport class NgbSonner {\n readonly messages = signal<SonnerMessage[]>([]);\n\n addMessage(message: string, type: SonnerType, data?: SonnerData) {\n const id = uniqueId();\n const { timeout = 3000 } = data ?? {};\n\n // push the new message to the top of the list\n // so that it will be displayed first\n // also the index is less than 3, the message will be visible\n this.messages.update(x => [{ id, message, data, type }, ...x]);\n\n if (timeout === 0) return;\n setTimeout(() => {\n this.messages.update(x => x.filter(msg => msg.id !== id));\n }, timeout);\n }\n\n clear() {\n this.messages.set([]);\n }\n}\n\nexport interface SonnerMessage {\n message: string;\n data?: SonnerData;\n type?: SonnerType;\n id?: string;\n}\n\nexport type SonnerType = 'default' | 'success' | 'error' | 'warning' | 'info';\n\nexport interface SonnerData {\n description?: string;\n timeout?: number;\n}\n","import { ComponentRef, inject, Injectable, Type } from '@angular/core';\nimport { basePortal, DialogRef } from '@ngbase/adk/portal';\nimport { NgbSonner, SonnerData, SonnerType } from './sonner';\n\n@Injectable({ providedIn: 'root' })\nexport class SonnerService {\n private NAME = 'sonner';\n private base = basePortal(this.NAME, NgbSonner);\n private sonner: { parent: ComponentRef<NgbSonner>; diaRef: DialogRef<NgbSonner> } | undefined;\n\n updateSonner(component: Type<NgbSonner> = NgbSonner) {\n this.base.updateBaseComponent(component);\n }\n\n addMessage(message: string, type: SonnerType, data?: SonnerData) {\n if (!this.sonner) {\n const { parent, diaRef } = this.base.open();\n this.sonner = { parent, diaRef };\n }\n this.sonner.parent.instance.addMessage(message, type, data);\n }\n\n closeAll() {\n this.sonner?.parent.instance.clear();\n }\n}\n\nexport function ngbSonnerPortal(component?: Type<NgbSonner>) {\n const sonnerService = inject(SonnerService);\n\n sonnerService.updateSonner(component);\n\n function closeAll() {\n sonnerService.closeAll();\n }\n\n function message(message: string, data?: SonnerData) {\n sonnerService.addMessage(message, 'default', data);\n }\n\n function success(message: string, data?: SonnerData) {\n sonnerService.addMessage(message, 'success', data);\n }\n\n function error(message: string, data?: SonnerData) {\n sonnerService.addMessage(message, 'error', data);\n }\n\n function warning(message: string, data?: SonnerData) {\n sonnerService.addMessage(message, 'warning', data);\n }\n\n function info(message: string, data?: SonnerData) {\n sonnerService.addMessage(message, 'info', data);\n }\n\n return { message, success, error, warning, info, closeAll };\n}\n","/*\n * Public API Surface of sonner\n */\n\nexport * from './sonner.service';\nexport * from './sonner';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAmBa,UAAU,CAAA;AAfvB,IAAA,WAAA,GAAA;AAgBW,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,QAAQ,EAAU;AAClD;8GAFY,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,aAAA,EAAA,EAAA,iBAAA,EAAA,eAAA,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