design-angular-kit 1.0.0-9 → 1.0.0-prerelease.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 (255) hide show
  1. package/README.md +77 -7
  2. package/assets/i18n/en.json +81 -12
  3. package/assets/i18n/it.json +80 -11
  4. package/esm2022/lib/abstracts/abstract-form.component.mjs +187 -0
  5. package/esm2022/lib/abstracts/abstract.component.mjs +45 -0
  6. package/esm2022/lib/components/components.module.mjs +218 -0
  7. package/esm2022/lib/components/core/accordion/accordion.component.mjs +38 -0
  8. package/esm2022/lib/components/core/alert/alert.component.mjs +72 -0
  9. package/esm2022/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.mjs +43 -0
  10. package/esm2022/lib/components/core/avatar/avatar-group/avatar-group.component.mjs +38 -0
  11. package/esm2022/lib/components/core/avatar/avatar.directive.mjs +78 -0
  12. package/esm2022/lib/components/core/badge/badge.directive.mjs +39 -0
  13. package/esm2022/lib/components/core/button/button.directive.mjs +86 -0
  14. package/esm2022/lib/components/core/callout/callout.component.mjs +57 -0
  15. package/esm2022/lib/components/core/card/card.component.mjs +59 -0
  16. package/esm2022/lib/components/core/carousel/carousel/carousel.component.mjs +81 -0
  17. package/esm2022/lib/components/core/carousel/carousel-item/carousel-item.component.mjs +19 -0
  18. package/esm2022/lib/components/core/carousel/carousel.module.mjs +23 -0
  19. package/esm2022/lib/components/core/chip/chip.component.mjs +96 -0
  20. package/esm2022/lib/components/core/collapse/collapse.component.mjs +104 -0
  21. package/esm2022/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.mjs +24 -0
  22. package/esm2022/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.mjs +11 -0
  23. package/esm2022/lib/components/core/dimmer/dimmer.component.mjs +59 -0
  24. package/esm2022/lib/components/core/dimmer/dimmer.module.mjs +27 -0
  25. package/esm2022/lib/components/core/dropdown/dropdown/dropdown.component.mjs +141 -0
  26. package/esm2022/lib/components/core/dropdown/dropdown-item/dropdown-item.component.mjs +62 -0
  27. package/esm2022/lib/components/core/dropdown/dropdown.module.mjs +18 -0
  28. package/esm2022/lib/components/core/forward/forward.directive.mjs +53 -0
  29. package/esm2022/lib/components/core/link/link.component.mjs +42 -0
  30. package/esm2022/lib/components/core/list/list/list.component.mjs +22 -0
  31. package/esm2022/lib/components/core/list/list-item/list-item.component.mjs +51 -0
  32. package/esm2022/lib/components/core/list/list.module.mjs +23 -0
  33. package/esm2022/lib/components/core/modal/modal.component.mjs +195 -0
  34. package/esm2022/lib/components/core/notifications/notifications.component.mjs +112 -0
  35. package/esm2022/lib/components/core/pagination/pagination.component.mjs +127 -0
  36. package/esm2022/lib/components/core/popover/popover.directive.mjs +176 -0
  37. package/esm2022/lib/components/core/progress-bar/progress-bar.component.mjs +34 -0
  38. package/esm2022/lib/components/core/progress-button/progress-button.component.mjs +26 -0
  39. package/esm2022/lib/components/core/spinner/spinner.component.mjs +31 -0
  40. package/esm2022/lib/components/core/steppers/steppers-container/steppers-container.component.mjs +112 -0
  41. package/esm2022/lib/components/core/steppers/steppers-item/steppers-item.component.mjs +19 -0
  42. package/esm2022/lib/components/core/steppers/steppers.module.mjs +23 -0
  43. package/esm2022/lib/components/core/tab/tab-container/tab-container.component.mjs +60 -0
  44. package/esm2022/lib/components/core/tab/tab-item/tab-item.component.mjs +39 -0
  45. package/esm2022/lib/components/core/tab/tab.module.mjs +23 -0
  46. package/esm2022/lib/components/core/table/sort/sort-header/sort-header.component.mjs +136 -0
  47. package/esm2022/lib/components/core/table/sort/sort.directive.mjs +123 -0
  48. package/esm2022/lib/components/core/table/table.component.mjs +45 -0
  49. package/esm2022/lib/components/core/tooltip/tooltip.directive.mjs +143 -0
  50. package/esm2022/lib/components/form/autocomplete/autocomplete.component.mjs +95 -0
  51. package/esm2022/lib/components/form/checkbox/checkbox.component.mjs +48 -0
  52. package/esm2022/lib/components/form/form.module.mjs +59 -0
  53. package/esm2022/lib/components/form/input/input.component.mjs +187 -0
  54. package/esm2022/lib/components/form/password-input/password-input.component.mjs +149 -0
  55. package/esm2022/lib/components/form/radio-button/radio-button.component.mjs +58 -0
  56. package/esm2022/lib/components/form/range/range.component.mjs +64 -0
  57. package/esm2022/lib/components/form/rating/rating.component.mjs +51 -0
  58. package/esm2022/lib/components/form/select/select.component.mjs +70 -0
  59. package/esm2022/lib/components/form/textarea/textarea.component.mjs +55 -0
  60. package/esm2022/lib/components/form/upload-drag-drop/upload-drag-drop.component.mjs +140 -0
  61. package/esm2022/lib/components/form/upload-file-list/upload-file-list.component.mjs +107 -0
  62. package/esm2022/lib/components/navigation/back-button/back-button.component.mjs +67 -0
  63. package/esm2022/lib/components/navigation/back-to-top/back-to-top.component.mjs +58 -0
  64. package/esm2022/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.mjs +55 -0
  65. package/esm2022/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.mjs +21 -0
  66. package/esm2022/lib/components/navigation/breadcrumbs/breadcrumbs.module.mjs +18 -0
  67. package/esm2022/lib/components/navigation/header/header.component.mjs +73 -0
  68. package/esm2022/lib/components/navigation/navbar/navbar/navbar.component.mjs +41 -0
  69. package/esm2022/lib/components/navigation/navbar/navbar-item/navbar-item.component.mjs +13 -0
  70. package/esm2022/lib/components/navigation/navbar/navbar.module.mjs +18 -0
  71. package/esm2022/lib/components/utils/error-page/error-page.component.mjs +75 -0
  72. package/esm2022/lib/components/utils/icon/icon.component.mjs +56 -0
  73. package/esm2022/lib/components/utils/language-switcher/language-switcher.component.mjs +47 -0
  74. package/esm2022/lib/design-angular-kit-config.mjs +15 -0
  75. package/esm2022/lib/design-angular-kit.module.mjs +68 -0
  76. package/esm2022/lib/enums/colors.enums.mjs +12 -0
  77. package/esm2022/lib/enums/sizes.enum.mjs +9 -0
  78. package/esm2022/lib/interfaces/core.mjs +16 -0
  79. package/esm2022/lib/interfaces/design-angular-kit-init.mjs +2 -0
  80. package/esm2022/lib/interfaces/form.mjs +2 -0
  81. package/esm2022/lib/interfaces/icon.mjs +165 -0
  82. package/esm2022/lib/interfaces/sortable-table.mjs +6 -0
  83. package/esm2022/lib/pipes/date-ago.pipe.mjs +56 -0
  84. package/esm2022/lib/pipes/duration.pipe.mjs +110 -0
  85. package/esm2022/lib/pipes/mark-matching-text.pipe.mjs +48 -0
  86. package/esm2022/lib/services/notification/notification.service.mjs +120 -0
  87. package/esm2022/lib/utils/coercion.mjs +18 -0
  88. package/esm2022/lib/utils/date-utils.mjs +160 -0
  89. package/esm2022/lib/utils/file-utils.mjs +73 -0
  90. package/esm2022/lib/utils/regex.mjs +31 -0
  91. package/esm2022/lib/validators/it-validators.mjs +153 -0
  92. package/esm2022/public_api.mjs +98 -0
  93. package/fesm2022/design-angular-kit.mjs +5450 -0
  94. package/fesm2022/design-angular-kit.mjs.map +1 -0
  95. package/lib/abstracts/{abstract-form-component.d.ts → abstract-form.component.d.ts} +12 -14
  96. package/lib/abstracts/abstract.component.d.ts +18 -8
  97. package/lib/components/components.module.d.ts +45 -0
  98. package/lib/components/core/accordion/accordion.component.d.ts +11 -5
  99. package/lib/components/core/alert/alert.component.d.ts +15 -10
  100. package/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.d.ts +29 -0
  101. package/lib/components/core/avatar/avatar-group/avatar-group.component.d.ts +13 -0
  102. package/lib/components/core/avatar/avatar.directive.d.ts +33 -0
  103. package/lib/components/core/badge/badge.directive.d.ts +14 -7
  104. package/lib/components/core/button/button.directive.d.ts +25 -15
  105. package/lib/components/core/callout/callout.component.d.ts +18 -20
  106. package/lib/components/core/card/card.component.d.ts +46 -18
  107. package/lib/components/core/carousel/carousel/carousel.component.d.ts +34 -15
  108. package/lib/components/core/carousel/carousel-item/carousel-item.component.d.ts +8 -3
  109. package/lib/components/core/carousel/carousel.module.d.ts +8 -0
  110. package/lib/components/core/chip/chip.component.d.ts +8 -5
  111. package/lib/components/core/collapse/collapse.component.d.ts +22 -15
  112. package/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.d.ts +3 -3
  113. package/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.d.ts +3 -3
  114. package/lib/components/core/dimmer/dimmer.component.d.ts +4 -4
  115. package/lib/components/core/dimmer/dimmer.module.d.ts +9 -0
  116. package/lib/components/core/dropdown/dropdown/dropdown.component.d.ts +24 -17
  117. package/lib/components/core/dropdown/dropdown-item/dropdown-item.component.d.ts +15 -12
  118. package/lib/components/core/dropdown/dropdown.module.d.ts +8 -0
  119. package/lib/components/core/forward/forward.directive.d.ts +3 -3
  120. package/lib/components/core/link/link.component.d.ts +14 -10
  121. package/lib/components/core/list/list/list.component.d.ts +20 -6
  122. package/lib/components/core/list/list-item/list-item.component.d.ts +23 -9
  123. package/lib/components/core/list/list.module.d.ts +8 -0
  124. package/lib/components/core/modal/modal.component.d.ts +89 -13
  125. package/lib/components/core/notifications/notifications.component.d.ts +9 -8
  126. package/lib/components/core/pagination/pagination.component.d.ts +71 -10
  127. package/lib/components/core/popover/popover.directive.d.ts +15 -14
  128. package/lib/components/core/progress-bar/progress-bar.component.d.ts +11 -8
  129. package/lib/components/core/progress-button/progress-button.component.d.ts +5 -6
  130. package/lib/components/core/spinner/spinner.component.d.ts +13 -10
  131. package/lib/components/core/steppers/steppers-container/steppers-container.component.d.ts +55 -27
  132. package/lib/components/core/steppers/steppers-item/steppers-item.component.d.ts +5 -4
  133. package/lib/components/core/steppers/steppers.module.d.ts +8 -0
  134. package/lib/components/core/tab/tab-container/tab-container.component.d.ts +15 -12
  135. package/lib/components/core/tab/tab-item/tab-item.component.d.ts +14 -10
  136. package/lib/components/core/tab/tab.module.d.ts +8 -0
  137. package/lib/components/core/table/sort/sort-header/sort-header.component.d.ts +72 -0
  138. package/lib/components/core/table/sort/sort.directive.d.ts +53 -0
  139. package/lib/components/core/table/table.component.d.ts +26 -20
  140. package/lib/components/core/tooltip/tooltip.directive.d.ts +12 -11
  141. package/lib/components/form/autocomplete/autocomplete.component.d.ts +49 -0
  142. package/lib/components/form/checkbox/checkbox.component.d.ts +23 -12
  143. package/lib/components/form/form.module.d.ts +17 -0
  144. package/lib/components/form/input/input.component.d.ts +42 -43
  145. package/lib/components/form/password-input/password-input.component.d.ts +35 -10
  146. package/lib/components/form/radio-button/radio-button.component.d.ts +20 -11
  147. package/lib/components/form/range/range.component.d.ts +42 -0
  148. package/lib/components/form/rating/rating.component.d.ts +24 -0
  149. package/lib/components/form/select/select.component.d.ts +12 -6
  150. package/lib/components/form/textarea/textarea.component.d.ts +15 -5
  151. package/lib/components/form/upload-drag-drop/upload-drag-drop.component.d.ts +5 -5
  152. package/lib/components/form/upload-file-list/upload-file-list.component.d.ts +14 -11
  153. package/lib/components/navigation/back-button/back-button.component.d.ts +8 -8
  154. package/lib/components/navigation/back-to-top/back-to-top.component.d.ts +15 -16
  155. package/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.d.ts +13 -10
  156. package/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.d.ts +9 -8
  157. package/lib/components/navigation/breadcrumbs/breadcrumbs.module.d.ts +8 -0
  158. package/lib/components/navigation/header/header.component.d.ts +22 -25
  159. package/lib/components/navigation/navbar/navbar/navbar.component.d.ts +16 -0
  160. package/lib/components/navigation/navbar/navbar-item/navbar-item.component.d.ts +5 -0
  161. package/lib/components/navigation/navbar/navbar.module.d.ts +8 -0
  162. package/lib/components/utils/error-page/error-page.component.d.ts +44 -0
  163. package/lib/components/utils/icon/icon.component.d.ts +15 -15
  164. package/lib/components/utils/language-switcher/language-switcher.component.d.ts +9 -5
  165. package/lib/design-angular-kit-config.d.ts +16 -0
  166. package/lib/design-angular-kit.module.d.ts +6 -4
  167. package/lib/enums/colors.enums.d.ts +10 -0
  168. package/lib/enums/sizes.enum.d.ts +7 -0
  169. package/lib/interfaces/core.d.ts +16 -15
  170. package/lib/interfaces/design-angular-kit-init.d.ts +7 -0
  171. package/lib/interfaces/form.d.ts +9 -9
  172. package/lib/interfaces/icon.d.ts +4 -3
  173. package/lib/interfaces/sortable-table.d.ts +33 -0
  174. package/lib/pipes/date-ago.pipe.d.ts +17 -0
  175. package/lib/pipes/duration.pipe.d.ts +35 -0
  176. package/lib/pipes/mark-matching-text.pipe.d.ts +15 -7
  177. package/lib/services/{notifications/notifications.service.d.ts → notification/notification.service.d.ts} +3 -3
  178. package/lib/utils/coercion.d.ts +14 -0
  179. package/lib/utils/date-utils.d.ts +78 -0
  180. package/lib/utils/file-utils.d.ts +1 -1
  181. package/lib/utils/regex.d.ts +5 -0
  182. package/lib/validators/it-validators.d.ts +9 -2
  183. package/package.json +14 -20
  184. package/public_api.d.ts +29 -4
  185. package/esm2020/lib/abstracts/abstract-form-component.mjs +0 -174
  186. package/esm2020/lib/abstracts/abstract.component.mjs +0 -27
  187. package/esm2020/lib/components/core/accordion/accordion.component.mjs +0 -31
  188. package/esm2020/lib/components/core/alert/alert.component.mjs +0 -69
  189. package/esm2020/lib/components/core/badge/badge.directive.mjs +0 -34
  190. package/esm2020/lib/components/core/button/button.directive.mjs +0 -80
  191. package/esm2020/lib/components/core/callout/callout.component.mjs +0 -84
  192. package/esm2020/lib/components/core/card/card.component.mjs +0 -58
  193. package/esm2020/lib/components/core/carousel/carousel/carousel.component.mjs +0 -66
  194. package/esm2020/lib/components/core/carousel/carousel-item/carousel-item.component.mjs +0 -14
  195. package/esm2020/lib/components/core/chip/chip.component.mjs +0 -89
  196. package/esm2020/lib/components/core/collapse/collapse.component.mjs +0 -101
  197. package/esm2020/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.mjs +0 -24
  198. package/esm2020/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.mjs +0 -11
  199. package/esm2020/lib/components/core/dimmer/dimmer.component.mjs +0 -59
  200. package/esm2020/lib/components/core/dropdown/dropdown/dropdown.component.mjs +0 -130
  201. package/esm2020/lib/components/core/dropdown/dropdown-item/dropdown-item.component.mjs +0 -68
  202. package/esm2020/lib/components/core/forward/forward.directive.mjs +0 -51
  203. package/esm2020/lib/components/core/link/link.component.mjs +0 -40
  204. package/esm2020/lib/components/core/list/list/list.component.mjs +0 -13
  205. package/esm2020/lib/components/core/list/list-item/list-item.component.mjs +0 -36
  206. package/esm2020/lib/components/core/modal/modal.component.mjs +0 -98
  207. package/esm2020/lib/components/core/notifications/notifications.component.mjs +0 -110
  208. package/esm2020/lib/components/core/pagination/pagination.component.mjs +0 -51
  209. package/esm2020/lib/components/core/popover/popover.directive.mjs +0 -179
  210. package/esm2020/lib/components/core/progress-bar/progress-bar.component.mjs +0 -34
  211. package/esm2020/lib/components/core/progress-button/progress-button.component.mjs +0 -27
  212. package/esm2020/lib/components/core/spinner/spinner.component.mjs +0 -35
  213. package/esm2020/lib/components/core/steppers/steppers-container/steppers-container.component.mjs +0 -119
  214. package/esm2020/lib/components/core/steppers/steppers-item/steppers-item.component.mjs +0 -18
  215. package/esm2020/lib/components/core/tab/tab-container/tab-container.component.mjs +0 -59
  216. package/esm2020/lib/components/core/tab/tab-item/tab-item.component.mjs +0 -36
  217. package/esm2020/lib/components/core/table/table.component.mjs +0 -57
  218. package/esm2020/lib/components/core/tooltip/tooltip.directive.mjs +0 -143
  219. package/esm2020/lib/components/form/checkbox/checkbox.component.mjs +0 -40
  220. package/esm2020/lib/components/form/input/input.component.mjs +0 -222
  221. package/esm2020/lib/components/form/password-input/password-input.component.mjs +0 -112
  222. package/esm2020/lib/components/form/radio-button/radio-button.component.mjs +0 -53
  223. package/esm2020/lib/components/form/select/select.component.mjs +0 -62
  224. package/esm2020/lib/components/form/textarea/textarea.component.mjs +0 -46
  225. package/esm2020/lib/components/form/upload-drag-drop/upload-drag-drop.component.mjs +0 -137
  226. package/esm2020/lib/components/form/upload-file-list/upload-file-list.component.mjs +0 -104
  227. package/esm2020/lib/components/navigation/back-button/back-button.component.mjs +0 -69
  228. package/esm2020/lib/components/navigation/back-to-top/back-to-top.component.mjs +0 -74
  229. package/esm2020/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.mjs +0 -45
  230. package/esm2020/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.mjs +0 -23
  231. package/esm2020/lib/components/navigation/header/header.component.mjs +0 -63
  232. package/esm2020/lib/components/utils/icon/icon.component.mjs +0 -54
  233. package/esm2020/lib/components/utils/language-switcher/language-switcher.component.mjs +0 -39
  234. package/esm2020/lib/components/utils/not-found-page/not-found-page.component.mjs +0 -13
  235. package/esm2020/lib/design-angular-kit.module.mjs +0 -56
  236. package/esm2020/lib/interfaces/core.mjs +0 -16
  237. package/esm2020/lib/interfaces/form.mjs +0 -2
  238. package/esm2020/lib/interfaces/icon.mjs +0 -2
  239. package/esm2020/lib/modules/components.module.mjs +0 -257
  240. package/esm2020/lib/pipes/mark-matching-text.pipe.mjs +0 -36
  241. package/esm2020/lib/services/notifications/notifications.service.mjs +0 -120
  242. package/esm2020/lib/utils/boolean-input.mjs +0 -15
  243. package/esm2020/lib/utils/file-utils.mjs +0 -73
  244. package/esm2020/lib/utils/regex.mjs +0 -26
  245. package/esm2020/lib/validators/it-validators.mjs +0 -134
  246. package/esm2020/public_api.mjs +0 -70
  247. package/fesm2015/design-angular-kit.mjs +0 -3850
  248. package/fesm2015/design-angular-kit.mjs.map +0 -1
  249. package/fesm2020/design-angular-kit.mjs +0 -3797
  250. package/fesm2020/design-angular-kit.mjs.map +0 -1
  251. package/lib/components/utils/not-found-page/not-found-page.component.d.ts +0 -5
  252. package/lib/modules/components.module.d.ts +0 -61
  253. package/lib/utils/boolean-input.d.ts +0 -11
  254. /package/{esm2020 → esm2022}/design-angular-kit.mjs +0 -0
  255. /package/{esm2020 → esm2022}/lib/interfaces/utils.mjs +0 -0
package/README.md CHANGED
@@ -14,13 +14,29 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
+ <a href="https://www.npmjs.com/package/design-angular-kit"><img src="https://img.shields.io/npm/v/design-angular-kit/prerelease.svg" alt="NPM"></a>
17
18
  <a href="https://www.npmjs.com/package/design-angular-kit"><img src="https://img.shields.io/npm/v/design-angular-kit/unstable.svg" alt="NPM"></a>
18
- <a href="https://github.com/italia/design-angular-kit/actions"><img src="https://github.com/italia/design-angular-kit/actions/workflows/ci.yml/badge.svg" alt="Build"></a>
19
+ </p>
20
+
21
+ <p align="center">
22
+ <a href="https://github.com/italia/design-angular-kit/actions"><img src="https://github.com/italia/design-angular-kit/actions/workflows/publish-release.yml/badge.svg" alt="Build"></a>
19
23
  <a href="https://codecov.io/gh/italia/design-angular-kit"><img src="https://codecov.io/gh/italia/design-angular-kit/branch/main/graph/badge.svg?token=0Ud6YSFi0r" alt="codecov"></a>
20
24
  <a href="https://github.com/italia/design-angular-kit/blob/main/LICENSE"><img src="https://img.shields.io/github/license/italia/design-angular-kit.svg" alt="License"></a>
21
25
  <a href="https://github.com/italia/design-angular-kit/issues"><img src="https://img.shields.io/github/issues/italia/design-angular-kit.svg" alt="GitHub issues"></a>
22
26
  </p>
23
27
 
28
+ <p align="center">
29
+ <a href="https://github.com/semantic-release/semantic-release">
30
+ <img src="https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release" alt="semantic-release: angular" />
31
+ </a>
32
+ <a href="https://github.com/prettier/prettier">
33
+ <img src="https://img.shields.io/badge/code%20style-prettier-ff69b4?logo=Prettier" alt="code style: prettier" />
34
+ </a>
35
+ <a href="https://github.com/eslint/eslint">
36
+ <img src="https://img.shields.io/badge/formatter-angular--eslint-4B32C3?logo=eslint" alt="formatter: angular-eslint" />
37
+ </a>
38
+ </p>
39
+
24
40
  <p align="center">
25
41
  <a href="https://developersitalia.slack.com/messages/C04H3C19D52/">
26
42
  <img src="https://img.shields.io/badge/Slack%20channel-%23design--dev--angular-blue.svg" alt="Join the #design-dev-angular channel" />
@@ -45,29 +61,83 @@ Sul branch `main` potete trovare il codice dei lavori in corso e nella [mileston
45
61
 
46
62
  **Commenti e contributi di tutta la community sono più che benvenuti!** 🎉
47
63
 
48
- #### Link veloci
49
- [Preview di Vercel (aggiornata ad ogni commit)](https://design-angular-kit.vercel.app/) |
50
- [Discussione sulla nuova release](https://github.com/italia/design-angular-kit/discussions/127) |
51
- [Milestone 1.0.0](https://github.com/italia/design-angular-kit/milestone/3)
64
+ ## Link utili
65
+ - [Video Commit University: Sviluppare da zero una Angular Web App per la PA](https://www.youtube.com/watch?v=gH-0P36E5jk&t=385s) ([slide](https://www.slideshare.net/commitsoftware/sviluppare-da-zero-una-angular-web-app-per-la-pa))
66
+ - [Video Meetup Angular Roma: Angular, Bootstrap Italia e non solo..](https://www.youtube.com/live/asGk-mYU-zM?feature=share)
67
+ - [Demo Design Angular Kit](https://github.com/cri99/demo-design-angular-kit)
68
+ - [Preview di Vercel (aggiornata ad ogni commit)](https://design-angular-kit.vercel.app/)
69
+ - [Discussione sulla nuova release](https://github.com/italia/design-angular-kit/discussions/127)
70
+ - [Milestone 1.0.0](https://github.com/italia/design-angular-kit/milestone/3)
52
71
 
53
72
  ## Come iniziare
54
73
 
55
74
  Design Angular Kit è disponibile su NPM, per installarlo su una applicazione esistente sulla quale provare la libreria (attualmente non stabile) esegui il comando
56
75
 
57
76
  ```
58
- npm install design-angular-kit@unstable --save
77
+ npm install design-angular-kit@prerelease --save
59
78
  ```
60
79
 
61
80
  Procedi a registrare `DesignAngularKitModule` nel tuo **app.module.ts**.
62
81
 
63
82
  ```typescript
83
+ import {DesignAngularKitModule, ItComponentsModule} from 'design-angular-kit';
84
+
64
85
  @NgModule({
65
86
  imports: [
66
87
  ...
67
- DesignAngularKitModule
88
+ DesignAngularKitModule,
89
+ ItComponentsModule // importa tutti i componenti della libreria
68
90
  ]
69
91
  })
70
92
  ```
93
+ <details>
94
+ <summary>Configurazione custom della libreria</summary>
95
+
96
+ ```typescript
97
+ import {DesignAngularKitModule, DesignAngularKitInit} from 'design-angular-kit';
98
+
99
+ // Puoi aggiungere alla libreria una configurazione iniziale
100
+ const initConfig: DesignAngularKitInit | undefined = {
101
+ /**
102
+ * The initial path in the `href` attribute in the `IconComponent` component
103
+ * @default './bootstrap-italia/dist/svg/sprites.svg'
104
+ */
105
+ iconHref: string | undefined,
106
+ };
107
+
108
+ @NgModule({
109
+ imports: [
110
+ ...
111
+ DesignAngularKitModule.forRoot(initConfig)
112
+ ]
113
+ })
114
+ ```
115
+ </details>
116
+
117
+ Usa `ItComponentsModule` per importare tutti i componenti della libreria, in alternativa puoi importare solo i componenti/moduli di cui hai bisogno, ad es. Alert, Paginazione e Breadcrumb.
118
+
119
+ ```typescript
120
+ import {ItAlertComponent, ItPaginationComponent, ItBreadcrumbsModule} from 'design-angular-kit';
121
+
122
+ @NgModule({
123
+ imports: [
124
+ ItAlertComponent,
125
+ ItPaginationComponent,
126
+ ItBreadcrumbsModule // Include ItBreadcrumbComponent e ItBreadcrumbItemComponent
127
+ ],
128
+ })
129
+ export class YourAppModule {
130
+ }
131
+
132
+ @Component({
133
+ selector: 'app-product',
134
+ standalone: true,
135
+ imports: [ItAlertComponent],
136
+ templateUrl: './product.component.html'
137
+ })
138
+ export class ProductComponent {
139
+ }
140
+ ```
71
141
 
72
142
  ### Importazione stili bootstrap-italia
73
143
  Configura gli stili richiesti nel file `styles.scss`. Importa la libreria SCSS come mostrato nell'esempio qui sotto.
@@ -7,8 +7,10 @@
7
7
  "close": "Close",
8
8
  "continue": "Continue",
9
9
  "edit": "Edit",
10
+ "show": "Show",
10
11
  "show-all": "Show all",
11
- "details": "Details"
12
+ "details": "Details",
13
+ "download": "Download"
12
14
  },
13
15
  "errors": {
14
16
  "generic": "An error has occurred",
@@ -19,29 +21,34 @@
19
21
  "min-invalid": "The minimum value for this field is: {{min}}",
20
22
  "max-invalid": "The maximum value for this field is: {{max}}",
21
23
  "min-length-invalid": "The minimum length for this field is: {{min}}",
22
- "max-length-invalid": "The minimum length for this field is: {{max}}",
24
+ "max-length-invalid": "The maximum length for this field is: {{max}}",
23
25
  "email-invalid": "Enter a valid email",
24
26
  "tel-invalid": "Please enter a valid phone number format",
25
27
  "url-invalid": "Please enter a valid URL",
26
28
  "tax-code-invalid": "Enter a valid tax code",
27
29
  "vat-number-invalid": "Enter a valid VAT number",
28
30
  "cap-invalid": "Enter a valid zip code",
31
+ "iban-invalid": "Enter a valid IBAN",
29
32
  "regex-invalid": "Please enter a valid REGEX expression",
30
33
  "pattern-invalid": "The field must have the pattern {{pattern}}",
31
34
  "password-no-match": "Passwords must match",
32
- "password-min-length": "Password must contain at least {{minLength}} characters!",
33
- "password-number": "The password must have at least 1 number!",
34
- "password-capital-case": "The password should contain at least 1 uppercase character!",
35
- "password-small-case": "Password must contain at least 1 lowercase character!",
36
- "password-special-character": "Password must contain at least 1 special character!"
35
+ "password-min-length": "The password must contain at least {{minLength}} characters!",
36
+ "password-number": "The password must have at least a number!",
37
+ "password-capital-case": "The password should contain at least an uppercase character!",
38
+ "password-small-case": "The password must contain at least a lowercase character!",
39
+ "password-special-character": "The password must contain at least a special character!"
37
40
  },
38
41
  "core": {
39
42
  "close-modal": "Close modal window",
40
43
  "close-notification": "Close Notification: {{title}}",
41
44
  "close-alert": "Close alert",
42
45
  "page": "Page",
46
+ "previous": "Previous",
43
47
  "previous-page": "Previous page",
48
+ "next": "Next",
44
49
  "next-page": "Next page",
50
+ "go-to": "Go to",
51
+ "page-of-total": "Page {{page}} of {{total}}",
45
52
  "progress": "Progress",
46
53
  "loading": "Loading",
47
54
  "active": "Active",
@@ -51,9 +58,24 @@
51
58
  "step": "Step",
52
59
  "step-of": "Step {{current}} of {{available}}",
53
60
  "back": "Back",
54
- "forward": "Forward"
61
+ "forward": "Forward",
62
+ "rate-star": "Rate {{current}} out of {{total}} stars",
63
+ "rating-star": "Rating {{current}} out of {{total}} stars"
55
64
  },
56
65
  "form": {
66
+ "caps-inserted": "CAPS LOCK entered",
67
+ "password-strength-meter": {
68
+ "description": {
69
+ "default": "Enter at least {{minLength}} characters",
70
+ "number": "a number",
71
+ "capital-case": "an uppercase character",
72
+ "special-character": "a special character"
73
+ },
74
+ "password-short": "Very weak password",
75
+ "password-bad": "Weak password",
76
+ "password-good": "Secure password",
77
+ "password-strong": "Very secure password"
78
+ },
57
79
  "increase-value": "Increase value",
58
80
  "decrease-value": "Decrease value",
59
81
  "upload": "Upload",
@@ -76,16 +98,63 @@
76
98
  "website-search": "Search in the site",
77
99
  "navigation-path": "Navigation path"
78
100
  },
101
+ "navbar": {
102
+ "aria-label-main": "Main navigation",
103
+ "aria-label-toggle": "Show/Hide navigation",
104
+ "hide": "Hide navigation"
105
+ },
79
106
  "utils": {
80
107
  "selected": "Selected",
81
108
  "language-selection": "Language selection: {{lang}}",
82
109
  "select-language": "Select a language",
83
- "404": {
84
- "title": "Resource not found",
85
- "description": "Oops! The resource you are looking for was not found, go back to the homepage and use the menu to continue browsing.",
86
- "go-back": "Go back",
110
+ "error-page": {
111
+ "404": {
112
+ "title": "Resource not found",
113
+ "description": "Oops! The resource you are looking for was not found, go back to the homepage and use the menu to continue browsing."
114
+ },
115
+ "403": {
116
+ "title": "Forbidden",
117
+ "description": "You are not authorized to access this resource!"
118
+ },
119
+ "500": {
120
+ "title": "An error has occurred",
121
+ "description": "There was an unexpected error. Please try again later or contact support."
122
+ },
87
123
  "go-to-homepage": "Return to homepage"
88
124
  }
125
+ },
126
+ "date-ago-pipe": {
127
+ "just-now": "Just now",
128
+ "singular-year-ago": "{{count}} year ago",
129
+ "year-ago": "{{count}} years ago",
130
+ "singular-month-ago": "{{count}} month ago",
131
+ "month-ago": "{{count}} months ago",
132
+ "singular-week-ago": "{{count}} week ago",
133
+ "week-ago": "{{count}} weeks ago",
134
+ "singular-day-ago": "{{count}} day ago",
135
+ "day-ago": "{{count}} days ago",
136
+ "singular-hour-ago": "{{count}} hour ago",
137
+ "hour-ago": "{{count}} hours ago",
138
+ "singular-minute-ago": "{{count}} minute ago",
139
+ "minute-ago": "{{count}} minutes ago",
140
+ "singular-second-ago": "{{count}} second ago",
141
+ "second-ago": "{{count}} seconds ago"
142
+ },
143
+ "duration": {
144
+ "second": "{{count}} second",
145
+ "seconds": "{{count}} seconds",
146
+ "minute": "{{count}} minute",
147
+ "minutes": "{{count}} minutes",
148
+ "hour": "{{count}} hour",
149
+ "hours": "{{count}} hours",
150
+ "day": "{{count}} day",
151
+ "days": "{{count}} days",
152
+ "week": "{{count}} week",
153
+ "weeks": "{{count}} weeks",
154
+ "month": "{{count}} month",
155
+ "months": "{{count}} months",
156
+ "year": "{{count}} year",
157
+ "years": "{{count}} years"
89
158
  }
90
159
  }
91
160
  }
@@ -7,8 +7,10 @@
7
7
  "close": "Chiudi",
8
8
  "continue": "Continua",
9
9
  "edit": "Modifica",
10
+ "show": "Visualizza",
10
11
  "show-all": "Mostra tutto",
11
- "details": "Dettagli"
12
+ "details": "Dettagli",
13
+ "download": "Scarica"
12
14
  },
13
15
  "errors": {
14
16
  "generic": "Si è verificato un errore",
@@ -19,29 +21,34 @@
19
21
  "min-invalid": "Il valore minimo per questo campo è: {{min}}",
20
22
  "max-invalid": "Il valore massimo per questo campo è: {{max}}",
21
23
  "min-length-invalid": "La lunghezza minima per questo campo è: {{min}}",
22
- "max-length-invalid": "La lunghezza minima per questo campo è: {{max}}",
24
+ "max-length-invalid": "La lunghezza massima per questo campo è: {{max}}",
23
25
  "email-invalid": "Inserisci un email valida",
24
26
  "tel-invalid": "Inserisci un formato telefonico valido",
25
27
  "url-invalid": "Inserisci un url valido",
26
28
  "tax-code-invalid": "Inserisci un codice fiscale valido",
27
29
  "vat-number-invalid": "Inserisci una partita iva valida",
28
30
  "cap-invalid": "Inserisci un CAP valido",
31
+ "iban-invalid": "Inserisci un IBAN valido",
29
32
  "regex-invalid": "Inserisci un espressione REGEX valida",
30
33
  "pattern-invalid": "Il campo deve avere il pattern {{pattern}}",
31
34
  "password-no-match": "Le password devono essere identiche",
32
35
  "password-min-length": "La password deve contenere almeno {{minLength}} caratteri!",
33
- "password-number": "La password deve avere almeno 1 numero!",
34
- "password-capital-case": "La password deve contenere almeno 1 carattere maiuscolo!",
35
- "password-small-case": "La password deve contenere almeno 1 carattere minuscolo!",
36
- "password-special-character": "La password deve contenere almeno 1 carattere speciale!"
36
+ "password-number": "La password deve avere almeno un numero!",
37
+ "password-capital-case": "La password deve contenere almeno un carattere maiuscolo!",
38
+ "password-small-case": "La password deve contenere almeno un carattere minuscolo!",
39
+ "password-special-character": "La password deve contenere almeno un carattere speciale!"
37
40
  },
38
41
  "core": {
39
42
  "close-modal": "Chiudi finestra modale",
40
43
  "close-notification": "Chiudi notifica: {{title}}",
41
44
  "close-alert": "Chiudi avviso",
42
45
  "page": "Pagina",
46
+ "previous": "Precedente",
43
47
  "previous-page": "Pagina precedente",
48
+ "next": "Successiva",
44
49
  "next-page": "Pagina successiva",
50
+ "go-to": "Vai a",
51
+ "page-of-total": "Pagina {{page}} di {{total}}",
45
52
  "progress": "Progresso",
46
53
  "loading": "Caricamento",
47
54
  "active": "Attivo",
@@ -51,9 +58,24 @@
51
58
  "step": "Step",
52
59
  "step-of": "Step {{current}} di {{available}}",
53
60
  "back": "Indietro",
54
- "forward": "Avanti"
61
+ "forward": "Avanti",
62
+ "rate-star": "Valuta {{current}} stelle su {{total}}",
63
+ "rating-star": "Valutazione {{current}} stelle su {{total}}"
55
64
  },
56
65
  "form": {
66
+ "caps-inserted": "CAPS LOCK inserito",
67
+ "password-strength-meter": {
68
+ "description": {
69
+ "default": "Inserisci almeno {{minLength}} caratteri",
70
+ "number": "un numero",
71
+ "capital-case": "un carattere maiuscolo",
72
+ "special-character": "un carattere speciale"
73
+ },
74
+ "password-short": "Password molto debole",
75
+ "password-bad": "Password debole",
76
+ "password-good": "Password sicura",
77
+ "password-strong": "Password molto sicura"
78
+ },
57
79
  "increase-value": "Aumenta valore",
58
80
  "decrease-value": "Diminuisci valore",
59
81
  "upload": "Upload",
@@ -76,16 +98,63 @@
76
98
  "website-search": "Cerca nel sito",
77
99
  "navigation-path": "Percorso di navigazione"
78
100
  },
101
+ "navbar": {
102
+ "aria-label-main": "Navigazione principale",
103
+ "aria-label-toggle": "Mostra/Nascondi la navigazione",
104
+ "hide": "Nascondi la navigazione"
105
+ },
79
106
  "utils": {
80
107
  "selected": "Selezionata",
81
108
  "language-selection": "Selezione lingua: {{lang}}",
82
109
  "select-language": "Seleziona una lingua",
83
- "404": {
84
- "title": "Risorsa non trovata",
85
- "description": "Oops! La risorsa che cerchi non è stata trovata, torna alla homepage e utilizza il menu per continuare la navigazione.",
86
- "go-back": "Torna indietro",
110
+ "error-page": {
111
+ "404": {
112
+ "title": "Risorsa non trovata",
113
+ "description": "Oops! La risorsa che cerchi non è stata trovata, torna alla homepage e utilizza il menu per continuare la navigazione."
114
+ },
115
+ "403": {
116
+ "title": "Non autorizzato",
117
+ "description": "Non sei autorizzato ad accedere a questa risorsa!"
118
+ },
119
+ "500": {
120
+ "title": "Si è verificato un errore",
121
+ "description": "Si è verificato un errore imprevisto. Riprova più tardi o contatta il supporto."
122
+ },
87
123
  "go-to-homepage": "Torna alla homepage"
88
124
  }
125
+ },
126
+ "date-ago-pipe": {
127
+ "just-now": "Proprio adesso",
128
+ "singular-year-ago": "{{count}} anno fa",
129
+ "year-ago": "{{count}} anni fa",
130
+ "singular-month-ago": "{{count}} mese fa",
131
+ "month-ago": "{{count}} mesi fa",
132
+ "singular-week-ago": "{{count}} settimana fa",
133
+ "week-ago": "{{count}} settimane fa",
134
+ "singular-day-ago": "{{count}} giorno fa",
135
+ "day-ago": "{{count}} giorni fa",
136
+ "singular-hour-ago": "{{count}} ora fa",
137
+ "hour-ago": "{{count}} ore fa",
138
+ "singular-minute-ago": "{{count}} minuto fa",
139
+ "minute-ago": "{{count}} minuti fa",
140
+ "singular-second-ago": "{{count}} secondo fa",
141
+ "second-ago": "{{count}} secondi fa"
142
+ },
143
+ "duration": {
144
+ "second": "{{count}} secondo",
145
+ "seconds": "{{count}} secondi",
146
+ "minute": "{{count}} minuto",
147
+ "minutes": "{{count}} minuti",
148
+ "hour": "{{count}} ora",
149
+ "hours": "{{count}} ore",
150
+ "day": "{{count}} giorno",
151
+ "days": "{{count}} giorni",
152
+ "week": "{{count}} settimana",
153
+ "weeks": "{{count}} settimane",
154
+ "month": "{{count}} mese",
155
+ "months": "{{count}} mesi",
156
+ "year": "{{count}} anno",
157
+ "years": "{{count}} anni"
89
158
  }
90
159
  }
91
160
  }
@@ -0,0 +1,187 @@
1
+ import { FormControl } from '@angular/forms';
2
+ import { Component, Input, Optional, Self } from '@angular/core';
3
+ import { ItAbstractComponent } from './abstract.component';
4
+ import { inputToBoolean } from '../utils/coercion';
5
+ import * as i0 from "@angular/core";
6
+ import * as i1 from "@ngx-translate/core";
7
+ import * as i2 from "@angular/forms";
8
+ export class ItAbstractFormComponent extends ItAbstractComponent {
9
+ /**
10
+ * Set the disabled state
11
+ */
12
+ set disabled(isDisabled) {
13
+ this.setDisabledState(isDisabled);
14
+ }
15
+ constructor(_translateService, _ngControl) {
16
+ super();
17
+ this._translateService = _translateService;
18
+ this._ngControl = _ngControl;
19
+ /**
20
+ * Validation color display mode (validation triggered if field is touched or not pristine)
21
+ * - <b>true</b>: Always show the validation color
22
+ * - <b>false</b>: Never show validation color
23
+ * - <b>only-valid</b>: Show only valid validation color
24
+ * - <b>only-invalid</b>: Show only invalid validation color
25
+ * @default <b>only-invalid</b>: Show only invalid validation color
26
+ */
27
+ this.validationMode = 'only-invalid';
28
+ this.onChange = (_) => {
29
+ };
30
+ this.onTouched = () => {
31
+ };
32
+ this.control = new FormControl();
33
+ this._ngControl && (this._ngControl.valueAccessor = this);
34
+ }
35
+ /**
36
+ * Check if field is invalid (Validation failed)
37
+ */
38
+ get isInvalid() {
39
+ if (this.validationMode === 'only-valid' || (this.validationMode !== 'only-invalid' && !this.validationMode)) {
40
+ return undefined;
41
+ }
42
+ if (this._ngControl) {
43
+ return this._ngControl.invalid === true && (!this._ngControl.pristine || this._ngControl.touched === true);
44
+ }
45
+ return this.control.invalid && (!this.control.pristine || this.control.touched);
46
+ }
47
+ /**
48
+ * Check if field is valid (Validation successful)
49
+ */
50
+ get isValid() {
51
+ if (this.validationMode === 'only-invalid' || (this.validationMode !== 'only-valid' && !this.validationMode)) {
52
+ return undefined;
53
+ }
54
+ if (this._ngControl) {
55
+ return this._ngControl.valid === true && (!this._ngControl.pristine || this._ngControl.touched === true);
56
+ }
57
+ return this.control.valid && (!this.control.pristine || this.control.touched);
58
+ }
59
+ /**
60
+ * Return the invalid message string from TranslateService
61
+ */
62
+ get invalidMessage() {
63
+ if (this.hasError('required')) {
64
+ return this._translateService.get('it.errors.required-field');
65
+ }
66
+ return this._translateService.get('it.errors.invalid-field');
67
+ }
68
+ ngOnInit() {
69
+ if (this._ngControl?.control) {
70
+ this.control.setValidators(this._ngControl.control.validator);
71
+ }
72
+ }
73
+ registerOnChange(fn) {
74
+ this.control.valueChanges.subscribe(fn);
75
+ this.onChange = fn;
76
+ }
77
+ registerOnTouched(fn) {
78
+ this.onTouched = fn;
79
+ }
80
+ setDisabledState(isDisabled) {
81
+ if (isDisabled) {
82
+ return this.control.disable();
83
+ }
84
+ this.control.enable();
85
+ }
86
+ writeValue(value) {
87
+ this.control.setValue(value, { emitEvent: false });
88
+ this._changeDetectorRef.detectChanges();
89
+ }
90
+ /**
91
+ * Mark the control as touched
92
+ */
93
+ markAsTouched() {
94
+ if (!this.control.touched) {
95
+ this.onTouched();
96
+ }
97
+ }
98
+ /**
99
+ * Fired to check if form control is touched
100
+ */
101
+ ngDoCheck() {
102
+ if (this._ngControl?.control) {
103
+ const ngControl = this._ngControl.control;
104
+ if (this.control.touched !== ngControl.touched) {
105
+ if (ngControl.touched) {
106
+ this.control.markAsTouched();
107
+ }
108
+ else {
109
+ this.control.markAsUntouched();
110
+ }
111
+ }
112
+ if (this.control.pristine !== ngControl.pristine) {
113
+ if (ngControl.pristine) {
114
+ this.control.markAsPristine();
115
+ }
116
+ else {
117
+ this.control.markAsDirty();
118
+ }
119
+ }
120
+ }
121
+ this._changeDetectorRef.detectChanges();
122
+ }
123
+ /**
124
+ * Add the validators in control and parent control
125
+ * @param validators the validators
126
+ * @protected
127
+ */
128
+ addValidators(validators) {
129
+ if (!Array.isArray(validators)) {
130
+ validators = [validators];
131
+ }
132
+ validators.forEach(validator => {
133
+ if (!this.control.hasValidator(validator)) {
134
+ this.control.addValidators(validator);
135
+ }
136
+ if (this._ngControl?.control && !this._ngControl.control.hasValidator(validator)) {
137
+ this._ngControl.control.addValidators(validator);
138
+ }
139
+ });
140
+ }
141
+ /**
142
+ * Reports whether the control with the given path has the error specified. <br/>
143
+ * If the control is not present, false is returned.
144
+ * @param errorCode The code of the error to check
145
+ * @param path A list of control names that designates how to move from the current control
146
+ * to the control that should be queried for errors.
147
+ * @returns whether the given error is present in the control at the given path.
148
+ */
149
+ hasError(errorCode, path) {
150
+ if (this._ngControl) {
151
+ return this._ngControl.hasError(errorCode, path);
152
+ }
153
+ return this.control.hasError(errorCode, path);
154
+ }
155
+ /**
156
+ * Reports error data for the control with the given path.
157
+ * @param errorCode The code of the error to check
158
+ * @param path A list of control names that designates how to move from the current control
159
+ * to the control that should be queried for errors.
160
+ * @returns error data for that particular error. If the control or error is not present,
161
+ * null is returned.
162
+ */
163
+ getError(errorCode, path) {
164
+ if (this._ngControl) {
165
+ return this._ngControl.getError(errorCode, path);
166
+ }
167
+ return this.control.getError(errorCode, path);
168
+ }
169
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: ItAbstractFormComponent, deps: [{ token: i1.TranslateService }, { token: i2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
170
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "16.2.7", type: ItAbstractFormComponent, selector: "ng-component", inputs: { label: "label", validationMode: "validationMode", disabled: ["disabled", "disabled", inputToBoolean] }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
171
+ }
172
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: ItAbstractFormComponent, decorators: [{
173
+ type: Component,
174
+ args: [{ template: '' }]
175
+ }], ctorParameters: function () { return [{ type: i1.TranslateService }, { type: i2.NgControl, decorators: [{
176
+ type: Self
177
+ }, {
178
+ type: Optional
179
+ }] }]; }, propDecorators: { label: [{
180
+ type: Input
181
+ }], validationMode: [{
182
+ type: Input
183
+ }], disabled: [{
184
+ type: Input,
185
+ args: [{ transform: inputToBoolean }]
186
+ }] } });
187
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWJzdHJhY3QtZm9ybS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9kZXNpZ24tYW5ndWxhci1raXQvc3JjL2xpYi9hYnN0cmFjdHMvYWJzdHJhY3QtZm9ybS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUF3QixXQUFXLEVBQTBCLE1BQU0sZ0JBQWdCLENBQUM7QUFDM0YsT0FBTyxFQUFFLFNBQVMsRUFBVyxLQUFLLEVBQVUsUUFBUSxFQUFFLElBQUksRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNsRixPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUczRCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sbUJBQW1CLENBQUM7Ozs7QUFHbkQsTUFBTSxPQUFnQix1QkFBaUMsU0FBUSxtQkFBbUI7SUFpQmhGOztPQUVHO0lBQ0gsSUFBMEMsUUFBUSxDQUFDLFVBQW1CO1FBQ3BFLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxVQUFVLENBQUMsQ0FBQztJQUNwQyxDQUFDO0lBT0QsWUFDcUIsaUJBQW1DLEVBQ2YsVUFBcUI7UUFFNUQsS0FBSyxFQUFFLENBQUM7UUFIVyxzQkFBaUIsR0FBakIsaUJBQWlCLENBQWtCO1FBQ2YsZUFBVSxHQUFWLFVBQVUsQ0FBVztRQXhCOUQ7Ozs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