@anglr/common 14.2.0-beta.20221025042231 → 15.0.0-beta.20221026052356

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 (266) hide show
  1. package/changelog.md +44 -0
  2. package/es2015/floating-ui/src/services/floatingUiDomPosition.service.js +83 -65
  3. package/es2015/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -1
  4. package/es2015/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +3 -3
  5. package/es2015/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +3 -3
  6. package/es2015/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +3 -3
  7. package/es2015/forms/src/directives/groupHasError/groupHasError.directive.js +3 -3
  8. package/es2015/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +3 -3
  9. package/es2015/forms/src/directives/hasError/hasError.directive.js +3 -3
  10. package/es2015/forms/src/directives/hasError/hasError.directive.js.map +1 -1
  11. package/es2015/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +3 -3
  12. package/es2015/forms/src/directives/numberInput/minValueNumberValidator.directive.js +3 -3
  13. package/es2015/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +3 -3
  14. package/es2015/forms/src/directives/numberInput/numberInputValidator.directive.js +3 -3
  15. package/es2015/forms/src/directives/requiredClass/requiredClass.directive.js +3 -3
  16. package/es2015/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +3 -3
  17. package/es2015/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +3 -3
  18. package/es2015/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js +3 -3
  19. package/es2015/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js +3 -3
  20. package/es2015/forms/src/modules/errorMessage/modules/errorMessage.module.js +4 -4
  21. package/es2015/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js +3 -3
  22. package/es2015/forms/src/modules/formPipes/modules/formPipes.module.js +4 -4
  23. package/es2015/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js +3 -3
  24. package/es2015/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js +3 -3
  25. package/es2015/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js +3 -3
  26. package/es2015/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js +3 -3
  27. package/es2015/forms/src/modules/hasError.module.js +4 -4
  28. package/es2015/forms/src/modules/numberInput.module.js +4 -4
  29. package/es2015/forms/src/modules/requiredClass.module.js +4 -4
  30. package/es2015/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +3 -3
  31. package/es2015/forms/src/services/formModelBuilder/formModelBuilder.service.js +3 -3
  32. package/es2015/forms/src/services/submitted/submitted.service.js +3 -3
  33. package/es2015/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +3 -3
  34. package/es2015/hotkeys/src/services/appHotkeys.service.js +3 -3
  35. package/es2015/material/src/components/confirmationDialog/confirmationDialog.component.js +3 -3
  36. package/es2015/material/src/components/movableTitledDialog/movableTitledDialog.component.js +3 -3
  37. package/es2015/material/src/components/titledDialog/titledDialog.component.js +3 -3
  38. package/es2015/material/src/directives/confirmationDialog/confirmationDialog.directive.js +10 -8
  39. package/es2015/material/src/directives/confirmationDialog/confirmationDialog.directive.js.map +1 -1
  40. package/es2015/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +3 -3
  41. package/es2015/material/src/modules/confirmationDialog.module.js +4 -4
  42. package/es2015/material/src/modules/debugDataCopyClick.module.js +4 -4
  43. package/es2015/material/src/modules/movableTitledDialog.module.js +4 -4
  44. package/es2015/material/src/modules/titledDialog.module.js +4 -4
  45. package/es2015/material/src/services/titledDialog/titledDialog.service.js +3 -3
  46. package/es2015/moment/src/modules/moment.module.js +4 -4
  47. package/es2015/moment/src/pipes/momentConvert/momentConvert.pipe.js +3 -3
  48. package/es2015/moment/src/pipes/momentFormat/momentFormat.pipe.js +3 -3
  49. package/es2015/numeral/src/modules/numeral.module.js +4 -4
  50. package/es2015/numeral/src/pipes/numeral.pipe.js +3 -3
  51. package/es2015/router/src/services/routing/dataRouter.js +3 -3
  52. package/es2015/router/src/services/routing/dataRouterData.js +3 -3
  53. package/es2015/src/directives/bodyRender/bodyRender.directive.js +3 -3
  54. package/es2015/src/directives/bodyRender/bodyRender.directive.js.map +1 -1
  55. package/es2015/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +3 -3
  56. package/es2015/src/modules/castPipes/modules/castPipes.module.js +4 -4
  57. package/es2015/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js +3 -3
  58. package/es2015/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js +3 -3
  59. package/es2015/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +3 -3
  60. package/es2015/src/modules/castPipes/pipes/castType/castType.pipe.js +3 -3
  61. package/es2015/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.js +3 -3
  62. package/es2015/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.js.map +1 -1
  63. package/es2015/src/modules/clickOutside/modules/clickOutside.module.js +4 -4
  64. package/es2015/src/modules/commonDynamic.module.js +4 -4
  65. package/es2015/src/modules/commonLocalize.module.js +4 -4
  66. package/es2015/src/modules/commonUtils.module.js +4 -4
  67. package/es2015/src/modules/debugData/components/debugData/debugData.component.js +3 -3
  68. package/es2015/src/modules/debugData/modules/debugData.module.js +4 -4
  69. package/es2015/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +3 -3
  70. package/es2015/src/modules/goBack/directives/goBack/goBack.directive.js +3 -3
  71. package/es2015/src/modules/goBack/modules/goBack.module.js +4 -4
  72. package/es2015/src/modules/multiButton/components/multiButton/multiButton.component.js +3 -3
  73. package/es2015/src/modules/multiButton/components/multiButton/multiButton.component.js.map +1 -1
  74. package/es2015/src/modules/multiButton/modules/multiButton.module.js +4 -4
  75. package/es2015/src/modules/position/directives/positionTo/positionTo.directive.js +57 -21
  76. package/es2015/src/modules/position/directives/positionTo/positionTo.directive.js.map +1 -1
  77. package/es2015/src/modules/position/modules/position.module.js +4 -4
  78. package/es2015/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +3 -3
  79. package/es2015/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +3 -3
  80. package/es2015/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js.map +1 -1
  81. package/es2015/src/modules/progressIndicator/interceptors/progressInterceptor.js +4 -4
  82. package/es2015/src/modules/progressIndicator/interceptors/progressInterceptor.js.map +1 -1
  83. package/es2015/src/modules/progressIndicator/modules/progressIndicator.module.js +4 -4
  84. package/es2015/src/modules/progressIndicator/services/progressIndicator.service.js +3 -3
  85. package/es2015/src/modules/progressIndicator/services/progressIndicator.service.js.map +1 -1
  86. package/es2015/src/modules/tooltip/components/tooltip/tooltip.component.js +3 -3
  87. package/es2015/src/modules/tooltip/directives/tooltip/tooltip.directive.js +9 -9
  88. package/es2015/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +1 -1
  89. package/es2015/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +3 -3
  90. package/es2015/src/modules/tooltip/modules/tooltip.module.js +4 -4
  91. package/es2015/src/pipes/isNaN/isNaN.pipe.js +3 -3
  92. package/es2015/src/pipes/isPresent/isPresent.pipe.js +3 -3
  93. package/es2015/src/pipes/keys/keys.pipe.js +3 -3
  94. package/es2015/src/pipes/localize/localize.pipe.js +3 -3
  95. package/es2015/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +3 -3
  96. package/es2015/src/pipes/urlEncode/urlEncode.pipe.js +3 -3
  97. package/es2015/src/services/cookies/cookies.service.js +3 -3
  98. package/es2015/src/services/cookies/cookies.service.js.map +1 -1
  99. package/es2015/src/services/notifications/defaultNotifications.service.js +3 -3
  100. package/es2015/src/services/permanentStorage/cookiePermanentStorage.service.js +3 -3
  101. package/es2015/src/services/position/position.interface.js.map +1 -1
  102. package/es2015/src/services/position/position.types.js.map +1 -1
  103. package/es2015/src/services/statusCode/statusCode.service.js +3 -3
  104. package/es2015/src/services/stringLocalization/noStringLocalization.service.js +3 -3
  105. package/es2015/src/services/temporaryStorage/memoryTemporaryStorage.service.js +3 -3
  106. package/es2015/src/utils/index.js +1 -1
  107. package/es2015/src/utils/index.js.map +1 -1
  108. package/es2015/store/src/services/permanentStorage/localPermanentStorage.service.js +3 -3
  109. package/es2015/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +3 -3
  110. package/es2015/structured-log/src/components/console/console.component.js +3 -3
  111. package/es2015/structured-log/src/modules/consoleLog.module.js +4 -4
  112. package/es2015/structured-log/src/services/console/consoleComponentSink.service.js +3 -3
  113. package/es2015/structured-log/src/services/console/consoleSinkConfig.service.js +3 -3
  114. package/es2015/structured-log/src/services/logger.service.js +3 -3
  115. package/es2015/structured-log/src/services/rest/restSink.service.js +7 -5
  116. package/es2015/structured-log/src/services/rest/restSink.service.js.map +1 -1
  117. package/es2015/structured-log/src/services/rest/restSinkConfig.service.js +3 -3
  118. package/es2020/floating-ui/src/services/floatingUiDomPosition.service.js +83 -65
  119. package/es2020/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -1
  120. package/es2020/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +3 -3
  121. package/es2020/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +3 -3
  122. package/es2020/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +3 -3
  123. package/es2020/forms/src/directives/groupHasError/groupHasError.directive.js +3 -3
  124. package/es2020/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +3 -3
  125. package/es2020/forms/src/directives/hasError/hasError.directive.js +3 -3
  126. package/es2020/forms/src/directives/hasError/hasError.directive.js.map +1 -1
  127. package/es2020/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +3 -3
  128. package/es2020/forms/src/directives/numberInput/minValueNumberValidator.directive.js +3 -3
  129. package/es2020/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +3 -3
  130. package/es2020/forms/src/directives/numberInput/numberInputValidator.directive.js +3 -3
  131. package/es2020/forms/src/directives/requiredClass/requiredClass.directive.js +3 -3
  132. package/es2020/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +3 -3
  133. package/es2020/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +3 -3
  134. package/es2020/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js +3 -3
  135. package/es2020/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js +3 -3
  136. package/es2020/forms/src/modules/errorMessage/modules/errorMessage.module.js +4 -4
  137. package/es2020/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js +3 -3
  138. package/es2020/forms/src/modules/formPipes/modules/formPipes.module.js +4 -4
  139. package/es2020/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js +3 -3
  140. package/es2020/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js +3 -3
  141. package/es2020/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js +3 -3
  142. package/es2020/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js +3 -3
  143. package/es2020/forms/src/modules/hasError.module.js +4 -4
  144. package/es2020/forms/src/modules/numberInput.module.js +4 -4
  145. package/es2020/forms/src/modules/requiredClass.module.js +4 -4
  146. package/es2020/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +3 -3
  147. package/es2020/forms/src/services/formModelBuilder/formModelBuilder.service.js +3 -3
  148. package/es2020/forms/src/services/submitted/submitted.service.js +3 -3
  149. package/es2020/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +3 -3
  150. package/es2020/hotkeys/src/services/appHotkeys.service.js +3 -3
  151. package/es2020/material/src/components/confirmationDialog/confirmationDialog.component.js +3 -3
  152. package/es2020/material/src/components/movableTitledDialog/movableTitledDialog.component.js +3 -3
  153. package/es2020/material/src/components/titledDialog/titledDialog.component.js +3 -3
  154. package/es2020/material/src/directives/confirmationDialog/confirmationDialog.directive.js +9 -8
  155. package/es2020/material/src/directives/confirmationDialog/confirmationDialog.directive.js.map +1 -1
  156. package/es2020/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +3 -3
  157. package/es2020/material/src/modules/confirmationDialog.module.js +4 -4
  158. package/es2020/material/src/modules/debugDataCopyClick.module.js +4 -4
  159. package/es2020/material/src/modules/movableTitledDialog.module.js +4 -4
  160. package/es2020/material/src/modules/titledDialog.module.js +4 -4
  161. package/es2020/material/src/services/titledDialog/titledDialog.service.js +3 -3
  162. package/es2020/moment/src/modules/moment.module.js +4 -4
  163. package/es2020/moment/src/pipes/momentConvert/momentConvert.pipe.js +3 -3
  164. package/es2020/moment/src/pipes/momentFormat/momentFormat.pipe.js +3 -3
  165. package/es2020/numeral/src/modules/numeral.module.js +4 -4
  166. package/es2020/numeral/src/pipes/numeral.pipe.js +3 -3
  167. package/es2020/router/src/services/routing/dataRouter.js +3 -3
  168. package/es2020/router/src/services/routing/dataRouterData.js +3 -3
  169. package/es2020/src/directives/bodyRender/bodyRender.directive.js +3 -3
  170. package/es2020/src/directives/bodyRender/bodyRender.directive.js.map +1 -1
  171. package/es2020/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +3 -3
  172. package/es2020/src/modules/castPipes/modules/castPipes.module.js +4 -4
  173. package/es2020/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js +3 -3
  174. package/es2020/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js +3 -3
  175. package/es2020/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +3 -3
  176. package/es2020/src/modules/castPipes/pipes/castType/castType.pipe.js +3 -3
  177. package/es2020/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.js +3 -3
  178. package/es2020/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.js.map +1 -1
  179. package/es2020/src/modules/clickOutside/modules/clickOutside.module.js +4 -4
  180. package/es2020/src/modules/commonDynamic.module.js +4 -4
  181. package/es2020/src/modules/commonLocalize.module.js +4 -4
  182. package/es2020/src/modules/commonUtils.module.js +4 -4
  183. package/es2020/src/modules/debugData/components/debugData/debugData.component.js +3 -3
  184. package/es2020/src/modules/debugData/modules/debugData.module.js +4 -4
  185. package/es2020/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +3 -3
  186. package/es2020/src/modules/goBack/directives/goBack/goBack.directive.js +3 -3
  187. package/es2020/src/modules/goBack/modules/goBack.module.js +4 -4
  188. package/es2020/src/modules/multiButton/components/multiButton/multiButton.component.js +3 -3
  189. package/es2020/src/modules/multiButton/components/multiButton/multiButton.component.js.map +1 -1
  190. package/es2020/src/modules/multiButton/modules/multiButton.module.js +4 -4
  191. package/es2020/src/modules/position/directives/positionTo/positionTo.directive.js +58 -21
  192. package/es2020/src/modules/position/directives/positionTo/positionTo.directive.js.map +1 -1
  193. package/es2020/src/modules/position/modules/position.module.js +4 -4
  194. package/es2020/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +3 -3
  195. package/es2020/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +3 -3
  196. package/es2020/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js.map +1 -1
  197. package/es2020/src/modules/progressIndicator/interceptors/progressInterceptor.js +4 -4
  198. package/es2020/src/modules/progressIndicator/interceptors/progressInterceptor.js.map +1 -1
  199. package/es2020/src/modules/progressIndicator/modules/progressIndicator.module.js +4 -4
  200. package/es2020/src/modules/progressIndicator/services/progressIndicator.service.js +3 -3
  201. package/es2020/src/modules/progressIndicator/services/progressIndicator.service.js.map +1 -1
  202. package/es2020/src/modules/tooltip/components/tooltip/tooltip.component.js +3 -3
  203. package/es2020/src/modules/tooltip/directives/tooltip/tooltip.directive.js +9 -9
  204. package/es2020/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +1 -1
  205. package/es2020/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +3 -3
  206. package/es2020/src/modules/tooltip/modules/tooltip.module.js +4 -4
  207. package/es2020/src/pipes/isNaN/isNaN.pipe.js +3 -3
  208. package/es2020/src/pipes/isPresent/isPresent.pipe.js +3 -3
  209. package/es2020/src/pipes/keys/keys.pipe.js +3 -3
  210. package/es2020/src/pipes/localize/localize.pipe.js +3 -3
  211. package/es2020/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +3 -3
  212. package/es2020/src/pipes/urlEncode/urlEncode.pipe.js +3 -3
  213. package/es2020/src/services/cookies/cookies.service.js +3 -3
  214. package/es2020/src/services/cookies/cookies.service.js.map +1 -1
  215. package/es2020/src/services/notifications/defaultNotifications.service.js +3 -3
  216. package/es2020/src/services/permanentStorage/cookiePermanentStorage.service.js +3 -3
  217. package/es2020/src/services/position/position.interface.js.map +1 -1
  218. package/es2020/src/services/position/position.types.js.map +1 -1
  219. package/es2020/src/services/statusCode/statusCode.service.js +3 -3
  220. package/es2020/src/services/stringLocalization/noStringLocalization.service.js +3 -3
  221. package/es2020/src/services/temporaryStorage/memoryTemporaryStorage.service.js +3 -3
  222. package/es2020/src/utils/index.js +1 -1
  223. package/es2020/src/utils/index.js.map +1 -1
  224. package/es2020/store/src/services/permanentStorage/localPermanentStorage.service.js +3 -3
  225. package/es2020/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +3 -3
  226. package/es2020/structured-log/src/components/console/console.component.js +3 -3
  227. package/es2020/structured-log/src/modules/consoleLog.module.js +4 -4
  228. package/es2020/structured-log/src/services/console/consoleComponentSink.service.js +3 -3
  229. package/es2020/structured-log/src/services/console/consoleSinkConfig.service.js +3 -3
  230. package/es2020/structured-log/src/services/logger.service.js +3 -3
  231. package/es2020/structured-log/src/services/rest/restSink.service.js +6 -5
  232. package/es2020/structured-log/src/services/rest/restSink.service.js.map +1 -1
  233. package/es2020/structured-log/src/services/rest/restSinkConfig.service.js +3 -3
  234. package/floating-ui/src/services/floatingUiDomPosition.service.d.ts.map +1 -1
  235. package/material/src/directives/confirmationDialog/confirmationDialog.directive.d.ts +4 -4
  236. package/material/src/directives/confirmationDialog/confirmationDialog.directive.d.ts.map +1 -1
  237. package/package.json +31 -28
  238. package/src/modules/position/directives/positionTo/positionTo.directive.d.ts +35 -14
  239. package/src/modules/position/directives/positionTo/positionTo.directive.d.ts.map +1 -1
  240. package/src/modules/progressIndicator/interceptors/progressInterceptor.d.ts.map +1 -1
  241. package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts.map +1 -1
  242. package/src/services/position/position.interface.d.ts +51 -3
  243. package/src/services/position/position.interface.d.ts.map +1 -1
  244. package/src/services/position/position.types.d.ts +4 -0
  245. package/src/services/position/position.types.d.ts.map +1 -1
  246. package/structured-log/src/services/rest/restSink.service.d.ts.map +1 -1
  247. package/{positions/src/types/positions.typings.d.ts → typings/positions/index.d.ts} +12 -4
  248. package/typings/store/index.d.ts +5 -0
  249. package/{structured-log/src/types/structured-log.typings.d.ts → typings/structured-log/index.d.ts} +49 -13
  250. package/version.bak +1 -1
  251. package/es2015/positions/src/types/positions.typings.js +0 -2
  252. package/es2015/positions/src/types/positions.typings.js.map +0 -1
  253. package/es2015/store/src/types/store.typings.js +0 -2
  254. package/es2015/store/src/types/store.typings.js.map +0 -1
  255. package/es2015/structured-log/src/types/structured-log.typings.js +0 -2
  256. package/es2015/structured-log/src/types/structured-log.typings.js.map +0 -1
  257. package/es2020/positions/src/types/positions.typings.js +0 -2
  258. package/es2020/positions/src/types/positions.typings.js.map +0 -1
  259. package/es2020/store/src/types/store.typings.js +0 -2
  260. package/es2020/store/src/types/store.typings.js.map +0 -1
  261. package/es2020/structured-log/src/types/structured-log.typings.js +0 -2
  262. package/es2020/structured-log/src/types/structured-log.typings.js.map +0 -1
  263. package/positions/src/types/positions.typings.d.ts.map +0 -1
  264. package/store/src/types/store.typings.d.ts +0 -4
  265. package/store/src/types/store.typings.d.ts.map +0 -1
  266. package/structured-log/src/types/structured-log.typings.d.ts.map +0 -1
@@ -2,6 +2,7 @@ import { Injectable, Inject } from '@angular/core';
2
2
  import { APP_STABLE } from '@anglr/common';
3
3
  import { isPresent } from '@jscrpt/common';
4
4
  import { LogEventLevel } from 'structured-log';
5
+ import { lastValueFrom } from 'rxjs';
5
6
  import { toText, isEnabled } from '../../misc/utils';
6
7
  import { RestSinkConfigService } from './restSinkConfig.service';
7
8
  import { LOGGER_REST_CLIENT } from '../../types/tokens';
@@ -25,9 +26,10 @@ export class RestSinkService {
25
26
  */
26
27
  this._logs = [];
27
28
  isStable.then(() => {
29
+ var _a;
28
30
  this._timer = setInterval(() => {
29
31
  this.flush();
30
- }, this._configSvc.secondsToFlushAfter * 1000);
32
+ }, ((_a = this._configSvc.secondsToFlushAfter) !== null && _a !== void 0 ? _a : 0) * 1000);
31
33
  });
32
34
  }
33
35
  //######################### public methods - implementation of OnDestroy #########################
@@ -85,7 +87,7 @@ export class RestSinkService {
85
87
  return Promise.resolve(null);
86
88
  }
87
89
  try {
88
- promise = this._restClient.log(this._logs).toPromise();
90
+ promise = lastValueFrom(this._restClient.log(this._logs));
89
91
  }
90
92
  catch (e) {
91
93
  console.log(e);
@@ -104,9 +106,9 @@ export class RestSinkService {
104
106
  }
105
107
  }
106
108
  }
107
- RestSinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: RestSinkService, deps: [{ token: i1.RestSinkConfigService }, { token: APP_STABLE }, { token: LOGGER_REST_CLIENT }], target: i0.ɵɵFactoryTarget.Injectable });
108
- RestSinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: RestSinkService });
109
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: RestSinkService, decorators: [{
109
+ RestSinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RestSinkService, deps: [{ token: i1.RestSinkConfigService }, { token: APP_STABLE }, { token: LOGGER_REST_CLIENT }], target: i0.ɵɵFactoryTarget.Injectable });
110
+ RestSinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RestSinkService });
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RestSinkService, decorators: [{
110
112
  type: Injectable
111
113
  }], ctorParameters: function () { return [{ type: i1.RestSinkConfigService }, { type: Promise, decorators: [{
112
114
  type: Inject,
@@ -1 +1 @@
1
- {"version":3,"file":"restSink.service.js","sourceRoot":"","sources":["../../../../../structured-log/src/services/rest/restSink.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACjD,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAiB,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAC,MAAM,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAC,qBAAqB,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;;;AAGtD;;GAEG;AAEH,MAAM,OAAO,eAAe;IAmBxB,iEAAiE;IACjE,YAAoB,UAAiC,EACrB,QAAuB,EACP,WAA6B;QAFzD,eAAU,GAAV,UAAU,CAAuB;QAEL,gBAAW,GAAX,WAAW,CAAkB;QApB7E,oEAAoE;QAEpE;;WAEG;QACK,sBAAiB,GAAY,KAAK,CAAC;QAE3C;;WAEG;QACK,UAAK,GAAc,EAAE,CAAC;QAY1B,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE;YAEf,IAAI,C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;0BACjB,MAAM;2BAAC,kBAAkB","sourcesContent":["import {Injectable, Inject} from '@angular/core';\nimport {APP_STABLE} from '@anglr/common';\nimport {isPresent} from '@jscrpt/common';\nimport {Sink, LogEvent, LogEventLevel} from 'structured-log';\n\nimport {toText, isEnabled} from '../../misc/utils';\nimport {RestSinkConfigService} from './restSinkConfig.service';\nimport {LOGGER_REST_CLIENT} from '../../types/tokens';\nimport {LoggerRestClient, RestLog} from '../../types/logger.interface';\n\n/**\n * Sink that is used for storing logs using REST\n */\n@Injectable()\nexport class RestSinkService implements Sink\n{\n //######################### private fields #########################\n\n /**\n * Indication that prototype of MessageTemplate was updated\n */\n private _prototypeUpdated: boolean = false;\n\n /**\n * Array of unflushed logs\n */\n private _logs: RestLog[] = [];\n\n /**\n * Interval timer id\n */\n private _timer: number;\n\n //######################### constructor #########################\n constructor(private _configSvc: RestSinkConfigService,\n @Inject(APP_STABLE) isStable: Promise<void>,\n @Inject(LOGGER_REST_CLIENT) private _restClient: LoggerRestClient)\n {\n isStable.then(() =>\n {\n this._timer = setInterval(() =>\n {\n this.flush();\n }, this._configSvc.secondsToFlushAfter * 1000) as any;\n });\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n if(isPresent(this._timer))\n {\n clearInterval(this._timer);\n }\n\n this.flush();\n }\n\n //######################### public methods - implementation of Sink #########################\n\n /**\n * Emits events into log\n * @param events - Events to be emitted\n */\n public emit(events: LogEvent[]): void\n {\n if(!events || !events.length)\n {\n return;\n }\n\n let forceFlush = false;\n\n events.forEach(e =>\n {\n if(!this._prototypeUpdated)\n {\n this._updatePrototype(e);\n\n this._prototypeUpdated = true;\n }\n\n if (!isEnabled(this._configSvc.restrictToLevel, e.level))\n {\n return;\n }\n\n const logLevel = LogEventLevel[e.level].toUpperCase();\n const timestamp = e.timestamp;\n const message = e.messageTemplate.render(e.properties);\n\n this._logs.push(\n {\n logLevel,\n message,\n timestamp\n });\n\n if (isEnabled(this._configSvc.immediateFlushMinLevel, e.level))\n {\n forceFlush = true;\n }\n });\n\n //flush if number of records is bigger than max or flush is required\n if(forceFlush || this._logs.length >= this._configSvc.flushAfterNumberOfLogs)\n {\n this.flush();\n }\n }\n\n /**\n * Flushes logs\n */\n public flush(): Promise<void>\n {\n let promise: Promise<void>;\n\n //no logs available\n if(!this._logs.length)\n {\n return Promise.resolve(null);\n }\n\n try\n {\n promise = this._restClient.log(this._logs).toPromise();\n }\n catch(e)\n {\n console.log(e);\n }\n\n this._logs = [];\n\n return promise ?? Promise.resolve(null);\n }\n\n //######################### private methods #########################\n\n /**\n * Updates prototype of MessageTemplate\n */\n private _updatePrototype(e: LogEvent): void\n {\n const messageTemplateInstance = (<any>e.messageTemplate);\n\n if(messageTemplateInstance.constructor && messageTemplateInstance.constructor.prototype && messageTemplateInstance.constructor.prototype.toText)\n {\n messageTemplateInstance.constructor.prototype.toText = toText;\n }\n }\n}"]}
1
+ {"version":3,"file":"restSink.service.js","sourceRoot":"","sources":["../../../../../structured-log/src/services/rest/restSink.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACjD,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAiB,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAC,aAAa,EAAC,MAAM,MAAM,CAAC;AAEnC,OAAO,EAAC,MAAM,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAC,qBAAqB,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;;;AAGtD;;GAEG;AAEH,MAAM,OAAO,eAAe;IAmBxB,iEAAiE;IACjE,YAAoB,UAAiC,EACrB,QAAuB,EACP,WAA6B;QAFzD,eAAU,GA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C,SAAS,CAAC,MAAM,EAC/I;YACI,uBAAuB,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC;SACjE;IACL,CAAC;;4GA7IQ,eAAe,uDAqBJ,UAAU,aACV,kBAAkB;gHAtB7B,eAAe;2FAAf,eAAe;kBAD3B,UAAU;;0BAsBM,MAAM;2BAAC,UAAU;;0BACjB,MAAM;2BAAC,kBAAkB","sourcesContent":["import {Injectable, Inject} from '@angular/core';\nimport {APP_STABLE} from '@anglr/common';\nimport {isPresent} from '@jscrpt/common';\nimport {Sink, LogEvent, LogEventLevel} from 'structured-log';\nimport {lastValueFrom} from 'rxjs';\n\nimport {toText, isEnabled} from '../../misc/utils';\nimport {RestSinkConfigService} from './restSinkConfig.service';\nimport {LOGGER_REST_CLIENT} from '../../types/tokens';\nimport {LoggerRestClient, RestLog} from '../../types/logger.interface';\n\n/**\n * Sink that is used for storing logs using REST\n */\n@Injectable()\nexport class RestSinkService implements Sink\n{\n //######################### private fields #########################\n\n /**\n * Indication that prototype of MessageTemplate was updated\n */\n private _prototypeUpdated: boolean = false;\n\n /**\n * Array of unflushed logs\n */\n private _logs: RestLog[] = [];\n\n /**\n * Interval timer id\n */\n private _timer: number|undefined|null;\n\n //######################### constructor #########################\n constructor(private _configSvc: RestSinkConfigService,\n @Inject(APP_STABLE) isStable: Promise<void>,\n @Inject(LOGGER_REST_CLIENT) private _restClient: LoggerRestClient)\n {\n isStable.then(() =>\n {\n this._timer = setInterval(() =>\n {\n this.flush();\n }, (this._configSvc.secondsToFlushAfter ?? 0) * 1000) as any;\n });\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n if(isPresent(this._timer))\n {\n clearInterval(this._timer);\n }\n\n this.flush();\n }\n\n //######################### public methods - implementation of Sink #########################\n\n /**\n * Emits events into log\n * @param events - Events to be emitted\n */\n public emit(events: LogEvent[]): void\n {\n if(!events || !events.length)\n {\n return;\n }\n\n let forceFlush = false;\n\n events.forEach(e =>\n {\n if(!this._prototypeUpdated)\n {\n this._updatePrototype(e);\n\n this._prototypeUpdated = true;\n }\n\n if (!isEnabled(this._configSvc.restrictToLevel, e.level))\n {\n return;\n }\n\n const logLevel = LogEventLevel[e.level].toUpperCase();\n const timestamp = e.timestamp;\n const message = e.messageTemplate.render(e.properties);\n\n this._logs.push(\n {\n logLevel,\n message,\n timestamp\n });\n\n if (isEnabled(this._configSvc.immediateFlushMinLevel, e.level))\n {\n forceFlush = true;\n }\n });\n\n //flush if number of records is bigger than max or flush is required\n if(forceFlush || this._logs.length >= this._configSvc.flushAfterNumberOfLogs)\n {\n this.flush();\n }\n }\n\n /**\n * Flushes logs\n */\n public flush(): Promise<void>\n {\n let promise: Promise<void>;\n\n //no logs available\n if(!this._logs.length)\n {\n return Promise.resolve(null);\n }\n\n try\n {\n promise = lastValueFrom(this._restClient.log(this._logs));\n }\n catch(e)\n {\n console.log(e);\n }\n\n this._logs = [];\n\n return promise ?? Promise.resolve(null);\n }\n\n //######################### private methods #########################\n\n /**\n * Updates prototype of MessageTemplate\n */\n private _updatePrototype(e: LogEvent): void\n {\n const messageTemplateInstance = (<any>e.messageTemplate);\n\n if(messageTemplateInstance.constructor && messageTemplateInstance.constructor.prototype && messageTemplateInstance.constructor.prototype.toText)\n {\n messageTemplateInstance.constructor.prototype.toText = toText;\n }\n }\n}"]}
@@ -34,9 +34,9 @@ export class RestSinkConfigService {
34
34
  }
35
35
  }
36
36
  }
37
- RestSinkConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: RestSinkConfigService, deps: [{ token: Injector }, { token: Injector }, { token: Injector }, { token: Injector }], target: i0.ɵɵFactoryTarget.Injectable });
38
- RestSinkConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: RestSinkConfigService, providedIn: 'root', useFactory: () => new RestSinkConfigService() });
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: RestSinkConfigService, decorators: [{
37
+ RestSinkConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RestSinkConfigService, deps: [{ token: Injector }, { token: Injector }, { token: Injector }, { token: Injector }], target: i0.ɵɵFactoryTarget.Injectable });
38
+ RestSinkConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RestSinkConfigService, providedIn: 'root', useFactory: () => new RestSinkConfigService() });
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RestSinkConfigService, decorators: [{
40
40
  type: Injectable,
41
41
  args: [{ providedIn: 'root', useFactory: () => new RestSinkConfigService() }]
42
42
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
@@ -1,6 +1,6 @@
1
1
  import { Injectable } from '@angular/core';
2
2
  import { PositionOffset, PositionPlacement, POSITION } from '@anglr/common';
3
- import { extend, isEmptyObject } from '@jscrpt/common';
3
+ import { extend, isEmptyObject, isFunction, isJsObject, isNumber, nameof } from '@jscrpt/common';
4
4
  import { computePosition, autoUpdate, offset, flip } from '@floating-ui/dom';
5
5
  import { Observable } from 'rxjs';
6
6
  import * as i0 from "@angular/core";
@@ -10,8 +10,8 @@ import * as i0 from "@angular/core";
10
10
  const defaultOptions = {
11
11
  autoUpdate: false,
12
12
  flip: false,
13
- offset: PositionOffset.None,
14
- placement: PositionPlacement.Top
13
+ offset: nameof('None'),
14
+ placement: PositionPlacement.TopStart,
15
15
  };
16
16
  /**
17
17
  * Service that is used for positioning two elements against each other, using floating-ui dom implementation
@@ -31,7 +31,7 @@ export class FloatingUiDomPosition {
31
31
  const runComputation = async () => {
32
32
  const result = await computePosition(source, target, {
33
33
  placement: this._getPlacement(computedOptions),
34
- middleware: middlewares
34
+ middleware: middlewares,
35
35
  });
36
36
  if (computedOptions.autoUpdate) {
37
37
  subscriber.next({
@@ -91,67 +91,85 @@ export class FloatingUiDomPosition {
91
91
  * @param options - Options that contains definition of offset
92
92
  */
93
93
  _setOffset(middlewares, options) {
94
- if (options.offset != PositionOffset.None) {
95
- if (options.offset == PositionOffset.MouseEnter) {
96
- //fallback if not supported placement used
97
- if (options.placement == PositionPlacement.Left ||
98
- options.placement == PositionPlacement.LeftStart ||
99
- options.placement == PositionPlacement.LeftEnd ||
100
- options.placement == PositionPlacement.Right ||
101
- options.placement == PositionPlacement.RightStart ||
102
- options.placement == PositionPlacement.RightEnd ||
103
- options.placement == PositionPlacement.Bottom ||
104
- options.placement == PositionPlacement.BottomEnd ||
105
- options.placement == PositionPlacement.Top ||
106
- options.placement == PositionPlacement.TopEnd) {
107
- options.placement = PositionPlacement.TopStart;
108
- }
94
+ //no offset
95
+ if (options.offset === PositionOffset[PositionOffset.None]) {
96
+ return;
97
+ }
98
+ if (options.offset === PositionOffset[PositionOffset.MouseEnter]) {
99
+ //fallback if not supported placement used
100
+ if (options.placement == PositionPlacement.Left ||
101
+ options.placement == PositionPlacement.LeftStart ||
102
+ options.placement == PositionPlacement.LeftEnd ||
103
+ options.placement == PositionPlacement.Right ||
104
+ options.placement == PositionPlacement.RightStart ||
105
+ options.placement == PositionPlacement.RightEnd ||
106
+ options.placement == PositionPlacement.Bottom ||
107
+ options.placement == PositionPlacement.BottomEnd ||
108
+ options.placement == PositionPlacement.Top ||
109
+ options.placement == PositionPlacement.TopEnd) {
110
+ options.placement = PositionPlacement.TopStart;
109
111
  }
110
- middlewares.push(offset(({ floating, placement }) => {
111
- if (options.offset == PositionOffset.MouseEnter && options.mouseEvent) {
112
- return {
113
- crossAxis: options.mouseEvent.x - options.mouseEvent.target.getBoundingClientRect().x
114
- };
115
- }
116
- let dimension;
117
- if (placement == 'bottom' || placement == 'bottom-start' || placement == 'bottom-end' ||
118
- placement == 'top' || placement == 'top-start' || placement == 'top-end') {
119
- dimension = floating.width;
120
- }
121
- else {
122
- dimension = floating.height;
123
- }
124
- switch (options.offset) {
125
- default:
126
- {
127
- dimension = 0;
128
- break;
129
- }
130
- case PositionOffset.Full:
131
- {
132
- break;
133
- }
134
- case PositionOffset.Half:
135
- {
136
- dimension /= 2;
137
- break;
138
- }
139
- case PositionOffset.NegativeFull:
140
- {
141
- dimension *= -1;
142
- break;
143
- }
144
- case PositionOffset.NegativeHalf:
145
- {
146
- dimension *= -.5;
147
- break;
148
- }
149
- }
112
+ }
113
+ middlewares.push(offset(({ elements, placement, x, y }) => {
114
+ //offset is function
115
+ if (isFunction(options.offset)) {
116
+ return options.offset({ elements, x, y });
117
+ }
118
+ const { floating } = elements;
119
+ if (options.offset === PositionOffset[PositionOffset.MouseEnter] && options.mouseEvent) {
150
120
  return {
151
- crossAxis: dimension
121
+ crossAxis: options.mouseEvent.x - options.mouseEvent.target.getBoundingClientRect().x
152
122
  };
153
- }));
154
- }
123
+ }
124
+ const stringOffset = options.offset;
125
+ //offset is object
126
+ if (isJsObject(options.offset)) {
127
+ return options.offset;
128
+ }
129
+ //offset is skidding number
130
+ if (isNumber(stringOffset)) {
131
+ return {
132
+ crossAxis: stringOffset,
133
+ };
134
+ }
135
+ let dimension;
136
+ if (placement == 'bottom' || placement == 'bottom-start' || placement == 'bottom-end' ||
137
+ placement == 'top' || placement == 'top-start' || placement == 'top-end') {
138
+ dimension = floating.width;
139
+ }
140
+ else {
141
+ dimension = floating.height;
142
+ }
143
+ switch (stringOffset) {
144
+ default:
145
+ {
146
+ dimension = 0;
147
+ break;
148
+ }
149
+ case PositionOffset[PositionOffset.Full]:
150
+ {
151
+ break;
152
+ }
153
+ case PositionOffset[PositionOffset.Half]:
154
+ {
155
+ dimension /= 2;
156
+ break;
157
+ }
158
+ case PositionOffset[PositionOffset.NegativeFull]:
159
+ {
160
+ dimension *= -1;
161
+ break;
162
+ }
163
+ case PositionOffset[PositionOffset.NegativeHalf]:
164
+ {
165
+ dimension *= -.5;
166
+ break;
167
+ }
168
+ }
169
+ return {
170
+ crossAxis: dimension
171
+ };
172
+ }));
155
173
  }
156
174
  /**
157
175
  * Gets floating ui placement from position placement
@@ -211,9 +229,9 @@ export class FloatingUiDomPosition {
211
229
  }
212
230
  }
213
231
  }
214
- FloatingUiDomPosition.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: FloatingUiDomPosition, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
215
- FloatingUiDomPosition.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: FloatingUiDomPosition });
216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: FloatingUiDomPosition, decorators: [{
232
+ FloatingUiDomPosition.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FloatingUiDomPosition, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
233
+ FloatingUiDomPosition.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FloatingUiDomPosition });
234
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FloatingUiDomPosition, decorators: [{
217
235
  type: Injectable
218
236
  }] });
219
237
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"floatingUiDomPosition.service.js","sourceRoot":"","sources":["../../../../floating-ui/src/services/floatingUiDomPosition.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAAC,MAAM,eAAe,CAAC;AACxD,OAAO,EAA4C,cAAc,EAAE,iBAAiB,EAAqB,QAAQ,EAAC,MAAM,eAAe,CAAC;AACxI,OAAO,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAC,eAAe,EAAa,UAAU,EAAc,MAAM,EAAE,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAClG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,CAAC;iBACrB;YACD,KAAK,iBAAiB,CAAC,KAAK;gBAC5B;oBACI,OAAO,OAAO,CAAC;iBAClB;YACD,KAAK,iBAAiB,CAAC,UAAU;gBACjC;oBACI,OAAO,aAAa,CAAC;iBACxB;YACD,KAAK,iBAAiB,CAAC,QAAQ;gBAC/B;oBACI,OAAO,WAAW,CAAC;iBACtB;SACJ;IACL,CAAC;;kHAxPQ,qBAAqB;sHAArB,qBAAqB;2FAArB,qBAAqB;kBADjC,UAAU;;AA4PX;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GACjC;IACI,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,qBAAqB;CAClC,CAAC","sourcesContent":["import {ClassProvider, Injectable} from '@angular/core';\nimport {Position, PositionResult, PositionOptions, PositionOffset, PositionPlacement, AutoUpdateOptions, POSITION} from '@anglr/common';\nimport {extend, isEmptyObject} from '@jscrpt/common';\nimport {computePosition, Placement, autoUpdate, Middleware, offset, flip} from '@floating-ui/dom';\nimport {Observable} from 'rxjs';\n\n/**\n * Default options for `FloatingUiDomPosition` implementation\n */\nconst defaultOptions: PositionOptions =\n{\n autoUpdate: false,\n flip: false,\n offset: PositionOffset.None,\n placement: PositionPlacement.Top\n};\n\n/**\n * Service that is used for positioning two elements against each other, using floating-ui dom implementation\n */\n@Injectable()\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>): 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\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): 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): void\n {\n if(options.offset != PositionOffset.None)\n {\n if(options.offset == 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.TopStart;\n }\n }\n\n middlewares.push(offset(({floating, placement}) =>\n {\n if(options.offset == PositionOffset.MouseEnter && options.mouseEvent)\n {\n return {\n crossAxis: options.mouseEvent.x - (options.mouseEvent.target as HTMLElement).getBoundingClientRect().x\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.width;\n }\n else\n {\n dimension = floating.height;\n }\n\n switch(options.offset)\n {\n default:\n {\n dimension = 0;\n\n break;\n }\n case PositionOffset.Full:\n {\n break;\n }\n case PositionOffset.Half:\n {\n dimension /= 2;\n\n break;\n }\n case PositionOffset.NegativeFull:\n {\n dimension *= -1;\n\n break;\n }\n case PositionOffset.NegativeHalf:\n {\n dimension *= -.5;\n\n break;\n }\n }\n\n return {\n crossAxis: dimension\n };\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): 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\n/**\n * Provider for floating ui position implementation\n */\nexport const FLOATING_UI_POSITION: ClassProvider =\n{\n provide: POSITION,\n useClass: FloatingUiDomPosition\n};"]}
1
+ {"version":3,"file":"floatingUiDomPosition.service.js","sourceRoot":"","sources":["../../../../floating-ui/src/services/floatingUiDomPosition.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAAC,MAAM,eAAe,CAAC;AACxD,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AU;;AAuRX;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GACjC;IACI,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,qBAAqB;CAClC,CAAC","sourcesContent":["import {ClassProvider, Injectable} from '@angular/core';\nimport {Position, PositionResult, PositionOptions, PositionOffset, PositionPlacement, AutoUpdateOptions, POSITION, PositionOffsetString, PositionOffsets} from '@anglr/common';\nimport {extend, isEmptyObject, isFunction, isJsObject, isNumber, nameof} from '@jscrpt/common';\nimport {computePosition, Placement, autoUpdate, Middleware, offset, flip} from '@floating-ui/dom';\nimport {Observable} from 'rxjs';\n\n/**\n * Default options for `FloatingUiDomPosition` implementation\n */\nconst defaultOptions: PositionOptions =\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()\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>): 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\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): 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): 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.TopStart;\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;\n\n if(options.offset === PositionOffset[PositionOffset.MouseEnter] && options.mouseEvent)\n {\n return {\n crossAxis: options.mouseEvent.x - (options.mouseEvent.target as HTMLElement).getBoundingClientRect().x\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.width;\n }\n else\n {\n dimension = floating.height;\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): 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\n/**\n * Provider for floating ui position implementation\n */\nexport const FLOATING_UI_POSITION: ClassProvider =\n{\n provide: POSITION,\n useClass: FloatingUiDomPosition\n};"]}
@@ -25,12 +25,12 @@ export class DefaultValidationErrorsComponent {
25
25
  this._changeDetector.detectChanges();
26
26
  }
27
27
  }
28
- DefaultValidationErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DefaultValidationErrorsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
29
- DefaultValidationErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: DefaultValidationErrorsComponent, selector: "default-validation-errors", host: { properties: { "@animateChildren": "this.animate" } }, ngImport: i0, template: "<div [ngClass]=\"options?.wrapperDivClass\" *ngIf=\"errors?.errorMessages?.length\" @slideInOut>\n <div *ngFor=\"let error of errors?.errorMessages\">{{error}}</div>\n</div>", styles: [":host\n{\n display: contents;\n}"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
28
+ DefaultValidationErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DefaultValidationErrorsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
29
+ DefaultValidationErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: DefaultValidationErrorsComponent, selector: "default-validation-errors", host: { properties: { "@animateChildren": "this.animate" } }, ngImport: i0, template: "<div [ngClass]=\"options?.wrapperDivClass\" *ngIf=\"errors?.errorMessages?.length\" @slideInOut>\n <div *ngFor=\"let error of errors?.errorMessages\">{{error}}</div>\n</div>", styles: [":host\n{\n display: contents;\n}"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
30
30
  slideInOutTrigger,
31
31
  animateChildrenTrigger
32
32
  ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DefaultValidationErrorsComponent, decorators: [{
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DefaultValidationErrorsComponent, decorators: [{
34
34
  type: Component,
35
35
  args: [{ selector: 'default-validation-errors', animations: [
36
36
  slideInOutTrigger,
@@ -66,9 +66,9 @@ export class DefaultValidationErrorsContainerComponent {
66
66
  }
67
67
  }
68
68
  }
69
- DefaultValidationErrorsContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DefaultValidationErrorsContainerComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
70
- DefaultValidationErrorsContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: DefaultValidationErrorsContainerComponent, selector: "default-validation-errors-container", ngImport: i0, template: '', isInline: true, styles: [":host\n{\n display: contents;\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
71
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DefaultValidationErrorsContainerComponent, decorators: [{
69
+ DefaultValidationErrorsContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DefaultValidationErrorsContainerComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
70
+ DefaultValidationErrorsContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: DefaultValidationErrorsContainerComponent, selector: "default-validation-errors-container", ngImport: i0, template: '', isInline: true, styles: [":host\n{\n display: contents;\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
71
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DefaultValidationErrorsContainerComponent, decorators: [{
72
72
  type: Component,
73
73
  args: [{ selector: 'default-validation-errors-container', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host\n{\n display: contents;\n}"] }]
74
74
  }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
@@ -63,9 +63,9 @@ export class ReservedSpaceValidationErrorsContainerComponent {
63
63
  }
64
64
  }
65
65
  }
66
- ReservedSpaceValidationErrorsContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ReservedSpaceValidationErrorsContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
67
- ReservedSpaceValidationErrorsContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: ReservedSpaceValidationErrorsContainerComponent, selector: "reserved-space-validation-errors-container", viewQueries: [{ propertyName: "viewContainer", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div>\n <ng-container #container></ng-container>\n</div>", styles: [":host\n{\n display: contents;\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ReservedSpaceValidationErrorsContainerComponent, decorators: [{
66
+ ReservedSpaceValidationErrorsContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ReservedSpaceValidationErrorsContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
67
+ ReservedSpaceValidationErrorsContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: ReservedSpaceValidationErrorsContainerComponent, selector: "reserved-space-validation-errors-container", viewQueries: [{ propertyName: "viewContainer", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div>\n <ng-container #container></ng-container>\n</div>", styles: [":host\n{\n display: contents;\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ReservedSpaceValidationErrorsContainerComponent, decorators: [{
69
69
  type: Component,
70
70
  args: [{ selector: 'reserved-space-validation-errors-container', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>\n <ng-container #container></ng-container>\n</div>", styles: [":host\n{\n display: contents;\n}"] }]
71
71
  }], propDecorators: { viewContainer: [{
@@ -61,9 +61,9 @@ export class GroupHasErrorDirective {
61
61
  }
62
62
  }
63
63
  }
64
- GroupHasErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: GroupHasErrorDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
65
- GroupHasErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: GroupHasErrorDirective, selector: "[groupHasError]", ngImport: i0 });
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: GroupHasErrorDirective, decorators: [{
64
+ GroupHasErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: GroupHasErrorDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
65
+ GroupHasErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: GroupHasErrorDirective, selector: "[groupHasError]", ngImport: i0 });
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: GroupHasErrorDirective, decorators: [{
67
67
  type: Directive,
68
68
  args: [{
69
69
  selector: '[groupHasError]'
@@ -7,15 +7,15 @@ import * as i0 from "@angular/core";
7
7
  */
8
8
  export class GroupHasErrorContainerDirective extends GroupHasErrorDirective {
9
9
  }
10
- GroupHasErrorContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: GroupHasErrorContainerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
11
- GroupHasErrorContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: GroupHasErrorContainerDirective, selector: "[groupHasErrorContainer]", providers: [
10
+ GroupHasErrorContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: GroupHasErrorContainerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
11
+ GroupHasErrorContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: GroupHasErrorContainerDirective, selector: "[groupHasErrorContainer]", providers: [
12
12
  {
13
13
  provide: GroupHasErrorDirective,
14
14
  useExisting: GroupHasErrorContainerDirective
15
15
  },
16
16
  ValidationErrorsContainerView
17
17
  ], usesInheritance: true, ngImport: i0 });
18
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: GroupHasErrorContainerDirective, decorators: [{
18
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: GroupHasErrorContainerDirective, decorators: [{
19
19
  type: Directive,
20
20
  args: [{
21
21
  selector: '[groupHasErrorContainer]',
@@ -149,15 +149,15 @@ export class HasErrorDirective {
149
149
  });
150
150
  }
151
151
  }
152
- HasErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: HasErrorDirective, deps: [{ token: i0.ElementRef }, { token: i1.ValidationErrorRendererFactory }, { token: i0.ViewContainerRef }, { token: i2.GroupHasErrorDirective, optional: true, skipSelf: true }, { token: i3.FormControlDirective, optional: true }, { token: i3.FormControlName, optional: true }, { token: i3.NgModel, optional: true }, { token: i4.SubmittedService, optional: true }, { token: i5.ValidationErrorsContainerView, optional: true }, { token: STRING_LOCALIZATION }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
153
- HasErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: HasErrorDirective, selector: "[hasError]", inputs: { errorMessages: "errorMessages", errorsComponent: "errorsComponent", errorsTemplate: "errorsTemplate" }, ngImport: i0 });
152
+ HasErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: HasErrorDirective, deps: [{ token: i0.ElementRef }, { token: i1.ValidationErrorRendererFactory }, { token: i0.ViewContainerRef }, { token: i2.GroupHasErrorDirective, optional: true, skipSelf: true }, { token: i3.FormControlDirective, optional: true }, { token: i3.FormControlName, optional: true }, { token: i3.NgModel, optional: true }, { token: i4.SubmittedService, optional: true }, { token: i5.ValidationErrorsContainerView, optional: true }, { token: STRING_LOCALIZATION }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
153
+ HasErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: HasErrorDirective, selector: "[hasError]", inputs: { errorMessages: "errorMessages", errorsComponent: "errorsComponent", errorsTemplate: "errorsTemplate" }, ngImport: i0 });
154
154
  __decorate([
155
155
  BindThis,
156
156
  __metadata("design:type", Function),
157
157
  __metadata("design:paramtypes", [Function, Function, Boolean]),
158
158
  __metadata("design:returntype", void 0)
159
159
  ], HasErrorDirective.prototype, "_isSubmittedOrDirty", null);
160
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: HasErrorDirective, decorators: [{
160
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: HasErrorDirective, decorators: [{
161
161
  type: Directive,
162
162
  args: [{
163
163
  selector: '[hasError]'
@@ -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,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAqB,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAiB,IAAI,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AACxK,OAAO,EAAC,oBAAoB,EAAE,eAAe,EAAe,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAAqB,mBAAmB,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAmB,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,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,qEAAqE;AAErE;;GAEG;AAKH,MAAM,OAAO,iBAAiB;IAkE1B,iEAAiE;IACjE,YAAoB,QAAiC,EACjC,gBAAgD,EAChD,cAAgC,EACR,cAAsC,EAClD,YAAkC,EAClC,gBAAiC,EACjC,QAAiB,EACjB,aAA+B,EAC/B,cAA6C,EAC1B,mBAAuC,EACpE,SAAmB;QAVrB,aAAQ,GAAR,QAAQ,CAAyB;QACjC,qBAAgB,GAAhB,gBAAgB,CAAgC;QAChD,mBAAc,GAAd,cAAc,CAAkB;QACR,mBAAc,GAA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V;oBACI,QAAQ,EAAE,YAAY;iBACzB;;0BAuEgB,QAAQ;;0BAAI,QAAQ;;0BACpB,QAAQ;;0BACR,QAAQ;;0BACR,QAAQ;;0BACR,QAAQ;;0BACR,QAAQ;;0BACR,MAAM;2BAAC,mBAAmB;mEAxBhC,aAAa;sBADnB,KAAK;gBAOC,eAAe;sBADrB,KAAK;gBAOC,cAAc;sBADpB,KAAK;gBAoHE,mBAAmB","sourcesContent":["import {Directive, ElementRef, Optional, SkipSelf, OnInit, OnDestroy, Inject, Input, Injector, ViewContainerRef, AfterViewInit, Type, TemplateRef} from '@angular/core';\nimport {FormControlDirective, FormControlName, FormControl, NgModel} from '@angular/forms';\nimport {StringLocalization, STRING_LOCALIZATION} from '@anglr/common';\nimport {generateId, BindThis, StringDictionary} from '@jscrpt/common';\nimport {Subscription} 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]'\n})\nexport class HasErrorDirective implements OnInit, AfterViewInit, OnDestroy\n{\n //######################### private fields #########################\n\n /**\n * Subscriptions that are destroyed with destruction of this directive\n */\n private _subscriptions: Subscription = new Subscription();\n\n /**\n * Unique generated id of control\n */\n private _id: string = generateId(10);\n\n /**\n * Last value of control pristine attribute\n */\n private _previousDirty: boolean = false;\n\n /**\n * Indication whether currently are any errors rendered\n */\n private _hasErrors: boolean = false;\n\n /**\n * Mutation observer used for observing changes on class of element\n */\n private _observer: MutationObserver;\n\n //######################### private properties #########################\n\n /**\n * Gets control which was assigned to this element\n */\n private 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(private _element: ElementRef<HTMLElement>,\n private _rendererFactory: ValidationErrorRendererFactory,\n private _viewContainer: ViewContainerRef,\n @Optional() @SkipSelf() private _groupHasError: GroupHasErrorDirective,\n @Optional() private _formControl: FormControlDirective,\n @Optional() private _formControlName: FormControlName,\n @Optional() private _ngModel: NgModel,\n @Optional() private _submittedSvc: SubmittedService,\n @Optional() private _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._registerMutationObserver();\n\n this._subscriptions.add(this._stringLocalization.textsChange.subscribe(() => this._updateStatus()));\n this._subscriptions.add(this.control.statusChanges.subscribe(() => this._updateStatus()));\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._observer?.disconnect();\n this.renderer?.destroy();\n }\n\n //######################### private methods #########################\n\n /**\n * Updates status of control and css classes\n */\n private _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 private _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 private _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\n /**\n * Registers mutation observer which watch for changes of class list\n */\n private _registerMutationObserver(): void\n {\n this._observer = new MutationObserver(() =>\n {\n if(this.control.dirty != this._previousDirty)\n {\n this._updateStatus();\n }\n });\n\n this._observer.observe(this._element.nativeElement, \n {\n attributeFilter: ['class'],\n attributes: true\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,UAAU,EAAE,QAAQ,EAAE,QAAQ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estroy, Inject, Input, Injector, ViewContainerRef, AfterViewInit, Type, TemplateRef} from '@angular/core';\nimport {FormControlDirective, FormControlName, FormControl, NgModel} from '@angular/forms';\nimport {StringLocalization, STRING_LOCALIZATION} from '@anglr/common';\nimport {generateId, BindThis, StringDictionary} from '@jscrpt/common';\nimport {Subscription} 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]'\n})\nexport class HasErrorDirective implements OnInit, AfterViewInit, OnDestroy\n{\n //######################### private fields #########################\n\n /**\n * Subscriptions that are destroyed with destruction of this directive\n */\n private _subscriptions: Subscription = new Subscription();\n\n /**\n * Unique generated id of control\n */\n private _id: string = generateId(10);\n\n /**\n * Last value of control pristine attribute\n */\n private _previousDirty: boolean = false;\n\n /**\n * Indication whether currently are any errors rendered\n */\n private _hasErrors: boolean = false;\n\n /**\n * Mutation observer used for observing changes on class of element\n */\n private _observer: MutationObserver;\n\n //######################### private properties #########################\n\n /**\n * Gets control which was assigned to this element\n */\n private 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(private _element: ElementRef<HTMLElement>,\n private _rendererFactory: ValidationErrorRendererFactory,\n private _viewContainer: ViewContainerRef,\n @Optional() @SkipSelf() private _groupHasError: GroupHasErrorDirective,\n @Optional() private _formControl: FormControlDirective,\n @Optional() private _formControlName: FormControlName,\n @Optional() private _ngModel: NgModel,\n @Optional() private _submittedSvc: SubmittedService,\n @Optional() private _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._registerMutationObserver();\n\n this._subscriptions.add(this._stringLocalization.textsChange.subscribe(() => this._updateStatus()));\n this._subscriptions.add(this.control.statusChanges.subscribe(() => this._updateStatus()));\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._observer?.disconnect();\n this.renderer?.destroy();\n }\n\n //######################### private methods #########################\n\n /**\n * Updates status of control and css classes\n */\n private _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 private _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 private _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\n /**\n * Registers mutation observer which watch for changes of class list\n */\n private _registerMutationObserver(): void\n {\n this._observer = new MutationObserver(() =>\n {\n if(this.control.dirty != this._previousDirty)\n {\n this._updateStatus();\n }\n });\n\n this._observer.observe(this._element.nativeElement, \n {\n attributeFilter: ['class'],\n attributes: true\n });\n }\n}"]}
@@ -47,9 +47,9 @@ export class MaxValueNumberValidatorDirective {
47
47
  return this._validator(control);
48
48
  }
49
49
  }
50
- MaxValueNumberValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MaxValueNumberValidatorDirective, deps: [{ token: 'maxValue', attribute: true }], target: i0.ɵɵFactoryTarget.Directive });
51
- MaxValueNumberValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: MaxValueNumberValidatorDirective, selector: "input[number][maxValue][formControlName],input[number][maxValue][formControl],input[number][maxValue][ngModel]", inputs: { maxValue: "maxValue" }, providers: [MAX_NUMBER_VALIDATOR], usesOnChanges: true, ngImport: i0 });
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MaxValueNumberValidatorDirective, decorators: [{
50
+ MaxValueNumberValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MaxValueNumberValidatorDirective, deps: [{ token: 'maxValue', attribute: true }], target: i0.ɵɵFactoryTarget.Directive });
51
+ MaxValueNumberValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: MaxValueNumberValidatorDirective, selector: "input[number][maxValue][formControlName],input[number][maxValue][formControl],input[number][maxValue][ngModel]", inputs: { maxValue: "maxValue" }, providers: [MAX_NUMBER_VALIDATOR], usesOnChanges: true, ngImport: i0 });
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MaxValueNumberValidatorDirective, decorators: [{
53
53
  type: Directive,
54
54
  args: [{
55
55
  selector: 'input[number][maxValue][formControlName],input[number][maxValue][formControl],input[number][maxValue][ngModel]',
@@ -47,9 +47,9 @@ export class MinValueNumberValidatorDirective {
47
47
  return this._validator(control);
48
48
  }
49
49
  }
50
- MinValueNumberValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MinValueNumberValidatorDirective, deps: [{ token: 'minValue', attribute: true }], target: i0.ɵɵFactoryTarget.Directive });
51
- MinValueNumberValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: MinValueNumberValidatorDirective, selector: "input[number][minValue][formControlName],input[number][minValue][formControl],input[number][minValue][ngModel]", inputs: { minValue: "minValue" }, providers: [MIN_NUMBER_VALIDATOR], usesOnChanges: true, ngImport: i0 });
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MinValueNumberValidatorDirective, decorators: [{
50
+ MinValueNumberValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MinValueNumberValidatorDirective, deps: [{ token: 'minValue', attribute: true }], target: i0.ɵɵFactoryTarget.Directive });
51
+ MinValueNumberValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: MinValueNumberValidatorDirective, selector: "input[number][minValue][formControlName],input[number][minValue][formControl],input[number][minValue][ngModel]", inputs: { minValue: "minValue" }, providers: [MIN_NUMBER_VALIDATOR], usesOnChanges: true, ngImport: i0 });
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MinValueNumberValidatorDirective, decorators: [{
53
53
  type: Directive,
54
54
  args: [{
55
55
  selector: 'input[number][minValue][formControlName],input[number][minValue][formControl],input[number][minValue][ngModel]',
@@ -67,9 +67,9 @@ export class NumberInputControlValueAccessor {
67
67
  this.disabled = isDisabled;
68
68
  }
69
69
  }
70
- NumberInputControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NumberInputControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
71
- NumberInputControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: NumberInputControlValueAccessor, selector: "input[number][formControlName],input[number][formControl],input[number][ngModel]", host: { listeners: { "change": "onChange($event.target.value)", "input": "onChange($event.target.value)", "blur": "onTouched()" }, properties: { "disabled": "disabled" } }, providers: [NUMBER_INPUT_VALUE_ACCESSOR], ngImport: i0 });
72
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NumberInputControlValueAccessor, decorators: [{
70
+ NumberInputControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NumberInputControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
71
+ NumberInputControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: NumberInputControlValueAccessor, selector: "input[number][formControlName],input[number][formControl],input[number][ngModel]", host: { listeners: { "change": "onChange($event.target.value)", "input": "onChange($event.target.value)", "blur": "onTouched()" }, properties: { "disabled": "disabled" } }, providers: [NUMBER_INPUT_VALUE_ACCESSOR], ngImport: i0 });
72
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NumberInputControlValueAccessor, decorators: [{
73
73
  type: Directive,
74
74
  args: [{
75
75
  selector: 'input[number][formControlName],input[number][formControl],input[number][ngModel]',
@@ -24,9 +24,9 @@ export class NumberInputValidatorDirective {
24
24
  return Validators.number(control);
25
25
  }
26
26
  }
27
- NumberInputValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NumberInputValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
28
- NumberInputValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: NumberInputValidatorDirective, selector: "input[number][formControlName],input[number][formControl],input[number][ngModel]", providers: [NUMBER_VALIDATOR], ngImport: i0 });
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NumberInputValidatorDirective, decorators: [{
27
+ NumberInputValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NumberInputValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
28
+ NumberInputValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: NumberInputValidatorDirective, selector: "input[number][formControlName],input[number][formControl],input[number][ngModel]", providers: [NUMBER_VALIDATOR], ngImport: i0 });
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NumberInputValidatorDirective, decorators: [{
30
30
  type: Directive,
31
31
  args: [{
32
32
  selector: 'input[number][formControlName],input[number][formControl],input[number][ngModel]',