@anglr/common 20.0.0-beta.20240529082303 → 20.0.0-beta.20240530103148

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 (326) hide show
  1. package/changelog.md +66 -0
  2. package/es2022/date-fns/src/misc/utils.js.map +1 -1
  3. package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js +3 -3
  4. package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -1
  5. package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +14 -24
  6. package/es2022/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js.map +1 -1
  7. package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +4 -24
  8. package/es2022/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js.map +1 -1
  9. package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +4 -28
  10. package/es2022/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js.map +1 -1
  11. package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js +14 -14
  12. package/es2022/forms/src/directives/groupHasError/groupHasError.directive.js.map +1 -1
  13. package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +5 -4
  14. package/es2022/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js.map +1 -1
  15. package/es2022/forms/src/directives/hasError/hasError.directive.js +72 -111
  16. package/es2022/forms/src/directives/hasError/hasError.directive.js.map +1 -1
  17. package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +7 -21
  18. package/es2022/forms/src/directives/numberInput/maxValueNumberValidator.directive.js.map +1 -1
  19. package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js +7 -21
  20. package/es2022/forms/src/directives/numberInput/minValueNumberValidator.directive.js.map +1 -1
  21. package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +13 -15
  22. package/es2022/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js.map +1 -1
  23. package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js +3 -3
  24. package/es2022/forms/src/directives/numberInput/numberInputValidator.directive.js.map +1 -1
  25. package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js +32 -27
  26. package/es2022/forms/src/directives/requiredClass/requiredClass.directive.js.map +1 -1
  27. package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +5 -4
  28. package/es2022/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js.map +1 -1
  29. package/es2022/forms/src/index.js +0 -1
  30. package/es2022/forms/src/index.js.map +1 -1
  31. package/es2022/forms/src/misc/formModel/decorators/formGroupAsyncValidator.decorator.js.map +1 -1
  32. package/es2022/forms/src/misc/formModel/decorators/formGroupValidator.decorator.js.map +1 -1
  33. package/es2022/forms/src/misc/formModel/decorators/invalidateOnChange.decorator.js.map +1 -1
  34. package/es2022/forms/src/misc/formModel/decorators/modelPropertyMetadata.decorator.js.map +1 -1
  35. package/es2022/forms/src/misc/formModel/decorators/requiredIf.decorator.js.map +1 -1
  36. package/es2022/forms/src/misc/formModel/misc/currentValue.js +0 -1
  37. package/es2022/forms/src/misc/formModel/misc/currentValue.js.map +1 -1
  38. package/es2022/forms/src/misc/formModel/misc/utils.js.map +1 -1
  39. package/es2022/forms/src/misc/formModel/misc/validatorFactories.js +0 -4
  40. package/es2022/forms/src/misc/formModel/misc/validatorFactories.js.map +1 -1
  41. package/es2022/forms/src/misc/utils.js.map +1 -1
  42. package/es2022/forms/src/misc/validationErrorsContainerView.js +7 -9
  43. package/es2022/forms/src/misc/validationErrorsContainerView.js.map +1 -1
  44. package/es2022/forms/src/misc/validators.js.map +1 -1
  45. package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +7 -29
  46. package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js.map +1 -1
  47. package/es2022/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js +8 -20
  48. package/es2022/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js.map +1 -1
  49. package/es2022/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js +3 -4
  50. package/es2022/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js.map +1 -1
  51. package/es2022/forms/src/modules/errorMessage/modules/errorMessage.module.js +6 -6
  52. package/es2022/forms/src/modules/errorMessage/modules/errorMessage.module.js.map +1 -1
  53. package/es2022/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js +3 -4
  54. package/es2022/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js.map +1 -1
  55. package/es2022/forms/src/modules/formPipes/modules/formPipes.module.js +5 -5
  56. package/es2022/forms/src/modules/formPipes/modules/formPipes.module.js.map +1 -1
  57. package/es2022/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js +3 -4
  58. package/es2022/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js.map +1 -1
  59. package/es2022/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js +3 -4
  60. package/es2022/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js.map +1 -1
  61. package/es2022/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js +3 -4
  62. package/es2022/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js.map +1 -1
  63. package/es2022/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js +3 -3
  64. package/es2022/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js.map +1 -1
  65. package/es2022/forms/src/modules/hasError.module.js +6 -17
  66. package/es2022/forms/src/modules/hasError.module.js.map +1 -1
  67. package/es2022/forms/src/modules/numberInput.module.js +5 -5
  68. package/es2022/forms/src/modules/numberInput.module.js.map +1 -1
  69. package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +3 -10
  70. package/es2022/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js.map +1 -1
  71. package/es2022/forms/src/services/formModelBuilder/formModelBuilder.service.js +3 -4
  72. package/es2022/forms/src/services/formModelBuilder/formModelBuilder.service.js.map +1 -1
  73. package/es2022/forms/src/services/submitted/submitted.service.js +14 -12
  74. package/es2022/forms/src/services/submitted/submitted.service.js.map +1 -1
  75. package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +3 -24
  76. package/es2022/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js.map +1 -1
  77. package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js +18 -21
  78. package/es2022/hotkeys/src/components/cheatSheet/cheatSheet.component.js.map +1 -1
  79. package/es2022/hotkeys/src/services/appHotkeys.service.js +20 -26
  80. package/es2022/hotkeys/src/services/appHotkeys.service.js.map +1 -1
  81. package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js +3 -10
  82. package/es2022/material/src/components/confirmationDialog/confirmationDialog.component.js.map +1 -1
  83. package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js +3 -3
  84. package/es2022/material/src/components/movableTitledDialog/movableTitledDialog.component.js.map +1 -1
  85. package/es2022/material/src/components/titledDialog/titledDialog.component.js +3 -10
  86. package/es2022/material/src/components/titledDialog/titledDialog.component.js.map +1 -1
  87. package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js +37 -38
  88. package/es2022/material/src/directives/confirmationDialog/confirmationDialog.directive.js.map +1 -1
  89. package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +10 -16
  90. package/es2022/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js.map +1 -1
  91. package/es2022/material/src/modules/confirmationDialog.module.js +6 -6
  92. package/es2022/material/src/modules/confirmationDialog.module.js.map +1 -1
  93. package/es2022/material/src/modules/debugDataCopyClick.module.js +5 -5
  94. package/es2022/material/src/modules/debugDataCopyClick.module.js.map +1 -1
  95. package/es2022/material/src/modules/movableTitledDialog.module.js +6 -6
  96. package/es2022/material/src/modules/movableTitledDialog.module.js.map +1 -1
  97. package/es2022/material/src/modules/titledDialog.module.js +6 -6
  98. package/es2022/material/src/modules/titledDialog.module.js.map +1 -1
  99. package/es2022/material/src/services/titledDialog/titledDialog.service.js +3 -5
  100. package/es2022/material/src/services/titledDialog/titledDialog.service.js.map +1 -1
  101. package/es2022/material/src/services/titledDialog/titledDialogService.options.js +5 -5
  102. package/es2022/material/src/services/titledDialog/titledDialogService.options.js.map +1 -1
  103. package/es2022/moment/src/misc/utils.js.map +1 -1
  104. package/es2022/moment/src/modules/moment.module.js +5 -5
  105. package/es2022/moment/src/modules/moment.module.js.map +1 -1
  106. package/es2022/moment/src/pipes/momentConvert/momentConvert.pipe.js +3 -3
  107. package/es2022/moment/src/pipes/momentConvert/momentConvert.pipe.js.map +1 -1
  108. package/es2022/moment/src/pipes/momentFormat/momentFormat.pipe.js +3 -3
  109. package/es2022/moment/src/pipes/momentFormat/momentFormat.pipe.js.map +1 -1
  110. package/es2022/router/src/decorators/componentRedirectRoute.decorator.js.map +1 -1
  111. package/es2022/router/src/decorators/componentRoute.decorator.js.map +1 -1
  112. package/es2022/router/src/decorators/moduleRoutes.decorator.js.map +1 -1
  113. package/es2022/router/src/misc/utils.js.map +1 -1
  114. package/es2022/router/src/services/routing/dataRouter.js +16 -17
  115. package/es2022/router/src/services/routing/dataRouter.js.map +1 -1
  116. package/es2022/router/src/services/routing/dataRouterData.js +3 -8
  117. package/es2022/router/src/services/routing/dataRouterData.js.map +1 -1
  118. package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js +20 -22
  119. package/es2022/src/components/collapsibleIcon/collapsibleIcon.component.js.map +1 -1
  120. package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js +18 -20
  121. package/es2022/src/components/collapsibleTitle/collapsibleTitle.component.js.map +1 -1
  122. package/es2022/src/decorators/asSignal/asSignal.decorator.js.map +1 -1
  123. package/es2022/src/decorators/componentHostStyle/componentHostStyle.decorator.js.map +1 -1
  124. package/es2022/src/decorators/typeProvider/typeProvider.decorator.js.map +1 -1
  125. package/es2022/src/directives/bodyRender/bodyRender.directive.js +4 -23
  126. package/es2022/src/directives/bodyRender/bodyRender.directive.js.map +1 -1
  127. package/es2022/src/directives/clickOutside/clickOutside.directive.js +27 -39
  128. package/es2022/src/directives/clickOutside/clickOutside.directive.js.map +1 -1
  129. package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js +33 -48
  130. package/es2022/src/directives/ellipsisTooltip/ellipsisTooltip.directive.js.map +1 -1
  131. package/es2022/src/directives/goBack/goBack.directive.js +4 -5
  132. package/es2022/src/directives/goBack/goBack.directive.js.map +1 -1
  133. package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +13 -27
  134. package/es2022/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js.map +1 -1
  135. package/es2022/src/directives/positionTo/positionTo.directive.js +20 -45
  136. package/es2022/src/directives/positionTo/positionTo.directive.js.map +1 -1
  137. package/es2022/src/modules/castPipes/modules/castPipes.module.js +5 -5
  138. package/es2022/src/modules/castPipes/modules/castPipes.module.js.map +1 -1
  139. package/es2022/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js +3 -3
  140. package/es2022/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js.map +1 -1
  141. package/es2022/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js +3 -3
  142. package/es2022/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js.map +1 -1
  143. package/es2022/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +3 -3
  144. package/es2022/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js.map +1 -1
  145. package/es2022/src/modules/castPipes/pipes/castType/castType.pipe.js +8 -9
  146. package/es2022/src/modules/castPipes/pipes/castType/castType.pipe.js.map +1 -1
  147. package/es2022/src/modules/commonDynamic.module.js +4 -4
  148. package/es2022/src/modules/commonDynamic.module.js.map +1 -1
  149. package/es2022/src/modules/commonLocalize.module.js +4 -4
  150. package/es2022/src/modules/commonLocalize.module.js.map +1 -1
  151. package/es2022/src/modules/commonUtils.module.js +21 -21
  152. package/es2022/src/modules/commonUtils.module.js.map +1 -1
  153. package/es2022/src/modules/debugData/components/debugData/debugData.component.js +3 -5
  154. package/es2022/src/modules/debugData/components/debugData/debugData.component.js.map +1 -1
  155. package/es2022/src/modules/debugData/modules/debugData.module.js +4 -4
  156. package/es2022/src/modules/debugData/modules/debugData.module.js.map +1 -1
  157. package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +10 -8
  158. package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js.map +1 -1
  159. package/es2022/src/modules/logger/components/console/console.component.js +16 -23
  160. package/es2022/src/modules/logger/components/console/console.component.js.map +1 -1
  161. package/es2022/src/modules/logger/decorators/loggerSink.decorator.js.map +1 -1
  162. package/es2022/src/modules/logger/misc/utils.js.map +1 -1
  163. package/es2022/src/modules/logger/services/console/consoleComponent.service.js +18 -16
  164. package/es2022/src/modules/logger/services/console/consoleComponent.service.js.map +1 -1
  165. package/es2022/src/modules/logger/services/console/consoleComponent.sink.js +7 -5
  166. package/es2022/src/modules/logger/services/console/consoleComponent.sink.js.map +1 -1
  167. package/es2022/src/modules/logger/services/console/consoleComponentService.options.js +8 -8
  168. package/es2022/src/modules/logger/services/console/consoleComponentService.options.js.map +1 -1
  169. package/es2022/src/modules/logger/services/developmentConsoleSink/developmentConsole.sink.js.map +1 -1
  170. package/es2022/src/modules/logger/services/logLevelEnricher/logLevelEnricher.enricher.js.map +1 -1
  171. package/es2022/src/modules/logger/services/logger/logger.service.js +3 -4
  172. package/es2022/src/modules/logger/services/logger/logger.service.js.map +1 -1
  173. package/es2022/src/modules/logger/services/rest/rest.sink.js +17 -21
  174. package/es2022/src/modules/logger/services/rest/rest.sink.js.map +1 -1
  175. package/es2022/src/modules/logger/services/rest/restSink.options.js +16 -16
  176. package/es2022/src/modules/logger/services/rest/restSink.options.js.map +1 -1
  177. package/es2022/src/modules/logger/services/subLoggerSink/subLogger.sink.js +0 -1
  178. package/es2022/src/modules/logger/services/subLoggerSink/subLogger.sink.js.map +1 -1
  179. package/es2022/src/modules/logger/types/loggerConfiguration.js +8 -17
  180. package/es2022/src/modules/logger/types/loggerConfiguration.js.map +1 -1
  181. package/es2022/src/modules/logger/types/loggerOptions.js +30 -28
  182. package/es2022/src/modules/logger/types/loggerOptions.js.map +1 -1
  183. package/es2022/src/modules/logger/types/messageLog.js +5 -18
  184. package/es2022/src/modules/logger/types/messageLog.js.map +1 -1
  185. package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js +33 -46
  186. package/es2022/src/modules/multiButton/components/multiButton/multiButton.component.js.map +1 -1
  187. package/es2022/src/modules/multiButton/modules/multiButton.module.js +4 -4
  188. package/es2022/src/modules/multiButton/modules/multiButton.module.js.map +1 -1
  189. package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +9 -21
  190. package/es2022/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js.map +1 -1
  191. package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +7 -45
  192. package/es2022/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js.map +1 -1
  193. package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js +3 -4
  194. package/es2022/src/modules/progressIndicator/interceptors/progressInterceptor.js.map +1 -1
  195. package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js +6 -6
  196. package/es2022/src/modules/progressIndicator/modules/progressIndicator.module.js.map +1 -1
  197. package/es2022/src/modules/progressIndicator/services/progressIndicator.service.js +29 -30
  198. package/es2022/src/modules/progressIndicator/services/progressIndicator.service.js.map +1 -1
  199. package/es2022/src/modules/progressIndicator/services/progressIndicatorOptions.js +9 -9
  200. package/es2022/src/modules/progressIndicator/services/progressIndicatorOptions.js.map +1 -1
  201. package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js +16 -31
  202. package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js.map +1 -1
  203. package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js +20 -77
  204. package/es2022/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +1 -1
  205. package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +3 -4
  206. package/es2022/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js.map +1 -1
  207. package/es2022/src/modules/tooltip/modules/tooltip.module.js +5 -5
  208. package/es2022/src/modules/tooltip/modules/tooltip.module.js.map +1 -1
  209. package/es2022/src/pipes/displayProperties/displayProperties.pipe.js +4 -4
  210. package/es2022/src/pipes/displayProperties/displayProperties.pipe.js.map +1 -1
  211. package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js +3 -3
  212. package/es2022/src/pipes/firstUppercase/firstUppercase.pipe.js.map +1 -1
  213. package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js +3 -18
  214. package/es2022/src/pipes/firstUppercaseLocalize/firstUppercaseLocalize.pipe.js.map +1 -1
  215. package/es2022/src/pipes/index.js +1 -0
  216. package/es2022/src/pipes/index.js.map +1 -1
  217. package/es2022/src/pipes/isNaN/isNaN.pipe.js +4 -4
  218. package/es2022/src/pipes/isNaN/isNaN.pipe.js.map +1 -1
  219. package/es2022/src/pipes/isPresent/isPresent.pipe.js +4 -4
  220. package/es2022/src/pipes/isPresent/isPresent.pipe.js.map +1 -1
  221. package/es2022/src/pipes/keys/keys.pipe.js +4 -4
  222. package/es2022/src/pipes/keys/keys.pipe.js.map +1 -1
  223. package/es2022/src/pipes/localize/localize.pipe.js +3 -10
  224. package/es2022/src/pipes/localize/localize.pipe.js.map +1 -1
  225. package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +3 -3
  226. package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js.map +1 -1
  227. package/es2022/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.js +8 -15
  228. package/es2022/src/pipes/numeral/numeral.pipe.js.map +1 -0
  229. package/es2022/src/pipes/trimText/trimText.pipe.js +3 -3
  230. package/es2022/src/pipes/trimText/trimText.pipe.js.map +1 -1
  231. package/es2022/src/pipes/urlEncode/urlEncode.pipe.js +4 -4
  232. package/es2022/src/pipes/urlEncode/urlEncode.pipe.js.map +1 -1
  233. package/es2022/src/services/cookies/cookies.service.js +8 -9
  234. package/es2022/src/services/cookies/cookies.service.js.map +1 -1
  235. package/es2022/src/services/notifications/defaultNotifications.service.js +24 -25
  236. package/es2022/src/services/notifications/defaultNotifications.service.js.map +1 -1
  237. package/es2022/src/services/notifications/notifications.interface.js +0 -3
  238. package/es2022/src/services/notifications/notifications.interface.js.map +1 -1
  239. package/es2022/src/services/notifications/notificationsOptions.js +5 -5
  240. package/es2022/src/services/notifications/notificationsOptions.js.map +1 -1
  241. package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js +3 -4
  242. package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js.map +1 -1
  243. package/es2022/src/services/position/position.interface.js.map +1 -1
  244. package/es2022/src/services/statusCode/statusCode.service.js +3 -8
  245. package/es2022/src/services/statusCode/statusCode.service.js.map +1 -1
  246. package/es2022/src/services/stringLocalization/noStringLocalization.service.js +10 -8
  247. package/es2022/src/services/stringLocalization/noStringLocalization.service.js.map +1 -1
  248. package/es2022/src/services/temporaryStorage/memoryTemporaryStorage.service.js +10 -8
  249. package/es2022/src/services/temporaryStorage/memoryTemporaryStorage.service.js.map +1 -1
  250. package/es2022/src/utils/index.js.map +1 -1
  251. package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js +3 -3
  252. package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js.map +1 -1
  253. package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +3 -3
  254. package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js.map +1 -1
  255. package/floating-ui/src/services/floatingUiDomPosition.service.d.ts +5 -5
  256. package/floating-ui/src/services/floatingUiDomPosition.service.d.ts.map +1 -1
  257. package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.d.ts +1 -1
  258. package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.d.ts.map +1 -1
  259. package/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.html +9 -3
  260. package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.d.ts +1 -1
  261. package/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.d.ts.map +1 -1
  262. package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.d.ts +1 -1
  263. package/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.d.ts.map +1 -1
  264. package/forms/src/directives/groupHasError/groupHasError.directive.d.ts +1 -1
  265. package/forms/src/directives/groupHasError/groupHasError.directive.d.ts.map +1 -1
  266. package/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.d.ts +1 -1
  267. package/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.d.ts.map +1 -1
  268. package/forms/src/directives/hasError/hasError.directive.d.ts +24 -32
  269. package/forms/src/directives/hasError/hasError.directive.d.ts.map +1 -1
  270. package/forms/src/directives/requiredClass/requiredClass.directive.d.ts +14 -12
  271. package/forms/src/directives/requiredClass/requiredClass.directive.d.ts.map +1 -1
  272. package/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.d.ts +1 -1
  273. package/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.d.ts.map +1 -1
  274. package/forms/src/index.d.ts +0 -1
  275. package/forms/src/index.d.ts.map +1 -1
  276. package/forms/src/modules/hasError.module.d.ts +1 -5
  277. package/forms/src/modules/hasError.module.d.ts.map +1 -1
  278. package/hotkeys/src/components/cheatSheet/cheatSheet.component.d.ts +3 -3
  279. package/hotkeys/src/components/cheatSheet/cheatSheet.component.d.ts.map +1 -1
  280. package/hotkeys/src/components/cheatSheet/cheatSheet.component.html +13 -7
  281. package/lerna.json +4 -0
  282. package/package.json +54 -57
  283. package/readme.md +0 -1
  284. package/router/src/decorators/moduleRoutes.decorator.d.ts.map +1 -1
  285. package/src/components/collapsibleIcon/collapsibleIcon.component.d.ts +3 -3
  286. package/src/components/collapsibleIcon/collapsibleIcon.component.d.ts.map +1 -1
  287. package/src/components/collapsibleTitle/collapsibleTitle.component.d.ts +3 -3
  288. package/src/components/collapsibleTitle/collapsibleTitle.component.d.ts.map +1 -1
  289. package/src/directives/bodyRender/bodyRender.directive.d.ts +3 -3
  290. package/src/directives/bodyRender/bodyRender.directive.d.ts.map +1 -1
  291. package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts +3 -3
  292. package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts.map +1 -1
  293. package/src/directives/goBack/goBack.directive.d.ts +3 -3
  294. package/src/directives/goBack/goBack.directive.d.ts.map +1 -1
  295. package/src/directives/positionTo/positionTo.directive.d.ts +2 -2
  296. package/src/directives/positionTo/positionTo.directive.d.ts.map +1 -1
  297. package/src/modules/commonUtils.module.d.ts +1 -1
  298. package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts +3 -3
  299. package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts.map +1 -1
  300. package/src/pipes/displayProperties/displayProperties.pipe.d.ts +3 -3
  301. package/src/pipes/displayProperties/displayProperties.pipe.d.ts.map +1 -1
  302. package/src/pipes/index.d.ts +1 -0
  303. package/src/pipes/index.d.ts.map +1 -1
  304. package/src/pipes/isNaN/isNaN.pipe.d.ts +3 -3
  305. package/src/pipes/isNaN/isNaN.pipe.d.ts.map +1 -1
  306. package/src/pipes/isPresent/isPresent.pipe.d.ts +3 -3
  307. package/src/pipes/isPresent/isPresent.pipe.d.ts.map +1 -1
  308. package/src/pipes/keys/keys.pipe.d.ts +3 -3
  309. package/src/pipes/keys/keys.pipe.d.ts.map +1 -1
  310. package/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.d.ts +4 -4
  311. package/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.d.ts.map +1 -1
  312. package/src/pipes/urlEncode/urlEncode.pipe.d.ts +3 -3
  313. package/src/pipes/urlEncode/urlEncode.pipe.d.ts.map +1 -1
  314. package/src/services/position/position.interface.d.ts +10 -10
  315. package/src/services/position/position.interface.d.ts.map +1 -1
  316. package/version.bak +1 -1
  317. package/es2022/forms/src/modules/requiredClass.module.js +0 -19
  318. package/es2022/forms/src/modules/requiredClass.module.js.map +0 -1
  319. package/es2022/numeral/src/index.js +0 -2
  320. package/es2022/numeral/src/index.js.map +0 -1
  321. package/es2022/numeral/src/pipes/numeral.pipe.js.map +0 -1
  322. package/forms/src/modules/requiredClass.module.d.ts +0 -11
  323. package/forms/src/modules/requiredClass.module.d.ts.map +0 -1
  324. package/numeral/package.json +0 -8
  325. package/numeral/src/index.d.ts +0 -2
  326. package/numeral/src/index.d.ts.map +0 -1
@@ -10,8 +10,6 @@ const ENABLED = 'enabled';
10
10
  * Component used for displaying debug data
11
11
  */
12
12
  export class DebugDataComponent {
13
- debugDataEnabledSvc;
14
- element;
15
13
  //######################### constructor #########################
16
14
  constructor(debugDataEnabledSvc, element) {
17
15
  this.debugDataEnabledSvc = debugDataEnabledSvc;
@@ -30,10 +28,10 @@ export class DebugDataComponent {
30
28
  this.element.nativeElement.classList.remove(ENABLED);
31
29
  }
32
30
  }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: DebugDataComponent, deps: [{ token: i1.DebugDataEnabledService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
34
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.5", type: DebugDataComponent, isStandalone: true, selector: "debug-data", ngImport: i0, template: "@if(debugDataEnabledSvc.enabled())\r\n{\r\n <ng-content/>\r\n}", styles: [":host\r\n{\r\n font-weight: normal;\r\n font-style: italic;\r\n text-shadow: 0 0 1px;\r\n display: none;\r\n color: var(--common-debugData-foreground);\r\n}\r\n\r\n:host(.clickable)\r\n{\r\n cursor: pointer;\r\n}\r\n\r\n:host(.enabled)\r\n{\r\n display: block;\r\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
31
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DebugDataComponent, deps: [{ token: i1.DebugDataEnabledService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
32
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.1", type: DebugDataComponent, isStandalone: true, selector: "debug-data", ngImport: i0, template: "@if(debugDataEnabledSvc.enabled())\r\n{\r\n <ng-content/>\r\n}", styles: [":host\r\n{\r\n font-weight: normal;\r\n font-style: italic;\r\n text-shadow: 0 0 1px;\r\n display: none;\r\n color: var(--common-debugData-foreground);\r\n}\r\n\r\n:host(.clickable)\r\n{\r\n cursor: pointer;\r\n}\r\n\r\n:host(.enabled)\r\n{\r\n display: block;\r\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
35
33
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: DebugDataComponent, decorators: [{
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DebugDataComponent, decorators: [{
37
35
  type: Component,
38
36
  args: [{ selector: 'debug-data', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if(debugDataEnabledSvc.enabled())\r\n{\r\n <ng-content/>\r\n}", styles: [":host\r\n{\r\n font-weight: normal;\r\n font-style: italic;\r\n text-shadow: 0 0 1px;\r\n display: none;\r\n color: var(--common-debugData-foreground);\r\n}\r\n\r\n:host(.clickable)\r\n{\r\n cursor: pointer;\r\n}\r\n\r\n:host(.enabled)\r\n{\r\n display: block;\r\n}"] }]
39
37
  }], ctorParameters: () => [{ type: i1.DebugDataEnabledService }, { type: i0.ElementRef }] });
@@ -1 +1 @@
1
- {"version":3,"file":"debugData.component.js","sourceRoot":"","sources":["../../../../../../src/modules/debugData/components/debugData/debugData.component.ts","../../../../../../src/modules/debugData/components/debugData/debugData.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAErF,OAAO,EAAC,uBAAuB,EAAC,MAAM,0DAA0D,CAAC;;;AAEjG;;GAEG;AACH,MAAM,OAAO,GAAG,SAAS,CAAC;AAE1B;;GAEG;AASH,MAAM,OAAO,kBAAkB;IAGL;IACA;IAFtB,iEAAiE;IACjE,YAAsB,mBAA4C,EAC5C,OAAgC;QADhC,wBAAmB,GAAnB,mBAAmB,CAAyB;QAC5C,YAAO,GAAP,OAAO,CAAyB;QAElD,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,uEAAuE;IAEvE;;OAEG;IACO,kBAAkB;QAExB,IAAG,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,EACrC;YACI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;SACrD;aAED;YACI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SACxD;IACL,CAAC;uGAxBQ,kBAAkB;2FAAlB,kBAAkB,sECpB/B,mEAGC;;2FDiBY,kBAAkB;kBAR9B,SAAS;+BAEI,YAAY,cAGV,IAAI,mBACC,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy, ElementRef, effect} from '@angular/core';\n\nimport {DebugDataEnabledService} from '../../services/debugDataEnabled/debugDataEnabled.service';\n\n/**\n * Name of css class for enabled debug data\n */\nconst ENABLED = 'enabled';\n\n/**\n * Component used for displaying debug data\n */\n@Component(\n{\n selector: 'debug-data',\n templateUrl: 'debugData.component.html',\n styleUrl: 'debugData.component.css',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DebugDataComponent\n{\n //######################### constructor #########################\n constructor(protected debugDataEnabledSvc: DebugDataEnabledService,\n protected element: ElementRef<HTMLElement>)\n {\n effect(() => this.setEnabledCssClass());\n }\n\n //######################### protected methods #########################\n\n /**\n * Sets enabled css class according enabled state\n */\n protected setEnabledCssClass(): void\n {\n if(this.debugDataEnabledSvc.enabled())\n {\n this.element.nativeElement.classList.add(ENABLED);\n }\n else\n {\n this.element.nativeElement.classList.remove(ENABLED);\n }\n }\n}","@if(debugDataEnabledSvc.enabled())\r\n{\r\n <ng-content/>\r\n}"]}
1
+ {"version":3,"file":"debugData.component.js","sourceRoot":"","sources":["../../../../../../src/modules/debugData/components/debugData/debugData.component.ts","../../../../../../src/modules/debugData/components/debugData/debugData.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAErF,OAAO,EAAC,uBAAuB,EAAC,MAAM,0DAA0D,CAAC;;;AAEjG;;GAEG;AACH,MAAM,OAAO,GAAG,SAAS,CAAC;AAE1B;;GAEG;AASH,MAAM,OAAO,kBAAkB;IAE3B,iEAAiE;IACjE,YAAsB,mBAA4C,EAC5C,OAAgC;QADhC,wBAAmB,GAAnB,mBAAmB,CAAyB;QAC5C,YAAO,GAAP,OAAO,CAAyB;QAElD,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,uEAAuE;IAEvE;;OAEG;IACO,kBAAkB;QAExB,IAAG,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,EACrC,CAAC;YACG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACtD,CAAC;aAED,CAAC;YACG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACzD,CAAC;IACL,CAAC;8GAxBQ,kBAAkB;kGAAlB,kBAAkB,sECpB/B,mEAGC;;2FDiBY,kBAAkB;kBAR9B,SAAS;+BAEI,YAAY,cAGV,IAAI,mBACC,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy, ElementRef, effect} from '@angular/core';\n\nimport {DebugDataEnabledService} from '../../services/debugDataEnabled/debugDataEnabled.service';\n\n/**\n * Name of css class for enabled debug data\n */\nconst ENABLED = 'enabled';\n\n/**\n * Component used for displaying debug data\n */\n@Component(\n{\n selector: 'debug-data',\n templateUrl: 'debugData.component.html',\n styleUrl: 'debugData.component.css',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DebugDataComponent\n{\n //######################### constructor #########################\n constructor(protected debugDataEnabledSvc: DebugDataEnabledService,\n protected element: ElementRef<HTMLElement>)\n {\n effect(() => this.setEnabledCssClass());\n }\n\n //######################### protected methods #########################\n\n /**\n * Sets enabled css class according enabled state\n */\n protected setEnabledCssClass(): void\n {\n if(this.debugDataEnabledSvc.enabled())\n {\n this.element.nativeElement.classList.add(ENABLED);\n }\n else\n {\n this.element.nativeElement.classList.remove(ENABLED);\n }\n }\n}","@if(debugDataEnabledSvc.enabled())\r\n{\r\n <ng-content/>\r\n}"]}
@@ -5,11 +5,11 @@ import * as i0 from "@angular/core";
5
5
  * Module that contains debug data component
6
6
  */
7
7
  export class DebugDataModule {
8
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: DebugDataModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
9
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.5", ngImport: i0, type: DebugDataModule, imports: [DebugDataComponent], exports: [DebugDataComponent] });
10
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: DebugDataModule });
8
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DebugDataModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
9
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: DebugDataModule, imports: [DebugDataComponent], exports: [DebugDataComponent] }); }
10
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DebugDataModule }); }
11
11
  }
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: DebugDataModule, decorators: [{
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DebugDataModule, decorators: [{
13
13
  type: NgModule,
14
14
  args: [{
15
15
  imports: [
@@ -1 +1 @@
1
- {"version":3,"file":"debugData.module.js","sourceRoot":"","sources":["../../../../../src/modules/debugData/modules/debugData.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,kBAAkB,EAAC,MAAM,6CAA6C,CAAC;;AAE/E;;GAEG;AAYH,MAAM,OAAO,eAAe;uGAAf,eAAe;wGAAf,eAAe,YAPpB,kBAAkB,aAIlB,kBAAkB;wGAGb,eAAe;;2FAAf,eAAe;kBAX3B,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,kBAAkB;qBACrB;oBACD,OAAO,EACP;wBACI,kBAAkB;qBACrB;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {DebugDataComponent} from '../components/debugData/debugData.component';\n\n/**\n * Module that contains debug data component\n */\n@NgModule(\n{\n imports:\n [\n DebugDataComponent,\n ],\n exports:\n [\n DebugDataComponent,\n ]\n})\nexport class DebugDataModule\n{\n}"]}
1
+ {"version":3,"file":"debugData.module.js","sourceRoot":"","sources":["../../../../../src/modules/debugData/modules/debugData.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,kBAAkB,EAAC,MAAM,6CAA6C,CAAC;;AAE/E;;GAEG;AAYH,MAAM,OAAO,eAAe;8GAAf,eAAe;+GAAf,eAAe,YAPpB,kBAAkB,aAIlB,kBAAkB;+GAGb,eAAe;;2FAAf,eAAe;kBAX3B,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,kBAAkB;qBACrB;oBACD,OAAO,EACP;wBACI,kBAAkB;qBACrB;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {DebugDataComponent} from '../components/debugData/debugData.component';\n\n/**\n * Module that contains debug data component\n */\n@NgModule(\n{\n imports:\n [\n DebugDataComponent,\n ],\n exports:\n [\n DebugDataComponent,\n ]\n})\nexport class DebugDataModule\n{\n}"]}
@@ -4,11 +4,13 @@ import * as i0 from "@angular/core";
4
4
  * Service used for handling enabled state for debug data component
5
5
  */
6
6
  export class DebugDataEnabledService {
7
- //######################### private fields #########################
8
- /**
9
- * Indication whether debug data copmonent is enabled
10
- */
11
- _enabled = signal(false);
7
+ constructor() {
8
+ //######################### private fields #########################
9
+ /**
10
+ * Indication whether debug data copmonent is enabled
11
+ */
12
+ this._enabled = signal(false);
13
+ }
12
14
  //######################### public properties #########################
13
15
  /**
14
16
  * Indication whether debug data copmonent is enabled
@@ -24,10 +26,10 @@ export class DebugDataEnabledService {
24
26
  setEnabled(enabled = true) {
25
27
  this._enabled.set(enabled);
26
28
  }
27
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: DebugDataEnabledService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
28
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: DebugDataEnabledService, providedIn: 'root' });
29
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DebugDataEnabledService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
30
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DebugDataEnabledService, providedIn: 'root' }); }
29
31
  }
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: DebugDataEnabledService, decorators: [{
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DebugDataEnabledService, decorators: [{
31
33
  type: Injectable,
32
34
  args: [{ providedIn: 'root' }]
33
35
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"debugDataEnabled.service.js","sourceRoot":"","sources":["../../../../../../src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA0B,MAAM,EAAC,MAAM,eAAe,CAAC;;AAEzE;;GAEG;AAEH,MAAM,OAAO,uBAAuB;IAEhC,oEAAoE;IAEpE;;OAEG;IACK,QAAQ,GAA4B,MAAM,CAAC,KAAK,CAAC,CAAC;IAE1D,uEAAuE;IAEvE;;OAEG;IACH,IAAW,OAAO;QAEd,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACtC,CAAC;IAED,oEAAoE;IAEpE;;;OAGG;IACI,UAAU,CAAC,UAAmB,IAAI;QAErC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;uGA5BQ,uBAAuB;2GAAvB,uBAAuB,cADX,MAAM;;2FAClB,uBAAuB;kBADnC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC","sourcesContent":["import {Injectable, Signal, WritableSignal, signal} from '@angular/core';\n\n/**\n * Service used for handling enabled state for debug data component\n */\n@Injectable({providedIn: 'root'})\nexport class DebugDataEnabledService\n{\n //######################### private fields #########################\n\n /**\n * Indication whether debug data copmonent is enabled\n */\n private _enabled: WritableSignal<boolean> = signal(false);\n\n //######################### public properties #########################\n\n /**\n * Indication whether debug data copmonent is enabled\n */\n public get enabled(): Signal<boolean>\n {\n return this._enabled.asReadonly();\n }\n\n //######################### public methods #########################\n\n /**\n * Sets enabled state\n * @param enabled - Indication whether will be enabled state set to true, or false, defaults to true\n */\n public setEnabled(enabled: boolean = true): void\n {\n this._enabled.set(enabled);\n }\n}"]}
1
+ {"version":3,"file":"debugDataEnabled.service.js","sourceRoot":"","sources":["../../../../../../src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA0B,MAAM,EAAC,MAAM,eAAe,CAAC;;AAEzE;;GAEG;AAEH,MAAM,OAAO,uBAAuB;IADpC;QAGI,oEAAoE;QAEpE;;WAEG;QACK,aAAQ,GAA4B,MAAM,CAAC,KAAK,CAAC,CAAC;KAsB7D;IApBG,uEAAuE;IAEvE;;OAEG;IACH,IAAW,OAAO;QAEd,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACtC,CAAC;IAED,oEAAoE;IAEpE;;;OAGG;IACI,UAAU,CAAC,UAAmB,IAAI;QAErC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;8GA5BQ,uBAAuB;kHAAvB,uBAAuB,cADX,MAAM;;2FAClB,uBAAuB;kBADnC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC","sourcesContent":["import {Injectable, Signal, WritableSignal, signal} from '@angular/core';\n\n/**\n * Service used for handling enabled state for debug data component\n */\n@Injectable({providedIn: 'root'})\nexport class DebugDataEnabledService\n{\n //######################### private fields #########################\n\n /**\n * Indication whether debug data copmonent is enabled\n */\n private _enabled: WritableSignal<boolean> = signal(false);\n\n //######################### public properties #########################\n\n /**\n * Indication whether debug data copmonent is enabled\n */\n public get enabled(): Signal<boolean>\n {\n return this._enabled.asReadonly();\n }\n\n //######################### public methods #########################\n\n /**\n * Sets enabled state\n * @param enabled - Indication whether will be enabled state set to true, or false, defaults to true\n */\n public setEnabled(enabled: boolean = true): void\n {\n this._enabled.set(enabled);\n }\n}"]}
@@ -8,30 +8,23 @@ import * as i2 from "@angular/common";
8
8
  * Component used for displaying console logs
9
9
  */
10
10
  export class ConsoleSAComponent {
11
- consoleSvc;
12
- changeDetector;
13
- //######################### protected fields #########################
14
- /**
15
- * Subscription for log changes
16
- */
17
- logsChangeSubscription;
18
- //######################### protected properties - template bindings #########################
19
- /**
20
- * Current state of logger
21
- */
22
- currentLogs = [];
23
- /**
24
- * Indication whether can use copy to clipboard
25
- */
26
- canCopy = navigator && navigator.clipboard;
27
- /**
28
- * Current value of filter
29
- */
30
- filterValue = '';
31
11
  //######################### constructor #########################
32
12
  constructor(consoleSvc, changeDetector) {
33
13
  this.consoleSvc = consoleSvc;
34
14
  this.changeDetector = changeDetector;
15
+ //######################### protected properties - template bindings #########################
16
+ /**
17
+ * Current state of logger
18
+ */
19
+ this.currentLogs = [];
20
+ /**
21
+ * Indication whether can use copy to clipboard
22
+ */
23
+ this.canCopy = navigator && navigator.clipboard;
24
+ /**
25
+ * Current value of filter
26
+ */
27
+ this.filterValue = '';
35
28
  }
36
29
  //######################### public methods - implementation of OnInit #########################
37
30
  /**
@@ -91,10 +84,10 @@ export class ConsoleSAComponent {
91
84
  this.currentLogs = this.consoleSvc.logs.filter(log => log.text.toLowerCase().indexOf(this.filterValue.toLowerCase()) >= 0);
92
85
  }
93
86
  }
94
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: ConsoleSAComponent, deps: [{ token: i1.ConsoleComponentService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
95
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.5", type: ConsoleSAComponent, isStandalone: true, selector: "console", ngImport: i0, template: "<div class=\"console-data thin-scrollbar\">\n <div class=\"console-log\" [ngClass]=\"log?.logLevel | lowercase\" *ngFor=\"let log of currentLogs\">\n <div class=\"console-log-icon fa\" [class.fa-angle-right]=\"!log?.expanded\" [class.fa-angle-down]=\"log?.expanded\" (click)=\"log.expanded = !log.expanded\"></div>\n <div class=\"console-log-text\" [class.expanded]=\"log?.expanded\" (click)=\"copyMessage(log.text)\">{{log?.text}}</div>\n </div>\n\n <div class=\"clear-icon\" (click)=\"clear()\" title=\"clear log\">\n <div class=\"fa fa-times\"></div>\n </div>\n\n <div class=\"copy-icon\" (click)=\"copy()\" title=\"copy to clipboard\" *ngIf=\"canCopy\">\n <div class=\"fa fa-copy\"></div>\n </div>\n</div>\n\n<div class=\"console-filter\">\n <input type=\"text\" placeholder=\"Filter messages\" (input)=\"filterValue = $any($event.target).value; setMessages()\">\n</div>", styles: [":host\n{\n display: flex;\n flex-direction: column;\n position: absolute;\n width: 100%;\n height: 50%;\n}\n\n.console-data\n{\n background-color: #000000c7;\n border: none;\n border-bottom: 1px solid #AAA;\n border-radius: 0;\n color: #EEE;\n flex: 1;\n min-height: 0;\n min-width: 0;\n overflow-y: auto;\n overflow-x: hidden;\n cursor: pointer;\n}\n\n.console-filter\n{\n align-self: stretch;\n}\n\n.console-filter input\n{\n width: 100%;\n background-color: #000000c7;\n color: #FFF;\n border: none;\n border-bottom: 1px solid #AAA;\n padding: 0 4px;\n}\n\n.copy-icon,\n.clear-icon\n{\n position: absolute;\n top: 0;\n right: 0;\n padding: 4px 14px;\n}\n\n.copy-icon\n{\n margin-right: 20px;\n}\n\n.clear-icon div:hover,\n.copy-icon div:hover\n{\n color: #31A1FF;\n cursor: pointer;\n}\n\n.console-log\n{\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n font-size: 12px;\n display: flex;\n flex-direction: row;\n}\n\n.console-log.error,\n.console-log.fatal\n{\n color: #FF3131;\n}\n\n.console-log.warning\n{\n color: #FFC531;\n}\n\n.console-log.debug,\n.console-log.verbose\n{\n color: #31A1FF;\n}\n\n.console-log-icon\n{\n color: #FFF;\n font-weight: bold;\n margin: 2px 4px 0;\n}\n\n.console-log-icon.fa-angle-down\n{\n margin: 3px 3px 0 2px;\n}\n\n.console-log-text\n{\n flex: 1;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.console-log-text.expanded\n{\n white-space: pre;\n text-overflow: initial;\n}"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.LowerCasePipe, name: "lowercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
87
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ConsoleSAComponent, deps: [{ token: i1.ConsoleComponentService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
88
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: ConsoleSAComponent, isStandalone: true, selector: "console", ngImport: i0, template: "<div class=\"console-data thin-scrollbar\">\n <div class=\"console-log\" [ngClass]=\"log?.logLevel | lowercase\" *ngFor=\"let log of currentLogs\">\n <div class=\"console-log-icon fa\" [class.fa-angle-right]=\"!log?.expanded\" [class.fa-angle-down]=\"log?.expanded\" (click)=\"log.expanded = !log.expanded\"></div>\n <div class=\"console-log-text\" [class.expanded]=\"log?.expanded\" (click)=\"copyMessage(log.text)\">{{log?.text}}</div>\n </div>\n\n <div class=\"clear-icon\" (click)=\"clear()\" title=\"clear log\">\n <div class=\"fa fa-times\"></div>\n </div>\n\n <div class=\"copy-icon\" (click)=\"copy()\" title=\"copy to clipboard\" *ngIf=\"canCopy\">\n <div class=\"fa fa-copy\"></div>\n </div>\n</div>\n\n<div class=\"console-filter\">\n <input type=\"text\" placeholder=\"Filter messages\" (input)=\"filterValue = $any($event.target).value; setMessages()\">\n</div>", styles: [":host\n{\n display: flex;\n flex-direction: column;\n position: absolute;\n width: 100%;\n height: 50%;\n}\n\n.console-data\n{\n background-color: #000000c7;\n border: none;\n border-bottom: 1px solid #AAA;\n border-radius: 0;\n color: #EEE;\n flex: 1;\n min-height: 0;\n min-width: 0;\n overflow-y: auto;\n overflow-x: hidden;\n cursor: pointer;\n}\n\n.console-filter\n{\n align-self: stretch;\n}\n\n.console-filter input\n{\n width: 100%;\n background-color: #000000c7;\n color: #FFF;\n border: none;\n border-bottom: 1px solid #AAA;\n padding: 0 4px;\n}\n\n.copy-icon,\n.clear-icon\n{\n position: absolute;\n top: 0;\n right: 0;\n padding: 4px 14px;\n}\n\n.copy-icon\n{\n margin-right: 20px;\n}\n\n.clear-icon div:hover,\n.copy-icon div:hover\n{\n color: #31A1FF;\n cursor: pointer;\n}\n\n.console-log\n{\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n font-size: 12px;\n display: flex;\n flex-direction: row;\n}\n\n.console-log.error,\n.console-log.fatal\n{\n color: #FF3131;\n}\n\n.console-log.warning\n{\n color: #FFC531;\n}\n\n.console-log.debug,\n.console-log.verbose\n{\n color: #31A1FF;\n}\n\n.console-log-icon\n{\n color: #FFF;\n font-weight: bold;\n margin: 2px 4px 0;\n}\n\n.console-log-icon.fa-angle-down\n{\n margin: 3px 3px 0 2px;\n}\n\n.console-log-text\n{\n flex: 1;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.console-log-text.expanded\n{\n white-space: pre;\n text-overflow: initial;\n}"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.LowerCasePipe, name: "lowercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
96
89
  }
97
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: ConsoleSAComponent, decorators: [{
90
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ConsoleSAComponent, decorators: [{
98
91
  type: Component,
99
92
  args: [{ selector: 'console', standalone: true, imports: [
100
93
  CommonModule,
@@ -1 +1 @@
1
- {"version":3,"file":"console.component.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/components/console/console.component.ts","../../../../../../src/modules/logger/components/console/console.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAqB,iBAAiB,EAAC,MAAM,eAAe,CAAC;AACvG,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAI7C,OAAO,EAAC,uBAAuB,EAAC,MAAM,gBAAgB,CAAC;;;;AAEvD;;GAEG;AAaH,MAAM,OAAO,kBAAkB;IA2BL;IACA;IA1BtB,sEAAsE;IAEtE;;OAEG;IACO,sBAAsB,CAA8B;IAE9D,8FAA8F;IAE9F;;OAEG;IACO,WAAW,GAA0B,EAAE,CAAC;IAElD;;OAEG;IACO,OAAO,GAAG,SAAS,IAAI,SAAS,CAAC,SAAS,CAAC;IAErD;;OAEG;IACO,WAAW,GAAW,EAAE,CAAC;IAEnC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,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;SAC3C;aAED;YACI,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;SAC9H;IACL,CAAC;uGAhHQ,kBAAkB;2FAAlB,kBAAkB,mECtB/B,65BAiBM,8oDDCE,YAAY;;2FAIP,kBAAkB;kBAZ9B,SAAS;+BAEI,SAAS,cAGP,IAAI,WAEhB;wBACI,YAAY;qBACf,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy, OnInit, OnDestroy, ChangeDetectorRef} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {Subscription} from 'rxjs';\n\nimport {ConsoleComponentLog} from '../../interfaces';\nimport {ConsoleComponentService} from '../../services';\n\n/**\n * Component used for displaying console logs\n */\n@Component(\n{\n selector: 'console',\n templateUrl: 'console.component.html',\n styleUrls: ['console.component.css'],\n standalone: true,\n imports:\n [\n CommonModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ConsoleSAComponent implements OnInit, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Subscription for log changes\n */\n protected logsChangeSubscription: Subscription|undefined|null;\n\n //######################### protected properties - template bindings #########################\n\n /**\n * Current state of logger\n */\n protected currentLogs: ConsoleComponentLog[] = [];\n\n /**\n * Indication whether can use copy to clipboard\n */\n protected canCopy = navigator && navigator.clipboard;\n\n /**\n * Current value of filter\n */\n protected filterValue: string = '';\n\n //######################### constructor #########################\n constructor(protected consoleSvc: ConsoleComponentService,\n protected changeDetector: ChangeDetectorRef)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this.setMessages();\n \n this.logsChangeSubscription = this.consoleSvc.logsChange.subscribe(() =>\n {\n this.setMessages();\n this.changeDetector.detectChanges();\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(this.logsChangeSubscription)\n {\n this.logsChangeSubscription.unsubscribe();\n this.logsChangeSubscription = null;\n }\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Copies content of whole console log into clipboard\n */\n protected copy(): void\n {\n if(!navigator || !navigator.clipboard)\n {\n return;\n }\n\n navigator.clipboard.writeText(this.currentLogs.map(log => log.text).join('\\n'));\n }\n\n /**\n * Copies message to clipboard\n * @param message - Message to be copied\n */\n protected copyMessage(message: string): void\n {\n if(!navigator || !navigator.clipboard)\n {\n return;\n }\n\n navigator.clipboard.writeText(message);\n }\n\n /**\n * Clears existing logs\n */\n protected clear(): void\n {\n this.consoleSvc.clear();\n }\n\n /**\n * Sets messages using filter\n */\n protected setMessages(): void\n {\n if(!this.filterValue)\n {\n this.currentLogs = this.consoleSvc.logs;\n }\n else\n {\n this.currentLogs = this.consoleSvc.logs.filter(log => log.text.toLowerCase().indexOf(this.filterValue.toLowerCase()) >= 0);\n }\n }\n}","<div class=\"console-data thin-scrollbar\">\n <div class=\"console-log\" [ngClass]=\"log?.logLevel | lowercase\" *ngFor=\"let log of currentLogs\">\n <div class=\"console-log-icon fa\" [class.fa-angle-right]=\"!log?.expanded\" [class.fa-angle-down]=\"log?.expanded\" (click)=\"log.expanded = !log.expanded\"></div>\n <div class=\"console-log-text\" [class.expanded]=\"log?.expanded\" (click)=\"copyMessage(log.text)\">{{log?.text}}</div>\n </div>\n\n <div class=\"clear-icon\" (click)=\"clear()\" title=\"clear log\">\n <div class=\"fa fa-times\"></div>\n </div>\n\n <div class=\"copy-icon\" (click)=\"copy()\" title=\"copy to clipboard\" *ngIf=\"canCopy\">\n <div class=\"fa fa-copy\"></div>\n </div>\n</div>\n\n<div class=\"console-filter\">\n <input type=\"text\" placeholder=\"Filter messages\" (input)=\"filterValue = $any($event.target).value; setMessages()\">\n</div>"]}
1
+ {"version":3,"file":"console.component.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/components/console/console.component.ts","../../../../../../src/modules/logger/components/console/console.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAqB,iBAAiB,EAAC,MAAM,eAAe,CAAC;AACvG,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAI7C,OAAO,EAAC,uBAAuB,EAAC,MAAM,gBAAgB,CAAC;;;;AAEvD;;GAEG;AAaH,MAAM,OAAO,kBAAkB;IA0B3B,iEAAiE;IACjE,YAAsB,UAAmC,EACnC,cAAiC;QADjC,eAAU,GAAV,UAAU,CAAyB;QACnC,mBAAc,GAAd,cAAc,CAAmB;QAnBvD,8FAA8F;QAE9F;;WAEG;QACO,gBAAW,GAA0B,EAAE,CAAC;QAElD;;WAEG;QACO,YAAO,GAAG,SAAS,IAAI,SAAS,CAAC,SAAS,CAAC;QAErD;;WAEG;QACO,gBAAW,GAAW,EAAE,CAAC;IAMnC,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,WAAW,EAAE,CAAC;QAEnB,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE;YAEpE,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC;QACxC,CAAC,CAAC,CAAC;IACP,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAG,IAAI,CAAC,sBAAsB,EAC9B,CAAC;YACG,IAAI,CAAC,sBAAsB,CAAC,WAAW,EAAE,CAAC;YAC1C,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC;QACvC,CAAC;IACL,CAAC;IAED,2FAA2F;IA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onModule} from '@angular/common';\nimport {Subscription} from 'rxjs';\n\nimport {ConsoleComponentLog} from '../../interfaces';\nimport {ConsoleComponentService} from '../../services';\n\n/**\n * Component used for displaying console logs\n */\n@Component(\n{\n selector: 'console',\n templateUrl: 'console.component.html',\n styleUrls: ['console.component.css'],\n standalone: true,\n imports:\n [\n CommonModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ConsoleSAComponent implements OnInit, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Subscription for log changes\n */\n protected logsChangeSubscription: Subscription|undefined|null;\n\n //######################### protected properties - template bindings #########################\n\n /**\n * Current state of logger\n */\n protected currentLogs: ConsoleComponentLog[] = [];\n\n /**\n * Indication whether can use copy to clipboard\n */\n protected canCopy = navigator && navigator.clipboard;\n\n /**\n * Current value of filter\n */\n protected filterValue: string = '';\n\n //######################### constructor #########################\n constructor(protected consoleSvc: ConsoleComponentService,\n protected changeDetector: ChangeDetectorRef)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this.setMessages();\n \n this.logsChangeSubscription = this.consoleSvc.logsChange.subscribe(() =>\n {\n this.setMessages();\n this.changeDetector.detectChanges();\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(this.logsChangeSubscription)\n {\n this.logsChangeSubscription.unsubscribe();\n this.logsChangeSubscription = null;\n }\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Copies content of whole console log into clipboard\n */\n protected copy(): void\n {\n if(!navigator || !navigator.clipboard)\n {\n return;\n }\n\n navigator.clipboard.writeText(this.currentLogs.map(log => log.text).join('\\n'));\n }\n\n /**\n * Copies message to clipboard\n * @param message - Message to be copied\n */\n protected copyMessage(message: string): void\n {\n if(!navigator || !navigator.clipboard)\n {\n return;\n }\n\n navigator.clipboard.writeText(message);\n }\n\n /**\n * Clears existing logs\n */\n protected clear(): void\n {\n this.consoleSvc.clear();\n }\n\n /**\n * Sets messages using filter\n */\n protected setMessages(): void\n {\n if(!this.filterValue)\n {\n this.currentLogs = this.consoleSvc.logs;\n }\n else\n {\n this.currentLogs = this.consoleSvc.logs.filter(log => log.text.toLowerCase().indexOf(this.filterValue.toLowerCase()) >= 0);\n }\n }\n}","<div class=\"console-data thin-scrollbar\">\n <div class=\"console-log\" [ngClass]=\"log?.logLevel | lowercase\" *ngFor=\"let log of currentLogs\">\n <div class=\"console-log-icon fa\" [class.fa-angle-right]=\"!log?.expanded\" [class.fa-angle-down]=\"log?.expanded\" (click)=\"log.expanded = !log.expanded\"></div>\n <div class=\"console-log-text\" [class.expanded]=\"log?.expanded\" (click)=\"copyMessage(log.text)\">{{log?.text}}</div>\n </div>\n\n <div class=\"clear-icon\" (click)=\"clear()\" title=\"clear log\">\n <div class=\"fa fa-times\"></div>\n </div>\n\n <div class=\"copy-icon\" (click)=\"copy()\" title=\"copy to clipboard\" *ngIf=\"canCopy\">\n <div class=\"fa fa-copy\"></div>\n </div>\n</div>\n\n<div class=\"console-filter\">\n <input type=\"text\" placeholder=\"Filter messages\" (input)=\"filterValue = $any($event.target).value; setMessages()\">\n</div>"]}
@@ -1 +1 @@
1
- {"version":3,"file":"loggerSink.decorator.js","sourceRoot":"","sources":["../../../../../src/modules/logger/decorators/loggerSink.decorator.ts"],"names":[],"mappings":"AAEA,MAAM,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAa5D;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAa;IAE1C,MAAM,cAAc,GAAG,IAAsB,CAAC;IAE9C,OAAO,CAAC,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,QAAQ;IAEpB,wDAAwD;IACxD,OAAO,UAAsC,MAAiB;QAE1D,MAAM,cAAc,GAAG,MAAwB,CAAC;QAEhD,IAAG,CAAC,cAAc,CAAC,oBAAoB,CAAC,EACxC;YACI,MAAM,CAAC,cAAc,CAAC,cAAc,EAAE,oBAAoB,EAC1D;gBACI,KAAK,EAAE,IAAI;gBACX,QAAQ,EAAE,KAAK;gBACf,UAAU,EAAE,KAAK;gBACjB,YAAY,EAAE,KAAK;aACtB,CAAC,CAAC;SACN;QAED,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC;AACN,CAAC","sourcesContent":["import {LoggerSinkType as LoggerSinkTyp} from '../interfaces/loggerSink.interface';\n\nconst loggerSinkTypeSymbol = Symbol('loggerSinkTypeSymbol');\n\n/**\n * Type that contains flag whether is type logger sink\n */\ninterface LoggerSinkType\n{\n /**\n * Flag indicating that type is logger sink\n */\n [loggerSinkTypeSymbol]?: boolean;\n}\n\n/**\n * Tests whether is type marked as logger sink\n * @param type - Type that will be marked\n */\nexport function isLoggerSinkType(type: unknown): type is LoggerSinkTyp\n{\n const loggerSinkType = type as LoggerSinkType;\n\n return !!loggerSinkType[loggerSinkTypeSymbol];\n}\n\n/**\n * Marks type as Logger sink type\n */\nexport function SinkType(): ClassDecorator\n{\n // eslint-disable-next-line @typescript-eslint/ban-types\n return function<TFunction extends Function> (target: TFunction): TFunction\n {\n const loggerSinkType = target as LoggerSinkType;\n \n if(!loggerSinkType[loggerSinkTypeSymbol])\n {\n Object.defineProperty(loggerSinkType, loggerSinkTypeSymbol,\n {\n value: true,\n writable: false,\n enumerable: false,\n configurable: false,\n });\n }\n\n return target;\n };\n}"]}
1
+ {"version":3,"file":"loggerSink.decorator.js","sourceRoot":"","sources":["../../../../../src/modules/logger/decorators/loggerSink.decorator.ts"],"names":[],"mappings":"AAEA,MAAM,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAa5D;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAa;IAE1C,MAAM,cAAc,GAAG,IAAsB,CAAC;IAE9C,OAAO,CAAC,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,QAAQ;IAEpB,wDAAwD;IACxD,OAAO,UAAsC,MAAiB;QAE1D,MAAM,cAAc,GAAG,MAAwB,CAAC;QAEhD,IAAG,CAAC,cAAc,CAAC,oBAAoB,CAAC,EACxC,CAAC;YACG,MAAM,CAAC,cAAc,CAAC,cAAc,EAAE,oBAAoB,EAC1D;gBACI,KAAK,EAAE,IAAI;gBACX,QAAQ,EAAE,KAAK;gBACf,UAAU,EAAE,KAAK;gBACjB,YAAY,EAAE,KAAK;aACtB,CAAC,CAAC;QACP,CAAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC;AACN,CAAC","sourcesContent":["import {LoggerSinkType as LoggerSinkTyp} from '../interfaces/loggerSink.interface';\n\nconst loggerSinkTypeSymbol = Symbol('loggerSinkTypeSymbol');\n\n/**\n * Type that contains flag whether is type logger sink\n */\ninterface LoggerSinkType\n{\n /**\n * Flag indicating that type is logger sink\n */\n [loggerSinkTypeSymbol]?: boolean;\n}\n\n/**\n * Tests whether is type marked as logger sink\n * @param type - Type that will be marked\n */\nexport function isLoggerSinkType(type: unknown): type is LoggerSinkTyp\n{\n const loggerSinkType = type as LoggerSinkType;\n\n return !!loggerSinkType[loggerSinkTypeSymbol];\n}\n\n/**\n * Marks type as Logger sink type\n */\nexport function SinkType(): ClassDecorator\n{\n // eslint-disable-next-line @typescript-eslint/ban-types\n return function<TFunction extends Function> (target: TFunction): TFunction\n {\n const loggerSinkType = target as LoggerSinkType;\n \n if(!loggerSinkType[loggerSinkTypeSymbol])\n {\n Object.defineProperty(loggerSinkType, loggerSinkTypeSymbol,\n {\n value: true,\n writable: false,\n enumerable: false,\n configurable: false,\n });\n }\n\n return target;\n };\n}"]}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/modules/logger/misc/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAMvC;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,eAAiD,EAAE,eAAyB;IAEtG,IAAG,OAAO,CAAC,eAAe,CAAC,EAC3B;QACI,OAAO,IAAI,CAAC;KACf;IAED,OAAO,eAAe,EAAE,IAAI,eAAe,CAAC;AAChD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,UAAsB,EAAE,SAA2B;IAE5E,MAAM,UAAU,GAA4B,EAAE,CAAC;IAE/C,KAAI,MAAM,QAAQ,IAAI,SAAS,EAC/B;QACI,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;KAC3C;IAED,OAAO,UAAU,CAAC;AACtB,CAAC","sourcesContent":["import {isBlank} from '@jscrpt/common';\n\nimport {LogLevel, MessageLog} from '../types';\nimport {MinLogLevelGetter} from './types';\nimport {LoggerEnricher} from '../interfaces';\n\n/**\n * Tests whether is logger sink enabled\n * @param minimumLogLevel - Minimum log level to be tested\n * @param messageLogLevel - Message log level\n */\nexport function loggerEnabled(minimumLogLevel: MinLogLevelGetter|null|undefined, messageLogLevel: LogLevel): boolean\n{\n if(isBlank(minimumLogLevel))\n {\n return true;\n }\n\n return minimumLogLevel() <= messageLogLevel;\n}\n\n/**\n * Creates logger properties by using enrichers\n * @param messageLog - Message log to be used for creating enrichers\n */\nexport function useEnrichers(messageLog: MessageLog, enrichers: LoggerEnricher[]): Record<string, unknown>\n{\n const properties: Record<string, unknown> = {};\n\n for(const enricher of enrichers)\n {\n enricher.enrich(properties, messageLog);\n }\n\n return properties;\n}"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/modules/logger/misc/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAMvC;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,eAAiD,EAAE,eAAyB;IAEtG,IAAG,OAAO,CAAC,eAAe,CAAC,EAC3B,CAAC;QACG,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,eAAe,EAAE,IAAI,eAAe,CAAC;AAChD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,UAAsB,EAAE,SAA2B;IAE5E,MAAM,UAAU,GAA4B,EAAE,CAAC;IAE/C,KAAI,MAAM,QAAQ,IAAI,SAAS,EAC/B,CAAC;QACG,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC","sourcesContent":["import {isBlank} from '@jscrpt/common';\n\nimport {LogLevel, MessageLog} from '../types';\nimport {MinLogLevelGetter} from './types';\nimport {LoggerEnricher} from '../interfaces';\n\n/**\n * Tests whether is logger sink enabled\n * @param minimumLogLevel - Minimum log level to be tested\n * @param messageLogLevel - Message log level\n */\nexport function loggerEnabled(minimumLogLevel: MinLogLevelGetter|null|undefined, messageLogLevel: LogLevel): boolean\n{\n if(isBlank(minimumLogLevel))\n {\n return true;\n }\n\n return minimumLogLevel() <= messageLogLevel;\n}\n\n/**\n * Creates logger properties by using enrichers\n * @param messageLog - Message log to be used for creating enrichers\n */\nexport function useEnrichers(messageLog: MessageLog, enrichers: LoggerEnricher[]): Record<string, unknown>\n{\n const properties: Record<string, unknown> = {};\n\n for(const enricher of enrichers)\n {\n enricher.enrich(properties, messageLog);\n }\n\n return properties;\n}"]}
@@ -6,19 +6,21 @@ import * as i0 from "@angular/core";
6
6
  * Sink that is used for storing logs in `ConsoleComponent`
7
7
  */
8
8
  export class ConsoleComponentService {
9
- //######################### protected fields #########################
10
- /**
11
- * Array of current logs
12
- */
13
- currentLogs = [];
14
- /**
15
- * Subject used for indicating logs change
16
- */
17
- logsChangeSubject = new Subject();
18
- /**
19
- * Options for this sink
20
- */
21
- options = inject(ConsoleComponentServiceOptions);
9
+ constructor() {
10
+ //######################### protected fields #########################
11
+ /**
12
+ * Array of current logs
13
+ */
14
+ this.currentLogs = [];
15
+ /**
16
+ * Subject used for indicating logs change
17
+ */
18
+ this.logsChangeSubject = new Subject();
19
+ /**
20
+ * Options for this sink
21
+ */
22
+ this.options = inject(ConsoleComponentServiceOptions);
23
+ }
22
24
  //######################### public properties #########################
23
25
  /**
24
26
  * Occurs when logs change
@@ -53,10 +55,10 @@ export class ConsoleComponentService {
53
55
  }
54
56
  this.logsChangeSubject.next();
55
57
  }
56
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: ConsoleComponentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
57
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: ConsoleComponentService, providedIn: 'root' });
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ConsoleComponentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
59
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ConsoleComponentService, providedIn: 'root' }); }
58
60
  }
59
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: ConsoleComponentService, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ConsoleComponentService, decorators: [{
60
62
  type: Injectable,
61
63
  args: [{ providedIn: 'root' }]
62
64
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"consoleComponent.service.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/console/consoleComponent.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACjD,OAAO,EAAa,OAAO,EAAC,MAAM,MAAM,CAAC;AAEzC,OAAO,EAAC,8BAA8B,EAAC,MAAM,mCAAmC,CAAC;;AAGjF;;GAEG;AAEH,MAAM,OAAO,uBAAuB;IAEhC,sEAAsE;IAEtE;;OAEG;IACO,WAAW,GAA0B,EAAE,CAAC;IAElD;;OAEG;IACO,iBAAiB,GAAkB,IAAI,OAAO,EAAQ,CAAC;IAEjE;;OAEG;IACO,OAAO,GAAmC,MAAM,CAAC,8BAA8B,CAAC,CAAC;IAE3F,uEAAuE;IAEvE;;OAEG;IACH,IAAW,UAAU;QAEjB,OAAO,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;IACjD,CAAC;IAED;;OAEG;IACH,IAAW,IAAI;QAEX,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,oEAAoE;IAEpE;;OAEG;IACI,KAAK;QAER,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC;IAED;;;OAGG;IACI,GAAG,CAAC,GAAwB;QAE/B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAE3B,WAAW;QACX,IAAG,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EACtD;YACI,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;YAExE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;SAC3C;QAED,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC;uGAjEQ,uBAAuB;2GAAvB,uBAAuB,cADX,MAAM;;2FAClB,uBAAuB;kBADnC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC","sourcesContent":["import {Injectable, inject} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\n\nimport {ConsoleComponentServiceOptions} from './consoleComponentService.options';\nimport {ConsoleComponentLog} from '../../interfaces';\n\n/**\n * Sink that is used for storing logs in `ConsoleComponent`\n */\n@Injectable({providedIn: 'root'})\nexport class ConsoleComponentService\n{\n //######################### protected fields #########################\n\n /**\n * Array of current logs\n */\n protected currentLogs: ConsoleComponentLog[] = [];\n\n /**\n * Subject used for indicating logs change\n */\n protected logsChangeSubject: Subject<void> = new Subject<void>();\n\n /**\n * Options for this sink\n */\n protected options: ConsoleComponentServiceOptions = inject(ConsoleComponentServiceOptions);\n\n //######################### public properties #########################\n\n /**\n * Occurs when logs change\n */\n public get logsChange(): Observable<void>\n {\n return this.logsChangeSubject.asObservable();\n }\n\n /**\n * Gets current logs\n */\n public get logs(): ConsoleComponentLog[]\n {\n return this.currentLogs;\n }\n \n //######################### public methods #########################\n\n /**\n * Clears all current logs\n */\n public clear(): void\n {\n this.currentLogs = [];\n this.logsChangeSubject.next();\n }\n\n /**\n * Logs log into service\n * @param log - Log to be stored\n */\n public log(log: ConsoleComponentLog): void\n {\n this.currentLogs.push(log);\n\n //TRIM LOGS\n if(this.currentLogs.length > this.options.maxLogsCount)\n {\n const removeCount = this.currentLogs.length - this.options.maxLogsCount;\n\n this.currentLogs.splice(0, removeCount);\n }\n\n this.logsChangeSubject.next();\n }\n}"]}
1
+ {"version":3,"file":"consoleComponent.service.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/console/consoleComponent.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACjD,OAAO,EAAa,OAAO,EAAC,MAAM,MAAM,CAAC;AAEzC,OAAO,EAAC,8BAA8B,EAAC,MAAM,mCAAmC,CAAC;;AAGjF;;GAEG;AAEH,MAAM,OAAO,uBAAuB;IADpC;QAGI,sEAAsE;QAEtE;;WAEG;QACO,gBAAW,GAA0B,EAAE,CAAC;QAElD;;WAEG;QACO,sBAAiB,GAAkB,IAAI,OAAO,EAAQ,CAAC;QAEjE;;WAEG;QACO,YAAO,GAAmC,MAAM,CAAC,8BAA8B,CAAC,CAAC;KAiD9F;IA/CG,uEAAuE;IAEvE;;OAEG;IACH,IAAW,UAAU;QAEjB,OAAO,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;IACjD,CAAC;IAED;;OAEG;IACH,IAAW,IAAI;QAEX,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,oEAAoE;IAEpE;;OAEG;IACI,KAAK;QAER,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC;IAED;;;OAGG;IACI,GAAG,CAAC,GAAwB;QAE/B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAE3B,WAAW;QACX,IAAG,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EACtD,CAAC;YACG,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;YAExE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QAC5C,CAAC;QAED,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC;8GAjEQ,uBAAuB;kHAAvB,uBAAuB,cADX,MAAM;;2FAClB,uBAAuB;kBADnC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC","sourcesContent":["import {Injectable, inject} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\n\nimport {ConsoleComponentServiceOptions} from './consoleComponentService.options';\nimport {ConsoleComponentLog} from '../../interfaces';\n\n/**\n * Sink that is used for storing logs in `ConsoleComponent`\n */\n@Injectable({providedIn: 'root'})\nexport class ConsoleComponentService\n{\n //######################### protected fields #########################\n\n /**\n * Array of current logs\n */\n protected currentLogs: ConsoleComponentLog[] = [];\n\n /**\n * Subject used for indicating logs change\n */\n protected logsChangeSubject: Subject<void> = new Subject<void>();\n\n /**\n * Options for this sink\n */\n protected options: ConsoleComponentServiceOptions = inject(ConsoleComponentServiceOptions);\n\n //######################### public properties #########################\n\n /**\n * Occurs when logs change\n */\n public get logsChange(): Observable<void>\n {\n return this.logsChangeSubject.asObservable();\n }\n\n /**\n * Gets current logs\n */\n public get logs(): ConsoleComponentLog[]\n {\n return this.currentLogs;\n }\n \n //######################### public methods #########################\n\n /**\n * Clears all current logs\n */\n public clear(): void\n {\n this.currentLogs = [];\n this.logsChangeSubject.next();\n }\n\n /**\n * Logs log into service\n * @param log - Log to be stored\n */\n public log(log: ConsoleComponentLog): void\n {\n this.currentLogs.push(log);\n\n //TRIM LOGS\n if(this.currentLogs.length > this.options.maxLogsCount)\n {\n const removeCount = this.currentLogs.length - this.options.maxLogsCount;\n\n this.currentLogs.splice(0, removeCount);\n }\n\n this.logsChangeSubject.next();\n }\n}"]}
@@ -7,11 +7,13 @@ import { ConsoleComponentService } from './consoleComponent.service';
7
7
  * Sink that is used for storing logs in `ConsoleComponent`
8
8
  */
9
9
  let ConsoleComponentSink = class ConsoleComponentSink {
10
- //######################### protected fields #########################
11
- /**
12
- * Options for this sink
13
- */
14
- consoleComponentSvc = inject(ConsoleComponentService);
10
+ constructor() {
11
+ //######################### protected fields #########################
12
+ /**
13
+ * Options for this sink
14
+ */
15
+ this.consoleComponentSvc = inject(ConsoleComponentService);
16
+ }
15
17
  //######################### public methods - implementation of LoggerSink #########################
16
18
  /**
17
19
  * @inheritdoc
@@ -1 +1 @@
1
- {"version":3,"file":"consoleComponent.sink.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/console/consoleComponent.sink.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AAGrC,OAAO,EAAC,QAAQ,EAA4B,MAAM,aAAa,CAAC;AAChE,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;AAEnE;;GAEG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAE7B,sEAAsE;IAEtE;;OAEG;IACO,mBAAmB,GAA4B,MAAM,CAAC,uBAAuB,CAAC,CAAC;IAEzF,mGAAmG;IAEnG;;OAEG;IACI,GAAG,CAAC,OAAsB,EAAE,gBAAyC,EAAE,UAA+C;QAEzH,MAAM,WAAW,GAAG,GAAG,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,eAAe,IAAI,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,CAAC;QAEhH,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAC5B;YACI,IAAI,EAAE,WAAW;YACjB,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC;SAC1C,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AAxBY,oBAAoB;IADhC,QAAQ,EAAE;GACE,oBAAoB,CAwBhC","sourcesContent":["import {inject} from '@angular/core';\n\nimport {LoggerSink} from '../../interfaces';\nimport {LogLevel, LoggerOptions, MessageLog} from '../../types';\nimport {SinkType} from '../../decorators';\nimport {ConsoleComponentService} from './consoleComponent.service';\n\n/**\n * Sink that is used for storing logs in `ConsoleComponent`\n */\n@SinkType()\nexport class ConsoleComponentSink implements LoggerSink\n{\n //######################### protected fields #########################\n\n /**\n * Options for this sink\n */\n protected consoleComponentSvc: ConsoleComponentService = inject(ConsoleComponentService);\n\n //######################### public methods - implementation of LoggerSink #########################\n\n /**\n * @inheritdoc\n */\n public log(options: LoggerOptions, loggerProperties: Record<string, unknown>, messageLog: MessageLog<Record<string, unknown>>): void\n {\n const fullMessage = `${messageLog.buildMessage(options.messageTemplate ?? '{{messageLog}}', loggerProperties)}`;\n\n this.consoleComponentSvc.log(\n {\n text: fullMessage,\n logLevel: LogLevel[messageLog.logLevel],\n });\n }\n}"]}
1
+ {"version":3,"file":"consoleComponent.sink.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/console/consoleComponent.sink.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AAGrC,OAAO,EAAC,QAAQ,EAA4B,MAAM,aAAa,CAAC;AAChE,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;AAEnE;;GAEG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAA1B;QAEH,sEAAsE;QAEtE;;WAEG;QACO,wBAAmB,GAA4B,MAAM,CAAC,uBAAuB,CAAC,CAAC;IAiB7F,CAAC;IAfG,mGAAmG;IAEnG;;OAEG;IACI,GAAG,CAAC,OAAsB,EAAE,gBAAyC,EAAE,UAA+C;QAEzH,MAAM,WAAW,GAAG,GAAG,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,eAAe,IAAI,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,CAAC;QAEhH,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAC5B;YACI,IAAI,EAAE,WAAW;YACjB,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC;SAC1C,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AAxBY,oBAAoB;IADhC,QAAQ,EAAE;GACE,oBAAoB,CAwBhC","sourcesContent":["import {inject} from '@angular/core';\n\nimport {LoggerSink} from '../../interfaces';\nimport {LogLevel, LoggerOptions, MessageLog} from '../../types';\nimport {SinkType} from '../../decorators';\nimport {ConsoleComponentService} from './consoleComponent.service';\n\n/**\n * Sink that is used for storing logs in `ConsoleComponent`\n */\n@SinkType()\nexport class ConsoleComponentSink implements LoggerSink\n{\n //######################### protected fields #########################\n\n /**\n * Options for this sink\n */\n protected consoleComponentSvc: ConsoleComponentService = inject(ConsoleComponentService);\n\n //######################### public methods - implementation of LoggerSink #########################\n\n /**\n * @inheritdoc\n */\n public log(options: LoggerOptions, loggerProperties: Record<string, unknown>, messageLog: MessageLog<Record<string, unknown>>): void\n {\n const fullMessage = `${messageLog.buildMessage(options.messageTemplate ?? '{{messageLog}}', loggerProperties)}`;\n\n this.consoleComponentSvc.log(\n {\n text: fullMessage,\n logLevel: LogLevel[messageLog.logLevel],\n });\n }\n}"]}
@@ -9,21 +9,21 @@ const MAX_LOGS = 1500;
9
9
  * Options for *console component service*
10
10
  */
11
11
  export class ConsoleComponentServiceOptions {
12
- //######################### public properties #########################
13
- /**
14
- * Maximal number of logs that can be stored
15
- */
16
- maxLogsCount = MAX_LOGS;
17
12
  //######################### constructor #########################
18
13
  constructor(maxLogsCount) {
14
+ //######################### public properties #########################
15
+ /**
16
+ * Maximal number of logs that can be stored
17
+ */
18
+ this.maxLogsCount = MAX_LOGS;
19
19
  if (isPresent(maxLogsCount)) {
20
20
  this.maxLogsCount = maxLogsCount;
21
21
  }
22
22
  }
23
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: ConsoleComponentServiceOptions, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
24
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: ConsoleComponentServiceOptions, providedIn: 'root', useFactory: () => new ConsoleComponentServiceOptions() });
23
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ConsoleComponentServiceOptions, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable }); }
24
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ConsoleComponentServiceOptions, providedIn: 'root', useFactory: () => new ConsoleComponentServiceOptions() }); }
25
25
  }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: ConsoleComponentServiceOptions, decorators: [{
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ConsoleComponentServiceOptions, decorators: [{
27
27
  type: Injectable,
28
28
  args: [{ providedIn: 'root', useFactory: () => new ConsoleComponentServiceOptions() }]
29
29
  }], ctorParameters: () => [{ type: undefined }] });
@@ -1 +1 @@
1
- {"version":3,"file":"consoleComponentService.options.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/console/consoleComponentService.options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;;AAEzC;;GAEG;AACH,MAAM,QAAQ,GAAW,IAAI,CAAC;AAE9B;;GAEG;AAEH,MAAM,OAAO,8BAA8B;IAEvC,uEAAuE;IAEvE;;OAEG;IACI,YAAY,GAAW,QAAQ,CAAC;IAEvC,iEAAiE;IACjE,YAAY,YAAqB;QAE7B,IAAG,SAAS,CAAC,YAAY,CAAC,EAC1B;YACI,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;SACpC;IACL,CAAC;uGAhBQ,8BAA8B;2GAA9B,8BAA8B,cADlB,MAAM,cAAc,GAAG,EAAE,CAAC,IAAI,8BAA8B,EAAE;;2FAC1E,8BAA8B;kBAD1C,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,oCAAoC,EAAC","sourcesContent":["import {Injectable} from '@angular/core';\nimport {isPresent} from '@jscrpt/common';\n\n/**\n * Maximal number of logs that can be stored\n */\nconst MAX_LOGS: number = 1500;\n\n/**\n * Options for *console component service*\n */\n@Injectable({providedIn: 'root', useFactory: () => new ConsoleComponentServiceOptions()})\nexport class ConsoleComponentServiceOptions\n{\n //######################### public properties #########################\n\n /**\n * Maximal number of logs that can be stored\n */\n public maxLogsCount: number = MAX_LOGS;\n\n //######################### constructor #########################\n constructor(maxLogsCount?: number)\n {\n if(isPresent(maxLogsCount))\n {\n this.maxLogsCount = maxLogsCount;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"consoleComponentService.options.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/console/consoleComponentService.options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;;AAEzC;;GAEG;AACH,MAAM,QAAQ,GAAW,IAAI,CAAC;AAE9B;;GAEG;AAEH,MAAM,OAAO,8BAA8B;IASvC,iEAAiE;IACjE,YAAY,YAAqB;QARjC,uEAAuE;QAEvE;;WAEG;QACI,iBAAY,GAAW,QAAQ,CAAC;QAKnC,IAAG,SAAS,CAAC,YAAY,CAAC,EAC1B,CAAC;YACG,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACrC,CAAC;IACL,CAAC;8GAhBQ,8BAA8B;kHAA9B,8BAA8B,cADlB,MAAM,cAAc,GAAG,EAAE,CAAC,IAAI,8BAA8B,EAAE;;2FAC1E,8BAA8B;kBAD1C,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,oCAAoC,EAAC","sourcesContent":["import {Injectable} from '@angular/core';\nimport {isPresent} from '@jscrpt/common';\n\n/**\n * Maximal number of logs that can be stored\n */\nconst MAX_LOGS: number = 1500;\n\n/**\n * Options for *console component service*\n */\n@Injectable({providedIn: 'root', useFactory: () => new ConsoleComponentServiceOptions()})\nexport class ConsoleComponentServiceOptions\n{\n //######################### public properties #########################\n\n /**\n * Maximal number of logs that can be stored\n */\n public maxLogsCount: number = MAX_LOGS;\n\n //######################### constructor #########################\n constructor(maxLogsCount?: number)\n {\n if(isPresent(maxLogsCount))\n {\n this.maxLogsCount = maxLogsCount;\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"developmentConsole.sink.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/developmentConsoleSink/developmentConsole.sink.ts"],"names":[],"mappings":";AACA,OAAO,EAAC,QAAQ,EAA4B,MAAM,aAAa,CAAC;AAChE,OAAO,EAAC,QAAQ,EAAC,MAAM,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AAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAE/C,OAAO,CAAC,cAAc,CAAC,SAAS,EAAG,WAAW,KAAK,GAAG,CAAC,CAAC;YACxD,OAAO,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,EAAE,WAAW,KAAK,GAAG,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,EAAE,CAAC;SACtB;aAED;YACI,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,WAAW,KAAK,GAAG,CAAC,CAAC;SACjD;IACL,CAAC;CACJ,CAAA;AAxEY,oBAAoB;IADhC,QAAQ,EAAE;GACE,oBAAoB,CAwEhC","sourcesContent":["import {LoggerSink} from '../../interfaces';\nimport {LogLevel, LoggerOptions, MessageLog} from '../../types';\nimport {SinkType} from '../../decorators';\n\n/**\n * Sink that is used for storing logs using browser developer console\n */\n@SinkType()\nexport class DeveloperConsoleSink implements LoggerSink\n{\n //######################### public methods - implementation of LoggerSink #########################\n\n /**\n * @inheritdoc\n */\n public log(options: LoggerOptions, loggerProperties: Record<string, unknown>, messageLog: MessageLog): void\n {\n const fullMessage = `%c${messageLog.buildMessage(options.messageTemplate ?? '{{messageLog}}', loggerProperties)}`;\n \n switch(messageLog.logLevel)\n {\n default:\n case LogLevel.Off:\n {\n break;\n }\n case LogLevel.Error:\n case LogLevel.Fatal:\n {\n this.writeLog(fullMessage, 'FF3131');\n\n break;\n }\n case LogLevel.Verbose:\n case LogLevel.Debug:\n {\n this.writeLog(fullMessage, '31A1FF');\n\n break;\n }\n case LogLevel.Information:\n {\n this.writeLog(fullMessage, 'ffffff');\n\n break;\n }\n case LogLevel.Warning:\n {\n this.writeLog(fullMessage, 'FFC531');\n\n break;\n }\n }\n }\n\n //######################### protected methods #########################\n\n /**\n * Writes message to log\n * @param fullMessage - Full message to be written\n * @param color - Color of message\n */\n protected writeLog(fullMessage: string, color: string): void\n {\n const index = fullMessage.indexOf('\\n');\n\n if(index >= 0)\n {\n const firstLine = fullMessage.slice(0, index);\n const restLines = fullMessage.slice(index + 1);\n\n console.groupCollapsed(firstLine, `color: #${color};`);\n console.log(`%c${restLines}`, `color: #${color};`);\n console.groupEnd();\n }\n else\n {\n console.log(fullMessage, `color: #${color};`);\n }\n }\n}"]}
1
+ {"version":3,"file":"developmentConsole.sink.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/developmentConsoleSink/developmentConsole.sink.ts"],"names":[],"mappings":";AACA,OAAO,EAAC,QAAQ,EAA4B,MAAM,aAAa,CAAC;AAChE,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAE1C;;GAEG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAE7B,mGAAmG;IAEnG;;OAEG;IACI,GAAG,CAAC,OAAsB,EAAE,gBAAyC,EAAE,UAAsB;QAEhG,MAAM,WAAW,GAAG,KAAK,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,eAAe,IAAI,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,CAAC;QAElH,QAAO,UAAU,CAAC,QAAQ,EAC1B,CAAC;YACG,QAAQ;YACR,KAAK,QAAQ,CAAC,GAAG;gBACjB,CAAC;oBACG,MAAM;gBACV,CAAC;YACD,KAAK,QAAQ,CAAC,KAAK,CAAC;YACpB,KAAK,QAAQ,CAAC,KAAK;gBACnB,CAAC;oBACG,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;oBAErC,MAAM;gBACV,CAAC;YACD,KAAK,QAAQ,CAAC,OAAO,CAAC;YACtB,KAAK,QAAQ,CAAC,KAAK;gBACnB,CAAC;oBACG,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;oBAErC,MAAM;gBACV,CAAC;YACD,KAAK,QAAQ,CAAC,WAAW;gBACzB,CAAC;oBACG,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;oBAErC,MAAM;gBACV,CAAC;YACD,KAAK,QAAQ,CAAC,OAAO;gBACrB,CAAC;oBACG,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;oBAErC,MAAM;gBACV,CAAC;QACL,CAAC;IACL,CAAC;IAED,uEAAuE;IAEvE;;;;OAIG;IACO,QAAQ,CAAC,WAAmB,EAAE,KAAa;QAEjD,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAExC,IAAG,KAAK,IAAI,CAAC,EACb,CAAC;YACG,MAAM,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;YAC9C,MAAM,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAE/C,OAAO,CAAC,cAAc,CAAC,SAAS,EAAG,WAAW,KAAK,GAAG,CAAC,CAAC;YACxD,OAAO,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,EAAE,WAAW,KAAK,GAAG,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,EAAE,CAAC;QACvB,CAAC;aAED,CAAC;YACG,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,WAAW,KAAK,GAAG,CAAC,CAAC;QAClD,CAAC;IACL,CAAC;CACJ,CAAA;AAxEY,oBAAoB;IADhC,QAAQ,EAAE;GACE,oBAAoB,CAwEhC","sourcesContent":["import {LoggerSink} from '../../interfaces';\nimport {LogLevel, LoggerOptions, MessageLog} from '../../types';\nimport {SinkType} from '../../decorators';\n\n/**\n * Sink that is used for storing logs using browser developer console\n */\n@SinkType()\nexport class DeveloperConsoleSink implements LoggerSink\n{\n //######################### public methods - implementation of LoggerSink #########################\n\n /**\n * @inheritdoc\n */\n public log(options: LoggerOptions, loggerProperties: Record<string, unknown>, messageLog: MessageLog): void\n {\n const fullMessage = `%c${messageLog.buildMessage(options.messageTemplate ?? '{{messageLog}}', loggerProperties)}`;\n \n switch(messageLog.logLevel)\n {\n default:\n case LogLevel.Off:\n {\n break;\n }\n case LogLevel.Error:\n case LogLevel.Fatal:\n {\n this.writeLog(fullMessage, 'FF3131');\n\n break;\n }\n case LogLevel.Verbose:\n case LogLevel.Debug:\n {\n this.writeLog(fullMessage, '31A1FF');\n\n break;\n }\n case LogLevel.Information:\n {\n this.writeLog(fullMessage, 'ffffff');\n\n break;\n }\n case LogLevel.Warning:\n {\n this.writeLog(fullMessage, 'FFC531');\n\n break;\n }\n }\n }\n\n //######################### protected methods #########################\n\n /**\n * Writes message to log\n * @param fullMessage - Full message to be written\n * @param color - Color of message\n */\n protected writeLog(fullMessage: string, color: string): void\n {\n const index = fullMessage.indexOf('\\n');\n\n if(index >= 0)\n {\n const firstLine = fullMessage.slice(0, index);\n const restLines = fullMessage.slice(index + 1);\n\n console.groupCollapsed(firstLine, `color: #${color};`);\n console.log(`%c${restLines}`, `color: #${color};`);\n console.groupEnd();\n }\n else\n {\n console.log(fullMessage, `color: #${color};`);\n }\n }\n}"]}
@@ -1 +1 @@
1
- {"version":3,"file":"logLevelEnricher.enricher.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/logLevelEnricher/logLevelEnricher.enricher.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAa,MAAM,aAAa,CAAC;AAEjD,MAAM,SAAS,GAAG,UAAU,CAAC;AAC7B,MAAM,eAAe,GAAG,eAAe,CAAC;AAExC;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAEzB,uGAAuG;IAEvG;;OAEG;IACI,MAAM,CAAC,UAAmC,EAAE,UAA+C;QAE9F,UAAU,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAEtD,QAAO,UAAU,CAAC,QAAQ,EAC1B;YACI,KAAK,QAAQ,CAAC,KAAK;gBACnB;oBACI,UAAU,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC;oBAEpC,MAAM;iBACT;YACD,KAAK,QAAQ,CAAC,OAAO;gBACrB;oBACI,UAAU,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC;oBAEpC,MAAM;iBACT;YACD,KAAK,QAAQ,CAAC,WAAW;gBACzB;oBACI,UAAU,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC;oBAEpC,MAAM;iBACT;YACD,KAAK,QAAQ,CAAC,KAAK;gBACnB;oBACI,UAAU,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC;oBAEpC,MAAM;iBACT;YACD,KAAK,QAAQ,CAAC,KAAK;gBACnB;oBACI,UAAU,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC;oBAEpC,MAAM;iBACT;YACD,KAAK,QAAQ,CAAC,OAAO;gBACrB;oBACI,UAAU,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC;oBAEpC,MAAM;iBACT;YACD,KAAK,QAAQ,CAAC,GAAG;gBACjB;oBACI,MAAM;iBACT;SACJ;IACL,CAAC;CAEJ","sourcesContent":["import {LoggerEnricher} from '../../interfaces';\nimport {LogLevel, MessageLog} from '../../types';\n\nconst LOG_LEVEL = 'logLevel';\nconst LOG_LEVEL_SHORT = 'logLevelShort';\n\n/**\n * Enricher used for adding logLevel and logLevelShort properties\n */\nexport class LogLevelEnricher implements LoggerEnricher\n{\n //######################### public methods - implementation of LoggerEnricher #########################\n\n /**\n * @inheritdoc\n */\n public enrich(properties: Record<string, unknown>, messageLog: MessageLog<Record<string, unknown>>): void\n {\n properties[LOG_LEVEL] = LogLevel[messageLog.logLevel];\n \n switch(messageLog.logLevel)\n {\n case LogLevel.Debug:\n {\n properties[LOG_LEVEL_SHORT] = 'DBG';\n\n break;\n }\n case LogLevel.Verbose:\n {\n properties[LOG_LEVEL_SHORT] = 'VER';\n\n break;\n }\n case LogLevel.Information:\n {\n properties[LOG_LEVEL_SHORT] = 'INF';\n\n break;\n }\n case LogLevel.Error:\n {\n properties[LOG_LEVEL_SHORT] = 'ERR';\n\n break;\n }\n case LogLevel.Fatal:\n {\n properties[LOG_LEVEL_SHORT] = 'FTL';\n\n break;\n }\n case LogLevel.Warning:\n {\n properties[LOG_LEVEL_SHORT] = 'WRN';\n\n break;\n }\n case LogLevel.Off:\n {\n break;\n }\n }\n }\n\n}"]}
1
+ {"version":3,"file":"logLevelEnricher.enricher.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/logLevelEnricher/logLevelEnricher.enricher.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAa,MAAM,aAAa,CAAC;AAEjD,MAAM,SAAS,GAAG,UAAU,CAAC;AAC7B,MAAM,eAAe,GAAG,eAAe,CAAC;AAExC;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAEzB,uGAAuG;IAEvG;;OAEG;IACI,MAAM,CAAC,UAAmC,EAAE,UAA+C;QAE9F,UAAU,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAEtD,QAAO,UAAU,CAAC,QAAQ,EAC1B,CAAC;YACG,KAAK,QAAQ,CAAC,KAAK;gBACnB,CAAC;oBACG,UAAU,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC;oBAEpC,MAAM;gBACV,CAAC;YACD,KAAK,QAAQ,CAAC,OAAO;gBACrB,CAAC;oBACG,UAAU,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC;oBAEpC,MAAM;gBACV,CAAC;YACD,KAAK,QAAQ,CAAC,WAAW;gBACzB,CAAC;oBACG,UAAU,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC;oBAEpC,MAAM;gBACV,CAAC;YACD,KAAK,QAAQ,CAAC,KAAK;gBACnB,CAAC;oBACG,UAAU,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC;oBAEpC,MAAM;gBACV,CAAC;YACD,KAAK,QAAQ,CAAC,KAAK;gBACnB,CAAC;oBACG,UAAU,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC;oBAEpC,MAAM;gBACV,CAAC;YACD,KAAK,QAAQ,CAAC,OAAO;gBACrB,CAAC;oBACG,UAAU,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC;oBAEpC,MAAM;gBACV,CAAC;YACD,KAAK,QAAQ,CAAC,GAAG;gBACjB,CAAC;oBACG,MAAM;gBACV,CAAC;QACL,CAAC;IACL,CAAC;CAEJ","sourcesContent":["import {LoggerEnricher} from '../../interfaces';\nimport {LogLevel, MessageLog} from '../../types';\n\nconst LOG_LEVEL = 'logLevel';\nconst LOG_LEVEL_SHORT = 'logLevelShort';\n\n/**\n * Enricher used for adding logLevel and logLevelShort properties\n */\nexport class LogLevelEnricher implements LoggerEnricher\n{\n //######################### public methods - implementation of LoggerEnricher #########################\n\n /**\n * @inheritdoc\n */\n public enrich(properties: Record<string, unknown>, messageLog: MessageLog<Record<string, unknown>>): void\n {\n properties[LOG_LEVEL] = LogLevel[messageLog.logLevel];\n \n switch(messageLog.logLevel)\n {\n case LogLevel.Debug:\n {\n properties[LOG_LEVEL_SHORT] = 'DBG';\n\n break;\n }\n case LogLevel.Verbose:\n {\n properties[LOG_LEVEL_SHORT] = 'VER';\n\n break;\n }\n case LogLevel.Information:\n {\n properties[LOG_LEVEL_SHORT] = 'INF';\n\n break;\n }\n case LogLevel.Error:\n {\n properties[LOG_LEVEL_SHORT] = 'ERR';\n\n break;\n }\n case LogLevel.Fatal:\n {\n properties[LOG_LEVEL_SHORT] = 'FTL';\n\n break;\n }\n case LogLevel.Warning:\n {\n properties[LOG_LEVEL_SHORT] = 'WRN';\n\n break;\n }\n case LogLevel.Off:\n {\n break;\n }\n }\n }\n\n}"]}
@@ -8,7 +8,6 @@ import * as i1 from "../../types";
8
8
  * Default implementation of `Logger`
9
9
  */
10
10
  export class DefaultLogger {
11
- options;
12
11
  //######################### constructor #########################
13
12
  constructor(options) {
14
13
  this.options = options;
@@ -89,10 +88,10 @@ export class DefaultLogger {
89
88
  }
90
89
  }
91
90
  }
92
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: DefaultLogger, deps: [{ token: i1.LoggerOptions }], target: i0.ɵɵFactoryTarget.Injectable });
93
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: DefaultLogger });
91
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DefaultLogger, deps: [{ token: i1.LoggerOptions }], target: i0.ɵɵFactoryTarget.Injectable }); }
92
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DefaultLogger }); }
94
93
  }
95
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: DefaultLogger, decorators: [{
94
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DefaultLogger, decorators: [{
96
95
  type: Injectable
97
96
  }], ctorParameters: () => [{ type: i1.LoggerOptions }] });
98
97
  //# sourceMappingURL=logger.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.service.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/logger/logger.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAChE,OAAO,EAAC,aAAa,EAAE,YAAY,EAAC,MAAM,YAAY,CAAC;;;AAGvD;;GAEG;AAEH,MAAM,OAAO,aAAa;IAGA;IADtB,iEAAiE;IACjE,YAAsB,OAAsB;QAAtB,YAAO,GAAP,OAAO,CAAe;IAE5C,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,KAAK,CAAC,eAAuB,EAAE,UAAoC;QAEtE,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAC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AAI,CAAC,OAAO,EAAE,gBAAgB,EAAE,UAAU,CAAC,CAAC;iBACxD;aACJ;SACJ;IACL,CAAC;uGA5GQ,aAAa;2GAAb,aAAa;;2FAAb,aAAa;kBADzB,UAAU","sourcesContent":["import {Injectable} from '@angular/core';\nimport {isBlank} from '@jscrpt/common';\n\nimport {LogLevel, LoggerOptions, MessageLog} from '../../types';\nimport {loggerEnabled, useEnrichers} from '../../misc';\nimport {Logger} from './logger.interface';\n\n/**\n * Default implementation of `Logger`\n */\n@Injectable()\nexport class DefaultLogger implements Logger\n{\n //######################### constructor #########################\n constructor(protected options: LoggerOptions,)\n {\n }\n\n //######################### public methods - implementation of Logger #########################\n\n /**\n * @inheritdoc\n */\n public fatal(messageTemplate: string, properties?: Record<string, unknown>): void\n {\n this.log(messageTemplate, LogLevel.Fatal, properties);\n }\n\n /**\n * @inheritdoc\n */\n public error(messageTemplate: string, properties?: Record<string, unknown>): void\n {\n this.log(messageTemplate, LogLevel.Error, properties);\n }\n\n /**\n * @inheritdoc\n */\n public warn(messageTemplate: string, properties?: Record<string, unknown>): void\n {\n this.log(messageTemplate, LogLevel.Warning, properties);\n }\n\n /**\n * @inheritdoc\n */\n public info(messageTemplate: string, properties?: Record<string, unknown>): void\n {\n this.log(messageTemplate, LogLevel.Information, properties);\n }\n\n /**\n * @inheritdoc\n */\n public debug(messageTemplate: string, properties?: Record<string, unknown>): void\n {\n this.log(messageTemplate, LogLevel.Debug, properties);\n }\n\n /**\n * @inheritdoc\n */\n public verbose(messageTemplate: string, properties?: Record<string, unknown>): void\n {\n this.log(messageTemplate, LogLevel.Verbose, properties);\n }\n\n //######################### protected methods #########################\n\n /**\n * Performs log logic\n * @param messageTemplate - Message template of log to be used for logging\n * @param level - Log level to be logged\n * @param properties - Properties provided by message log\n */\n protected log(messageTemplate: string, level: LogLevel, properties?: Record<string, unknown>): void\n {\n const defaultLogLevelSinks = this.options.loggerSinks.filter(itm => isBlank(itm.minimumLogLevel));\n const customLogLevelSinks = this.options.loggerSinks.filter(itm => !isBlank(itm.minimumLogLevel));\n let loggerProperties: Record<string, unknown>;\n const messageLog = new MessageLog(messageTemplate, level, properties ?? {});\n let loggerFilterResult: boolean;\n\n //only if logger is enabled\n if(loggerEnabled(this.options.minimumLogLevel, level))\n {\n loggerProperties ??= useEnrichers(messageLog, this.options.enrichers);\n loggerFilterResult = (!this.options.filter || this.options.filter(loggerProperties, messageLog));\n\n if(loggerFilterResult)\n {\n for(const sink of defaultLogLevelSinks)\n {\n sink.log(this.options, loggerProperties, messageLog);\n }\n }\n }\n\n //custom log level loggers\n for(const sink of customLogLevelSinks)\n {\n if(loggerEnabled(sink.minimumLogLevel, level))\n {\n loggerProperties ??= useEnrichers(messageLog, this.options.enrichers);\n loggerFilterResult ??= (!this.options.filter || this.options.filter(loggerProperties, messageLog));\n const sinkProperties =\n {\n ...loggerProperties,\n ...useEnrichers(messageLog, sink.enrichers ?? []),\n };\n const filter = loggerFilterResult && (!sink.filter || sink.filter(sinkProperties, messageLog));\n\n if(filter)\n {\n sink.log(this.options, loggerProperties, messageLog);\n }\n }\n }\n }\n}"]}
1
+ {"version":3,"file":"logger.service.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/logger/logger.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAChE,OAAO,EAAC,aAAa,EAAE,YAAY,EAAC,MAAM,YAAY,CAAC;;;AAGvD;;GAEG;AAEH,MAAM,OAAO,aAAa;IAEtB,iEAAiE;IACjE,YAAsB,OAAsB;QAAtB,YAAO,GAAP,OAAO,CAAe;IAE5C,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,KAAK,CAAC,eAAuB,EAAE,UAAoC;QAEtE,IAAI,CAAC,GAAG,CAAC,eA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AM,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC;gBAE/F,IAAG,MAAM,EACT,CAAC;oBACG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,gBAAgB,EAAE,UAAU,CAAC,CAAC;gBACzD,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;8GA5GQ,aAAa;kHAAb,aAAa;;2FAAb,aAAa;kBADzB,UAAU","sourcesContent":["import {Injectable} from '@angular/core';\nimport {isBlank} from '@jscrpt/common';\n\nimport {LogLevel, LoggerOptions, MessageLog} from '../../types';\nimport {loggerEnabled, useEnrichers} from '../../misc';\nimport {Logger} from './logger.interface';\n\n/**\n * Default implementation of `Logger`\n */\n@Injectable()\nexport class DefaultLogger implements Logger\n{\n //######################### constructor #########################\n constructor(protected options: LoggerOptions,)\n {\n }\n\n //######################### public methods - implementation of Logger #########################\n\n /**\n * @inheritdoc\n */\n public fatal(messageTemplate: string, properties?: Record<string, unknown>): void\n {\n this.log(messageTemplate, LogLevel.Fatal, properties);\n }\n\n /**\n * @inheritdoc\n */\n public error(messageTemplate: string, properties?: Record<string, unknown>): void\n {\n this.log(messageTemplate, LogLevel.Error, properties);\n }\n\n /**\n * @inheritdoc\n */\n public warn(messageTemplate: string, properties?: Record<string, unknown>): void\n {\n this.log(messageTemplate, LogLevel.Warning, properties);\n }\n\n /**\n * @inheritdoc\n */\n public info(messageTemplate: string, properties?: Record<string, unknown>): void\n {\n this.log(messageTemplate, LogLevel.Information, properties);\n }\n\n /**\n * @inheritdoc\n */\n public debug(messageTemplate: string, properties?: Record<string, unknown>): void\n {\n this.log(messageTemplate, LogLevel.Debug, properties);\n }\n\n /**\n * @inheritdoc\n */\n public verbose(messageTemplate: string, properties?: Record<string, unknown>): void\n {\n this.log(messageTemplate, LogLevel.Verbose, properties);\n }\n\n //######################### protected methods #########################\n\n /**\n * Performs log logic\n * @param messageTemplate - Message template of log to be used for logging\n * @param level - Log level to be logged\n * @param properties - Properties provided by message log\n */\n protected log(messageTemplate: string, level: LogLevel, properties?: Record<string, unknown>): void\n {\n const defaultLogLevelSinks = this.options.loggerSinks.filter(itm => isBlank(itm.minimumLogLevel));\n const customLogLevelSinks = this.options.loggerSinks.filter(itm => !isBlank(itm.minimumLogLevel));\n let loggerProperties: Record<string, unknown>;\n const messageLog = new MessageLog(messageTemplate, level, properties ?? {});\n let loggerFilterResult: boolean;\n\n //only if logger is enabled\n if(loggerEnabled(this.options.minimumLogLevel, level))\n {\n loggerProperties ??= useEnrichers(messageLog, this.options.enrichers);\n loggerFilterResult = (!this.options.filter || this.options.filter(loggerProperties, messageLog));\n\n if(loggerFilterResult)\n {\n for(const sink of defaultLogLevelSinks)\n {\n sink.log(this.options, loggerProperties, messageLog);\n }\n }\n }\n\n //custom log level loggers\n for(const sink of customLogLevelSinks)\n {\n if(loggerEnabled(sink.minimumLogLevel, level))\n {\n loggerProperties ??= useEnrichers(messageLog, this.options.enrichers);\n loggerFilterResult ??= (!this.options.filter || this.options.filter(loggerProperties, messageLog));\n const sinkProperties =\n {\n ...loggerProperties,\n ...useEnrichers(messageLog, sink.enrichers ?? []),\n };\n const filter = loggerFilterResult && (!sink.filter || sink.filter(sinkProperties, messageLog));\n\n if(filter)\n {\n sink.log(this.options, loggerProperties, messageLog);\n }\n }\n }\n }\n}"]}
@@ -11,29 +11,25 @@ import { LogLevel } from '../../types';
11
11
  * Sink that is used for storing logs using REST
12
12
  */
13
13
  let RestSink = class RestSink {
14
- //######################### protected fields #########################
15
- /**
16
- * Array of unflushed logs
17
- */
18
- logs = [];
19
- /**
20
- * Interval timer id
21
- */
22
- timer;
23
- /**
24
- * Configuration options for rest sink
25
- */
26
- options = inject(RestSinkOptions);
27
- /**
28
- * Indication whether is app stable
29
- */
30
- isStable = inject(APP_STABLE);
31
- /**
32
- * Rest client used for sending logs through REST
33
- */
34
- restClient = inject(LOGGER_REST_CLIENT);
35
14
  //######################### constructor #########################
36
15
  constructor() {
16
+ //######################### protected fields #########################
17
+ /**
18
+ * Array of unflushed logs
19
+ */
20
+ this.logs = [];
21
+ /**
22
+ * Configuration options for rest sink
23
+ */
24
+ this.options = inject(RestSinkOptions);
25
+ /**
26
+ * Indication whether is app stable
27
+ */
28
+ this.isStable = inject(APP_STABLE);
29
+ /**
30
+ * Rest client used for sending logs through REST
31
+ */
32
+ this.restClient = inject(LOGGER_REST_CLIENT);
37
33
  if (!(this.options instanceof RestSinkOptions)) {
38
34
  this.options = new RestSinkOptions();
39
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"rest.sink.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/rest/rest.sink.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AACrC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAC,aAAa,EAAC,MAAM,MAAM,CAAC;AAEnC,OAAO,EAAC,eAAe,EAAC,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,kBAAkB,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAC,QAAQ,EAA4B,MAAM,aAAa,CAAC;AAEhE;;GAEG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAQ;IAEjB,sEAAsE;IAEtE;;OAEG;IACO,IAAI,GAAc,EAAE,CAAC;IAE/B;;OAEG;IACO,KAAK,CAAwB;IAEvC;;OAEG;IACO,OAAO,GAAoB,MAAM,CAAC,eAAe,CAAC,CAAC;IAE7D;;OAEG;IACO,QAAQ,GAAkB,MAAM,CAAC,UAAU,CAAC,CAAC;IAEvD;;OAEG;IACO,UAAU,GAAqB,MAAM,CAAC,kBAAkB,CAAC,CAAC;IAEpE,iEAAiE;IACjE;QAEI,IAAG,CAAC,CAAC,IAAI,CAAC,OAAO,YAAY,eAAe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B,EACxE;YACI,IAAI,CAAC,KAAK,EAAE,CAAC;SAChB;IACL,CAAC;IAED;;OAEG;IACO,KAAK;QAEX,IAAI,OAAgC,CAAC;QAErC,mBAAmB;QACnB,IAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EACpB;YACI,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;SAC5B;QAED,IACA;YACI,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;SAC3D;QACD,OAAM,CAAC,EACP;YACI,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SAClB;QAED,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QAEf,OAAO,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IACxC,CAAC;CACJ,CAAA;AArHY,QAAQ;IADpB,QAAQ,EAAE;;GACE,QAAQ,CAqHpB","sourcesContent":["import {inject} from '@angular/core';\nimport {isPresent} from '@jscrpt/common';\nimport {lastValueFrom} from 'rxjs';\n\nimport {RestSinkOptions} from './restSink.options';\nimport {SinkType} from '../../decorators';\nimport {LoggerRestClient, LoggerSink, RestLog} from '../../interfaces';\nimport {APP_STABLE} from '../../../../utils';\nimport {LOGGER_REST_CLIENT, loggerEnabled} from '../../misc';\nimport {LogLevel, LoggerOptions, MessageLog} from '../../types';\n\n/**\n * Sink that is used for storing logs using REST\n */\n@SinkType()\nexport class RestSink implements LoggerSink\n{\n //######################### protected fields #########################\n\n /**\n * Array of unflushed logs\n */\n protected logs: RestLog[] = [];\n\n /**\n * Interval timer id\n */\n protected timer: number|undefined|null;\n\n /**\n * Configuration options for rest sink\n */\n protected options: RestSinkOptions = inject(RestSinkOptions);\n\n /**\n * Indication whether is app stable\n */\n protected isStable: Promise<void> = inject(APP_STABLE);\n\n /**\n * Rest client used for sending logs through REST\n */\n protected restClient: LoggerRestClient = inject(LOGGER_REST_CLIENT);\n\n //######################### constructor #########################\n constructor()\n {\n if(!(this.options instanceof RestSinkOptions))\n {\n this.options = new RestSinkOptions();\n }\n\n this.isStable.then(() =>\n {\n this.timer = setInterval(() =>\n {\n this.flush();\n }, (this.options.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 * @inheritdoc\n */\n public log(options: LoggerOptions, loggerProperties: Record<string, unknown>, messageLog: MessageLog): void\n {\n let forceFlush = false;\n\n const fullMessage = `${messageLog.buildMessage(options.messageTemplate ?? '{{messageLog}}', loggerProperties)}`;\n\n this.logs.push(\n {\n logLevel: LogLevel[messageLog.logLevel].toUpperCase(),\n message: fullMessage,\n timestamp: messageLog.timestamp,\n });\n\n if(loggerEnabled(() => this.options.immediateFlushMinLevel, messageLog.logLevel))\n {\n forceFlush = true;\n }\n\n //flush if number of records is bigger than max or flush is required\n if(forceFlush || this.logs.length >= this.options.flushAfterNumberOfLogs)\n {\n this.flush();\n }\n }\n\n /**\n * Flushes logs\n */\n protected flush(): Promise<void>\n {\n let promise: Promise<void>|undefined;\n\n //no logs available\n if(!this.logs.length)\n {\n return Promise.resolve();\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();\n }\n}"]}
1
+ {"version":3,"file":"rest.sink.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/rest/rest.sink.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AACrC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAC,aAAa,EAAC,MAAM,MAAM,CAAC;AAEnC,OAAO,EAAC,eAAe,EAAC,MAAM,oBA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ArHY,QAAQ;IADpB,QAAQ,EAAE;;GACE,QAAQ,CAqHpB","sourcesContent":["import {inject} from '@angular/core';\nimport {isPresent} from '@jscrpt/common';\nimport {lastValueFrom} from 'rxjs';\n\nimport {RestSinkOptions} from './restSink.options';\nimport {SinkType} from '../../decorators';\nimport {LoggerRestClient, LoggerSink, RestLog} from '../../interfaces';\nimport {APP_STABLE} from '../../../../utils';\nimport {LOGGER_REST_CLIENT, loggerEnabled} from '../../misc';\nimport {LogLevel, LoggerOptions, MessageLog} from '../../types';\n\n/**\n * Sink that is used for storing logs using REST\n */\n@SinkType()\nexport class RestSink implements LoggerSink\n{\n //######################### protected fields #########################\n\n /**\n * Array of unflushed logs\n */\n protected logs: RestLog[] = [];\n\n /**\n * Interval timer id\n */\n protected timer: number|undefined|null;\n\n /**\n * Configuration options for rest sink\n */\n protected options: RestSinkOptions = inject(RestSinkOptions);\n\n /**\n * Indication whether is app stable\n */\n protected isStable: Promise<void> = inject(APP_STABLE);\n\n /**\n * Rest client used for sending logs through REST\n */\n protected restClient: LoggerRestClient = inject(LOGGER_REST_CLIENT);\n\n //######################### constructor #########################\n constructor()\n {\n if(!(this.options instanceof RestSinkOptions))\n {\n this.options = new RestSinkOptions();\n }\n\n this.isStable.then(() =>\n {\n this.timer = setInterval(() =>\n {\n this.flush();\n }, (this.options.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 * @inheritdoc\n */\n public log(options: LoggerOptions, loggerProperties: Record<string, unknown>, messageLog: MessageLog): void\n {\n let forceFlush = false;\n\n const fullMessage = `${messageLog.buildMessage(options.messageTemplate ?? '{{messageLog}}', loggerProperties)}`;\n\n this.logs.push(\n {\n logLevel: LogLevel[messageLog.logLevel].toUpperCase(),\n message: fullMessage,\n timestamp: messageLog.timestamp,\n });\n\n if(loggerEnabled(() => this.options.immediateFlushMinLevel, messageLog.logLevel))\n {\n forceFlush = true;\n }\n\n //flush if number of records is bigger than max or flush is required\n if(forceFlush || this.logs.length >= this.options.flushAfterNumberOfLogs)\n {\n this.flush();\n }\n }\n\n /**\n * Flushes logs\n */\n protected flush(): Promise<void>\n {\n let promise: Promise<void>|undefined;\n\n //no logs available\n if(!this.logs.length)\n {\n return Promise.resolve();\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();\n }\n}"]}