design-angular-kit 1.2.0 → 1.2.1

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 (545) hide show
  1. package/.eslintrc.json +31 -0
  2. package/karma.conf.js +38 -0
  3. package/ng-package.json +9 -0
  4. package/ng-package.prod.json +8 -0
  5. package/package.json +9 -14
  6. package/schematics/ng-add/index.spec.ts +45 -0
  7. package/schematics/ng-add/index.ts +36 -0
  8. package/schematics/ng-add/rules/setup-project/add-animations.ts +7 -0
  9. package/schematics/ng-add/rules/setup-project/add-assets.ts +45 -0
  10. package/schematics/ng-add/rules/setup-project/add-design-angular-kit.ts +40 -0
  11. package/schematics/ng-add/rules/setup-project/add-http-client.ts +7 -0
  12. package/schematics/ng-add/rules/setup-project/add-import-to-style-file.ts +120 -0
  13. package/schematics/ng-add/rules/setup-project/add-localisation.ts +45 -0
  14. package/schematics/ng-add/rules/setup-project/angular-json-helper.ts +11 -0
  15. package/schematics/ng-add/rules/setup-project/exceptions.ts +13 -0
  16. package/schematics/ng-add/{schema.d.ts → schema.ts} +1 -1
  17. package/schematics/ng-add/setup-project.spec.ts +166 -0
  18. package/schematics/ng-add/setup-project.ts +31 -0
  19. package/schematics/ng-add/utils.ts +71 -0
  20. package/schematics/ng-add/versions-helper.ts +41 -0
  21. package/src/lib/abstracts/abstract-form.component.ts +200 -0
  22. package/src/lib/abstracts/abstract.component.ts +63 -0
  23. package/src/lib/components/core/accordion/accordion.component.html +27 -0
  24. package/src/lib/components/core/accordion/accordion.component.spec.ts +21 -0
  25. package/src/lib/components/core/accordion/accordion.component.ts +40 -0
  26. package/src/lib/components/core/alert/alert.component.html +19 -0
  27. package/src/lib/components/core/alert/alert.component.scss +3 -0
  28. package/src/lib/components/core/alert/alert.component.spec.ts +62 -0
  29. package/src/lib/components/core/alert/alert.component.ts +75 -0
  30. package/src/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.html +23 -0
  31. package/src/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.scss +17 -0
  32. package/src/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.spec.ts +21 -0
  33. package/src/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.ts +50 -0
  34. package/src/lib/components/core/avatar/avatar-group/avatar-group.component.html +7 -0
  35. package/src/lib/components/core/avatar/avatar-group/avatar-group.component.spec.ts +38 -0
  36. package/src/lib/components/core/avatar/avatar-group/avatar-group.component.ts +25 -0
  37. package/src/lib/components/core/avatar/avatar.directive.ts +73 -0
  38. package/src/lib/components/core/avatar/avatar.module.ts +18 -0
  39. package/src/lib/components/core/badge/badge.directive.spec.ts +59 -0
  40. package/src/lib/components/core/badge/badge.directive.ts +39 -0
  41. package/src/lib/components/core/button/button.directive.spec.ts +96 -0
  42. package/src/lib/components/core/button/button.directive.ts +89 -0
  43. package/src/lib/components/core/callout/callout.component.html +25 -0
  44. package/src/lib/components/core/callout/callout.component.spec.ts +138 -0
  45. package/src/lib/components/core/callout/callout.component.ts +92 -0
  46. package/src/lib/components/core/card/card.component.html +35 -0
  47. package/src/lib/components/core/card/card.component.scss +30 -0
  48. package/src/lib/components/core/card/card.component.spec.ts +21 -0
  49. package/src/lib/components/core/card/card.component.ts +78 -0
  50. package/src/lib/components/core/carousel/carousel/carousel.component.html +29 -0
  51. package/src/lib/components/core/carousel/carousel/carousel.component.scss +1 -0
  52. package/src/lib/components/core/carousel/carousel/carousel.component.spec.ts +21 -0
  53. package/src/lib/components/core/carousel/carousel/carousel.component.ts +119 -0
  54. package/src/lib/components/core/carousel/carousel-item/carousel-item.component.html +3 -0
  55. package/src/lib/components/core/carousel/carousel-item/carousel-item.component.spec.ts +22 -0
  56. package/src/lib/components/core/carousel/carousel-item/carousel-item.component.ts +20 -0
  57. package/src/lib/components/core/carousel/carousel.module.ts +11 -0
  58. package/src/lib/components/core/chip/chip.component.html +26 -0
  59. package/src/lib/components/core/chip/chip.component.spec.ts +87 -0
  60. package/src/lib/components/core/chip/chip.component.ts +154 -0
  61. package/src/lib/components/core/collapse/collapse.component.html +3 -0
  62. package/src/lib/components/core/collapse/collapse.component.spec.ts +21 -0
  63. package/src/lib/components/core/collapse/collapse.component.ts +124 -0
  64. package/src/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.html +3 -0
  65. package/src/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.spec.ts +35 -0
  66. package/src/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.ts +23 -0
  67. package/src/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.html +3 -0
  68. package/src/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.spec.ts +22 -0
  69. package/src/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.ts +10 -0
  70. package/src/lib/components/core/dimmer/dimmer.component.html +7 -0
  71. package/src/lib/components/core/dimmer/dimmer.component.spec.ts +49 -0
  72. package/src/lib/components/core/dimmer/dimmer.component.ts +50 -0
  73. package/src/lib/components/core/dimmer/dimmer.module.ts +12 -0
  74. package/src/lib/components/core/dropdown/dropdown/dropdown.component.html +45 -0
  75. package/src/lib/components/core/dropdown/dropdown/dropdown.component.scss +3 -0
  76. package/src/lib/components/core/dropdown/dropdown/dropdown.component.spec.ts +21 -0
  77. package/src/lib/components/core/dropdown/dropdown/dropdown.component.ts +186 -0
  78. package/src/lib/components/core/dropdown/dropdown-item/dropdown-item.component.html +18 -0
  79. package/src/lib/components/core/dropdown/dropdown-item/dropdown-item.component.scss +4 -0
  80. package/src/lib/components/core/dropdown/dropdown-item/dropdown-item.component.spec.ts +21 -0
  81. package/src/lib/components/core/dropdown/dropdown-item/dropdown-item.component.ts +82 -0
  82. package/src/lib/components/core/dropdown/dropdown.module.ts +11 -0
  83. package/src/lib/components/core/forward/forward.directive.spec.ts +60 -0
  84. package/src/lib/components/core/forward/forward.directive.ts +43 -0
  85. package/src/lib/components/core/link/link.component.html +13 -0
  86. package/src/lib/components/core/link/link.component.spec.ts +21 -0
  87. package/src/lib/components/core/link/link.component.ts +54 -0
  88. package/src/lib/components/core/list/list/list.component.html +13 -0
  89. package/src/lib/components/core/list/list/list.component.spec.ts +21 -0
  90. package/src/lib/components/core/list/list/list.component.ts +30 -0
  91. package/src/lib/components/core/list/list-item/list-item.component.html +42 -0
  92. package/src/lib/components/core/list/list-item/list-item.component.scss +16 -0
  93. package/src/lib/components/core/list/list-item/list-item.component.spec.ts +21 -0
  94. package/src/lib/components/core/list/list-item/list-item.component.ts +75 -0
  95. package/src/lib/components/core/list/list.module.ts +11 -0
  96. package/src/lib/components/core/modal/modal.component.html +36 -0
  97. package/src/lib/components/core/modal/modal.component.scss +3 -0
  98. package/src/lib/components/core/modal/modal.component.spec.ts +21 -0
  99. package/src/lib/components/core/modal/modal.component.ts +218 -0
  100. package/src/lib/components/core/notifications/notifications.component.html +25 -0
  101. package/src/lib/components/core/notifications/notifications.component.scss +3 -0
  102. package/src/lib/components/core/notifications/notifications.component.spec.ts +21 -0
  103. package/src/lib/components/core/notifications/notifications.component.ts +123 -0
  104. package/src/lib/components/core/pagination/pagination.component.html +107 -0
  105. package/src/lib/components/core/pagination/pagination.component.spec.ts +21 -0
  106. package/src/lib/components/core/pagination/pagination.component.ts +157 -0
  107. package/src/lib/components/core/popover/popover.directive.spec.ts +21 -0
  108. package/src/lib/components/core/popover/popover.directive.ts +171 -0
  109. package/src/lib/components/core/progress-bar/progress-bar.component.html +20 -0
  110. package/src/lib/components/core/progress-bar/progress-bar.component.spec.ts +21 -0
  111. package/src/lib/components/core/progress-bar/progress-bar.component.ts +46 -0
  112. package/src/lib/components/core/progress-button/progress-button.component.html +5 -0
  113. package/src/lib/components/core/progress-button/progress-button.component.spec.ts +21 -0
  114. package/src/lib/components/core/progress-button/progress-button.component.ts +39 -0
  115. package/src/lib/components/core/spinner/spinner.component.html +7 -0
  116. package/src/lib/components/core/spinner/spinner.component.spec.ts +80 -0
  117. package/src/lib/components/core/spinner/spinner.component.ts +31 -0
  118. package/src/lib/components/core/steppers/steppers-container/steppers-container.component.html +126 -0
  119. package/src/lib/components/core/steppers/steppers-container/steppers-container.component.spec.ts +21 -0
  120. package/src/lib/components/core/steppers/steppers-container/steppers-container.component.ts +185 -0
  121. package/src/lib/components/core/steppers/steppers-item/steppers-item.component.html +3 -0
  122. package/src/lib/components/core/steppers/steppers-item/steppers-item.component.spec.ts +22 -0
  123. package/src/lib/components/core/steppers/steppers-item/steppers-item.component.ts +33 -0
  124. package/src/lib/components/core/steppers/steppers.module.ts +11 -0
  125. package/src/lib/components/core/tab/tab-container/tab-container.component.html +78 -0
  126. package/src/lib/components/core/tab/tab-container/tab-container.component.spec.ts +21 -0
  127. package/src/lib/components/core/tab/tab-container/tab-container.component.ts +137 -0
  128. package/src/lib/components/core/tab/tab-item/tab-item.component.html +3 -0
  129. package/src/lib/components/core/tab/tab-item/tab-item.component.spec.ts +22 -0
  130. package/src/lib/components/core/tab/tab-item/tab-item.component.ts +50 -0
  131. package/src/lib/components/core/tab/tab.module.ts +11 -0
  132. package/src/lib/components/core/table/sort/sort-header/sort-header.component.html +27 -0
  133. package/src/lib/components/core/table/sort/sort-header/sort-header.component.scss +65 -0
  134. package/src/lib/components/core/table/sort/sort-header/sort-header.component.spec.ts +25 -0
  135. package/src/lib/components/core/table/sort/sort-header/sort-header.component.ts +164 -0
  136. package/src/lib/components/core/table/sort/sort.directive.spec.ts +73 -0
  137. package/src/lib/components/core/table/sort/sort.directive.ts +142 -0
  138. package/src/lib/components/core/table/table.component.html +23 -0
  139. package/src/lib/components/core/table/table.component.scss +7 -0
  140. package/src/lib/components/core/table/table.component.spec.ts +21 -0
  141. package/src/lib/components/core/table/table.component.ts +70 -0
  142. package/src/lib/components/core/table/table.module.ts +12 -0
  143. package/src/lib/components/core/timeline/timeline-item/timeline-item.component.html +47 -0
  144. package/src/lib/components/core/timeline/timeline-item/timeline-item.component.spec.ts +24 -0
  145. package/src/lib/components/core/timeline/timeline-item/timeline-item.component.ts +102 -0
  146. package/src/lib/components/core/timeline/timeline.component.html +21 -0
  147. package/src/lib/components/core/timeline/timeline.component.spec.ts +21 -0
  148. package/src/lib/components/core/timeline/timeline.component.ts +31 -0
  149. package/src/lib/components/core/timeline/timeline.module.ts +11 -0
  150. package/src/lib/components/core/tooltip/tooltip.directive.spec.ts +20 -0
  151. package/src/lib/components/core/tooltip/tooltip.directive.ts +141 -0
  152. package/src/lib/components/form/autocomplete/autocomplete.component.html +58 -0
  153. package/src/lib/components/form/autocomplete/autocomplete.component.spec.ts +21 -0
  154. package/src/lib/components/form/autocomplete/autocomplete.component.ts +130 -0
  155. package/src/lib/components/form/checkbox/checkbox.component.html +67 -0
  156. package/src/lib/components/form/checkbox/checkbox.component.spec.ts +21 -0
  157. package/src/lib/components/form/checkbox/checkbox.component.ts +65 -0
  158. package/src/lib/components/form/form.module.ts +34 -0
  159. package/src/lib/components/form/input/input.component.html +92 -0
  160. package/src/lib/components/form/input/input.component.scss +29 -0
  161. package/src/lib/components/form/input/input.component.spec.ts +21 -0
  162. package/src/lib/components/form/input/input.component.ts +234 -0
  163. package/src/lib/components/form/password-input/password-input.component.html +65 -0
  164. package/src/lib/components/form/password-input/password-input.component.scss +9 -0
  165. package/src/lib/components/form/password-input/password-input.component.spec.ts +21 -0
  166. package/src/lib/components/form/password-input/password-input.component.ts +171 -0
  167. package/src/lib/components/form/radio-button/radio-button.component.html +50 -0
  168. package/src/lib/components/form/radio-button/radio-button.component.scss +14 -0
  169. package/src/lib/components/form/radio-button/radio-button.component.spec.ts +21 -0
  170. package/src/lib/components/form/radio-button/radio-button.component.ts +82 -0
  171. package/src/lib/components/form/range/range.component.html +17 -0
  172. package/src/lib/components/form/range/range.component.scss +17 -0
  173. package/src/lib/components/form/range/range.component.spec.ts +21 -0
  174. package/src/lib/components/form/range/range.component.ts +100 -0
  175. package/src/lib/components/form/rating/rating.component.html +24 -0
  176. package/src/lib/components/form/rating/rating.component.spec.ts +21 -0
  177. package/src/lib/components/form/rating/rating.component.ts +52 -0
  178. package/src/lib/components/form/select/select.component.html +54 -0
  179. package/src/lib/components/form/select/select.component.scss +3 -0
  180. package/src/lib/components/form/select/select.component.spec.ts +22 -0
  181. package/src/lib/components/form/select/select.component.ts +91 -0
  182. package/src/lib/components/form/textarea/textarea.component.html +28 -0
  183. package/src/lib/components/form/textarea/textarea.component.scss +12 -0
  184. package/src/lib/components/form/textarea/textarea.component.spec.ts +21 -0
  185. package/src/lib/components/form/textarea/textarea.component.ts +61 -0
  186. package/src/lib/components/form/transfer/store/transfer.reducers.ts +242 -0
  187. package/src/lib/components/form/transfer/store/transfer.state.ts +20 -0
  188. package/src/lib/components/form/transfer/store/transfer.store.ts +88 -0
  189. package/src/lib/components/form/transfer/transfer-list/transfer-list.component.html +42 -0
  190. package/src/lib/components/form/transfer/transfer-list/transfer-list.component.spec.ts +33 -0
  191. package/src/lib/components/form/transfer/transfer-list/transfer-list.component.ts +93 -0
  192. package/src/lib/components/form/transfer/transfer.component.html +52 -0
  193. package/src/lib/components/form/transfer/transfer.component.spec.ts +27 -0
  194. package/src/lib/components/form/transfer/transfer.component.ts +159 -0
  195. package/{lib/components/form/transfer/transfer.model.d.ts → src/lib/components/form/transfer/transfer.model.ts} +9 -2
  196. package/src/lib/components/form/upload-drag-drop/upload-drag-drop.component.html +36 -0
  197. package/src/lib/components/form/upload-drag-drop/upload-drag-drop.component.spec.ts +21 -0
  198. package/src/lib/components/form/upload-drag-drop/upload-drag-drop.component.ts +170 -0
  199. package/src/lib/components/form/upload-file-list/upload-file-list.component.html +46 -0
  200. package/src/lib/components/form/upload-file-list/upload-file-list.component.spec.ts +22 -0
  201. package/src/lib/components/form/upload-file-list/upload-file-list.component.ts +120 -0
  202. package/src/lib/components/navigation/back-button/back-button.component.html +25 -0
  203. package/src/lib/components/navigation/back-button/back-button.component.spec.ts +91 -0
  204. package/src/lib/components/navigation/back-button/back-button.component.ts +67 -0
  205. package/src/lib/components/navigation/back-to-top/back-to-top.component.html +11 -0
  206. package/src/lib/components/navigation/back-to-top/back-to-top.component.spec.ts +21 -0
  207. package/src/lib/components/navigation/back-to-top/back-to-top.component.ts +80 -0
  208. package/src/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.html +23 -0
  209. package/src/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.spec.ts +21 -0
  210. package/src/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.ts +68 -0
  211. package/src/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.html +3 -0
  212. package/src/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.spec.ts +22 -0
  213. package/src/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.ts +29 -0
  214. package/src/lib/components/navigation/breadcrumbs/breadcrumbs.module.ts +11 -0
  215. package/src/lib/components/navigation/header/header.component.html +102 -0
  216. package/src/lib/components/navigation/header/header.component.scss +3 -0
  217. package/src/lib/components/navigation/header/header.component.spec.ts +21 -0
  218. package/src/lib/components/navigation/header/header.component.ts +107 -0
  219. package/src/lib/components/navigation/megamenu/megamenu.component.html +34 -0
  220. package/src/lib/components/navigation/megamenu/megamenu.component.scss +5 -0
  221. package/src/lib/components/navigation/megamenu/megamenu.component.ts +30 -0
  222. package/src/lib/components/navigation/navbar/navbar/navbar.component.html +28 -0
  223. package/src/lib/components/navigation/navbar/navbar/navbar.component.ts +45 -0
  224. package/src/lib/components/navigation/navbar/navbar-item/navbar-item.component.html +3 -0
  225. package/src/lib/components/navigation/navbar/navbar-item/navbar-item.component.ts +10 -0
  226. package/src/lib/components/navigation/navbar/navbar.module.ts +11 -0
  227. package/src/lib/components/navigation/navscroll/navscroll-list-item.component.ts +95 -0
  228. package/src/lib/components/navigation/navscroll/navscroll-list-items.component.ts +27 -0
  229. package/src/lib/components/navigation/navscroll/navscroll.component.html +101 -0
  230. package/src/lib/components/navigation/navscroll/navscroll.component.scss +9 -0
  231. package/src/lib/components/navigation/navscroll/navscroll.component.ts +143 -0
  232. package/{lib/components/navigation/navscroll/navscroll.model.d.ts → src/lib/components/navigation/navscroll/navscroll.model.ts} +7 -5
  233. package/src/lib/components/navigation/navscroll/navscroll.store.ts +96 -0
  234. package/src/lib/components/navigation/navscroll/navscroll.utils.ts +28 -0
  235. package/src/lib/components/navigation/sidebar/sidebar.component.html +11 -0
  236. package/src/lib/components/navigation/sidebar/sidebar.component.spec.ts +21 -0
  237. package/src/lib/components/navigation/sidebar/sidebar.component.ts +39 -0
  238. package/src/lib/components/navigation/skiplink/skiplink/skiplink.component.html +15 -0
  239. package/src/lib/components/navigation/skiplink/skiplink/skiplink.component.ts +27 -0
  240. package/src/lib/components/navigation/skiplink/skiplink-item/skiplink-item.component.html +15 -0
  241. package/src/lib/components/navigation/skiplink/skiplink-item/skiplink-item.component.ts +38 -0
  242. package/src/lib/components/navigation/skiplink/skiplink.module.ts +11 -0
  243. package/src/lib/components/utils/error-page/error-page.component.html +33 -0
  244. package/src/lib/components/utils/error-page/error-page.component.spec.ts +21 -0
  245. package/src/lib/components/utils/error-page/error-page.component.ts +79 -0
  246. package/src/lib/components/utils/icon/icon.component.html +6 -0
  247. package/src/lib/components/utils/icon/icon.component.spec.ts +21 -0
  248. package/src/lib/components/utils/icon/icon.component.ts +95 -0
  249. package/src/lib/components/utils/language-switcher/language-switcher.component.html +21 -0
  250. package/src/lib/components/utils/language-switcher/language-switcher.component.spec.ts +21 -0
  251. package/src/lib/components/utils/language-switcher/language-switcher.component.ts +56 -0
  252. package/src/lib/design-angular-kit.module.ts +131 -0
  253. package/src/lib/enums/colors.enums.ts +10 -0
  254. package/src/lib/enums/sizes.enum.ts +7 -0
  255. package/{lib/interfaces/core.d.ts → src/lib/interfaces/core.ts} +95 -53
  256. package/src/lib/interfaces/design-angular-kit-config.ts +34 -0
  257. package/src/lib/interfaces/form.ts +78 -0
  258. package/src/lib/interfaces/icon.ts +176 -0
  259. package/src/lib/interfaces/sortable-table.ts +42 -0
  260. package/src/lib/interfaces/utils.ts +11 -0
  261. package/src/lib/pipes/date-ago.pipe.ts +57 -0
  262. package/src/lib/pipes/duration.pipe.ts +112 -0
  263. package/src/lib/pipes/mark-matching-text.pipe.ts +43 -0
  264. package/src/lib/provide-design-angular-kit.ts +73 -0
  265. package/src/lib/services/notification/notification.service.spec.ts +16 -0
  266. package/src/lib/services/notification/notification.service.ts +119 -0
  267. package/{lib/utils/coercion.d.ts → src/lib/utils/coercion.ts} +7 -1
  268. package/src/lib/utils/date-utils.ts +184 -0
  269. package/src/lib/utils/file-utils.ts +80 -0
  270. package/src/lib/utils/regex.ts +44 -0
  271. package/src/lib/validators/it-validators.ts +193 -0
  272. package/{public_api.d.ts → src/public_api.ts} +43 -0
  273. package/src/test.ts +26 -0
  274. package/tsconfig.lib.json +24 -0
  275. package/tsconfig.lib.prod.json +9 -0
  276. package/tsconfig.schematics.json +25 -0
  277. package/tsconfig.spec.json +9 -0
  278. package/esm2022/design-angular-kit.mjs +0 -5
  279. package/esm2022/lib/abstracts/abstract-form.component.mjs +0 -186
  280. package/esm2022/lib/abstracts/abstract.component.mjs +0 -46
  281. package/esm2022/lib/components/core/accordion/accordion.component.mjs +0 -39
  282. package/esm2022/lib/components/core/alert/alert.component.mjs +0 -71
  283. package/esm2022/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.mjs +0 -43
  284. package/esm2022/lib/components/core/avatar/avatar-group/avatar-group.component.mjs +0 -40
  285. package/esm2022/lib/components/core/avatar/avatar.directive.mjs +0 -78
  286. package/esm2022/lib/components/core/avatar/avatar.module.mjs +0 -33
  287. package/esm2022/lib/components/core/badge/badge.directive.mjs +0 -39
  288. package/esm2022/lib/components/core/button/button.directive.mjs +0 -80
  289. package/esm2022/lib/components/core/callout/callout.component.mjs +0 -64
  290. package/esm2022/lib/components/core/card/card.component.mjs +0 -59
  291. package/esm2022/lib/components/core/carousel/carousel/carousel.component.mjs +0 -84
  292. package/esm2022/lib/components/core/carousel/carousel-item/carousel-item.component.mjs +0 -19
  293. package/esm2022/lib/components/core/carousel/carousel.module.mjs +0 -18
  294. package/esm2022/lib/components/core/chip/chip.component.mjs +0 -136
  295. package/esm2022/lib/components/core/collapse/collapse.component.mjs +0 -116
  296. package/esm2022/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.mjs +0 -27
  297. package/esm2022/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.mjs +0 -11
  298. package/esm2022/lib/components/core/dimmer/dimmer.component.mjs +0 -55
  299. package/esm2022/lib/components/core/dimmer/dimmer.module.mjs +0 -19
  300. package/esm2022/lib/components/core/dropdown/dropdown/dropdown.component.mjs +0 -144
  301. package/esm2022/lib/components/core/dropdown/dropdown-item/dropdown-item.component.mjs +0 -61
  302. package/esm2022/lib/components/core/dropdown/dropdown.module.mjs +0 -18
  303. package/esm2022/lib/components/core/forward/forward.directive.mjs +0 -57
  304. package/esm2022/lib/components/core/link/link.component.mjs +0 -42
  305. package/esm2022/lib/components/core/list/list/list.component.mjs +0 -22
  306. package/esm2022/lib/components/core/list/list-item/list-item.component.mjs +0 -56
  307. package/esm2022/lib/components/core/list/list.module.mjs +0 -18
  308. package/esm2022/lib/components/core/modal/modal.component.mjs +0 -194
  309. package/esm2022/lib/components/core/notifications/notifications.component.mjs +0 -111
  310. package/esm2022/lib/components/core/pagination/pagination.component.mjs +0 -130
  311. package/esm2022/lib/components/core/popover/popover.directive.mjs +0 -176
  312. package/esm2022/lib/components/core/progress-bar/progress-bar.component.mjs +0 -34
  313. package/esm2022/lib/components/core/progress-button/progress-button.component.mjs +0 -25
  314. package/esm2022/lib/components/core/spinner/spinner.component.mjs +0 -30
  315. package/esm2022/lib/components/core/steppers/steppers-container/steppers-container.component.mjs +0 -116
  316. package/esm2022/lib/components/core/steppers/steppers-item/steppers-item.component.mjs +0 -22
  317. package/esm2022/lib/components/core/steppers/steppers.module.mjs +0 -18
  318. package/esm2022/lib/components/core/tab/tab-container/tab-container.component.mjs +0 -97
  319. package/esm2022/lib/components/core/tab/tab-item/tab-item.component.mjs +0 -39
  320. package/esm2022/lib/components/core/tab/tab.module.mjs +0 -18
  321. package/esm2022/lib/components/core/table/sort/sort-header/sort-header.component.mjs +0 -134
  322. package/esm2022/lib/components/core/table/sort/sort.directive.mjs +0 -123
  323. package/esm2022/lib/components/core/table/table.component.mjs +0 -45
  324. package/esm2022/lib/components/core/table/table.module.mjs +0 -19
  325. package/esm2022/lib/components/core/timeline/timeline-item/timeline-item.component.mjs +0 -90
  326. package/esm2022/lib/components/core/timeline/timeline.component.mjs +0 -36
  327. package/esm2022/lib/components/core/timeline/timeline.module.mjs +0 -18
  328. package/esm2022/lib/components/core/tooltip/tooltip.directive.mjs +0 -143
  329. package/esm2022/lib/components/form/autocomplete/autocomplete.component.mjs +0 -112
  330. package/esm2022/lib/components/form/checkbox/checkbox.component.mjs +0 -48
  331. package/esm2022/lib/components/form/form.module.mjs +0 -63
  332. package/esm2022/lib/components/form/input/input.component.mjs +0 -190
  333. package/esm2022/lib/components/form/password-input/password-input.component.mjs +0 -149
  334. package/esm2022/lib/components/form/radio-button/radio-button.component.mjs +0 -60
  335. package/esm2022/lib/components/form/range/range.component.mjs +0 -64
  336. package/esm2022/lib/components/form/rating/rating.component.mjs +0 -50
  337. package/esm2022/lib/components/form/select/select.component.mjs +0 -70
  338. package/esm2022/lib/components/form/textarea/textarea.component.mjs +0 -55
  339. package/esm2022/lib/components/form/transfer/store/transfer.reducers.mjs +0 -191
  340. package/esm2022/lib/components/form/transfer/store/transfer.state.mjs +0 -2
  341. package/esm2022/lib/components/form/transfer/store/transfer.store.mjs +0 -70
  342. package/esm2022/lib/components/form/transfer/transfer-list/transfer-list.component.mjs +0 -72
  343. package/esm2022/lib/components/form/transfer/transfer.component.mjs +0 -149
  344. package/esm2022/lib/components/form/transfer/transfer.model.mjs +0 -6
  345. package/esm2022/lib/components/form/upload-drag-drop/upload-drag-drop.component.mjs +0 -142
  346. package/esm2022/lib/components/form/upload-file-list/upload-file-list.component.mjs +0 -107
  347. package/esm2022/lib/components/navigation/back-button/back-button.component.mjs +0 -67
  348. package/esm2022/lib/components/navigation/back-to-top/back-to-top.component.mjs +0 -68
  349. package/esm2022/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.mjs +0 -51
  350. package/esm2022/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.mjs +0 -21
  351. package/esm2022/lib/components/navigation/breadcrumbs/breadcrumbs.module.mjs +0 -18
  352. package/esm2022/lib/components/navigation/header/header.component.mjs +0 -97
  353. package/esm2022/lib/components/navigation/megamenu/megamenu.component.mjs +0 -27
  354. package/esm2022/lib/components/navigation/navbar/navbar/navbar.component.mjs +0 -40
  355. package/esm2022/lib/components/navigation/navbar/navbar-item/navbar-item.component.mjs +0 -11
  356. package/esm2022/lib/components/navigation/navbar/navbar.module.mjs +0 -18
  357. package/esm2022/lib/components/navigation/navscroll/navscroll-list-item.component.mjs +0 -98
  358. package/esm2022/lib/components/navigation/navscroll/navscroll-list-items.component.mjs +0 -44
  359. package/esm2022/lib/components/navigation/navscroll/navscroll.component.mjs +0 -116
  360. package/esm2022/lib/components/navigation/navscroll/navscroll.model.mjs +0 -2
  361. package/esm2022/lib/components/navigation/navscroll/navscroll.store.mjs +0 -68
  362. package/esm2022/lib/components/navigation/navscroll/navscroll.utils.mjs +0 -23
  363. package/esm2022/lib/components/navigation/sidebar/sidebar.component.mjs +0 -50
  364. package/esm2022/lib/components/navigation/skiplink/skiplink/skiplink.component.mjs +0 -27
  365. package/esm2022/lib/components/navigation/skiplink/skiplink-item/skiplink-item.component.mjs +0 -26
  366. package/esm2022/lib/components/navigation/skiplink/skiplink.module.mjs +0 -18
  367. package/esm2022/lib/components/utils/error-page/error-page.component.mjs +0 -74
  368. package/esm2022/lib/components/utils/icon/icon.component.mjs +0 -63
  369. package/esm2022/lib/components/utils/language-switcher/language-switcher.component.mjs +0 -50
  370. package/esm2022/lib/design-angular-kit.module.mjs +0 -233
  371. package/esm2022/lib/enums/colors.enums.mjs +0 -12
  372. package/esm2022/lib/enums/sizes.enum.mjs +0 -9
  373. package/esm2022/lib/interfaces/core.mjs +0 -16
  374. package/esm2022/lib/interfaces/design-angular-kit-config.mjs +0 -7
  375. package/esm2022/lib/interfaces/form.mjs +0 -2
  376. package/esm2022/lib/interfaces/icon.mjs +0 -168
  377. package/esm2022/lib/interfaces/sortable-table.mjs +0 -6
  378. package/esm2022/lib/interfaces/utils.mjs +0 -2
  379. package/esm2022/lib/pipes/date-ago.pipe.mjs +0 -56
  380. package/esm2022/lib/pipes/duration.pipe.mjs +0 -115
  381. package/esm2022/lib/pipes/mark-matching-text.pipe.mjs +0 -48
  382. package/esm2022/lib/provide-design-angular-kit.mjs +0 -64
  383. package/esm2022/lib/services/notification/notification.service.mjs +0 -120
  384. package/esm2022/lib/utils/coercion.mjs +0 -18
  385. package/esm2022/lib/utils/date-utils.mjs +0 -162
  386. package/esm2022/lib/utils/file-utils.mjs +0 -73
  387. package/esm2022/lib/utils/regex.mjs +0 -35
  388. package/esm2022/lib/validators/it-validators.mjs +0 -156
  389. package/esm2022/public_api.mjs +0 -110
  390. package/fesm2022/design-angular-kit.mjs +0 -6704
  391. package/fesm2022/design-angular-kit.mjs.map +0 -1
  392. package/index.d.ts +0 -5
  393. package/lib/abstracts/abstract-form.component.d.ts +0 -87
  394. package/lib/abstracts/abstract.component.d.ts +0 -30
  395. package/lib/components/core/accordion/accordion.component.d.ts +0 -18
  396. package/lib/components/core/alert/alert.component.d.ts +0 -44
  397. package/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.d.ts +0 -29
  398. package/lib/components/core/avatar/avatar-group/avatar-group.component.d.ts +0 -15
  399. package/lib/components/core/avatar/avatar.directive.d.ts +0 -33
  400. package/lib/components/core/avatar/avatar.module.d.ts +0 -9
  401. package/lib/components/core/badge/badge.directive.d.ts +0 -23
  402. package/lib/components/core/button/button.directive.d.ts +0 -48
  403. package/lib/components/core/callout/callout.component.d.ts +0 -50
  404. package/lib/components/core/card/card.component.d.ts +0 -69
  405. package/lib/components/core/carousel/carousel/carousel.component.d.ts +0 -65
  406. package/lib/components/core/carousel/carousel-item/carousel-item.component.d.ts +0 -15
  407. package/lib/components/core/carousel/carousel.module.d.ts +0 -8
  408. package/lib/components/core/chip/chip.component.d.ts +0 -76
  409. package/lib/components/core/collapse/collapse.component.d.ts +0 -67
  410. package/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.d.ts +0 -12
  411. package/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.d.ts +0 -5
  412. package/lib/components/core/dimmer/dimmer.component.d.ts +0 -24
  413. package/lib/components/core/dimmer/dimmer.module.d.ts +0 -9
  414. package/lib/components/core/dropdown/dropdown/dropdown.component.d.ts +0 -94
  415. package/lib/components/core/dropdown/dropdown-item/dropdown-item.component.d.ts +0 -42
  416. package/lib/components/core/dropdown/dropdown.module.d.ts +0 -8
  417. package/lib/components/core/forward/forward.directive.d.ts +0 -14
  418. package/lib/components/core/link/link.component.d.ts +0 -35
  419. package/lib/components/core/list/list/list.component.d.ts +0 -24
  420. package/lib/components/core/list/list-item/list-item.component.d.ts +0 -41
  421. package/lib/components/core/list/list.module.d.ts +0 -8
  422. package/lib/components/core/modal/modal.component.d.ts +0 -135
  423. package/lib/components/core/notifications/notifications.component.d.ts +0 -45
  424. package/lib/components/core/pagination/pagination.component.d.ts +0 -92
  425. package/lib/components/core/popover/popover.directive.d.ts +0 -99
  426. package/lib/components/core/progress-bar/progress-bar.component.d.ts +0 -31
  427. package/lib/components/core/progress-button/progress-button.component.d.ts +0 -21
  428. package/lib/components/core/spinner/spinner.component.d.ts +0 -24
  429. package/lib/components/core/steppers/steppers-container/steppers-container.component.d.ts +0 -130
  430. package/lib/components/core/steppers/steppers-item/steppers-item.component.d.ts +0 -24
  431. package/lib/components/core/steppers/steppers.module.d.ts +0 -8
  432. package/lib/components/core/tab/tab-container/tab-container.component.d.ts +0 -60
  433. package/lib/components/core/tab/tab-item/tab-item.component.d.ts +0 -38
  434. package/lib/components/core/tab/tab.module.d.ts +0 -8
  435. package/lib/components/core/table/sort/sort-header/sort-header.component.d.ts +0 -72
  436. package/lib/components/core/table/sort/sort.directive.d.ts +0 -53
  437. package/lib/components/core/table/table.component.d.ts +0 -60
  438. package/lib/components/core/table/table.module.d.ts +0 -9
  439. package/lib/components/core/timeline/timeline-item/timeline-item.component.d.ts +0 -79
  440. package/lib/components/core/timeline/timeline.component.d.ts +0 -21
  441. package/lib/components/core/timeline/timeline.module.d.ts +0 -8
  442. package/lib/components/core/tooltip/tooltip.directive.d.ts +0 -82
  443. package/lib/components/form/autocomplete/autocomplete.component.d.ts +0 -59
  444. package/lib/components/form/checkbox/checkbox.component.d.ts +0 -41
  445. package/lib/components/form/form.module.d.ts +0 -18
  446. package/lib/components/form/input/input.component.d.ts +0 -95
  447. package/lib/components/form/password-input/password-input.component.d.ts +0 -80
  448. package/lib/components/form/radio-button/radio-button.component.d.ts +0 -38
  449. package/lib/components/form/range/range.component.d.ts +0 -42
  450. package/lib/components/form/rating/rating.component.d.ts +0 -24
  451. package/lib/components/form/select/select.component.d.ts +0 -36
  452. package/lib/components/form/textarea/textarea.component.d.ts +0 -34
  453. package/lib/components/form/transfer/store/transfer.reducers.d.ts +0 -103
  454. package/lib/components/form/transfer/store/transfer.state.d.ts +0 -18
  455. package/lib/components/form/transfer/store/transfer.store.d.ts +0 -23
  456. package/lib/components/form/transfer/transfer-list/transfer-list.component.d.ts +0 -48
  457. package/lib/components/form/transfer/transfer.component.d.ts +0 -75
  458. package/lib/components/form/upload-drag-drop/upload-drag-drop.component.d.ts +0 -60
  459. package/lib/components/form/upload-file-list/upload-file-list.component.d.ts +0 -62
  460. package/lib/components/navigation/back-button/back-button.component.d.ts +0 -47
  461. package/lib/components/navigation/back-to-top/back-to-top.component.d.ts +0 -50
  462. package/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.d.ts +0 -28
  463. package/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.d.ts +0 -23
  464. package/lib/components/navigation/breadcrumbs/breadcrumbs.module.d.ts +0 -8
  465. package/lib/components/navigation/header/header.component.d.ts +0 -36
  466. package/lib/components/navigation/megamenu/megamenu.component.d.ts +0 -22
  467. package/lib/components/navigation/navbar/navbar/navbar.component.d.ts +0 -16
  468. package/lib/components/navigation/navbar/navbar-item/navbar-item.component.d.ts +0 -5
  469. package/lib/components/navigation/navbar/navbar.module.d.ts +0 -8
  470. package/lib/components/navigation/navscroll/navscroll-list-item.component.d.ts +0 -16
  471. package/lib/components/navigation/navscroll/navscroll-list-items.component.d.ts +0 -7
  472. package/lib/components/navigation/navscroll/navscroll.component.d.ts +0 -47
  473. package/lib/components/navigation/navscroll/navscroll.store.d.ts +0 -16
  474. package/lib/components/navigation/navscroll/navscroll.utils.d.ts +0 -6
  475. package/lib/components/navigation/sidebar/sidebar.component.d.ts +0 -26
  476. package/lib/components/navigation/skiplink/skiplink/skiplink.component.d.ts +0 -17
  477. package/lib/components/navigation/skiplink/skiplink-item/skiplink-item.component.d.ts +0 -24
  478. package/lib/components/navigation/skiplink/skiplink.module.d.ts +0 -8
  479. package/lib/components/utils/error-page/error-page.component.d.ts +0 -44
  480. package/lib/components/utils/icon/icon.component.d.ts +0 -53
  481. package/lib/components/utils/language-switcher/language-switcher.component.d.ts +0 -27
  482. package/lib/design-angular-kit.module.d.ts +0 -53
  483. package/lib/enums/colors.enums.d.ts +0 -10
  484. package/lib/enums/sizes.enum.d.ts +0 -7
  485. package/lib/interfaces/design-angular-kit-config.d.ts +0 -30
  486. package/lib/interfaces/form.d.ts +0 -67
  487. package/lib/interfaces/icon.d.ts +0 -4
  488. package/lib/interfaces/sortable-table.d.ts +0 -33
  489. package/lib/interfaces/utils.d.ts +0 -10
  490. package/lib/pipes/date-ago.pipe.d.ts +0 -17
  491. package/lib/pipes/duration.pipe.d.ts +0 -35
  492. package/lib/pipes/mark-matching-text.pipe.d.ts +0 -18
  493. package/lib/provide-design-angular-kit.d.ts +0 -7
  494. package/lib/services/notification/notification.service.d.ts +0 -63
  495. package/lib/utils/date-utils.d.ts +0 -79
  496. package/lib/utils/file-utils.d.ts +0 -32
  497. package/lib/utils/regex.d.ts +0 -34
  498. package/lib/validators/it-validators.d.ts +0 -69
  499. package/schematics/ng-add/index.d.ts +0 -3
  500. package/schematics/ng-add/index.js +0 -29
  501. package/schematics/ng-add/index.js.map +0 -1
  502. package/schematics/ng-add/index.spec.d.ts +0 -1
  503. package/schematics/ng-add/index.spec.js +0 -43
  504. package/schematics/ng-add/index.spec.js.map +0 -1
  505. package/schematics/ng-add/rules/setup-project/add-animations.d.ts +0 -2
  506. package/schematics/ng-add/rules/setup-project/add-animations.js +0 -11
  507. package/schematics/ng-add/rules/setup-project/add-animations.js.map +0 -1
  508. package/schematics/ng-add/rules/setup-project/add-assets.d.ts +0 -3
  509. package/schematics/ng-add/rules/setup-project/add-assets.js +0 -50
  510. package/schematics/ng-add/rules/setup-project/add-assets.js.map +0 -1
  511. package/schematics/ng-add/rules/setup-project/add-design-angular-kit.d.ts +0 -3
  512. package/schematics/ng-add/rules/setup-project/add-design-angular-kit.js +0 -43
  513. package/schematics/ng-add/rules/setup-project/add-design-angular-kit.js.map +0 -1
  514. package/schematics/ng-add/rules/setup-project/add-http-client.d.ts +0 -2
  515. package/schematics/ng-add/rules/setup-project/add-http-client.js +0 -11
  516. package/schematics/ng-add/rules/setup-project/add-http-client.js.map +0 -1
  517. package/schematics/ng-add/rules/setup-project/add-import-to-style-file.d.ts +0 -11
  518. package/schematics/ng-add/rules/setup-project/add-import-to-style-file.js +0 -112
  519. package/schematics/ng-add/rules/setup-project/add-import-to-style-file.js.map +0 -1
  520. package/schematics/ng-add/rules/setup-project/add-localisation.d.ts +0 -3
  521. package/schematics/ng-add/rules/setup-project/add-localisation.js +0 -50
  522. package/schematics/ng-add/rules/setup-project/add-localisation.js.map +0 -1
  523. package/schematics/ng-add/rules/setup-project/angular-json-helper.d.ts +0 -2
  524. package/schematics/ng-add/rules/setup-project/angular-json-helper.js +0 -13
  525. package/schematics/ng-add/rules/setup-project/angular-json-helper.js.map +0 -1
  526. package/schematics/ng-add/rules/setup-project/exceptions.d.ts +0 -7
  527. package/schematics/ng-add/rules/setup-project/exceptions.js +0 -17
  528. package/schematics/ng-add/rules/setup-project/exceptions.js.map +0 -1
  529. package/schematics/ng-add/rules/setup-project/index.js +0 -23
  530. package/schematics/ng-add/rules/setup-project/index.js.map +0 -1
  531. package/schematics/ng-add/schema.js +0 -3
  532. package/schematics/ng-add/schema.js.map +0 -1
  533. package/schematics/ng-add/setup-project.d.ts +0 -3
  534. package/schematics/ng-add/setup-project.js +0 -37
  535. package/schematics/ng-add/setup-project.js.map +0 -1
  536. package/schematics/ng-add/setup-project.spec.d.ts +0 -1
  537. package/schematics/ng-add/setup-project.spec.js +0 -139
  538. package/schematics/ng-add/setup-project.spec.js.map +0 -1
  539. package/schematics/ng-add/utils.d.ts +0 -14
  540. package/schematics/ng-add/utils.js +0 -49
  541. package/schematics/ng-add/utils.js.map +0 -1
  542. package/schematics/ng-add/versions-helper.d.ts +0 -3
  543. package/schematics/ng-add/versions-helper.js +0 -40
  544. package/schematics/ng-add/versions-helper.js.map +0 -1
  545. /package/schematics/ng-add/rules/setup-project/{index.d.ts → index.ts} +0 -0
@@ -0,0 +1,42 @@
1
+ <li>
2
+ <ng-template #content>
3
+ <div class="it-rounded-icon">
4
+ <ng-content select="[icon]"></ng-content>
5
+ </div>
6
+
7
+ @if (avatar) {
8
+ <div class="avatar size-lg">
9
+ <img [attr.src]="avatar" alt="avatar" />
10
+ </div>
11
+ }
12
+
13
+ @if (image) {
14
+ <div class="it-thumb">
15
+ <img [attr.src]="image" alt="thumb" />
16
+ </div>
17
+ }
18
+
19
+ <div class="it-right-zone">
20
+ <ng-content></ng-content>
21
+ <ng-content select="[action]"></ng-content>
22
+
23
+ <span class="it-multiple">
24
+ <span class="metadata">
25
+ <ng-content select="[metadata]"></ng-content>
26
+ </span>
27
+
28
+ <ng-content select="[multiple]"></ng-content>
29
+ </span>
30
+ </div>
31
+ </ng-template>
32
+
33
+ @if (!href) {
34
+ <div [class]="itemClass">
35
+ <ng-container *ngTemplateOutlet="content"></ng-container>
36
+ </div>
37
+ } @else {
38
+ <it-link [class]="itemClass" [href]="href" [externalLink]="!!externalLink" [disabled]="!!disabled">
39
+ <ng-container *ngTemplateOutlet="content"></ng-container>
40
+ </it-link>
41
+ }
42
+ </li>
@@ -0,0 +1,16 @@
1
+ .metadata:empty,
2
+ .it-rounded-icon:empty {
3
+ display: none;
4
+ }
5
+
6
+ :host ::ng-deep {
7
+ it-icon + .it-multiple {
8
+ display: none !important;
9
+ }
10
+ .list-item-title-icon-wrapper + .it-multiple {
11
+ display: none !important;
12
+ }
13
+ p + .it-multiple {
14
+ display: none !important;
15
+ }
16
+ }
@@ -0,0 +1,21 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { ItListItemComponent } from './list-item.component';
4
+ import { tb_base } from '../../../../../test';
5
+
6
+ describe('ItListItemComponent', () => {
7
+ let component: ItListItemComponent;
8
+ let fixture: ComponentFixture<ItListItemComponent>;
9
+
10
+ beforeEach(async () => {
11
+ await TestBed.configureTestingModule(tb_base).compileComponents();
12
+
13
+ fixture = TestBed.createComponent(ItListItemComponent);
14
+ component = fixture.componentInstance;
15
+ fixture.detectChanges();
16
+ });
17
+
18
+ it('should create', () => {
19
+ expect(component).toBeTruthy();
20
+ });
21
+ });
@@ -0,0 +1,75 @@
1
+ import { ChangeDetectionStrategy, Component, ElementRef, Input } from '@angular/core';
2
+ import { ItLinkComponent } from '../../link/link.component';
3
+ import { NgTemplateOutlet } from '@angular/common';
4
+ import { inputToBoolean } from '../../../../utils/coercion';
5
+
6
+ @Component({
7
+ standalone: true,
8
+ selector: 'it-list-item',
9
+ templateUrl: './list-item.component.html',
10
+ styleUrls: ['./list-item.component.scss'],
11
+ changeDetection: ChangeDetectionStrategy.OnPush,
12
+ imports: [NgTemplateOutlet, ItLinkComponent],
13
+ })
14
+ export class ItListItemComponent extends ItLinkComponent {
15
+ constructor(private elRef: ElementRef) {
16
+ super();
17
+ }
18
+
19
+ /**
20
+ * Add active class
21
+ * @default false
22
+ */
23
+ @Input({ transform: inputToBoolean }) active?: boolean;
24
+
25
+ /**
26
+ * Add large class
27
+ */
28
+ @Input() size?: 'large' | 'medium';
29
+
30
+ /**
31
+ * Add icon-left class
32
+ * @default false
33
+ */
34
+ @Input({ transform: inputToBoolean }) iconLeft?: boolean;
35
+
36
+ /**
37
+ * Add icon-right class
38
+ * @default false
39
+ */
40
+ @Input({ transform: inputToBoolean }) iconRight?: boolean;
41
+
42
+ /**
43
+ * The avatar url
44
+ */
45
+ @Input() avatar: URL | undefined;
46
+
47
+ /**
48
+ * The thumb image url
49
+ */
50
+ @Input() image: URL | undefined;
51
+
52
+ get itemClass(): string {
53
+ const inSidebar: boolean = this.elRef.nativeElement.closest('.sidebar-linklist-wrapper') ? true : false;
54
+ let itemClass = 'list-item';
55
+ if (this.disabled) {
56
+ itemClass += ` disabled`;
57
+ }
58
+ if (this.active) {
59
+ itemClass += ` active`;
60
+ }
61
+ if (this.size) {
62
+ itemClass += ` ${this.size}`;
63
+ }
64
+ if (this.iconLeft) {
65
+ itemClass += inSidebar ? ` left-icon` : ` icon-left`;
66
+ }
67
+ if (this.iconRight) {
68
+ itemClass += inSidebar ? ` right-icon` : ` icon-right`;
69
+ }
70
+ if (this.class) {
71
+ itemClass += ` ${this.class}`;
72
+ }
73
+ return itemClass;
74
+ }
75
+ }
@@ -0,0 +1,11 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { ItListComponent } from './list/list.component';
3
+ import { ItListItemComponent } from './list-item/list-item.component';
4
+
5
+ const listComponents = [ItListComponent, ItListItemComponent];
6
+
7
+ @NgModule({
8
+ imports: listComponents,
9
+ exports: listComponents,
10
+ })
11
+ export class ItListModule {}
@@ -0,0 +1,36 @@
1
+ <div
2
+ #modalElement
3
+ [id]="id"
4
+ [class]="modalClass"
5
+ tabindex="-1"
6
+ role="dialog"
7
+ aria-hidden="true"
8
+ [attr.aria-labelledby]="id + '-title'"
9
+ [attr.aria-describedby]="id + '-description'">
10
+ <div [class]="dialogClass">
11
+ <div class="modal-content" role="document">
12
+ <div class="modal-header">
13
+ <ng-content select="[beforeTitle]"></ng-content>
14
+
15
+ <h2 class="modal-title h5" id="{{ id }}-title">
16
+ <ng-content select="[modalTitle]"></ng-content>
17
+ </h2>
18
+
19
+ @if (closeButton) {
20
+ <button type="button" class="btn-close" data-bs-dismiss="modal" [attr.aria-label]="'it.core.close-modal' | translate"></button>
21
+ }
22
+ </div>
23
+
24
+ <div class="modal-body">
25
+ <div id="{{ id }}-description">
26
+ <ng-content select="[description]"></ng-content>
27
+ </div>
28
+ <ng-content></ng-content>
29
+ </div>
30
+
31
+ <div class="modal-footer" [class.modal-footer-shadow]="footerShadow">
32
+ <ng-content select="[footer]"></ng-content>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </div>
@@ -0,0 +1,3 @@
1
+ .modal-footer:empty {
2
+ display: none;
3
+ }
@@ -0,0 +1,21 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { ItModalComponent } from './modal.component';
4
+ import { tb_base } from '../../../../test';
5
+
6
+ describe('ItModalComponent', () => {
7
+ let component: ItModalComponent;
8
+ let fixture: ComponentFixture<ItModalComponent>;
9
+
10
+ beforeEach(async () => {
11
+ await TestBed.configureTestingModule(tb_base).compileComponents();
12
+
13
+ fixture = TestBed.createComponent(ItModalComponent);
14
+ component = fixture.componentInstance;
15
+ fixture.detectChanges();
16
+ });
17
+
18
+ it('should create', () => {
19
+ expect(component).toBeTruthy();
20
+ });
21
+ });
@@ -0,0 +1,218 @@
1
+ import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core';
2
+ import { ItAbstractComponent } from '../../../abstracts/abstract.component';
3
+ import { Modal } from 'bootstrap-italia';
4
+ import { TranslateModule } from '@ngx-translate/core';
5
+ import { Modal as BSModal } from 'bootstrap';
6
+ import { inputToBoolean } from '../../../utils/coercion';
7
+
8
+ /**
9
+ * Modal windows
10
+ * @description To show featured content, notifications to users, or personalized content.
11
+ */
12
+ @Component({
13
+ standalone: true,
14
+ selector: 'it-modal',
15
+ templateUrl: './modal.component.html',
16
+ styleUrls: ['./modal.component.scss'],
17
+ exportAs: 'itModal',
18
+ changeDetection: ChangeDetectionStrategy.OnPush,
19
+ imports: [TranslateModule],
20
+ })
21
+ export class ItModalComponent extends ItAbstractComponent implements AfterViewInit {
22
+ /**
23
+ * Show/Hide close button on header
24
+ * @default true
25
+ */
26
+ @Input({ transform: inputToBoolean }) closeButton: boolean = true;
27
+
28
+ /**
29
+ * To correctly format the contents of the modal with icon
30
+ * @default false
31
+ */
32
+ @Input({ transform: inputToBoolean }) alertModal?: boolean;
33
+
34
+ /**
35
+ * To correctly format the contents of the modal with Link List
36
+ * @default false
37
+ */
38
+ @Input({ transform: inputToBoolean }) dialogLinkList?: boolean;
39
+
40
+ /**
41
+ * Modal type Popconfirm can be used for short confirmation messages.
42
+ * @default false
43
+ */
44
+ @Input({ transform: inputToBoolean }) popconfirm?: boolean;
45
+
46
+ /**
47
+ * You can choose to use a scroll inside the modal, keeping the header and footer of the modal always visible
48
+ * @default false
49
+ */
50
+ @Input({ transform: inputToBoolean }) scrollable?: boolean;
51
+
52
+ /**
53
+ * To have modals that appear with fades
54
+ * @default true
55
+ */
56
+ @Input({ transform: inputToBoolean }) fade?: boolean = true;
57
+
58
+ /**
59
+ * Modal alignment
60
+ * - <b>centered</b>: to vertically center the modal
61
+ * - <b>left</b>: to left-align the modal
62
+ * - <b>right</b>: to right-align the modal
63
+ * @default undefined
64
+ */
65
+ @Input() alignment: 'centered' | 'left' | 'right' | undefined;
66
+
67
+ /**
68
+ * The modal size
69
+ * @default undefined
70
+ */
71
+ @Input() size: 'sm' | 'lg' | 'xl' | undefined;
72
+
73
+ /**
74
+ * Includes a modal-backdrop element. Alternatively, specify static for a backdrop which doesn’t close the modal when clicked.
75
+ * @default true
76
+ */
77
+ @Input() backdrop: 'static' | boolean = true;
78
+
79
+ /**
80
+ * Puts the focus on the modal when initialized.
81
+ * @default true
82
+ */
83
+ @Input({ transform: inputToBoolean }) focus: boolean = true;
84
+
85
+ /**
86
+ * Closes the modal when escape key is pressed.
87
+ * @default true
88
+ */
89
+ @Input({ transform: inputToBoolean }) keyboard: boolean = true;
90
+
91
+ /**
92
+ * To better distinguish the footer element with a shadow
93
+ * @default false
94
+ */
95
+ @Input({ transform: inputToBoolean }) footerShadow?: boolean;
96
+
97
+ /**
98
+ * Modal options
99
+ */
100
+ @Input() options?: Partial<BSModal.Options>;
101
+
102
+ /**
103
+ * This event fires immediately when the instance method show is called.
104
+ */
105
+ @Output() public showEvent: EventEmitter<Event> = new EventEmitter();
106
+
107
+ /**
108
+ * This event fires when the modal has been made visible to the user (it will wait for CSS transitions to complete).
109
+ */
110
+ @Output() public shownEvent: EventEmitter<Event> = new EventEmitter();
111
+
112
+ /**
113
+ * This event is raised immediately when the instance method hide has been called.
114
+ */
115
+ @Output() public hideEvent: EventEmitter<Event> = new EventEmitter();
116
+
117
+ /**
118
+ * This event fires when the modal has finished hiding from the user (it will wait for CSS transitions to complete).
119
+ */
120
+ @Output() public hiddenEvent: EventEmitter<Event> = new EventEmitter();
121
+
122
+ /**
123
+ * This event is fired when the modal is displayed, its background is static and a click outside the modal or a press
124
+ * of the esc key occurs and data-bs-keyboard is set to false.
125
+ */
126
+ @Output() public hidePreventedEvent: EventEmitter<Event> = new EventEmitter();
127
+
128
+ private modal?: Modal;
129
+
130
+ @ViewChild('modalElement', { static: false }) private modalElement?: ElementRef<HTMLDivElement>;
131
+
132
+ override ngAfterViewInit(): void {
133
+ super.ngAfterViewInit();
134
+ this._renderer.removeAttribute(this._elementRef.nativeElement, 'title');
135
+
136
+ if (this.modalElement) {
137
+ const element = this.modalElement.nativeElement;
138
+ this.modal = Modal.getOrCreateInstance(element, {
139
+ ...this.options,
140
+ backdrop: this.backdrop === 'static' ? 'static' : this.backdrop,
141
+ focus: this.focus,
142
+ keyboard: this.keyboard,
143
+ });
144
+
145
+ element.addEventListener('show.bs.modal', event => this.showEvent.emit(event));
146
+ element.addEventListener('shown.bs.modal', event => this.shownEvent.emit(event));
147
+ element.addEventListener('hide.bs.modal', event => this.hideEvent.emit(event));
148
+ element.addEventListener('hidden.bs.modal', event => this.hiddenEvent.emit(event));
149
+ element.addEventListener('hidePrevented.bs.modal', event => this.hidePreventedEvent.emit(event));
150
+ }
151
+ }
152
+
153
+ protected get modalClass(): string {
154
+ let modalClass = 'modal';
155
+ if (this.fade) {
156
+ modalClass += ` fade`;
157
+ }
158
+ if (this.alertModal) {
159
+ modalClass += ` alert-modal`;
160
+ }
161
+ if (this.dialogLinkList) {
162
+ modalClass += ` it-dialog-link-list`;
163
+ }
164
+ if (this.popconfirm) {
165
+ modalClass += ` popconfirm-modal`;
166
+ }
167
+ if (this.scrollable) {
168
+ modalClass += ` it-dialog-scrollable`;
169
+ }
170
+ return modalClass;
171
+ }
172
+
173
+ protected get dialogClass(): string {
174
+ let dialogClass = 'modal-dialog';
175
+ if (this.alignment) {
176
+ dialogClass += ` modal-dialog-${this.alignment}`;
177
+ }
178
+ if (this.size) {
179
+ dialogClass += ` modal-${this.size}`;
180
+ }
181
+ return dialogClass;
182
+ }
183
+
184
+ /**
185
+ * Manually activate/deactivate a modal. Returns to the caller before the modal has actually been shown or hidden
186
+ */
187
+ public toggle(): void {
188
+ this.modal?.toggle();
189
+ }
190
+
191
+ /**
192
+ * Manually open a modal. Returns to the caller before the modal has actually been displayed
193
+ */
194
+ public show(): void {
195
+ this.modal?.show();
196
+ }
197
+
198
+ /**
199
+ * Manually hide a modal. Returns to the caller before the modal has actually been hidden
200
+ */
201
+ public hide(): void {
202
+ this.modal?.hide();
203
+ }
204
+
205
+ /**
206
+ * Manually reposition the modal if the height of the modal changes when it is opened (in case a scroll bar appears).
207
+ */
208
+ public handleUpdate(): void {
209
+ this.modal?.handleUpdate();
210
+ }
211
+
212
+ /**
213
+ * Destroys the modal of an element.
214
+ */
215
+ public dispose(): void {
216
+ this.modal?.dispose();
217
+ }
218
+ }
@@ -0,0 +1,25 @@
1
+ @for (notification of notifications; track notification.id) {
2
+ <div
3
+ [id]="notification.id"
4
+ class="notification {{ notification.position }} {{ notification.type }}"
5
+ [class.with-icon]="!!notification.icon"
6
+ [class.dismissable]="notification.dismissible"
7
+ role="alert"
8
+ [attr.aria-labelledby]="notification.id + '-title'">
9
+ <h2 [id]="notification.id + '-title'" class="h5">
10
+ @if (notification.icon) {
11
+ <it-icon [name]="notification.icon"></it-icon>
12
+ }
13
+ <ng-container>{{ notification.title }}</ng-container>
14
+ </h2>
15
+ @if (notification.message) {
16
+ <p>{{ notification.message }}</p>
17
+ }
18
+ @if (notification.dismissible) {
19
+ <button type="button" class="btn notification-close" (click)="hideNotification(notification.id)">
20
+ <it-icon name="close"></it-icon>
21
+ <span class="visually-hidden">{{ 'it.core.close-notification' | translate: { title: notification.title } }}</span>
22
+ </button>
23
+ }
24
+ </div>
25
+ }
@@ -0,0 +1,3 @@
1
+ .notification {
2
+ z-index: 10000;
3
+ }
@@ -0,0 +1,21 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { ItNotificationsComponent } from './notifications.component';
4
+ import { tb_base } from '../../../../test';
5
+
6
+ describe('ItNotificationsComponent', () => {
7
+ let component: ItNotificationsComponent;
8
+ let fixture: ComponentFixture<ItNotificationsComponent>;
9
+
10
+ beforeEach(async () => {
11
+ await TestBed.configureTestingModule(tb_base).compileComponents();
12
+
13
+ fixture = TestBed.createComponent(ItNotificationsComponent);
14
+ component = fixture.componentInstance;
15
+ fixture.detectChanges();
16
+ });
17
+
18
+ it('should create', () => {
19
+ expect(component).toBeTruthy();
20
+ });
21
+ });
@@ -0,0 +1,123 @@
1
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnDestroy } from '@angular/core';
2
+ import { Subscription } from 'rxjs';
3
+ import { ItNotificationService } from '../../../services/notification/notification.service';
4
+ import { Notification, NotificationPosition, NotificationType } from '../../../interfaces/core';
5
+ import { Notification as BSNotification } from 'bootstrap-italia';
6
+ import { IconName } from '../../../interfaces/icon';
7
+ import { ItIconComponent } from '../../utils/icon/icon.component';
8
+ import { TranslateModule } from '@ngx-translate/core';
9
+ import { inputToBoolean } from '../../../utils/coercion';
10
+
11
+ @Component({
12
+ standalone: true,
13
+ selector: 'it-notifications',
14
+ templateUrl: './notifications.component.html',
15
+ styleUrls: ['./notifications.component.scss'],
16
+ changeDetection: ChangeDetectionStrategy.OnPush,
17
+ imports: [ItIconComponent, TranslateModule],
18
+ })
19
+ export class ItNotificationsComponent implements OnDestroy {
20
+ /**
21
+ * Default notifications duration (milliseconds)
22
+ * @default 8000
23
+ */
24
+ @Input() duration: number = 8000;
25
+
26
+ /**
27
+ * Default notifications position
28
+ */
29
+ @Input() position: NotificationPosition | undefined;
30
+
31
+ /**
32
+ * Default notifications is dismissible
33
+ * @default true
34
+ */
35
+ @Input({ transform: inputToBoolean }) dismissible: boolean = true;
36
+
37
+ private subscription: Subscription;
38
+ private notificationCount: number = 0;
39
+ protected notifications: Array<Notification & { id: string }> = [];
40
+
41
+ constructor(
42
+ private readonly _changeDetectorRef: ChangeDetectorRef,
43
+ private readonly _notificationService: ItNotificationService
44
+ ) {
45
+ this.subscription = this._notificationService.onNotification().subscribe(notification => {
46
+ if (!notification.duration) {
47
+ notification.duration = this.duration; // Add duration if not is set
48
+ }
49
+ if (!notification.position && this.position) {
50
+ notification.position = this.position; // Add position if not is set
51
+ }
52
+ if (notification.dismissible === undefined && this.dismissible) {
53
+ notification.dismissible = true; // Add dismissible if not is set
54
+ }
55
+ if (!notification.icon) {
56
+ notification.icon = this.getNotificationIcon(notification);
57
+ }
58
+
59
+ const newNotification = {
60
+ ...notification,
61
+ id: `${notification.type}-${this.notificationCount++}-notification`,
62
+ };
63
+ this.notifications.push(newNotification);
64
+ this._changeDetectorRef.detectChanges();
65
+
66
+ setTimeout(() => {
67
+ // Show the notification
68
+ new BSNotification(document.getElementById(newNotification.id)!, {
69
+ timeout: notification.duration,
70
+ }).show();
71
+
72
+ // Clear notification after the duration
73
+ setTimeout(() => {
74
+ const index = this.notifications.findIndex(n => n.id === newNotification.id);
75
+ if (index > -1) {
76
+ this.notifications.splice(index, 1);
77
+ if (!this.notifications.length) {
78
+ this.notificationCount = 0;
79
+ }
80
+ this._changeDetectorRef.detectChanges();
81
+ }
82
+ }, notification.duration);
83
+ }, 200);
84
+ });
85
+ }
86
+
87
+ ngOnDestroy(): void {
88
+ this.subscription.unsubscribe();
89
+ }
90
+
91
+ protected get NotificationType(): typeof NotificationType {
92
+ return NotificationType;
93
+ }
94
+
95
+ /**
96
+ * Hide the notification
97
+ * @param id
98
+ */
99
+ protected hideNotification(id: string): void {
100
+ BSNotification.getInstance(document.getElementById(id)!)?.hide();
101
+ }
102
+
103
+ /**
104
+ * Retrieve the icon name by notification type
105
+ * @param notification the notification
106
+ * @protected
107
+ */
108
+ private getNotificationIcon(notification: Notification): IconName | undefined {
109
+ switch (notification.type) {
110
+ case NotificationType.Success:
111
+ return 'check-circle';
112
+ case NotificationType.Error:
113
+ return 'close-circle';
114
+ case NotificationType.Warning:
115
+ return 'error';
116
+ case NotificationType.Info:
117
+ return 'info-circle';
118
+ case NotificationType.Standard:
119
+ default:
120
+ return undefined;
121
+ }
122
+ }
123
+ }