design-angular-kit 1.1.4 → 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 (546) 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/README.md +0 -461
  279. package/esm2022/design-angular-kit.mjs +0 -5
  280. package/esm2022/lib/abstracts/abstract-form.component.mjs +0 -186
  281. package/esm2022/lib/abstracts/abstract.component.mjs +0 -46
  282. package/esm2022/lib/components/core/accordion/accordion.component.mjs +0 -39
  283. package/esm2022/lib/components/core/alert/alert.component.mjs +0 -71
  284. package/esm2022/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.mjs +0 -43
  285. package/esm2022/lib/components/core/avatar/avatar-group/avatar-group.component.mjs +0 -40
  286. package/esm2022/lib/components/core/avatar/avatar.directive.mjs +0 -78
  287. package/esm2022/lib/components/core/avatar/avatar.module.mjs +0 -33
  288. package/esm2022/lib/components/core/badge/badge.directive.mjs +0 -39
  289. package/esm2022/lib/components/core/button/button.directive.mjs +0 -80
  290. package/esm2022/lib/components/core/callout/callout.component.mjs +0 -64
  291. package/esm2022/lib/components/core/card/card.component.mjs +0 -59
  292. package/esm2022/lib/components/core/carousel/carousel/carousel.component.mjs +0 -84
  293. package/esm2022/lib/components/core/carousel/carousel-item/carousel-item.component.mjs +0 -19
  294. package/esm2022/lib/components/core/carousel/carousel.module.mjs +0 -18
  295. package/esm2022/lib/components/core/chip/chip.component.mjs +0 -136
  296. package/esm2022/lib/components/core/collapse/collapse.component.mjs +0 -116
  297. package/esm2022/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.mjs +0 -27
  298. package/esm2022/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.mjs +0 -11
  299. package/esm2022/lib/components/core/dimmer/dimmer.component.mjs +0 -55
  300. package/esm2022/lib/components/core/dimmer/dimmer.module.mjs +0 -19
  301. package/esm2022/lib/components/core/dropdown/dropdown/dropdown.component.mjs +0 -144
  302. package/esm2022/lib/components/core/dropdown/dropdown-item/dropdown-item.component.mjs +0 -61
  303. package/esm2022/lib/components/core/dropdown/dropdown.module.mjs +0 -18
  304. package/esm2022/lib/components/core/forward/forward.directive.mjs +0 -57
  305. package/esm2022/lib/components/core/link/link.component.mjs +0 -42
  306. package/esm2022/lib/components/core/list/list/list.component.mjs +0 -22
  307. package/esm2022/lib/components/core/list/list-item/list-item.component.mjs +0 -56
  308. package/esm2022/lib/components/core/list/list.module.mjs +0 -18
  309. package/esm2022/lib/components/core/modal/modal.component.mjs +0 -194
  310. package/esm2022/lib/components/core/notifications/notifications.component.mjs +0 -111
  311. package/esm2022/lib/components/core/pagination/pagination.component.mjs +0 -130
  312. package/esm2022/lib/components/core/popover/popover.directive.mjs +0 -176
  313. package/esm2022/lib/components/core/progress-bar/progress-bar.component.mjs +0 -34
  314. package/esm2022/lib/components/core/progress-button/progress-button.component.mjs +0 -25
  315. package/esm2022/lib/components/core/spinner/spinner.component.mjs +0 -30
  316. package/esm2022/lib/components/core/steppers/steppers-container/steppers-container.component.mjs +0 -116
  317. package/esm2022/lib/components/core/steppers/steppers-item/steppers-item.component.mjs +0 -20
  318. package/esm2022/lib/components/core/steppers/steppers.module.mjs +0 -18
  319. package/esm2022/lib/components/core/tab/tab-container/tab-container.component.mjs +0 -72
  320. package/esm2022/lib/components/core/tab/tab-item/tab-item.component.mjs +0 -39
  321. package/esm2022/lib/components/core/tab/tab.module.mjs +0 -18
  322. package/esm2022/lib/components/core/table/sort/sort-header/sort-header.component.mjs +0 -134
  323. package/esm2022/lib/components/core/table/sort/sort.directive.mjs +0 -123
  324. package/esm2022/lib/components/core/table/table.component.mjs +0 -45
  325. package/esm2022/lib/components/core/table/table.module.mjs +0 -19
  326. package/esm2022/lib/components/core/timeline/timeline-item/timeline-item.component.mjs +0 -90
  327. package/esm2022/lib/components/core/timeline/timeline.component.mjs +0 -36
  328. package/esm2022/lib/components/core/timeline/timeline.module.mjs +0 -18
  329. package/esm2022/lib/components/core/tooltip/tooltip.directive.mjs +0 -143
  330. package/esm2022/lib/components/form/autocomplete/autocomplete.component.mjs +0 -112
  331. package/esm2022/lib/components/form/checkbox/checkbox.component.mjs +0 -48
  332. package/esm2022/lib/components/form/form.module.mjs +0 -63
  333. package/esm2022/lib/components/form/input/input.component.mjs +0 -190
  334. package/esm2022/lib/components/form/password-input/password-input.component.mjs +0 -149
  335. package/esm2022/lib/components/form/radio-button/radio-button.component.mjs +0 -60
  336. package/esm2022/lib/components/form/range/range.component.mjs +0 -64
  337. package/esm2022/lib/components/form/rating/rating.component.mjs +0 -50
  338. package/esm2022/lib/components/form/select/select.component.mjs +0 -70
  339. package/esm2022/lib/components/form/textarea/textarea.component.mjs +0 -55
  340. package/esm2022/lib/components/form/transfer/store/transfer.reducers.mjs +0 -191
  341. package/esm2022/lib/components/form/transfer/store/transfer.state.mjs +0 -2
  342. package/esm2022/lib/components/form/transfer/store/transfer.store.mjs +0 -70
  343. package/esm2022/lib/components/form/transfer/transfer-list/transfer-list.component.mjs +0 -72
  344. package/esm2022/lib/components/form/transfer/transfer.component.mjs +0 -149
  345. package/esm2022/lib/components/form/transfer/transfer.model.mjs +0 -6
  346. package/esm2022/lib/components/form/upload-drag-drop/upload-drag-drop.component.mjs +0 -142
  347. package/esm2022/lib/components/form/upload-file-list/upload-file-list.component.mjs +0 -107
  348. package/esm2022/lib/components/navigation/back-button/back-button.component.mjs +0 -67
  349. package/esm2022/lib/components/navigation/back-to-top/back-to-top.component.mjs +0 -68
  350. package/esm2022/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.mjs +0 -51
  351. package/esm2022/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.mjs +0 -21
  352. package/esm2022/lib/components/navigation/breadcrumbs/breadcrumbs.module.mjs +0 -18
  353. package/esm2022/lib/components/navigation/header/header.component.mjs +0 -97
  354. package/esm2022/lib/components/navigation/megamenu/megamenu.component.mjs +0 -27
  355. package/esm2022/lib/components/navigation/navbar/navbar/navbar.component.mjs +0 -40
  356. package/esm2022/lib/components/navigation/navbar/navbar-item/navbar-item.component.mjs +0 -11
  357. package/esm2022/lib/components/navigation/navbar/navbar.module.mjs +0 -18
  358. package/esm2022/lib/components/navigation/navscroll/navscroll-list-item.component.mjs +0 -98
  359. package/esm2022/lib/components/navigation/navscroll/navscroll-list-items.component.mjs +0 -44
  360. package/esm2022/lib/components/navigation/navscroll/navscroll.component.mjs +0 -116
  361. package/esm2022/lib/components/navigation/navscroll/navscroll.model.mjs +0 -2
  362. package/esm2022/lib/components/navigation/navscroll/navscroll.store.mjs +0 -65
  363. package/esm2022/lib/components/navigation/navscroll/navscroll.utils.mjs +0 -23
  364. package/esm2022/lib/components/navigation/sidebar/sidebar.component.mjs +0 -50
  365. package/esm2022/lib/components/navigation/skiplink/skiplink/skiplink.component.mjs +0 -27
  366. package/esm2022/lib/components/navigation/skiplink/skiplink-item/skiplink-item.component.mjs +0 -26
  367. package/esm2022/lib/components/navigation/skiplink/skiplink.module.mjs +0 -18
  368. package/esm2022/lib/components/utils/error-page/error-page.component.mjs +0 -74
  369. package/esm2022/lib/components/utils/icon/icon.component.mjs +0 -58
  370. package/esm2022/lib/components/utils/language-switcher/language-switcher.component.mjs +0 -50
  371. package/esm2022/lib/design-angular-kit.module.mjs +0 -233
  372. package/esm2022/lib/enums/colors.enums.mjs +0 -12
  373. package/esm2022/lib/enums/sizes.enum.mjs +0 -9
  374. package/esm2022/lib/interfaces/core.mjs +0 -16
  375. package/esm2022/lib/interfaces/design-angular-kit-config.mjs +0 -7
  376. package/esm2022/lib/interfaces/form.mjs +0 -2
  377. package/esm2022/lib/interfaces/icon.mjs +0 -168
  378. package/esm2022/lib/interfaces/sortable-table.mjs +0 -6
  379. package/esm2022/lib/interfaces/utils.mjs +0 -2
  380. package/esm2022/lib/pipes/date-ago.pipe.mjs +0 -56
  381. package/esm2022/lib/pipes/duration.pipe.mjs +0 -115
  382. package/esm2022/lib/pipes/mark-matching-text.pipe.mjs +0 -48
  383. package/esm2022/lib/provide-design-angular-kit.mjs +0 -64
  384. package/esm2022/lib/services/notification/notification.service.mjs +0 -120
  385. package/esm2022/lib/utils/coercion.mjs +0 -18
  386. package/esm2022/lib/utils/date-utils.mjs +0 -162
  387. package/esm2022/lib/utils/file-utils.mjs +0 -73
  388. package/esm2022/lib/utils/regex.mjs +0 -35
  389. package/esm2022/lib/validators/it-validators.mjs +0 -156
  390. package/esm2022/public_api.mjs +0 -110
  391. package/fesm2022/design-angular-kit.mjs +0 -6669
  392. package/fesm2022/design-angular-kit.mjs.map +0 -1
  393. package/index.d.ts +0 -5
  394. package/lib/abstracts/abstract-form.component.d.ts +0 -87
  395. package/lib/abstracts/abstract.component.d.ts +0 -30
  396. package/lib/components/core/accordion/accordion.component.d.ts +0 -18
  397. package/lib/components/core/alert/alert.component.d.ts +0 -44
  398. package/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.d.ts +0 -29
  399. package/lib/components/core/avatar/avatar-group/avatar-group.component.d.ts +0 -15
  400. package/lib/components/core/avatar/avatar.directive.d.ts +0 -33
  401. package/lib/components/core/avatar/avatar.module.d.ts +0 -9
  402. package/lib/components/core/badge/badge.directive.d.ts +0 -23
  403. package/lib/components/core/button/button.directive.d.ts +0 -48
  404. package/lib/components/core/callout/callout.component.d.ts +0 -50
  405. package/lib/components/core/card/card.component.d.ts +0 -69
  406. package/lib/components/core/carousel/carousel/carousel.component.d.ts +0 -65
  407. package/lib/components/core/carousel/carousel-item/carousel-item.component.d.ts +0 -15
  408. package/lib/components/core/carousel/carousel.module.d.ts +0 -8
  409. package/lib/components/core/chip/chip.component.d.ts +0 -76
  410. package/lib/components/core/collapse/collapse.component.d.ts +0 -67
  411. package/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.d.ts +0 -12
  412. package/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.d.ts +0 -5
  413. package/lib/components/core/dimmer/dimmer.component.d.ts +0 -24
  414. package/lib/components/core/dimmer/dimmer.module.d.ts +0 -9
  415. package/lib/components/core/dropdown/dropdown/dropdown.component.d.ts +0 -94
  416. package/lib/components/core/dropdown/dropdown-item/dropdown-item.component.d.ts +0 -42
  417. package/lib/components/core/dropdown/dropdown.module.d.ts +0 -8
  418. package/lib/components/core/forward/forward.directive.d.ts +0 -14
  419. package/lib/components/core/link/link.component.d.ts +0 -35
  420. package/lib/components/core/list/list/list.component.d.ts +0 -24
  421. package/lib/components/core/list/list-item/list-item.component.d.ts +0 -41
  422. package/lib/components/core/list/list.module.d.ts +0 -8
  423. package/lib/components/core/modal/modal.component.d.ts +0 -135
  424. package/lib/components/core/notifications/notifications.component.d.ts +0 -45
  425. package/lib/components/core/pagination/pagination.component.d.ts +0 -92
  426. package/lib/components/core/popover/popover.directive.d.ts +0 -99
  427. package/lib/components/core/progress-bar/progress-bar.component.d.ts +0 -31
  428. package/lib/components/core/progress-button/progress-button.component.d.ts +0 -21
  429. package/lib/components/core/spinner/spinner.component.d.ts +0 -24
  430. package/lib/components/core/steppers/steppers-container/steppers-container.component.d.ts +0 -130
  431. package/lib/components/core/steppers/steppers-item/steppers-item.component.d.ts +0 -20
  432. package/lib/components/core/steppers/steppers.module.d.ts +0 -8
  433. package/lib/components/core/tab/tab-container/tab-container.component.d.ts +0 -36
  434. package/lib/components/core/tab/tab-item/tab-item.component.d.ts +0 -38
  435. package/lib/components/core/tab/tab.module.d.ts +0 -8
  436. package/lib/components/core/table/sort/sort-header/sort-header.component.d.ts +0 -72
  437. package/lib/components/core/table/sort/sort.directive.d.ts +0 -53
  438. package/lib/components/core/table/table.component.d.ts +0 -60
  439. package/lib/components/core/table/table.module.d.ts +0 -9
  440. package/lib/components/core/timeline/timeline-item/timeline-item.component.d.ts +0 -79
  441. package/lib/components/core/timeline/timeline.component.d.ts +0 -21
  442. package/lib/components/core/timeline/timeline.module.d.ts +0 -8
  443. package/lib/components/core/tooltip/tooltip.directive.d.ts +0 -82
  444. package/lib/components/form/autocomplete/autocomplete.component.d.ts +0 -59
  445. package/lib/components/form/checkbox/checkbox.component.d.ts +0 -41
  446. package/lib/components/form/form.module.d.ts +0 -18
  447. package/lib/components/form/input/input.component.d.ts +0 -95
  448. package/lib/components/form/password-input/password-input.component.d.ts +0 -80
  449. package/lib/components/form/radio-button/radio-button.component.d.ts +0 -38
  450. package/lib/components/form/range/range.component.d.ts +0 -42
  451. package/lib/components/form/rating/rating.component.d.ts +0 -24
  452. package/lib/components/form/select/select.component.d.ts +0 -36
  453. package/lib/components/form/textarea/textarea.component.d.ts +0 -34
  454. package/lib/components/form/transfer/store/transfer.reducers.d.ts +0 -103
  455. package/lib/components/form/transfer/store/transfer.state.d.ts +0 -18
  456. package/lib/components/form/transfer/store/transfer.store.d.ts +0 -23
  457. package/lib/components/form/transfer/transfer-list/transfer-list.component.d.ts +0 -48
  458. package/lib/components/form/transfer/transfer.component.d.ts +0 -75
  459. package/lib/components/form/upload-drag-drop/upload-drag-drop.component.d.ts +0 -60
  460. package/lib/components/form/upload-file-list/upload-file-list.component.d.ts +0 -62
  461. package/lib/components/navigation/back-button/back-button.component.d.ts +0 -47
  462. package/lib/components/navigation/back-to-top/back-to-top.component.d.ts +0 -50
  463. package/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.d.ts +0 -28
  464. package/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.d.ts +0 -23
  465. package/lib/components/navigation/breadcrumbs/breadcrumbs.module.d.ts +0 -8
  466. package/lib/components/navigation/header/header.component.d.ts +0 -36
  467. package/lib/components/navigation/megamenu/megamenu.component.d.ts +0 -22
  468. package/lib/components/navigation/navbar/navbar/navbar.component.d.ts +0 -16
  469. package/lib/components/navigation/navbar/navbar-item/navbar-item.component.d.ts +0 -5
  470. package/lib/components/navigation/navbar/navbar.module.d.ts +0 -8
  471. package/lib/components/navigation/navscroll/navscroll-list-item.component.d.ts +0 -16
  472. package/lib/components/navigation/navscroll/navscroll-list-items.component.d.ts +0 -7
  473. package/lib/components/navigation/navscroll/navscroll.component.d.ts +0 -47
  474. package/lib/components/navigation/navscroll/navscroll.store.d.ts +0 -16
  475. package/lib/components/navigation/navscroll/navscroll.utils.d.ts +0 -6
  476. package/lib/components/navigation/sidebar/sidebar.component.d.ts +0 -26
  477. package/lib/components/navigation/skiplink/skiplink/skiplink.component.d.ts +0 -17
  478. package/lib/components/navigation/skiplink/skiplink-item/skiplink-item.component.d.ts +0 -24
  479. package/lib/components/navigation/skiplink/skiplink.module.d.ts +0 -8
  480. package/lib/components/utils/error-page/error-page.component.d.ts +0 -44
  481. package/lib/components/utils/icon/icon.component.d.ts +0 -48
  482. package/lib/components/utils/language-switcher/language-switcher.component.d.ts +0 -27
  483. package/lib/design-angular-kit.module.d.ts +0 -53
  484. package/lib/enums/colors.enums.d.ts +0 -10
  485. package/lib/enums/sizes.enum.d.ts +0 -7
  486. package/lib/interfaces/design-angular-kit-config.d.ts +0 -30
  487. package/lib/interfaces/form.d.ts +0 -67
  488. package/lib/interfaces/icon.d.ts +0 -4
  489. package/lib/interfaces/sortable-table.d.ts +0 -33
  490. package/lib/interfaces/utils.d.ts +0 -10
  491. package/lib/pipes/date-ago.pipe.d.ts +0 -17
  492. package/lib/pipes/duration.pipe.d.ts +0 -35
  493. package/lib/pipes/mark-matching-text.pipe.d.ts +0 -18
  494. package/lib/provide-design-angular-kit.d.ts +0 -7
  495. package/lib/services/notification/notification.service.d.ts +0 -63
  496. package/lib/utils/date-utils.d.ts +0 -79
  497. package/lib/utils/file-utils.d.ts +0 -32
  498. package/lib/utils/regex.d.ts +0 -34
  499. package/lib/validators/it-validators.d.ts +0 -69
  500. package/schematics/ng-add/index.d.ts +0 -3
  501. package/schematics/ng-add/index.js +0 -29
  502. package/schematics/ng-add/index.js.map +0 -1
  503. package/schematics/ng-add/index.spec.d.ts +0 -1
  504. package/schematics/ng-add/index.spec.js +0 -43
  505. package/schematics/ng-add/index.spec.js.map +0 -1
  506. package/schematics/ng-add/rules/setup-project/add-animations.d.ts +0 -2
  507. package/schematics/ng-add/rules/setup-project/add-animations.js +0 -11
  508. package/schematics/ng-add/rules/setup-project/add-animations.js.map +0 -1
  509. package/schematics/ng-add/rules/setup-project/add-assets.d.ts +0 -3
  510. package/schematics/ng-add/rules/setup-project/add-assets.js +0 -50
  511. package/schematics/ng-add/rules/setup-project/add-assets.js.map +0 -1
  512. package/schematics/ng-add/rules/setup-project/add-design-angular-kit.d.ts +0 -3
  513. package/schematics/ng-add/rules/setup-project/add-design-angular-kit.js +0 -43
  514. package/schematics/ng-add/rules/setup-project/add-design-angular-kit.js.map +0 -1
  515. package/schematics/ng-add/rules/setup-project/add-http-client.d.ts +0 -2
  516. package/schematics/ng-add/rules/setup-project/add-http-client.js +0 -11
  517. package/schematics/ng-add/rules/setup-project/add-http-client.js.map +0 -1
  518. package/schematics/ng-add/rules/setup-project/add-import-to-style-file.d.ts +0 -11
  519. package/schematics/ng-add/rules/setup-project/add-import-to-style-file.js +0 -112
  520. package/schematics/ng-add/rules/setup-project/add-import-to-style-file.js.map +0 -1
  521. package/schematics/ng-add/rules/setup-project/add-localisation.d.ts +0 -3
  522. package/schematics/ng-add/rules/setup-project/add-localisation.js +0 -50
  523. package/schematics/ng-add/rules/setup-project/add-localisation.js.map +0 -1
  524. package/schematics/ng-add/rules/setup-project/angular-json-helper.d.ts +0 -2
  525. package/schematics/ng-add/rules/setup-project/angular-json-helper.js +0 -13
  526. package/schematics/ng-add/rules/setup-project/angular-json-helper.js.map +0 -1
  527. package/schematics/ng-add/rules/setup-project/exceptions.d.ts +0 -7
  528. package/schematics/ng-add/rules/setup-project/exceptions.js +0 -17
  529. package/schematics/ng-add/rules/setup-project/exceptions.js.map +0 -1
  530. package/schematics/ng-add/rules/setup-project/index.js +0 -23
  531. package/schematics/ng-add/rules/setup-project/index.js.map +0 -1
  532. package/schematics/ng-add/schema.js +0 -3
  533. package/schematics/ng-add/schema.js.map +0 -1
  534. package/schematics/ng-add/setup-project.d.ts +0 -3
  535. package/schematics/ng-add/setup-project.js +0 -37
  536. package/schematics/ng-add/setup-project.js.map +0 -1
  537. package/schematics/ng-add/setup-project.spec.d.ts +0 -1
  538. package/schematics/ng-add/setup-project.spec.js +0 -139
  539. package/schematics/ng-add/setup-project.spec.js.map +0 -1
  540. package/schematics/ng-add/utils.d.ts +0 -14
  541. package/schematics/ng-add/utils.js +0 -49
  542. package/schematics/ng-add/utils.js.map +0 -1
  543. package/schematics/ng-add/versions-helper.d.ts +0 -3
  544. package/schematics/ng-add/versions-helper.js +0 -40
  545. package/schematics/ng-add/versions-helper.js.map +0 -1
  546. /package/schematics/ng-add/rules/setup-project/{index.d.ts → index.ts} +0 -0
package/.eslintrc.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "extends": "../../.eslintrc.json",
3
+ "ignorePatterns": ["!**/*"],
4
+ "overrides": [
5
+ {
6
+ "files": ["*.ts"],
7
+ "rules": {
8
+ "@angular-eslint/directive-selector": [
9
+ "error",
10
+ {
11
+ "type": "attribute",
12
+ "prefix": "it",
13
+ "style": "camelCase"
14
+ }
15
+ ],
16
+ "@angular-eslint/component-selector": [
17
+ "error",
18
+ {
19
+ "type": "element",
20
+ "prefix": "it",
21
+ "style": "kebab-case"
22
+ }
23
+ ]
24
+ }
25
+ },
26
+ {
27
+ "files": ["*.html"],
28
+ "rules": {}
29
+ }
30
+ ]
31
+ }
package/karma.conf.js ADDED
@@ -0,0 +1,38 @@
1
+ // Karma configuration file, see link for more information
2
+ // https://karma-runner.github.io/1.0/config/configuration-file.html
3
+
4
+ module.exports = function (config) {
5
+ config.set({
6
+ basePath: '',
7
+ frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
+ plugins: [
9
+ require('karma-jasmine'),
10
+ require('karma-coverage'),
11
+ require('karma-chrome-launcher'),
12
+ require('karma-jasmine-html-reporter'),
13
+ require('karma-coverage-istanbul-reporter'),
14
+ require('@angular-devkit/build-angular/plugins/karma'),
15
+ ],
16
+ client: {
17
+ clearContext: false, // leave Jasmine Spec Runner output visible in browser
18
+ },
19
+ coverageIstanbulReporter: {
20
+ dir: require('path').join(__dirname, '../../coverage'),
21
+ reports: ['html', 'lcovonly', 'text-summary'],
22
+ fixWebpackSourcePaths: true,
23
+ },
24
+ reporters: ['progress', 'kjhtml', 'coverage-istanbul'],
25
+ port: 9876,
26
+ colors: true,
27
+ logLevel: config.LOG_INFO,
28
+ autoWatch: true,
29
+ browsers: ['Chrome'],
30
+ customLaunchers: {
31
+ ChromeNoSandbox: {
32
+ base: 'Chrome',
33
+ flags: ['--no-sandbox'],
34
+ },
35
+ },
36
+ singleRun: false,
37
+ });
38
+ };
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "../../dist/design-angular-kit",
4
+ "deleteDestPath": false,
5
+ "lib": {
6
+ "entryFile": "src/public_api.ts"
7
+ },
8
+ "assets": ["assets/**/*.json"]
9
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "../../dist/design-angular-kit",
4
+ "lib": {
5
+ "entryFile": "src/public_api.ts"
6
+ },
7
+ "assets": ["assets/**/*.json"]
8
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "design-angular-kit",
3
3
  "description": "Un toolkit Angular conforme alle linee guida di design per i servizi web della PA",
4
- "version": "1.1.4",
4
+ "version": "1.2.1",
5
5
  "license": "BSD-3-Clause",
6
6
  "keywords": [
7
7
  "angular",
@@ -27,6 +27,10 @@
27
27
  "url": "https://www.net-serv.it/"
28
28
  }
29
29
  ],
30
+ "scripts": {
31
+ "build": "tsc -p tsconfig.schematics.json",
32
+ "postbuild": "copyfiles schematics/*/schema.json schematics/*/files/** schematics/collection.json ../../dist/my-lib/"
33
+ },
30
34
  "schematics": "./schematics/collection.json",
31
35
  "ng-add": {
32
36
  "save": "dependencies"
@@ -42,20 +46,11 @@
42
46
  "@angular/router": "^18.0.0",
43
47
  "@ngx-translate/core": "^15.0.0",
44
48
  "@ngx-translate/http-loader": "^8.0.0",
45
- "bootstrap-italia": "^2.8.8"
49
+ "bootstrap-italia": "^2.13.4"
46
50
  },
47
51
  "sideEffects": false,
48
- "module": "fesm2022/design-angular-kit.mjs",
49
- "typings": "index.d.ts",
50
- "exports": {
51
- "./package.json": {
52
- "default": "./package.json"
53
- },
54
- ".": {
55
- "types": "./index.d.ts",
56
- "esm2022": "./esm2022/design-angular-kit.mjs",
57
- "esm": "./esm2022/design-angular-kit.mjs",
58
- "default": "./fesm2022/design-angular-kit.mjs"
59
- }
52
+ "devDependencies": {
53
+ "copyfiles": "file:../../node_modules/copyfiles",
54
+ "typescript": "file:../../node_modules/typescript"
60
55
  }
61
56
  }
@@ -0,0 +1,45 @@
1
+ import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
2
+ import * as path from 'path';
3
+ import { Schema as SchematicOptions } from './schema';
4
+
5
+ describe(`ng add design-angular-kit`, () => {
6
+ const collectionPath = path.join(__dirname, '../collection.json');
7
+ const runner = new SchematicTestRunner('schematics', collectionPath);
8
+
9
+ const defaultOptions: SchematicOptions = {
10
+ project: 'test-project', // Set your default project name
11
+ };
12
+
13
+ let appTree: UnitTestTree;
14
+
15
+ beforeEach(async () => {
16
+ // Simulate an Angular workspace project before running the schematic
17
+ appTree = await runner.runExternalSchematic('@schematics/angular', 'workspace', {
18
+ name: 'workspace',
19
+ version: '6.0.0',
20
+ newProjectRoot: 'projects',
21
+ });
22
+
23
+ appTree = await runner.runExternalSchematic(
24
+ '@schematics/angular',
25
+ 'application',
26
+ {
27
+ name: defaultOptions.project,
28
+ standalone: false,
29
+ },
30
+ appTree
31
+ );
32
+ });
33
+
34
+ it('should add DesignAngularKitModule to package.json', async () => {
35
+ const tree = await runner.runSchematic('ng-add', defaultOptions, appTree);
36
+
37
+ // Check if the package.json file exists
38
+ const packageJsonPath = '/package.json';
39
+ expect(tree.files).toContain(packageJsonPath);
40
+
41
+ // Check if the correct dependency was added
42
+ const content = tree.readContent(packageJsonPath);
43
+ expect(content).toContain(`"design-angular-kit"`);
44
+ });
45
+ });
@@ -0,0 +1,36 @@
1
+ import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
2
+ import { NodePackageInstallTask, RunSchematicTask } from '@angular-devkit/schematics/tasks';
3
+
4
+ import { Schema } from './schema';
5
+ import { addPackageToPackageJson, getPackageVersionFromPackageJson, toSemVerObject } from './utils';
6
+ import { getPackageVersion } from './versions-helper';
7
+
8
+ const DESIGN_ANGULAR_KIT_PACKAGE_NAME = 'design-angular-kit';
9
+ const NG_LATEST_VERSION = '19.0.0';
10
+
11
+ export default function (options: Schema): Rule {
12
+ return (host: Tree, context: SchematicContext) => {
13
+ // Get the version of `@angular/core`
14
+ // This tag should be preferred because all Angular dependencies should have the same version tag if possible.
15
+ const ngCoreVersionTag = getPackageVersionFromPackageJson(host, '@angular/core');
16
+ const designAngularKitVersionRange = getPackageVersionFromPackageJson(host, DESIGN_ANGULAR_KIT_PACKAGE_NAME);
17
+ const angularDependencyVersion = ngCoreVersionTag || NG_LATEST_VERSION;
18
+
19
+ const { major: angularMajorVersion } = toSemVerObject(angularDependencyVersion);
20
+
21
+ const designAngularKitPackageVersion = getPackageVersion({ angularMajorVersion });
22
+
23
+ // The CLI inserts `design-angular-kit` into the `package.json` before this schematic runs.
24
+ // This means that we do not need to insert Design Angular Kit into `package.json` files again.
25
+ if (designAngularKitVersionRange === null) {
26
+ addPackageToPackageJson(host, DESIGN_ANGULAR_KIT_PACKAGE_NAME, designAngularKitPackageVersion);
27
+ }
28
+
29
+ addPackageToPackageJson(host, '@angular/cdk', angularDependencyVersion);
30
+ addPackageToPackageJson(host, '@angular/animations', angularDependencyVersion);
31
+
32
+ const installTaskId = context.addTask(new NodePackageInstallTask());
33
+
34
+ context.addTask(new RunSchematicTask('ng-add-setup-project', options), [installTaskId]);
35
+ };
36
+ }
@@ -0,0 +1,7 @@
1
+ import { callRule, noop, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
2
+
3
+ export function addAnimations(): Rule {
4
+ //this dependency should be provided at application level instead of lib level. ref: provideDesignAngularKit
5
+ //provideAnimationsAsync(),
6
+ return (host: Tree, context: SchematicContext) => callRule(noop(), host, context);
7
+ }
@@ -0,0 +1,45 @@
1
+ import { JsonArray, JsonObject, workspaces } from '@angular-devkit/core';
2
+ import { Rule, Tree } from '@angular-devkit/schematics';
3
+ import { readWorkspace, writeWorkspace } from '@schematics/angular/utility';
4
+
5
+ import { Schema } from '../../schema';
6
+ import { getProjectTargetOptions } from './angular-json-helper';
7
+ import { NoProjectException } from './exceptions';
8
+
9
+ const ASSETS_CONFIG = {
10
+ glob: '**/*',
11
+ input: './node_modules/bootstrap-italia/',
12
+ output: '/bootstrap-italia/',
13
+ };
14
+
15
+ export function addAssets(options: Schema): Rule {
16
+ return async (host: Tree) => {
17
+ const workspace = await readWorkspace(host);
18
+
19
+ const projectName = options.project || workspace.extensions.defaultProject!.toString();
20
+ const project = workspace.projects.get(projectName);
21
+ if (!project) {
22
+ throw new NoProjectException(projectName);
23
+ }
24
+
25
+ addAssetsToAngularJson(project);
26
+ await writeWorkspace(host, workspace);
27
+ };
28
+ }
29
+
30
+ function addAssetsToAngularJson(project: workspaces.ProjectDefinition) {
31
+ const targetOptions = getProjectTargetOptions(project, 'build');
32
+ const assets = targetOptions.assets as JsonArray | undefined;
33
+ if (!assets) {
34
+ targetOptions.assets = [ASSETS_CONFIG];
35
+ } else {
36
+ const existingAssets = assets.map(s => (typeof s === 'string' ? s : (s as JsonObject)!['input'])) as Array<string>;
37
+
38
+ for (const [, input] of existingAssets.entries()) {
39
+ if (input === ASSETS_CONFIG.input) {
40
+ return;
41
+ }
42
+ }
43
+ assets.push(ASSETS_CONFIG);
44
+ }
45
+ }
@@ -0,0 +1,40 @@
1
+ import { Rule, SchematicContext, Tree, callRule } from '@angular-devkit/schematics';
2
+ import { isStandaloneApp } from '@angular/cdk/schematics';
3
+ import { addRootImport, addRootProvider, readWorkspace } from '@schematics/angular/utility';
4
+ import { getMainFilePath } from '@schematics/angular/utility/standalone/util';
5
+ import { firstValueFrom, map } from 'rxjs';
6
+ import { Schema } from '../../schema';
7
+ import { NoMainFileException, NoProjectException } from './exceptions';
8
+
9
+ export function addDesignAngularKit(options: Schema): Rule {
10
+ return async (host: Tree, context: SchematicContext) => {
11
+ const workspace = await readWorkspace(host);
12
+ const projectName = options.project || (workspace.extensions.defaultProject as string);
13
+
14
+ // 1. getting project by name
15
+ const project = workspace.projects.get(projectName);
16
+ if (!project) {
17
+ throw new NoProjectException(projectName);
18
+ }
19
+
20
+ // 2. getting main file for project
21
+ const mainFilePath = await getMainFilePath(host, projectName);
22
+ if (!mainFilePath || !host.read(mainFilePath)) {
23
+ throw new NoMainFileException(projectName);
24
+ }
25
+
26
+ const isNotStandaloneApp = !isStandaloneApp(host, mainFilePath);
27
+
28
+ const rule = isNotStandaloneApp
29
+ ? addRootImport(projectName, ({ code, external }) => code`${external('DesignAngularKitModule', 'design-angular-kit')}.forRoot()\n`)
30
+ : addRootProvider(projectName, ({ code, external }) => code`${external('provideDesignAngularKit', 'design-angular-kit')}()`);
31
+
32
+ return firstValueFrom(
33
+ callRule(rule, host, context).pipe(
34
+ map(() => {
35
+ return (): Rule => () => {};
36
+ })
37
+ )
38
+ );
39
+ };
40
+ }
@@ -0,0 +1,7 @@
1
+ import { Rule, SchematicContext, Tree, callRule, noop } from '@angular-devkit/schematics';
2
+
3
+ export function addHttpClient(): Rule {
4
+ //this dependency should be provided at application level instead of lib level. ref: provideDesignAngularKit
5
+ //provideHttpClient(),
6
+ return (host: Tree, context: SchematicContext) => callRule(noop(), host, context);
7
+ }
@@ -0,0 +1,120 @@
1
+ import { JsonArray, JsonObject, normalize, workspaces } from '@angular-devkit/core';
2
+ import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
3
+
4
+ import { readWorkspace, writeWorkspace } from '@schematics/angular/utility';
5
+ import * as path from 'path';
6
+
7
+ import { Schema } from '../../schema';
8
+ import { getProjectTargetOptions } from './angular-json-helper';
9
+ import { NoProjectException } from './exceptions';
10
+
11
+ const BOOTSTRAP_ITALIA_CSS_FILEPATH = 'node_modules/bootstrap-italia/dist/css/bootstrap-italia.min.css';
12
+ const SUPPORTED_BOOTSTRAP_ITALIA_STYLE_MAP: Record<string, string> = {
13
+ '.sass': `
14
+ /* Importazione libreria SCSS di bootstrap-italia */
15
+ @import 'bootstrap-italia/scss/bootstrap-italia'
16
+ `,
17
+ '.scss': `
18
+ /* Importazione libreria SCSS di bootstrap-italia */
19
+ @import '../node_modules/bootstrap-italia/src/scss/bootstrap-italia.scss';
20
+ `,
21
+ };
22
+
23
+ /**
24
+ * if supported
25
+ * add to styles.scss or to style.sass
26
+ * else
27
+ * add css to assets in angular.json
28
+ * @param options
29
+ * @returns Rule
30
+ */
31
+ export function addImportToStyleFile(options: Schema): Rule {
32
+ return async (host: Tree, context: SchematicContext) => {
33
+ const workspace = await readWorkspace(host);
34
+
35
+ const projectName = options.project || workspace.extensions.defaultProject!.toString();
36
+ const project = workspace.projects.get(projectName);
37
+ if (!project) {
38
+ throw new NoProjectException(projectName);
39
+ }
40
+
41
+ const styleFilePath = getProjectStyleFile(project as any) || '';
42
+ const styleFileExtension = path.extname(styleFilePath);
43
+ const styleFilePatch = SUPPORTED_BOOTSTRAP_ITALIA_STYLE_MAP[styleFileExtension];
44
+
45
+ // found supported styles
46
+ if (styleFilePatch) {
47
+ return addBootstrapItaliaToStylesFile(styleFilePath, styleFilePatch);
48
+ } else {
49
+ // found some styles, but unsupported
50
+ if (styleFileExtension !== '.css' && styleFileExtension !== '') {
51
+ context.logger.warn('messages.unsupportedStyles(styleFilePath)');
52
+ }
53
+
54
+ // just patching 'angular.json'
55
+ addBootstrapItaliaToAngularJson(project as any);
56
+ await writeWorkspace(host, workspace);
57
+ }
58
+ };
59
+ }
60
+
61
+ function addBootstrapItaliaToStylesFile(styleFilePath: string, styleFilePatch: string): Rule {
62
+ return async (host: Tree) => {
63
+ const styleContent = host.read(styleFilePath)!.toString('utf-8');
64
+
65
+ const recorder = host.beginUpdate(styleFilePath);
66
+ recorder.insertRight(styleContent.length, styleFilePatch);
67
+
68
+ host.commitUpdate(recorder);
69
+ };
70
+ }
71
+
72
+ function addBootstrapItaliaToAngularJson(project: workspaces.ProjectDefinition) {
73
+ const targetOptions = getProjectTargetOptions(project, 'build');
74
+ const styles = targetOptions.styles as JsonArray | undefined;
75
+ if (!styles) {
76
+ targetOptions.styles = [BOOTSTRAP_ITALIA_CSS_FILEPATH];
77
+ } else {
78
+ const existingStyles = styles.map(s => (typeof s === 'string' ? s : (s as JsonObject)!['input'])) as Array<string>;
79
+
80
+ for (const [, stylePath] of existingStyles.entries()) {
81
+ if (stylePath === BOOTSTRAP_ITALIA_CSS_FILEPATH) {
82
+ return;
83
+ }
84
+ }
85
+ styles.unshift(BOOTSTRAP_ITALIA_CSS_FILEPATH);
86
+ }
87
+ }
88
+
89
+ // Regular expression that matches all possible Angular CLI default style files
90
+ const defaultStyleFileRegex = /styles\.(c|le|sc|sa)ss/;
91
+
92
+ // Regular expression that matches all files that have a proper stylesheet extension
93
+ const validStyleFileRegex = /\.(c|le|sc|sa)ss/;
94
+
95
+ function getProjectStyleFile(project: workspaces.ProjectDefinition, extension?: string): string | null {
96
+ const buildOptions = getProjectTargetOptions(project, 'build');
97
+
98
+ if (buildOptions.styles && Array.isArray(buildOptions.styles) && buildOptions.styles.length) {
99
+ const styles = buildOptions.styles.map(s => (typeof s === 'string' ? s : (s as JsonObject)!['input'])) as Array<string>;
100
+
101
+ // Look for the default style file that is generated for new projects by the Angular CLI. This
102
+ // default style file is usually called `styles.ext` unless it has been changed explicitly.
103
+ const defaultMainStylePath = styles.find(file => (extension ? file === `styles.${extension}` : defaultStyleFileRegex.test(file)));
104
+
105
+ if (defaultMainStylePath) {
106
+ return normalize(defaultMainStylePath);
107
+ }
108
+
109
+ // If no default style file could be found, use the first style file that matches the given
110
+ // extension. If no extension specified explicitly, we look for any file with a valid style
111
+ // file extension.
112
+ const fallbackStylePath = styles.find(file => (extension ? file.endsWith(`.${extension}`) : validStyleFileRegex.test(file)));
113
+
114
+ if (fallbackStylePath) {
115
+ return normalize(fallbackStylePath);
116
+ }
117
+ }
118
+
119
+ return null;
120
+ }
@@ -0,0 +1,45 @@
1
+ import { JsonArray, JsonObject, workspaces } from '@angular-devkit/core';
2
+ import { Rule, Tree } from '@angular-devkit/schematics';
3
+ import { readWorkspace, writeWorkspace } from '@schematics/angular/utility';
4
+
5
+ import { Schema } from '../../schema';
6
+ import { getProjectTargetOptions } from './angular-json-helper';
7
+ import { NoProjectException } from './exceptions';
8
+
9
+ const LOCALISATION_CONFIG = {
10
+ glob: '**/*',
11
+ input: './node_modules/design-angular-kit/assets/i18n',
12
+ output: '/bootstrap-italia/i18n/',
13
+ };
14
+
15
+ export function addLocalisation(options: Schema): Rule {
16
+ return async (host: Tree) => {
17
+ const workspace = await readWorkspace(host);
18
+
19
+ const projectName = options.project || workspace.extensions.defaultProject!.toString();
20
+ const project = workspace.projects.get(projectName);
21
+ if (!project) {
22
+ throw new NoProjectException(projectName);
23
+ }
24
+
25
+ addLocalisationToAngularJson(project);
26
+ await writeWorkspace(host, workspace);
27
+ };
28
+ }
29
+
30
+ function addLocalisationToAngularJson(project: workspaces.ProjectDefinition) {
31
+ const targetOptions = getProjectTargetOptions(project, 'build');
32
+ const assets = targetOptions.assets as JsonArray | undefined;
33
+ if (!assets) {
34
+ targetOptions.assets = [LOCALISATION_CONFIG];
35
+ } else {
36
+ const existingAssets = assets.map(s => (typeof s === 'string' ? s : (s as JsonObject)!['input'])) as Array<string>;
37
+
38
+ for (const [, input] of existingAssets.entries()) {
39
+ if (input === LOCALISATION_CONFIG.input) {
40
+ return;
41
+ }
42
+ }
43
+ assets.push(LOCALISATION_CONFIG);
44
+ }
45
+ }
@@ -0,0 +1,11 @@
1
+ import { workspaces } from '@angular-devkit/core';
2
+ import { SchematicsException } from '@angular-devkit/schematics';
3
+
4
+ export function getProjectTargetOptions(project: workspaces.ProjectDefinition, buildTarget: string) {
5
+ const buildTargetObject = project.targets.get(buildTarget);
6
+ if (buildTargetObject && buildTargetObject.options) {
7
+ return buildTargetObject.options;
8
+ }
9
+
10
+ throw new SchematicsException(`Cannot determine project target configuration for: ${buildTarget}.`);
11
+ }
@@ -0,0 +1,13 @@
1
+ import { SchematicsException } from '@angular-devkit/schematics';
2
+
3
+ export class NoProjectException extends SchematicsException {
4
+ constructor(project: string) {
5
+ super(`Unable to find project '${project}' in the workspace`);
6
+ }
7
+ }
8
+
9
+ export class NoMainFileException extends SchematicsException {
10
+ constructor(project: string) {
11
+ super(`Unable to find 'build.options.main' file path for project "${project}`);
12
+ }
13
+ }
@@ -1,3 +1,3 @@
1
1
  export interface Schema {
2
- project: string;
2
+ project: string;
3
3
  }