@anglr/common 22.0.0-beta.20241115045223 → 22.0.0-beta.20250123101933

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 (343) hide show
  1. package/changelog.md +106 -1
  2. package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js +5 -4
  3. package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -1
  4. package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +4 -4
  5. package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js.map +1 -1
  6. package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +4 -4
  7. package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js.map +1 -1
  8. package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +4 -4
  9. package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js.map +1 -1
  10. package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js +4 -5
  11. package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js.map +1 -1
  12. package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +3 -4
  13. package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js.map +1 -1
  14. package/es2022/forms/src/directives/hasError/hasError.directive.js +3 -4
  15. package/es2022/forms/src/directives/hasError/hasError.directive.js.map +1 -1
  16. package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +5 -5
  17. package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js.map +1 -1
  18. package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js +5 -5
  19. package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js.map +1 -1
  20. package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +4 -4
  21. package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js.map +1 -1
  22. package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js +5 -5
  23. package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js.map +1 -1
  24. package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js +3 -4
  25. package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js.map +1 -1
  26. package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +3 -4
  27. package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js.map +1 -1
  28. package/es2022/forms/src/misc/utils.js +2 -1
  29. package/es2022/forms/src/misc/utils.js.map +1 -1
  30. package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +14 -9
  31. package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js.map +1 -1
  32. package/es2022/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js +4 -4
  33. package/es2022/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js.map +1 -1
  34. package/es2022/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js +4 -4
  35. package/es2022/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js.map +1 -1
  36. package/es2022/forms/src/modules/errorMessage/modules/errorMessage.module.js +5 -13
  37. package/es2022/forms/src/modules/errorMessage/modules/errorMessage.module.js.map +1 -1
  38. package/es2022/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js +3 -3
  39. package/es2022/forms/src/modules/formPipes/modules/formPipes.module.js +5 -5
  40. package/es2022/forms/src/modules/formPipes/modules/formPipes.module.js.map +1 -1
  41. package/es2022/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js +3 -3
  42. package/es2022/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js +3 -3
  43. package/es2022/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js +3 -3
  44. package/es2022/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js +3 -3
  45. package/es2022/forms/src/modules/hasError.module.js +4 -4
  46. package/es2022/forms/src/modules/numberInput.module.js +7 -7
  47. package/es2022/forms/src/modules/numberInput.module.js.map +1 -1
  48. package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +5 -4
  49. package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js.map +1 -1
  50. package/es2022/forms/src/services/formModelBuilder/formModelBuilder.service.js +3 -3
  51. package/es2022/forms/src/services/submitted/submitted.service.js +3 -3
  52. package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +4 -4
  53. package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js.map +1 -1
  54. package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js +4 -4
  55. package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js.map +1 -1
  56. package/es2022/hotkeys/src/services/appHotkeys.service.js +3 -3
  57. package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js +10 -7
  58. package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js.map +1 -1
  59. package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js +12 -7
  60. package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js.map +1 -1
  61. package/es2022/material/src/components/titledDialog/titledDialog.component.js +9 -6
  62. package/es2022/material/src/components/titledDialog/titledDialog.component.js.map +1 -1
  63. package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js +3 -4
  64. package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js.map +1 -1
  65. package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +3 -4
  66. package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js.map +1 -1
  67. package/es2022/material/src/modules/confirmationDialog.module.js +6 -15
  68. package/es2022/material/src/modules/confirmationDialog.module.js.map +1 -1
  69. package/es2022/material/src/modules/debugDataCopyClick.module.js +4 -4
  70. package/es2022/material/src/modules/movableTitledDialog.module.js +7 -8
  71. package/es2022/material/src/modules/movableTitledDialog.module.js.map +1 -1
  72. package/es2022/material/src/modules/titledDialog.module.js +5 -16
  73. package/es2022/material/src/modules/titledDialog.module.js.map +1 -1
  74. package/es2022/material/src/services/titledDialog/titledDialog.service.js +3 -3
  75. package/es2022/router/src/services/routing/dataRouter.js +3 -3
  76. package/es2022/router/src/services/routing/dataRouterData.js +3 -3
  77. package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js +6 -6
  78. package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js.map +1 -1
  79. package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js +4 -4
  80. package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js.map +1 -1
  81. package/es2022/src/decorators/asSignal/asSignal.decorator.js.map +1 -1
  82. package/es2022/src/decorators/componentDisplay/componentDisplay.decorator.js.map +1 -1
  83. package/es2022/src/decorators/componentDisplayBlock/componentDisplayBlock.decorator.js.map +1 -1
  84. package/es2022/src/decorators/componentDisplayFlex/componentDisplayFlex.decorator.js.map +1 -1
  85. package/es2022/src/decorators/componentHostStyle/componentHostStyle.decorator.js.map +1 -1
  86. package/es2022/src/decorators/scrollableContent/scrollableContent.decorator.js.map +1 -1
  87. package/es2022/src/decorators/typeProvider/typeProvider.decorator.js +0 -1
  88. package/es2022/src/decorators/typeProvider/typeProvider.decorator.js.map +1 -1
  89. package/es2022/src/decorators/withFullscreenContentCssClass/withFullscreenContentCssClass.decorator.js.map +1 -1
  90. package/es2022/src/directives/bodyRender/bodyRender.directive.js +3 -4
  91. package/es2022/src/directives/bodyRender/bodyRender.directive.js.map +1 -1
  92. package/es2022/src/directives/clickOutside/clickOutside.directive.js +4 -5
  93. package/es2022/src/directives/clickOutside/clickOutside.directive.js.map +1 -1
  94. package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js +3 -4
  95. package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js.map +1 -1
  96. package/es2022/src/directives/goBack/goBack.directive.js +3 -4
  97. package/es2022/src/directives/goBack/goBack.directive.js.map +1 -1
  98. package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +3 -4
  99. package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js.map +1 -1
  100. package/es2022/src/directives/positionTo/positionTo.directive.js +4 -5
  101. package/es2022/src/directives/positionTo/positionTo.directive.js.map +1 -1
  102. package/es2022/src/index.js +2 -1
  103. package/es2022/src/index.js.map +1 -1
  104. package/es2022/src/modules/castPipes/modules/castPipes.module.js +5 -5
  105. package/es2022/src/modules/castPipes/modules/castPipes.module.js.map +1 -1
  106. package/es2022/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js +3 -3
  107. package/es2022/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js +3 -3
  108. package/es2022/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +3 -3
  109. package/es2022/src/modules/castPipes/pipes/castType/castType.pipe.js +3 -3
  110. package/es2022/src/modules/commonDynamic.module.js +4 -4
  111. package/es2022/src/modules/commonLocalize.module.js +7 -7
  112. package/es2022/src/modules/commonLocalize.module.js.map +1 -1
  113. package/es2022/src/modules/commonUtils.module.js +9 -9
  114. package/es2022/src/modules/commonUtils.module.js.map +1 -1
  115. package/es2022/src/modules/debugData/components/debugData/debugData.component.js +4 -4
  116. package/es2022/src/modules/debugData/components/debugData/debugData.component.js.map +1 -1
  117. package/es2022/src/modules/debugData/modules/debugData.module.js +4 -4
  118. package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +3 -3
  119. package/es2022/src/modules/file/components/file/file.component.js +119 -0
  120. package/es2022/src/modules/file/components/file/file.component.js.map +1 -0
  121. package/es2022/src/modules/file/components/fileInput/fileInput.component.js +62 -0
  122. package/es2022/src/modules/file/components/fileInput/fileInput.component.js.map +1 -0
  123. package/es2022/src/modules/file/components/index.js +4 -0
  124. package/es2022/src/modules/file/components/index.js.map +1 -0
  125. package/es2022/src/modules/file/components/uploadButton/uploadButton.component.js +59 -0
  126. package/es2022/src/modules/file/components/uploadButton/uploadButton.component.js.map +1 -0
  127. package/es2022/src/modules/file/directive/fileInput/fileInput.directive.js +153 -0
  128. package/es2022/src/modules/file/directive/fileInput/fileInput.directive.js.map +1 -0
  129. package/es2022/src/modules/file/directive/fileTemplate/fileTemplate.context.js +2 -0
  130. package/es2022/src/modules/file/directive/fileTemplate/fileTemplate.context.js.map +1 -0
  131. package/es2022/src/modules/file/directive/fileTemplate/fileTemplate.directive.js +23 -0
  132. package/es2022/src/modules/file/directive/fileTemplate/fileTemplate.directive.js.map +1 -0
  133. package/es2022/src/modules/file/directive/index.js +4 -0
  134. package/es2022/src/modules/file/directive/index.js.map +1 -0
  135. package/es2022/src/modules/file/index.js +6 -0
  136. package/es2022/src/modules/file/index.js.map +1 -0
  137. package/es2022/src/modules/file/interfaces/fileVisual/fileVisual.interface.js +2 -0
  138. package/es2022/src/modules/file/interfaces/fileVisual/fileVisual.interface.js.map +1 -0
  139. package/es2022/src/modules/file/interfaces/index.js +2 -0
  140. package/es2022/src/modules/file/interfaces/index.js.map +1 -0
  141. package/es2022/src/modules/file/misc/tokens.js +6 -0
  142. package/es2022/src/modules/file/misc/tokens.js.map +1 -0
  143. package/es2022/src/modules/file/modules/file.module.js +40 -0
  144. package/es2022/src/modules/file/modules/file.module.js.map +1 -0
  145. package/es2022/src/modules/file/modules/index.js +2 -0
  146. package/es2022/src/modules/file/modules/index.js.map +1 -0
  147. package/es2022/src/modules/logger/components/console/console.component.js +5 -5
  148. package/es2022/src/modules/logger/components/console/console.component.js.map +1 -1
  149. package/es2022/src/modules/logger/services/console/consoleComponent.service.js +3 -3
  150. package/es2022/src/modules/logger/services/console/consoleComponentService.options.js +3 -3
  151. package/es2022/src/modules/logger/services/logger/logger.service.js +3 -3
  152. package/es2022/src/modules/logger/services/rest/restSink.options.js +3 -3
  153. package/es2022/src/modules/logger/types/loggerOptions.js +3 -3
  154. package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js +9 -7
  155. package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js.map +1 -1
  156. package/es2022/src/modules/multiButton/modules/multiButton.module.js +5 -9
  157. package/es2022/src/modules/multiButton/modules/multiButton.module.js.map +1 -1
  158. package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +9 -6
  159. package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js.map +1 -1
  160. package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +4 -4
  161. package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js.map +1 -1
  162. package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js +4 -4
  163. package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js.map +1 -1
  164. package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js +7 -15
  165. package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js.map +1 -1
  166. package/es2022/src/modules/progressIndicator/services/progressIndicator.service.js +3 -3
  167. package/es2022/src/modules/progressIndicator/services/progressIndicatorOptions.js.map +1 -1
  168. package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js +7 -5
  169. package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js.map +1 -1
  170. package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js +5 -5
  171. package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +1 -1
  172. package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +3 -3
  173. package/es2022/src/modules/tooltip/modules/tooltip.module.js +6 -10
  174. package/es2022/src/modules/tooltip/modules/tooltip.module.js.map +1 -1
  175. package/es2022/src/pipes/displayProperties/displayProperties.pipe.js +3 -4
  176. package/es2022/src/pipes/displayProperties/displayProperties.pipe.js.map +1 -1
  177. package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js +4 -5
  178. package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js.map +1 -1
  179. package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js +8 -9
  180. package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js.map +1 -1
  181. package/es2022/src/pipes/isNaN/isNaN.pipe.js +3 -4
  182. package/es2022/src/pipes/isNaN/isNaN.pipe.js.map +1 -1
  183. package/es2022/src/pipes/isPresent/isPresent.pipe.js +3 -4
  184. package/es2022/src/pipes/isPresent/isPresent.pipe.js.map +1 -1
  185. package/es2022/src/pipes/keys/keys.pipe.js +4 -4
  186. package/es2022/src/pipes/keys/keys.pipe.js.map +1 -1
  187. package/es2022/src/pipes/localize/localize.pipe.js +4 -5
  188. package/es2022/src/pipes/localize/localize.pipe.js.map +1 -1
  189. package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +5 -5
  190. package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js.map +1 -1
  191. package/es2022/src/pipes/numeral/numeral.pipe.js +4 -4
  192. package/es2022/src/pipes/numeral/numeral.pipe.js.map +1 -1
  193. package/es2022/src/pipes/trimText/trimText.pipe.js +4 -4
  194. package/es2022/src/pipes/trimText/trimText.pipe.js.map +1 -1
  195. package/es2022/src/pipes/urlEncode/urlEncode.pipe.js +4 -4
  196. package/es2022/src/pipes/urlEncode/urlEncode.pipe.js.map +1 -1
  197. package/es2022/src/services/cookies/cookies.service.js +3 -3
  198. package/es2022/src/services/notifications/defaultNotifications.service.js +3 -3
  199. package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js +3 -3
  200. package/es2022/src/services/statusCode/statusCode.service.js +3 -3
  201. package/es2022/src/services/stringLocalization/noStringLocalization.service.js +3 -3
  202. package/es2022/src/services/temporaryStorage/memoryTemporaryStorage.service.js +3 -3
  203. package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js +3 -3
  204. package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +3 -3
  205. package/floating-ui/src/services/floatingUiDomPosition.service.d.ts.map +1 -1
  206. package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.d.ts.map +1 -1
  207. package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.d.ts.map +1 -1
  208. package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.d.ts.map +1 -1
  209. package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.html +1 -1
  210. package/forms/src/directives/groupHasError/groupHasError.directive.d.ts.map +1 -1
  211. package/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.d.ts.map +1 -1
  212. package/forms/src/directives/hasError/hasError.directive.d.ts.map +1 -1
  213. package/forms/src/directives/numberInput/maxValueNumberValidator.directive.d.ts +1 -1
  214. package/forms/src/directives/numberInput/minValueNumberValidator.directive.d.ts +1 -1
  215. package/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.d.ts +1 -1
  216. package/forms/src/directives/numberInput/numberInputValidator.directive.d.ts +1 -1
  217. package/forms/src/directives/requiredClass/requiredClass.directive.d.ts.map +1 -1
  218. package/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.d.ts.map +1 -1
  219. package/forms/src/misc/utils.d.ts.map +1 -1
  220. package/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.d.ts +1 -1
  221. package/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.d.ts.map +1 -1
  222. package/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.html +4 -3
  223. package/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.d.ts +1 -1
  224. package/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.d.ts +1 -1
  225. package/forms/src/modules/errorMessage/modules/errorMessage.module.d.ts +1 -3
  226. package/forms/src/modules/errorMessage/modules/errorMessage.module.d.ts.map +1 -1
  227. package/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.d.ts +1 -1
  228. package/forms/src/modules/formPipes/modules/formPipes.module.d.ts +1 -1
  229. package/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.d.ts +1 -1
  230. package/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.d.ts +1 -1
  231. package/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.d.ts +1 -1
  232. package/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.d.ts +1 -1
  233. package/forms/src/modules/numberInput.module.d.ts +1 -1
  234. package/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.d.ts.map +1 -1
  235. package/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.d.ts.map +1 -1
  236. package/hotkeys/src/components/cheatSheet/cheatSheet.component.d.ts.map +1 -1
  237. package/material/src/components/confirmationDialog/confirmationDialog.component.d.ts +1 -1
  238. package/material/src/components/confirmationDialog/confirmationDialog.component.d.ts.map +1 -1
  239. package/material/src/components/movableTitledDialog/movableTitledDialog.component.d.ts +1 -1
  240. package/material/src/components/movableTitledDialog/movableTitledDialog.component.d.ts.map +1 -1
  241. package/material/src/components/movableTitledDialog/movableTitledDialog.component.html +1 -1
  242. package/material/src/components/titledDialog/titledDialog.component.d.ts +1 -1
  243. package/material/src/components/titledDialog/titledDialog.component.d.ts.map +1 -1
  244. package/material/src/components/titledDialog/titledDialog.component.html +2 -2
  245. package/material/src/directives/confirmationDialog/confirmationDialog.directive.d.ts.map +1 -1
  246. package/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.d.ts.map +1 -1
  247. package/material/src/modules/confirmationDialog.module.d.ts +4 -6
  248. package/material/src/modules/confirmationDialog.module.d.ts.map +1 -1
  249. package/material/src/modules/movableTitledDialog.module.d.ts +5 -5
  250. package/material/src/modules/movableTitledDialog.module.d.ts.map +1 -1
  251. package/material/src/modules/titledDialog.module.d.ts +2 -4
  252. package/material/src/modules/titledDialog.module.d.ts.map +1 -1
  253. package/package.json +44 -44
  254. package/router/src/decorators/moduleRoutes.decorator.d.ts.map +1 -1
  255. package/src/components/collapsibleIcon/collapsibleIcon.component.d.ts.map +1 -1
  256. package/src/components/collapsibleTitle/collapsibleTitle.component.d.ts.map +1 -1
  257. package/src/decorators/typeProvider/typeProvider.decorator.d.ts.map +1 -1
  258. package/src/directives/bodyRender/bodyRender.directive.d.ts.map +1 -1
  259. package/src/directives/clickOutside/clickOutside.directive.d.ts +3 -3
  260. package/src/directives/clickOutside/clickOutside.directive.d.ts.map +1 -1
  261. package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts.map +1 -1
  262. package/src/directives/goBack/goBack.directive.d.ts.map +1 -1
  263. package/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.d.ts.map +1 -1
  264. package/src/directives/positionTo/positionTo.directive.d.ts +3 -3
  265. package/src/directives/positionTo/positionTo.directive.d.ts.map +1 -1
  266. package/src/index.d.ts +2 -1
  267. package/src/index.d.ts.map +1 -1
  268. package/src/modules/castPipes/modules/castPipes.module.d.ts +1 -1
  269. package/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.d.ts +1 -1
  270. package/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.d.ts +1 -1
  271. package/src/modules/castPipes/pipes/asRequired/asRequired.pipe.d.ts +1 -1
  272. package/src/modules/castPipes/pipes/castType/castType.pipe.d.ts +1 -1
  273. package/src/modules/commonLocalize.module.d.ts +1 -1
  274. package/src/modules/commonUtils.module.d.ts +1 -1
  275. package/src/modules/debugData/components/debugData/debugData.component.d.ts.map +1 -1
  276. package/src/modules/file/components/file/file.component.css +16 -0
  277. package/src/modules/file/components/file/file.component.d.ts +85 -0
  278. package/src/modules/file/components/file/file.component.d.ts.map +1 -0
  279. package/src/modules/file/components/file/file.component.html +14 -0
  280. package/src/modules/file/components/fileInput/fileInput.component.css +27 -0
  281. package/src/modules/file/components/fileInput/fileInput.component.d.ts +37 -0
  282. package/src/modules/file/components/fileInput/fileInput.component.d.ts.map +1 -0
  283. package/src/modules/file/components/fileInput/fileInput.component.html +7 -0
  284. package/src/modules/file/components/index.d.ts +4 -0
  285. package/src/modules/file/components/index.d.ts.map +1 -0
  286. package/src/modules/file/components/uploadButton/uploadButton.component.css +52 -0
  287. package/src/modules/file/components/uploadButton/uploadButton.component.d.ts +36 -0
  288. package/src/modules/file/components/uploadButton/uploadButton.component.d.ts.map +1 -0
  289. package/src/modules/file/components/uploadButton/uploadButton.component.html +16 -0
  290. package/src/modules/file/directive/fileInput/fileInput.directive.d.ts +69 -0
  291. package/src/modules/file/directive/fileInput/fileInput.directive.d.ts.map +1 -0
  292. package/src/modules/file/directive/fileTemplate/fileTemplate.context.d.ts +30 -0
  293. package/src/modules/file/directive/fileTemplate/fileTemplate.context.d.ts.map +1 -0
  294. package/src/modules/file/directive/fileTemplate/fileTemplate.directive.d.ts +14 -0
  295. package/src/modules/file/directive/fileTemplate/fileTemplate.directive.d.ts.map +1 -0
  296. package/src/modules/file/directive/index.d.ts +4 -0
  297. package/src/modules/file/directive/index.d.ts.map +1 -0
  298. package/src/modules/file/index.d.ts +6 -0
  299. package/src/modules/file/index.d.ts.map +1 -0
  300. package/src/modules/file/interfaces/fileVisual/fileVisual.interface.d.ts +12 -0
  301. package/src/modules/file/interfaces/fileVisual/fileVisual.interface.d.ts.map +1 -0
  302. package/src/modules/file/interfaces/index.d.ts +2 -0
  303. package/src/modules/file/interfaces/index.d.ts.map +1 -0
  304. package/src/modules/file/misc/tokens.d.ts +7 -0
  305. package/src/modules/file/misc/tokens.d.ts.map +1 -0
  306. package/src/modules/file/modules/file.module.d.ts +15 -0
  307. package/src/modules/file/modules/file.module.d.ts.map +1 -0
  308. package/src/modules/file/modules/index.d.ts +2 -0
  309. package/src/modules/file/modules/index.d.ts.map +1 -0
  310. package/src/modules/logger/components/console/console.component.d.ts +3 -3
  311. package/src/modules/logger/components/console/console.component.d.ts.map +1 -1
  312. package/src/modules/multiButton/components/multiButton/multiButton.component.d.ts +1 -1
  313. package/src/modules/multiButton/components/multiButton/multiButton.component.d.ts.map +1 -1
  314. package/src/modules/multiButton/components/multiButton/multiButton.component.html +1 -1
  315. package/src/modules/multiButton/modules/multiButton.module.d.ts +1 -2
  316. package/src/modules/multiButton/modules/multiButton.module.d.ts.map +1 -1
  317. package/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.d.ts +1 -1
  318. package/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.d.ts.map +1 -1
  319. package/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.html +4 -1
  320. package/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.d.ts +1 -1
  321. package/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.d.ts.map +1 -1
  322. package/src/modules/progressIndicator/modules/progressIndicator.module.d.ts +1 -3
  323. package/src/modules/progressIndicator/modules/progressIndicator.module.d.ts.map +1 -1
  324. package/src/modules/tooltip/components/tooltip/tooltip.component.d.ts +1 -1
  325. package/src/modules/tooltip/components/tooltip/tooltip.component.d.ts.map +1 -1
  326. package/src/modules/tooltip/components/tooltip/tooltip.component.html +13 -5
  327. package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts.map +1 -1
  328. package/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.d.ts +1 -1
  329. package/src/modules/tooltip/modules/tooltip.module.d.ts +4 -5
  330. package/src/modules/tooltip/modules/tooltip.module.d.ts.map +1 -1
  331. package/src/pipes/displayProperties/displayProperties.pipe.d.ts.map +1 -1
  332. package/src/pipes/firstUppercase/firstUppercase.pipe.d.ts +4 -4
  333. package/src/pipes/firstUppercase/firstUppercase.pipe.d.ts.map +1 -1
  334. package/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.d.ts +8 -8
  335. package/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.d.ts.map +1 -1
  336. package/src/pipes/isNaN/isNaN.pipe.d.ts.map +1 -1
  337. package/src/pipes/isPresent/isPresent.pipe.d.ts.map +1 -1
  338. package/src/pipes/localize/localize.pipe.d.ts +3 -3
  339. package/src/pipes/localize/localize.pipe.d.ts.map +1 -1
  340. package/src/pipes/mergeCssClasses/mergeCssClasses.pipe.d.ts +3 -3
  341. package/src/pipes/mergeCssClasses/mergeCssClasses.pipe.d.ts.map +1 -1
  342. package/version.bak +1 -1
  343. package/lerna.json +0 -4
package/changelog.md CHANGED
@@ -1,5 +1,110 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 22.0.0 (2025-01-23)
4
+
5
+ ### Features
6
+
7
+ - all *components*, *directives*, *pipes* are now standalone
8
+
9
+ ### BREAKING CHANGES
10
+
11
+ - minimal supported version of `@angular` packages is `19.1.0`
12
+ - minimal supported version of `@jscrpt/common` is `7.0.0`
13
+ - minimal supported version of `@floating-ui/dom` is `1.6.13`
14
+ - minimal supported version of `date-fns` is `4.1.0`
15
+ - renamed `ClickOutsideSADirective` directive to `ClickOutsideDirective`
16
+ - renamed `PositionToSADirective` directive to `PositionToDirective`
17
+ - renamed `ConsoleSAComponent` component to `ConsoleComponent`
18
+ - renamed `FirstUppercaseSAPipe` pipe to `FirstUppercasePipe`
19
+ - renamed `FirstUppercaseLocalizeSAPipe` pipe to `FirstUppercaseLocalizePipe`
20
+ - renamed `LocalizeSAPipe` pipe to `LocalizePipe`
21
+ - renamed `MergeCssClassesSAPipe` pipe to `MergeCssClassesPipe`
22
+
23
+ ## Version 21.3.0 (2024-11-15)
24
+
25
+ ### Bug Fixes
26
+
27
+ - fixed `FirstUppercaseSAPipe` typings, result cant be `undefined` or `null` if parameter is not `undefined` or `null`
28
+ - fixed `FirstUppercaseLocalizeSAPipe` typings, result cant be `undefined` or `null`
29
+
30
+ ### Features
31
+
32
+ - new `FileComponent` component, used for obtaining file contents from disk
33
+ - standalone
34
+ - **content child**
35
+ - `FileTemplateDirective` template to be displayed as file input
36
+ - `FILE_VISUAL` instance of file visual implementation if available
37
+ - **inputs**
38
+ - `multiple` indication whether is multiple files selection enabled
39
+ - `readContent` indication whether read file content, working only when `multiple` is not set (for single file)
40
+ - `binaryContent` indication whether content of file is binary and it will be read as ArrayBuffer instead of string
41
+ - `textEncoding` text encoding of read string file content
42
+ - **outputs**
43
+ - `stringContentChange` occurs when file changes and `binaryContent` is not set and `readContent` is set
44
+ - `arrayBufferContentChange` occurs when file changes and `binaryContent` is set and `readContent` is set
45
+ - `fileChange` occurs when selected file changes, occurs only when `multiple` is not set
46
+ - `filesChange` occurs when selected files changes, occurs only when `multiple` is set
47
+ - `fileName` occurs when selected file changes, occurs only when `multiple` is not set, contains name of selected file
48
+ - `filesNames` occurs when selected files changes, occurs only when `multiple` is set, contains names of selected files
49
+ - new `FileInputComponent` component, that represents file input template
50
+ - standalone
51
+ - **provides**
52
+ - `FILE_VISUAL` as itself
53
+ - **implements**
54
+ - `FileVisual`
55
+ - **inputs**
56
+ - `buttonText` text to be displayed for file button
57
+ - `buttonClass` css classes applied to file button
58
+ - `textClass` css classes applied to file text, text displaying selected files
59
+ - `selectedText` text to be displayed as selected
60
+ - new `UploadButtonComponent` component, that represents upload button file template
61
+ - standalone
62
+ - **provides**
63
+ - `FILE_VISUAL` as itself
64
+ - **implements**
65
+ - `FileVisual`
66
+ - **inputs**
67
+ - `uploadIconClass` css classes applied tu button icon
68
+ - `uploadText` text to be displayed as button text
69
+ - `uploadTextClass` css classes for displayed text for button
70
+ - `cssClass` css class applied to button
71
+ - `progress` current progress to be displayed
72
+ - new `FileInputDirective` directive, that allows better communication with input file
73
+ - standalone
74
+ - **export as** `file`
75
+ - **implements**
76
+ - `OnDestroy`
77
+ - **inputs**
78
+ - `multiple` indication whether is multiple files selection enabled
79
+ - `readContent` indication whether read file content, working only when `multiple` is not set (for single file)
80
+ - `binaryContent` indication whether content of file is binary and it will be read as ArrayBuffer instead of string
81
+ - `textEncoding` text encoding of read string file content
82
+ - **outputs**
83
+ - `stringContentChange` occurs when file changes and `binaryContent` is not set and `readContent` is set
84
+ - `arrayBufferContentChange` occurs when file changes and `binaryContent` is set and `readContent` is set
85
+ - `fileChange` occurs when selected file changes, occurs only when `multiple` is not set
86
+ - `filesChange` occurs when selected files changes, occurs only when `multiple` is set
87
+ - `fileName` occurs when selected file changes, occurs only when `multiple` is not set, contains name of selected file
88
+ - `filesNames` occurs when selected files changes, occurs only when `multiple` is set, contains names of selected files
89
+ - **methods**
90
+ - `clearFile` clears selection of file/files
91
+ - new `FileTemplateDirective` directive, that is used for obtaining file component visual template
92
+ - standalone
93
+ - new `FileTemplateContext` interface
94
+ - **properties**
95
+ - `file` instance of selected file or null if none is selected
96
+ - `fileName` name of selected file
97
+ - `files` instance of selected array of files or null if none is selected
98
+ - `filesNames` array of names of selected files
99
+ - `multiple` indication whether multiple files selection is enabled
100
+ - **methods**
101
+ - `clearFile` clears selected file
102
+ - new `FileVisual` interface
103
+ - **properties**
104
+ - `fileTemplateContext` instance of file template context passed to file visual to display info about selected files
105
+ - new `FILE_VISUAL` injection token, used for obtaining implementation of file visual component
106
+ - new `FileModule` module, used for grouping File components and directives
107
+
3
108
  ## Version 21.2.1 (2024-10-08)
4
109
 
5
110
  ### Bug Fixes
@@ -51,7 +156,7 @@
51
156
  - updated `RequiredClassDirective` directive
52
157
  - is now `standalone`
53
158
  - all `private`s are now `protected`
54
- - new **inputs**
159
+ - new **inputs**
55
160
  - `requiredClass` name of required css class that should be applied
56
161
  - updated `HasErrorDirective` directive
57
162
  - is now `standalone`
@@ -1,7 +1,8 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { Injectable, forwardRef } from '@angular/core';
3
3
  import { PositionOffset, PositionPlacement, POSITION, TypeProvider } from '@anglr/common';
4
- import { extend, isEmptyObject, isFunction, isJsObject, isNumber, nameof } from '@jscrpt/common';
4
+ import { extend } from '@jscrpt/common/extend';
5
+ import { isEmptyObject, isFunction, isJsObject, isNumber, nameof } from '@jscrpt/common';
5
6
  import { computePosition, autoUpdate, offset, flip, shift } from '@floating-ui/dom';
6
7
  import { Observable } from 'rxjs';
7
8
  import * as i0 from "@angular/core";
@@ -232,14 +233,14 @@ let FloatingUiDomPosition = class FloatingUiDomPosition {
232
233
  }
233
234
  }
234
235
  }
235
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FloatingUiDomPosition, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
236
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FloatingUiDomPosition }); }
236
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: FloatingUiDomPosition, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
237
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: FloatingUiDomPosition }); }
237
238
  };
238
239
  FloatingUiDomPosition = __decorate([
239
240
  TypeProvider({ provide: POSITION, useClass: forwardRef(() => FloatingUiDomPosition) })
240
241
  ], FloatingUiDomPosition);
241
242
  export { FloatingUiDomPosition };
242
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FloatingUiDomPosition, decorators: [{
243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: FloatingUiDomPosition, decorators: [{
243
244
  type: Injectable
244
245
  }] });
245
246
  //# sourceMappingURL=floatingUiDomPosition.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"floatingUiDomPosition.service.js","sourceRoot":"","sources":["../../../../floating-ui/src/services/floatingUiDomPosition.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAA4C,cAAc,EAAE,iBAAiB,EAAqB,QAAQ,EAAyC,YAAY,EAAC,MAAM,eAAe,CAAC;AAC7L,OAAO,EAAC,MAAM,EAAE,aA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G,OAAO,MAAM,CAAC;gBAClB,CAAC;YACD,KAAK,iBAAiB,CAAC,SAAS;gBAChC,CAAC;oBACG,OAAO,YAAY,CAAC;gBACxB,CAAC;YACD,KAAK,iBAAiB,CAAC,OAAO;gBAC9B,CAAC;oBACG,OAAO,UAAU,CAAC;gBACtB,CAAC;YACD,KAAK,iBAAiB,CAAC,KAAK;gBAC5B,CAAC;oBACG,OAAO,OAAO,CAAC;gBACnB,CAAC;YACD,KAAK,iBAAiB,CAAC,UAAU;gBACjC,CAAC;oBACG,OAAO,aAAa,CAAC;gBACzB,CAAC;YACD,KAAK,iBAAiB,CAAC,QAAQ;gBAC/B,CAAC;oBACG,OAAO,WAAW,CAAC;gBACvB,CAAC;QACL,CAAC;IACL,CAAC;8GAvRQ,qBAAqB;kHAArB,qBAAqB;;AAArB,qBAAqB;IADjC,YAAY,CAAC,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,EAAC,CAAC;GACxE,qBAAqB,CAwRjC;;2FAxRY,qBAAqB;kBAFjC,UAAU","sourcesContent":["import {Injectable, forwardRef} from '@angular/core';\nimport {Position, PositionResult, PositionOptions, PositionOffset, PositionPlacement, AutoUpdateOptions, POSITION, PositionOffsetString, PositionOffsets, TypeProvider} from '@anglr/common';\nimport {extend, isEmptyObject, isFunction, isJsObject, isNumber, nameof} from '@jscrpt/common';\nimport {computePosition, Placement, autoUpdate, Middleware, offset, flip, shift, VirtualElement} from '@floating-ui/dom';\nimport {Observable} from 'rxjs';\n\n/**\n * Default options for `FloatingUiDomPosition` implementation\n */\nconst defaultOptions: PositionOptions<VirtualElement> =\n{\n autoUpdate: false,\n flip: false,\n offset: nameof<typeof PositionOffset>('None') as PositionOffsetString,\n placement: PositionPlacement.TopStart,\n};\n\n/**\n * Service that is used for positioning two elements against each other, using floating-ui dom implementation\n */\n@Injectable()\n@TypeProvider({provide: POSITION, useClass: forwardRef(() => FloatingUiDomPosition)})\nexport class FloatingUiDomPosition implements Position\n{\n //######################### public methods - implementation of Position #########################\n\n /**\n * @inheritdoc\n */\n public placeElement(target: Element, source: Element, options?: Partial<PositionOptions<VirtualElement>>): Observable<PositionResult>\n {\n return new Observable(subscriber =>\n {\n (async () =>\n {\n const computedOptions = extend({}, defaultOptions, options);\n const middlewares: Middleware[] = [];\n\n this._setOffset(middlewares, computedOptions);\n this._setFlip(middlewares, computedOptions);\n middlewares.push(shift());\n\n const runComputation = async () =>\n {\n const result = await computePosition(source,\n target as HTMLElement,\n {\n placement: this._getPlacement(computedOptions),\n middleware: middlewares,\n });\n\n if(computedOptions.autoUpdate)\n {\n subscriber.next(\n {\n target,\n dispose,\n flip: !!result.middlewareData.flip && !isEmptyObject(result.middlewareData.flip),\n x: result.x,\n y: result.y\n });\n }\n\n return result;\n };\n\n let dispose = () => {};\n\n if(computedOptions.autoUpdate)\n {\n let options: AutoUpdateOptions;\n\n if(computedOptions.autoUpdate === true)\n {\n options =\n {\n ancestorResize: true,\n ancestorScroll: true,\n elementResize: true\n };\n }\n else\n {\n options = computedOptions.autoUpdate;\n }\n\n dispose = autoUpdate(source,\n target as HTMLElement,\n runComputation,\n options);\n }\n\n const result = await runComputation();\n\n subscriber.next(\n {\n target,\n dispose,\n flip: !!result.middlewareData.flip && !isEmptyObject(result.middlewareData.flip),\n x: result.x,\n y: result.y\n });\n\n if(!computedOptions.autoUpdate)\n {\n subscriber.complete();\n }\n })();\n });\n }\n\n //######################### protected methods #########################\n\n /**\n * Sets flip middleware\n * @param middlewares - Array of middlewares that will set\n * @param options - Options that contains definition of flip\n */\n protected _setFlip(middlewares: Middleware[], options: PositionOptions<VirtualElement>): void\n {\n if(options.flip)\n {\n middlewares.push(flip());\n }\n }\n\n /**\n * Sets offset middleware\n * @param middlewares - Array of middlewares that will set\n * @param options - Options that contains definition of offset\n */\n protected _setOffset(middlewares: Middleware[], options: PositionOptions<VirtualElement>): void\n {\n //no offset\n if(options.offset === PositionOffset[PositionOffset.None])\n {\n return;\n }\n\n if(options.offset === PositionOffset[PositionOffset.MouseEnter])\n {\n //fallback if not supported placement used\n if(options.placement == PositionPlacement.Left ||\n options.placement == PositionPlacement.LeftStart ||\n options.placement == PositionPlacement.LeftEnd ||\n options.placement == PositionPlacement.Right ||\n options.placement == PositionPlacement.RightStart ||\n options.placement == PositionPlacement.RightEnd ||\n options.placement == PositionPlacement.Bottom ||\n options.placement == PositionPlacement.BottomEnd ||\n options.placement == PositionPlacement.Top ||\n options.placement == PositionPlacement.TopEnd)\n {\n options.placement = PositionPlacement.TopEnd;\n }\n }\n\n middlewares.push(offset(({elements, placement, x, y}) =>\n {\n //offset is function\n if(isFunction(options.offset))\n {\n return options.offset({elements, x, y});\n }\n\n const floating = elements.floating as Element;\n\n if(options.offset === PositionOffset[PositionOffset.MouseEnter] && options.mouseEvent)\n {\n const targetBoundingRect = (options.mouseEvent.target as HTMLElement).getBoundingClientRect();\n const floatingBoundingRect = (elements.floating as HTMLElement).getBoundingClientRect();\n\n return {\n crossAxis: options.mouseEvent.x - targetBoundingRect.right + floatingBoundingRect.width\n };\n }\n\n const stringOffset = options.offset as PositionOffsetString|number;\n\n //offset is object\n if(isJsObject(options.offset))\n {\n return options.offset as PositionOffsets;\n }\n\n //offset is skidding number\n if(isNumber(stringOffset))\n {\n return {\n crossAxis: stringOffset,\n };\n }\n\n let dimension: number;\n\n if(placement == 'bottom' || placement == 'bottom-start' || placement == 'bottom-end' ||\n placement == 'top' || placement == 'top-start' || placement == 'top-end')\n {\n dimension = floating.clientWidth;\n }\n else\n {\n dimension = floating.clientHeight;\n }\n\n switch(stringOffset)\n {\n default:\n {\n dimension = 0;\n\n break;\n }\n case PositionOffset[PositionOffset.Full]:\n {\n break;\n }\n case PositionOffset[PositionOffset.Half]:\n {\n dimension /= 2;\n\n break;\n }\n case PositionOffset[PositionOffset.NegativeFull]:\n {\n dimension *= -1;\n\n break;\n }\n case PositionOffset[PositionOffset.NegativeHalf]:\n {\n dimension *= -.5;\n\n break;\n }\n }\n\n return {\n crossAxis: dimension\n };\n }));\n }\n\n /**\n * Gets floating ui placement from position placement\n * @param options - Options containing position placement\n */\n protected _getPlacement(options: PositionOptions<VirtualElement>): Placement\n {\n switch(options.placement)\n {\n default:\n // case PositionPlacement.Top:\n {\n return 'top';\n }\n case PositionPlacement.TopStart:\n {\n return 'top-start';\n }\n case PositionPlacement.TopEnd:\n {\n return 'top-end';\n }\n case PositionPlacement.Bottom:\n {\n return 'bottom';\n }\n case PositionPlacement.BottomStart:\n {\n return 'bottom-start';\n }\n case PositionPlacement.BottomEnd:\n {\n return 'bottom-end';\n }\n case PositionPlacement.Left:\n {\n return 'left';\n }\n case PositionPlacement.LeftStart:\n {\n return 'left-start';\n }\n case PositionPlacement.LeftEnd:\n {\n return 'left-end';\n }\n case PositionPlacement.Right:\n {\n return 'right';\n }\n case PositionPlacement.RightStart:\n {\n return 'right-start';\n }\n case PositionPlacement.RightEnd:\n {\n return 'right-end';\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"floatingUiDomPosition.service.js","sourceRoot":"","sources":["../../../../floating-ui/src/services/floatingUiDomPosition.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAA4C,cAAc,EAAE,iBAAiB,EAAqB,QAAQ,EAAyC,YAAY,EAAC,MAAM,eAAe,CAAC;AAC7L,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAC,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACvF,OAAO,EAAC,eAAe,EAAa,UAAU,EAAc,MAAM,EAAE,IAAI,EAAE,KAAK,EAAiB,MAAM,kBAAkB,CAAC;AACzH,OAAO,EAAC,UAAU,EAAC,MAAM,MAAM,CAAC;;AAEhC;;GAEG;AACH,MAAM,cAAc,GACpB;IACI,UAAU,E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C;YACD,KAAK,iBAAiB,CAAC,UAAU;gBACjC,CAAC;oBACG,OAAO,aAAa,CAAC;gBACzB,CAAC;YACD,KAAK,iBAAiB,CAAC,QAAQ;gBAC/B,CAAC;oBACG,OAAO,WAAW,CAAC;gBACvB,CAAC;QACL,CAAC;IACL,CAAC;8GAvRQ,qBAAqB;kHAArB,qBAAqB;;AAArB,qBAAqB;IADjC,YAAY,CAAC,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,EAAC,CAAC;GACxE,qBAAqB,CAwRjC;;2FAxRY,qBAAqB;kBAFjC,UAAU","sourcesContent":["import {Injectable, forwardRef} from '@angular/core';\nimport {Position, PositionResult, PositionOptions, PositionOffset, PositionPlacement, AutoUpdateOptions, POSITION, PositionOffsetString, PositionOffsets, TypeProvider} from '@anglr/common';\nimport {extend} from '@jscrpt/common/extend';\nimport {isEmptyObject, isFunction, isJsObject, isNumber, nameof} from '@jscrpt/common';\nimport {computePosition, Placement, autoUpdate, Middleware, offset, flip, shift, VirtualElement} from '@floating-ui/dom';\nimport {Observable} from 'rxjs';\n\n/**\n * Default options for `FloatingUiDomPosition` implementation\n */\nconst defaultOptions: PositionOptions<VirtualElement> =\n{\n autoUpdate: false,\n flip: false,\n offset: nameof<typeof PositionOffset>('None') as PositionOffsetString,\n placement: PositionPlacement.TopStart,\n};\n\n/**\n * Service that is used for positioning two elements against each other, using floating-ui dom implementation\n */\n@Injectable()\n@TypeProvider({provide: POSITION, useClass: forwardRef(() => FloatingUiDomPosition)})\nexport class FloatingUiDomPosition implements Position\n{\n //######################### public methods - implementation of Position #########################\n\n /**\n * @inheritdoc\n */\n public placeElement(target: Element, source: Element, options?: Partial<PositionOptions<VirtualElement>>): Observable<PositionResult>\n {\n return new Observable(subscriber =>\n {\n (async () =>\n {\n const computedOptions = extend({}, defaultOptions, options);\n const middlewares: Middleware[] = [];\n\n this._setOffset(middlewares, computedOptions);\n this._setFlip(middlewares, computedOptions);\n middlewares.push(shift());\n\n const runComputation = async () =>\n {\n const result = await computePosition(source,\n target as HTMLElement,\n {\n placement: this._getPlacement(computedOptions),\n middleware: middlewares,\n });\n\n if(computedOptions.autoUpdate)\n {\n subscriber.next(\n {\n target,\n dispose,\n flip: !!result.middlewareData.flip && !isEmptyObject(result.middlewareData.flip),\n x: result.x,\n y: result.y\n });\n }\n\n return result;\n };\n\n let dispose = () => {};\n\n if(computedOptions.autoUpdate)\n {\n let options: AutoUpdateOptions;\n\n if(computedOptions.autoUpdate === true)\n {\n options =\n {\n ancestorResize: true,\n ancestorScroll: true,\n elementResize: true\n };\n }\n else\n {\n options = computedOptions.autoUpdate;\n }\n\n dispose = autoUpdate(source,\n target as HTMLElement,\n runComputation,\n options);\n }\n\n const result = await runComputation();\n\n subscriber.next(\n {\n target,\n dispose,\n flip: !!result.middlewareData.flip && !isEmptyObject(result.middlewareData.flip),\n x: result.x,\n y: result.y\n });\n\n if(!computedOptions.autoUpdate)\n {\n subscriber.complete();\n }\n })();\n });\n }\n\n //######################### protected methods #########################\n\n /**\n * Sets flip middleware\n * @param middlewares - Array of middlewares that will set\n * @param options - Options that contains definition of flip\n */\n protected _setFlip(middlewares: Middleware[], options: PositionOptions<VirtualElement>): void\n {\n if(options.flip)\n {\n middlewares.push(flip());\n }\n }\n\n /**\n * Sets offset middleware\n * @param middlewares - Array of middlewares that will set\n * @param options - Options that contains definition of offset\n */\n protected _setOffset(middlewares: Middleware[], options: PositionOptions<VirtualElement>): void\n {\n //no offset\n if(options.offset === PositionOffset[PositionOffset.None])\n {\n return;\n }\n\n if(options.offset === PositionOffset[PositionOffset.MouseEnter])\n {\n //fallback if not supported placement used\n if(options.placement == PositionPlacement.Left ||\n options.placement == PositionPlacement.LeftStart ||\n options.placement == PositionPlacement.LeftEnd ||\n options.placement == PositionPlacement.Right ||\n options.placement == PositionPlacement.RightStart ||\n options.placement == PositionPlacement.RightEnd ||\n options.placement == PositionPlacement.Bottom ||\n options.placement == PositionPlacement.BottomEnd ||\n options.placement == PositionPlacement.Top ||\n options.placement == PositionPlacement.TopEnd)\n {\n options.placement = PositionPlacement.TopEnd;\n }\n }\n\n middlewares.push(offset(({elements, placement, x, y}) =>\n {\n //offset is function\n if(isFunction(options.offset))\n {\n return options.offset({elements, x, y});\n }\n\n const floating = elements.floating as Element;\n\n if(options.offset === PositionOffset[PositionOffset.MouseEnter] && options.mouseEvent)\n {\n const targetBoundingRect = (options.mouseEvent.target as HTMLElement).getBoundingClientRect();\n const floatingBoundingRect = (elements.floating as HTMLElement).getBoundingClientRect();\n\n return {\n crossAxis: options.mouseEvent.x - targetBoundingRect.right + floatingBoundingRect.width\n };\n }\n\n const stringOffset = options.offset as PositionOffsetString|number;\n\n //offset is object\n if(isJsObject(options.offset))\n {\n return options.offset as PositionOffsets;\n }\n\n //offset is skidding number\n if(isNumber(stringOffset))\n {\n return {\n crossAxis: stringOffset,\n };\n }\n\n let dimension: number;\n\n if(placement == 'bottom' || placement == 'bottom-start' || placement == 'bottom-end' ||\n placement == 'top' || placement == 'top-start' || placement == 'top-end')\n {\n dimension = floating.clientWidth;\n }\n else\n {\n dimension = floating.clientHeight;\n }\n\n switch(stringOffset)\n {\n default:\n {\n dimension = 0;\n\n break;\n }\n case PositionOffset[PositionOffset.Full]:\n {\n break;\n }\n case PositionOffset[PositionOffset.Half]:\n {\n dimension /= 2;\n\n break;\n }\n case PositionOffset[PositionOffset.NegativeFull]:\n {\n dimension *= -1;\n\n break;\n }\n case PositionOffset[PositionOffset.NegativeHalf]:\n {\n dimension *= -.5;\n\n break;\n }\n }\n\n return {\n crossAxis: dimension\n };\n }));\n }\n\n /**\n * Gets floating ui placement from position placement\n * @param options - Options containing position placement\n */\n protected _getPlacement(options: PositionOptions<VirtualElement>): Placement\n {\n switch(options.placement)\n {\n default:\n // case PositionPlacement.Top:\n {\n return 'top';\n }\n case PositionPlacement.TopStart:\n {\n return 'top-start';\n }\n case PositionPlacement.TopEnd:\n {\n return 'top-end';\n }\n case PositionPlacement.Bottom:\n {\n return 'bottom';\n }\n case PositionPlacement.BottomStart:\n {\n return 'bottom-start';\n }\n case PositionPlacement.BottomEnd:\n {\n return 'bottom-end';\n }\n case PositionPlacement.Left:\n {\n return 'left';\n }\n case PositionPlacement.LeftStart:\n {\n return 'left-start';\n }\n case PositionPlacement.LeftEnd:\n {\n return 'left-end';\n }\n case PositionPlacement.Right:\n {\n return 'right';\n }\n case PositionPlacement.RightStart:\n {\n return 'right-start';\n }\n case PositionPlacement.RightEnd:\n {\n return 'right-end';\n }\n }\n }\n}\n"]}
@@ -24,15 +24,15 @@ export class DefaultValidationErrorsComponent {
24
24
  this.options = options;
25
25
  this._changeDetector.detectChanges();
26
26
  }
27
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DefaultValidationErrorsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
28
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.1", type: DefaultValidationErrorsComponent, isStandalone: true, selector: "default-validation-errors", host: { properties: { "@animateChildren": "this.animate" } }, ngImport: i0, template: "@if(errors?.errorMessages?.length)\n{\n <div [ngClass]=\"options?.wrapperDivClass\" @slideInOut>\n @for(error of errors?.errorMessages; track error)\n {\n <div>{{error}}</div>\n }\n </div>\n}", styles: [":host\n{\n display: contents;\n}"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [
27
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DefaultValidationErrorsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
28
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.0", type: DefaultValidationErrorsComponent, isStandalone: true, selector: "default-validation-errors", host: { properties: { "@animateChildren": "this.animate" } }, ngImport: i0, template: "@if(errors?.errorMessages?.length)\n{\n <div [ngClass]=\"options?.wrapperDivClass\" @slideInOut>\n @for(error of errors?.errorMessages; track error)\n {\n <div>{{error}}</div>\n }\n </div>\n}", styles: [":host\n{\n display: contents;\n}"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [
29
29
  slideInOutTrigger,
30
30
  animateChildrenTrigger
31
31
  ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
32
32
  }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DefaultValidationErrorsComponent, decorators: [{
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DefaultValidationErrorsComponent, decorators: [{
34
34
  type: Component,
35
- args: [{ selector: 'default-validation-errors', standalone: true, imports: [
35
+ args: [{ selector: 'default-validation-errors', imports: [
36
36
  NgClass,
37
37
  ], animations: [
38
38
  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,OAAO,EAAC,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,mBAAmB,CAAC;;AAK5E;;GAEG;AAkBH,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;8GAxCQ,gCAAgC;kGAAhC,gCAAgC,mJC3B7C,uOAQC,6FDUO,OAAO,sEAGX;YACI,iBAAiB;YACjB,sBAAsB;SACzB;;2FAGQ,gCAAgC;kBAjB5C,SAAS;+BAEI,2BAA2B,cAGzB,IAAI,WAEhB;wBACI,OAAO;qBACV,cAED;wBACI,iBAAiB;wBACjB,sBAAsB;qBACzB,mBACgB,uBAAuB,CAAC,MAAM;sFAwBxC,OAAO;sBADb,WAAW;uBAAC,kBAAkB","sourcesContent":["import {Component, ChangeDetectionStrategy, ChangeDetectorRef, HostBinding} from '@angular/core';\nimport {NgClass} from '@angular/common';\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 styleUrl: 'defaultValidationErrors.component.css',\n standalone: true,\n imports:\n [\n NgClass,\n ],\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}","@if(errors?.errorMessages?.length)\n{\n <div [ngClass]=\"options?.wrapperDivClass\" @slideInOut>\n @for(error of errors?.errorMessages; track error)\n {\n <div>{{error}}</div>\n }\n </div>\n}"]}
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,OAAO,EAAC,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,mBAAmB,CAAC;;AAK5E;;GAEG;AAiBH,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;8GAxCQ,gCAAgC;kGAAhC,gCAAgC,mJC1B7C,uOAQC,6FDSO,OAAO,sEAGX;YACI,iBAAiB;YACjB,sBAAsB;SACzB;;2FAGQ,gCAAgC;kBAhB5C,SAAS;+BAEI,2BAA2B,WAIrC;wBACI,OAAO;qBACV,cAED;wBACI,iBAAiB;wBACjB,sBAAsB;qBACzB,mBACgB,uBAAuB,CAAC,MAAM;sFAwBxC,OAAO;sBADb,WAAW;uBAAC,kBAAkB","sourcesContent":["import {Component, ChangeDetectionStrategy, ChangeDetectorRef, HostBinding} from '@angular/core';\nimport {NgClass} from '@angular/common';\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 styleUrl: 'defaultValidationErrors.component.css',\n imports:\n [\n NgClass,\n ],\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}","@if(errors?.errorMessages?.length)\n{\n <div [ngClass]=\"options?.wrapperDivClass\" @slideInOut>\n @for(error of errors?.errorMessages; track error)\n {\n <div>{{error}}</div>\n }\n </div>\n}"]}
@@ -65,11 +65,11 @@ export class DefaultValidationErrorsContainerComponent {
65
65
  this._template.detectChanges();
66
66
  }
67
67
  }
68
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DefaultValidationErrorsContainerComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
69
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: DefaultValidationErrorsContainerComponent, isStandalone: true, selector: "default-validation-errors-container", ngImport: i0, template: '', isInline: true, styles: [":host\n{\n display: contents;\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
68
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DefaultValidationErrorsContainerComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
69
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.0", type: DefaultValidationErrorsContainerComponent, isStandalone: true, selector: "default-validation-errors-container", ngImport: i0, template: '', isInline: true, styles: [":host\n{\n display: contents;\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
70
70
  }
71
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DefaultValidationErrorsContainerComponent, decorators: [{
71
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DefaultValidationErrorsContainerComponent, decorators: [{
72
72
  type: Component,
73
- args: [{ selector: 'default-validation-errors-container', template: '', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host\n{\n display: contents;\n}"] }]
73
+ args: [{ selector: 'default-validation-errors-container', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host\n{\n display: contents;\n}"] }]
74
74
  }], ctorParameters: () => [{ type: i0.ViewContainerRef }] });
75
75
  //# sourceMappingURL=defaultValidationErrorsContainer.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaultValidationErrorsContainer.component.js","sourceRoot":"","sources":["../../../../../forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,gBAAgB,EAAgC,MAAM,eAAe,CAAC;;AAKlH;;GAEG;AASH,MAAM,OAAO,yCAAyC;IA0BlD,iEAAiE;IACjE,YAAsB,cAAgC;QAAhC,mBAAc,GAAd,cAAc,CAAkB;IAEtD,CAAC;IAED,yFAAyF;IAEzF;;;;;OAKG;IACI,IAAI,CAAC,MAA8B,EAAE,OAAyC;QAEjF,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QAExB,IAAG,OAAO,CAAC,QAAQ,EACnB,CAAC;YACG,IAAI,CAAC,eAAe,EAAE,CAAC;QAC3B,CAAC;aACI,IAAG,OAAO,CAAC,SAAS,EACzB,CAAC;YACG,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC5B,CAAC;aAED,CAAC;YACG,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;QACtF,CAAC;IACL,CAAC;IAED;;OAEG;IACI,IAAI;QAEP,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED,uEAAuE;IAEvE;;OAEG;IACO,gBAAgB;QAEtB,IAAG,CAAC,IAAI,CAAC,UAAU,EACnB,CAAC;YACG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACnF,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACO,eAAe;QAErB,IAAG,CAAC,IAAI,CAAC,SAAS,EAClB,CAAC;YACG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAC9E;gBACI,SAAS,EAAE,IAAI,CAAC,OAAO;gBACvB,OAAO,EAAE,IAAI,CAAC,QAAQ;aACzB,CAAC,CAAC;QACP,CAAC;aAED,CAAC;YACG,IAAI,CAAC,SAAS,CAAC,OAAO;gBACtB;oBACI,SAAS,EAAE,IAAI,CAAC,OAAO;oBACvB,OAAO,EAAE,IAAI,CAAC,QAAQ;iBACzB,CAAC;YAEF,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;QACnC,CAAC;IACL,CAAC;8GA1GQ,yCAAyC;kGAAzC,yCAAyC,+FALxC,EAAE;;2FAKH,yCAAyC;kBARrD,SAAS;+BAEI,qCAAqC,YACrC,EAAE,cAEA,IAAI,mBACC,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy, ViewContainerRef, ComponentRef, EmbeddedViewRef} from '@angular/core';\n\nimport {ValidationErrorsResult} from '../../services/errorMessagesExtractor/errorMessagesExtractor.interface';\nimport {ValidationErrorsComponent, ValidationErrorsContainerComponent, ValidationErrorsContainerOptions, ValidationErrorsTemplateContext} from '../../services/validationErrorRenderer/validationErrorRenderer.interface';\n\n/**\n * Component that serves as container for validation errors, either component or templates\n */\n@Component(\n{\n selector: 'default-validation-errors-container',\n template: '',\n styleUrl: 'defaultValidationErrorsContainer.component.css',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DefaultValidationErrorsContainerComponent implements ValidationErrorsContainerComponent\n{\n //######################### protected fields #########################\n\n /**\n * Errors to be shown\n * @internal\n */\n protected _errors: ValidationErrorsResult;\n \n /**\n * Options used for displaying validation errors\n * @internal\n */\n protected _options: ValidationErrorsContainerOptions;\n\n /**\n * Instance of component reference for rendered errors\n */\n protected _component: ComponentRef<ValidationErrorsComponent>;\n\n /**\n * Instance of template reference for rendered errors\n */\n protected _template: EmbeddedViewRef<ValidationErrorsTemplateContext>;\n\n //######################### constructor #########################\n constructor(protected _viewContainer: ViewContainerRef)\n {\n }\n\n //######################### public methods - implementation of #########################\n\n /**\n * Shows validation errors\n * @param errors - Errors to be shown\n * @param options - Options used for displaying validation errors\n * @param errorClasses - Array of css error classes\n */\n public show(errors: ValidationErrorsResult, options: ValidationErrorsContainerOptions): void\n {\n this._errors = errors;\n this._options = options;\n\n if(options.template)\n {\n this._renderTemplate();\n }\n else if(options.component)\n {\n this._renderComponent();\n }\n else\n {\n throw new Error('Missing template or component for rendering validation errors!');\n }\n }\n\n /**\n * Hides validation errors\n */\n public hide(): void\n {\n this._viewContainer.clear();\n this._component = null;\n this._template = null;\n }\n\n //######################### protected methods #########################\n\n /**\n * Renders validation errors component\n */\n protected _renderComponent(): void\n {\n if(!this._component)\n {\n this._component = this._viewContainer.createComponent(this._options.component);\n }\n\n this._component.instance.show(this._errors, this._options);\n }\n\n /**\n * Renders validation errors template\n */\n protected _renderTemplate(): void\n {\n if(!this._template)\n {\n this._template = this._viewContainer.createEmbeddedView(this._options.template,\n {\n $implicit: this._errors,\n options: this._options\n });\n }\n else\n {\n this._template.context =\n {\n $implicit: this._errors,\n options: this._options\n };\n\n this._template.detectChanges();\n }\n }\n}"]}
1
+ {"version":3,"file":"defaultValidationErrorsContainer.component.js","sourceRoot":"","sources":["../../../../../forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,gBAAgB,EAAgC,MAAM,eAAe,CAAC;;AAKlH;;GAEG;AAQH,MAAM,OAAO,yCAAyC;IA0BlD,iEAAiE;IACjE,YAAsB,cAAgC;QAAhC,mBAAc,GAAd,cAAc,CA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C;YACG,IAAI,CAAC,SAAS,CAAC,OAAO;gBACtB;oBACI,SAAS,EAAE,IAAI,CAAC,OAAO;oBACvB,OAAO,EAAE,IAAI,CAAC,QAAQ;iBACzB,CAAC;YAEF,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;QACnC,CAAC;IACL,CAAC;8GA1GQ,yCAAyC;kGAAzC,yCAAyC,+FAJxC,EAAE;;2FAIH,yCAAyC;kBAPrD,SAAS;+BAEI,qCAAqC,YACrC,EAAE,mBAEK,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy, ViewContainerRef, ComponentRef, EmbeddedViewRef} from '@angular/core';\n\nimport {ValidationErrorsResult} from '../../services/errorMessagesExtractor/errorMessagesExtractor.interface';\nimport {ValidationErrorsComponent, ValidationErrorsContainerComponent, ValidationErrorsContainerOptions, ValidationErrorsTemplateContext} from '../../services/validationErrorRenderer/validationErrorRenderer.interface';\n\n/**\n * Component that serves as container for validation errors, either component or templates\n */\n@Component(\n{\n selector: 'default-validation-errors-container',\n template: '',\n styleUrl: 'defaultValidationErrorsContainer.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DefaultValidationErrorsContainerComponent implements ValidationErrorsContainerComponent\n{\n //######################### protected fields #########################\n\n /**\n * Errors to be shown\n * @internal\n */\n protected _errors: ValidationErrorsResult;\n \n /**\n * Options used for displaying validation errors\n * @internal\n */\n protected _options: ValidationErrorsContainerOptions;\n\n /**\n * Instance of component reference for rendered errors\n */\n protected _component: ComponentRef<ValidationErrorsComponent>;\n\n /**\n * Instance of template reference for rendered errors\n */\n protected _template: EmbeddedViewRef<ValidationErrorsTemplateContext>;\n\n //######################### constructor #########################\n constructor(protected _viewContainer: ViewContainerRef)\n {\n }\n\n //######################### public methods - implementation of #########################\n\n /**\n * Shows validation errors\n * @param errors - Errors to be shown\n * @param options - Options used for displaying validation errors\n * @param errorClasses - Array of css error classes\n */\n public show(errors: ValidationErrorsResult, options: ValidationErrorsContainerOptions): void\n {\n this._errors = errors;\n this._options = options;\n\n if(options.template)\n {\n this._renderTemplate();\n }\n else if(options.component)\n {\n this._renderComponent();\n }\n else\n {\n throw new Error('Missing template or component for rendering validation errors!');\n }\n }\n\n /**\n * Hides validation errors\n */\n public hide(): void\n {\n this._viewContainer.clear();\n this._component = null;\n this._template = null;\n }\n\n //######################### protected methods #########################\n\n /**\n * Renders validation errors component\n */\n protected _renderComponent(): void\n {\n if(!this._component)\n {\n this._component = this._viewContainer.createComponent(this._options.component);\n }\n\n this._component.instance.show(this._errors, this._options);\n }\n\n /**\n * Renders validation errors template\n */\n protected _renderTemplate(): void\n {\n if(!this._template)\n {\n this._template = this._viewContainer.createEmbeddedView(this._options.template,\n {\n $implicit: this._errors,\n options: this._options\n });\n }\n else\n {\n this._template.context =\n {\n $implicit: this._errors,\n options: this._options\n };\n\n this._template.detectChanges();\n }\n }\n}"]}
@@ -62,12 +62,12 @@ export class ReservedSpaceValidationErrorsContainerComponent {
62
62
  this._template.detectChanges();
63
63
  }
64
64
  }
65
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ReservedSpaceValidationErrorsContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
66
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: ReservedSpaceValidationErrorsContainerComponent, isStandalone: true, 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 }); }
65
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ReservedSpaceValidationErrorsContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
66
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.0", type: ReservedSpaceValidationErrorsContainerComponent, isStandalone: true, 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/>\n</div>", styles: [":host\n{\n display: contents;\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
67
67
  }
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ReservedSpaceValidationErrorsContainerComponent, decorators: [{
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ReservedSpaceValidationErrorsContainerComponent, decorators: [{
69
69
  type: Component,
70
- args: [{ selector: 'reserved-space-validation-errors-container', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>\n <ng-container #container></ng-container>\n</div>", styles: [":host\n{\n display: contents;\n}"] }]
70
+ args: [{ selector: 'reserved-space-validation-errors-container', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>\n <ng-container #container/>\n</div>", styles: [":host\n{\n display: contents;\n}"] }]
71
71
  }], propDecorators: { viewContainer: [{
72
72
  type: ViewChild,
73
73
  args: ['container', { static: true, read: ViewContainerRef }]
@@ -1 +1 @@
1
- {"version":3,"file":"reservedSpaceValidationErrorsContainer.component.js","sourceRoot":"","sources":["../../../../../forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.ts","../../../../../forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,gBAAgB,EAAiC,SAAS,EAAC,MAAM,eAAe,CAAC;;AAK7H,8BAA8B;AAE9B;;GAEG;AASH,MAAM,OAAO,+CAA+C;IAkCxD,yFAAyF;IAEzF;;;;;OAKG;IACI,IAAI,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E,IAAI,CAAC,OAAO;oBACvB,OAAO,EAAE,IAAI,CAAC,QAAQ;iBACzB,CAAC;YAEF,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;QACnC,CAAC;IACL,CAAC;8GA7GQ,+CAA+C;kGAA/C,+CAA+C,6LA+BX,gBAAgB,2CCjDjE,6DAEM;;2FDgBO,+CAA+C;kBAR3D,SAAS;+BAEI,4CAA4C,cAG1C,IAAI,mBACC,uBAAuB,CAAC,MAAM;8BAkCxC,aAAa;sBADnB,SAAS;uBAAC,WAAW,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAC","sourcesContent":["import {Component, ChangeDetectionStrategy, ViewContainerRef, ComponentRef, EmbeddedViewRef, ViewChild} from '@angular/core';\n\nimport {ValidationErrorsResult} from '../../services/errorMessagesExtractor/errorMessagesExtractor.interface';\nimport {ValidationErrorsComponent, ValidationErrorsContainerComponent, ValidationErrorsContainerOptions, ValidationErrorsTemplateContext} from '../../services/validationErrorRenderer/validationErrorRenderer.interface';\n\n//TODO: optimize duplicit code\n\n/**\n * Component that serves as container for validation errors, either component or templates with reserved space for errors\n */\n@Component(\n{\n selector: 'reserved-space-validation-errors-container',\n templateUrl: 'reservedSpaceValidationErrorsContainer.component.html',\n styleUrl: 'reservedSpaceValidationErrorsContainer.component.css',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ReservedSpaceValidationErrorsContainerComponent implements ValidationErrorsContainerComponent\n{\n //######################### protected fields #########################\n\n /**\n * Errors to be shown\n * @internal\n */\n protected _errors: ValidationErrorsResult;\n \n /**\n * Options used for displaying validation errors\n * @internal\n */\n protected _options: ValidationErrorsContainerOptions;\n\n /**\n * Instance of component reference for rendered errors\n */\n protected _component: ComponentRef<ValidationErrorsComponent>;\n\n /**\n * Instance of template reference for rendered errors\n */\n protected _template: EmbeddedViewRef<ValidationErrorsTemplateContext>;\n\n //######################### public properties - children #########################\n\n /**\n * View container for rendering validation errors\n */\n @ViewChild('container', {static: true, read: ViewContainerRef})\n public viewContainer: ViewContainerRef;\n\n //######################### public methods - implementation of #########################\n\n /**\n * Shows validation errors\n * @param errors - Errors to be shown\n * @param options - Options used for displaying validation errors\n * @param errorClasses - Array of css error classes\n */\n public show(errors: ValidationErrorsResult, options: ValidationErrorsContainerOptions): void\n {\n this._errors = errors;\n this._options = options;\n\n if(options.template)\n {\n this._renderTemplate();\n }\n else if(options.component)\n {\n this._renderComponent();\n }\n else\n {\n throw new Error('Missing template or component for rendering validation errors!');\n }\n }\n\n /**\n * Hides validation errors\n */\n public hide(): void\n {\n this.viewContainer.clear();\n this._component = null;\n this._template = null;\n }\n\n //######################### protected methods #########################\n\n /**\n * Renders validation errors component\n */\n protected _renderComponent(): void\n {\n if(!this._component)\n {\n this._component = this.viewContainer.createComponent(this._options.component);\n }\n\n this._component.instance.show(this._errors, this._options);\n }\n\n /**\n * Renders validation errors template\n */\n protected _renderTemplate(): void\n {\n if(!this._template)\n {\n this._template = this.viewContainer.createEmbeddedView(this._options.template,\n {\n $implicit: this._errors,\n options: this._options\n });\n }\n else\n {\n this._template.context =\n {\n $implicit: this._errors,\n options: this._options\n };\n\n this._template.detectChanges();\n }\n }\n}","<div>\n <ng-container #container></ng-container>\n</div>"]}
1
+ {"version":3,"file":"reservedSpaceValidationErrorsContainer.component.js","sourceRoot":"","sources":["../../../../../forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.ts","../../../../../forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,gBAAgB,EAAiC,SAAS,EAAC,MAAM,eAAe,CAAC;;AAK7H,8BAA8B;AAE9B;;GAEG;AAQH,MAAM,OAAO,+CAA+C;IAkCxD,yFAAyF;IAEzF;;;;;OAKG;IACI,IAAI,CAAC,MAA8B,EAAE,OAAyC;QAEjF,IAAI,CAAC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,CAAC,QAAQ;iBACzB,CAAC;YAEF,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;QACnC,CAAC;IACL,CAAC;8GA7GQ,+CAA+C;kGAA/C,+CAA+C,6LA+BX,gBAAgB,2CChDjE,+CAEM;;2FDeO,+CAA+C;kBAP3D,SAAS;+BAEI,4CAA4C,mBAGrC,uBAAuB,CAAC,MAAM;8BAkCxC,aAAa;sBADnB,SAAS;uBAAC,WAAW,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAC","sourcesContent":["import {Component, ChangeDetectionStrategy, ViewContainerRef, ComponentRef, EmbeddedViewRef, ViewChild} from '@angular/core';\n\nimport {ValidationErrorsResult} from '../../services/errorMessagesExtractor/errorMessagesExtractor.interface';\nimport {ValidationErrorsComponent, ValidationErrorsContainerComponent, ValidationErrorsContainerOptions, ValidationErrorsTemplateContext} from '../../services/validationErrorRenderer/validationErrorRenderer.interface';\n\n//TODO: optimize duplicit code\n\n/**\n * Component that serves as container for validation errors, either component or templates with reserved space for errors\n */\n@Component(\n{\n selector: 'reserved-space-validation-errors-container',\n templateUrl: 'reservedSpaceValidationErrorsContainer.component.html',\n styleUrl: 'reservedSpaceValidationErrorsContainer.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ReservedSpaceValidationErrorsContainerComponent implements ValidationErrorsContainerComponent\n{\n //######################### protected fields #########################\n\n /**\n * Errors to be shown\n * @internal\n */\n protected _errors: ValidationErrorsResult;\n \n /**\n * Options used for displaying validation errors\n * @internal\n */\n protected _options: ValidationErrorsContainerOptions;\n\n /**\n * Instance of component reference for rendered errors\n */\n protected _component: ComponentRef<ValidationErrorsComponent>;\n\n /**\n * Instance of template reference for rendered errors\n */\n protected _template: EmbeddedViewRef<ValidationErrorsTemplateContext>;\n\n //######################### public properties - children #########################\n\n /**\n * View container for rendering validation errors\n */\n @ViewChild('container', {static: true, read: ViewContainerRef})\n public viewContainer: ViewContainerRef;\n\n //######################### public methods - implementation of #########################\n\n /**\n * Shows validation errors\n * @param errors - Errors to be shown\n * @param options - Options used for displaying validation errors\n * @param errorClasses - Array of css error classes\n */\n public show(errors: ValidationErrorsResult, options: ValidationErrorsContainerOptions): void\n {\n this._errors = errors;\n this._options = options;\n\n if(options.template)\n {\n this._renderTemplate();\n }\n else if(options.component)\n {\n this._renderComponent();\n }\n else\n {\n throw new Error('Missing template or component for rendering validation errors!');\n }\n }\n\n /**\n * Hides validation errors\n */\n public hide(): void\n {\n this.viewContainer.clear();\n this._component = null;\n this._template = null;\n }\n\n //######################### protected methods #########################\n\n /**\n * Renders validation errors component\n */\n protected _renderComponent(): void\n {\n if(!this._component)\n {\n this._component = this.viewContainer.createComponent(this._options.component);\n }\n\n this._component.instance.show(this._errors, this._options);\n }\n\n /**\n * Renders validation errors template\n */\n protected _renderTemplate(): void\n {\n if(!this._template)\n {\n this._template = this.viewContainer.createEmbeddedView(this._options.template,\n {\n $implicit: this._errors,\n options: this._options\n });\n }\n else\n {\n this._template.context =\n {\n $implicit: this._errors,\n options: this._options\n };\n\n this._template.detectChanges();\n }\n }\n}","<div>\n <ng-container #container/>\n</div>"]}
@@ -1,5 +1,5 @@
1
1
  import { Directive, ElementRef } from '@angular/core';
2
- import { extend } from '@jscrpt/common';
2
+ import { extend } from '@jscrpt/common/extend';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
5
5
  * Default options for GroupHasErrorDirective
@@ -60,14 +60,13 @@ export class GroupHasErrorDirective {
60
60
  this._element.nativeElement.classList.remove(this._options.cssClass);
61
61
  }
62
62
  }
63
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GroupHasErrorDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
64
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: GroupHasErrorDirective, isStandalone: true, selector: "[groupHasError]", ngImport: i0 }); }
63
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: GroupHasErrorDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
64
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0", type: GroupHasErrorDirective, isStandalone: true, selector: "[groupHasError]", ngImport: i0 }); }
65
65
  }
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GroupHasErrorDirective, decorators: [{
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: GroupHasErrorDirective, decorators: [{
67
67
  type: Directive,
68
68
  args: [{
69
69
  selector: '[groupHasError]',
70
- standalone: true,
71
70
  }]
72
71
  }], ctorParameters: () => [{ type: i0.ElementRef }] });
73
72
  //# sourceMappingURL=groupHasError.directive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"groupHasError.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/groupHasError/groupHasError.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AACpD,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;;AAEtC;;GAEG;AACH,MAAM,cAAc,GACpB;IACI,QAAQ,EAAE,WAAW;CACxB,CAAC;AAaF;;GAEG;AAMH,MAAM,OAAO,sBAAsB;IAc/B,iEAAiE;IACjE,YAAoB,QAAiC;QAAjC,aAAQ,GAAR,QAAQ,CAAyB;QAbrD,oEAAoE;QAEpE;;WAEG;QACK,aAAQ,GAAyB,IAAI,CAAC;QAE9C;;WAEG;QACK,qBAAgB,GAAa,EAAE,CAAC;QAKpC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,cAAc,CAAC,CAAC;IACrD,CAAC;IAED,oEAAoE;IAEpE;;;OAGG;IACI,eAAe,CAAC,EAAU;QAE7B,+BAA+B;QAC/B,IAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAChD,CAAC;YACG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACnC,CAAC;QAED,IAAI,CAAC,aAAa,EAAE,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,iBAAiB,CAAC,EAAU;QAE/B,gCAAgC;QAChC,IAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAC/C,CAAC;YACG,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACvE,CAAC;QAED,IAAI,CAAC,aAAa,EAAE,CAAC;IACzB,CAAC;IAED,qEAAqE;IAErE;;OAEG;IACK,aAAa;QAEjB,IAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAC/B,CAAC;YACG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACtE,CAAC;aAED,CAAC;YACG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACzE,CAAC;IACL,CAAC;8GAnEQ,sBAAsB;kGAAtB,sBAAsB;;2FAAtB,sBAAsB;kBALlC,SAAS;mBACV;oBACI,QAAQ,EAAE,iBAAiB;oBAC3B,UAAU,EAAE,IAAI;iBACnB","sourcesContent":["import {Directive, ElementRef} from '@angular/core';\nimport {extend} from '@jscrpt/common';\n\n/**\n * Default options for GroupHasErrorDirective\n */\nconst defaultOptions: GroupHasErrorOptions =\n{\n cssClass: 'has-error'\n};\n\n/**\n * Options for GroupHasErrorDirective\n */\nexport interface GroupHasErrorOptions\n{\n /**\n * Css class applied to element when there is an error\n */\n cssClass?: string;\n}\n\n/**\n * Directive that is attached to parent element of inputs group and handles css class that is added to this element\n */\n@Directive(\n{\n selector: '[groupHasError]',\n standalone: true,\n})\nexport class GroupHasErrorDirective\n{\n //######################### private fields #########################\n\n /**\n * Options for this directive\n */\n private _options: GroupHasErrorOptions = null;\n\n /**\n * Array of invalid controls\n */\n private _invalidControls: string[] = [];\n\n //######################### constructor #########################\n constructor(private _element: ElementRef<HTMLElement>)\n {\n this._options = extend(true, {}, defaultOptions);\n }\n\n //######################### public methods #########################\n\n /**\n * Registers control as invalid control\n * @param id - Name of control to be registered\n */\n public registerControl(id: string): void\n {\n //control is not registered yet\n if(!this._invalidControls.find(itm => itm == id))\n {\n this._invalidControls.push(id);\n }\n\n this._updateStatus();\n }\n\n /**\n * Unregisters control from invalid controls\n * @param id - Id of control to be unregistered\n */\n public unregisterControl(id: string): void\n {\n //control was registered already\n if(this._invalidControls.find(itm => itm == id))\n {\n this._invalidControls.splice(this._invalidControls.indexOf(id), 1);\n }\n\n this._updateStatus();\n }\n\n //######################### private methods #########################\n\n /**\n * Updates status of element (css classes)\n */\n private _updateStatus(): void\n {\n if(this._invalidControls.length)\n {\n this._element.nativeElement.classList.add(this._options.cssClass);\n }\n else\n {\n this._element.nativeElement.classList.remove(this._options.cssClass);\n }\n }\n}"]}
1
+ {"version":3,"file":"groupHasError.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/groupHasError/groupHasError.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AACpD,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;;AAE7C;;GAEG;AACH,MAAM,cAAc,GACpB;IACI,QAAQ,EAAE,WAAW;CACxB,CAAC;AAaF;;GAEG;AAKH,MAAM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AAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACzE,CAAC;IACL,CAAC;8GAnEQ,sBAAsB;kGAAtB,sBAAsB;;2FAAtB,sBAAsB;kBAJlC,SAAS;mBACV;oBACI,QAAQ,EAAE,iBAAiB;iBAC9B","sourcesContent":["import {Directive, ElementRef} from '@angular/core';\nimport {extend} from '@jscrpt/common/extend';\n\n/**\n * Default options for GroupHasErrorDirective\n */\nconst defaultOptions: GroupHasErrorOptions =\n{\n cssClass: 'has-error'\n};\n\n/**\n * Options for GroupHasErrorDirective\n */\nexport interface GroupHasErrorOptions\n{\n /**\n * Css class applied to element when there is an error\n */\n cssClass?: string;\n}\n\n/**\n * Directive that is attached to parent element of inputs group and handles css class that is added to this element\n */\n@Directive(\n{\n selector: '[groupHasError]',\n})\nexport class GroupHasErrorDirective\n{\n //######################### private fields #########################\n\n /**\n * Options for this directive\n */\n private _options: GroupHasErrorOptions = null;\n\n /**\n * Array of invalid controls\n */\n private _invalidControls: string[] = [];\n\n //######################### constructor #########################\n constructor(private _element: ElementRef<HTMLElement>)\n {\n this._options = extend(true, {}, defaultOptions);\n }\n\n //######################### public methods #########################\n\n /**\n * Registers control as invalid control\n * @param id - Name of control to be registered\n */\n public registerControl(id: string): void\n {\n //control is not registered yet\n if(!this._invalidControls.find(itm => itm == id))\n {\n this._invalidControls.push(id);\n }\n\n this._updateStatus();\n }\n\n /**\n * Unregisters control from invalid controls\n * @param id - Id of control to be unregistered\n */\n public unregisterControl(id: string): void\n {\n //control was registered already\n if(this._invalidControls.find(itm => itm == id))\n {\n this._invalidControls.splice(this._invalidControls.indexOf(id), 1);\n }\n\n this._updateStatus();\n }\n\n //######################### private methods #########################\n\n /**\n * Updates status of element (css classes)\n */\n private _updateStatus(): void\n {\n if(this._invalidControls.length)\n {\n this._element.nativeElement.classList.add(this._options.cssClass);\n }\n else\n {\n this._element.nativeElement.classList.remove(this._options.cssClass);\n }\n }\n}"]}
@@ -6,8 +6,8 @@ import * as i0 from "@angular/core";
6
6
  * Directive that is attached to parent element of inputs group and handles css class that is added to this element and registers provider for ValidationErrorsContainerView
7
7
  */
8
8
  export class GroupHasErrorContainerDirective extends GroupHasErrorDirective {
9
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GroupHasErrorContainerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
10
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: GroupHasErrorContainerDirective, isStandalone: true, selector: "[groupHasErrorContainer]", providers: [
9
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: GroupHasErrorContainerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
10
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0", type: GroupHasErrorContainerDirective, isStandalone: true, selector: "[groupHasErrorContainer]", providers: [
11
11
  {
12
12
  provide: GroupHasErrorDirective,
13
13
  useExisting: GroupHasErrorContainerDirective
@@ -15,11 +15,10 @@ export class GroupHasErrorContainerDirective extends GroupHasErrorDirective {
15
15
  ValidationErrorsContainerView
16
16
  ], usesInheritance: true, ngImport: i0 }); }
17
17
  }
18
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GroupHasErrorContainerDirective, decorators: [{
18
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: GroupHasErrorContainerDirective, decorators: [{
19
19
  type: Directive,
20
20
  args: [{
21
21
  selector: '[groupHasErrorContainer]',
22
- standalone: true,
23
22
  providers: [
24
23
  {
25
24
  provide: GroupHasErrorDirective,
@@ -1 +1 @@
1
- {"version":3,"file":"groupHasErrorContainer.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAmB,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAC,6BAA6B,EAAC,MAAM,0CAA0C,CAAC;AACvF,OAAO,EAAC,sBAAsB,EAAC,MAAM,0CAA0C,CAAC;;AAEhF;;GAEG;AAeH,MAAM,OAAO,+BAAgC,SAAQ,sBAAsB;8GAA9D,+BAA+B;kGAA/B,+BAA+B,uEATxC;YAEI;gBACI,OAAO,EAAE,sBAAsB;gBAC/B,WAAW,EAAE,+BAA+B;aAC/C;YACD,6BAA6B;SAChC;;2FAEQ,+BAA+B;kBAd3C,SAAS;mBACV;oBACI,QAAQ,EAAE,0BAA0B;oBACpC,UAAU,EAAE,IAAI;oBAChB,SAAS,EACT;wBAEI;4BACI,OAAO,EAAE,sBAAsB;4BAC/B,WAAW,iCAAiC;yBAC/C;wBACD,6BAA6B;qBAChC;iBACJ","sourcesContent":["import {Directive, ExistingProvider} from '@angular/core';\n\nimport {ValidationErrorsContainerView} from '../../misc/validationErrorsContainerView';\nimport {GroupHasErrorDirective} from '../groupHasError/groupHasError.directive';\n\n/**\n * Directive that is attached to parent element of inputs group and handles css class that is added to this element and registers provider for ValidationErrorsContainerView\n */\n@Directive(\n{\n selector: '[groupHasErrorContainer]',\n standalone: true,\n providers:\n [\n <ExistingProvider>\n {\n provide: GroupHasErrorDirective,\n useExisting: GroupHasErrorContainerDirective\n },\n ValidationErrorsContainerView\n ]\n})\nexport class GroupHasErrorContainerDirective extends GroupHasErrorDirective\n{\n}"]}
1
+ {"version":3,"file":"groupHasErrorContainer.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAmB,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAC,6BAA6B,EAAC,MAAM,0CAA0C,CAAC;AACvF,OAAO,EAAC,sBAAsB,EAAC,MAAM,0CAA0C,CAAC;;AAEhF;;GAEG;AAcH,MAAM,OAAO,+BAAgC,SAAQ,sBAAsB;8GAA9D,+BAA+B;kGAA/B,+BAA+B,uEATxC;YAEI;gBACI,OAAO,EAAE,sBAAsB;gBAC/B,WAAW,EAAE,+BAA+B;aAC/C;YACD,6BAA6B;SAChC;;2FAEQ,+BAA+B;kBAb3C,SAAS;mBACV;oBACI,QAAQ,EAAE,0BAA0B;oBACpC,SAAS,EACT;wBAEI;4BACI,OAAO,EAAE,sBAAsB;4BAC/B,WAAW,iCAAiC;yBAC/C;wBACD,6BAA6B;qBAChC;iBACJ","sourcesContent":["import {Directive, ExistingProvider} from '@angular/core';\n\nimport {ValidationErrorsContainerView} from '../../misc/validationErrorsContainerView';\nimport {GroupHasErrorDirective} from '../groupHasError/groupHasError.directive';\n\n/**\n * Directive that is attached to parent element of inputs group and handles css class that is added to this element and registers provider for ValidationErrorsContainerView\n */\n@Directive(\n{\n selector: '[groupHasErrorContainer]',\n providers:\n [\n <ExistingProvider>\n {\n provide: GroupHasErrorDirective,\n useExisting: GroupHasErrorContainerDirective\n },\n ValidationErrorsContainerView\n ]\n})\nexport class GroupHasErrorContainerDirective extends GroupHasErrorDirective\n{\n}"]}
@@ -140,8 +140,8 @@ export class HasErrorDirective {
140
140
  falseAction();
141
141
  }
142
142
  }
143
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: HasErrorDirective, deps: [{ 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 }); }
144
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: HasErrorDirective, isStandalone: true, selector: "[hasError][formControlName],[hasError][formControl],[hasError][ngModel]", inputs: { errorMessages: "errorMessages", errorsComponent: "errorsComponent", errorsTemplate: "errorsTemplate" }, ngImport: i0 }); }
143
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: HasErrorDirective, deps: [{ 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 }); }
144
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0", type: HasErrorDirective, isStandalone: true, selector: "[hasError][formControlName],[hasError][formControl],[hasError][ngModel]", inputs: { errorMessages: "errorMessages", errorsComponent: "errorsComponent", errorsTemplate: "errorsTemplate" }, ngImport: i0 }); }
145
145
  }
146
146
  __decorate([
147
147
  BindThis,
@@ -149,11 +149,10 @@ __decorate([
149
149
  __metadata("design:paramtypes", [Function, Function, Boolean]),
150
150
  __metadata("design:returntype", void 0)
151
151
  ], HasErrorDirective.prototype, "isSubmittedOrDirty", null);
152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: HasErrorDirective, decorators: [{
152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: HasErrorDirective, decorators: [{
153
153
  type: Directive,
154
154
  args: [{
155
155
  selector: '[hasError][formControlName],[hasError][formControl],[hasError][ngModel]',
156
- standalone: true,
157
156
  }]
158
157
  }], ctorParameters: () => [{ type: i1.ValidationErrorRendererFactory }, { type: i0.ViewContainerRef }, { type: i2.GroupHasErrorDirective, decorators: [{
159
158
  type: Optional
@@ -1 +1 @@
1
- {"version":3,"file":"hasError.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/hasError/hasError.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAqB,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAiB,IAAI,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AAC5J,OAAO,EAAC,oBAAoB,EAAE,eAAe,EAAe,OAAO,EAAE,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;AAChH,OAAO,EAAqB,mBAAmB,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAmB,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAC,YAAY,EAAE,MAAM,EAAC,MAAM,MAAM,CAAC;AAE1C,OAAO,EAAC,8BAA8B,EAAC,MAAM,wEAAwE,CAAC;AAEtH,OAAO,EAAC,gBAAgB,EAAC,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAC,sBAAsB,EAAC,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAC,6BAA6B,EAAC,MAAM,0CAA0C,CAAC;;;;;;;AAEvF,oEAAoE;AAEpE;;GAEG;AAMH,MAAM,OAAO,iBAAiB;IAwB1B,0EAA0E;IAE1E;;OAEG;IACH,IAAc,OAAO;QAEjB,OAAO,IAAI,CAAC,WAAW,EAAE,OAAO,IAAI,IAAI,CAAC,eAAe,EAAE,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;IAC/F,CAAC;IA6BD,iEAAiE;IACjE,YAAsB,eAA+C,EAC/C,aAA+B,EACP,aAAqC,EACjD,WAAiC,EACjC,eAAgC,EAChC,OAAgB,EAChB,YAA8B,EAC9B,aAA4C,EAC3B,kBAAsC,EACnE,QAAkB;QATlB,oBAAe,GAAf,eAAe,CAAgC;QAC/C,kBAAa,GAAb,aAAa,CAAkB;QACP,kBAAa,GAAb,aAAa,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;gBAOC,cAAc;sBADpB,KAAK;gBA6HI,kBAAkB","sourcesContent":["import {Directive, Optional, SkipSelf, OnInit, OnDestroy, Inject, Input, Injector, ViewContainerRef, AfterViewInit, Type, TemplateRef} from '@angular/core';\nimport {FormControlDirective, FormControlName, FormControl, NgModel, PristineChangeEvent} from '@angular/forms';\nimport {StringLocalization, STRING_LOCALIZATION} from '@anglr/common';\nimport {generateId, BindThis, StringDictionary} from '@jscrpt/common';\nimport {Subscription, filter} from 'rxjs';\n\nimport {ValidationErrorRendererFactory} from '../../services/validationErrorRenderer/validationErrorRenderer.service';\nimport {ValidationErrorRenderer, ValidationErrorsComponent, ValidationErrorsRendererOptions, ValidationErrorsTemplateContext} from '../../services/validationErrorRenderer/validationErrorRenderer.interface';\nimport {SubmittedService} from '../../services/submitted/submitted.service';\nimport {GroupHasErrorDirective} from '../groupHasError/groupHasError.directive';\nimport {ValidationErrorsContainerView} from '../../misc/validationErrorsContainerView';\n\n//TODO: add support for setting renderer factory options using input\n\n/**\n * Directive that is attached to control element and handles css classes that are added to this element\n */\n@Directive(\n{\n selector: '[hasError][formControlName],[hasError][formControl],[hasError][ngModel]',\n standalone: true,\n})\nexport class HasErrorDirective implements OnInit, AfterViewInit, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Subscriptions that are destroyed with destruction of this directive\n */\n protected subscriptions: Subscription = new Subscription();\n\n /**\n * Unique generated id of control\n */\n protected id: string = generateId(10);\n\n /**\n * Last value of control pristine attribute\n */\n protected previousDirty: boolean = false;\n\n /**\n * Indication whether currently are any errors rendered\n */\n protected hasErrors: boolean = false;\n\n //######################### protected properties #########################\n\n /**\n * Gets control which was assigned to this element\n */\n protected get control(): FormControl\n {\n return this.formControl?.control || this.formControlName?.control || this.ngModel?.control;\n }\n\n //######################### public properties #########################\n\n /**\n * Instance of validation error renderer\n */\n public renderer: ValidationErrorRenderer;\n\n //######################### public propeties - inputs #########################\n\n /**\n * Customized error messages\n */\n @Input()\n public errorMessages: StringDictionary;\n\n /**\n * Custom component used for rendering validation errors\n */\n @Input()\n public errorsComponent?: Type<ValidationErrorsComponent>;\n\n /**\n * Custom template used for rendering validation errors\n */\n @Input()\n public errorsTemplate?: TemplateRef<ValidationErrorsTemplateContext>;\n\n //######################### constructor #########################\n constructor(protected rendererFactory: ValidationErrorRendererFactory,\n protected viewContainer: ViewContainerRef,\n @Optional() @SkipSelf() protected groupHasError: GroupHasErrorDirective,\n @Optional() protected formControl: FormControlDirective,\n @Optional() protected formControlName: FormControlName,\n @Optional() protected ngModel: NgModel,\n @Optional() protected submittedSvc: SubmittedService,\n @Optional() protected containerView: ValidationErrorsContainerView,\n @Inject(STRING_LOCALIZATION) protected stringLocalization: StringLocalization,\n protected injector: Injector,)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this.containerView ??= new ValidationErrorsContainerView();\n this.containerView.viewContainer ??= this.viewContainer;\n\n this.subscriptions.add(this.stringLocalization.textsChange.subscribe(() => this.updateStatus()));\n this.subscriptions.add(this.control.statusChanges.subscribe(() => this.updateStatus()));\n this.subscriptions.add(this.control\n .events\n .pipe(filter(itm => itm instanceof PristineChangeEvent))\n .subscribe(event =>\n {\n const pristineEvent = event as PristineChangeEvent;\n\n //only if dirty(pristine) is different\n if(pristineEvent.pristine == this.previousDirty)\n {\n this.updateStatus();\n }\n }));\n\n if(this.submittedSvc)\n {\n this.subscriptions.add(this.submittedSvc.submittedChange.subscribe(() => this.isSubmittedOrDirty(() => this.updateStatus())));\n }\n }\n\n //######################### public methods - implementation of AfterViewInit #########################\n \n /**\n * Called when view was initialized\n */\n public ngAfterViewInit(): void\n {\n this.renderer = this.rendererFactory.create(this.control,\n this.containerView,\n this.injector,\n this.isSubmittedOrDirty);\n\n this.updateStatus();\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this.subscriptions.unsubscribe();\n\n this.groupHasError?.unregisterControl(this.id);\n this.renderer?.destroy();\n }\n\n //######################### protected methods #########################\n\n /**\n * Updates status of control and css classes\n */\n protected updateStatus(): void\n {\n if(!this.renderer)\n {\n return;\n }\n\n const opts: ValidationErrorsRendererOptions = {};\n\n if(this.errorsTemplate)\n {\n opts.template = this.errorsTemplate;\n }\n else if(this.errorsComponent)\n {\n opts.component = this.errorsComponent;\n }\n\n this.previousDirty = this.control.dirty;\n this.hasErrors = this.renderer.update(opts, this.errorMessages);\n this.toggleGroupHasError();\n }\n\n /**\n * Toggles registration of control in parent group\n */\n protected toggleGroupHasError(): void\n {\n if(this.groupHasError)\n {\n this.isSubmittedOrDirty(() => this.groupHasError.registerControl(this.id),\n () => this.groupHasError.unregisterControl(this.id),\n this.hasErrors);\n }\n }\n\n /**\n * Calls action when form is submitted or control is dirty\n * @param action - Action to be called when form is submitted or control dirty\n * @param falseAction - Action to be called when form is not submitted and control is not dirty\n * @param additionalCondition - Additional condition to be evaluated\n */\n @BindThis\n protected isSubmittedOrDirty(action: () => void, falseAction: () => void = () => {}, additionalCondition: boolean = true): void\n {\n //submitted form or dirty control\n if((this.submittedSvc?.submitted ||\n this.control?.dirty) &&\n additionalCondition)\n {\n action();\n }\n else\n {\n falseAction();\n }\n }\n}"]}
1
+ {"version":3,"file":"hasError.directive.js","sourceRoot":"","sources":["../../../../../forms/src/directives/hasError/hasError.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAqB,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAiB,IAAI,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AAC5J,OAAO,EAAC,oBAAoB,EAAE,eAAe,EAAe,OAAO,EAAE,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;AAChH,OAAO,EAAqB,mBAAmB,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAmB,MAAM,gBAAgB,CAAC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C,EAAE,CAAC,EACnD,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7C,CAAC;IACL,CAAC;IAED;;;;;OAKG;IAEO,kBAAkB,CAAC,MAAkB,EAAE,cAA0B,GAAG,EAAE,GAAE,CAAC,EAAE,sBAA+B,IAAI;QAEpH,iCAAiC;QACjC,IAAG,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS;YAC5B,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC;YACrB,mBAAmB,EACtB,CAAC;YACG,MAAM,EAAE,CAAC;QACb,CAAC;aAED,CAAC;YACG,WAAW,EAAE,CAAC;QAClB,CAAC;IACL,CAAC;8GApMQ,iBAAiB,6ZAsEN,mBAAmB;kGAtE9B,iBAAiB;;AAuLhB;IADT,QAAQ;;;;2DAcR;2FApMQ,iBAAiB;kBAJ7B,SAAS;mBACV;oBACI,QAAQ,EAAE,yEAAyE;iBACtF;;0BAiEgB,QAAQ;;0BAAI,QAAQ;;0BACpB,QAAQ;;0BACR,QAAQ;;0BACR,QAAQ;;0BACR,QAAQ;;0BACR,QAAQ;;0BACR,MAAM;2BAAC,mBAAmB;gEAvBhC,aAAa;sBADnB,KAAK;gBAOC,eAAe;sBADrB,KAAK;gBAOC,cAAc;sBADpB,KAAK;gBA6HI,kBAAkB","sourcesContent":["import {Directive, Optional, SkipSelf, OnInit, OnDestroy, Inject, Input, Injector, ViewContainerRef, AfterViewInit, Type, TemplateRef} from '@angular/core';\nimport {FormControlDirective, FormControlName, FormControl, NgModel, PristineChangeEvent} from '@angular/forms';\nimport {StringLocalization, STRING_LOCALIZATION} from '@anglr/common';\nimport {generateId, BindThis, StringDictionary} from '@jscrpt/common';\nimport {Subscription, filter} from 'rxjs';\n\nimport {ValidationErrorRendererFactory} from '../../services/validationErrorRenderer/validationErrorRenderer.service';\nimport {ValidationErrorRenderer, ValidationErrorsComponent, ValidationErrorsRendererOptions, ValidationErrorsTemplateContext} from '../../services/validationErrorRenderer/validationErrorRenderer.interface';\nimport {SubmittedService} from '../../services/submitted/submitted.service';\nimport {GroupHasErrorDirective} from '../groupHasError/groupHasError.directive';\nimport {ValidationErrorsContainerView} from '../../misc/validationErrorsContainerView';\n\n//TODO: add support for setting renderer factory options using input\n\n/**\n * Directive that is attached to control element and handles css classes that are added to this element\n */\n@Directive(\n{\n selector: '[hasError][formControlName],[hasError][formControl],[hasError][ngModel]',\n})\nexport class HasErrorDirective implements OnInit, AfterViewInit, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Subscriptions that are destroyed with destruction of this directive\n */\n protected subscriptions: Subscription = new Subscription();\n\n /**\n * Unique generated id of control\n */\n protected id: string = generateId(10);\n\n /**\n * Last value of control pristine attribute\n */\n protected previousDirty: boolean = false;\n\n /**\n * Indication whether currently are any errors rendered\n */\n protected hasErrors: boolean = false;\n\n //######################### protected properties #########################\n\n /**\n * Gets control which was assigned to this element\n */\n protected get control(): FormControl\n {\n return this.formControl?.control || this.formControlName?.control || this.ngModel?.control;\n }\n\n //######################### public properties #########################\n\n /**\n * Instance of validation error renderer\n */\n public renderer: ValidationErrorRenderer;\n\n //######################### public propeties - inputs #########################\n\n /**\n * Customized error messages\n */\n @Input()\n public errorMessages: StringDictionary;\n\n /**\n * Custom component used for rendering validation errors\n */\n @Input()\n public errorsComponent?: Type<ValidationErrorsComponent>;\n\n /**\n * Custom template used for rendering validation errors\n */\n @Input()\n public errorsTemplate?: TemplateRef<ValidationErrorsTemplateContext>;\n\n //######################### constructor #########################\n constructor(protected rendererFactory: ValidationErrorRendererFactory,\n protected viewContainer: ViewContainerRef,\n @Optional() @SkipSelf() protected groupHasError: GroupHasErrorDirective,\n @Optional() protected formControl: FormControlDirective,\n @Optional() protected formControlName: FormControlName,\n @Optional() protected ngModel: NgModel,\n @Optional() protected submittedSvc: SubmittedService,\n @Optional() protected containerView: ValidationErrorsContainerView,\n @Inject(STRING_LOCALIZATION) protected stringLocalization: StringLocalization,\n protected injector: Injector,)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this.containerView ??= new ValidationErrorsContainerView();\n this.containerView.viewContainer ??= this.viewContainer;\n\n this.subscriptions.add(this.stringLocalization.textsChange.subscribe(() => this.updateStatus()));\n this.subscriptions.add(this.control.statusChanges.subscribe(() => this.updateStatus()));\n this.subscriptions.add(this.control\n .events\n .pipe(filter(itm => itm instanceof PristineChangeEvent))\n .subscribe(event =>\n {\n const pristineEvent = event as PristineChangeEvent;\n\n //only if dirty(pristine) is different\n if(pristineEvent.pristine == this.previousDirty)\n {\n this.updateStatus();\n }\n }));\n\n if(this.submittedSvc)\n {\n this.subscriptions.add(this.submittedSvc.submittedChange.subscribe(() => this.isSubmittedOrDirty(() => this.updateStatus())));\n }\n }\n\n //######################### public methods - implementation of AfterViewInit #########################\n \n /**\n * Called when view was initialized\n */\n public ngAfterViewInit(): void\n {\n this.renderer = this.rendererFactory.create(this.control,\n this.containerView,\n this.injector,\n this.isSubmittedOrDirty);\n\n this.updateStatus();\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this.subscriptions.unsubscribe();\n\n this.groupHasError?.unregisterControl(this.id);\n this.renderer?.destroy();\n }\n\n //######################### protected methods #########################\n\n /**\n * Updates status of control and css classes\n */\n protected updateStatus(): void\n {\n if(!this.renderer)\n {\n return;\n }\n\n const opts: ValidationErrorsRendererOptions = {};\n\n if(this.errorsTemplate)\n {\n opts.template = this.errorsTemplate;\n }\n else if(this.errorsComponent)\n {\n opts.component = this.errorsComponent;\n }\n\n this.previousDirty = this.control.dirty;\n this.hasErrors = this.renderer.update(opts, this.errorMessages);\n this.toggleGroupHasError();\n }\n\n /**\n * Toggles registration of control in parent group\n */\n protected toggleGroupHasError(): void\n {\n if(this.groupHasError)\n {\n this.isSubmittedOrDirty(() => this.groupHasError.registerControl(this.id),\n () => this.groupHasError.unregisterControl(this.id),\n this.hasErrors);\n }\n }\n\n /**\n * Calls action when form is submitted or control is dirty\n * @param action - Action to be called when form is submitted or control dirty\n * @param falseAction - Action to be called when form is not submitted and control is not dirty\n * @param additionalCondition - Additional condition to be evaluated\n */\n @BindThis\n protected isSubmittedOrDirty(action: () => void, falseAction: () => void = () => {}, additionalCondition: boolean = true): void\n {\n //submitted form or dirty control\n if((this.submittedSvc?.submitted ||\n this.control?.dirty) &&\n additionalCondition)\n {\n action();\n }\n else\n {\n falseAction();\n }\n }\n}"]}
@@ -9,7 +9,7 @@ import * as i0 from "@angular/core";
9
9
  const MAX_NUMBER_VALIDATOR = {
10
10
  provide: NG_VALIDATORS,
11
11
  useExisting: forwardRef(() => MaxValueNumberValidatorDirective),
12
- multi: true
12
+ multi: true,
13
13
  };
14
14
  /**
15
15
  * Directive injecting checking for number max value validator
@@ -46,14 +46,14 @@ export class MaxValueNumberValidatorDirective {
46
46
  validate(control) {
47
47
  return this._validator(control);
48
48
  }
49
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MaxValueNumberValidatorDirective, deps: [{ token: 'maxValue', attribute: true }], target: i0.ɵɵFactoryTarget.Directive }); }
50
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", 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 }); }
49
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: MaxValueNumberValidatorDirective, deps: [{ token: 'maxValue', attribute: true }], target: i0.ɵɵFactoryTarget.Directive }); }
50
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0", type: MaxValueNumberValidatorDirective, isStandalone: true, selector: "input[number][maxValue][formControlName],input[number][maxValue][formControl],input[number][maxValue][ngModel]", inputs: { maxValue: "maxValue" }, providers: [MAX_NUMBER_VALIDATOR], usesOnChanges: true, ngImport: i0 }); }
51
51
  }
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MaxValueNumberValidatorDirective, decorators: [{
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.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]',
56
- providers: [MAX_NUMBER_VALIDATOR]
56
+ providers: [MAX_NUMBER_VALIDATOR],
57
57
  }]
58
58
  }], ctorParameters: () => [{ type: undefined, decorators: [{
59
59
  type: Attribute,