@sebgroup/green-angular 3.8.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/{esm2020 → esm2022}/lib/accordion/accordion-list-item.component.mjs +4 -4
  2. package/{esm2020 → esm2022}/lib/accordion/accordion.component.mjs +4 -4
  3. package/{esm2020 → esm2022}/lib/accordion/accordion.module.mjs +5 -5
  4. package/esm2022/lib/badge/badge.component.mjs +80 -0
  5. package/{esm2020 → esm2022}/lib/badge/badge.module.mjs +5 -5
  6. package/{esm2020 → esm2022}/lib/button/button.component.mjs +4 -4
  7. package/{esm2020 → esm2022}/lib/button/button.module.mjs +5 -5
  8. package/{esm2020 → esm2022}/lib/cell-table/cell-table-item.component.mjs +6 -6
  9. package/{esm2020 → esm2022}/lib/cell-table/cell-table.component.mjs +4 -4
  10. package/{esm2020 → esm2022}/lib/cell-table/cell-table.module.mjs +7 -7
  11. package/{esm2020 → esm2022}/lib/cell-table/cell-underline.directive.mjs +4 -4
  12. package/{esm2020 → esm2022}/lib/context-menu/context-menu.component.mjs +4 -4
  13. package/{esm2020 → esm2022}/lib/context-menu/context-menu.module.mjs +5 -5
  14. package/esm2022/lib/datepicker/datepicker.component.mjs +138 -0
  15. package/{esm2020 → esm2022}/lib/datepicker/datepicker.module.mjs +5 -5
  16. package/{esm2020 → esm2022}/lib/dropdown/dropdown-button.directive.mjs +4 -4
  17. package/{esm2020 → esm2022}/lib/dropdown/dropdown-option.directive.mjs +4 -4
  18. package/esm2022/lib/dropdown/dropdown.component.mjs +212 -0
  19. package/{esm2020 → esm2022}/lib/dropdown/dropdown.module.mjs +9 -9
  20. package/{esm2020 → esm2022}/lib/green-angular.module.mjs +31 -31
  21. package/{esm2020 → esm2022}/lib/in-page-wizard/in-page-wizard-step-card.component.mjs +4 -4
  22. package/{esm2020 → esm2022}/lib/in-page-wizard/in-page-wizard.module.mjs +5 -5
  23. package/{esm2020 → esm2022}/lib/modal/modal-footer.directive.mjs +4 -4
  24. package/{esm2020 → esm2022}/lib/modal/modal-header.directive.mjs +4 -4
  25. package/esm2022/lib/modal/modal.component.mjs +258 -0
  26. package/{esm2020 → esm2022}/lib/modal/modal.module.mjs +12 -12
  27. package/{esm2020 → esm2022}/lib/pagination/pagination.component.mjs +4 -4
  28. package/{esm2020 → esm2022}/lib/pagination/pagination.module.mjs +5 -5
  29. package/{esm2020 → esm2022}/lib/progress-circle/progress-circle.component.mjs +4 -4
  30. package/{esm2020 → esm2022}/lib/progress-circle/progress-circle.module.mjs +5 -5
  31. package/{esm2020 → esm2022}/lib/segmented-control/segmented-control.component.mjs +6 -6
  32. package/{esm2020 → esm2022}/lib/segmented-control/segmented-control.module.mjs +5 -5
  33. package/{esm2020 → esm2022}/lib/shared/core-element/core-element.directive.mjs +4 -4
  34. package/{esm2020 → esm2022}/lib/shared/core-element/core-element.module.mjs +5 -5
  35. package/{esm2020/src → esm2022}/lib/shared/on-scroll.directive.mjs +10 -10
  36. package/{esm2020 → esm2022}/lib/shared/shared.module.mjs +5 -5
  37. package/esm2022/lib/slider/slider.component.mjs +113 -0
  38. package/{esm2020 → esm2022}/lib/slider/slider.module.mjs +5 -5
  39. package/{esm2020 → esm2022}/lib/sortable-list/sortable-list.component.mjs +4 -4
  40. package/{esm2020 → esm2022}/lib/sortable-list/sortable-list.module.mjs +5 -5
  41. package/{esm2020 → esm2022}/src/lib/accordion/accordion-list-item.component.mjs +4 -4
  42. package/{esm2020 → esm2022}/src/lib/accordion/accordion.component.mjs +4 -4
  43. package/{esm2020 → esm2022}/src/lib/accordion/accordion.module.mjs +5 -5
  44. package/esm2022/src/lib/badge/badge.component.mjs +80 -0
  45. package/{esm2020 → esm2022}/src/lib/badge/badge.module.mjs +5 -5
  46. package/{esm2020 → esm2022}/src/lib/button/button.component.mjs +4 -4
  47. package/{esm2020 → esm2022}/src/lib/button/button.module.mjs +5 -5
  48. package/{esm2020 → esm2022}/src/lib/cell-table/cell-table-item.component.mjs +6 -6
  49. package/{esm2020 → esm2022}/src/lib/cell-table/cell-table.component.mjs +4 -4
  50. package/{esm2020 → esm2022}/src/lib/cell-table/cell-table.module.mjs +7 -7
  51. package/{esm2020 → esm2022}/src/lib/cell-table/cell-underline.directive.mjs +4 -4
  52. package/{esm2020 → esm2022}/src/lib/context-menu/context-menu.component.mjs +4 -4
  53. package/{esm2020 → esm2022}/src/lib/context-menu/context-menu.module.mjs +5 -5
  54. package/esm2022/src/lib/datepicker/datepicker.component.mjs +138 -0
  55. package/{esm2020 → esm2022}/src/lib/datepicker/datepicker.module.mjs +5 -5
  56. package/{esm2020 → esm2022}/src/lib/dropdown/dropdown-button.directive.mjs +4 -4
  57. package/{esm2020 → esm2022}/src/lib/dropdown/dropdown-option.directive.mjs +4 -4
  58. package/esm2022/src/lib/dropdown/dropdown.component.mjs +212 -0
  59. package/{esm2020 → esm2022}/src/lib/dropdown/dropdown.module.mjs +9 -9
  60. package/{esm2020 → esm2022}/src/lib/in-page-wizard/in-page-wizard-step-card.component.mjs +4 -4
  61. package/{esm2020 → esm2022}/src/lib/in-page-wizard/in-page-wizard.module.mjs +5 -5
  62. package/{esm2020 → esm2022}/src/lib/modal/modal-footer.directive.mjs +4 -4
  63. package/{esm2020 → esm2022}/src/lib/modal/modal-header.directive.mjs +4 -4
  64. package/esm2022/src/lib/modal/modal.component.mjs +258 -0
  65. package/{esm2020 → esm2022}/src/lib/modal/modal.module.mjs +12 -12
  66. package/{esm2020 → esm2022}/src/lib/pagination/pagination.component.mjs +4 -4
  67. package/{esm2020 → esm2022}/src/lib/pagination/pagination.module.mjs +5 -5
  68. package/{esm2020 → esm2022}/src/lib/progress-circle/progress-circle.component.mjs +4 -4
  69. package/{esm2020 → esm2022}/src/lib/progress-circle/progress-circle.module.mjs +5 -5
  70. package/{esm2020 → esm2022}/src/lib/segmented-control/segmented-control.component.mjs +6 -6
  71. package/{esm2020 → esm2022}/src/lib/segmented-control/segmented-control.module.mjs +5 -5
  72. package/{esm2020 → esm2022}/src/lib/shared/core-element/core-element.directive.mjs +4 -4
  73. package/{esm2020 → esm2022}/src/lib/shared/core-element/core-element.module.mjs +5 -5
  74. package/esm2022/src/lib/shared/on-scroll.directive.mjs +47 -0
  75. package/{esm2020 → esm2022}/src/lib/shared/shared.module.mjs +5 -5
  76. package/esm2022/src/lib/slider/slider.component.mjs +113 -0
  77. package/{esm2020 → esm2022}/src/lib/slider/slider.module.mjs +5 -5
  78. package/{esm2020 → esm2022}/src/lib/sortable-list/sortable-list.component.mjs +4 -4
  79. package/{esm2020 → esm2022}/src/lib/sortable-list/sortable-list.module.mjs +5 -5
  80. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-accordion.mjs +10 -10
  81. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-accordion.mjs.map +1 -1
  82. package/{fesm2015 → fesm2022}/sebgroup-green-angular-src-lib-badge.mjs +16 -16
  83. package/fesm2022/sebgroup-green-angular-src-lib-badge.mjs.map +1 -0
  84. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-button.mjs +7 -7
  85. package/{fesm2015 → fesm2022}/sebgroup-green-angular-src-lib-button.mjs.map +1 -1
  86. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-cell-table.mjs +17 -17
  87. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-cell-table.mjs.map +1 -1
  88. package/{fesm2015 → fesm2022}/sebgroup-green-angular-src-lib-context-menu.mjs +7 -7
  89. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-context-menu.mjs.map +1 -1
  90. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-datepicker.mjs +20 -20
  91. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-datepicker.mjs.map +1 -1
  92. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-dropdown.mjs +69 -69
  93. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-dropdown.mjs.map +1 -1
  94. package/{fesm2015 → fesm2022}/sebgroup-green-angular-src-lib-in-page-wizard.mjs +7 -7
  95. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-in-page-wizard.mjs.map +1 -1
  96. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-modal.mjs +43 -43
  97. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-modal.mjs.map +1 -1
  98. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-pagination.mjs +7 -7
  99. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-pagination.mjs.map +1 -1
  100. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-progress-circle.mjs +7 -7
  101. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-progress-circle.mjs.map +1 -1
  102. package/{fesm2015 → fesm2022}/sebgroup-green-angular-src-lib-segmented-control.mjs +9 -9
  103. package/fesm2022/sebgroup-green-angular-src-lib-segmented-control.mjs.map +1 -0
  104. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-shared.mjs +20 -20
  105. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-shared.mjs.map +1 -1
  106. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-slider.mjs +13 -13
  107. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-slider.mjs.map +1 -1
  108. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-sortable-list.mjs +7 -7
  109. package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-sortable-list.mjs.map +1 -1
  110. package/{fesm2020 → fesm2022}/sebgroup-green-angular.mjs +289 -289
  111. package/{fesm2020 → fesm2022}/sebgroup-green-angular.mjs.map +1 -1
  112. package/lib/accordion/accordion-list-item.component.d.ts +1 -1
  113. package/lib/accordion/accordion.component.d.ts +1 -1
  114. package/lib/badge/badge.component.d.ts +1 -1
  115. package/lib/button/button.component.d.ts +1 -1
  116. package/lib/cell-table/cell-table-item.component.d.ts +1 -1
  117. package/lib/cell-table/cell-table.component.d.ts +1 -1
  118. package/lib/cell-table/cell-table.types.d.ts +1 -1
  119. package/lib/cell-table/cell-underline.directive.d.ts +1 -1
  120. package/lib/context-menu/context-menu.component.d.ts +1 -1
  121. package/lib/datepicker/datepicker.component.d.ts +1 -1
  122. package/lib/dropdown/dropdown.component.d.ts +4 -4
  123. package/lib/in-page-wizard/in-page-wizard-step-card.component.d.ts +1 -1
  124. package/lib/modal/modal.component.d.ts +3 -3
  125. package/lib/pagination/pagination.component.d.ts +1 -1
  126. package/lib/progress-circle/progress-circle.component.d.ts +1 -1
  127. package/lib/segmented-control/segmented-control.component.d.ts +1 -1
  128. package/lib/slider/slider.component.d.ts +1 -1
  129. package/lib/sortable-list/sortable-list.component.d.ts +1 -1
  130. package/package.json +58 -94
  131. package/src/lib/accordion/accordion-list-item.component.d.ts +1 -1
  132. package/src/lib/accordion/accordion.component.d.ts +1 -1
  133. package/src/lib/badge/badge.component.d.ts +1 -1
  134. package/src/lib/button/button.component.d.ts +1 -1
  135. package/src/lib/cell-table/cell-table-item.component.d.ts +1 -1
  136. package/src/lib/cell-table/cell-table.component.d.ts +1 -1
  137. package/src/lib/cell-table/cell-table.types.d.ts +1 -1
  138. package/src/lib/cell-table/cell-underline.directive.d.ts +1 -1
  139. package/src/lib/context-menu/context-menu.component.d.ts +1 -1
  140. package/src/lib/datepicker/datepicker.component.d.ts +1 -1
  141. package/src/lib/dropdown/dropdown.component.d.ts +4 -4
  142. package/src/lib/in-page-wizard/in-page-wizard-step-card.component.d.ts +1 -1
  143. package/src/lib/modal/modal.component.d.ts +3 -3
  144. package/src/lib/pagination/pagination.component.d.ts +1 -1
  145. package/src/lib/progress-circle/progress-circle.component.d.ts +1 -1
  146. package/src/lib/segmented-control/segmented-control.component.d.ts +1 -1
  147. package/src/lib/slider/slider.component.d.ts +1 -1
  148. package/src/lib/sortable-list/sortable-list.component.d.ts +1 -1
  149. package/esm2020/lib/badge/badge.component.mjs +0 -80
  150. package/esm2020/lib/datepicker/datepicker.component.mjs +0 -138
  151. package/esm2020/lib/dropdown/dropdown.component.mjs +0 -212
  152. package/esm2020/lib/modal/modal.component.mjs +0 -258
  153. package/esm2020/lib/shared/on-scroll.directive.mjs +0 -47
  154. package/esm2020/lib/slider/slider.component.mjs +0 -113
  155. package/esm2020/src/lib/badge/badge.component.mjs +0 -80
  156. package/esm2020/src/lib/datepicker/datepicker.component.mjs +0 -138
  157. package/esm2020/src/lib/dropdown/dropdown.component.mjs +0 -212
  158. package/esm2020/src/lib/modal/modal.component.mjs +0 -258
  159. package/esm2020/src/lib/slider/slider.component.mjs +0 -113
  160. package/fesm2015/sebgroup-green-angular-src-lib-accordion.mjs +0 -140
  161. package/fesm2015/sebgroup-green-angular-src-lib-accordion.mjs.map +0 -1
  162. package/fesm2015/sebgroup-green-angular-src-lib-badge.mjs.map +0 -1
  163. package/fesm2015/sebgroup-green-angular-src-lib-button.mjs +0 -50
  164. package/fesm2015/sebgroup-green-angular-src-lib-cell-table.mjs +0 -272
  165. package/fesm2015/sebgroup-green-angular-src-lib-cell-table.mjs.map +0 -1
  166. package/fesm2015/sebgroup-green-angular-src-lib-context-menu.mjs.map +0 -1
  167. package/fesm2015/sebgroup-green-angular-src-lib-datepicker.mjs +0 -166
  168. package/fesm2015/sebgroup-green-angular-src-lib-datepicker.mjs.map +0 -1
  169. package/fesm2015/sebgroup-green-angular-src-lib-dropdown.mjs +0 -266
  170. package/fesm2015/sebgroup-green-angular-src-lib-dropdown.mjs.map +0 -1
  171. package/fesm2015/sebgroup-green-angular-src-lib-in-page-wizard.mjs.map +0 -1
  172. package/fesm2015/sebgroup-green-angular-src-lib-modal.mjs +0 -328
  173. package/fesm2015/sebgroup-green-angular-src-lib-modal.mjs.map +0 -1
  174. package/fesm2015/sebgroup-green-angular-src-lib-pagination.mjs +0 -197
  175. package/fesm2015/sebgroup-green-angular-src-lib-pagination.mjs.map +0 -1
  176. package/fesm2015/sebgroup-green-angular-src-lib-progress-circle.mjs +0 -63
  177. package/fesm2015/sebgroup-green-angular-src-lib-progress-circle.mjs.map +0 -1
  178. package/fesm2015/sebgroup-green-angular-src-lib-segmented-control.mjs.map +0 -1
  179. package/fesm2015/sebgroup-green-angular-src-lib-shared.mjs +0 -114
  180. package/fesm2015/sebgroup-green-angular-src-lib-shared.mjs.map +0 -1
  181. package/fesm2015/sebgroup-green-angular-src-lib-slider.mjs +0 -136
  182. package/fesm2015/sebgroup-green-angular-src-lib-slider.mjs.map +0 -1
  183. package/fesm2015/sebgroup-green-angular-src-lib-sortable-list.mjs +0 -204
  184. package/fesm2015/sebgroup-green-angular-src-lib-sortable-list.mjs.map +0 -1
  185. package/fesm2015/sebgroup-green-angular.mjs +0 -2165
  186. package/fesm2015/sebgroup-green-angular.mjs.map +0 -1
  187. package/fesm2020/sebgroup-green-angular-src-lib-badge.mjs +0 -102
  188. package/fesm2020/sebgroup-green-angular-src-lib-badge.mjs.map +0 -1
  189. package/fesm2020/sebgroup-green-angular-src-lib-button.mjs.map +0 -1
  190. package/fesm2020/sebgroup-green-angular-src-lib-context-menu.mjs +0 -104
  191. package/fesm2020/sebgroup-green-angular-src-lib-in-page-wizard.mjs +0 -72
  192. package/fesm2020/sebgroup-green-angular-src-lib-segmented-control.mjs +0 -58
  193. package/fesm2020/sebgroup-green-angular-src-lib-segmented-control.mjs.map +0 -1
  194. /package/{esm2020 → esm2022}/index.mjs +0 -0
  195. /package/{esm2020 → esm2022}/lib/accordion/index.mjs +0 -0
  196. /package/{esm2020 → esm2022}/lib/badge/index.mjs +0 -0
  197. /package/{esm2020 → esm2022}/lib/button/index.mjs +0 -0
  198. /package/{esm2020 → esm2022}/lib/cell-table/cell-table.types.mjs +0 -0
  199. /package/{esm2020 → esm2022}/lib/cell-table/index.mjs +0 -0
  200. /package/{esm2020 → esm2022}/lib/context-menu/index.mjs +0 -0
  201. /package/{esm2020 → esm2022}/lib/datepicker/index.mjs +0 -0
  202. /package/{esm2020 → esm2022}/lib/dropdown/index.mjs +0 -0
  203. /package/{esm2020 → esm2022}/lib/in-page-wizard/index.mjs +0 -0
  204. /package/{esm2020 → esm2022}/lib/modal/index.mjs +0 -0
  205. /package/{esm2020 → esm2022}/lib/pagination/index.mjs +0 -0
  206. /package/{esm2020 → esm2022}/lib/progress-circle/index.mjs +0 -0
  207. /package/{esm2020 → esm2022}/lib/segmented-control/index.mjs +0 -0
  208. /package/{esm2020 → esm2022}/lib/shared/core-element/index.mjs +0 -0
  209. /package/{esm2020 → esm2022}/lib/shared/index.mjs +0 -0
  210. /package/{esm2020 → esm2022}/lib/slider/index.mjs +0 -0
  211. /package/{esm2020 → esm2022}/lib/sortable-list/index.mjs +0 -0
  212. /package/{esm2020 → esm2022}/sebgroup-green-angular.mjs +0 -0
  213. /package/{esm2020 → esm2022}/src/lib/accordion/index.mjs +0 -0
  214. /package/{esm2020 → esm2022}/src/lib/accordion/sebgroup-green-angular-src-lib-accordion.mjs +0 -0
  215. /package/{esm2020 → esm2022}/src/lib/badge/index.mjs +0 -0
  216. /package/{esm2020 → esm2022}/src/lib/badge/sebgroup-green-angular-src-lib-badge.mjs +0 -0
  217. /package/{esm2020 → esm2022}/src/lib/button/index.mjs +0 -0
  218. /package/{esm2020 → esm2022}/src/lib/button/sebgroup-green-angular-src-lib-button.mjs +0 -0
  219. /package/{esm2020 → esm2022}/src/lib/cell-table/cell-table.types.mjs +0 -0
  220. /package/{esm2020 → esm2022}/src/lib/cell-table/index.mjs +0 -0
  221. /package/{esm2020 → esm2022}/src/lib/cell-table/sebgroup-green-angular-src-lib-cell-table.mjs +0 -0
  222. /package/{esm2020 → esm2022}/src/lib/context-menu/index.mjs +0 -0
  223. /package/{esm2020 → esm2022}/src/lib/context-menu/sebgroup-green-angular-src-lib-context-menu.mjs +0 -0
  224. /package/{esm2020 → esm2022}/src/lib/datepicker/index.mjs +0 -0
  225. /package/{esm2020 → esm2022}/src/lib/datepicker/sebgroup-green-angular-src-lib-datepicker.mjs +0 -0
  226. /package/{esm2020 → esm2022}/src/lib/dropdown/index.mjs +0 -0
  227. /package/{esm2020 → esm2022}/src/lib/dropdown/sebgroup-green-angular-src-lib-dropdown.mjs +0 -0
  228. /package/{esm2020 → esm2022}/src/lib/in-page-wizard/index.mjs +0 -0
  229. /package/{esm2020 → esm2022}/src/lib/in-page-wizard/sebgroup-green-angular-src-lib-in-page-wizard.mjs +0 -0
  230. /package/{esm2020 → esm2022}/src/lib/modal/index.mjs +0 -0
  231. /package/{esm2020 → esm2022}/src/lib/modal/sebgroup-green-angular-src-lib-modal.mjs +0 -0
  232. /package/{esm2020 → esm2022}/src/lib/pagination/index.mjs +0 -0
  233. /package/{esm2020 → esm2022}/src/lib/pagination/sebgroup-green-angular-src-lib-pagination.mjs +0 -0
  234. /package/{esm2020 → esm2022}/src/lib/progress-circle/index.mjs +0 -0
  235. /package/{esm2020 → esm2022}/src/lib/progress-circle/sebgroup-green-angular-src-lib-progress-circle.mjs +0 -0
  236. /package/{esm2020 → esm2022}/src/lib/segmented-control/index.mjs +0 -0
  237. /package/{esm2020 → esm2022}/src/lib/segmented-control/sebgroup-green-angular-src-lib-segmented-control.mjs +0 -0
  238. /package/{esm2020 → esm2022}/src/lib/shared/core-element/index.mjs +0 -0
  239. /package/{esm2020 → esm2022}/src/lib/shared/index.mjs +0 -0
  240. /package/{esm2020 → esm2022}/src/lib/shared/sebgroup-green-angular-src-lib-shared.mjs +0 -0
  241. /package/{esm2020 → esm2022}/src/lib/slider/index.mjs +0 -0
  242. /package/{esm2020 → esm2022}/src/lib/slider/sebgroup-green-angular-src-lib-slider.mjs +0 -0
  243. /package/{esm2020 → esm2022}/src/lib/sortable-list/index.mjs +0 -0
  244. /package/{esm2020 → esm2022}/src/lib/sortable-list/sebgroup-green-angular-src-lib-sortable-list.mjs +0 -0
@@ -1,63 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, HostBinding, Input, NgModule } from '@angular/core';
3
- import { randomId, calculateDegrees } from '@sebgroup/extract';
4
- import * as i1 from '@angular/common';
5
- import { CommonModule } from '@angular/common';
6
-
7
- class NggProgressCircleComponent {
8
- constructor() {
9
- this._startValue = '0deg';
10
- this._endValue = '0deg';
11
- /** id of the progress circle */
12
- this.id = `${randomId()}-progress-circle`;
13
- /** theme of the progress circle */
14
- this.theme = 'warning';
15
- }
16
- /** progress circle value in percentage */
17
- set value(val) {
18
- const degrees = `${calculateDegrees(val)}deg`;
19
- this._endValue = degrees;
20
- if (this.theme === 'disabled') {
21
- this._startValue = degrees;
22
- }
23
- }
24
- }
25
- NggProgressCircleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggProgressCircleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
26
- NggProgressCircleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggProgressCircleComponent, selector: "ngg-progress-circle", inputs: { id: "id", theme: "theme", value: "value" }, host: { properties: { "style.--start-value": "this._startValue", "style.--end-value": "this._endValue" } }, ngImport: i0, template: "<div\n class=\"gds-progress-circle\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"value\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-label]=\"id\"\n>\n <div class=\"ring full-ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"inner-circle\">\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggProgressCircleComponent, decorators: [{
28
- type: Component,
29
- args: [{ selector: 'ngg-progress-circle', template: "<div\n class=\"gds-progress-circle\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"value\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-label]=\"id\"\n>\n <div class=\"ring full-ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"inner-circle\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
30
- }], propDecorators: { _startValue: [{
31
- type: HostBinding,
32
- args: ['style.--start-value']
33
- }], _endValue: [{
34
- type: HostBinding,
35
- args: ['style.--end-value']
36
- }], id: [{
37
- type: Input
38
- }], theme: [{
39
- type: Input
40
- }], value: [{
41
- type: Input
42
- }] } });
43
-
44
- class NggProgressCircleModule {
45
- }
46
- NggProgressCircleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggProgressCircleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
47
- NggProgressCircleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggProgressCircleModule, declarations: [NggProgressCircleComponent], imports: [CommonModule], exports: [NggProgressCircleComponent] });
48
- NggProgressCircleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggProgressCircleModule, imports: [CommonModule] });
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggProgressCircleModule, decorators: [{
50
- type: NgModule,
51
- args: [{
52
- declarations: [NggProgressCircleComponent],
53
- imports: [CommonModule],
54
- exports: [NggProgressCircleComponent],
55
- }]
56
- }] });
57
-
58
- /**
59
- * Generated bundle index. Do not edit.
60
- */
61
-
62
- export { NggProgressCircleComponent, NggProgressCircleModule };
63
- //# sourceMappingURL=sebgroup-green-angular-src-lib-progress-circle.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sebgroup-green-angular-src-lib-progress-circle.mjs","sources":["../../../../libs/angular/src/lib/progress-circle/progress-circle.component.ts","../../../../libs/angular/src/lib/progress-circle/progress-circle.component.html","../../../../libs/angular/src/lib/progress-circle/progress-circle.module.ts","../../../../libs/angular/src/lib/progress-circle/sebgroup-green-angular-src-lib-progress-circle.ts"],"sourcesContent":["import { Component, HostBinding, Input } from '@angular/core'\nimport {\n calculateDegrees,\n ProgressCircleThemes,\n randomId,\n} from '@sebgroup/extract'\n\n@Component({\n selector: 'ngg-progress-circle',\n templateUrl: './progress-circle.component.html',\n})\nexport class NggProgressCircleComponent {\n @HostBinding('style.--start-value') private _startValue = '0deg'\n @HostBinding('style.--end-value') private _endValue = '0deg'\n\n /** id of the progress circle */\n @Input() id?: string = `${randomId()}-progress-circle`\n /** theme of the progress circle */\n @Input() theme: ProgressCircleThemes = 'warning'\n /** progress circle value in percentage */\n @Input() set value(val: number) {\n const degrees = `${calculateDegrees(val)}deg`\n this._endValue = degrees\n if (this.theme === 'disabled') {\n this._startValue = degrees\n }\n }\n}\n","<div\n class=\"gds-progress-circle\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"value\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-label]=\"id\"\n>\n <div class=\"ring full-ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"inner-circle\">\n <ng-content></ng-content>\n </div>\n</div>\n","import { NgModule } from '@angular/core'\nimport { CommonModule } from '@angular/common'\n\nimport { NggProgressCircleComponent } from './progress-circle.component'\n\n@NgModule({\n declarations: [NggProgressCircleComponent],\n imports: [CommonModule],\n exports: [NggProgressCircleComponent],\n})\nexport class NggProgressCircleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAWa,0BAA0B,CAAA;AAJvC,IAAA,WAAA,GAAA;AAK8C,QAAA,IAAW,CAAA,WAAA,GAAG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KAAK,EAAA,CAAA;sBAAjB,KAAK;;;MEVK,uBAAuB,CAAA;;oHAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAvB,uBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,EAJnB,YAAA,EAAA,CAAA,0BAA0B,CAC/B,EAAA,OAAA,EAAA,CAAA,YAAY,aACZ,0BAA0B,CAAA,EAAA,CAAA,CAAA;AAEzB,uBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YAHxB,YAAY,CAAA,EAAA,CAAA,CAAA;2FAGX,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBALnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,0BAA0B,CAAC;oBAC1C,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,0BAA0B,CAAC;iBACtC,CAAA;;;ACTD;;AAEG;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sebgroup-green-angular-src-lib-segmented-control.mjs","sources":["../../../../libs/angular/src/lib/segmented-control/segmented-control.component.ts","../../../../libs/angular/src/lib/segmented-control/segmented-control.module.ts","../../../../libs/angular/src/lib/segmented-control/sebgroup-green-angular-src-lib-segmented-control.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Input } from '@angular/core'\nimport { Observable } from 'rxjs'\nexport interface SegmentedControl {\n url: string\n text: Observable<string> | string\n}\n@Component({\n selector: 'ngg-segmented-control',\n template: `\n <div class=\"group\">\n <a\n *ngFor=\"let control of $controls | async\"\n [routerLink]=\"control.url\"\n routerLinkActive=\"active\"\n class=\"button\"\n >{{ control.text }}</a\n >\n </div>\n `,\n styles: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NggSegmentedControlComponent {\n @Input() $controls: Observable<Array<SegmentedControl>> | undefined\n}\n","import { NgModule } from '@angular/core'\nimport { CommonModule } from '@angular/common'\nimport { NggSegmentedControlComponent } from './segmented-control.component'\nimport { RouterModule } from '@angular/router'\n\n@NgModule({\n declarations: [NggSegmentedControlComponent],\n imports: [RouterModule, CommonModule],\n exports: [NggSegmentedControlComponent],\n})\nexport class NggSegmentedControlModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAsBa,4BAA4B,CAAA;;yHAA5B,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA5B,4BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,4BAA4B,EAd7B,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;AAUT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,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FAGzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBALrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,4BAA4B,CAAC;AAC5C,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;oBACrC,OAAO,EAAE,CAAC,4BAA4B,CAAC;iBACxC,CAAA;;;ACTD;;AAEG;;;;"}
@@ -1,114 +0,0 @@
1
- import { CommonModule, DOCUMENT } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { InjectionToken, Directive, NgModule, inject, Renderer2, ViewContainerRef, ChangeDetectorRef, TemplateRef } from '@angular/core';
4
- import { Subject, fromEvent, interval } from 'rxjs';
5
- import { takeUntil, throttle } from 'rxjs/operators';
6
- import { getScopedTagName } from '@sebgroup/green-core/scoping';
7
-
8
- const ON_SCROLL_TOKEN = new InjectionToken('ON_SCROLL_TOKEN');
9
- class NggOnScrollDirective {
10
- constructor(elementRef) {
11
- this.elementRef = elementRef;
12
- this.onScroll$ = new Subject();
13
- this.destroy$ = new Subject();
14
- }
15
- ngAfterViewInit() {
16
- var _a;
17
- if (this.elementRef) {
18
- fromEvent((_a = this.elementRef) === null || _a === void 0 ? void 0 : _a.nativeElement, 'scroll')
19
- .pipe(takeUntil(this.destroy$), throttle(() => interval(30)))
20
- .subscribe(() => {
21
- this.onScroll$.next();
22
- });
23
- }
24
- }
25
- ngOnDestroy() {
26
- this.destroy$.next(null);
27
- this.destroy$.complete();
28
- }
29
- }
30
- NggOnScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggOnScrollDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
31
- NggOnScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NggOnScrollDirective, selector: "[nggOnScroll]", providers: [
32
- {
33
- provide: ON_SCROLL_TOKEN,
34
- useFactory: (component) => component === null || component === void 0 ? void 0 : component.onScroll$,
35
- deps: [NggOnScrollDirective],
36
- },
37
- ], ngImport: i0 });
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggOnScrollDirective, decorators: [{
39
- type: Directive,
40
- args: [{
41
- selector: '[nggOnScroll]',
42
- providers: [
43
- {
44
- provide: ON_SCROLL_TOKEN,
45
- useFactory: (component) => component === null || component === void 0 ? void 0 : component.onScroll$,
46
- deps: [NggOnScrollDirective],
47
- },
48
- ],
49
- }]
50
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
51
-
52
- class NggSharedModule {
53
- }
54
- NggSharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
55
- NggSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggSharedModule, declarations: [NggOnScrollDirective], imports: [CommonModule], exports: [NggOnScrollDirective] });
56
- NggSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSharedModule, imports: [CommonModule] });
57
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSharedModule, decorators: [{
58
- type: NgModule,
59
- args: [{
60
- declarations: [NggOnScrollDirective],
61
- imports: [CommonModule],
62
- exports: [NggOnScrollDirective],
63
- }]
64
- }] });
65
-
66
- class NggCoreElementDirective {
67
- constructor() {
68
- this.viewRef = null;
69
- this.document = inject(DOCUMENT);
70
- this.renderer = inject(Renderer2);
71
- this.vcr = inject(ViewContainerRef);
72
- this.cdr = inject(ChangeDetectorRef);
73
- this.template = inject((TemplateRef));
74
- }
75
- ngOnInit() {
76
- this.vcr.clear();
77
- const originalCreateElement = this.renderer.createElement;
78
- this.renderer.createElement = (name, _namespace) => {
79
- return this.document.createElement(getScopedTagName(name));
80
- };
81
- this.viewRef = this.vcr.createEmbeddedView(this.template);
82
- this.renderer.createElement = originalCreateElement;
83
- this.cdr.markForCheck();
84
- }
85
- }
86
- NggCoreElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggCoreElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
87
- NggCoreElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NggCoreElementDirective, selector: "[nggCoreElement]", ngImport: i0 });
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggCoreElementDirective, decorators: [{
89
- type: Directive,
90
- args: [{
91
- selector: '[nggCoreElement]',
92
- }]
93
- }] });
94
-
95
- class NggCoreWrapperModule {
96
- }
97
- NggCoreWrapperModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggCoreWrapperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
98
- NggCoreWrapperModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggCoreWrapperModule, declarations: [NggCoreElementDirective], imports: [CommonModule], exports: [NggCoreElementDirective] });
99
- NggCoreWrapperModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggCoreWrapperModule, imports: [CommonModule] });
100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggCoreWrapperModule, decorators: [{
101
- type: NgModule,
102
- args: [{
103
- declarations: [NggCoreElementDirective],
104
- imports: [CommonModule],
105
- exports: [NggCoreElementDirective],
106
- }]
107
- }] });
108
-
109
- /**
110
- * Generated bundle index. Do not edit.
111
- */
112
-
113
- export { NggCoreElementDirective, NggCoreWrapperModule, NggOnScrollDirective, NggSharedModule, ON_SCROLL_TOKEN };
114
- //# sourceMappingURL=sebgroup-green-angular-src-lib-shared.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sebgroup-green-angular-src-lib-shared.mjs","sources":["../../../../libs/angular/src/lib/shared/on-scroll.directive.ts","../../../../libs/angular/src/lib/shared/shared.module.ts","../../../../libs/angular/src/lib/shared/core-element/core-element.directive.ts","../../../../libs/angular/src/lib/shared/core-element/core-element.module.ts","../../../../libs/angular/src/lib/shared/sebgroup-green-angular-src-lib-shared.ts"],"sourcesContent":["import {\n AfterViewInit,\n Directive,\n ElementRef,\n InjectionToken,\n OnDestroy,\n} from '@angular/core'\nimport { Subject, fromEvent, interval } from 'rxjs'\nimport { takeUntil, throttle } from 'rxjs/operators'\n\nexport const ON_SCROLL_TOKEN = new InjectionToken<string>('ON_SCROLL_TOKEN')\n\n@Directive({\n selector: '[nggOnScroll]',\n providers: [\n {\n provide: ON_SCROLL_TOKEN,\n useFactory: (component: NggOnScrollDirective): Subject<unknown> =>\n component?.onScroll$,\n deps: [NggOnScrollDirective],\n },\n ],\n})\nexport class NggOnScrollDirective implements AfterViewInit, OnDestroy {\n onScroll$ = new Subject()\n destroy$ = new Subject()\n\n constructor(private elementRef: ElementRef) {}\n\n public ngAfterViewInit(): void {\n if (this.elementRef) {\n fromEvent(this.elementRef?.nativeElement, 'scroll')\n .pipe(\n takeUntil(this.destroy$),\n throttle(() => interval(30)),\n )\n .subscribe(() => {\n this.onScroll$.next()\n })\n }\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next(null)\n this.destroy$.complete()\n }\n}\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { NggOnScrollDirective } from './on-scroll.directive'\n\n@NgModule({\n declarations: [NggOnScrollDirective],\n imports: [CommonModule],\n exports: [NggOnScrollDirective],\n})\nexport class NggSharedModule {}\n","import { DOCUMENT } from '@angular/common'\nimport {\n ChangeDetectorRef,\n Directive,\n EmbeddedViewRef,\n OnInit,\n Renderer2,\n TemplateRef,\n ViewContainerRef,\n inject,\n} from '@angular/core'\n\nimport { getScopedTagName } from '@sebgroup/green-core/scoping'\n\n@Directive({\n selector: '[nggCoreElement]',\n})\nexport class NggCoreElementDirective implements OnInit {\n private viewRef: EmbeddedViewRef<any> | null = null\n private readonly document = inject(DOCUMENT)\n private readonly renderer = inject(Renderer2)\n private readonly vcr = inject(ViewContainerRef)\n private readonly cdr = inject(ChangeDetectorRef)\n private readonly template = inject(TemplateRef<any>)\n\n ngOnInit() {\n this.vcr.clear()\n const originalCreateElement = this.renderer.createElement\n\n this.renderer.createElement = (name: string, _namespace: string) => {\n return this.document.createElement(getScopedTagName(name))\n }\n\n this.viewRef = this.vcr.createEmbeddedView(this.template)\n this.renderer.createElement = originalCreateElement\n this.cdr.markForCheck()\n }\n}\n","import { NgModule } from '@angular/core'\nimport { CommonModule } from '@angular/common'\n\nimport { NggCoreElementDirective } from './core-element.directive'\n\n@NgModule({\n declarations: [NggCoreElementDirective],\n imports: [CommonModule],\n exports: [NggCoreElementDirective],\n})\nexport class NggCoreWrapperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAUa,eAAe,GAAG,IAAI,cAAc,CAAS,iBAAiB,EAAC;MAa/D,oBAAoB,CAAA;AAI/B,IAAA,WAAA,CAAoB,UAAsB,EAAA;AAAtB,QAAA,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;AAH1C,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,OAAO,EAAE,CAAA;AACzB,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,OAAO,EAAE,CAAA;KAEsB;IAEvC,eAAe,GAAA;;QACpB,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB,SAAS,CAAC,MAAA,IAAI,CAAC,UAAU,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,aAAa,EAAE,QA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A,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,EAJhB,YAAA,EAAA,CAAA,uBAAuB,CAC5B,EAAA,OAAA,EAAA,CAAA,YAAY,aACZ,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAEtB,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAHrB,YAAY,CAAA,EAAA,CAAA,CAAA;2FAGX,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBALhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;oBACvC,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,uBAAuB,CAAC;iBACnC,CAAA;;;ACTD;;AAEG;;;;"}
@@ -1,136 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, NgModule } from '@angular/core';
3
- import * as i2 from '@angular/forms';
4
- import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
5
- import { randomId, sliderColors, getSliderTrackBackground } from '@sebgroup/extract';
6
- import * as i1 from '@angular/common';
7
- import { CommonModule } from '@angular/common';
8
-
9
- class NggSliderComponent {
10
- constructor() {
11
- this.name = `${randomId()}-slider`;
12
- this.min = 0;
13
- this.max = 100;
14
- this.step = 1;
15
- this.label = '';
16
- this.instruction = '';
17
- this.placeholder = '';
18
- this.errorMessage = '';
19
- this.hasTextbox = false;
20
- this.unitLabel = 'kr';
21
- this.disabled = false;
22
- this.value = 0;
23
- this.sliderChange = new EventEmitter();
24
- this.sliderTouch = new EventEmitter();
25
- this.style = {};
26
- }
27
- ngOnInit() {
28
- this.setTrackBackground();
29
- }
30
- ngOnChanges(changes) {
31
- if (['min', 'max', 'value'].some((x) => Object.prototype.hasOwnProperty.call(changes, x))) {
32
- this.setTrackBackground();
33
- }
34
- }
35
- onBlur() {
36
- this.sliderTouch.emit(true);
37
- this.onTouchedFn && this.onTouchedFn();
38
- }
39
- handleChange() {
40
- var _a;
41
- this.value = (_a = this.value) !== null && _a !== void 0 ? _a : 0;
42
- this.setTrackBackground();
43
- this.sliderChange.emit(this.value);
44
- this.onChangeFn && this.onChangeFn(this.value);
45
- }
46
- setTrackBackground() {
47
- if (this.disabled) {
48
- this.style.background = sliderColors.disabled;
49
- return;
50
- }
51
- const percent = ((this.value - this.min) / (this.max - this.min)) * 100;
52
- this.style.background = getSliderTrackBackground(percent);
53
- }
54
- /** control value accessor functions */
55
- writeValue(val) {
56
- if (this.value !== val) {
57
- this.value = val !== null && val !== void 0 ? val : 0;
58
- this.handleChange();
59
- }
60
- }
61
- registerOnChange(fn) {
62
- this.onChangeFn = fn;
63
- }
64
- registerOnTouched(fn) {
65
- this.onTouchedFn = fn;
66
- }
67
- }
68
- NggSliderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
69
- NggSliderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggSliderComponent, selector: "ngg-slider", inputs: { name: "name", min: "min", max: "max", step: "step", label: "label", instruction: "instruction", placeholder: "placeholder", errorMessage: "errorMessage", hasTextbox: "hasTextbox", unitLabel: "unitLabel", disabled: "disabled", value: "value", enterkeyhint: "enterkeyhint" }, outputs: { sliderChange: "sliderChange", sliderTouch: "sliderTouch" }, providers: [
70
- {
71
- provide: NG_VALUE_ACCESSOR,
72
- useExisting: NggSliderComponent,
73
- multi: true,
74
- },
75
- ], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"!!label\" class=\"gds-slider-label-container\">\n <div>\n <label [attr.for]=\"name\" [attr.id]=\"name + '-label'\">{{ label }}</label>\n <p *ngIf=\"!!instruction\">{{ instruction }}</p>\n </div>\n <ng-container *ngIf=\"hasTextbox\">\n <ng-container *ngIf=\"!!unitLabel\">\n <div class=\"group group-border group-focus\">\n <ng-container *ngTemplateOutlet=\"inputField\"></ng-container>\n <span class=\"form-text\">{{ unitLabel }}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!unitLabel\">\n <ng-container *ngTemplateOutlet=\"inputField\"></ng-container>\n </ng-container>\n </ng-container>\n</div>\n\n<input\n type=\"range\"\n [attr.id]=\"name\"\n [attr.name]=\"name\"\n [attr.min]=\"min\"\n [attr.max]=\"max\"\n [attr.step]=\"step\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n [ngStyle]=\"style\"\n (blur)=\"onBlur()\"\n (input)=\"handleChange()\"\n/>\n\n<p *ngIf=\"!!errorMessage\" class=\"gds-slider-error-info\">\n {{ errorMessage }}\n</p>\n\n<ng-template #inputField>\n <input\n type=\"text\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n [(ngModel)]=\"value\"\n [class.is-invalid]=\"!!errorMessage\"\n [attr.name]=\"name\"\n [attr.id]=\"name + '-textbox'\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-labelledby]=\"name + '-label'\"\n [attr.enterkeyhint]=\"enterkeyhint\"\n [disabled]=\"disabled\"\n (blur)=\"onBlur()\"\n (input)=\"handleChange()\"\n />\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSliderComponent, decorators: [{
77
- type: Component,
78
- args: [{ selector: 'ngg-slider', providers: [
79
- {
80
- provide: NG_VALUE_ACCESSOR,
81
- useExisting: NggSliderComponent,
82
- multi: true,
83
- },
84
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"!!label\" class=\"gds-slider-label-container\">\n <div>\n <label [attr.for]=\"name\" [attr.id]=\"name + '-label'\">{{ label }}</label>\n <p *ngIf=\"!!instruction\">{{ instruction }}</p>\n </div>\n <ng-container *ngIf=\"hasTextbox\">\n <ng-container *ngIf=\"!!unitLabel\">\n <div class=\"group group-border group-focus\">\n <ng-container *ngTemplateOutlet=\"inputField\"></ng-container>\n <span class=\"form-text\">{{ unitLabel }}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!unitLabel\">\n <ng-container *ngTemplateOutlet=\"inputField\"></ng-container>\n </ng-container>\n </ng-container>\n</div>\n\n<input\n type=\"range\"\n [attr.id]=\"name\"\n [attr.name]=\"name\"\n [attr.min]=\"min\"\n [attr.max]=\"max\"\n [attr.step]=\"step\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n [ngStyle]=\"style\"\n (blur)=\"onBlur()\"\n (input)=\"handleChange()\"\n/>\n\n<p *ngIf=\"!!errorMessage\" class=\"gds-slider-error-info\">\n {{ errorMessage }}\n</p>\n\n<ng-template #inputField>\n <input\n type=\"text\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n [(ngModel)]=\"value\"\n [class.is-invalid]=\"!!errorMessage\"\n [attr.name]=\"name\"\n [attr.id]=\"name + '-textbox'\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-labelledby]=\"name + '-label'\"\n [attr.enterkeyhint]=\"enterkeyhint\"\n [disabled]=\"disabled\"\n (blur)=\"onBlur()\"\n (input)=\"handleChange()\"\n />\n</ng-template>\n" }]
85
- }], propDecorators: { name: [{
86
- type: Input
87
- }], min: [{
88
- type: Input
89
- }], max: [{
90
- type: Input
91
- }], step: [{
92
- type: Input
93
- }], label: [{
94
- type: Input
95
- }], instruction: [{
96
- type: Input
97
- }], placeholder: [{
98
- type: Input
99
- }], errorMessage: [{
100
- type: Input
101
- }], hasTextbox: [{
102
- type: Input
103
- }], unitLabel: [{
104
- type: Input
105
- }], disabled: [{
106
- type: Input
107
- }], value: [{
108
- type: Input
109
- }], enterkeyhint: [{
110
- type: Input
111
- }], sliderChange: [{
112
- type: Output
113
- }], sliderTouch: [{
114
- type: Output
115
- }] } });
116
-
117
- class NggSliderModule {
118
- }
119
- NggSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
120
- NggSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggSliderModule, declarations: [NggSliderComponent], imports: [CommonModule, FormsModule], exports: [NggSliderComponent] });
121
- NggSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSliderModule, imports: [CommonModule, FormsModule] });
122
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSliderModule, decorators: [{
123
- type: NgModule,
124
- args: [{
125
- imports: [CommonModule, FormsModule],
126
- exports: [NggSliderComponent],
127
- declarations: [NggSliderComponent],
128
- }]
129
- }] });
130
-
131
- /**
132
- * Generated bundle index. Do not edit.
133
- */
134
-
135
- export { NggSliderComponent, NggSliderModule };
136
- //# sourceMappingURL=sebgroup-green-angular-src-lib-slider.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sebgroup-green-angular-src-lib-slider.mjs","sources":["../../../../libs/angular/src/lib/slider/slider.component.ts","../../../../libs/angular/src/lib/slider/slider.component.html","../../../../libs/angular/src/lib/slider/slider.module.ts","../../../../libs/angular/src/lib/slider/sebgroup-green-angular-src-lib-slider.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport {\n getSliderTrackBackground,\n randomId,\n sliderColors,\n} from '@sebgroup/extract'\n\ninterface SliderStyle {\n background?: string\n}\n\n@Component({\n selector: 'ngg-slider',\n templateUrl: './slider.component.html',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: NggSliderComponent,\n multi: true,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NggSliderComponent\n implements ControlValueAccessor, OnInit, OnChanges\n{\n @Input() name = `${randomId()}-slider`\n @Input() min = 0\n @Input() max = 100\n @Input() step = 1\n @Input() label = ''\n @Input() instruction = ''\n @Input() placeholder = ''\n @Input() errorMessage = ''\n @Input() hasTextbox = false\n @Input() unitLabel = 'kr'\n @Input() disabled = false\n @Input() value = 0\n @Input() enterkeyhint?:\n | 'enter'\n | 'done'\n | 'go'\n | 'next'\n | 'previous'\n | 'search'\n | 'send'\n\n @Output() sliderChange = new EventEmitter<number>()\n @Output() sliderTouch = new EventEmitter<boolean>()\n\n onChangeFn?: (val: number) => void\n onTouchedFn?: VoidFunction\n style: SliderStyle = {}\n\n ngOnInit(): void {\n this.setTrackBackground()\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (\n ['min', 'max', 'value'].some((x: string) =>\n Object.prototype.hasOwnProperty.call(changes, x),\n )\n ) {\n this.setTrackBackground()\n }\n }\n\n onBlur(): void {\n this.sliderTouch.emit(true)\n this.onTouchedFn && this.onTouchedFn()\n }\n\n handleChange(): void {\n this.value = this.value ?? 0\n this.setTrackBackground()\n this.sliderChange.emit(this.value)\n this.onChangeFn && this.onChangeFn(this.value)\n }\n\n setTrackBackground(): void {\n if (this.disabled) {\n this.style.background = sliderColors.disabled\n return\n }\n\n const percent = ((this.value - this.min) / (this.max - this.min)) * 100\n this.style.background = getSliderTrackBackground(percent)\n }\n\n /** control value accessor functions */\n writeValue(val: number): void {\n if (this.value !== val) {\n this.value = val ?? 0\n this.handleChange()\n }\n }\n\n registerOnChange(fn: any): void {\n this.onChangeFn = fn\n }\n\n registerOnTouched(fn: any): void {\n this.onTouchedFn = fn\n }\n}\n","<div *ngIf=\"!!label\" class=\"gds-slider-label-container\">\n <div>\n <label [attr.for]=\"name\" [attr.id]=\"name + '-label'\">{{ label }}</label>\n <p *ngIf=\"!!instruction\">{{ instruction }}</p>\n </div>\n <ng-container *ngIf=\"hasTextbox\">\n <ng-container *ngIf=\"!!unitLabel\">\n <div class=\"group group-border group-focus\">\n <ng-container *ngTemplateOutlet=\"inputField\"></ng-container>\n <span class=\"form-text\">{{ unitLabel }}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!unitLabel\">\n <ng-container *ngTemplateOutlet=\"inputField\"></ng-container>\n </ng-container>\n </ng-container>\n</div>\n\n<input\n type=\"range\"\n [attr.id]=\"name\"\n [attr.name]=\"name\"\n [attr.min]=\"min\"\n [attr.max]=\"max\"\n [attr.step]=\"step\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n [ngStyle]=\"style\"\n (blur)=\"onBlur()\"\n (input)=\"handleChange()\"\n/>\n\n<p *ngIf=\"!!errorMessage\" class=\"gds-slider-error-info\">\n {{ errorMessage }}\n</p>\n\n<ng-template #inputField>\n <input\n type=\"text\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n [(ngModel)]=\"value\"\n [class.is-invalid]=\"!!errorMessage\"\n [attr.name]=\"name\"\n [attr.id]=\"name + '-textbox'\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-labelledby]=\"name + '-label'\"\n [attr.enterkeyhint]=\"enterkeyhint\"\n [disabled]=\"disabled\"\n (blur)=\"onBlur()\"\n (input)=\"handleChange()\"\n />\n</ng-template>\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { FormsModule } from '@angular/forms'\n\nimport { NggSliderComponent } from './slider.component'\n\n@NgModule({\n imports: [CommonModule, FormsModule],\n exports: [NggSliderComponent],\n declarations: [NggSliderComponent],\n})\nexport class NggSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAiCa,kBAAkB,CAAA;AAZ/B,IAAA,WAAA,GAAA;AAeW,QAAA,IAAA,CAAA,IAAI,GAAG,GAAG,QAAQ,EAAE,SAAS,CAAA;AAC7B,QAAA,IAAG,CAAA,GAAA,GAAG,CAAC,CAAA;AACP,QAAA,IAAG,CAAA,GAAA,GAAG,GAAG,CAAA;AACT,QAAA,IAAI,CAAA,IAAA,GAAG,CAAC,CAAA;AACR,QAAA,IAAK,CAAA,KAAA,GAAG,EAAE,CAAA;AACV,QAAA,IAAW,CAAA,WAAA,GAAG,EAAE,CAAA;AAChB,QAAA,IAAW,CAAA,WAAA,GAAG,EAAE,CAAA;AAChB,QAAA,IAAY,CAAA,YAAA,GAAG,EAAE,CAAA;AACjB,QAAA,IAAU,CAAA,UAAA,GAAG,KAAK,CAAA;AAClB,QAAA,IAAS,CAAA,SAAA,GAAG,IAAI,CAAA;A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CAAA;sBAApB,MAAM;;;ME/CI,eAAe,CAAA;;4GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,iBAFX,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAFvB,YAAY,EAAE,WAAW,aACzB,kBAAkB,CAAA,EAAA,CAAA,CAAA;6GAGjB,eAAe,EAAA,OAAA,EAAA,CAJhB,YAAY,EAAE,WAAW,CAAA,EAAA,CAAA,CAAA;2FAIxB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;oBACpC,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,YAAY,EAAE,CAAC,kBAAkB,CAAC;iBACnC,CAAA;;;ACVD;;AAEG;;;;"}
@@ -1,204 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, Input, Output, ViewChild, NgModule } from '@angular/core';
3
- import * as i2 from '@angular/cdk/drag-drop';
4
- import { moveItemInArray, transferArrayItem, DragDropModule } from '@angular/cdk/drag-drop';
5
- import * as i1 from '@angular/common';
6
- import { CommonModule } from '@angular/common';
7
- import { FormsModule } from '@angular/forms';
8
-
9
- class NggSortableListComponent {
10
- constructor() {
11
- this.groups = [];
12
- this.shouldDisplayCheckboxes = false;
13
- this.isReadOnly = false;
14
- this.isDraggable = true;
15
- this.description = '';
16
- this.suffixTemplate = null;
17
- this.itemSelectionChanged = new EventEmitter();
18
- this.itemOrderChanged = new EventEmitter();
19
- this.focusedIndex = { 0: 0 };
20
- }
21
- /**
22
- * Toggles the selection of a checklist item and updates its position in the list.
23
- *
24
- * @param item - The checklist item to update.
25
- */
26
- toggleSelection(item) {
27
- item.selected = !item.selected;
28
- this.emitCheckListItem(item);
29
- }
30
- /**
31
- * Handles the onDragDrop event.
32
- *
33
- * @param event - The drag and drop event.
34
- */
35
- onDragDrop(event) {
36
- if (event.previousContainer === event.container) {
37
- moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
38
- }
39
- else {
40
- transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
41
- }
42
- this.emitItemOrderChanged([Number(event.previousContainer.id), event.previousIndex], [Number(event.container.id), event.currentIndex]);
43
- }
44
- /**
45
- * Handles moving items up or down using the alt + arrow up or alt + arrow down keys.
46
- *
47
- * @param groupIndex - The index of the group.
48
- * @param currentItemIndex - The current index of the item.
49
- * @param newItemIndex - The new index of the item.
50
- */
51
- onAltArrowKeydown(groupIndex, currentItemIndex, newItemIndex, event) {
52
- event.preventDefault();
53
- let newIndex = newItemIndex;
54
- let newGroupIndex = groupIndex;
55
- let transfer = false;
56
- if (newIndex > this.groups[groupIndex].items.length - 1) {
57
- newIndex = 0;
58
- newGroupIndex = groupIndex + 1;
59
- transfer = true;
60
- this.focusedIndex[groupIndex] = this.groups[groupIndex].items.length - 2;
61
- }
62
- else if (newIndex < 0) {
63
- newGroupIndex = groupIndex - 1;
64
- newIndex = this.groups[newGroupIndex].items.length;
65
- transfer = true;
66
- this.focusedIndex[groupIndex] = 0;
67
- }
68
- if (transfer) {
69
- transferArrayItem(this.groups[groupIndex].items, this.groups[newGroupIndex].items, currentItemIndex, newIndex);
70
- }
71
- else {
72
- moveItemInArray(this.groups[groupIndex].items, currentItemIndex, newIndex);
73
- }
74
- this.emitItemOrderChanged([groupIndex, currentItemIndex], [newGroupIndex, newIndex]);
75
- setTimeout(() => {
76
- this.focusItem(newGroupIndex, newIndex);
77
- });
78
- }
79
- /**
80
- * Handles focus by arrow keydown event.
81
- *
82
- * @param groupIndex - The index of the group.
83
- * @param itemIndex - The index of the item.
84
- * @param event - The keyboard event.
85
- */
86
- onArrowKeydown(groupIndex, itemIndex, event) {
87
- event.preventDefault();
88
- setTimeout(() => {
89
- let gi = groupIndex;
90
- if (itemIndex > this.groups[groupIndex].items.length - 1) {
91
- gi = groupIndex + 1;
92
- itemIndex = 0;
93
- }
94
- if (itemIndex < 0) {
95
- gi = groupIndex - 1;
96
- if (gi < 0) {
97
- return;
98
- }
99
- itemIndex = this.groups[gi].items.length - 1;
100
- }
101
- this.focusItem(gi, itemIndex);
102
- });
103
- }
104
- /**
105
- * Emits the item order changed event.
106
- *
107
- * @param previousIndex - The previous index of the item.
108
- * @param currentIndex - The current index of the item.
109
- */
110
- emitItemOrderChanged(previousIndex, currentIndex) {
111
- this.itemOrderChanged.emit({
112
- previousIndex,
113
- currentIndex,
114
- groups: [...this.groups],
115
- });
116
- }
117
- /**
118
- * Emits the selected checklist item through an event.
119
- *
120
- * @param item - The checklist item to emit.
121
- */
122
- emitCheckListItem(item) {
123
- this.itemSelectionChanged.emit({ changedItem: item, groups: this.groups });
124
- }
125
- /**
126
- * Focuses on a specific item in the sortable list.
127
- *
128
- * @param groupIndex - The index of the group.
129
- * @param itemIndex - The index of the item.
130
- */
131
- focusItem(groupIndex, itemIndex) {
132
- const groupElements = this.sortableListGroups.nativeElement.querySelectorAll('.item-list-group');
133
- if (groupElements && groupElements.length > groupIndex) {
134
- const itemElements = groupElements[groupIndex].querySelectorAll('.item');
135
- if (itemElements && itemElements.length > itemIndex) {
136
- if (this.shouldDisplayCheckboxes) {
137
- itemElements[itemIndex].querySelector('input').focus();
138
- }
139
- else {
140
- itemElements[itemIndex].focus();
141
- }
142
- this.focusedIndex[groupIndex] = itemIndex;
143
- }
144
- }
145
- }
146
- /**
147
- * Checks if an item has focus.
148
- *
149
- * @param groupIndex - The index of the group.
150
- * @param itemIndex - The index of the item.
151
- */
152
- itemHasFocus(groupIndex, itemIndex) {
153
- if (!this.focusedIndex[groupIndex]) {
154
- this.focusedIndex[groupIndex] = 0;
155
- }
156
- return this.focusedIndex[groupIndex] === itemIndex;
157
- }
158
- }
159
- NggSortableListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
160
- NggSortableListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggSortableListComponent, selector: "ngg-sortable-list", inputs: { groups: "groups", shouldDisplayCheckboxes: "shouldDisplayCheckboxes", isReadOnly: "isReadOnly", isDraggable: "isDraggable", description: "description", suffixTemplate: "suffixTemplate" }, outputs: { itemSelectionChanged: "itemSelectionChanged", itemOrderChanged: "itemOrderChanged" }, viewQueries: [{ propertyName: "sortableListGroups", first: true, predicate: ["sortableListGroups"], descendants: true }], ngImport: i0, template: "<div class=\"item-list\">\n <ng-container>\n <p class=\"item-list-header\">\n <span class=\"item-list-header-title\">{{ description }}</span>\n </p>\n <div #sortableListGroups cdkDropListGroup>\n <div\n *ngFor=\"let group of groups; let g_i = index\"\n class=\"item-list-group\"\n [class.drag-enabled]=\"isDraggable && !isReadOnly\"\n role=\"list\"\n cdkDropList\n [cdkDropListData]=\"group.items\"\n [id]=\"g_i.toString()\"\n (cdkDropListDropped)=\"onDragDrop($event)\"\n >\n <p\n *ngIf=\"group.title && group.title.length > 0\"\n class=\"item-list-header\"\n >\n <span class=\"item-list-header-title\">{{ group.title }}</span>\n </p>\n <p\n *ngIf=\"group.description && group.description.length > 0\"\n class=\"item-list-header-description\"\n >\n {{ group.description }}\n </p>\n <div\n *ngFor=\"let checklistItem of group.items; let i = index\"\n [cdkDragDisabled]=\"!isDraggable || isReadOnly\"\n [cdkDragData]=\"checklistItem\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n class=\"item-box\"\n role=\"listitem\"\n >\n <div *cdkDragPlaceholder class=\"item-custom-placeholder\"></div>\n <label\n (keydown.alt.arrowDown)=\"onAltArrowKeydown(g_i, i, i + 1, $event)\"\n (keydown.alt.arrowUp)=\"onAltArrowKeydown(g_i, i, i - 1, $event)\"\n (keydown.arrowDown)=\"onArrowKeydown(g_i, i + 1, $event)\"\n (keydown.arrowUp)=\"onArrowKeydown(g_i, i - 1, $event)\"\n class=\"form-control item-control align-items-center item\"\n [tabindex]=\"shouldDisplayCheckboxes ? '-1' : '0'\"\n >\n <div class=\"form-control\">\n <input\n (change)=\"toggleSelection(checklistItem)\"\n [checked]=\"checklistItem.selected\"\n [disabled]=\"isReadOnly\"\n [type]=\"shouldDisplayCheckboxes ? 'checkbox' : 'hidden'\"\n />\n <div class=\"item-box-title\">\n <span name=\"agendaItemName\"\n >{{ checklistItem.name }}\n <span\n *ngIf=\"checklistItem.hasCustomSuffix\"\n class=\"item-list-suffix\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n suffixTemplate;\n context: { $implicit: checklistItem }\n \"\n class=\"user-icon\"\n >\n </ng-container>\n </span>\n </span>\n <br />\n <span *ngIf=\"!!checklistItem.description\">\n <span class=\"item-list-suffix\" name=\"agendaItemToolTip\">\n {{ checklistItem.description }}\n </span>\n <br />\n </span>\n </div>\n <i></i>\n </div>\n <div *ngIf=\"isDraggable && !isReadOnly\" class=\"item-grip-icon\">\n <i class=\"sg-icon sg-icon-grip-vertical text-primary\"></i>\n </div>\n </label>\n </div>\n </div>\n </div>\n </ng-container>\n</div>\n", styles: [".item-list{width:100%;display:block}label.item{padding:0!important}.item-box{background-color:var(--sg-card-background);color:var(--text-primary-color);display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;font-size:14px;margin:5px 0;border:1px solid var(--border-color);border-radius:4px}.form-control{line-height:20px;font-size:16px;font-weight:500}.item-list-header{display:flex;flex-direction:row;justify-content:space-between;margin-bottom:1rem}.item-list-header-title{font-weight:600;font-size:1rem;line-height:1.25rem;font-style:normal}.item-list-header-subtitle{font-size:.75rem;color:var(--text-primary-color);display:flex;justify-content:center;align-content:center}.item-list-suffix{font-weight:400;font-size:.85rem}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.item-grip-icon{font-weight:400;padding:.75rem 1rem .75rem 0rem}.cdk-drop-list.cdk-drop-list-dragging{cursor:grabbing!important;pointer-events:all!important}.item-custom-placeholder.cdk-drag-placeholder{pointer-events:all!important}.cdk-drop-list.drag-enabled:not(.cdk-drag-placeholder) label{cursor:grab}.cdk-drop-list label:focus-visible{outline-color:#333;outline-offset:4px}.item-list.cdk-drop-list-dragging .item-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1);pointer-events:all!important}.item-custom-placeholder{border:dotted 1px #999;min-height:44px;transition:transform .25s cubic-bezier(0,0,.2,1);border-radius:4px;margin:5px 0;padding:12px 12px 12px 16px}.user-icon{margin-right:.5rem}.item-control{width:100%;display:flex;flex-direction:row;justify-content:space-between}.form-control.item-layout{display:flex;justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "directive", type: i2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }] });
161
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListComponent, decorators: [{
162
- type: Component,
163
- args: [{ selector: 'ngg-sortable-list', template: "<div class=\"item-list\">\n <ng-container>\n <p class=\"item-list-header\">\n <span class=\"item-list-header-title\">{{ description }}</span>\n </p>\n <div #sortableListGroups cdkDropListGroup>\n <div\n *ngFor=\"let group of groups; let g_i = index\"\n class=\"item-list-group\"\n [class.drag-enabled]=\"isDraggable && !isReadOnly\"\n role=\"list\"\n cdkDropList\n [cdkDropListData]=\"group.items\"\n [id]=\"g_i.toString()\"\n (cdkDropListDropped)=\"onDragDrop($event)\"\n >\n <p\n *ngIf=\"group.title && group.title.length > 0\"\n class=\"item-list-header\"\n >\n <span class=\"item-list-header-title\">{{ group.title }}</span>\n </p>\n <p\n *ngIf=\"group.description && group.description.length > 0\"\n class=\"item-list-header-description\"\n >\n {{ group.description }}\n </p>\n <div\n *ngFor=\"let checklistItem of group.items; let i = index\"\n [cdkDragDisabled]=\"!isDraggable || isReadOnly\"\n [cdkDragData]=\"checklistItem\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n class=\"item-box\"\n role=\"listitem\"\n >\n <div *cdkDragPlaceholder class=\"item-custom-placeholder\"></div>\n <label\n (keydown.alt.arrowDown)=\"onAltArrowKeydown(g_i, i, i + 1, $event)\"\n (keydown.alt.arrowUp)=\"onAltArrowKeydown(g_i, i, i - 1, $event)\"\n (keydown.arrowDown)=\"onArrowKeydown(g_i, i + 1, $event)\"\n (keydown.arrowUp)=\"onArrowKeydown(g_i, i - 1, $event)\"\n class=\"form-control item-control align-items-center item\"\n [tabindex]=\"shouldDisplayCheckboxes ? '-1' : '0'\"\n >\n <div class=\"form-control\">\n <input\n (change)=\"toggleSelection(checklistItem)\"\n [checked]=\"checklistItem.selected\"\n [disabled]=\"isReadOnly\"\n [type]=\"shouldDisplayCheckboxes ? 'checkbox' : 'hidden'\"\n />\n <div class=\"item-box-title\">\n <span name=\"agendaItemName\"\n >{{ checklistItem.name }}\n <span\n *ngIf=\"checklistItem.hasCustomSuffix\"\n class=\"item-list-suffix\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n suffixTemplate;\n context: { $implicit: checklistItem }\n \"\n class=\"user-icon\"\n >\n </ng-container>\n </span>\n </span>\n <br />\n <span *ngIf=\"!!checklistItem.description\">\n <span class=\"item-list-suffix\" name=\"agendaItemToolTip\">\n {{ checklistItem.description }}\n </span>\n <br />\n </span>\n </div>\n <i></i>\n </div>\n <div *ngIf=\"isDraggable && !isReadOnly\" class=\"item-grip-icon\">\n <i class=\"sg-icon sg-icon-grip-vertical text-primary\"></i>\n </div>\n </label>\n </div>\n </div>\n </div>\n </ng-container>\n</div>\n", styles: [".item-list{width:100%;display:block}label.item{padding:0!important}.item-box{background-color:var(--sg-card-background);color:var(--text-primary-color);display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;font-size:14px;margin:5px 0;border:1px solid var(--border-color);border-radius:4px}.form-control{line-height:20px;font-size:16px;font-weight:500}.item-list-header{display:flex;flex-direction:row;justify-content:space-between;margin-bottom:1rem}.item-list-header-title{font-weight:600;font-size:1rem;line-height:1.25rem;font-style:normal}.item-list-header-subtitle{font-size:.75rem;color:var(--text-primary-color);display:flex;justify-content:center;align-content:center}.item-list-suffix{font-weight:400;font-size:.85rem}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.item-grip-icon{font-weight:400;padding:.75rem 1rem .75rem 0rem}.cdk-drop-list.cdk-drop-list-dragging{cursor:grabbing!important;pointer-events:all!important}.item-custom-placeholder.cdk-drag-placeholder{pointer-events:all!important}.cdk-drop-list.drag-enabled:not(.cdk-drag-placeholder) label{cursor:grab}.cdk-drop-list label:focus-visible{outline-color:#333;outline-offset:4px}.item-list.cdk-drop-list-dragging .item-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1);pointer-events:all!important}.item-custom-placeholder{border:dotted 1px #999;min-height:44px;transition:transform .25s cubic-bezier(0,0,.2,1);border-radius:4px;margin:5px 0;padding:12px 12px 12px 16px}.user-icon{margin-right:.5rem}.item-control{width:100%;display:flex;flex-direction:row;justify-content:space-between}.form-control.item-layout{display:flex;justify-content:space-between}\n"] }]
164
- }], propDecorators: { groups: [{
165
- type: Input
166
- }], shouldDisplayCheckboxes: [{
167
- type: Input
168
- }], isReadOnly: [{
169
- type: Input
170
- }], isDraggable: [{
171
- type: Input
172
- }], description: [{
173
- type: Input
174
- }], suffixTemplate: [{
175
- type: Input
176
- }], itemSelectionChanged: [{
177
- type: Output
178
- }], itemOrderChanged: [{
179
- type: Output
180
- }], sortableListGroups: [{
181
- type: ViewChild,
182
- args: ['sortableListGroups']
183
- }] } });
184
-
185
- class NggSortableListModule {
186
- }
187
- NggSortableListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
188
- NggSortableListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListModule, declarations: [NggSortableListComponent], imports: [CommonModule, FormsModule, DragDropModule], exports: [NggSortableListComponent] });
189
- NggSortableListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListModule, imports: [CommonModule, FormsModule, DragDropModule] });
190
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListModule, decorators: [{
191
- type: NgModule,
192
- args: [{
193
- imports: [CommonModule, FormsModule, DragDropModule],
194
- exports: [NggSortableListComponent],
195
- declarations: [NggSortableListComponent],
196
- }]
197
- }] });
198
-
199
- /**
200
- * Generated bundle index. Do not edit.
201
- */
202
-
203
- export { NggSortableListComponent, NggSortableListModule };
204
- //# sourceMappingURL=sebgroup-green-angular-src-lib-sortable-list.mjs.map