@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
@@ -1 +1 @@
1
- {"version":3,"file":"progressIndicator.service.js","sourceRoot":"","sources":["../../../../../src/modules/progressIndicator/services/progressIndicator.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACxE,OAAO,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAa,OAAO,EAAC,MAAM,MAAM,CAAC;AAEzC,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;;;AAEpE;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AA4BvD;;GAEG;AAEH,MAAM,OAAO,wBAAwB;IA6CF;IA3C/B,oEAAoE;IAEpE;;OAEG;IACK,UAAU,GAAY,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;IAErE;;OAEG;IACK,gBAAgB,GAA4C,EAAE,CAAC;IAEvE;;OAEG;IACK,YAAY,GAAoB,IAAI,OAAO,EAAU,CAAC;IAE9D;;OAEG;IACK,mBAAmB,GAA8B,EAAE,CAAC;IAE5D,uEAAuE;IAEvE;;OAEG;IACI,OAAO,GAA+B,EAAE,CAAC;IAEhD;;OAEG;IACI,QAAQ,GAAgC,EAAE,CAAC;IAElD;;OAEG;IACH,IAAW,WAAW;QAElB,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;IAC5C,CAAC;IAED,kEAAkE;IAClE,YAA+B,MAAiC;QAAjC,WAAM,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Q,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACK,SAAS,CAAC,IAAY;QAE1B,IAAI,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAExC,IAAG,SAAS,CAAC,KAAK,CAAC,EACnB;YACI,OAAO,KAAK,CAAC;SAChB;QAED,KAAK;YACL;gBACI,eAAe,EAAE,CAAC;gBAClB,OAAO,EAAE,KAAK;gBACd,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,IAAI;aAChB,CAAC;QAEF,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QAEpC,OAAO,KAAK,CAAC;IACjB,CAAC;uGA/XQ,wBAAwB;2GAAxB,wBAAwB,cADZ,MAAM;;2FAClB,wBAAwB;kBADpC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;0BA8Cf,QAAQ","sourcesContent":["import {Optional, Injectable, PLATFORM_ID, inject} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\nimport {isPresent, isBoolean, isBlank} from '@jscrpt/common';\nimport {Observable, Subject} from 'rxjs';\n\nimport {ProgressIndicatorOptions} from './progressIndicatorOptions';\n\n/**\n * Name of group for global progress indicator\n */\nexport const DEFAULT_PROGRESS_NAME = 'GLOBAL_PROGRESS';\n\n/**\n * Description of running requests group\n */\ninterface RunningProgressGroup\n{\n /**\n * Number of currently running requests for this progress group\n */\n runningRequests: number;\n\n /**\n * Indication that progress is running for this progress group\n */\n running: boolean;\n\n /**\n * Array of messages to be displayed for this progress group\n */\n messages?: string[];\n\n /**\n * Id of running timeout for this progress group\n */\n timeout?: any;\n}\n\n/**\n * Service that is used for displaying and hiding progress indicator\n */\n@Injectable({providedIn: 'root'})\nexport class ProgressIndicatorService\n{\n //######################### private fields #########################\n\n /**\n * Indication that current code is running in browser\n */\n private _isBrowser: boolean = isPlatformBrowser(inject(PLATFORM_ID));\n\n /**\n * Information about running progress for each group\n */\n private _runningRequests: {[group: string]: RunningProgressGroup} = {};\n\n /**\n * Used for invoking stateChange when state of one of progress groups have changed, passing name of group as parameter\n */\n private _stateChange: Subject<string> = new Subject<string>();\n\n /**\n * Object storing registered overlay groups\n */\n private _registeredOverlays: {[group: string]: number} = {};\n\n //######################### public properties #########################\n\n /**\n * Indications that progress is running for each group\n */\n public running: {[group: string]: boolean} = {};\n\n /**\n * Messages for each group\n */\n public messages: {[group: string]: string[]} = {};\n\n /**\n * Occurs when state of one of progress groups have changed, passing name of group as parameter\n */\n public get stateChange(): Observable<string>\n {\n return this._stateChange.asObservable();\n }\n\n //######################### constructors #########################\n constructor(@Optional() public config?: ProgressIndicatorOptions)\n {\n if(config && !(config instanceof ProgressIndicatorOptions))\n {\n this.config = undefined;\n console.warn('Provided configuration for \\'ProgressIndicatorService\\' is not of type \\'ProgressIndicatorOptions\\' and will be ignored!');\n }\n\n this._runningRequests[DEFAULT_PROGRESS_NAME] =\n {\n runningRequests: 0,\n running: false,\n messages: undefined,\n timeout: null\n };\n\n this._updateState();\n\n this.config = config || new ProgressIndicatorOptions();\n }\n\n //######################### public methods #########################\n\n /**\n * Displays progress indicator after short delay\n */\n public showProgress(): void;\n\n /**\n * Displays progress indicator after short delay\n * @param name - Name of progress group (separate counter)\n */\n public showProgress(name: string): void;\n\n /**\n * Displays progress indicator after short delay\n * @param messages - Array of messages to display what is happening\n */\n public showProgress(messages: string[]): void;\n\n /**\n * Displays progress indicator after short delay\n * @param name - Name of progress group (separate counter)\n * @param messages - Array of messages to display what is happening\n */\n public showProgress(name: string, messages: string[]): void;\n\n /**\n * Displays progress indicator after short delay\n * @param nameOrMessages - Name of progress group (separate counter) or Array of messages to display what is happening\n * @param messages - Array of messages to display what is happening\n */\n public showProgress(nameOrMessages?: string|string[], messages?: string[]): void\n {\n if(!this._isBrowser)\n {\n return;\n }\n\n let name: string = DEFAULT_PROGRESS_NAME;\n\n //first parameter is present\n if(isPresent(nameOrMessages))\n {\n if(Array.isArray(nameOrMessages))\n {\n messages = nameOrMessages;\n }\n else\n {\n name = nameOrMessages;\n }\n }\n\n name = this._getName(name);\n\n const group = this._getGroup(name);\n\n group.messages = [...(group.messages || []), ...(messages && messages.length ? messages : [])];\n\n if(!group.timeout && group.runningRequests < 1)\n {\n group.timeout = setTimeout(() =>\n {\n this._onRunning(name, true, group.messages);\n\n clearTimeout(group.timeout);\n group.timeout = null;\n }, this.config.timeout);\n }\n\n group.runningRequests++;\n }\n\n /**\n * Hides progress indicator\n */\n public hideProgress(): void;\n\n /**\n * Hides progress indicator\n * @param name - Name of progress group (separate counter)\n */\n public hideProgress(name: string): void;\n\n /**\n * Hides progress indicator\n * @param force - Indication that indicator should be hidden even if some processes are running\n */\n public hideProgress(force: boolean): void;\n\n /**\n * Hides progress indicator\n * @param name - Name of progress group (separate counter)\n * @param force - Indication that indicator should be hidden even if some processes are running\n */\n public hideProgress(name: string, force: boolean): void;\n\n /**\n * Hides progress indicator\n * @param nameOrForce - Name of progress group (separate counter) or Indication that indicator should be hidden even if some processes are running\n * @param force - Indication that indicator should be hidden even if some processes are running\n */\n public hideProgress(nameOrForce?: boolean | string, force?: boolean): void\n {\n if(!this._isBrowser)\n {\n return;\n }\n\n let name: string = DEFAULT_PROGRESS_NAME;\n\n //first parameter is present\n if(isPresent(nameOrForce))\n {\n if(isBoolean(nameOrForce))\n {\n force = nameOrForce as boolean;\n }\n else\n {\n name = nameOrForce as string;\n }\n }\n\n name = this._getName(name);\n\n const group = this._getGroup(name);\n\n if(force)\n {\n group.runningRequests = 0;\n }\n\n if(group.runningRequests > 0)\n {\n group.runningRequests--;\n }\n\n if(group.runningRequests < 1)\n {\n clearTimeout(group.timeout);\n group.timeout = null;\n this._onRunning(name, false, null);\n }\n }\n\n /**\n * Adds message to progress indicator group\n * @param message - Message to display what is happening\n */\n public addMessage(message: string): void;\n\n /**\n * Adds message to progress indicator group\n * @param name - Name of progress group (separate counter)\n * @param message - Message to display what is happening\n */\n public addMessage(name: string, message?: string): void;\n\n /**\n * Adds message to progress indicator group\n * @param nameOrMessage - Name of progress group (separate counter) or Message to display what is happening\n * @param message - Message to display what is happening\n */\n public addMessage(nameOrMessage?: string, message?: string): void\n {\n let name: string = DEFAULT_PROGRESS_NAME;\n\n if(isPresent(message))\n {\n name = nameOrMessage;\n }\n else\n {\n message = nameOrMessage;\n }\n\n name = this._getName(name);\n\n const group = this._getGroup(name);\n\n this._onRunning(name, group.running, [...(group.messages || []), message]);\n }\n\n /**\n * Clears all messages for progress group\n * @param name - Name of progress group (separate counter)\n */\n public clearMessages(name?: string): void\n {\n if(isBlank(name))\n {\n name = DEFAULT_PROGRESS_NAME;\n }\n\n name = this._getName(name);\n\n const group = this._getGroup(name);\n\n this._onRunning(name, group.running, null);\n }\n\n /**\n * Registers overlay group\n * @param name - Name of group to be registered\n * @internal\n */\n public registerOverlayGroup(name: string): void\n {\n if(!this._registeredOverlays[name])\n {\n this._registeredOverlays[name] = 0;\n }\n\n this._registeredOverlays[name]++;\n }\n\n /**\n * Unregisters overlay group\n * @param name - Name of group to be unregistered\n * @internal\n */\n public unregisterOverlayGroup(name: string): void\n {\n if(!this._registeredOverlays[name])\n {\n return;\n }\n\n this._registeredOverlays[name]--;\n\n if(this._registeredOverlays[name] <= 0)\n {\n delete this._registeredOverlays[name];\n }\n }\n\n //######################### private methods #########################\n\n /**\n * Gets name of group based on existance of this group\n * @param name - Name of group that is requested\n */\n private _getName(name: string): string\n {\n if(name == DEFAULT_PROGRESS_NAME || !this.config.fallbackToDefault)\n {\n return name;\n }\n\n if(this._registeredOverlays[name])\n {\n return name;\n }\n\n return DEFAULT_PROGRESS_NAME;\n }\n\n /**\n * Used for invoking 'stateChange' event\n * @param name - Name of group which has changes its state\n * @param value - Value whether is progress running\n * @param messages - Messages to be displayed for this group\n */\n private _onRunning(name: string, value: boolean, messages: string[])\n {\n const group = this._getGroup(name);\n\n group.running = value;\n group.messages = messages;\n\n this._updateState();\n this._stateChange.next(name);\n }\n\n /**\n * Updates state of progress indicator service\n */\n private _updateState()\n {\n const running: {[group: string]: boolean} = {};\n const messages: {[group: string]: string[]} = {};\n\n Object.keys(this._runningRequests).forEach(group =>\n {\n running[group] = this._runningRequests[group].running;\n messages[group] = this._runningRequests[group].messages;\n });\n\n this.running = running;\n this.messages = messages;\n }\n\n /**\n * Gets object for progress group\n * @param name - Name of group to be obtained\n */\n private _getGroup(name: string): RunningProgressGroup\n {\n let group = this._runningRequests[name];\n\n if(isPresent(group))\n {\n return group;\n }\n\n group =\n {\n runningRequests: 0,\n running: false,\n messages: null,\n timeout: null\n };\n\n this._runningRequests[name] = group;\n\n return group;\n }\n}\n"]}
1
+ {"version":3,"file":"progressIndicator.service.js","sourceRoot":"","sources":["../../../../../src/modules/progressIndicator/services/progressIndicator.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACxE,OAAO,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAa,OAAO,EAAC,MAAM,MAAM,CAAC;AAEzC,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;;;AAEpE;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AA4BvD;;GAEG;AAEH,MAAM,OAAO,wBAAwB;IAoCjC;;OAEG;IACH,IAAW,WAAW;QAElB,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;IAC5C,CAAC;IAED,kEAAkE;IAClE,YAA+B,MAAiC;QAAjC,WAAM,GAAN,MAAM,CAA2B;QA3ChE,oEAAoE;QAEpE;;WAEG;QACK,eAAU,GAAY,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;QAErE;;WAEG;QACK,qBAAgB,GAA4C,EAAE,CAAC;QAE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MAAM,OAAO,GAA+B,EAAE,CAAC;QAC/C,MAAM,QAAQ,GAAgC,EAAE,CAAC;QAEjD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YAE/C,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;YACtD,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC;QAC5D,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACK,SAAS,CAAC,IAAY;QAE1B,IAAI,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAExC,IAAG,SAAS,CAAC,KAAK,CAAC,EACnB,CAAC;YACG,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,KAAK;YACL;gBACI,eAAe,EAAE,CAAC;gBAClB,OAAO,EAAE,KAAK;gBACd,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,IAAI;aAChB,CAAC;QAEF,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QAEpC,OAAO,KAAK,CAAC;IACjB,CAAC;8GA/XQ,wBAAwB;kHAAxB,wBAAwB,cADZ,MAAM;;2FAClB,wBAAwB;kBADpC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;0BA8Cf,QAAQ","sourcesContent":["import {Optional, Injectable, PLATFORM_ID, inject} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\nimport {isPresent, isBoolean, isBlank} from '@jscrpt/common';\nimport {Observable, Subject} from 'rxjs';\n\nimport {ProgressIndicatorOptions} from './progressIndicatorOptions';\n\n/**\n * Name of group for global progress indicator\n */\nexport const DEFAULT_PROGRESS_NAME = 'GLOBAL_PROGRESS';\n\n/**\n * Description of running requests group\n */\ninterface RunningProgressGroup\n{\n /**\n * Number of currently running requests for this progress group\n */\n runningRequests: number;\n\n /**\n * Indication that progress is running for this progress group\n */\n running: boolean;\n\n /**\n * Array of messages to be displayed for this progress group\n */\n messages?: string[];\n\n /**\n * Id of running timeout for this progress group\n */\n timeout?: any;\n}\n\n/**\n * Service that is used for displaying and hiding progress indicator\n */\n@Injectable({providedIn: 'root'})\nexport class ProgressIndicatorService\n{\n //######################### private fields #########################\n\n /**\n * Indication that current code is running in browser\n */\n private _isBrowser: boolean = isPlatformBrowser(inject(PLATFORM_ID));\n\n /**\n * Information about running progress for each group\n */\n private _runningRequests: {[group: string]: RunningProgressGroup} = {};\n\n /**\n * Used for invoking stateChange when state of one of progress groups have changed, passing name of group as parameter\n */\n private _stateChange: Subject<string> = new Subject<string>();\n\n /**\n * Object storing registered overlay groups\n */\n private _registeredOverlays: {[group: string]: number} = {};\n\n //######################### public properties #########################\n\n /**\n * Indications that progress is running for each group\n */\n public running: {[group: string]: boolean} = {};\n\n /**\n * Messages for each group\n */\n public messages: {[group: string]: string[]} = {};\n\n /**\n * Occurs when state of one of progress groups have changed, passing name of group as parameter\n */\n public get stateChange(): Observable<string>\n {\n return this._stateChange.asObservable();\n }\n\n //######################### constructors #########################\n constructor(@Optional() public config?: ProgressIndicatorOptions)\n {\n if(config && !(config instanceof ProgressIndicatorOptions))\n {\n this.config = undefined;\n console.warn('Provided configuration for \\'ProgressIndicatorService\\' is not of type \\'ProgressIndicatorOptions\\' and will be ignored!');\n }\n\n this._runningRequests[DEFAULT_PROGRESS_NAME] =\n {\n runningRequests: 0,\n running: false,\n messages: undefined,\n timeout: null\n };\n\n this._updateState();\n\n this.config = config || new ProgressIndicatorOptions();\n }\n\n //######################### public methods #########################\n\n /**\n * Displays progress indicator after short delay\n */\n public showProgress(): void;\n\n /**\n * Displays progress indicator after short delay\n * @param name - Name of progress group (separate counter)\n */\n public showProgress(name: string): void;\n\n /**\n * Displays progress indicator after short delay\n * @param messages - Array of messages to display what is happening\n */\n public showProgress(messages: string[]): void;\n\n /**\n * Displays progress indicator after short delay\n * @param name - Name of progress group (separate counter)\n * @param messages - Array of messages to display what is happening\n */\n public showProgress(name: string, messages: string[]): void;\n\n /**\n * Displays progress indicator after short delay\n * @param nameOrMessages - Name of progress group (separate counter) or Array of messages to display what is happening\n * @param messages - Array of messages to display what is happening\n */\n public showProgress(nameOrMessages?: string|string[], messages?: string[]): void\n {\n if(!this._isBrowser)\n {\n return;\n }\n\n let name: string = DEFAULT_PROGRESS_NAME;\n\n //first parameter is present\n if(isPresent(nameOrMessages))\n {\n if(Array.isArray(nameOrMessages))\n {\n messages = nameOrMessages;\n }\n else\n {\n name = nameOrMessages;\n }\n }\n\n name = this._getName(name);\n\n const group = this._getGroup(name);\n\n group.messages = [...(group.messages || []), ...(messages && messages.length ? messages : [])];\n\n if(!group.timeout && group.runningRequests < 1)\n {\n group.timeout = setTimeout(() =>\n {\n this._onRunning(name, true, group.messages);\n\n clearTimeout(group.timeout);\n group.timeout = null;\n }, this.config.timeout);\n }\n\n group.runningRequests++;\n }\n\n /**\n * Hides progress indicator\n */\n public hideProgress(): void;\n\n /**\n * Hides progress indicator\n * @param name - Name of progress group (separate counter)\n */\n public hideProgress(name: string): void;\n\n /**\n * Hides progress indicator\n * @param force - Indication that indicator should be hidden even if some processes are running\n */\n public hideProgress(force: boolean): void;\n\n /**\n * Hides progress indicator\n * @param name - Name of progress group (separate counter)\n * @param force - Indication that indicator should be hidden even if some processes are running\n */\n public hideProgress(name: string, force: boolean): void;\n\n /**\n * Hides progress indicator\n * @param nameOrForce - Name of progress group (separate counter) or Indication that indicator should be hidden even if some processes are running\n * @param force - Indication that indicator should be hidden even if some processes are running\n */\n public hideProgress(nameOrForce?: boolean | string, force?: boolean): void\n {\n if(!this._isBrowser)\n {\n return;\n }\n\n let name: string = DEFAULT_PROGRESS_NAME;\n\n //first parameter is present\n if(isPresent(nameOrForce))\n {\n if(isBoolean(nameOrForce))\n {\n force = nameOrForce as boolean;\n }\n else\n {\n name = nameOrForce as string;\n }\n }\n\n name = this._getName(name);\n\n const group = this._getGroup(name);\n\n if(force)\n {\n group.runningRequests = 0;\n }\n\n if(group.runningRequests > 0)\n {\n group.runningRequests--;\n }\n\n if(group.runningRequests < 1)\n {\n clearTimeout(group.timeout);\n group.timeout = null;\n this._onRunning(name, false, null);\n }\n }\n\n /**\n * Adds message to progress indicator group\n * @param message - Message to display what is happening\n */\n public addMessage(message: string): void;\n\n /**\n * Adds message to progress indicator group\n * @param name - Name of progress group (separate counter)\n * @param message - Message to display what is happening\n */\n public addMessage(name: string, message?: string): void;\n\n /**\n * Adds message to progress indicator group\n * @param nameOrMessage - Name of progress group (separate counter) or Message to display what is happening\n * @param message - Message to display what is happening\n */\n public addMessage(nameOrMessage?: string, message?: string): void\n {\n let name: string = DEFAULT_PROGRESS_NAME;\n\n if(isPresent(message))\n {\n name = nameOrMessage;\n }\n else\n {\n message = nameOrMessage;\n }\n\n name = this._getName(name);\n\n const group = this._getGroup(name);\n\n this._onRunning(name, group.running, [...(group.messages || []), message]);\n }\n\n /**\n * Clears all messages for progress group\n * @param name - Name of progress group (separate counter)\n */\n public clearMessages(name?: string): void\n {\n if(isBlank(name))\n {\n name = DEFAULT_PROGRESS_NAME;\n }\n\n name = this._getName(name);\n\n const group = this._getGroup(name);\n\n this._onRunning(name, group.running, null);\n }\n\n /**\n * Registers overlay group\n * @param name - Name of group to be registered\n * @internal\n */\n public registerOverlayGroup(name: string): void\n {\n if(!this._registeredOverlays[name])\n {\n this._registeredOverlays[name] = 0;\n }\n\n this._registeredOverlays[name]++;\n }\n\n /**\n * Unregisters overlay group\n * @param name - Name of group to be unregistered\n * @internal\n */\n public unregisterOverlayGroup(name: string): void\n {\n if(!this._registeredOverlays[name])\n {\n return;\n }\n\n this._registeredOverlays[name]--;\n\n if(this._registeredOverlays[name] <= 0)\n {\n delete this._registeredOverlays[name];\n }\n }\n\n //######################### private methods #########################\n\n /**\n * Gets name of group based on existance of this group\n * @param name - Name of group that is requested\n */\n private _getName(name: string): string\n {\n if(name == DEFAULT_PROGRESS_NAME || !this.config.fallbackToDefault)\n {\n return name;\n }\n\n if(this._registeredOverlays[name])\n {\n return name;\n }\n\n return DEFAULT_PROGRESS_NAME;\n }\n\n /**\n * Used for invoking 'stateChange' event\n * @param name - Name of group which has changes its state\n * @param value - Value whether is progress running\n * @param messages - Messages to be displayed for this group\n */\n private _onRunning(name: string, value: boolean, messages: string[])\n {\n const group = this._getGroup(name);\n\n group.running = value;\n group.messages = messages;\n\n this._updateState();\n this._stateChange.next(name);\n }\n\n /**\n * Updates state of progress indicator service\n */\n private _updateState()\n {\n const running: {[group: string]: boolean} = {};\n const messages: {[group: string]: string[]} = {};\n\n Object.keys(this._runningRequests).forEach(group =>\n {\n running[group] = this._runningRequests[group].running;\n messages[group] = this._runningRequests[group].messages;\n });\n\n this.running = running;\n this.messages = messages;\n }\n\n /**\n * Gets object for progress group\n * @param name - Name of group to be obtained\n */\n private _getGroup(name: string): RunningProgressGroup\n {\n let group = this._runningRequests[name];\n\n if(isPresent(group))\n {\n return group;\n }\n\n group =\n {\n runningRequests: 0,\n running: false,\n messages: null,\n timeout: null\n };\n\n this._runningRequests[name] = group;\n\n return group;\n }\n}\n"]}
@@ -3,17 +3,17 @@ import { isPresent } from '@jscrpt/common';
3
3
  * Configuration object that is used by ProgressIndicatorService, overriding its properties allows you to customize configuration
4
4
  */
5
5
  export class ProgressIndicatorOptions {
6
- //######################### public properties #########################
7
- /**
8
- * Timeout length after which will be progress indication displayed
9
- */
10
- timeout = 220;
11
- /**
12
- * Indication whether fallback to default group name
13
- */
14
- fallbackToDefault = true;
15
6
  //######################### constructor #########################
16
7
  constructor(timeout, fallbackToDefault) {
8
+ //######################### public properties #########################
9
+ /**
10
+ * Timeout length after which will be progress indication displayed
11
+ */
12
+ this.timeout = 220;
13
+ /**
14
+ * Indication whether fallback to default group name
15
+ */
16
+ this.fallbackToDefault = true;
17
17
  if (isPresent(timeout)) {
18
18
  this.timeout = timeout;
19
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"progressIndicatorOptions.js","sourceRoot":"","sources":["../../../../../src/modules/progressIndicator/services/progressIndicatorOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC;;GAEG;AACH,MAAM,OAAO,wBAAwB;IAEjC,uEAAuE;IAEvE;;OAEG;IACI,OAAO,GAAW,GAAG,CAAC;IAE7B;;OAEG;IACI,iBAAiB,GAAY,IAAI,CAAC;IAEzC,iEAAiE;IACjE,YAAY,OAAgB,EAAE,iBAA2B;QAErD,IAAG,SAAS,CAAC,OAAO,CAAC,EACrB;YACI,IAAI,CAAC,OAAO,GAAG,OAAiB,CAAC;SACpC;QAED,IAAG,SAAS,CAAC,iBAAiB,CAAC,EAC/B;YACI,IAAI,CAAC,iBAAiB,GAAG,iBAA4B,CAAC;SACzD;IACL,CAAC;CACJ","sourcesContent":["import {isPresent} from '@jscrpt/common';\n\n/**\n * Configuration object that is used by ProgressIndicatorService, overriding its properties allows you to customize configuration\n */\nexport class ProgressIndicatorOptions\n{\n //######################### public properties #########################\n \n /**\n * Timeout length after which will be progress indication displayed\n */\n public timeout: number = 220;\n\n /**\n * Indication whether fallback to default group name\n */\n public fallbackToDefault: boolean = true;\n \n //######################### constructor #########################\n constructor(timeout?: number, fallbackToDefault?: boolean)\n {\n if(isPresent(timeout))\n {\n this.timeout = timeout as number;\n }\n\n if(isPresent(fallbackToDefault))\n {\n this.fallbackToDefault = fallbackToDefault as boolean;\n }\n }\n}"]}
1
+ {"version":3,"file":"progressIndicatorOptions.js","sourceRoot":"","sources":["../../../../../src/modules/progressIndicator/services/progressIndicatorOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC;;GAEG;AACH,MAAM,OAAO,wBAAwB;IAcjC,iEAAiE;IACjE,YAAY,OAAgB,EAAE,iBAA2B;QAbzD,uEAAuE;QAEvE;;WAEG;QACI,YAAO,GAAW,GAAG,CAAC;QAE7B;;WAEG;QACI,sBAAiB,GAAY,IAAI,CAAC;QAKrC,IAAG,SAAS,CAAC,OAAO,CAAC,EACrB,CAAC;YACG,IAAI,CAAC,OAAO,GAAG,OAAiB,CAAC;QACrC,CAAC;QAED,IAAG,SAAS,CAAC,iBAAiB,CAAC,EAC/B,CAAC;YACG,IAAI,CAAC,iBAAiB,GAAG,iBAA4B,CAAC;QAC1D,CAAC;IACL,CAAC;CACJ","sourcesContent":["import {isPresent} from '@jscrpt/common';\n\n/**\n * Configuration object that is used by ProgressIndicatorService, overriding its properties allows you to customize configuration\n */\nexport class ProgressIndicatorOptions\n{\n //######################### public properties #########################\n \n /**\n * Timeout length after which will be progress indication displayed\n */\n public timeout: number = 220;\n\n /**\n * Indication whether fallback to default group name\n */\n public fallbackToDefault: boolean = true;\n \n //######################### constructor #########################\n constructor(timeout?: number, fallbackToDefault?: boolean)\n {\n if(isPresent(timeout))\n {\n this.timeout = timeout as number;\n }\n\n if(isPresent(fallbackToDefault))\n {\n this.fallbackToDefault = fallbackToDefault as boolean;\n }\n }\n}"]}
@@ -5,38 +5,23 @@ import * as i1 from "@angular/common";
5
5
  * Component used for displaying tooltip content
6
6
  */
7
7
  export class TooltipComponent {
8
- changeDetector;
9
- element;
10
- //######################### protected fields #########################
11
- /**
12
- * Called when mouse enter tooltip component, hover
13
- */
14
- enterFn = () => null;
15
- /**
16
- * Called when mouse leaves tooltip component
17
- */
18
- leaveFn = () => null;
19
- //######################### public properties - implementation of TooltipRenderer #########################
20
- /**
21
- * Data that are rendered in tooltip
22
- */
23
- data;
24
- /**
25
- * Template used for rendering tooltip
26
- */
27
- template;
28
- /**
29
- * Indication whether are html tags allowed in tooltip text
30
- */
31
- allowHtml = false;
32
- /**
33
- * Css class that is applied to tooltip renderer component
34
- */
35
- cssClass;
36
8
  //######################### constructor #########################
37
9
  constructor(changeDetector, element) {
38
10
  this.changeDetector = changeDetector;
39
11
  this.element = element;
12
+ //######################### protected fields #########################
13
+ /**
14
+ * Called when mouse enter tooltip component, hover
15
+ */
16
+ this.enterFn = () => null;
17
+ /**
18
+ * Called when mouse leaves tooltip component
19
+ */
20
+ this.leaveFn = () => null;
21
+ /**
22
+ * Indication whether are html tags allowed in tooltip text
23
+ */
24
+ this.allowHtml = false;
40
25
  }
41
26
  //######################### public methods - implementation of TooltipRenderer #########################
42
27
  /**
@@ -72,10 +57,10 @@ export class TooltipComponent {
72
57
  mouseLeave() {
73
58
  this.leaveFn();
74
59
  }
75
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
76
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.5", type: TooltipComponent, selector: "tooltip-popup", host: { listeners: { "mouseenter": "mouseEnter()", "mouseleave": "mouseLeave()" } }, ngImport: i0, template: "<div *ngIf=\"!template && !allowHtml\">{{data}}</div>\r\n<div *ngIf=\"!template && allowHtml\" [innerHTML]=\"data\"></div>\r\n\r\n<ng-template [ngIf]=\"template\">\r\n <ng-container *ngTemplateOutlet=\"template; context: {$implicit: data}\"></ng-container>\r\n</ng-template>", styles: [":host\r\n{\r\n display: block;\r\n position: absolute;\r\n padding: 2px 4px;\r\n border-radius: 3px;\r\n font-size: 0.9em;\r\n max-width: 300px;\r\n user-select: text;\r\n}"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
60
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
61
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: TooltipComponent, selector: "tooltip-popup", host: { listeners: { "mouseenter": "mouseEnter()", "mouseleave": "mouseLeave()" } }, ngImport: i0, template: "<div *ngIf=\"!template && !allowHtml\">{{data}}</div>\r\n<div *ngIf=\"!template && allowHtml\" [innerHTML]=\"data\"></div>\r\n\r\n<ng-template [ngIf]=\"template\">\r\n <ng-container *ngTemplateOutlet=\"template; context: {$implicit: data}\"></ng-container>\r\n</ng-template>", styles: [":host\r\n{\r\n display: block;\r\n position: absolute;\r\n padding: 2px 4px;\r\n border-radius: 3px;\r\n font-size: 0.9em;\r\n max-width: 300px;\r\n user-select: text;\r\n}"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
77
62
  }
78
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: TooltipComponent, decorators: [{
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipComponent, decorators: [{
79
64
  type: Component,
80
65
  args: [{ selector: 'tooltip-popup', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"!template && !allowHtml\">{{data}}</div>\r\n<div *ngIf=\"!template && allowHtml\" [innerHTML]=\"data\"></div>\r\n\r\n<ng-template [ngIf]=\"template\">\r\n <ng-container *ngTemplateOutlet=\"template; context: {$implicit: data}\"></ng-container>\r\n</ng-template>", styles: [":host\r\n{\r\n display: block;\r\n position: absolute;\r\n padding: 2px 4px;\r\n border-radius: 3px;\r\n font-size: 0.9em;\r\n max-width: 300px;\r\n user-select: text;\r\n}"] }]
81
66
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { mouseEnter: [{
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.component.js","sourceRoot":"","sources":["../../../../../../src/modules/tooltip/components/tooltip/tooltip.component.ts","../../../../../../src/modules/tooltip/components/tooltip/tooltip.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAe,iBAAiB,EAAE,UAAU,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;;;AAM3H;;GAEG;AAQH,MAAM,OAAO,gBAAgB;IAqCH;IACA;IApCtB,sEAAsE;IAEtE;;OAEG;IACO,OAAO,GAAe,GAAG,EAAE,CAAC,IAAI,CAAC;IAE3C;;OAEG;IACO,OAAO,GAAe,GAAG,EAAE,CAAC,IAAI,CAAC;IAE3C,2GAA2G;IAE3G;;OAEG;IACI,IAAI,CAAuB;IAElC;;OAEG;IACI,QAAQ,CAA4D;IAE3E;;OAEG;IACI,SAAS,GAAY,KAAK,CAAC;IAElC;;OAEG;IACI,QAAQ,CAAwB;IAEvC,iEAAiE;IACjE,YAAsB,cAAiC,EACjC,OAAgC;QADhC,mBAAc,GAAd,cAAc,CAAmB;QACjC,YAAO,GAAP,OAAO,CAAyB;IAEtD,CAAC;IAED,wGAAwG;IAExG;;;;OAIG;IACI,mBAAmB,CAAC,KAAiB,EAAE,KAAiB;QAE3D,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED;;OAEG;IACI,iBAAiB;QAEpB,IAAG,IAAI,CAAC,QAAQ,EAChB;YACI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SAC3D;QAED,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC;IACxC,CAAC;IAED,8EAA8E;IAE9E;;;OAGG;IAEO,UAAU;QAEhB,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED;;;OAGG;IAEO,UAAU;QAEhB,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;uGAxFQ,gBAAgB;2FAAhB,gBAAgB,0IChB7B,uRAKc;;2FDWD,gBAAgB;kBAP5B,SAAS;+BAEI,eAAe,mBAGR,uBAAuB,CAAC,MAAM;+GA6ErC,UAAU;sBADnB,YAAY;uBAAC,YAAY;gBAWhB,UAAU;sBADnB,YAAY;uBAAC,YAAY","sourcesContent":["import {Component, ChangeDetectionStrategy, TemplateRef, ChangeDetectorRef, ElementRef, HostListener} from '@angular/core';\nimport {Invalidatable} from '@jscrpt/common';\n\nimport {TooltipTemplateContext} from '../../directives';\nimport {TooltipRenderer} from '../../misc/tooltip.interface';\n\n/**\n * Component used for displaying tooltip content\n */\n@Component(\n{\n selector: 'tooltip-popup',\n templateUrl: 'tooltip.component.html',\n styleUrls: ['tooltip.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TooltipComponent<TData = any> implements TooltipRenderer<TData>, Invalidatable\n{\n //######################### protected fields #########################\n\n /**\n * Called when mouse enter tooltip component, hover\n */\n protected enterFn: () => void = () => null;\n\n /**\n * Called when mouse leaves tooltip component\n */\n protected leaveFn: () => void = () => null;\n\n //######################### public properties - implementation of TooltipRenderer #########################\n\n /**\n * Data that are rendered in tooltip\n */\n public data: TData|null|undefined;\n\n /**\n * Template used for rendering tooltip\n */\n public template: TemplateRef<TooltipTemplateContext<TData>>|null|undefined;\n\n /**\n * Indication whether are html tags allowed in tooltip text\n */\n public allowHtml: boolean = false;\n\n /**\n * Css class that is applied to tooltip renderer component\n */\n public cssClass: string|null|undefined;\n\n //######################### constructor #########################\n constructor(protected changeDetector: ChangeDetectorRef,\n protected element: ElementRef<HTMLElement>)\n {\n }\n\n //######################### public methods - implementation of TooltipRenderer #########################\n\n /**\n * Registers handlers that allows reaction to entering or leaving tooltip\n * @param enter - Called when mouse enter tooltip component, hover\n * @param leave - Called when mouse leaves tooltip component\n */\n public registerHoverEvents(enter: () => void, leave: () => void): void\n {\n this.enterFn = enter;\n this.leaveFn = leave;\n }\n\n /**\n * @inheritdoc\n */\n public invalidateVisuals(): void\n {\n if(this.cssClass)\n {\n this.element.nativeElement.classList.add(this.cssClass);\n }\n\n this.changeDetector.detectChanges();\n }\n\n //######################### protected methods - host #########################\n\n /**\n * Handles mouse enter event over tooltip\n * @internal\n */\n @HostListener('mouseenter')\n protected mouseEnter(): void\n {\n this.enterFn();\n }\n\n /**\n * Handles mouse leave event over tooltip\n * @internal\n */\n @HostListener('mouseleave')\n protected mouseLeave(): void\n {\n this.leaveFn();\n }\n}","<div *ngIf=\"!template && !allowHtml\">{{data}}</div>\r\n<div *ngIf=\"!template && allowHtml\" [innerHTML]=\"data\"></div>\r\n\r\n<ng-template [ngIf]=\"template\">\r\n <ng-container *ngTemplateOutlet=\"template; context: {$implicit: data}\"></ng-container>\r\n</ng-template>"]}
1
+ {"version":3,"file":"tooltip.component.js","sourceRoot":"","sources":["../../../../../../src/modules/tooltip/components/tooltip/tooltip.component.ts","../../../../../../src/modules/tooltip/components/tooltip/tooltip.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAe,iBAAiB,EAAE,UAAU,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;;;AAM3H;;GAEG;AAQH,MAAM,OAAO,gBAAgB;IAoCzB,iEAAiE;IACjE,YAAsB,cAAiC,EACjC,OAAgC;QADhC,mBAAc,GAAd,cAAc,CAAmB;QACjC,YAAO,GAAP,OAAO,CAAyB;QApCtD,sEAAsE;QAEtE;;WAEG;QACO,YAAO,GAAe,GAAG,EAAE,CAAC,IAAI,CAAC;QAE3C;;WAEG;QACO,YAAO,GAAe,GAAG,EAAE,CAAC,IAAI,CAAC;QAc3C;;WAEG;QACI,cAAS,GAAY,KAAK,CAAC;IAWlC,CAAC;IAED,wGAAwG;IAExG;;;;OAIG;IACI,mBAAmB,CAAC,KAAiB,EAAE,KAAiB;QAE3D,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED;;OAEG;IACI,iBAAiB;QAEpB,IAAG,IAAI,CAAC,QAAQ,EAChB,CAAC;YACG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC5D,CAAC;QAED,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC;IACxC,CAAC;IAED,8EAA8E;IAE9E;;;OAGG;IAEO,UAAU;QAEhB,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED;;;OAGG;IAEO,UAAU;QAEhB,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;8GAxFQ,gBAAgB;kGAAhB,gBAAgB,0IChB7B,uRAKc;;2FDWD,gBAAgB;kBAP5B,SAAS;+BAEI,eAAe,mBAGR,uBAAuB,CAAC,MAAM;+GA6ErC,UAAU;sBADnB,YAAY;uBAAC,YAAY;gBAWhB,UAAU;sBADnB,YAAY;uBAAC,YAAY","sourcesContent":["import {Component, ChangeDetectionStrategy, TemplateRef, ChangeDetectorRef, ElementRef, HostListener} from '@angular/core';\nimport {Invalidatable} from '@jscrpt/common';\n\nimport {TooltipTemplateContext} from '../../directives';\nimport {TooltipRenderer} from '../../misc/tooltip.interface';\n\n/**\n * Component used for displaying tooltip content\n */\n@Component(\n{\n selector: 'tooltip-popup',\n templateUrl: 'tooltip.component.html',\n styleUrls: ['tooltip.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TooltipComponent<TData = any> implements TooltipRenderer<TData>, Invalidatable\n{\n //######################### protected fields #########################\n\n /**\n * Called when mouse enter tooltip component, hover\n */\n protected enterFn: () => void = () => null;\n\n /**\n * Called when mouse leaves tooltip component\n */\n protected leaveFn: () => void = () => null;\n\n //######################### public properties - implementation of TooltipRenderer #########################\n\n /**\n * Data that are rendered in tooltip\n */\n public data: TData|null|undefined;\n\n /**\n * Template used for rendering tooltip\n */\n public template: TemplateRef<TooltipTemplateContext<TData>>|null|undefined;\n\n /**\n * Indication whether are html tags allowed in tooltip text\n */\n public allowHtml: boolean = false;\n\n /**\n * Css class that is applied to tooltip renderer component\n */\n public cssClass: string|null|undefined;\n\n //######################### constructor #########################\n constructor(protected changeDetector: ChangeDetectorRef,\n protected element: ElementRef<HTMLElement>)\n {\n }\n\n //######################### public methods - implementation of TooltipRenderer #########################\n\n /**\n * Registers handlers that allows reaction to entering or leaving tooltip\n * @param enter - Called when mouse enter tooltip component, hover\n * @param leave - Called when mouse leaves tooltip component\n */\n public registerHoverEvents(enter: () => void, leave: () => void): void\n {\n this.enterFn = enter;\n this.leaveFn = leave;\n }\n\n /**\n * @inheritdoc\n */\n public invalidateVisuals(): void\n {\n if(this.cssClass)\n {\n this.element.nativeElement.classList.add(this.cssClass);\n }\n\n this.changeDetector.detectChanges();\n }\n\n //######################### protected methods - host #########################\n\n /**\n * Handles mouse enter event over tooltip\n * @internal\n */\n @HostListener('mouseenter')\n protected mouseEnter(): void\n {\n this.enterFn();\n }\n\n /**\n * Handles mouse leave event over tooltip\n * @internal\n */\n @HostListener('mouseleave')\n protected mouseLeave(): void\n {\n this.leaveFn();\n }\n}","<div *ngIf=\"!template && !allowHtml\">{{data}}</div>\r\n<div *ngIf=\"!template && allowHtml\" [innerHTML]=\"data\"></div>\r\n\r\n<ng-template [ngIf]=\"template\">\r\n <ng-container *ngTemplateOutlet=\"template; context: {$implicit: data}\"></ng-container>\r\n</ng-template>"]}
@@ -1,4 +1,4 @@
1
- import { ContentChild, Directive, ElementRef, HostListener, Inject, Injector, Input, Optional, TemplateRef, ViewContainerRef } from '@angular/core';
1
+ import { ContentChild, Directive, ElementRef, HostListener, Inject, Injector, Input, Optional, SkipSelf, TemplateRef, ViewContainerRef } from '@angular/core';
2
2
  import { AnimationBuilder } from '@angular/animations';
3
3
  import { DOCUMENT } from '@angular/common';
4
4
  import { fadeInAnimation, fadeOutAnimation } from '@anglr/animations';
@@ -23,7 +23,7 @@ const defaultOptions = {
23
23
  allowSelection: false,
24
24
  tooltipRenderer: TooltipComponent,
25
25
  tooltipCssClass: null,
26
- stopPropagation: false,
26
+ stopPropagation: false, //TODO: breaking change set to true
27
27
  enterAnimation: fadeInAnimation,
28
28
  exitAnimation: fadeOutAnimation,
29
29
  containerElement: undefined,
@@ -32,58 +32,6 @@ const defaultOptions = {
32
32
  * Directive used for rendering tooltip
33
33
  */
34
34
  export class TooltipDirective {
35
- _viewContainerRef;
36
- _injector;
37
- _element;
38
- _animationsPlayer;
39
- _document;
40
- _position;
41
- //######################### protected fields #########################
42
- /**
43
- * Instance of component used for rendering tooltip
44
- */
45
- _tooltipComponent;
46
- /**
47
- * Instance of HTML element for tooltip renderer
48
- */
49
- _tooltipElement;
50
- /**
51
- * Animation factory used for enter animation of tooltip
52
- */
53
- _enterAnimation;
54
- /**
55
- * Animation factory used for exit animation of tooltip
56
- */
57
- _exitAnimation;
58
- /**
59
- * Instance of options provided for this tooltip
60
- */
61
- _options;
62
- /**
63
- * Indication whether there is active show tooltip request
64
- */
65
- _showRequest = false;
66
- /**
67
- * Indication whether keep open tooltip component
68
- */
69
- _keepOpen = false;
70
- /**
71
- * Timeout that is used for handling mouse move
72
- */
73
- _timeout = null;
74
- //######################### public properties - inputs #########################
75
- /**
76
- * Tooltip text that is displayed, or any data that could be passed to template
77
- */
78
- tooltip;
79
- /**
80
- * Indication whether are html tags allowed in tooltip text
81
- */
82
- allowHtml = false;
83
- /**
84
- * Instance of tooltip template that is used for rendering
85
- */
86
- template;
87
35
  /**
88
36
  * Options used for displaying tooltip
89
37
  */
@@ -98,29 +46,31 @@ export class TooltipDirective {
98
46
  this.containerElement = this._options.containerElement;
99
47
  }
100
48
  }
101
- /**
102
- * Gets or sets indication whether is tooltip visible, if has boolean value, mouse events cant override this
103
- */
104
- tooltipVisible;
105
- /**
106
- * String that defines element in which should be tooltip rendered, if not specified, body is used
107
- *
108
- * Allows also css classes to be specified (div.body-box)
109
- */
110
- containerElement;
111
- //######################### public properties - children #########################
112
- /**
113
- * Instance of template from element content, used for rendering
114
- */
115
- tooltipTemplateChild;
116
49
  //######################### constructor #########################
117
- constructor(_viewContainerRef, _injector, _element, _animationsPlayer, _document, _position, options) {
50
+ constructor(_viewContainerRef, _injector, _element, _animationsPlayer, _document, _position, _parent, options) {
118
51
  this._viewContainerRef = _viewContainerRef;
119
52
  this._injector = _injector;
120
53
  this._element = _element;
121
54
  this._animationsPlayer = _animationsPlayer;
122
55
  this._document = _document;
123
56
  this._position = _position;
57
+ this._parent = _parent;
58
+ /**
59
+ * Indication whether there is active show tooltip request
60
+ */
61
+ this._showRequest = false;
62
+ /**
63
+ * Indication whether keep open tooltip component
64
+ */
65
+ this._keepOpen = false;
66
+ /**
67
+ * Timeout that is used for handling mouse move
68
+ */
69
+ this._timeout = null;
70
+ /**
71
+ * Indication whether are html tags allowed in tooltip text
72
+ */
73
+ this.allowHtml = false;
124
74
  this._options = extend(true, {}, defaultOptions, options);
125
75
  this._enterAnimation = this._animationsPlayer.build(this._options.enterAnimation);
126
76
  this._exitAnimation = this._animationsPlayer.build(this._options.exitAnimation);
@@ -152,11 +102,10 @@ export class TooltipDirective {
152
102
  }
153
103
  this._destroyTooltip();
154
104
  }
155
- //######################### public methods - host #########################
105
+ //######################### protected methods - host #########################
156
106
  /**
157
107
  * Handles mouse leave event, hover ends
158
108
  * @param event - Mouse event that occured
159
- * @internal
160
109
  */
161
110
  mouseLeave(event) {
162
111
  if (this._options.stopPropagation) {
@@ -174,7 +123,6 @@ export class TooltipDirective {
174
123
  /**
175
124
  * Handles mouse move event, displaying tooltip
176
125
  * @param event - Mouse event that occured
177
- * @internal
178
126
  */
179
127
  mouseMove(event) {
180
128
  if (this._options.stopPropagation) {
@@ -206,6 +154,7 @@ export class TooltipDirective {
206
154
  if (!this.tooltip && !this.template && !this.tooltipTemplateChild) {
207
155
  return;
208
156
  }
157
+ this._parent?._hideTooltip();
209
158
  this._createTooltip();
210
159
  //if element was not created do nothing
211
160
  if (!this._tooltipElement) {
@@ -288,15 +237,10 @@ export class TooltipDirective {
288
237
  this._tooltipComponent.instance.invalidateVisuals();
289
238
  }
290
239
  }
291
- //######################### ng language server #########################
292
- /**
293
- * Custom input type for `tooltip` input
294
- */
295
- static ngAcceptInputType_tooltip;
296
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.Injector }, { token: i0.ElementRef }, { token: i1.AnimationBuilder }, { token: DOCUMENT }, { token: POSITION }, { token: TOOLTIP_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
297
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.5", type: TooltipDirective, isStandalone: true, selector: "[tooltip]", inputs: { tooltip: "tooltip", allowHtml: "allowHtml", template: "template", tooltipOptions: "tooltipOptions", tooltipVisible: "tooltipVisible", containerElement: "containerElement" }, host: { listeners: { "mouseleave": "mouseLeave($event)", "mousemove": "mouseMove($event)" } }, queries: [{ propertyName: "tooltipTemplateChild", first: true, predicate: TooltipTemplateDirective, descendants: true }], usesOnChanges: true, ngImport: i0 });
240
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.Injector }, { token: i0.ElementRef }, { token: i1.AnimationBuilder }, { token: DOCUMENT }, { token: POSITION }, { token: TooltipDirective, optional: true, skipSelf: true }, { token: TOOLTIP_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
241
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: TooltipDirective, isStandalone: true, selector: "[tooltip]", inputs: { tooltip: "tooltip", allowHtml: "allowHtml", template: "template", tooltipOptions: "tooltipOptions", tooltipVisible: "tooltipVisible", containerElement: "containerElement" }, host: { listeners: { "mouseleave": "mouseLeave($event)", "mousemove": "mouseMove($event)" } }, queries: [{ propertyName: "tooltipTemplateChild", first: true, predicate: TooltipTemplateDirective, descendants: true }], usesOnChanges: true, ngImport: i0 }); }
298
242
  }
299
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: TooltipDirective, decorators: [{
243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipDirective, decorators: [{
300
244
  type: Directive,
301
245
  args: [{
302
246
  selector: '[tooltip]',
@@ -308,6 +252,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImpor
308
252
  }] }, { type: undefined, decorators: [{
309
253
  type: Inject,
310
254
  args: [POSITION]
255
+ }] }, { type: TooltipDirective, decorators: [{
256
+ type: Optional
257
+ }, {
258
+ type: SkipSelf
311
259
  }] }, { type: undefined, decorators: [{
312
260
  type: Optional
313
261
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/tooltip/directives/tooltip/tooltip.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAE,SAAS,EAAE,UAAU,EAAmB,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAwB,QAAQ,EAAiB,WAAW,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AACtN,OAAO,EAAC,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAC,QAAQ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EAAE,CAAC;SACvD;IACL,CAAC;IAED,wEAAwE;IAExE;;OAEG;IACI,MAAM,CAAC,yBAAyB,CAAM;uGA9WpC,gBAAgB,oIAgHL,QAAQ,aACR,QAAQ,aACI,eAAe;2FAlHtC,gBAAgB,8YAwGX,wBAAwB;;2FAxG7B,gBAAgB;kBAL5B,SAAS;mBACV;oBACI,QAAQ,EAAE,WAAW;oBACrB,UAAU,EAAE,IAAI;iBACnB;;0BAiHgB,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,QAAQ;;0BACf,QAAQ;;0BAAI,MAAM;2BAAC,eAAe;yCAhExC,OAAO;sBADb,KAAK;gBAOC,SAAS;sBADf,KAAK;gBAOC,QAAQ;sBADd,KAAK;gBAOK,cAAc;sBADxB,KAAK;gBAsBC,cAAc;sBADpB,KAAK;gBASC,gBAAgB;sBADtB,KAAK;gBASC,oBAAoB;sBAD1B,YAAY;uBAAC,wBAAwB;gBAkE/B,UAAU;sBADhB,YAAY;uBAAC,YAAY,EAAE,CAAC,QAAQ,CAAC;gBA2B/B,SAAS;sBADf,YAAY;uBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC","sourcesContent":["import {ComponentRef, ContentChild, Directive, ElementRef, EmbeddedViewRef, HostListener, Inject, Injector, Input, OnChanges, OnDestroy, Optional, SimpleChanges, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {AnimationBuilder, AnimationFactory} from '@angular/animations';\nimport {DOCUMENT} from '@angular/common';\nimport {fadeInAnimation, fadeOutAnimation} from '@anglr/animations';\nimport {RecursivePartial, extend, isBlank, isPresent, nameof, renderToBody} from '@jscrpt/common';\nimport {lastValueFrom} from 'rxjs';\n\nimport {TooltipComponent} from '../../components/tooltip/tooltip.component';\nimport {TooltipOptions, TooltipRenderer} from '../../misc/tooltip.interface';\nimport {TOOLTIP_OPTIONS} from '../../misc/tokens';\nimport {applyPositionResult, Position, PositionPlacement} from '../../../../services/position';\nimport {TooltipTemplateDirective} from '../tooltipTemplate/tooltipTemplate.directive';\nimport {TooltipTemplateContext} from '../tooltipTemplate/tooltipTemplate.context';\nimport {POSITION} from '../../../../types/tokens';\n\n/**\n * Default options for tooltip\n */\nconst defaultOptions: TooltipOptions =\n{\n delay: 200,\n position:\n {\n offset: 'MouseEnter',\n placement: PositionPlacement.TopEnd,\n },\n allowSelection: false,\n tooltipRenderer: TooltipComponent,\n tooltipCssClass: null,\n stopPropagation: false,\n enterAnimation: fadeInAnimation,\n exitAnimation: fadeOutAnimation,\n containerElement: undefined,\n};\n\n/**\n * Directive used for rendering tooltip\n */\n@Directive(\n{\n selector: '[tooltip]',\n standalone: true,\n})\nexport class TooltipDirective<TData = any> implements OnChanges, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of component used for rendering tooltip\n */\n protected _tooltipComponent?: ComponentRef<TooltipRenderer<TData>>;\n\n /**\n * Instance of HTML element for tooltip renderer\n */\n protected _tooltipElement?: HTMLElement;\n\n /**\n * Animation factory used for enter animation of tooltip\n */\n protected _enterAnimation: AnimationFactory;\n\n /**\n * Animation factory used for exit animation of tooltip\n */\n protected _exitAnimation: AnimationFactory;\n\n /**\n * Instance of options provided for this tooltip\n */\n protected _options: TooltipOptions;\n\n /**\n * Indication whether there is active show tooltip request\n */\n protected _showRequest: boolean = false;\n\n /**\n * Indication whether keep open tooltip component\n */\n protected _keepOpen: boolean = false;\n\n /**\n * Timeout that is used for handling mouse move\n */\n protected _timeout: number|null = null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Tooltip text that is displayed, or any data that could be passed to template\n */\n @Input()\n public tooltip?: TData;\n\n /**\n * Indication whether are html tags allowed in tooltip text\n */\n @Input()\n public allowHtml: boolean = false;\n\n /**\n * Instance of tooltip template that is used for rendering\n */\n @Input()\n public template?: TemplateRef<TooltipTemplateContext<TData>>;\n\n /**\n * Options used for displaying tooltip\n */\n @Input()\n public get tooltipOptions(): RecursivePartial<TooltipOptions>\n {\n return this._options;\n }\n public set tooltipOptions(value: RecursivePartial<TooltipOptions>)\n {\n this._options = extend(true, {}, this._options, value);\n\n this._enterAnimation = this._animationsPlayer.build(this._options.enterAnimation);\n this._exitAnimation = this._animationsPlayer.build(this._options.exitAnimation);\n\n if(this._options.containerElement && !this.containerElement)\n {\n this.containerElement = this._options.containerElement;\n }\n }\n\n /**\n * Gets or sets indication whether is tooltip visible, if has boolean value, mouse events cant override this\n */\n @Input()\n public tooltipVisible?: boolean;\n\n /**\n * String that defines element in which should be tooltip rendered, if not specified, body is used\n * \n * Allows also css classes to be specified (div.body-box)\n */\n @Input()\n public containerElement: string|undefined|null;\n\n //######################### public properties - children #########################\n\n /**\n * Instance of template from element content, used for rendering\n */\n @ContentChild(TooltipTemplateDirective)\n public tooltipTemplateChild?: TooltipTemplateDirective;\n\n //######################### constructor #########################\n constructor(protected _viewContainerRef: ViewContainerRef,\n protected _injector: Injector,\n protected _element: ElementRef<HTMLElement>,\n protected _animationsPlayer: AnimationBuilder,\n @Inject(DOCUMENT) protected _document: Document,\n @Inject(POSITION) protected _position: Position,\n @Optional() @Inject(TOOLTIP_OPTIONS) options?: Partial<TooltipOptions>,)\n {\n this._options = extend(true, {}, defaultOptions, options);\n\n this._enterAnimation = this._animationsPlayer.build(this._options.enterAnimation);\n this._exitAnimation = this._animationsPlayer.build(this._options.exitAnimation);\n\n if(this._options.containerElement)\n {\n this.containerElement = this._options.containerElement;\n }\n }\n\n //######################### public methods - implementation of OnChanges #########################\n\n /**\n * Called when input value changes\n */\n public ngOnChanges(changes: SimpleChanges): void\n {\n if(nameof<TooltipDirective>('tooltipVisible') in changes)\n {\n if(this.tooltipVisible)\n {\n this._showTooltip();\n }\n else\n {\n this._hideTooltip();\n }\n }\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n\n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n if(this._timeout)\n {\n clearTimeout(this._timeout);\n }\n\n this._destroyTooltip();\n }\n\n //######################### public methods - host #########################\n\n /**\n * Handles mouse leave event, hover ends\n * @param event - Mouse event that occured\n * @internal\n */\n @HostListener('mouseleave', ['$event'])\n public mouseLeave(event: MouseEvent): void\n {\n if(this._options.stopPropagation)\n {\n event.stopPropagation();\n }\n\n if(isBlank(this.tooltipVisible))\n {\n setTimeout(() =>\n {\n if(!this._keepOpen)\n {\n this._showRequest = false;\n this._hideTooltip();\n }\n }, 10);\n }\n }\n\n /**\n * Handles mouse move event, displaying tooltip\n * @param event - Mouse event that occured\n * @internal\n */\n @HostListener('mousemove', ['$event'])\n public mouseMove(event: MouseEvent): void\n {\n if(this._options.stopPropagation)\n {\n event.stopPropagation();\n }\n\n this._showRequest = true;\n\n //do nothing if tooltip is visible\n if(this._tooltipComponent || isPresent(this.tooltipVisible))\n {\n return;\n }\n\n if(isPresent(this._timeout))\n {\n clearTimeout(this._timeout);\n }\n\n this._timeout = setTimeout(() =>\n {\n this._timeout = null;\n\n if(this._showRequest)\n {\n this._showTooltip(event);\n\n this._showRequest = false;\n }\n }, this._options.delay) as any;\n }\n\n //######################### protected methods #########################\n\n /**\n * Shows tooltip\n * @param event - Mouse event\n */\n protected _showTooltip(event?: MouseEvent): void\n {\n //no data for tooltip or no template\n if(!this.tooltip && !this.template && !this.tooltipTemplateChild)\n {\n return;\n }\n\n this._createTooltip();\n\n //if element was not created do nothing\n if(!this._tooltipElement)\n {\n return;\n }\n\n this._showData();\n\n lastValueFrom(this._position.placeElement(this._tooltipElement,\n this._element.nativeElement,\n {\n placement: this._options.position.placement,\n offset: this._options.position.offset,\n flip: true,\n mouseEvent: event,\n autoUpdate: false\n }))\n .then(result => applyPositionResult(result));\n }\n\n /**\n * Hides tooltip\n */\n protected _hideTooltip(): void\n {\n this._destroyTooltip();\n }\n\n /**\n * Destroys tooltip component\n */\n protected _destroyTooltip(): void\n {\n if(this._tooltipComponent)\n {\n const component = this._tooltipComponent;\n const element = this._tooltipElement;\n\n const exitAnimation = this._exitAnimation.create(element);\n\n exitAnimation.onDone(() =>\n {\n component.destroy();\n exitAnimation.destroy();\n });\n \n this._tooltipComponent = undefined;\n this._tooltipElement = undefined;\n\n exitAnimation.play();\n }\n }\n\n /**\n * Creates tooltip renderer component\n */\n protected _createTooltip(): void\n {\n // 0. Destroys tooltip if it exists\n this._destroyTooltip();\n\n // 1. Create a component reference from the component\n this._tooltipComponent = this._viewContainerRef\n .createComponent(this._options.tooltipRenderer,\n {\n injector: this._injector\n });\n\n // 3. Get DOM element from component\n this._tooltipElement = (this._tooltipComponent.hostView as EmbeddedViewRef<any>)\n .rootNodes[0] as HTMLElement;\n\n // 4. Append DOM element to the body\n renderToBody(this._document, this._tooltipElement, this.containerElement);\n this._enterAnimation.create(this._tooltipElement).play();\n }\n\n /**\n * Sets data to tooltip component and shows them\n */\n protected _showData(): void\n {\n if(this._tooltipComponent)\n {\n this._tooltipComponent.instance.allowHtml = this.allowHtml;\n this._tooltipComponent.instance.data = this.tooltip;\n this._tooltipComponent.instance.template = this.template ?? this.tooltipTemplateChild?.template;\n this._tooltipComponent.instance.cssClass = this._options.tooltipCssClass;\n\n this._tooltipComponent.instance.registerHoverEvents(() =>\n {\n if(this._options.allowSelection)\n {\n this._keepOpen = true;\n this._showRequest = false;\n }\n },\n () =>\n {\n setTimeout(() =>\n {\n this._keepOpen = false;\n\n if(!this._showRequest)\n {\n this._hideTooltip();\n }\n\n this._showRequest = false;\n }, 5);\n });\n\n this._tooltipComponent.instance.invalidateVisuals();\n }\n }\n\n //######################### ng language server #########################\n \n /**\n * Custom input type for `tooltip` input\n */\n public static ngAcceptInputType_tooltip: any;\n}"]}
1
+ {"version":3,"file":"tooltip.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/tooltip/directives/tooltip/tooltip.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAE,SAAS,EAAE,UAAU,EAAmB,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAwB,QAAQ,EAAiB,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAChO,OAA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QACxD,CAAC;IACL,CAAC;8GAvWQ,gBAAgB,oIAgHL,QAAQ,aACR,QAAQ,0EAEI,eAAe;kGAnHtC,gBAAgB,8YAwGX,wBAAwB;;2FAxG7B,gBAAgB;kBAL5B,SAAS;mBACV;oBACI,QAAQ,EAAE,WAAW;oBACrB,UAAU,EAAE,IAAI;iBACnB;;0BAiHgB,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,QAAQ;;0BACf,QAAQ;;0BAAI,QAAQ;;0BACpB,QAAQ;;0BAAI,MAAM;2BAAC,eAAe;yCAjExC,OAAO;sBADb,KAAK;gBAOC,SAAS;sBADf,KAAK;gBAOC,QAAQ;sBADd,KAAK;gBAOK,cAAc;sBADxB,KAAK;gBAsBC,cAAc;sBADpB,KAAK;gBASC,gBAAgB;sBADtB,KAAK;gBASC,oBAAoB;sBAD1B,YAAY;uBAAC,wBAAwB;gBAkE5B,UAAU;sBADnB,YAAY;uBAAC,YAAY,EAAE,CAAC,QAAQ,CAAC;gBA0B5B,SAAS;sBADlB,YAAY;uBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC","sourcesContent":["import {ComponentRef, ContentChild, Directive, ElementRef, EmbeddedViewRef, HostListener, Inject, Injector, Input, OnChanges, OnDestroy, Optional, SimpleChanges, SkipSelf, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {AnimationBuilder, AnimationFactory} from '@angular/animations';\nimport {DOCUMENT} from '@angular/common';\nimport {fadeInAnimation, fadeOutAnimation} from '@anglr/animations';\nimport {RecursivePartial, extend, isBlank, isPresent, nameof, renderToBody} from '@jscrpt/common';\nimport {lastValueFrom} from 'rxjs';\n\nimport {TooltipComponent} from '../../components/tooltip/tooltip.component';\nimport {TooltipOptions, TooltipRenderer} from '../../misc/tooltip.interface';\nimport {TOOLTIP_OPTIONS} from '../../misc/tokens';\nimport {applyPositionResult, Position, PositionPlacement} from '../../../../services/position';\nimport {TooltipTemplateDirective} from '../tooltipTemplate/tooltipTemplate.directive';\nimport {TooltipTemplateContext} from '../tooltipTemplate/tooltipTemplate.context';\nimport {POSITION} from '../../../../types/tokens';\n\n/**\n * Default options for tooltip\n */\nconst defaultOptions: TooltipOptions =\n{\n delay: 200,\n position:\n {\n offset: 'MouseEnter',\n placement: PositionPlacement.TopEnd,\n },\n allowSelection: false,\n tooltipRenderer: TooltipComponent,\n tooltipCssClass: null,\n stopPropagation: false, //TODO: breaking change set to true\n enterAnimation: fadeInAnimation,\n exitAnimation: fadeOutAnimation,\n containerElement: undefined,\n};\n\n/**\n * Directive used for rendering tooltip\n */\n@Directive(\n{\n selector: '[tooltip]',\n standalone: true,\n})\nexport class TooltipDirective<TData = unknown> implements OnChanges, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of component used for rendering tooltip\n */\n protected _tooltipComponent?: ComponentRef<TooltipRenderer<TData>>;\n\n /**\n * Instance of HTML element for tooltip renderer\n */\n protected _tooltipElement?: HTMLElement;\n\n /**\n * Animation factory used for enter animation of tooltip\n */\n protected _enterAnimation: AnimationFactory;\n\n /**\n * Animation factory used for exit animation of tooltip\n */\n protected _exitAnimation: AnimationFactory;\n\n /**\n * Instance of options provided for this tooltip\n */\n protected _options: TooltipOptions;\n\n /**\n * Indication whether there is active show tooltip request\n */\n protected _showRequest: boolean = false;\n\n /**\n * Indication whether keep open tooltip component\n */\n protected _keepOpen: boolean = false;\n\n /**\n * Timeout that is used for handling mouse move\n */\n protected _timeout: number|null = null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Tooltip text that is displayed, or any data that could be passed to template\n */\n @Input()\n public tooltip?: TData;\n\n /**\n * Indication whether are html tags allowed in tooltip text\n */\n @Input()\n public allowHtml: boolean = false;\n\n /**\n * Instance of tooltip template that is used for rendering\n */\n @Input()\n public template?: TemplateRef<TooltipTemplateContext<TData>>;\n\n /**\n * Options used for displaying tooltip\n */\n @Input()\n public get tooltipOptions(): RecursivePartial<TooltipOptions>\n {\n return this._options;\n }\n public set tooltipOptions(value: RecursivePartial<TooltipOptions>)\n {\n this._options = extend(true, {}, this._options, value);\n\n this._enterAnimation = this._animationsPlayer.build(this._options.enterAnimation);\n this._exitAnimation = this._animationsPlayer.build(this._options.exitAnimation);\n\n if(this._options.containerElement && !this.containerElement)\n {\n this.containerElement = this._options.containerElement;\n }\n }\n\n /**\n * Gets or sets indication whether is tooltip visible, if has boolean value, mouse events cant override this\n */\n @Input()\n public tooltipVisible?: boolean;\n\n /**\n * String that defines element in which should be tooltip rendered, if not specified, body is used\n * \n * Allows also css classes to be specified (div.body-box)\n */\n @Input()\n public containerElement: string|undefined|null;\n\n //######################### public properties - children #########################\n\n /**\n * Instance of template from element content, used for rendering\n */\n @ContentChild(TooltipTemplateDirective)\n public tooltipTemplateChild?: TooltipTemplateDirective;\n\n //######################### constructor #########################\n constructor(protected _viewContainerRef: ViewContainerRef,\n protected _injector: Injector,\n protected _element: ElementRef<HTMLElement>,\n protected _animationsPlayer: AnimationBuilder,\n @Inject(DOCUMENT) protected _document: Document,\n @Inject(POSITION) protected _position: Position<HTMLElement>,\n @Optional() @SkipSelf() protected _parent?: TooltipDirective|null,\n @Optional() @Inject(TOOLTIP_OPTIONS) options?: Partial<TooltipOptions>,)\n {\n this._options = extend(true, {}, defaultOptions, options);\n\n this._enterAnimation = this._animationsPlayer.build(this._options.enterAnimation);\n this._exitAnimation = this._animationsPlayer.build(this._options.exitAnimation);\n\n if(this._options.containerElement)\n {\n this.containerElement = this._options.containerElement;\n }\n }\n\n //######################### public methods - implementation of OnChanges #########################\n\n /**\n * Called when input value changes\n */\n public ngOnChanges(changes: SimpleChanges): void\n {\n if(nameof<TooltipDirective>('tooltipVisible') in changes)\n {\n if(this.tooltipVisible)\n {\n this._showTooltip();\n }\n else\n {\n this._hideTooltip();\n }\n }\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n\n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n if(this._timeout)\n {\n clearTimeout(this._timeout);\n }\n\n this._destroyTooltip();\n }\n\n //######################### protected methods - host #########################\n\n /**\n * Handles mouse leave event, hover ends\n * @param event - Mouse event that occured\n */\n @HostListener('mouseleave', ['$event'])\n protected mouseLeave(event: MouseEvent): void\n {\n if(this._options.stopPropagation)\n {\n event.stopPropagation();\n }\n\n if(isBlank(this.tooltipVisible))\n {\n setTimeout(() =>\n {\n if(!this._keepOpen)\n {\n this._showRequest = false;\n this._hideTooltip();\n }\n }, 10);\n }\n }\n\n /**\n * Handles mouse move event, displaying tooltip\n * @param event - Mouse event that occured\n */\n @HostListener('mousemove', ['$event'])\n protected mouseMove(event: MouseEvent): void\n {\n if(this._options.stopPropagation)\n {\n event.stopPropagation();\n }\n\n this._showRequest = true;\n\n //do nothing if tooltip is visible\n if(this._tooltipComponent || isPresent(this.tooltipVisible))\n {\n return;\n }\n\n if(isPresent(this._timeout))\n {\n clearTimeout(this._timeout);\n }\n\n this._timeout = setTimeout(() =>\n {\n this._timeout = null;\n\n if(this._showRequest)\n {\n this._showTooltip(event);\n\n this._showRequest = false;\n }\n }, this._options.delay) as any;\n }\n\n //######################### protected methods #########################\n\n /**\n * Shows tooltip\n * @param event - Mouse event\n */\n protected _showTooltip(event?: MouseEvent): void\n {\n //no data for tooltip or no template\n if(!this.tooltip && !this.template && !this.tooltipTemplateChild)\n {\n return;\n }\n\n this._parent?._hideTooltip();\n this._createTooltip();\n\n //if element was not created do nothing\n if(!this._tooltipElement)\n {\n return;\n }\n\n this._showData();\n\n lastValueFrom(this._position.placeElement(this._tooltipElement,\n this._element.nativeElement,\n {\n placement: this._options.position.placement,\n offset: this._options.position.offset,\n flip: true,\n mouseEvent: event,\n autoUpdate: false\n }))\n .then(result => applyPositionResult(result));\n }\n\n /**\n * Hides tooltip\n */\n protected _hideTooltip(): void\n {\n this._destroyTooltip();\n }\n\n /**\n * Destroys tooltip component\n */\n protected _destroyTooltip(): void\n {\n if(this._tooltipComponent)\n {\n const component = this._tooltipComponent;\n const element = this._tooltipElement;\n\n const exitAnimation = this._exitAnimation.create(element);\n\n exitAnimation.onDone(() =>\n {\n component.destroy();\n exitAnimation.destroy();\n });\n \n this._tooltipComponent = undefined;\n this._tooltipElement = undefined;\n\n exitAnimation.play();\n }\n }\n\n /**\n * Creates tooltip renderer component\n */\n protected _createTooltip(): void\n {\n // 0. Destroys tooltip if it exists\n this._destroyTooltip();\n\n // 1. Create a component reference from the component\n this._tooltipComponent = this._viewContainerRef\n .createComponent(this._options.tooltipRenderer,\n {\n injector: this._injector\n });\n\n // 3. Get DOM element from component\n this._tooltipElement = (this._tooltipComponent.hostView as EmbeddedViewRef<any>)\n .rootNodes[0] as HTMLElement;\n\n // 4. Append DOM element to the body\n renderToBody(this._document, this._tooltipElement, this.containerElement);\n this._enterAnimation.create(this._tooltipElement).play();\n }\n\n /**\n * Sets data to tooltip component and shows them\n */\n protected _showData(): void\n {\n if(this._tooltipComponent)\n {\n this._tooltipComponent.instance.allowHtml = this.allowHtml;\n this._tooltipComponent.instance.data = this.tooltip;\n this._tooltipComponent.instance.template = this.template ?? this.tooltipTemplateChild?.template;\n this._tooltipComponent.instance.cssClass = this._options.tooltipCssClass;\n\n this._tooltipComponent.instance.registerHoverEvents(() =>\n {\n if(this._options.allowSelection)\n {\n this._keepOpen = true;\n this._showRequest = false;\n }\n },\n () =>\n {\n setTimeout(() =>\n {\n this._keepOpen = false;\n\n if(!this._showRequest)\n {\n this._hideTooltip();\n }\n\n this._showRequest = false;\n }, 5);\n });\n\n this._tooltipComponent.instance.invalidateVisuals();\n }\n }\n\n //######################### ng language server #########################\n \n /**\n * Custom input type for `tooltip` input\n */\n public static ngAcceptInputType_tooltip: any;\n}"]}
@@ -4,7 +4,6 @@ import * as i0 from "@angular/core";
4
4
  * Directive used for obtaining custom tooltip template
5
5
  */
6
6
  export class TooltipTemplateDirective {
7
- template;
8
7
  //######################### constructor #########################
9
8
  constructor(template) {
10
9
  this.template = template;
@@ -16,10 +15,10 @@ export class TooltipTemplateDirective {
16
15
  static ngTemplateContextGuard(_dir, _ctx) {
17
16
  return true;
18
17
  }
19
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: TooltipTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
20
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.5", type: TooltipTemplateDirective, selector: "[tooltipTemplate]", ngImport: i0 });
18
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
19
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: TooltipTemplateDirective, selector: "[tooltipTemplate]", ngImport: i0 }); }
21
20
  }
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: TooltipTemplateDirective, decorators: [{
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipTemplateDirective, decorators: [{
23
22
  type: Directive,
24
23
  args: [{
25
24
  selector: '[tooltipTemplate]'
@@ -1 +1 @@
1
- {"version":3,"file":"tooltipTemplate.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;;AAIrD;;GAEG;AAKH,MAAM,OAAO,wBAAwB;IAGd;IADnB,iEAAiE;IACjE,YAAmB,QAAoD;QAApD,aAAQ,GAAR,QAAQ,CAA4C;IAEvE,CAAC;IAED,wEAAwE;IAExE;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,IAA8B,EAAE,IAAa;QAEvE,OAAO,IAAI,CAAC;IAChB,CAAC;uGAfQ,wBAAwB;2FAAxB,wBAAwB;;2FAAxB,wBAAwB;kBAJpC,SAAS;mBACV;oBACI,QAAQ,EAAE,mBAAmB;iBAChC","sourcesContent":["import {Directive, TemplateRef} from '@angular/core';\n\nimport {TooltipTemplateContext} from './tooltipTemplate.context';\n\n/**\n * Directive used for obtaining custom tooltip template\n */\n@Directive(\n{\n selector: '[tooltipTemplate]'\n})\nexport class TooltipTemplateDirective<TData = any>\n{\n //######################### constructor #########################\n constructor(public template: TemplateRef<TooltipTemplateContext<TData>>)\n {\n }\n\n //######################### ng language server #########################\n \n /**\n * Allows typechecking for template\n */\n static ngTemplateContextGuard(_dir: TooltipTemplateDirective, _ctx: unknown): _ctx is TooltipTemplateContext\n {\n return true;\n }\n}"]}
1
+ {"version":3,"file":"tooltipTemplate.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;;AAIrD;;GAEG;AAKH,MAAM,OAAO,wBAAwB;IAEjC,iEAAiE;IACjE,YAAmB,QAAoD;QAApD,aAAQ,GAAR,QAAQ,CAA4C;IAEvE,CAAC;IAED,wEAAwE;IAExE;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,IAA8B,EAAE,IAAa;QAEvE,OAAO,IAAI,CAAC;IAChB,CAAC;8GAfQ,wBAAwB;kGAAxB,wBAAwB;;2FAAxB,wBAAwB;kBAJpC,SAAS;mBACV;oBACI,QAAQ,EAAE,mBAAmB;iBAChC","sourcesContent":["import {Directive, TemplateRef} from '@angular/core';\n\nimport {TooltipTemplateContext} from './tooltipTemplate.context';\n\n/**\n * Directive used for obtaining custom tooltip template\n */\n@Directive(\n{\n selector: '[tooltipTemplate]'\n})\nexport class TooltipTemplateDirective<TData = any>\n{\n //######################### constructor #########################\n constructor(public template: TemplateRef<TooltipTemplateContext<TData>>)\n {\n }\n\n //######################### ng language server #########################\n \n /**\n * Allows typechecking for template\n */\n static ngTemplateContextGuard(_dir: TooltipTemplateDirective, _ctx: unknown): _ctx is TooltipTemplateContext\n {\n return true;\n }\n}"]}
@@ -7,14 +7,14 @@ import * as i0 from "@angular/core";
7
7
  * Module for rendering tooltips
8
8
  */
9
9
  export class TooltipModule {
10
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
11
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.5", ngImport: i0, type: TooltipModule, declarations: [TooltipTemplateDirective,
10
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
11
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: TooltipModule, declarations: [TooltipTemplateDirective,
12
12
  TooltipComponent], imports: [CommonModule,
13
13
  TooltipDirective], exports: [TooltipDirective,
14
- TooltipTemplateDirective] });
15
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: TooltipModule, imports: [CommonModule] });
14
+ TooltipTemplateDirective] }); }
15
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipModule, imports: [CommonModule] }); }
16
16
  }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: TooltipModule, decorators: [{
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TooltipModule, decorators: [{
18
18
  type: NgModule,
19
19
  args: [{
20
20
  imports: [
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.module.js","sourceRoot":"","sources":["../../../../../src/modules/tooltip/modules/tooltip.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAC,gBAAgB,EAAE,wBAAwB,EAAC,MAAM,eAAe,CAAC;AACzE,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;;AAE/C;;GAEG;AAmBH,MAAM,OAAO,aAAa;uGAAb,aAAa;wGAAb,aAAa,iBATlB,wBAAwB;YACxB,gBAAgB,aANhB,YAAY;YACZ,gBAAgB,aAShB,gBAAgB;YAChB,wBAAwB;wGAGnB,aAAa,YAdlB,YAAY;;2FAcP,aAAa;kBAlBzB,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,YAAY;wBACZ,gBAAgB;qBACnB;oBACD,YAAY,EACZ;wBACI,wBAAwB;wBACxB,gBAAgB;qBACnB;oBACD,OAAO,EACP;wBACI,gBAAgB;wBAChB,wBAAwB;qBAC3B;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {TooltipDirective, TooltipTemplateDirective} from '../directives';\nimport {TooltipComponent} from '../components';\n\n/**\n * Module for rendering tooltips\n */\n@NgModule(\n{\n imports:\n [\n CommonModule,\n TooltipDirective,\n ],\n declarations:\n [\n TooltipTemplateDirective,\n TooltipComponent,\n ],\n exports:\n [\n TooltipDirective,\n TooltipTemplateDirective,\n ]\n})\nexport class TooltipModule\n{\n}\n"]}
1
+ {"version":3,"file":"tooltip.module.js","sourceRoot":"","sources":["../../../../../src/modules/tooltip/modules/tooltip.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAC,gBAAgB,EAAE,wBAAwB,EAAC,MAAM,eAAe,CAAC;AACzE,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;;AAE/C;;GAEG;AAmBH,MAAM,OAAO,aAAa;8GAAb,aAAa;+GAAb,aAAa,iBATlB,wBAAwB;YACxB,gBAAgB,aANhB,YAAY;YACZ,gBAAgB,aAShB,gBAAgB;YAChB,wBAAwB;+GAGnB,aAAa,YAdlB,YAAY;;2FAcP,aAAa;kBAlBzB,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,YAAY;wBACZ,gBAAgB;qBACnB;oBACD,YAAY,EACZ;wBACI,wBAAwB;wBACxB,gBAAgB;qBACnB;oBACD,OAAO,EACP;wBACI,gBAAgB;wBAChB,wBAAwB;qBAC3B;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {TooltipDirective, TooltipTemplateDirective} from '../directives';\nimport {TooltipComponent} from '../components';\n\n/**\n * Module for rendering tooltips\n */\n@NgModule(\n{\n imports:\n [\n CommonModule,\n TooltipDirective,\n ],\n declarations:\n [\n TooltipTemplateDirective,\n TooltipComponent,\n ],\n exports:\n [\n TooltipDirective,\n TooltipTemplateDirective,\n ]\n})\nexport class TooltipModule\n{\n}\n"]}
@@ -3,7 +3,7 @@ import * as i0 from "@angular/core";
3
3
  /**
4
4
  * Transforms array of objects or object properties into string
5
5
  */
6
- export class DisplayPropertiesSAPipe {
6
+ export class DisplayPropertiesPipe {
7
7
  /**
8
8
  * Transforms array of objects or object properties into string
9
9
  * @param value - Array of objects or object to be converted
@@ -26,10 +26,10 @@ export class DisplayPropertiesSAPipe {
26
26
  return result;
27
27
  }).join(itemSeparator);
28
28
  }
29
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: DisplayPropertiesSAPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
30
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.5", ngImport: i0, type: DisplayPropertiesSAPipe, isStandalone: true, name: "displayProperties" });
29
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DisplayPropertiesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
30
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: DisplayPropertiesPipe, isStandalone: true, name: "displayProperties" }); }
31
31
  }
32
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: DisplayPropertiesSAPipe, decorators: [{
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DisplayPropertiesPipe, decorators: [{
33
33
  type: Pipe,
34
34
  args: [{
35
35
  name: 'displayProperties',
@@ -1 +1 @@
1
- {"version":3,"file":"displayProperties.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/displayProperties/displayProperties.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;;AAElD;;GAEG;AAMH,MAAM,OAAO,uBAAuB;IAEhC;;;;;OAKG;IACI,SAAS,CAAC,KAAoB,EAAE,MAA0B,EAAE,aAAuB,CAAC,GAAG,CAAC,EAAE,gBAAwB,IAAI;QAEzH,IAAG,CAAC,KAAK,EACT;YACI,OAAO,EAAE,CAAC;SACb;QAED,IAAG,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EACxB;YACI,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;SACnB;QAED,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YAEnB,IAAI,MAAM,GAAW,EAAE,CAAC;YAExB,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EACzC;gBACI,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;aAC5C;YAED,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YAEzC,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC3B,CAAC;uGAjCQ,uBAAuB;qGAAvB,uBAAuB;;2FAAvB,uBAAuB;kBALnC,IAAI;mBACL;oBACI,IAAI,EAAE,mBAAmB;oBACzB,UAAU,EAAE,IAAI;iBACnB","sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\n\n/**\n * Transforms array of objects or object properties into string\n */\n@Pipe(\n{\n name: 'displayProperties',\n standalone: true,\n})\nexport class DisplayPropertiesSAPipe<TItem> implements PipeTransform\n{\n /**\n * Transforms array of objects or object properties into string\n * @param value - Array of objects or object to be converted\n * @param separators - Array of separators, or single separator for properties\n * @param itemSeparator - Separator used for separating items\n */\n public transform(value: TItem|TItem[], values: Array<keyof TItem>, separators: string[] = [' '], itemSeparator: string = ', '): string\n {\n if(!value)\n {\n return '';\n }\n\n if(!Array.isArray(value))\n {\n value = [value];\n }\n\n return value.map(itm =>\n {\n let result: string = '';\n\n for(let x = 0; x < values.length - 1; x++)\n {\n result += itm[values[0]] + separators[0];\n }\n\n result += itm[values[values.length - 1]];\n\n return result;\n }).join(itemSeparator);\n }\n}"]}
1
+ {"version":3,"file":"displayProperties.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/displayProperties/displayProperties.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;;AAElD;;GAEG;AAMH,MAAM,OAAO,qBAAqB;IAE9B;;;;;OAKG;IACI,SAAS,CAAC,KAAoB,EAAE,MAA0B,EAAE,aAAuB,CAAC,GAAG,CAAC,EAAE,gBAAwB,IAAI;QAEzH,IAAG,CAAC,KAAK,EACT,CAAC;YACG,OAAO,EAAE,CAAC;QACd,CAAC;QAED,IAAG,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EACxB,CAAC;YACG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC;QAED,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YAEnB,IAAI,MAAM,GAAW,EAAE,CAAC;YAExB,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EACzC,CAAC;gBACG,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YAC7C,CAAC;YAED,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YAEzC,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC3B,CAAC;8GAjCQ,qBAAqB;4GAArB,qBAAqB;;2FAArB,qBAAqB;kBALjC,IAAI;mBACL;oBACI,IAAI,EAAE,mBAAmB;oBACzB,UAAU,EAAE,IAAI;iBACnB","sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\n\n/**\n * Transforms array of objects or object properties into string\n */\n@Pipe(\n{\n name: 'displayProperties',\n standalone: true,\n})\nexport class DisplayPropertiesPipe<TItem> implements PipeTransform\n{\n /**\n * Transforms array of objects or object properties into string\n * @param value - Array of objects or object to be converted\n * @param separators - Array of separators, or single separator for properties\n * @param itemSeparator - Separator used for separating items\n */\n public transform(value: TItem|TItem[], values: Array<keyof TItem>, separators: string[] = [' '], itemSeparator: string = ', '): string\n {\n if(!value)\n {\n return '';\n }\n\n if(!Array.isArray(value))\n {\n value = [value];\n }\n\n return value.map(itm =>\n {\n let result: string = '';\n\n for(let x = 0; x < values.length - 1; x++)\n {\n result += itm[values[0]] + separators[0];\n }\n\n result += itm[values[values.length - 1]];\n\n return result;\n }).join(itemSeparator);\n }\n}"]}