@anglr/common 13.0.1 → 14.0.0-beta.20220603080259

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 (333) hide show
  1. package/changelog.md +43 -0
  2. package/es2015/floating-ui/src/services/floatingUiDomPosition.service.js +3 -3
  3. package/es2015/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +3 -3
  4. package/es2015/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js.map +1 -1
  5. package/es2015/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +3 -3
  6. package/es2015/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +3 -3
  7. package/es2015/forms/src/directives/groupHasError/groupHasError.directive.js +3 -3
  8. package/es2015/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +3 -3
  9. package/es2015/forms/src/directives/hasError/hasError.directive.js +3 -3
  10. package/es2015/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +3 -3
  11. package/es2015/forms/src/directives/numberInput/minValueNumberValidator.directive.js +3 -3
  12. package/es2015/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +3 -3
  13. package/es2015/forms/src/directives/numberInput/numberInputValidator.directive.js +3 -3
  14. package/es2015/forms/src/directives/requiredClass/requiredClass.directive.js +3 -3
  15. package/es2015/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +3 -3
  16. package/es2015/forms/src/index.js +5 -3
  17. package/es2015/forms/src/index.js.map +1 -1
  18. package/es2015/forms/src/misc/formModel/index.js +1 -0
  19. package/es2015/forms/src/misc/formModel/index.js.map +1 -1
  20. package/es2015/forms/src/misc/formModel/interfaces/formModelBuilder.interface.js +2 -0
  21. package/es2015/forms/src/misc/formModel/interfaces/formModelBuilder.interface.js.map +1 -0
  22. package/es2015/forms/src/misc/formModel/interfaces/validator.interface.js.map +1 -1
  23. package/es2015/forms/src/misc/formModel/misc/utils.js.map +1 -1
  24. package/es2015/forms/src/misc/formModel/misc/validatorFactories.js +18 -2
  25. package/es2015/forms/src/misc/formModel/misc/validatorFactories.js.map +1 -1
  26. package/es2015/forms/src/misc/types.js +2 -0
  27. package/es2015/forms/src/misc/types.js.map +1 -0
  28. package/es2015/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +5 -5
  29. package/es2015/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js.map +1 -1
  30. package/es2015/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js +3 -3
  31. package/es2015/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js +3 -3
  32. package/es2015/forms/src/modules/errorMessage/modules/errorMessage.module.js +5 -7
  33. package/es2015/forms/src/modules/errorMessage/modules/errorMessage.module.js.map +1 -1
  34. package/es2015/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js +3 -3
  35. package/es2015/forms/src/modules/formPipes/modules/formPipes.module.js +4 -4
  36. package/es2015/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js +33 -14
  37. package/es2015/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js.map +1 -1
  38. package/es2015/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js +33 -14
  39. package/es2015/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js.map +1 -1
  40. package/es2015/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js +33 -14
  41. package/es2015/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js.map +1 -1
  42. package/es2015/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js +5 -5
  43. package/es2015/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js.map +1 -1
  44. package/es2015/forms/src/modules/hasError.module.js +4 -6
  45. package/es2015/forms/src/modules/hasError.module.js.map +1 -1
  46. package/es2015/forms/src/modules/numberInput.module.js +4 -4
  47. package/es2015/forms/src/modules/requiredClass.module.js +4 -4
  48. package/es2015/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +3 -3
  49. package/es2015/forms/src/services/formModelBuilder/formModelBuilder.service.js +27 -0
  50. package/es2015/forms/src/services/formModelBuilder/formModelBuilder.service.js.map +1 -0
  51. package/es2015/forms/src/services/submitted/submitted.service.js +3 -3
  52. package/es2015/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +3 -3
  53. package/es2015/hotkeys/src/services/appHotkeys.service.js +3 -3
  54. package/es2015/material/src/components/confirmationDialog/confirmationDialog.component.js +3 -3
  55. package/es2015/material/src/components/movableTitledDialog/movableTitledDialog.component.js +5 -5
  56. package/es2015/material/src/components/titledDialog/titledDialog.component.js +3 -3
  57. package/es2015/material/src/directives/confirmationDialog/confirmationDialog.directive.js +3 -3
  58. package/es2015/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +3 -3
  59. package/es2015/material/src/modules/confirmationDialog.module.js +6 -8
  60. package/es2015/material/src/modules/confirmationDialog.module.js.map +1 -1
  61. package/es2015/material/src/modules/debugDataCopyClick.module.js +4 -4
  62. package/es2015/material/src/modules/debugDataCopyClick.module.js.map +1 -1
  63. package/es2015/material/src/modules/movableTitledDialog.module.js +7 -9
  64. package/es2015/material/src/modules/movableTitledDialog.module.js.map +1 -1
  65. package/es2015/material/src/modules/titledDialog.module.js +7 -9
  66. package/es2015/material/src/modules/titledDialog.module.js.map +1 -1
  67. package/es2015/material/src/services/titledDialog/titledDialog.service.js +3 -3
  68. package/es2015/moment/src/modules/moment.module.js +4 -4
  69. package/es2015/moment/src/pipes/momentConvert/momentConvert.pipe.js +3 -3
  70. package/es2015/moment/src/pipes/momentFormat/momentFormat.pipe.js +3 -3
  71. package/es2015/numeral/src/modules/numeral.module.js +4 -4
  72. package/es2015/numeral/src/pipes/numeral.pipe.js +3 -3
  73. package/es2015/router/src/services/routing/dataRouter.js +3 -3
  74. package/es2015/router/src/services/routing/dataRouterData.js +3 -3
  75. package/es2015/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +3 -3
  76. package/es2015/src/modules/castPipes/modules/castPipes.module.js +4 -4
  77. package/es2015/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js +3 -3
  78. package/es2015/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js +3 -3
  79. package/es2015/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +3 -3
  80. package/es2015/src/modules/castPipes/pipes/castType/castType.pipe.js +3 -3
  81. package/es2015/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.js +3 -3
  82. package/es2015/src/modules/clickOutside/modules/clickOutside.module.js +4 -4
  83. package/es2015/src/modules/clickOutside/modules/clickOutside.module.js.map +1 -1
  84. package/es2015/src/modules/commonDynamic.module.js +4 -4
  85. package/es2015/src/modules/commonLocalize.module.js +4 -4
  86. package/es2015/src/modules/commonUtils.module.js +4 -4
  87. package/es2015/src/modules/debugData/components/debugData/debugData.component.js +3 -3
  88. package/es2015/src/modules/debugData/modules/debugData.module.js +4 -6
  89. package/es2015/src/modules/debugData/modules/debugData.module.js.map +1 -1
  90. package/es2015/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +3 -3
  91. package/es2015/src/modules/goBack/directives/goBack/goBack.directive.js +3 -3
  92. package/es2015/src/modules/goBack/modules/goBack.module.js +4 -4
  93. package/es2015/src/modules/multiButton/components/multiButton/multiButton.component.js +3 -3
  94. package/es2015/src/modules/multiButton/modules/multiButton.module.js +4 -6
  95. package/es2015/src/modules/multiButton/modules/multiButton.module.js.map +1 -1
  96. package/es2015/src/modules/position/directives/positionTo/positionTo.directive.js +3 -3
  97. package/es2015/src/modules/position/modules/position.module.js +4 -4
  98. package/es2015/src/modules/position/modules/position.module.js.map +1 -1
  99. package/es2015/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +3 -3
  100. package/es2015/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +3 -3
  101. package/es2015/src/modules/progressIndicator/interceptors/progressInterceptor.js +3 -3
  102. package/es2015/src/modules/progressIndicator/modules/progressIndicator.module.js +5 -7
  103. package/es2015/src/modules/progressIndicator/modules/progressIndicator.module.js.map +1 -1
  104. package/es2015/src/modules/progressIndicator/services/progressIndicator.service.js +3 -3
  105. package/es2015/src/modules/tooltip/components/tooltip/tooltip.component.js +3 -3
  106. package/es2015/src/modules/tooltip/directives/tooltip/tooltip.directive.js +3 -3
  107. package/es2015/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +3 -3
  108. package/es2015/src/modules/tooltip/modules/tooltip.module.js +4 -6
  109. package/es2015/src/modules/tooltip/modules/tooltip.module.js.map +1 -1
  110. package/es2015/src/pipes/isNaN/isNaN.pipe.js +3 -3
  111. package/es2015/src/pipes/isPresent/isPresent.pipe.js +3 -3
  112. package/es2015/src/pipes/keys/keys.pipe.js +3 -3
  113. package/es2015/src/pipes/localize/localize.pipe.js +3 -3
  114. package/es2015/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +3 -3
  115. package/es2015/src/pipes/urlEncode/urlEncode.pipe.js +3 -3
  116. package/es2015/src/services/cookies/cookies.service.js +3 -3
  117. package/es2015/src/services/notifications/defaultNotifications.service.js +3 -3
  118. package/es2015/src/services/permanentStorage/cookiePermanentStorage.service.js +3 -3
  119. package/es2015/src/services/statusCode/statusCode.service.js +3 -3
  120. package/es2015/src/services/stringLocalization/noStringLocalization.service.js +3 -3
  121. package/es2015/src/services/temporaryStorage/memoryTemporaryStorage.service.js +3 -3
  122. package/es2015/store/src/services/permanentStorage/localPermanentStorage.service.js +3 -3
  123. package/es2015/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +3 -3
  124. package/es2015/structured-log/src/components/console/console.component.js +3 -3
  125. package/es2015/structured-log/src/modules/consoleLog.module.js +4 -6
  126. package/es2015/structured-log/src/modules/consoleLog.module.js.map +1 -1
  127. package/es2015/structured-log/src/services/console/consoleComponentSink.service.js +3 -3
  128. package/es2015/structured-log/src/services/console/consoleSinkConfig.service.js +3 -3
  129. package/es2015/structured-log/src/services/logger.service.js +3 -3
  130. package/es2015/structured-log/src/services/rest/restSink.service.js +3 -3
  131. package/es2015/structured-log/src/services/rest/restSinkConfig.service.js +3 -3
  132. package/es2020/floating-ui/src/services/floatingUiDomPosition.service.js +3 -3
  133. package/es2020/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +3 -3
  134. package/es2020/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js.map +1 -1
  135. package/es2020/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +3 -3
  136. package/es2020/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +3 -3
  137. package/es2020/forms/src/directives/groupHasError/groupHasError.directive.js +3 -3
  138. package/es2020/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +3 -3
  139. package/es2020/forms/src/directives/hasError/hasError.directive.js +3 -3
  140. package/es2020/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +3 -3
  141. package/es2020/forms/src/directives/numberInput/minValueNumberValidator.directive.js +3 -3
  142. package/es2020/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +3 -3
  143. package/es2020/forms/src/directives/numberInput/numberInputValidator.directive.js +3 -3
  144. package/es2020/forms/src/directives/requiredClass/requiredClass.directive.js +3 -3
  145. package/es2020/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +3 -3
  146. package/es2020/forms/src/index.js +5 -3
  147. package/es2020/forms/src/index.js.map +1 -1
  148. package/es2020/forms/src/misc/formModel/index.js +1 -0
  149. package/es2020/forms/src/misc/formModel/index.js.map +1 -1
  150. package/es2020/forms/src/misc/formModel/interfaces/formModelBuilder.interface.js +2 -0
  151. package/es2020/forms/src/misc/formModel/interfaces/formModelBuilder.interface.js.map +1 -0
  152. package/es2020/forms/src/misc/formModel/interfaces/validator.interface.js.map +1 -1
  153. package/es2020/forms/src/misc/formModel/misc/utils.js.map +1 -1
  154. package/es2020/forms/src/misc/formModel/misc/validatorFactories.js +26 -2
  155. package/es2020/forms/src/misc/formModel/misc/validatorFactories.js.map +1 -1
  156. package/es2020/forms/src/misc/types.js +2 -0
  157. package/es2020/forms/src/misc/types.js.map +1 -0
  158. package/es2020/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +5 -5
  159. package/es2020/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js.map +1 -1
  160. package/es2020/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js +3 -3
  161. package/es2020/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js +3 -3
  162. package/es2020/forms/src/modules/errorMessage/modules/errorMessage.module.js +5 -7
  163. package/es2020/forms/src/modules/errorMessage/modules/errorMessage.module.js.map +1 -1
  164. package/es2020/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js +3 -3
  165. package/es2020/forms/src/modules/formPipes/modules/formPipes.module.js +4 -4
  166. package/es2020/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js +32 -14
  167. package/es2020/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js.map +1 -1
  168. package/es2020/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js +32 -14
  169. package/es2020/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js.map +1 -1
  170. package/es2020/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js +32 -14
  171. package/es2020/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js.map +1 -1
  172. package/es2020/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js +5 -5
  173. package/es2020/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js.map +1 -1
  174. package/es2020/forms/src/modules/hasError.module.js +4 -6
  175. package/es2020/forms/src/modules/hasError.module.js.map +1 -1
  176. package/es2020/forms/src/modules/numberInput.module.js +4 -4
  177. package/es2020/forms/src/modules/requiredClass.module.js +4 -4
  178. package/es2020/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +3 -3
  179. package/es2020/forms/src/services/formModelBuilder/formModelBuilder.service.js +30 -0
  180. package/es2020/forms/src/services/formModelBuilder/formModelBuilder.service.js.map +1 -0
  181. package/es2020/forms/src/services/submitted/submitted.service.js +3 -3
  182. package/es2020/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +3 -3
  183. package/es2020/hotkeys/src/services/appHotkeys.service.js +3 -3
  184. package/es2020/material/src/components/confirmationDialog/confirmationDialog.component.js +3 -3
  185. package/es2020/material/src/components/movableTitledDialog/movableTitledDialog.component.js +5 -5
  186. package/es2020/material/src/components/titledDialog/titledDialog.component.js +3 -3
  187. package/es2020/material/src/directives/confirmationDialog/confirmationDialog.directive.js +3 -3
  188. package/es2020/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +3 -3
  189. package/es2020/material/src/modules/confirmationDialog.module.js +6 -8
  190. package/es2020/material/src/modules/confirmationDialog.module.js.map +1 -1
  191. package/es2020/material/src/modules/debugDataCopyClick.module.js +4 -4
  192. package/es2020/material/src/modules/debugDataCopyClick.module.js.map +1 -1
  193. package/es2020/material/src/modules/movableTitledDialog.module.js +7 -9
  194. package/es2020/material/src/modules/movableTitledDialog.module.js.map +1 -1
  195. package/es2020/material/src/modules/titledDialog.module.js +7 -9
  196. package/es2020/material/src/modules/titledDialog.module.js.map +1 -1
  197. package/es2020/material/src/services/titledDialog/titledDialog.service.js +3 -3
  198. package/es2020/moment/src/modules/moment.module.js +4 -4
  199. package/es2020/moment/src/pipes/momentConvert/momentConvert.pipe.js +3 -3
  200. package/es2020/moment/src/pipes/momentFormat/momentFormat.pipe.js +3 -3
  201. package/es2020/numeral/src/modules/numeral.module.js +4 -4
  202. package/es2020/numeral/src/pipes/numeral.pipe.js +3 -3
  203. package/es2020/router/src/services/routing/dataRouter.js +3 -3
  204. package/es2020/router/src/services/routing/dataRouterData.js +3 -3
  205. package/es2020/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +3 -3
  206. package/es2020/src/modules/castPipes/modules/castPipes.module.js +4 -4
  207. package/es2020/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js +3 -3
  208. package/es2020/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js +3 -3
  209. package/es2020/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +3 -3
  210. package/es2020/src/modules/castPipes/pipes/castType/castType.pipe.js +3 -3
  211. package/es2020/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.js +3 -3
  212. package/es2020/src/modules/clickOutside/modules/clickOutside.module.js +4 -4
  213. package/es2020/src/modules/clickOutside/modules/clickOutside.module.js.map +1 -1
  214. package/es2020/src/modules/commonDynamic.module.js +4 -4
  215. package/es2020/src/modules/commonLocalize.module.js +4 -4
  216. package/es2020/src/modules/commonUtils.module.js +4 -4
  217. package/es2020/src/modules/debugData/components/debugData/debugData.component.js +3 -3
  218. package/es2020/src/modules/debugData/modules/debugData.module.js +4 -6
  219. package/es2020/src/modules/debugData/modules/debugData.module.js.map +1 -1
  220. package/es2020/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +3 -3
  221. package/es2020/src/modules/goBack/directives/goBack/goBack.directive.js +3 -3
  222. package/es2020/src/modules/goBack/modules/goBack.module.js +4 -4
  223. package/es2020/src/modules/multiButton/components/multiButton/multiButton.component.js +3 -3
  224. package/es2020/src/modules/multiButton/modules/multiButton.module.js +4 -6
  225. package/es2020/src/modules/multiButton/modules/multiButton.module.js.map +1 -1
  226. package/es2020/src/modules/position/directives/positionTo/positionTo.directive.js +3 -3
  227. package/es2020/src/modules/position/modules/position.module.js +4 -4
  228. package/es2020/src/modules/position/modules/position.module.js.map +1 -1
  229. package/es2020/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +3 -3
  230. package/es2020/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +3 -3
  231. package/es2020/src/modules/progressIndicator/interceptors/progressInterceptor.js +3 -3
  232. package/es2020/src/modules/progressIndicator/modules/progressIndicator.module.js +5 -7
  233. package/es2020/src/modules/progressIndicator/modules/progressIndicator.module.js.map +1 -1
  234. package/es2020/src/modules/progressIndicator/services/progressIndicator.service.js +3 -3
  235. package/es2020/src/modules/tooltip/components/tooltip/tooltip.component.js +3 -3
  236. package/es2020/src/modules/tooltip/directives/tooltip/tooltip.directive.js +3 -3
  237. package/es2020/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +3 -3
  238. package/es2020/src/modules/tooltip/modules/tooltip.module.js +4 -6
  239. package/es2020/src/modules/tooltip/modules/tooltip.module.js.map +1 -1
  240. package/es2020/src/pipes/isNaN/isNaN.pipe.js +3 -3
  241. package/es2020/src/pipes/isPresent/isPresent.pipe.js +3 -3
  242. package/es2020/src/pipes/keys/keys.pipe.js +3 -3
  243. package/es2020/src/pipes/localize/localize.pipe.js +3 -3
  244. package/es2020/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +3 -3
  245. package/es2020/src/pipes/urlEncode/urlEncode.pipe.js +3 -3
  246. package/es2020/src/services/cookies/cookies.service.js +3 -3
  247. package/es2020/src/services/notifications/defaultNotifications.service.js +3 -3
  248. package/es2020/src/services/permanentStorage/cookiePermanentStorage.service.js +3 -3
  249. package/es2020/src/services/statusCode/statusCode.service.js +3 -3
  250. package/es2020/src/services/stringLocalization/noStringLocalization.service.js +3 -3
  251. package/es2020/src/services/temporaryStorage/memoryTemporaryStorage.service.js +3 -3
  252. package/es2020/store/src/services/permanentStorage/localPermanentStorage.service.js +3 -3
  253. package/es2020/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +3 -3
  254. package/es2020/structured-log/src/components/console/console.component.js +3 -3
  255. package/es2020/structured-log/src/modules/consoleLog.module.js +4 -6
  256. package/es2020/structured-log/src/modules/consoleLog.module.js.map +1 -1
  257. package/es2020/structured-log/src/services/console/consoleComponentSink.service.js +3 -3
  258. package/es2020/structured-log/src/services/console/consoleSinkConfig.service.js +3 -3
  259. package/es2020/structured-log/src/services/logger.service.js +3 -3
  260. package/es2020/structured-log/src/services/rest/restSink.service.js +3 -3
  261. package/es2020/structured-log/src/services/rest/restSinkConfig.service.js +3 -3
  262. package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.d.ts +1 -1
  263. package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.d.ts +1 -1
  264. package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.d.ts +1 -1
  265. package/forms/src/directives/groupHasError/groupHasError.directive.d.ts +1 -1
  266. package/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.d.ts +1 -1
  267. package/forms/src/directives/hasError/hasError.directive.d.ts +1 -1
  268. package/forms/src/directives/numberInput/maxValueNumberValidator.directive.d.ts +1 -1
  269. package/forms/src/directives/numberInput/minValueNumberValidator.directive.d.ts +1 -1
  270. package/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.d.ts +1 -1
  271. package/forms/src/directives/numberInput/numberInputValidator.directive.d.ts +1 -1
  272. package/forms/src/directives/requiredClass/requiredClass.directive.d.ts +1 -1
  273. package/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.d.ts +1 -1
  274. package/forms/src/index.d.ts +5 -3
  275. package/forms/src/index.d.ts.map +1 -1
  276. package/forms/src/misc/formModel/index.d.ts +1 -0
  277. package/forms/src/misc/formModel/index.d.ts.map +1 -1
  278. package/forms/src/misc/formModel/interfaces/formModelBuilder.interface.d.ts +11 -0
  279. package/forms/src/misc/formModel/interfaces/formModelBuilder.interface.d.ts.map +1 -0
  280. package/forms/src/misc/formModel/interfaces/validator.interface.d.ts +3 -2
  281. package/forms/src/misc/formModel/interfaces/validator.interface.d.ts.map +1 -1
  282. package/forms/src/misc/formModel/misc/utils.d.ts +4 -1
  283. package/forms/src/misc/formModel/misc/utils.d.ts.map +1 -1
  284. package/forms/src/misc/formModel/misc/validatorFactories.d.ts +6 -2
  285. package/forms/src/misc/formModel/misc/validatorFactories.d.ts.map +1 -1
  286. package/forms/src/misc/types.d.ts +24 -0
  287. package/forms/src/misc/types.d.ts.map +1 -0
  288. package/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.d.ts +1 -1
  289. package/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.d.ts +1 -1
  290. package/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.d.ts +1 -1
  291. package/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.d.ts +1 -1
  292. package/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.d.ts +10 -6
  293. package/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.d.ts.map +1 -1
  294. package/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.d.ts +10 -6
  295. package/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.d.ts.map +1 -1
  296. package/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.d.ts +11 -6
  297. package/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.d.ts.map +1 -1
  298. package/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.d.ts +6 -6
  299. package/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.d.ts.map +1 -1
  300. package/forms/src/services/formModelBuilder/formModelBuilder.service.d.ts +21 -0
  301. package/forms/src/services/formModelBuilder/formModelBuilder.service.d.ts.map +1 -0
  302. package/material/src/components/confirmationDialog/confirmationDialog.component.d.ts +1 -1
  303. package/material/src/components/movableTitledDialog/movableTitledDialog.component.d.ts +1 -1
  304. package/material/src/components/titledDialog/titledDialog.component.d.ts +1 -1
  305. package/material/src/directives/confirmationDialog/confirmationDialog.directive.d.ts +1 -1
  306. package/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.d.ts +1 -1
  307. package/moment/src/pipes/momentConvert/momentConvert.pipe.d.ts +1 -1
  308. package/moment/src/pipes/momentFormat/momentFormat.pipe.d.ts +1 -1
  309. package/numeral/src/pipes/numeral.pipe.d.ts +1 -1
  310. package/package.json +25 -25
  311. package/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.d.ts +1 -1
  312. package/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.d.ts +1 -1
  313. package/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.d.ts +1 -1
  314. package/src/modules/castPipes/pipes/asRequired/asRequired.pipe.d.ts +1 -1
  315. package/src/modules/castPipes/pipes/castType/castType.pipe.d.ts +1 -1
  316. package/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.d.ts +1 -1
  317. package/src/modules/debugData/components/debugData/debugData.component.d.ts +1 -1
  318. package/src/modules/goBack/directives/goBack/goBack.directive.d.ts +1 -1
  319. package/src/modules/multiButton/components/multiButton/multiButton.component.d.ts +1 -1
  320. package/src/modules/position/directives/positionTo/positionTo.directive.d.ts +1 -1
  321. package/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.d.ts +1 -1
  322. package/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.d.ts +1 -1
  323. package/src/modules/tooltip/components/tooltip/tooltip.component.d.ts +1 -1
  324. package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts +1 -1
  325. package/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.d.ts +1 -1
  326. package/src/pipes/isNaN/isNaN.pipe.d.ts +1 -1
  327. package/src/pipes/isPresent/isPresent.pipe.d.ts +1 -1
  328. package/src/pipes/keys/keys.pipe.d.ts +1 -1
  329. package/src/pipes/localize/localize.pipe.d.ts +1 -1
  330. package/src/pipes/mergeCssClasses/mergeCssClasses.pipe.d.ts +1 -1
  331. package/src/pipes/urlEncode/urlEncode.pipe.d.ts +1 -1
  332. package/structured-log/src/components/console/console.component.d.ts +1 -1
  333. package/version.bak +1 -1
package/changelog.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 14.0.0 (2022-06-03)
4
+
5
+ ### Features
6
+
7
+ - *subpackage* `@anglr/common/forms`
8
+ - new `FormModelGroup` type, that creates `FormGroup` generic type for model
9
+ - new `AsFormGroup` type, that casts `AbstractControl` to typed `FormGroup` using model
10
+ - new `AsFormControlsArray` type, that casts `AbstractControl` to typed `FormArray` of `FormControl` using model
11
+ - new `AsFormGroupArray` type, that casts `AbstractControl` to typed `FormArray` of `FormGroup` using model
12
+ - new `AsFormArray` type, that casts `AbstractControl` to typed `FormArray` of `AbstractControl` using model
13
+ - new `FormModelBuilderDefaultArgs` interface, that represents default args for form model builder
14
+ - new `FormModelBuilder` service, that is instance of form model builder, that creates `FormGroup` from form model, automatically providing `Injector`
15
+ - **methods**
16
+ - `build` builds form from decorated model, only for properties with non `undefined` value
17
+ - updated `GetControlPipe` pipe
18
+ - now automatically infers *control name* based on type from `AbstractControl` and returns correctly typed `AbstractControl`
19
+ - updated `AsFormArrayPipe` pipe
20
+ - now keeps generic argument from `AbstractControl`
21
+ - updated `AsFormControlPipe` pipe
22
+ - now keeps generic argument from `AbstractControl`
23
+ - updated `AsFormGroupPipe` pipe
24
+ - now keeps generic argument from `AbstractControl`
25
+ - updated `buildFormModel` function
26
+ - now returns typed `FormGroup`
27
+ - parameter `args` now allows to provide injector using `FormModelBuilderDefaultArgs` type
28
+ - updated `ValidatorFnFactory` class
29
+ - new constructor parameter `args`, which represents static arguments/parameters that can be passed to validator
30
+ - updated `AsyncValidatorFnFactory` class
31
+ - new constructor parameter `args`, which represents static arguments/parameters that can be passed to validator
32
+ - updated `ValidatorFnFactoryFn` interface
33
+ - now argument `args` type is also merged with `FormModelBuilderDefaultArgs`
34
+ - updated `AsyncValidatorFnFactoryFn` interface
35
+ - now argument `args` type is also merged with `FormModelBuilderDefaultArgs`
36
+
37
+ ### BREAKING CHANGES
38
+
39
+ - minimal supported version of `@angular` is `14.0.0`
40
+ - minimal supported version of `angular2-hotkeys` is `13.1.0`
41
+ - dropped support of `NodeJs` version `12`
42
+ - *subpackage* `@anglr/common/forms`
43
+ - updated `GetControlPipe` pipe
44
+ - is no longer generic
45
+
3
46
  ## Version 13.0.1 (2022-04-29)
4
47
 
5
48
  ### Bug Fixes
@@ -212,9 +212,9 @@ export class FloatingUiDomPosition {
212
212
  }
213
213
  }
214
214
  }
215
- FloatingUiDomPosition.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: FloatingUiDomPosition, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
216
- FloatingUiDomPosition.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: FloatingUiDomPosition });
217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: FloatingUiDomPosition, decorators: [{
215
+ FloatingUiDomPosition.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: FloatingUiDomPosition, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
216
+ FloatingUiDomPosition.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: FloatingUiDomPosition });
217
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: FloatingUiDomPosition, decorators: [{
218
218
  type: Injectable
219
219
  }] });
220
220
  /**
@@ -25,12 +25,12 @@ export class DefaultValidationErrorsComponent {
25
25
  this._changeDetector.detectChanges();
26
26
  }
27
27
  }
28
- DefaultValidationErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DefaultValidationErrorsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
29
- DefaultValidationErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DefaultValidationErrorsComponent, selector: "default-validation-errors", host: { properties: { "@animateChildren": "this.animate" } }, ngImport: i0, template: "<div [ngClass]=\"options?.wrapperDivClass\" *ngIf=\"errors?.errorMessages?.length\" @slideInOut>\n <div *ngFor=\"let error of errors?.errorMessages\">{{error}}</div>\n</div>", styles: [":host\n{\n display: contents;\n}"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], animations: [
28
+ DefaultValidationErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DefaultValidationErrorsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
29
+ DefaultValidationErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: DefaultValidationErrorsComponent, selector: "default-validation-errors", host: { properties: { "@animateChildren": "this.animate" } }, ngImport: i0, template: "<div [ngClass]=\"options?.wrapperDivClass\" *ngIf=\"errors?.errorMessages?.length\" @slideInOut>\n <div *ngFor=\"let error of errors?.errorMessages\">{{error}}</div>\n</div>", styles: [":host\n{\n display: contents;\n}"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
30
30
  slideInOutTrigger,
31
31
  animateChildrenTrigger
32
32
  ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DefaultValidationErrorsComponent, decorators: [{
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DefaultValidationErrorsComponent, decorators: [{
34
34
  type: Component,
35
35
  args: [{ selector: 'default-validation-errors', animations: [
36
36
  slideInOutTrigger,
@@ -1 +1 @@
1
- {"version":3,"file":"defaultValidationErrors.component.js","sourceRoot":"","sources":["../../../../../forms/src/components/defaultValidationErrors/defaultValidationErrors.component.ts","../../../../../forms/src/components/defaultValidationErrors/defaultValidationErrors.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AACjG,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,mBAAmB,CAAC;;;AAK5E;;GAEG;AAaH,MAAM,OAAO,gCAAgC;IAwBzC,iEAAiE;IACjE,YAAsB,eAAkC;QAAlC,oBAAe,GAAf,eAAe,CAAmB;QATxD,8EAA8E;QAE9E;;WAEG;QAEI,YAAO,GAAY,IAAI,CAAC;IAK/B,CAAC;IAED,kHAAkH;IAElH;;OAEG;IACI,IAAI,CAAC,MAA8B,EAAE,OAAgC;QAExE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAC;IACzC,CAAC;;6HAxCQ,gCAAgC;iHAAhC,gCAAgC,+HCrB7C,kLAEM,mVDaF;QACI,iBAAiB;QACjB,sBAAsB;KACzB;2FAGQ,gCAAgC;kBAZ5C,SAAS;+BAEI,2BAA2B,cAIrC;wBACI,iBAAiB;wBACjB,sBAAsB;qBACzB,mBACgB,uBAAuB,CAAC,MAAM;wGAwBxC,OAAO;sBADb,WAAW;uBAAC,kBAAkB","sourcesContent":["import {Component, ChangeDetectionStrategy, ChangeDetectorRef, HostBinding} from '@angular/core';\nimport {slideInOutTrigger, animateChildrenTrigger} from '@anglr/animations';\n\nimport {ValidationErrorsResult} from '../../services/errorMessagesExtractor/errorMessagesExtractor.interface';\nimport {ValidationErrorsComponent, ValidationErrorsOptions} from '../../services/validationErrorRenderer/validationErrorRenderer.interface';\n\n/**\n * Default validation errors component, displaying validation errors\n */\n@Component(\n{\n selector: 'default-validation-errors',\n templateUrl: 'defaultValidationErrors.component.html',\n styleUrls: ['defaultValidationErrors.component.css'],\n animations: \n [\n slideInOutTrigger,\n animateChildrenTrigger\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DefaultValidationErrorsComponent implements ValidationErrorsComponent\n{\n //######################### public properties - template bindings #########################\n\n /**\n * Errors to be shown\n * @internal\n */\n public errors: ValidationErrorsResult;\n \n /**\n * Options used for displaying validation errors\n * @internal\n */\n public options: ValidationErrorsOptions;\n\n //######################### public properties - host #########################\n\n /**\n * Enables leave animations for internal stuff\n */\n @HostBinding('@animateChildren')\n public animate: boolean = true;\n\n //######################### constructor #########################\n constructor(protected _changeDetector: ChangeDetectorRef)\n {\n }\n\n //######################### public methods - implementation of ValidationErrorsComponent #########################\n\n /**\n * @inheritdoc\n */\n public show(errors: ValidationErrorsResult, options: ValidationErrorsOptions): void\n {\n this.errors = errors;\n this.options = options;\n\n this._changeDetector.detectChanges();\n }\n}","<div [ngClass]=\"options?.wrapperDivClass\" *ngIf=\"errors?.errorMessages?.length\" @slideInOut>\n <div *ngFor=\"let error of errors?.errorMessages\">{{error}}</div>\n</div>"]}
1
+ {"version":3,"file":"defaultValidationErrors.component.js","sourceRoot":"","sources":["../../../../../forms/src/components/defaultValidationErrors/defaultValidationErrors.component.ts","../../../../../forms/src/components/defaultValidationErrors/defaultValidationErrors.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AACjG,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,mBAAmB,CAAC;;;AAK5E;;GAEG;AAaH,MAAM,OAAO,gCAAgC;IAwBzC,iEAAiE;IACjE,YAAsB,eAAkC;QAAlC,oBAAe,GAAf,eAAe,CAAmB;QATxD,8EAA8E;QAE9E;;WAEG;QAEI,YAAO,GAAY,IAAI,CAAC;IAK/B,CAAC;IAED,kHAAkH;IAElH;;OAEG;IACI,IAAI,CAAC,MAA8B,EAAE,OAAgC;QAExE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAC;IACzC,CAAC;;6HAxCQ,gCAAgC;iHAAhC,gCAAgC,+HCrB7C,kLAEM,8YDaF;QACI,iBAAiB;QACjB,sBAAsB;KACzB;2FAGQ,gCAAgC;kBAZ5C,SAAS;+BAEI,2BAA2B,cAIrC;wBACI,iBAAiB;wBACjB,sBAAsB;qBACzB,mBACgB,uBAAuB,CAAC,MAAM;wGAwBxC,OAAO;sBADb,WAAW;uBAAC,kBAAkB","sourcesContent":["import {Component, ChangeDetectionStrategy, ChangeDetectorRef, HostBinding} from '@angular/core';\nimport {slideInOutTrigger, animateChildrenTrigger} from '@anglr/animations';\n\nimport {ValidationErrorsResult} from '../../services/errorMessagesExtractor/errorMessagesExtractor.interface';\nimport {ValidationErrorsComponent, ValidationErrorsOptions} from '../../services/validationErrorRenderer/validationErrorRenderer.interface';\n\n/**\n * Default validation errors component, displaying validation errors\n */\n@Component(\n{\n selector: 'default-validation-errors',\n templateUrl: 'defaultValidationErrors.component.html',\n styleUrls: ['defaultValidationErrors.component.css'],\n animations: \n [\n slideInOutTrigger,\n animateChildrenTrigger\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DefaultValidationErrorsComponent implements ValidationErrorsComponent\n{\n //######################### public properties - template bindings #########################\n\n /**\n * Errors to be shown\n * @internal\n */\n public errors: ValidationErrorsResult;\n \n /**\n * Options used for displaying validation errors\n * @internal\n */\n public options: ValidationErrorsOptions;\n\n //######################### public properties - host #########################\n\n /**\n * Enables leave animations for internal stuff\n */\n @HostBinding('@animateChildren')\n public animate: boolean = true;\n\n //######################### constructor #########################\n constructor(protected _changeDetector: ChangeDetectorRef)\n {\n }\n\n //######################### public methods - implementation of ValidationErrorsComponent #########################\n\n /**\n * @inheritdoc\n */\n public show(errors: ValidationErrorsResult, options: ValidationErrorsOptions): void\n {\n this.errors = errors;\n this.options = options;\n\n this._changeDetector.detectChanges();\n }\n}","<div [ngClass]=\"options?.wrapperDivClass\" *ngIf=\"errors?.errorMessages?.length\" @slideInOut>\n <div *ngFor=\"let error of errors?.errorMessages\">{{error}}</div>\n</div>"]}
@@ -66,9 +66,9 @@ export class DefaultValidationErrorsContainerComponent {
66
66
  }
67
67
  }
68
68
  }
69
- DefaultValidationErrorsContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DefaultValidationErrorsContainerComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
70
- DefaultValidationErrorsContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DefaultValidationErrorsContainerComponent, selector: "default-validation-errors-container", ngImport: i0, template: '', isInline: true, styles: [":host\n{\n display: contents;\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
71
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DefaultValidationErrorsContainerComponent, decorators: [{
69
+ DefaultValidationErrorsContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DefaultValidationErrorsContainerComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
70
+ DefaultValidationErrorsContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: DefaultValidationErrorsContainerComponent, selector: "default-validation-errors-container", ngImport: i0, template: '', isInline: true, styles: [":host\n{\n display: contents;\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
71
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DefaultValidationErrorsContainerComponent, decorators: [{
72
72
  type: Component,
73
73
  args: [{ selector: 'default-validation-errors-container', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host\n{\n display: contents;\n}"] }]
74
74
  }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
@@ -63,9 +63,9 @@ export class ReservedSpaceValidationErrorsContainerComponent {
63
63
  }
64
64
  }
65
65
  }
66
- ReservedSpaceValidationErrorsContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: ReservedSpaceValidationErrorsContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
67
- ReservedSpaceValidationErrorsContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: ReservedSpaceValidationErrorsContainerComponent, selector: "reserved-space-validation-errors-container", viewQueries: [{ propertyName: "viewContainer", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div>\n <ng-container #container></ng-container>\n</div>", styles: [":host\n{\n display: contents;\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: ReservedSpaceValidationErrorsContainerComponent, decorators: [{
66
+ ReservedSpaceValidationErrorsContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ReservedSpaceValidationErrorsContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
67
+ ReservedSpaceValidationErrorsContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: ReservedSpaceValidationErrorsContainerComponent, selector: "reserved-space-validation-errors-container", viewQueries: [{ propertyName: "viewContainer", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div>\n <ng-container #container></ng-container>\n</div>", styles: [":host\n{\n display: contents;\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ReservedSpaceValidationErrorsContainerComponent, decorators: [{
69
69
  type: Component,
70
70
  args: [{ selector: 'reserved-space-validation-errors-container', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>\n <ng-container #container></ng-container>\n</div>", styles: [":host\n{\n display: contents;\n}"] }]
71
71
  }], propDecorators: { viewContainer: [{
@@ -61,9 +61,9 @@ export class GroupHasErrorDirective {
61
61
  }
62
62
  }
63
63
  }
64
- GroupHasErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: GroupHasErrorDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
65
- GroupHasErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: GroupHasErrorDirective, selector: "[groupHasError]", ngImport: i0 });
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: GroupHasErrorDirective, decorators: [{
64
+ GroupHasErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: GroupHasErrorDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
65
+ GroupHasErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: GroupHasErrorDirective, selector: "[groupHasError]", ngImport: i0 });
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: GroupHasErrorDirective, decorators: [{
67
67
  type: Directive,
68
68
  args: [{
69
69
  selector: '[groupHasError]'
@@ -7,15 +7,15 @@ import * as i0 from "@angular/core";
7
7
  */
8
8
  export class GroupHasErrorContainerDirective extends GroupHasErrorDirective {
9
9
  }
10
- GroupHasErrorContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: GroupHasErrorContainerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
11
- GroupHasErrorContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: GroupHasErrorContainerDirective, selector: "[groupHasErrorContainer]", providers: [
10
+ GroupHasErrorContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: GroupHasErrorContainerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
11
+ GroupHasErrorContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: GroupHasErrorContainerDirective, selector: "[groupHasErrorContainer]", providers: [
12
12
  {
13
13
  provide: GroupHasErrorDirective,
14
14
  useExisting: GroupHasErrorContainerDirective
15
15
  },
16
16
  ValidationErrorsContainerView
17
17
  ], usesInheritance: true, ngImport: i0 });
18
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: GroupHasErrorContainerDirective, decorators: [{
18
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: GroupHasErrorContainerDirective, decorators: [{
19
19
  type: Directive,
20
20
  args: [{
21
21
  selector: '[groupHasErrorContainer]',
@@ -153,15 +153,15 @@ export class HasErrorDirective {
153
153
  });
154
154
  }
155
155
  }
156
- HasErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: HasErrorDirective, deps: [{ token: i0.ElementRef }, { token: i1.ValidationErrorRendererFactory }, { token: i0.ViewContainerRef }, { token: i2.GroupHasErrorDirective, optional: true, skipSelf: true }, { token: i3.FormControlDirective, optional: true }, { token: i3.FormControlName, optional: true }, { token: i3.NgModel, optional: true }, { token: i4.SubmittedService, optional: true }, { token: i5.ValidationErrorsContainerView, optional: true }, { token: STRING_LOCALIZATION }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
157
- HasErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: HasErrorDirective, selector: "[hasError]", inputs: { errorMessages: "errorMessages", errorsComponent: "errorsComponent", errorsTemplate: "errorsTemplate" }, ngImport: i0 });
156
+ HasErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: HasErrorDirective, deps: [{ token: i0.ElementRef }, { token: i1.ValidationErrorRendererFactory }, { token: i0.ViewContainerRef }, { token: i2.GroupHasErrorDirective, optional: true, skipSelf: true }, { token: i3.FormControlDirective, optional: true }, { token: i3.FormControlName, optional: true }, { token: i3.NgModel, optional: true }, { token: i4.SubmittedService, optional: true }, { token: i5.ValidationErrorsContainerView, optional: true }, { token: STRING_LOCALIZATION }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
157
+ HasErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: HasErrorDirective, selector: "[hasError]", inputs: { errorMessages: "errorMessages", errorsComponent: "errorsComponent", errorsTemplate: "errorsTemplate" }, ngImport: i0 });
158
158
  __decorate([
159
159
  BindThis,
160
160
  __metadata("design:type", Function),
161
161
  __metadata("design:paramtypes", [Function, Function, Boolean]),
162
162
  __metadata("design:returntype", void 0)
163
163
  ], HasErrorDirective.prototype, "_isSubmittedOrDirty", null);
164
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: HasErrorDirective, decorators: [{
164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: HasErrorDirective, decorators: [{
165
165
  type: Directive,
166
166
  args: [{
167
167
  selector: '[hasError]'
@@ -47,9 +47,9 @@ export class MaxValueNumberValidatorDirective {
47
47
  return this._validator(control);
48
48
  }
49
49
  }
50
- MaxValueNumberValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: MaxValueNumberValidatorDirective, deps: [{ token: 'maxValue', attribute: true }], target: i0.ɵɵFactoryTarget.Directive });
51
- MaxValueNumberValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: MaxValueNumberValidatorDirective, selector: "input[number][maxValue][formControlName],input[number][maxValue][formControl],input[number][maxValue][ngModel]", inputs: { maxValue: "maxValue" }, providers: [MAX_NUMBER_VALIDATOR], usesOnChanges: true, ngImport: i0 });
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: MaxValueNumberValidatorDirective, decorators: [{
50
+ MaxValueNumberValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MaxValueNumberValidatorDirective, deps: [{ token: 'maxValue', attribute: true }], target: i0.ɵɵFactoryTarget.Directive });
51
+ MaxValueNumberValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: MaxValueNumberValidatorDirective, selector: "input[number][maxValue][formControlName],input[number][maxValue][formControl],input[number][maxValue][ngModel]", inputs: { maxValue: "maxValue" }, providers: [MAX_NUMBER_VALIDATOR], usesOnChanges: true, ngImport: i0 });
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MaxValueNumberValidatorDirective, decorators: [{
53
53
  type: Directive,
54
54
  args: [{
55
55
  selector: 'input[number][maxValue][formControlName],input[number][maxValue][formControl],input[number][maxValue][ngModel]',
@@ -47,9 +47,9 @@ export class MinValueNumberValidatorDirective {
47
47
  return this._validator(control);
48
48
  }
49
49
  }
50
- MinValueNumberValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: MinValueNumberValidatorDirective, deps: [{ token: 'minValue', attribute: true }], target: i0.ɵɵFactoryTarget.Directive });
51
- MinValueNumberValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: MinValueNumberValidatorDirective, selector: "input[number][minValue][formControlName],input[number][minValue][formControl],input[number][minValue][ngModel]", inputs: { minValue: "minValue" }, providers: [MIN_NUMBER_VALIDATOR], usesOnChanges: true, ngImport: i0 });
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: MinValueNumberValidatorDirective, decorators: [{
50
+ MinValueNumberValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MinValueNumberValidatorDirective, deps: [{ token: 'minValue', attribute: true }], target: i0.ɵɵFactoryTarget.Directive });
51
+ MinValueNumberValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: MinValueNumberValidatorDirective, selector: "input[number][minValue][formControlName],input[number][minValue][formControl],input[number][minValue][ngModel]", inputs: { minValue: "minValue" }, providers: [MIN_NUMBER_VALIDATOR], usesOnChanges: true, ngImport: i0 });
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MinValueNumberValidatorDirective, decorators: [{
53
53
  type: Directive,
54
54
  args: [{
55
55
  selector: 'input[number][minValue][formControlName],input[number][minValue][formControl],input[number][minValue][ngModel]',
@@ -57,9 +57,9 @@ export class NumberInputControlValueAccessor {
57
57
  this.onTouched = fn;
58
58
  }
59
59
  }
60
- NumberInputControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: NumberInputControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
61
- NumberInputControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: NumberInputControlValueAccessor, selector: "input[number][formControlName],input[number][formControl],input[number][ngModel]", host: { listeners: { "change": "onChange($event.target.value)", "input": "onChange($event.target.value)", "blur": "onTouched()" } }, providers: [NUMBER_INPUT_VALUE_ACCESSOR], ngImport: i0 });
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: NumberInputControlValueAccessor, decorators: [{
60
+ NumberInputControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NumberInputControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
61
+ NumberInputControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: NumberInputControlValueAccessor, selector: "input[number][formControlName],input[number][formControl],input[number][ngModel]", host: { listeners: { "change": "onChange($event.target.value)", "input": "onChange($event.target.value)", "blur": "onTouched()" } }, providers: [NUMBER_INPUT_VALUE_ACCESSOR], ngImport: i0 });
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NumberInputControlValueAccessor, decorators: [{
63
63
  type: Directive,
64
64
  args: [{
65
65
  selector: 'input[number][formControlName],input[number][formControl],input[number][ngModel]',
@@ -24,9 +24,9 @@ export class NumberInputValidatorDirective {
24
24
  return Validators.number(control);
25
25
  }
26
26
  }
27
- NumberInputValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: NumberInputValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
28
- NumberInputValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: NumberInputValidatorDirective, selector: "input[number][formControlName],input[number][formControl],input[number][ngModel]", providers: [NUMBER_VALIDATOR], ngImport: i0 });
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: NumberInputValidatorDirective, decorators: [{
27
+ NumberInputValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NumberInputValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
28
+ NumberInputValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: NumberInputValidatorDirective, selector: "input[number][formControlName],input[number][formControl],input[number][ngModel]", providers: [NUMBER_VALIDATOR], ngImport: i0 });
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NumberInputValidatorDirective, decorators: [{
30
30
  type: Directive,
31
31
  args: [{
32
32
  selector: 'input[number][formControlName],input[number][formControl],input[number][ngModel]',
@@ -38,9 +38,9 @@ export class RequiredClassDirective {
38
38
  }
39
39
  }
40
40
  }
41
- RequiredClassDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: RequiredClassDirective, deps: [{ token: i1.FormControlDirective, optional: true }, { token: i1.FormControlName, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
42
- RequiredClassDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: RequiredClassDirective, selector: "[requiredClass]", host: { properties: { "class.required": "this.required" } }, ngImport: i0 });
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: RequiredClassDirective, decorators: [{
41
+ RequiredClassDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: RequiredClassDirective, deps: [{ token: i1.FormControlDirective, optional: true }, { token: i1.FormControlName, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
42
+ RequiredClassDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: RequiredClassDirective, selector: "[requiredClass]", host: { properties: { "class.required": "this.required" } }, ngImport: i0 });
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: RequiredClassDirective, decorators: [{
44
44
  type: Directive,
45
45
  args: [{
46
46
  selector: '[requiredClass]'
@@ -11,9 +11,9 @@ export class ValidationErrorsContainerDirective {
11
11
  containerView.viewContainer = viewContainer;
12
12
  }
13
13
  }
14
- ValidationErrorsContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: ValidationErrorsContainerDirective, deps: [{ token: i1.ValidationErrorsContainerView, skipSelf: true }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
15
- ValidationErrorsContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: ValidationErrorsContainerDirective, selector: "[validationErrorsContainer]", ngImport: i0 });
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: ValidationErrorsContainerDirective, decorators: [{
14
+ ValidationErrorsContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ValidationErrorsContainerDirective, deps: [{ token: i1.ValidationErrorsContainerView, skipSelf: true }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
15
+ ValidationErrorsContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: ValidationErrorsContainerDirective, selector: "[validationErrorsContainer]", ngImport: i0 });
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ValidationErrorsContainerDirective, decorators: [{
17
17
  type: Directive,
18
18
  args: [{
19
19
  selector: '[validationErrorsContainer]'
@@ -7,14 +7,16 @@ export * from './directives/numberInput/numberInputControlValueAccessor.directiv
7
7
  export * from './directives/hasError/hasError.directive';
8
8
  export * from './directives/groupHasError/groupHasError.directive';
9
9
  export * from './directives/requiredClass/requiredClass.directive';
10
- export * from './services/submitted/submitted.service';
11
10
  export * from './services/errorMessagesExtractor/errorMessagesExtractor.interface';
12
11
  export * from './services/errorMessagesExtractor/errorMessagesExtractor.service';
12
+ export * from './services/formModelBuilder/formModelBuilder.service';
13
+ export * from './services/submitted/submitted.service';
13
14
  export * from './services/validationErrorRenderer/validationErrorRenderer.interface';
14
15
  export * from './services/validationErrorRenderer/validationErrorRenderer.service';
15
- export * from './misc/validators';
16
- export * from './misc/utils';
17
16
  export * from './misc/tokens';
17
+ export * from './misc/types';
18
+ export * from './misc/utils';
19
+ export * from './misc/validators';
18
20
  export * from './misc/validationErrorsContainerView';
19
21
  export * from './modules/numberInput.module';
20
22
  export * from './modules/hasError.module';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../forms/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,4DAA4D,CAAC;AAC3E,cAAc,4DAA4D,CAAC;AAC3E,cAAc,yDAAyD,CAAC;AACxE,cAAc,oEAAoE,CAAC;AACnF,cAAc,0CAA0C,CAAC;AACzD,cAAc,oDAAoD,CAAC;AACnE,cAAc,oDAAoD,CAAC;AACnE,cAAc,wCAAwC,CAAC;AACvD,cAAc,oEAAoE,CAAC;AACnF,cAAc,kEAAkE,CAAC;AACjF,cAAc,sEAAsE,CAAC;AACrF,cAAc,oEAAoE,CAAC;AACnF,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './components';\nexport * from './directives';\nexport * from './directives/numberInput/maxValueNumberValidator.directive';\nexport * from './directives/numberInput/minValueNumberValidator.directive';\nexport * from './directives/numberInput/numberInputValidator.directive';\nexport * from './directives/numberInput/numberInputControlValueAccessor.directive';\nexport * from './directives/hasError/hasError.directive';\nexport * from './directives/groupHasError/groupHasError.directive';\nexport * from './directives/requiredClass/requiredClass.directive';\nexport * from './services/submitted/submitted.service';\nexport * from './services/errorMessagesExtractor/errorMessagesExtractor.interface';\nexport * from './services/errorMessagesExtractor/errorMessagesExtractor.service';\nexport * from './services/validationErrorRenderer/validationErrorRenderer.interface';\nexport * from './services/validationErrorRenderer/validationErrorRenderer.service';\nexport * from './misc/validators';\nexport * from './misc/utils';\nexport * from './misc/tokens';\nexport * from './misc/validationErrorsContainerView';\nexport * from './modules/numberInput.module';\nexport * from './modules/hasError.module';\nexport * from './modules/requiredClass.module';\nexport * from './modules/formPipes';\nexport * from './modules/errorMessage';\nexport * from './misc/formModel';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../forms/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,4DAA4D,CAAC;AAC3E,cAAc,4DAA4D,CAAC;AAC3E,cAAc,yDAAyD,CAAC;AACxE,cAAc,oEAAoE,CAAC;AACnF,cAAc,0CAA0C,CAAC;AACzD,cAAc,oDAAoD,CAAC;AACnE,cAAc,oDAAoD,CAAC;AACnE,cAAc,oEAAoE,CAAC;AACnF,cAAc,kEAAkE,CAAC;AACjF,cAAc,sDAAsD,CAAC;AACrE,cAAc,wCAAwC,CAAC;AACvD,cAAc,sEAAsE,CAAC;AACrF,cAAc,oEAAoE,CAAC;AACnF,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './components';\nexport * from './directives';\nexport * from './directives/numberInput/maxValueNumberValidator.directive';\nexport * from './directives/numberInput/minValueNumberValidator.directive';\nexport * from './directives/numberInput/numberInputValidator.directive';\nexport * from './directives/numberInput/numberInputControlValueAccessor.directive';\nexport * from './directives/hasError/hasError.directive';\nexport * from './directives/groupHasError/groupHasError.directive';\nexport * from './directives/requiredClass/requiredClass.directive';\nexport * from './services/errorMessagesExtractor/errorMessagesExtractor.interface';\nexport * from './services/errorMessagesExtractor/errorMessagesExtractor.service';\nexport * from './services/formModelBuilder/formModelBuilder.service';\nexport * from './services/submitted/submitted.service';\nexport * from './services/validationErrorRenderer/validationErrorRenderer.interface';\nexport * from './services/validationErrorRenderer/validationErrorRenderer.service';\nexport * from './misc/tokens';\nexport * from './misc/types';\nexport * from './misc/utils';\nexport * from './misc/validators';\nexport * from './misc/validationErrorsContainerView';\nexport * from './modules/numberInput.module';\nexport * from './modules/hasError.module';\nexport * from './modules/requiredClass.module';\nexport * from './modules/formPipes';\nexport * from './modules/errorMessage';\nexport * from './misc/formModel';\n"]}
@@ -1,3 +1,4 @@
1
+ export * from './interfaces/formModelBuilder.interface';
1
2
  export * from './interfaces/modelDecoratorMetadata';
2
3
  export * from './interfaces/modelPropertyDecoratorMetadata';
3
4
  export * from './interfaces/validator.interface';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../forms/src/misc/formModel/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kCAAkC,CAAC;AAEjD,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AAEpC,cAAc,cAAc,CAAC","sourcesContent":["export * from './interfaces/modelDecoratorMetadata';\nexport * from './interfaces/modelPropertyDecoratorMetadata';\nexport * from './interfaces/validator.interface';\n\nexport * from './misc/utils';\nexport * from './misc/validatorFactories';\nexport * from './misc/currentValue';\n\nexport * from './decorators';"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../forms/src/misc/formModel/index.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kCAAkC,CAAC;AAEjD,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AAEpC,cAAc,cAAc,CAAC","sourcesContent":["export * from './interfaces/formModelBuilder.interface';\nexport * from './interfaces/modelDecoratorMetadata';\nexport * from './interfaces/modelPropertyDecoratorMetadata';\nexport * from './interfaces/validator.interface';\n\nexport * from './misc/utils';\nexport * from './misc/validatorFactories';\nexport * from './misc/currentValue';\n\nexport * from './decorators';"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=formModelBuilder.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formModelBuilder.interface.js","sourceRoot":"","sources":["../../../../../../forms/src/misc/formModel/interfaces/formModelBuilder.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Injector} from '@angular/core';\n\n/**\n * Represents default args for form model builder\n */\nexport interface FormModelBuilderDefaultArgs\n{\n /**\n * Injector that could be used in validators\n */\n injector?: Injector;\n}"]}
@@ -1 +1 @@
1
- {"version":3,"file":"validator.interface.js","sourceRoot":"","sources":["../../../../../../forms/src/misc/formModel/interfaces/validator.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {AsyncValidatorFn, ValidatorFn} from '@angular/forms';\nimport {Dictionary} from '@jscrpt/common';\n\n/**\n * Factory function used for creaging ValidatorFn\n */\nexport interface ValidatorFnFactoryFn<TArg extends Dictionary<any> = any>\n{\n /**\n * Function that creates ValidatorFn\n * @param args - Arguments passed for create function from owning class\n */\n (args: TArg): ValidatorFn;\n}\n\n/**\n * Factory function used for creaging AsyncValidatorFn\n */\nexport interface AsyncValidatorFnFactoryFn<TArg extends Dictionary<any> = any>\n{\n /**\n * Function that creates AsyncValidatorFn\n * @param args - Arguments passed for create function from owning class\n */\n (args: TArg): AsyncValidatorFn;\n}"]}
1
+ {"version":3,"file":"validator.interface.js","sourceRoot":"","sources":["../../../../../../forms/src/misc/formModel/interfaces/validator.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {AsyncValidatorFn, ValidatorFn} from '@angular/forms';\nimport {Dictionary} from '@jscrpt/common';\n\nimport {FormModelBuilderDefaultArgs} from './formModelBuilder.interface';\n\n/**\n * Factory function used for creaging ValidatorFn\n */\nexport interface ValidatorFnFactoryFn<TArg extends Dictionary<any> = any>\n{\n /**\n * Function that creates ValidatorFn\n * @param args - Arguments passed for create function from owning class\n */\n (args: TArg&FormModelBuilderDefaultArgs): ValidatorFn;\n}\n\n/**\n * Factory function used for creaging AsyncValidatorFn\n */\nexport interface AsyncValidatorFnFactoryFn<TArg extends Dictionary<any> = any>\n{\n /**\n * Function that creates AsyncValidatorFn\n * @param args - Arguments passed for create function from owning class\n */\n (args: TArg&FormModelBuilderDefaultArgs): AsyncValidatorFn;\n}"]}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../forms/src/misc/formModel/misc/utils.ts"],"names":[],"mappings":"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","sourcesContent":["import {AbstractControl, FormArray, FormControl, FormGroup} from '@angular/forms';\nimport {Dictionary} from '@jscrpt/common';\n\nimport {ModelDecoratorMetadata} from '../interfaces/modelDecoratorMetadata';\nimport {ModelPropertyDecoratorMetadata} from '../interfaces/modelPropertyDecoratorMetadata';\nimport {ɵDefaultPropertyMetadata} from './defaults';\nimport {AsyncValidatorFnFactory, ValidatorFnFactory} from './validatorFactories';\n\n/**\n * Builds form group from decorated model\n * @param model - Model that can be decorated for enhancing created form group with validation and so on\n * @param args - Object storing arguments from owning component for customization\n * @returns\n */\nfunction buildFormGroup<TModel, TArgs = Record<string, never>>(model: ModelDecoratorMetadata<TModel> & Dictionary<any>, args?: TArgs): FormGroup\n{\n if(!model)\n {\n return new FormGroup({});\n }\n\n const modelMetadata: Dictionary<any> = model.ɵControlsMetadata ?? {};\n const groupValidators = model.ɵValidators ?? [];\n const groupAsyncValidators = model.ɵAsyncValidators ?? [];\n const groupArgs: Dictionary<any> = model.ɵArgs ?? {};\n const properties = Object.keys(model);\n const formGroup: FormGroup = new FormGroup({},\n {\n validators: groupValidators?.map(validator => validator instanceof ValidatorFnFactory ? validator.valueOf()({...groupArgs, ...args}) : validator).filter(itm => !!itm),\n asyncValidators: groupAsyncValidators?.map(validator => validator instanceof AsyncValidatorFnFactory ? validator.valueOf()({...groupArgs, ...args}) : validator).filter(itm => !!itm)\n });\n\n for(const propertyName of properties)\n {\n const metadata: ModelPropertyDecoratorMetadata = modelMetadata[propertyName] ?? ɵDefaultPropertyMetadata;\n const defaultValue = model[propertyName];\n\n //Skip control creation if value is undefined\n if(defaultValue === undefined)\n {\n continue;\n }\n\n const validators = metadata.validators.map(validator => validator instanceof ValidatorFnFactory ? validator.valueOf()({...metadata.args, ...args}) : validator).filter(itm => !!itm);\n const asyncValidators = metadata.asyncValidators.map(validator => validator instanceof AsyncValidatorFnFactory ? validator.valueOf()({...metadata.args, ...args}) : validator).filter(itm => !!itm);\n\n let control: AbstractControl;\n\n switch(metadata.type)\n {\n case FormGroup:\n {\n control = buildFormGroup(defaultValue, args);\n\n //TODO: think of setting metadata from property to model\n\n break;\n }\n case FormArray:\n {\n //TODO - enhance FormArray child definition and finish it\n control = new FormArray([],\n {\n validators: validators,\n asyncValidators: asyncValidators,\n ...metadata.controlOptions\n });\n\n if(defaultValue && Array.isArray(defaultValue))\n {\n const formArray = control as FormArray;\n\n for(const val of defaultValue)\n {\n switch(metadata.childType)\n {\n case FormGroup:\n {\n formArray.push(buildFormGroup(val, args));\n\n break;\n }\n case FormArray:\n {\n break;\n }\n default:\n //case FormControl:\n {\n formArray.push(new FormControl(val,\n {\n validators: validators,\n asyncValidators: asyncValidators,\n ...metadata.controlOptions\n }));\n\n break;\n }\n }\n }\n }\n\n break;\n }\n default:\n //case FormControl:\n {\n control = new FormControl(defaultValue,\n {\n validators: validators,\n asyncValidators: asyncValidators,\n ...metadata.controlOptions\n });\n\n break;\n }\n }\n\n if(metadata.disabled)\n {\n control.disable();\n }\n\n formGroup.addControl(propertyName, control);\n }\n\n return formGroup;\n}\n\n/**\n * Builds form from decorated model, only for properties with non `undefined` value\n * @param model - Model that can be decorated for enhancing created form group with validation and so on\n * @param args - Object storing arguments from owning component for customization\n * @returns\n */\nexport function buildFormModel<TModel, TArgs = Record<string, never>>(model: TModel, args?: TArgs): FormGroup\n{\n return buildFormGroup(model as any, args);\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../forms/src/misc/formModel/misc/utils.ts"],"names":[],"mappings":"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","sourcesContent":["import {AbstractControl, FormArray, FormControl, FormGroup} from '@angular/forms';\nimport {Dictionary} from '@jscrpt/common';\n\nimport {FormModelGroup} from '../../types';\nimport {FormModelBuilderDefaultArgs} from '../interfaces/formModelBuilder.interface';\nimport {ModelDecoratorMetadata} from '../interfaces/modelDecoratorMetadata';\nimport {ModelPropertyDecoratorMetadata} from '../interfaces/modelPropertyDecoratorMetadata';\nimport {ɵDefaultPropertyMetadata} from './defaults';\nimport {AsyncValidatorFnFactory, ValidatorFnFactory} from './validatorFactories';\n\n/**\n * Builds form group from decorated model\n * @param model - Model that can be decorated for enhancing created form group with validation and so on\n * @param args - Object storing arguments from owning component for customization\n * @returns\n */\nfunction buildFormGroup<TModel, TArgs extends Dictionary<any> = any>(model: ModelDecoratorMetadata<TModel> & Dictionary<any>, args?: TArgs&FormModelBuilderDefaultArgs): FormGroup<FormModelGroup<TModel>>\n{\n if(!model)\n {\n return new FormGroup<FormModelGroup<TModel>>({} as any);\n }\n\n const modelMetadata: Dictionary<any> = model.ɵControlsMetadata ?? {};\n const groupValidators = model.ɵValidators ?? [];\n const groupAsyncValidators = model.ɵAsyncValidators ?? [];\n const groupArgs: Dictionary<any> = model.ɵArgs ?? {};\n const properties = Object.keys(model);\n const formGroup: FormGroup = new FormGroup({},\n {\n validators: groupValidators?.map(validator => validator instanceof ValidatorFnFactory ? validator.valueOf()({...groupArgs, ...args}) : validator).filter(itm => !!itm),\n asyncValidators: groupAsyncValidators?.map(validator => validator instanceof AsyncValidatorFnFactory ? validator.valueOf()({...groupArgs, ...args}) : validator).filter(itm => !!itm)\n });\n\n for(const propertyName of properties)\n {\n const metadata: ModelPropertyDecoratorMetadata = modelMetadata[propertyName] ?? ɵDefaultPropertyMetadata;\n const defaultValue = model[propertyName];\n\n //Skip control creation if value is undefined\n if(defaultValue === undefined)\n {\n continue;\n }\n\n const validators = metadata.validators.map(validator => validator instanceof ValidatorFnFactory ? validator.valueOf()({...metadata.args, ...args}) : validator).filter(itm => !!itm);\n const asyncValidators = metadata.asyncValidators.map(validator => validator instanceof AsyncValidatorFnFactory ? validator.valueOf()({...metadata.args, ...args}) : validator).filter(itm => !!itm);\n\n let control: AbstractControl;\n\n switch(metadata.type)\n {\n case FormGroup:\n {\n control = buildFormGroup(defaultValue, args);\n\n //TODO: think of setting metadata from property to model\n\n break;\n }\n case FormArray:\n {\n //TODO - enhance FormArray child definition and finish it\n control = new FormArray([],\n {\n validators: validators,\n asyncValidators: asyncValidators,\n ...metadata.controlOptions\n });\n\n if(defaultValue && Array.isArray(defaultValue))\n {\n const formArray = control as FormArray;\n\n for(const val of defaultValue)\n {\n switch(metadata.childType)\n {\n case FormGroup:\n {\n formArray.push(buildFormGroup(val, args));\n\n break;\n }\n case FormArray:\n {\n break;\n }\n default:\n //case FormControl:\n {\n formArray.push(new FormControl(val,\n {\n validators: validators,\n asyncValidators: asyncValidators,\n ...metadata.controlOptions\n }));\n\n break;\n }\n }\n }\n }\n\n break;\n }\n default:\n //case FormControl:\n {\n control = new FormControl(defaultValue,\n {\n validators: validators,\n asyncValidators: asyncValidators,\n ...metadata.controlOptions\n });\n\n break;\n }\n }\n\n if(metadata.disabled)\n {\n control.disable();\n }\n\n formGroup.addControl(propertyName, control);\n }\n\n return formGroup;\n}\n\n/**\n * Builds form from decorated model, only for properties with non `undefined` value\n * @param model - Model that can be decorated for enhancing created form group with validation and so on\n * @param args - Object storing arguments from owning component for customization\n * @returns\n */\nexport function buildFormModel<TModel, TArgs extends Dictionary<any> = any>(model: TModel, args?: TArgs&FormModelBuilderDefaultArgs): FormGroup<FormModelGroup<TModel>>\n{\n return buildFormGroup(model as any, args);\n}\n"]}
@@ -6,15 +6,23 @@ export class ValidatorFnFactory {
6
6
  /**
7
7
  * Creates instance of ValidatorFnFactory
8
8
  * @param _factoryFn - Function used for creating ValidatorFn
9
+ * @param _args - Static arguments/parameters that can be passed to validator
9
10
  */
10
- constructor(_factoryFn) {
11
+ constructor(_factoryFn, _args) {
11
12
  this._factoryFn = _factoryFn;
13
+ this._args = _args;
12
14
  }
13
15
  //######################### public methods #########################
14
16
  /**
15
17
  * Gets validator function factory function
16
18
  */
17
19
  valueOf() {
20
+ if (this._args) {
21
+ return (args) => {
22
+ args = Object.assign(Object.assign({}, this._args), { args });
23
+ return this._factoryFn(args);
24
+ };
25
+ }
18
26
  return this._factoryFn;
19
27
  }
20
28
  }
@@ -26,15 +34,23 @@ export class AsyncValidatorFnFactory {
26
34
  /**
27
35
  * Creates instance of AsyncValidatorFnFactory
28
36
  * @param _factoryFn - Function used for creating AsyncValidatorFn
37
+ * @param _args - Static arguments/parameters that can be passed to validator
29
38
  */
30
- constructor(_factoryFn) {
39
+ constructor(_factoryFn, _args) {
31
40
  this._factoryFn = _factoryFn;
41
+ this._args = _args;
32
42
  }
33
43
  //######################### public methods #########################
34
44
  /**
35
45
  * Gets async validator function factory function
36
46
  */
37
47
  valueOf() {
48
+ if (this._args) {
49
+ return (args) => {
50
+ args = Object.assign(Object.assign({}, this._args), { args });
51
+ return this._factoryFn(args);
52
+ };
53
+ }
38
54
  return this._factoryFn;
39
55
  }
40
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"validatorFactories.js","sourceRoot":"","sources":["../../../../../../forms/src/misc/formModel/misc/validatorFactories.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAE3B,iEAAiE;IACjE;;;OAGG;IACH,YAAoB,UAAuC;QAAvC,eAAU,GAAV,UAAU,CAA6B;IAE3D,CAAC;IAED,oEAAoE;IAEpE;;OAEG;IACI,OAAO;QAEV,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,uBAAuB;IAEhC,iEAAiE;IACjE;;;OAGG;IACH,YAAoB,UAA4C;QAA5C,eAAU,GAAV,UAAU,CAAkC;IAEhE,CAAC;IAED,oEAAoE;IAEpE;;OAEG;IACI,OAAO;QAEV,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;CACJ","sourcesContent":["import {Dictionary} from '@jscrpt/common';\n\nimport {AsyncValidatorFnFactoryFn, ValidatorFnFactoryFn} from '../interfaces/validator.interface';\n\n/**\n * Class that represents ValidatorFn factory\n */\nexport class ValidatorFnFactory<TArg extends Dictionary<any> = any>\n{\n //######################### constructor #########################\n /**\n * Creates instance of ValidatorFnFactory\n * @param _factoryFn - Function used for creating ValidatorFn\n */\n constructor(private _factoryFn?: ValidatorFnFactoryFn<TArg>)\n {\n }\n\n //######################### public methods #########################\n\n /**\n * Gets validator function factory function\n */\n public valueOf(): ValidatorFnFactoryFn<TArg>\n {\n return this._factoryFn;\n }\n}\n\n/**\n * Class that represents AsyncValidatorFn factory\n */\nexport class AsyncValidatorFnFactory<TArg extends Dictionary<any> = any>\n{\n //######################### constructor #########################\n /**\n * Creates instance of AsyncValidatorFnFactory\n * @param _factoryFn - Function used for creating AsyncValidatorFn\n */\n constructor(private _factoryFn?: AsyncValidatorFnFactoryFn<TArg>)\n {\n }\n\n //######################### public methods #########################\n\n /**\n * Gets async validator function factory function\n */\n public valueOf(): AsyncValidatorFnFactoryFn<TArg>\n {\n return this._factoryFn;\n }\n}"]}
1
+ {"version":3,"file":"validatorFactories.js","sourceRoot":"","sources":["../../../../../../forms/src/misc/formModel/misc/validatorFactories.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAE3B,iEAAiE;IACjE;;;;OAIG;IACH,YAAoB,UAAuC,EACvC,KAAY;QADZ,eAAU,GAAV,UAAU,CAA6B;QACvC,UAAK,GAAL,KAAK,CAAO;IAEhC,CAAC;IAED,oEAAoE;IAEpE;;OAEG;IACI,OAAO;QAEV,IAAG,IAAI,CAAC,KAAK,EACb;YACI,OAAO,CAAC,IAAU,EAAe,EAAE;gBAE/B,IAAI,mCAEG,IAAI,CAAC,KAAK,KACb,IAAI,GACP,CAAC;gBAEF,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC,CAAC;SACL;QAED,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,uBAAuB;IAEhC,iEAAiE;IACjE;;;;OAIG;IACH,YAAoB,UAA4C,EAC5C,KAAY;QADZ,eAAU,GAAV,UAAU,CAAkC;QAC5C,UAAK,GAAL,KAAK,CAAO;IAEhC,CAAC;IAED,oEAAoE;IAEpE;;OAEG;IACI,OAAO;QAEV,IAAG,IAAI,CAAC,KAAK,EACb;YACI,OAAO,CAAC,IAAU,EAAoB,EAAE;gBAEpC,IAAI,mCAEG,IAAI,CAAC,KAAK,KACb,IAAI,GACP,CAAC;gBAEF,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC,CAAC;SACL;QAED,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;CACJ","sourcesContent":["import {AsyncValidatorFn, ValidatorFn} from '@angular/forms';\nimport {Dictionary} from '@jscrpt/common';\n\nimport {AsyncValidatorFnFactoryFn, ValidatorFnFactoryFn} from '../interfaces/validator.interface';\n\n/**\n * Class that represents ValidatorFn factory\n */\nexport class ValidatorFnFactory<TArg extends Dictionary<any> = any>\n{\n //######################### constructor #########################\n /**\n * Creates instance of ValidatorFnFactory\n * @param _factoryFn - Function used for creating ValidatorFn\n * @param _args - Static arguments/parameters that can be passed to validator\n */\n constructor(private _factoryFn?: ValidatorFnFactoryFn<TArg>,\n private _args?: TArg,)\n {\n }\n\n //######################### public methods #########################\n\n /**\n * Gets validator function factory function\n */\n public valueOf(): ValidatorFnFactoryFn<TArg>\n {\n if(this._args)\n {\n return (args: TArg): ValidatorFn =>\n {\n args = \n {\n ...this._args,\n args\n };\n\n return this._factoryFn(args);\n };\n }\n\n return this._factoryFn;\n }\n}\n\n/**\n * Class that represents AsyncValidatorFn factory\n */\nexport class AsyncValidatorFnFactory<TArg extends Dictionary<any> = any>\n{\n //######################### constructor #########################\n /**\n * Creates instance of AsyncValidatorFnFactory\n * @param _factoryFn - Function used for creating AsyncValidatorFn\n * @param _args - Static arguments/parameters that can be passed to validator\n */\n constructor(private _factoryFn?: AsyncValidatorFnFactoryFn<TArg>,\n private _args?: TArg,)\n {\n }\n\n //######################### public methods #########################\n\n /**\n * Gets async validator function factory function\n */\n public valueOf(): AsyncValidatorFnFactoryFn<TArg>\n {\n if(this._args)\n {\n return (args: TArg): AsyncValidatorFn =>\n {\n args = \n {\n ...this._args,\n args\n };\n\n return this._factoryFn(args);\n };\n }\n\n return this._factoryFn;\n }\n}"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../forms/src/misc/types.ts"],"names":[],"mappings":"","sourcesContent":["import {AbstractControl, FormArray, FormControl, FormGroup} from '@angular/forms';\n\n/**\n * Creates `FormGroup` generic type for model\n */\nexport type FormModelGroup<TModel, TKey extends keyof TModel = keyof TModel> = {[TProperty in TKey]: AbstractControl<TModel[TProperty]>};\n\n/**\n * Casts `AbstractControl` to typed `FormGroup` using model\n */\nexport type AsFormGroup<TModel> = FormGroup<FormModelGroup<TModel>>;\n\n/**\n * Casts `AbstractControl` to typed `FormArray` of `FormControl` using model\n */\nexport type AsFormControlsArray<TModel> = FormArray<FormControl<TModel>>;\n\n/**\n * Casts `AbstractControl` to typed `FormArray` of `FormGroup` using model\n */\nexport type AsFormGroupArray<TModel> = FormArray<AsFormGroup<TModel>>;\n\n/**\n * Casts `AbstractControl` to typed `FormArray` of `AbstractControl` using model\n */\nexport type AsFormArray<TModel> = FormArray<AbstractControl<TModel>>;\n"]}
@@ -7,8 +7,8 @@ import * as i0 from "@angular/core";
7
7
  import * as i1 from "@angular/forms";
8
8
  import * as i2 from "@angular/common";
9
9
  import * as i3 from "../../directives/errorMessage/errorMessage.directive";
10
- import * as i4 from "../../pipes/withErrorMessage/withErrorMessage.pipe";
11
- import * as i5 from "../../../../../../src/pipes/keys/keys.pipe";
10
+ import * as i4 from "../../../../../../src/pipes/keys/keys.pipe";
11
+ import * as i5 from "../../pipes/withErrorMessage/withErrorMessage.pipe";
12
12
  /**
13
13
  * Component used for rendering from group errors
14
14
  */
@@ -57,9 +57,9 @@ export class GroupErrorsComponent {
57
57
  this._initSubscriptions = null;
58
58
  }
59
59
  }
60
- GroupErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: GroupErrorsComponent, deps: [{ token: i1.FormGroupDirective, optional: true }, { token: i1.FormGroupName, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
61
- GroupErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: GroupErrorsComponent, selector: "form-group-errors", inputs: { cssClass: "cssClass" }, queries: [{ propertyName: "template", first: true, predicate: GroupErrorsTemplateDirective, descendants: true }], ngImport: i0, template: "<ng-template #defaultTemplate let-errorName>\n <div [ngClass]=\"cssClass\" [errorMessage]=\"errorName\" [errors]=\"formGroup.errors\" @slideInOut></div>\n</ng-template>\n\n<ng-container *ngFor=\"let errorName of formGroup.errors | keys | withErrorMessage; let first=first; let last=last; let index=index\">\n <ng-container *ngTemplateOutlet=\"template?.template ?? defaultTemplate; context: {$implicit: errorName, first, last, index, errors: formGroup.errors}\"></ng-container>\n</ng-container>", directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.ErrorMessageDirective, selector: "[errorMessage]", inputs: ["errorMessage", "errors"], exportAs: ["errorMessage"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "withErrorMessage": i4.WithErrorMessagePipe, "keys": i5.KeysPipe }, animations: [slideInOutTrigger], changeDetection: i0.ChangeDetectionStrategy.OnPush });
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: GroupErrorsComponent, decorators: [{
60
+ GroupErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: GroupErrorsComponent, deps: [{ token: i1.FormGroupDirective, optional: true }, { token: i1.FormGroupName, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
61
+ GroupErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: GroupErrorsComponent, selector: "form-group-errors", inputs: { cssClass: "cssClass" }, queries: [{ propertyName: "template", first: true, predicate: GroupErrorsTemplateDirective, descendants: true }], ngImport: i0, template: "<ng-template #defaultTemplate let-errorName>\n <div [ngClass]=\"cssClass\" [errorMessage]=\"errorName\" [errors]=\"formGroup.errors\" @slideInOut></div>\n</ng-template>\n\n<ng-container *ngFor=\"let errorName of formGroup.errors | keys | withErrorMessage; let first=first; let last=last; let index=index\">\n <ng-container *ngTemplateOutlet=\"template?.template ?? defaultTemplate; context: {$implicit: errorName, first, last, index, errors: formGroup.errors}\"></ng-container>\n</ng-container>", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.ErrorMessageDirective, selector: "[errorMessage]", inputs: ["errorMessage", "errors"], exportAs: ["errorMessage"] }, { kind: "pipe", type: i4.KeysPipe, name: "keys" }, { kind: "pipe", type: i5.WithErrorMessagePipe, name: "withErrorMessage" }], animations: [slideInOutTrigger], changeDetection: i0.ChangeDetectionStrategy.OnPush });
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: GroupErrorsComponent, decorators: [{
63
63
  type: Component,
64
64
  args: [{ selector: 'form-group-errors', animations: [slideInOutTrigger], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #defaultTemplate let-errorName>\n <div [ngClass]=\"cssClass\" [errorMessage]=\"errorName\" [errors]=\"formGroup.errors\" @slideInOut></div>\n</ng-template>\n\n<ng-container *ngFor=\"let errorName of formGroup.errors | keys | withErrorMessage; let first=first; let last=last; let index=index\">\n <ng-container *ngTemplateOutlet=\"template?.template ?? defaultTemplate; context: {$implicit: errorName, first, last, index, errors: formGroup.errors}\"></ng-container>\n</ng-container>" }]
65
65
  }], ctorParameters: function () { return [{ type: i1.FormGroupDirective, decorators: [{
@@ -1 +1 @@
1
- {"version":3,"file":"groupErrors.component.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.ts","../../../../../../../forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,QAAQ,EAAqB,iBAAiB,EAAE,KAAK,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AACtI,OAAO,EAA+B,kBAAkB,EAAE,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,4BAA4B,EAAC,MAAM,kBAAkB,CAAC;;;;;;;AAE9D;;GAEG;AAQH,MAAM,OAAO,oBAAoB;IA8C7B,iEAAiE;IACjE,YAAkC,kBAAsC,EACtC,aAA4B,EACxC,eAAkC;QAFtB,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,kBAAa,GAAb,aAAa,CAAe;QACxC,oBAAe,GAAf,eAAe,CAAmB;QAxCxD;;WAEG;QACO,uBAAkB,GAAiB,IAAI,YAAY,EAAE,CAAC;QAuC5D,IAAG,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,aAAa,EAClD;YACI,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;SAC9E;IACL,CAAC;IApCD,2FAA2F;IAE3F;;;OAGG;IACH,IAAW,SAAS;;QAEhB,OAAO,OAAC,IAAI,CAAC,UAAU,oCAAf,IAAI,CAAC,UAAU,GAAM,MAAA,MAAA,IAAI,CAAC,kBAAkB,0CAAE,IAAI,mCAAI,MAAA,IAAI,CAAC,aAAa,0CAAE,OAAO,EAAE,CAAC;IAChG,CAAC;IA6BD,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;YAEvE,IAAG,IAAI,CAAC,UAAU,IAAI,KAAK,IAAI,KAAK,IAAI,SAAS,EACjD;gBACI,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;gBACxB,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAC;aACxC;QACL,CAAC,CAAC,CAAC,CAAC;IACR,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;;QAEd,MAAA,IAAI,CAAC,kBAAkB,0CAAE,WAAW,EAAE,CAAC;QACvC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;IACnC,CAAC;;iHAnFQ,oBAAoB;qGAApB,oBAAoB,iIA2Cf,4BAA4B,gDC5D9C,sfAMe,shBDQC,CAAC,iBAAiB,CAAC;2FAGtB,oBAAoB;kBAPhC,SAAS;+BAEI,mBAAmB,cAEjB,CAAC,iBAAiB,CAAC,mBACd,uBAAuB,CAAC,MAAM;;0BAiDlC,QAAQ;;0BACR,QAAQ;4EAZd,QAAQ;sBADd,KAAK;gBASC,QAAQ;sBADd,YAAY;uBAAC,4BAA4B","sourcesContent":["import {Component, ChangeDetectionStrategy, Optional, OnInit, OnDestroy, ChangeDetectorRef, Input, ContentChild} from '@angular/core';\nimport {FormControlStatus, FormGroup, FormGroupDirective, FormGroupName} from '@angular/forms';\nimport {slideInOutTrigger} from '@anglr/animations';\nimport {Subscription} from 'rxjs';\n\nimport {GroupErrorsTemplateDirective} from '../../directives';\n\n/**\n * Component used for rendering from group errors\n */\n@Component(\n{\n selector: 'form-group-errors',\n templateUrl: 'groupErrors.component.html',\n animations: [slideInOutTrigger],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class GroupErrorsComponent implements OnInit, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of currently used form group\n */\n protected _formGroup?: FormGroup;\n\n /**\n * Subscriptions created during initialization\n */\n protected _initSubscriptions: Subscription = new Subscription();\n\n /**\n * Last state of form control\n */\n protected _lastState?: FormControlStatus;\n\n //######################### public properties - template bindings #########################\n\n /**\n * Gets instance of currently used form group\n * @internal\n */\n public get formGroup(): FormGroup\n {\n return (this._formGroup ??= (this.formGroupDirective?.form ?? this.formGroupName?.control));\n }\n\n //######################### public properties - inputs #########################\n\n /**\n * Css classes that are applied to default rendered divs\n */\n @Input()\n public cssClass: string;\n\n //######################### public properties - children #########################\n\n /**\n * Custom template for rendering form group error\n */\n @ContentChild(GroupErrorsTemplateDirective)\n public template?: GroupErrorsTemplateDirective;\n\n //######################### constructor #########################\n constructor(@Optional() protected formGroupDirective: FormGroupDirective,\n @Optional() protected formGroupName: FormGroupName,\n protected _changeDetector: ChangeDetectorRef,)\n {\n if(!this.formGroupDirective && !this.formGroupName)\n {\n throw new Error('There is no parent formGroup or formGroupName directive');\n }\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._initSubscriptions.add(this.formGroup.statusChanges.subscribe(state =>\n {\n if(this._lastState != state || state == 'INVALID')\n {\n this._lastState = state;\n this._changeDetector.detectChanges();\n }\n }));\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._initSubscriptions?.unsubscribe();\n this._initSubscriptions = null;\n }\n}","<ng-template #defaultTemplate let-errorName>\n <div [ngClass]=\"cssClass\" [errorMessage]=\"errorName\" [errors]=\"formGroup.errors\" @slideInOut></div>\n</ng-template>\n\n<ng-container *ngFor=\"let errorName of formGroup.errors | keys | withErrorMessage; let first=first; let last=last; let index=index\">\n <ng-container *ngTemplateOutlet=\"template?.template ?? defaultTemplate; context: {$implicit: errorName, first, last, index, errors: formGroup.errors}\"></ng-container>\n</ng-container>"]}
1
+ {"version":3,"file":"groupErrors.component.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.ts","../../../../../../../forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,QAAQ,EAAqB,iBAAiB,EAAE,KAAK,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AACtI,OAAO,EAA+B,kBAAkB,EAAE,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,4BAA4B,EAAC,MAAM,kBAAkB,CAAC;;;;;;;AAE9D;;GAEG;AAQH,MAAM,OAAO,oBAAoB;IA8C7B,iEAAiE;IACjE,YAAkC,kBAAsC,EACtC,aAA4B,EACxC,eAAkC;QAFtB,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,kBAAa,GAAb,aAAa,CAAe;QACxC,oBAAe,GAAf,eAAe,CAAmB;QAxCxD;;WAEG;QACO,uBAAkB,GAAiB,IAAI,YAAY,EAAE,CAAC;QAuC5D,IAAG,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,aAAa,EAClD;YACI,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;SAC9E;IACL,CAAC;IApCD,2FAA2F;IAE3F;;;OAGG;IACH,IAAW,SAAS;;QAEhB,OAAO,OAAC,IAAI,CAAC,UAAU,oCAAf,IAAI,CAAC,UAAU,GAAM,MAAA,MAAA,IAAI,CAAC,kBAAkB,0CAAE,IAAI,mCAAI,MAAA,IAAI,CAAC,aAAa,0CAAE,OAAO,EAAE,CAAC;IAChG,CAAC;IA6BD,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;YAEvE,IAAG,IAAI,CAAC,UAAU,IAAI,KAAK,IAAI,KAAK,IAAI,SAAS,EACjD;gBACI,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;gBACxB,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAC;aACxC;QACL,CAAC,CAAC,CAAC,CAAC;IACR,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;;QAEd,MAAA,IAAI,CAAC,kBAAkB,0CAAE,WAAW,EAAE,CAAC;QACvC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;IACnC,CAAC;;iHAnFQ,oBAAoB;qGAApB,oBAAoB,iIA2Cf,4BAA4B,gDC5D9C,sfAMe,irBDQC,CAAC,iBAAiB,CAAC;2FAGtB,oBAAoB;kBAPhC,SAAS;+BAEI,mBAAmB,cAEjB,CAAC,iBAAiB,CAAC,mBACd,uBAAuB,CAAC,MAAM;;0BAiDlC,QAAQ;;0BACR,QAAQ;4EAZd,QAAQ;sBADd,KAAK;gBASC,QAAQ;sBADd,YAAY;uBAAC,4BAA4B","sourcesContent":["import {Component, ChangeDetectionStrategy, Optional, OnInit, OnDestroy, ChangeDetectorRef, Input, ContentChild} from '@angular/core';\nimport {FormControlStatus, FormGroup, FormGroupDirective, FormGroupName} from '@angular/forms';\nimport {slideInOutTrigger} from '@anglr/animations';\nimport {Subscription} from 'rxjs';\n\nimport {GroupErrorsTemplateDirective} from '../../directives';\n\n/**\n * Component used for rendering from group errors\n */\n@Component(\n{\n selector: 'form-group-errors',\n templateUrl: 'groupErrors.component.html',\n animations: [slideInOutTrigger],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class GroupErrorsComponent implements OnInit, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of currently used form group\n */\n protected _formGroup?: FormGroup;\n\n /**\n * Subscriptions created during initialization\n */\n protected _initSubscriptions: Subscription = new Subscription();\n\n /**\n * Last state of form control\n */\n protected _lastState?: FormControlStatus;\n\n //######################### public properties - template bindings #########################\n\n /**\n * Gets instance of currently used form group\n * @internal\n */\n public get formGroup(): FormGroup\n {\n return (this._formGroup ??= (this.formGroupDirective?.form ?? this.formGroupName?.control));\n }\n\n //######################### public properties - inputs #########################\n\n /**\n * Css classes that are applied to default rendered divs\n */\n @Input()\n public cssClass: string;\n\n //######################### public properties - children #########################\n\n /**\n * Custom template for rendering form group error\n */\n @ContentChild(GroupErrorsTemplateDirective)\n public template?: GroupErrorsTemplateDirective;\n\n //######################### constructor #########################\n constructor(@Optional() protected formGroupDirective: FormGroupDirective,\n @Optional() protected formGroupName: FormGroupName,\n protected _changeDetector: ChangeDetectorRef,)\n {\n if(!this.formGroupDirective && !this.formGroupName)\n {\n throw new Error('There is no parent formGroup or formGroupName directive');\n }\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._initSubscriptions.add(this.formGroup.statusChanges.subscribe(state =>\n {\n if(this._lastState != state || state == 'INVALID')\n {\n this._lastState = state;\n this._changeDetector.detectChanges();\n }\n }));\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._initSubscriptions?.unsubscribe();\n this._initSubscriptions = null;\n }\n}","<ng-template #defaultTemplate let-errorName>\n <div [ngClass]=\"cssClass\" [errorMessage]=\"errorName\" [errors]=\"formGroup.errors\" @slideInOut></div>\n</ng-template>\n\n<ng-container *ngFor=\"let errorName of formGroup.errors | keys | withErrorMessage; let first=first; let last=last; let index=index\">\n <ng-container *ngTemplateOutlet=\"template?.template ?? defaultTemplate; context: {$implicit: errorName, first, last, index, errors: formGroup.errors}\"></ng-container>\n</ng-container>"]}
@@ -52,9 +52,9 @@ export class ErrorMessageDirective {
52
52
  this._element.nativeElement.innerHTML = message;
53
53
  }
54
54
  }
55
- ErrorMessageDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: ErrorMessageDirective, deps: [{ token: i0.ElementRef }, { token: STRING_LOCALIZATION }, { token: VALIDATION_ERROR_MESSAGES }], target: i0.ɵɵFactoryTarget.Directive });
56
- ErrorMessageDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: ErrorMessageDirective, selector: "[errorMessage]", inputs: { errorName: ["errorMessage", "errorName"], errors: "errors" }, exportAs: ["errorMessage"], usesOnChanges: true, ngImport: i0 });
57
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: ErrorMessageDirective, decorators: [{
55
+ ErrorMessageDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ErrorMessageDirective, deps: [{ token: i0.ElementRef }, { token: STRING_LOCALIZATION }, { token: VALIDATION_ERROR_MESSAGES }], target: i0.ɵɵFactoryTarget.Directive });
56
+ ErrorMessageDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: ErrorMessageDirective, selector: "[errorMessage]", inputs: { errorName: ["errorMessage", "errorName"], errors: "errors" }, exportAs: ["errorMessage"], usesOnChanges: true, ngImport: i0 });
57
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ErrorMessageDirective, decorators: [{
58
58
  type: Directive,
59
59
  args: [{
60
60
  selector: '[errorMessage]',