@anglr/common 19.2.0-beta.20240125053304 → 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 (344) hide show
  1. package/changelog.md +81 -6
  2. package/es2022/date-fns/src/misc/utils.js.map +1 -1
  3. package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js +5 -4
  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 +12 -17
  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 +11 -10
  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 +38 -49
  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 +23 -19
  152. package/es2022/src/modules/commonUtils.module.js.map +1 -1
  153. package/es2022/src/modules/debugData/components/debugData/debugData.component.js +9 -46
  154. package/es2022/src/modules/debugData/components/debugData/debugData.component.js.map +1 -1
  155. package/es2022/src/modules/debugData/modules/debugData.module.js +6 -10
  156. package/es2022/src/modules/debugData/modules/debugData.module.js.map +1 -1
  157. package/es2022/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +13 -26
  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 +29 -81
  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 +2 -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 +29 -0
  230. package/es2022/src/pipes/trimText/trimText.pipe.js.map +1 -0
  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/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.d.ts +2 -2
  283. package/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.d.ts.map +1 -1
  284. package/material/src/modules/debugDataCopyClick.module.d.ts +3 -3
  285. package/material/src/modules/debugDataCopyClick.module.d.ts.map +1 -1
  286. package/package.json +54 -57
  287. package/readme.md +0 -1
  288. package/router/src/decorators/moduleRoutes.decorator.d.ts.map +1 -1
  289. package/src/components/collapsibleIcon/collapsibleIcon.component.d.ts +3 -3
  290. package/src/components/collapsibleIcon/collapsibleIcon.component.d.ts.map +1 -1
  291. package/src/components/collapsibleTitle/collapsibleTitle.component.d.ts +3 -3
  292. package/src/components/collapsibleTitle/collapsibleTitle.component.d.ts.map +1 -1
  293. package/src/directives/bodyRender/bodyRender.directive.d.ts +3 -3
  294. package/src/directives/bodyRender/bodyRender.directive.d.ts.map +1 -1
  295. package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts +3 -3
  296. package/src/directives/ellipsisTooltip/ellipsisTooltip.directive.d.ts.map +1 -1
  297. package/src/directives/goBack/goBack.directive.d.ts +3 -3
  298. package/src/directives/goBack/goBack.directive.d.ts.map +1 -1
  299. package/src/directives/positionTo/positionTo.directive.d.ts +2 -2
  300. package/src/directives/positionTo/positionTo.directive.d.ts.map +1 -1
  301. package/src/modules/commonUtils.module.d.ts +2 -1
  302. package/src/modules/commonUtils.module.d.ts.map +1 -1
  303. package/src/modules/debugData/components/debugData/debugData.component.css +1 -0
  304. package/src/modules/debugData/components/debugData/debugData.component.d.ts +4 -24
  305. package/src/modules/debugData/components/debugData/debugData.component.d.ts.map +1 -1
  306. package/src/modules/debugData/components/debugData/debugData.component.html +4 -3
  307. package/src/modules/debugData/modules/debugData.module.d.ts +1 -2
  308. package/src/modules/debugData/modules/debugData.module.d.ts.map +1 -1
  309. package/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.d.ts +2 -10
  310. package/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.d.ts.map +1 -1
  311. package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts +7 -8
  312. package/src/modules/tooltip/directives/tooltip/tooltip.directive.d.ts.map +1 -1
  313. package/src/pipes/displayProperties/displayProperties.pipe.d.ts +3 -3
  314. package/src/pipes/displayProperties/displayProperties.pipe.d.ts.map +1 -1
  315. package/src/pipes/index.d.ts +2 -0
  316. package/src/pipes/index.d.ts.map +1 -1
  317. package/src/pipes/isNaN/isNaN.pipe.d.ts +3 -3
  318. package/src/pipes/isNaN/isNaN.pipe.d.ts.map +1 -1
  319. package/src/pipes/isPresent/isPresent.pipe.d.ts +3 -3
  320. package/src/pipes/isPresent/isPresent.pipe.d.ts.map +1 -1
  321. package/src/pipes/keys/keys.pipe.d.ts +3 -3
  322. package/src/pipes/keys/keys.pipe.d.ts.map +1 -1
  323. package/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.d.ts +4 -4
  324. package/{numeral/src/pipes → src/pipes/numeral}/numeral.pipe.d.ts.map +1 -1
  325. package/src/pipes/trimText/trimText.pipe.d.ts +17 -0
  326. package/src/pipes/trimText/trimText.pipe.d.ts.map +1 -0
  327. package/src/pipes/urlEncode/urlEncode.pipe.d.ts +3 -3
  328. package/src/pipes/urlEncode/urlEncode.pipe.d.ts.map +1 -1
  329. package/src/services/position/position.interface.d.ts +10 -10
  330. package/src/services/position/position.interface.d.ts.map +1 -1
  331. package/styles/core/_mixins.scss +14 -0
  332. package/styles/core/_theme.scss +4 -0
  333. package/version.bak +1 -1
  334. package/es2022/forms/src/modules/requiredClass.module.js +0 -19
  335. package/es2022/forms/src/modules/requiredClass.module.js.map +0 -1
  336. package/es2022/numeral/src/index.js +0 -2
  337. package/es2022/numeral/src/index.js.map +0 -1
  338. package/es2022/numeral/src/pipes/numeral.pipe.js.map +0 -1
  339. package/forms/src/modules/requiredClass.module.d.ts +0 -11
  340. package/forms/src/modules/requiredClass.module.d.ts.map +0 -1
  341. package/numeral/package.json +0 -8
  342. package/numeral/src/index.d.ts +0 -2
  343. package/numeral/src/index.d.ts.map +0 -1
  344. package/src/style.scss +0 -87
@@ -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,OAA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AK,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;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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AU,CAAC,CAAC,CAAC;gBAE/F,IAAG,MAAM,EACT;oBACI,IAAI,CAAC,GAAG,CAAC,IAAI,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;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,MAAM,GAAG,kBAAkB,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,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,CA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UAAU,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,sBAAsB,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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AEf,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}"]}
@@ -7,21 +7,21 @@ import * as i1 from "../../types";
7
7
  * Options for rest sink
8
8
  */
9
9
  export class RestSinkOptions {
10
- //######################### public properties #########################
11
- /**
12
- * Number of seconds after which should be flush called
13
- */
14
- secondsToFlushAfter = 300;
15
- /**
16
- * Number of logs after which should be flush called
17
- */
18
- flushAfterNumberOfLogs = 50;
19
- /**
20
- * Minimal log level that will be flushed immediately
21
- */
22
- immediateFlushMinLevel = LogLevel.Error;
23
10
  //######################### constructor #########################
24
11
  constructor(secondsToFlushAfter, flushAfterNumberOfLogs, immediateFlushMinLevel) {
12
+ //######################### public properties #########################
13
+ /**
14
+ * Number of seconds after which should be flush called
15
+ */
16
+ this.secondsToFlushAfter = 300;
17
+ /**
18
+ * Number of logs after which should be flush called
19
+ */
20
+ this.flushAfterNumberOfLogs = 50;
21
+ /**
22
+ * Minimal log level that will be flushed immediately
23
+ */
24
+ this.immediateFlushMinLevel = LogLevel.Error;
25
25
  if (isPresent(secondsToFlushAfter)) {
26
26
  this.secondsToFlushAfter = secondsToFlushAfter;
27
27
  }
@@ -32,10 +32,10 @@ export class RestSinkOptions {
32
32
  this.immediateFlushMinLevel = immediateFlushMinLevel;
33
33
  }
34
34
  }
35
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: RestSinkOptions, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
36
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: RestSinkOptions, providedIn: 'root', useFactory: () => new RestSinkOptions() });
35
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: RestSinkOptions, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable }); }
36
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: RestSinkOptions, providedIn: 'root', useFactory: () => new RestSinkOptions() }); }
37
37
  }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: RestSinkOptions, decorators: [{
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: RestSinkOptions, decorators: [{
39
39
  type: Injectable,
40
40
  args: [{ providedIn: 'root', useFactory: () => new RestSinkOptions() }]
41
41
  }], ctorParameters: () => [{ type: undefined }, { type: undefined }, { type: i1.LogLevel }] });
@@ -1 +1 @@
1
- {"version":3,"file":"restSink.options.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/rest/restSink.options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;;;AAErC;;GAEG;AAEH,MAAM,OAAO,eAAe;IAExB,uEAAuE;IAEvE;;OAEG;IACI,mBAAmB,GAAW,GAAG,CAAC;IAEzC;;OAEG;IACI,sBAAsB,GAAW,EAAE,CAAC;IAE3C;;OAEG;IACI,sBAAsB,GAAa,QAAQ,CAAC,KAAK,CAAC;IAEzD,iEAAiE;IACjE,YAAY,mBAA4B,EAC5B,sBAA+B,EAC/B,sBAAiC;QAEzC,IAAG,SAAS,CAAC,mBAAmB,CAAC,EACjC;YACI,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;SAClD;QAED,IAAG,SAAS,CAAC,sBAAsB,CAAC,EACpC;YACI,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;SACxD;QAED,IAAG,SAAS,CAAC,sBAAsB,CAAC,EACpC;YACI,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;SACxD;IACL,CAAC;uGAtCQ,eAAe;2GAAf,eAAe,cADH,MAAM,cAAc,GAAG,EAAE,CAAC,IAAI,eAAe,EAAE;;2FAC3D,eAAe;kBAD3B,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,qBAAqB,EAAC","sourcesContent":["import {Injectable} from '@angular/core';\nimport {isPresent} from '@jscrpt/common';\n\nimport {LogLevel} from '../../types';\n\n/**\n * Options for rest sink\n */\n@Injectable({providedIn: 'root', useFactory: () => new RestSinkOptions()})\nexport class RestSinkOptions\n{\n //######################### public properties #########################\n\n /**\n * Number of seconds after which should be flush called\n */\n public secondsToFlushAfter: number = 300;\n\n /**\n * Number of logs after which should be flush called\n */\n public flushAfterNumberOfLogs: number = 50;\n\n /**\n * Minimal log level that will be flushed immediately\n */\n public immediateFlushMinLevel: LogLevel = LogLevel.Error;\n\n //######################### constructor #########################\n constructor(secondsToFlushAfter?: number,\n flushAfterNumberOfLogs?: number,\n immediateFlushMinLevel?: LogLevel,)\n {\n if(isPresent(secondsToFlushAfter))\n {\n this.secondsToFlushAfter = secondsToFlushAfter;\n }\n\n if(isPresent(flushAfterNumberOfLogs))\n {\n this.flushAfterNumberOfLogs = flushAfterNumberOfLogs;\n }\n\n if(isPresent(immediateFlushMinLevel))\n {\n this.immediateFlushMinLevel = immediateFlushMinLevel;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"restSink.options.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/rest/restSink.options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;;;AAErC;;GAEG;AAEH,MAAM,OAAO,eAAe;IAmBxB,iEAAiE;IACjE,YAAY,mBAA4B,EAC5B,sBAA+B,EAC/B,sBAAiC;QApB7C,uEAAuE;QAEvE;;WAEG;QACI,wBAAmB,GAAW,GAAG,CAAC;QAEzC;;WAEG;QACI,2BAAsB,GAAW,EAAE,CAAC;QAE3C;;WAEG;QACI,2BAAsB,GAAa,QAAQ,CAAC,KAAK,CAAC;QAOrD,IAAG,SAAS,CAAC,mBAAmB,CAAC,EACjC,CAAC;YACG,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QACnD,CAAC;QAED,IAAG,SAAS,CAAC,sBAAsB,CAAC,EACpC,CAAC;YACG,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;QACzD,CAAC;QAED,IAAG,SAAS,CAAC,sBAAsB,CAAC,EACpC,CAAC;YACG,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;QACzD,CAAC;IACL,CAAC;8GAtCQ,eAAe;kHAAf,eAAe,cADH,MAAM,cAAc,GAAG,EAAE,CAAC,IAAI,eAAe,EAAE;;2FAC3D,eAAe;kBAD3B,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,qBAAqB,EAAC","sourcesContent":["import {Injectable} from '@angular/core';\nimport {isPresent} from '@jscrpt/common';\n\nimport {LogLevel} from '../../types';\n\n/**\n * Options for rest sink\n */\n@Injectable({providedIn: 'root', useFactory: () => new RestSinkOptions()})\nexport class RestSinkOptions\n{\n //######################### public properties #########################\n\n /**\n * Number of seconds after which should be flush called\n */\n public secondsToFlushAfter: number = 300;\n\n /**\n * Number of logs after which should be flush called\n */\n public flushAfterNumberOfLogs: number = 50;\n\n /**\n * Minimal log level that will be flushed immediately\n */\n public immediateFlushMinLevel: LogLevel = LogLevel.Error;\n\n //######################### constructor #########################\n constructor(secondsToFlushAfter?: number,\n flushAfterNumberOfLogs?: number,\n immediateFlushMinLevel?: LogLevel,)\n {\n if(isPresent(secondsToFlushAfter))\n {\n this.secondsToFlushAfter = secondsToFlushAfter;\n }\n\n if(isPresent(flushAfterNumberOfLogs))\n {\n this.flushAfterNumberOfLogs = flushAfterNumberOfLogs;\n }\n\n if(isPresent(immediateFlushMinLevel))\n {\n this.immediateFlushMinLevel = immediateFlushMinLevel;\n }\n }\n}\n"]}
@@ -2,7 +2,6 @@
2
2
  * Sink that is used as sub logger
3
3
  */
4
4
  export class SubLoggerSink {
5
- loggerOptions;
6
5
  //######################### public properties - implementation of LoggerSink #########################
7
6
  /**
8
7
  * @inheritdoc
@@ -1 +1 @@
1
- {"version":3,"file":"subLogger.sink.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/subLoggerSink/subLogger.sink.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,OAAO,aAAa;IA6BA;IA3BtB,sGAAsG;IAEtG;;OAEG;IACH,IAAW,SAAS;QAEhB,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QAEb,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,IAAW,eAAe;QAEtB,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC;IAC9C,CAAC;IAED,iEAAiE;IACjE,YAAsB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAGlD,CAAC;IAED,mGAAmG;IAEnG;;OAEG;IACI,GAAG,CAAC,OAAsB,EAAE,gBAAyC,EAAE,UAA+C;QAEzH,KAAI,MAAM,IAAI,IAAI,IAAI,CAAC,aAAa,CAAC,WAAW,EAChD;YACI,IAAI,CAAC,GAAG,CAAC;gBACI,SAAS,EAAE,EAAE;gBACb,MAAM,EAAE,SAAS;gBACjB,WAAW,EAAE,EAAE;gBACf,kBAAkB,EAAE,IAAI,CAAC,aAAa,CAAC,kBAAkB,IAAI,OAAO,CAAC,kBAAkB;gBACvF,eAAe,EAAE,IAAI,CAAC,aAAa,CAAC,eAAe,IAAI,OAAO,CAAC,eAAe;gBAC9E,eAAe,EAAE,SAAS;aAC7B,EACD,gBAAgB,EAChB,UAAU,CAAE,CAAC;SACzB;IACL,CAAC;CACJ","sourcesContent":["import {LoggerEnricher, LoggerFilter, LoggerSink} from '../../interfaces';\nimport {MinLogLevelGetter} from '../../misc';\nimport {LoggerOptions, MessageLog} from '../../types';\n\n/**\n * Sink that is used as sub logger\n */\nexport class SubLoggerSink implements LoggerSink\n{\n //######################### public properties - implementation of LoggerSink #########################\n\n /**\n * @inheritdoc\n */\n public get enrichers(): LoggerEnricher[]\n {\n return this.loggerOptions.enrichers;\n }\n\n /**\n * @inheritdoc\n */\n public get filter(): LoggerFilter|undefined|null\n {\n return this.loggerOptions.filter;\n }\n\n /**\n * @inheritdoc\n */\n public get minimumLogLevel(): MinLogLevelGetter|undefined|null\n {\n return this.loggerOptions.minimumLogLevel;\n }\n\n //######################### constructor #########################\n constructor(protected loggerOptions: LoggerOptions,)\n {\n\n }\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 for(const sink of this.loggerOptions.loggerSinks)\n {\n sink.log({\n enrichers: [],\n filter: undefined,\n loggerSinks: [],\n messageLengthLimit: this.loggerOptions.messageLengthLimit ?? options.messageLengthLimit,\n messageTemplate: this.loggerOptions.messageTemplate ?? options.messageTemplate,\n minimumLogLevel: undefined,\n },\n loggerProperties,\n messageLog,);\n }\n }\n}"]}
1
+ {"version":3,"file":"subLogger.sink.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/subLoggerSink/subLogger.sink.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,OAAO,aAAa;IAEtB,sGAAsG;IAEtG;;OAEG;IACH,IAAW,SAAS;QAEhB,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QAEb,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,IAAW,eAAe;QAEtB,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC;IAC9C,CAAC;IAED,iEAAiE;IACjE,YAAsB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAGlD,CAAC;IAED,mGAAmG;IAEnG;;OAEG;IACI,GAAG,CAAC,OAAsB,EAAE,gBAAyC,EAAE,UAA+C;QAEzH,KAAI,MAAM,IAAI,IAAI,IAAI,CAAC,aAAa,CAAC,WAAW,EAChD,CAAC;YACG,IAAI,CAAC,GAAG,CAAC;gBACI,SAAS,EAAE,EAAE;gBACb,MAAM,EAAE,SAAS;gBACjB,WAAW,EAAE,EAAE;gBACf,kBAAkB,EAAE,IAAI,CAAC,aAAa,CAAC,kBAAkB,IAAI,OAAO,CAAC,kBAAkB;gBACvF,eAAe,EAAE,IAAI,CAAC,aAAa,CAAC,eAAe,IAAI,OAAO,CAAC,eAAe;gBAC9E,eAAe,EAAE,SAAS;aAC7B,EACD,gBAAgB,EAChB,UAAU,CAAE,CAAC;QAC1B,CAAC;IACL,CAAC;CACJ","sourcesContent":["import {LoggerEnricher, LoggerFilter, LoggerSink} from '../../interfaces';\nimport {MinLogLevelGetter} from '../../misc';\nimport {LoggerOptions, MessageLog} from '../../types';\n\n/**\n * Sink that is used as sub logger\n */\nexport class SubLoggerSink implements LoggerSink\n{\n //######################### public properties - implementation of LoggerSink #########################\n\n /**\n * @inheritdoc\n */\n public get enrichers(): LoggerEnricher[]\n {\n return this.loggerOptions.enrichers;\n }\n\n /**\n * @inheritdoc\n */\n public get filter(): LoggerFilter|undefined|null\n {\n return this.loggerOptions.filter;\n }\n\n /**\n * @inheritdoc\n */\n public get minimumLogLevel(): MinLogLevelGetter|undefined|null\n {\n return this.loggerOptions.minimumLogLevel;\n }\n\n //######################### constructor #########################\n constructor(protected loggerOptions: LoggerOptions,)\n {\n\n }\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 for(const sink of this.loggerOptions.loggerSinks)\n {\n sink.log({\n enrichers: [],\n filter: undefined,\n loggerSinks: [],\n messageLengthLimit: this.loggerOptions.messageLengthLimit ?? options.messageLengthLimit,\n messageTemplate: this.loggerOptions.messageTemplate ?? options.messageTemplate,\n minimumLogLevel: undefined,\n },\n loggerProperties,\n messageLog,);\n }\n }\n}"]}
@@ -6,25 +6,16 @@ import { SubLoggerSink } from '../services';
6
6
  * Implementation of logger configuration
7
7
  */
8
8
  export class LoggerConfigurationImpl {
9
- //######################### protected fields #########################
10
- /**
11
- * Configuration for minimum log level
12
- */
13
- config;
14
- /**
15
- * Logger enricher types
16
- */
17
- loggerEnricherTypes = [];
18
- /**
19
- * Array of logger sinks configs
20
- */
21
- sinks = [];
22
- /**
23
- * Options that are currently configured
24
- */
25
- options;
26
9
  //######################### constructor #########################
27
10
  constructor(options = new LoggerOptions()) {
11
+ /**
12
+ * Logger enricher types
13
+ */
14
+ this.loggerEnricherTypes = [];
15
+ /**
16
+ * Array of logger sinks configs
17
+ */
18
+ this.sinks = [];
28
19
  this.options = options;
29
20
  }
30
21
  //######################### public methods - implementation of LoggerConfiguration #########################
@@ -1 +1 @@
1
- {"version":3,"file":"loggerConfiguration.js","sourceRoot":"","sources":["../../../../../src/modules/logger/types/loggerConfiguration.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C,GAAG,CAAC,CAAC;gBAEZ,OAAO,IAAI,aAAa,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;aAChD;QACL,CAAC,CAAC,CAAC,CAAC;QAEJ,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;CACJ","sourcesContent":["import {isFunction, isPresent} from '@jscrpt/common';\n\nimport {LoggerConfiguration, LoggerEnricherType, LoggerFilter} from '../interfaces';\nimport {MinimumLevelConfig, WriteToConfig} from '../misc';\nimport {LoggerOptions} from './loggerOptions';\nimport {isLoggerSinkType} from '../decorators';\nimport {SubLoggerSink} from '../services';\n\n/**\n * Implementation of logger configuration\n */\nexport class LoggerConfigurationImpl implements LoggerConfiguration\n{\n //######################### protected fields #########################\n\n /**\n * Configuration for minimum log level\n */\n protected config: MinimumLevelConfig|undefined|null;\n\n /**\n * Logger enricher types\n */\n protected loggerEnricherTypes: LoggerEnricherType[] = [];\n\n /**\n * Array of logger sinks configs\n */\n protected sinks: WriteToConfig[] = [];\n\n /**\n * Options that are currently configured\n */\n protected options: LoggerOptions;\n\n //######################### constructor #########################\n constructor(options: LoggerOptions = new LoggerOptions())\n {\n this.options = options;\n }\n\n //######################### public methods - implementation of LoggerConfiguration #########################\n\n /**\n * @inheritdoc\n */\n public minimumLevel(config: MinimumLevelConfig): LoggerConfiguration\n {\n this.config = config;\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public messageTemplate(template: string): LoggerConfiguration\n {\n this.options.messageTemplate = template;\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public messageLengthLimit(limit: number|null|undefined): LoggerConfiguration\n {\n this.options.messageLengthLimit = limit;\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public enrichWith(loggerEnricherType: LoggerEnricherType): LoggerConfiguration\n {\n this.loggerEnricherTypes.push(loggerEnricherType);\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public filter(filter: LoggerFilter|null|undefined): LoggerConfiguration\n {\n this.options.filter = filter;\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public writeTo(config: WriteToConfig): LoggerConfiguration\n {\n this.sinks.push(config);\n\n return this;\n }\n\n //######################### public methods #########################\n\n /**\n * Builds logger options from configuration\n */\n public buildOptions(): LoggerOptions\n {\n if(isPresent(this.config))\n {\n const config = this.config;\n\n if(isFunction(config))\n {\n const minLevelCfg = config();\n\n if(isFunction(minLevelCfg))\n {\n this.options.minimumLogLevel = minLevelCfg;\n }\n else\n {\n this.options.minimumLogLevel = () => minLevelCfg;\n }\n }\n else\n {\n this.options.minimumLogLevel = () => config;\n }\n }\n\n this.options.enrichers.push(...this.loggerEnricherTypes.map(type => new type()));\n\n this.options.loggerSinks.push(...this.sinks.map(config =>\n {\n if(isLoggerSinkType(config))\n {\n return new config();\n }\n else\n {\n const cfg = new LoggerConfigurationImpl(\n {\n enrichers: [],\n loggerSinks: [],\n filter: undefined,\n messageLengthLimit: undefined,\n messageTemplate: undefined,\n minimumLogLevel: undefined,\n });\n\n config(cfg);\n\n return new SubLoggerSink(cfg.buildOptions());\n }\n }));\n\n return this.options;\n }\n}"]}
1
+ {"version":3,"file":"loggerConfiguration.js","sourceRoot":"","sources":["../../../../../src/modules/logger/types/loggerConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAIrD,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAE1C;;GAEG;AACH,MAAM,OAAO,uBAAuB;IAwBhC,iEAAiE;IACjE,YAAY,UAAyB,IAAI,aAAa,EAAE;QAhBxD;;WAEG;QACO,wBAAmB,GAAyB,EAAE,CAAC;QAEzD;;WAEG;QACO,UAAK,GAAoB,EAAE,CAAC;QAUlC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED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BACrD,CAAC;YACL,CAAC;iBAED,CAAC;gBACG,IAAI,CAAC,OAAO,CAAC,eAAe,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC;YAChD,CAAC;QACL,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;QAEjF,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;YAErD,IAAG,gBAAgB,CAAC,MAAM,CAAC,EAC3B,CAAC;gBACG,OAAO,IAAI,MAAM,EAAE,CAAC;YACxB,CAAC;iBAED,CAAC;gBACG,MAAM,GAAG,GAAG,IAAI,uBAAuB,CACvC;oBACI,SAAS,EAAE,EAAE;oBACb,WAAW,EAAE,EAAE;oBACf,MAAM,EAAE,SAAS;oBACjB,kBAAkB,EAAE,SAAS;oBAC7B,eAAe,EAAE,SAAS;oBAC1B,eAAe,EAAE,SAAS;iBAC7B,CAAC,CAAC;gBAEH,MAAM,CAAC,GAAG,CAAC,CAAC;gBAEZ,OAAO,IAAI,aAAa,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;YACjD,CAAC;QACL,CAAC,CAAC,CAAC,CAAC;QAEJ,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;CACJ","sourcesContent":["import {isFunction, isPresent} from '@jscrpt/common';\n\nimport {LoggerConfiguration, LoggerEnricherType, LoggerFilter} from '../interfaces';\nimport {MinimumLevelConfig, WriteToConfig} from '../misc';\nimport {LoggerOptions} from './loggerOptions';\nimport {isLoggerSinkType} from '../decorators';\nimport {SubLoggerSink} from '../services';\n\n/**\n * Implementation of logger configuration\n */\nexport class LoggerConfigurationImpl implements LoggerConfiguration\n{\n //######################### protected fields #########################\n\n /**\n * Configuration for minimum log level\n */\n protected config: MinimumLevelConfig|undefined|null;\n\n /**\n * Logger enricher types\n */\n protected loggerEnricherTypes: LoggerEnricherType[] = [];\n\n /**\n * Array of logger sinks configs\n */\n protected sinks: WriteToConfig[] = [];\n\n /**\n * Options that are currently configured\n */\n protected options: LoggerOptions;\n\n //######################### constructor #########################\n constructor(options: LoggerOptions = new LoggerOptions())\n {\n this.options = options;\n }\n\n //######################### public methods - implementation of LoggerConfiguration #########################\n\n /**\n * @inheritdoc\n */\n public minimumLevel(config: MinimumLevelConfig): LoggerConfiguration\n {\n this.config = config;\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public messageTemplate(template: string): LoggerConfiguration\n {\n this.options.messageTemplate = template;\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public messageLengthLimit(limit: number|null|undefined): LoggerConfiguration\n {\n this.options.messageLengthLimit = limit;\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public enrichWith(loggerEnricherType: LoggerEnricherType): LoggerConfiguration\n {\n this.loggerEnricherTypes.push(loggerEnricherType);\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public filter(filter: LoggerFilter|null|undefined): LoggerConfiguration\n {\n this.options.filter = filter;\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public writeTo(config: WriteToConfig): LoggerConfiguration\n {\n this.sinks.push(config);\n\n return this;\n }\n\n //######################### public methods #########################\n\n /**\n * Builds logger options from configuration\n */\n public buildOptions(): LoggerOptions\n {\n if(isPresent(this.config))\n {\n const config = this.config;\n\n if(isFunction(config))\n {\n const minLevelCfg = config();\n\n if(isFunction(minLevelCfg))\n {\n this.options.minimumLogLevel = minLevelCfg;\n }\n else\n {\n this.options.minimumLogLevel = () => minLevelCfg;\n }\n }\n else\n {\n this.options.minimumLogLevel = () => config;\n }\n }\n\n this.options.enrichers.push(...this.loggerEnricherTypes.map(type => new type()));\n\n this.options.loggerSinks.push(...this.sinks.map(config =>\n {\n if(isLoggerSinkType(config))\n {\n return new config();\n }\n else\n {\n const cfg = new LoggerConfigurationImpl(\n {\n enrichers: [],\n loggerSinks: [],\n filter: undefined,\n messageLengthLimit: undefined,\n messageTemplate: undefined,\n minimumLogLevel: undefined,\n });\n\n config(cfg);\n\n return new SubLoggerSink(cfg.buildOptions());\n }\n }));\n\n return this.options;\n }\n}"]}
@@ -5,35 +5,37 @@ import * as i0 from "@angular/core";
5
5
  * Options for logger that are used during logging
6
6
  */
7
7
  export class LoggerOptions {
8
- //######################### public properties #########################
9
- /**
10
- * Minimal log level, that is used for logging, logs with lower log level are ignored
11
- */
12
- minimumLogLevel = () => LogLevel.Information;
13
- /**
14
- * Maximal allowed length of message, if it is exceeded it is trimmed
15
- */
16
- messageLengthLimit = 500;
17
- /**
18
- * Logger message template that is used for creating message log, message log itself is inside `messageLog` property
19
- */
20
- messageTemplate = '{{messageLog}}';
21
- /**
22
- * Array of enrichers that allows extending logger properties
23
- */
24
- enrichers = [];
25
- /**
26
- * Filter that filters out message logs
27
- */
28
- filter = undefined;
29
- /**
30
- * Array of logger sinks that do actual logging
31
- */
32
- loggerSinks = [];
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: LoggerOptions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
34
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: LoggerOptions, providedIn: 'root' });
8
+ constructor() {
9
+ //######################### public properties #########################
10
+ /**
11
+ * Minimal log level, that is used for logging, logs with lower log level are ignored
12
+ */
13
+ this.minimumLogLevel = () => LogLevel.Information;
14
+ /**
15
+ * Maximal allowed length of message, if it is exceeded it is trimmed
16
+ */
17
+ this.messageLengthLimit = 500;
18
+ /**
19
+ * Logger message template that is used for creating message log, message log itself is inside `messageLog` property
20
+ */
21
+ this.messageTemplate = '{{messageLog}}';
22
+ /**
23
+ * Array of enrichers that allows extending logger properties
24
+ */
25
+ this.enrichers = [];
26
+ /**
27
+ * Filter that filters out message logs
28
+ */
29
+ this.filter = undefined;
30
+ /**
31
+ * Array of logger sinks that do actual logging
32
+ */
33
+ this.loggerSinks = [];
34
+ }
35
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: LoggerOptions, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
36
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: LoggerOptions, providedIn: 'root' }); }
35
37
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: LoggerOptions, decorators: [{
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: LoggerOptions, decorators: [{
37
39
  type: Injectable,
38
40
  args: [{ providedIn: 'root' }]
39
41
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"loggerOptions.js","sourceRoot":"","sources":["../../../../../src/modules/logger/types/loggerOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAIzC,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;;AAEzC;;GAEG;AAEH,MAAM,OAAO,aAAa;IAEtB,uEAAuE;IAEvE;;OAEG;IACI,eAAe,GAAqC,GAAG,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC;IAEtF;;OAEG;IACI,kBAAkB,GAA0B,GAAG,CAAC;IAEvD;;OAEG;IACI,eAAe,GAA0B,gBAAgB,CAAC;IAEjE;;OAEG;IACI,SAAS,GAAqB,EAAE,CAAC;IAExC;;OAEG;IACI,MAAM,GAAgC,SAAS,CAAC;IAEvD;;OAEG;IACI,WAAW,GAAiB,EAAE,CAAC;uGAhC7B,aAAa;2GAAb,aAAa,cADD,MAAM;;2FAClB,aAAa;kBADzB,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC","sourcesContent":["import {Injectable} from '@angular/core';\n\nimport {LoggerEnricher, LoggerFilter, LoggerSink} from '../interfaces';\nimport {MinLogLevelGetter} from '../misc';\nimport {LogLevel} from './logLevel.enum';\n\n/**\n * Options for logger that are used during logging\n */\n@Injectable({providedIn: 'root'})\nexport class LoggerOptions\n{\n //######################### public properties #########################\n\n /**\n * Minimal log level, that is used for logging, logs with lower log level are ignored\n */\n public minimumLogLevel: MinLogLevelGetter|undefined|null = () => LogLevel.Information;\n\n /**\n * Maximal allowed length of message, if it is exceeded it is trimmed\n */\n public messageLengthLimit: number|undefined|null = 500;\n\n /**\n * Logger message template that is used for creating message log, message log itself is inside `messageLog` property\n */\n public messageTemplate: string|undefined|null = '{{messageLog}}';\n\n /**\n * Array of enrichers that allows extending logger properties\n */\n public enrichers: LoggerEnricher[] = [];\n\n /**\n * Filter that filters out message logs\n */\n public filter: LoggerFilter|undefined|null = undefined;\n\n /**\n * Array of logger sinks that do actual logging\n */\n public loggerSinks: LoggerSink[] = [];\n}"]}
1
+ {"version":3,"file":"loggerOptions.js","sourceRoot":"","sources":["../../../../../src/modules/logger/types/loggerOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAIzC,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;;AAEzC;;GAEG;AAEH,MAAM,OAAO,aAAa;IAD1B;QAGI,uEAAuE;QAEvE;;WAEG;QACI,oBAAe,GAAqC,GAAG,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC;QAEtF;;WAEG;QACI,uBAAkB,GAA0B,GAAG,CAAC;QAEvD;;WAEG;QACI,oBAAe,GAA0B,gBAAgB,CAAC;QAEjE;;WAEG;QACI,cAAS,GAAqB,EAAE,CAAC;QAExC;;WAEG;QACI,WAAM,GAAgC,SAAS,CAAC;QAEvD;;WAEG;QACI,gBAAW,GAAiB,EAAE,CAAC;KACzC;8GAjCY,aAAa;kHAAb,aAAa,cADD,MAAM;;2FAClB,aAAa;kBADzB,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC","sourcesContent":["import {Injectable} from '@angular/core';\n\nimport {LoggerEnricher, LoggerFilter, LoggerSink} from '../interfaces';\nimport {MinLogLevelGetter} from '../misc';\nimport {LogLevel} from './logLevel.enum';\n\n/**\n * Options for logger that are used during logging\n */\n@Injectable({providedIn: 'root'})\nexport class LoggerOptions\n{\n //######################### public properties #########################\n\n /**\n * Minimal log level, that is used for logging, logs with lower log level are ignored\n */\n public minimumLogLevel: MinLogLevelGetter|undefined|null = () => LogLevel.Information;\n\n /**\n * Maximal allowed length of message, if it is exceeded it is trimmed\n */\n public messageLengthLimit: number|undefined|null = 500;\n\n /**\n * Logger message template that is used for creating message log, message log itself is inside `messageLog` property\n */\n public messageTemplate: string|undefined|null = '{{messageLog}}';\n\n /**\n * Array of enrichers that allows extending logger properties\n */\n public enrichers: LoggerEnricher[] = [];\n\n /**\n * Filter that filters out message logs\n */\n public filter: LoggerFilter|undefined|null = undefined;\n\n /**\n * Array of logger sinks that do actual logging\n */\n public loggerSinks: LoggerSink[] = [];\n}"]}
@@ -3,24 +3,6 @@ import { formatString } from '@jscrpt/common';
3
3
  * Message log that contains all information that are used for displaying log
4
4
  */
5
5
  export class MessageLog {
6
- //######################### protected fields #########################
7
- /**
8
- * Datetime when was message created
9
- */
10
- now = new Date();
11
- //######################### public properties #########################
12
- /**
13
- * Message that is used as message template for log itself
14
- */
15
- message;
16
- /**
17
- * Log level of current message log
18
- */
19
- logLevel;
20
- /**
21
- * Properties that are "replaced" inside message
22
- */
23
- properties;
24
6
  /**
25
7
  * Gets timestamp as ISO string
26
8
  */
@@ -29,6 +11,11 @@ export class MessageLog {
29
11
  }
30
12
  //######################### constructor #########################
31
13
  constructor(message, logLevel, properties) {
14
+ //######################### protected fields #########################
15
+ /**
16
+ * Datetime when was message created
17
+ */
18
+ this.now = new Date();
32
19
  this.message = message;
33
20
  this.logLevel = logLevel;
34
21
  this.properties = properties;
@@ -1 +1 @@
1
- {"version":3,"file":"messageLog.js","sourceRoot":"","sources":["../../../../../src/modules/logger/types/messageLog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAI5C;;GAEG;AACH,MAAM,OAAO,UAAU;IAEnB,sEAAsE;IAEtE;;OAEG;IACO,GAAG,GAAS,IAAI,IAAI,EAAE,CAAC;IAEjC,uEAAuE;IAEvE;;OAEG;IACa,OAAO,CAAS;IAEhC;;OAEG;IACa,QAAQ,CAAW;IAEnC;;OAEG;IACa,UAAU,CAAc;IAExC;;OAEG;IACH,IAAW,SAAS;QAEhB,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;IAED,iEAAiE;IACjE,YAAY,OAAe,EAAE,QAAkB,EAAE,UAAuB;QAEpE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED,oEAAoE;IAEpE;;;;OAIG;IACI,YAAY,CAAC,eAAuB,EAAE,gBAAyC;QAElF,MAAM,UAAU,GAAG,EAAC,GAAG,IAAI,CAAC,UAAU,EAAC,CAAC;QAExC,KAAI,MAAM,QAAQ,IAAI,gBAAgB,EACtC;YACI,uDAAuD;YACvD,IAAG,CAAC,CAAC,QAAQ,IAAI,UAAU,CAAC,EAC5B;gBACK,UAAsC,CAAC,QAAQ,CAAC,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;aAClF;SACJ;QAED,MAAM,UAAU,GAAG,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC1D,gBAAgB,CAAC,UAAU,GAAG,UAAU,CAAC;QAEzC,OAAO,YAAY,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;IAC3D,CAAC;CACJ","sourcesContent":["import {formatString} from '@jscrpt/common';\n\nimport {LogLevel} from './logLevel.enum';\n\n/**\n * Message log that contains all information that are used for displaying log\n */\nexport class MessageLog<TProperties extends Record<string, unknown> = Record<string, unknown>>\n{\n //######################### protected fields #########################\n\n /**\n * Datetime when was message created\n */\n protected now: Date = new Date();\n\n //######################### public properties #########################\n\n /**\n * Message that is used as message template for log itself\n */\n public readonly message: string;\n\n /**\n * Log level of current message log\n */\n public readonly logLevel: LogLevel;\n\n /**\n * Properties that are \"replaced\" inside message\n */\n public readonly properties: TProperties;\n\n /**\n * Gets timestamp as ISO string\n */\n public get timestamp(): string\n {\n return this.now.toISOString();\n }\n\n //######################### constructor #########################\n constructor(message: string, logLevel: LogLevel, properties: TProperties)\n {\n this.message = message;\n this.logLevel = logLevel;\n this.properties = properties;\n }\n\n //######################### public methods #########################\n\n /**\n * Builds message that will be logged in logger sink\n * @param messageTemplate - Global message template for log\n * @param loggerProperties - Properties that are coming from logger itself\n */\n public buildMessage(messageTemplate: string, loggerProperties: Record<string, unknown>): string\n {\n const properties = {...this.properties};\n\n for(const property in loggerProperties)\n {\n //only add new properties, do not replace existing ones\n if(!(property in properties))\n {\n (properties as Record<string, unknown>)[property] = loggerProperties[property];\n }\n }\n\n const messageLog = formatString(this.message, properties);\n loggerProperties.messageLog = messageLog;\n \n return formatString(messageTemplate, loggerProperties);\n }\n}"]}
1
+ {"version":3,"file":"messageLog.js","sourceRoot":"","sources":["../../../../../src/modules/logger/types/messageLog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAI5C;;GAEG;AACH,MAAM,OAAO,UAAU;IA0BnB;;OAEG;IACH,IAAW,SAAS;QAEhB,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;IAED,iEAAiE;IACjE,YAAY,OAAe,EAAE,QAAkB,EAAE,UAAuB;QAjCxE,sEAAsE;QAEtE;;WAEG;QACO,QAAG,GAAS,IAAI,IAAI,EAAE,CAAC;QA8B7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED,oEAAoE;IAEpE;;;;OAIG;IACI,YAAY,CAAC,eAAuB,EAAE,gBAAyC;QAElF,MAAM,UAAU,GAAG,EAAC,GAAG,IAAI,CAAC,UAAU,EAAC,CAAC;QAExC,KAAI,MAAM,QAAQ,IAAI,gBAAgB,EACtC,CAAC;YACG,uDAAuD;YACvD,IAAG,CAAC,CAAC,QAAQ,IAAI,UAAU,CAAC,EAC5B,CAAC;gBACI,UAAsC,CAAC,QAAQ,CAAC,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;YACnF,CAAC;QACL,CAAC;QAED,MAAM,UAAU,GAAG,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC1D,gBAAgB,CAAC,UAAU,GAAG,UAAU,CAAC;QAEzC,OAAO,YAAY,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;IAC3D,CAAC;CACJ","sourcesContent":["import {formatString} from '@jscrpt/common';\n\nimport {LogLevel} from './logLevel.enum';\n\n/**\n * Message log that contains all information that are used for displaying log\n */\nexport class MessageLog<TProperties extends Record<string, unknown> = Record<string, unknown>>\n{\n //######################### protected fields #########################\n\n /**\n * Datetime when was message created\n */\n protected now: Date = new Date();\n\n //######################### public properties #########################\n\n /**\n * Message that is used as message template for log itself\n */\n public readonly message: string;\n\n /**\n * Log level of current message log\n */\n public readonly logLevel: LogLevel;\n\n /**\n * Properties that are \"replaced\" inside message\n */\n public readonly properties: TProperties;\n\n /**\n * Gets timestamp as ISO string\n */\n public get timestamp(): string\n {\n return this.now.toISOString();\n }\n\n //######################### constructor #########################\n constructor(message: string, logLevel: LogLevel, properties: TProperties)\n {\n this.message = message;\n this.logLevel = logLevel;\n this.properties = properties;\n }\n\n //######################### public methods #########################\n\n /**\n * Builds message that will be logged in logger sink\n * @param messageTemplate - Global message template for log\n * @param loggerProperties - Properties that are coming from logger itself\n */\n public buildMessage(messageTemplate: string, loggerProperties: Record<string, unknown>): string\n {\n const properties = {...this.properties};\n\n for(const property in loggerProperties)\n {\n //only add new properties, do not replace existing ones\n if(!(property in properties))\n {\n (properties as Record<string, unknown>)[property] = loggerProperties[property];\n }\n }\n\n const messageLog = formatString(this.message, properties);\n loggerProperties.messageLog = messageLog;\n \n return formatString(messageTemplate, loggerProperties);\n }\n}"]}