@anglr/common 14.2.0-beta.20220809103327 → 14.2.0

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 (239) hide show
  1. package/changelog.md +26 -0
  2. package/es2015/floating-ui/src/services/floatingUiDomPosition.service.js +3 -3
  3. package/es2015/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +3 -3
  4. package/es2015/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +3 -3
  5. package/es2015/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +3 -3
  6. package/es2015/forms/src/directives/groupHasError/groupHasError.directive.js +3 -3
  7. package/es2015/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +3 -3
  8. package/es2015/forms/src/directives/hasError/hasError.directive.js +3 -3
  9. package/es2015/forms/src/directives/hasError/hasError.directive.js.map +1 -1
  10. package/es2015/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +3 -3
  11. package/es2015/forms/src/directives/numberInput/minValueNumberValidator.directive.js +3 -3
  12. package/es2015/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +18 -7
  13. package/es2015/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js.map +1 -1
  14. package/es2015/forms/src/directives/numberInput/numberInputValidator.directive.js +3 -3
  15. package/es2015/forms/src/directives/requiredClass/requiredClass.directive.js +3 -3
  16. package/es2015/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +3 -3
  17. package/es2015/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +3 -3
  18. package/es2015/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js +3 -3
  19. package/es2015/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js +3 -3
  20. package/es2015/forms/src/modules/errorMessage/modules/errorMessage.module.js +4 -4
  21. package/es2015/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js +3 -3
  22. package/es2015/forms/src/modules/formPipes/modules/formPipes.module.js +4 -4
  23. package/es2015/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js +3 -3
  24. package/es2015/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js +3 -3
  25. package/es2015/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js +3 -3
  26. package/es2015/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js +3 -3
  27. package/es2015/forms/src/modules/hasError.module.js +4 -4
  28. package/es2015/forms/src/modules/numberInput.module.js +4 -4
  29. package/es2015/forms/src/modules/requiredClass.module.js +4 -4
  30. package/es2015/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +3 -3
  31. package/es2015/forms/src/services/formModelBuilder/formModelBuilder.service.js +3 -3
  32. package/es2015/forms/src/services/submitted/submitted.service.js +3 -3
  33. package/es2015/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +3 -3
  34. package/es2015/hotkeys/src/services/appHotkeys.service.js +3 -3
  35. package/es2015/material/src/components/confirmationDialog/confirmationDialog.component.js +3 -3
  36. package/es2015/material/src/components/movableTitledDialog/movableTitledDialog.component.js +3 -3
  37. package/es2015/material/src/components/titledDialog/titledDialog.component.js +3 -3
  38. package/es2015/material/src/directives/confirmationDialog/confirmationDialog.directive.js +3 -3
  39. package/es2015/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +3 -3
  40. package/es2015/material/src/modules/confirmationDialog.module.js +4 -4
  41. package/es2015/material/src/modules/debugDataCopyClick.module.js +4 -4
  42. package/es2015/material/src/modules/movableTitledDialog.module.js +4 -4
  43. package/es2015/material/src/modules/titledDialog.module.js +4 -4
  44. package/es2015/material/src/services/titledDialog/titledDialog.service.js +3 -3
  45. package/es2015/moment/src/modules/moment.module.js +4 -4
  46. package/es2015/moment/src/pipes/momentConvert/momentConvert.pipe.js +3 -3
  47. package/es2015/moment/src/pipes/momentFormat/momentFormat.pipe.js +3 -3
  48. package/es2015/numeral/src/modules/numeral.module.js +4 -4
  49. package/es2015/numeral/src/pipes/numeral.pipe.js +3 -3
  50. package/es2015/router/src/services/routing/dataRouter.js +3 -3
  51. package/es2015/router/src/services/routing/dataRouterData.js +3 -3
  52. package/es2015/src/directives/bodyRender/bodyRender.directive.js +66 -0
  53. package/es2015/src/directives/bodyRender/bodyRender.directive.js.map +1 -0
  54. package/es2015/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +3 -3
  55. package/es2015/src/index.js +1 -0
  56. package/es2015/src/index.js.map +1 -1
  57. package/es2015/src/modules/castPipes/modules/castPipes.module.js +4 -4
  58. package/es2015/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js +3 -3
  59. package/es2015/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js +3 -3
  60. package/es2015/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +3 -3
  61. package/es2015/src/modules/castPipes/pipes/castType/castType.pipe.js +3 -3
  62. package/es2015/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.js +3 -3
  63. package/es2015/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.js.map +1 -1
  64. package/es2015/src/modules/clickOutside/modules/clickOutside.module.js +4 -4
  65. package/es2015/src/modules/commonDynamic.module.js +4 -4
  66. package/es2015/src/modules/commonLocalize.module.js +4 -4
  67. package/es2015/src/modules/commonUtils.module.js +4 -4
  68. package/es2015/src/modules/debugData/components/debugData/debugData.component.js +3 -3
  69. package/es2015/src/modules/debugData/modules/debugData.module.js +4 -4
  70. package/es2015/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +3 -3
  71. package/es2015/src/modules/goBack/directives/goBack/goBack.directive.js +3 -3
  72. package/es2015/src/modules/goBack/modules/goBack.module.js +4 -4
  73. package/es2015/src/modules/multiButton/components/multiButton/multiButton.component.js +3 -3
  74. package/es2015/src/modules/multiButton/components/multiButton/multiButton.component.js.map +1 -1
  75. package/es2015/src/modules/multiButton/modules/multiButton.module.js +4 -4
  76. package/es2015/src/modules/position/directives/positionTo/positionTo.directive.js +3 -3
  77. package/es2015/src/modules/position/directives/positionTo/positionTo.directive.js.map +1 -1
  78. package/es2015/src/modules/position/modules/position.module.js +4 -4
  79. package/es2015/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +3 -3
  80. package/es2015/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +3 -3
  81. package/es2015/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js.map +1 -1
  82. package/es2015/src/modules/progressIndicator/interceptors/progressInterceptor.js +3 -3
  83. package/es2015/src/modules/progressIndicator/modules/progressIndicator.module.js +4 -4
  84. package/es2015/src/modules/progressIndicator/services/progressIndicator.service.js +3 -3
  85. package/es2015/src/modules/progressIndicator/services/progressIndicator.service.js.map +1 -1
  86. package/es2015/src/modules/tooltip/components/tooltip/tooltip.component.js +3 -3
  87. package/es2015/src/modules/tooltip/directives/tooltip/tooltip.directive.js +3 -3
  88. package/es2015/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +1 -1
  89. package/es2015/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +3 -3
  90. package/es2015/src/modules/tooltip/modules/tooltip.module.js +4 -4
  91. package/es2015/src/pipes/isNaN/isNaN.pipe.js +3 -3
  92. package/es2015/src/pipes/isPresent/isPresent.pipe.js +3 -3
  93. package/es2015/src/pipes/keys/keys.pipe.js +3 -3
  94. package/es2015/src/pipes/localize/localize.pipe.js +7 -3
  95. package/es2015/src/pipes/localize/localize.pipe.js.map +1 -1
  96. package/es2015/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +3 -3
  97. package/es2015/src/pipes/urlEncode/urlEncode.pipe.js +3 -3
  98. package/es2015/src/services/cookies/cookies.service.js +3 -3
  99. package/es2015/src/services/cookies/cookies.service.js.map +1 -1
  100. package/es2015/src/services/notifications/defaultNotifications.service.js +3 -3
  101. package/es2015/src/services/permanentStorage/cookiePermanentStorage.service.js +3 -3
  102. package/es2015/src/services/statusCode/statusCode.service.js +3 -3
  103. package/es2015/src/services/stringLocalization/noStringLocalization.service.js +3 -3
  104. package/es2015/src/services/temporaryStorage/memoryTemporaryStorage.service.js +3 -3
  105. package/es2015/store/src/services/permanentStorage/localPermanentStorage.service.js +3 -3
  106. package/es2015/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +3 -3
  107. package/es2015/structured-log/src/components/console/console.component.js +3 -3
  108. package/es2015/structured-log/src/modules/consoleLog.module.js +4 -4
  109. package/es2015/structured-log/src/services/console/consoleComponentSink.service.js +3 -3
  110. package/es2015/structured-log/src/services/console/consoleSinkConfig.service.js +3 -3
  111. package/es2015/structured-log/src/services/logger.service.js +3 -3
  112. package/es2015/structured-log/src/services/rest/restSink.service.js +3 -3
  113. package/es2015/structured-log/src/services/rest/restSink.service.js.map +1 -1
  114. package/es2015/structured-log/src/services/rest/restSinkConfig.service.js +3 -3
  115. package/es2020/floating-ui/src/services/floatingUiDomPosition.service.js +3 -3
  116. package/es2020/forms/src/components/defaultValidationErrors/defaultValidationErrors.component.js +3 -3
  117. package/es2020/forms/src/components/defaultValidationErrorsContainer/defaultValidationErrorsContainer.component.js +3 -3
  118. package/es2020/forms/src/components/reservedSpaceValidationErrorsContainer/reservedSpaceValidationErrorsContainer.component.js +3 -3
  119. package/es2020/forms/src/directives/groupHasError/groupHasError.directive.js +3 -3
  120. package/es2020/forms/src/directives/groupHasErrorContainer/groupHasErrorContainer.directive.js +3 -3
  121. package/es2020/forms/src/directives/hasError/hasError.directive.js +3 -3
  122. package/es2020/forms/src/directives/hasError/hasError.directive.js.map +1 -1
  123. package/es2020/forms/src/directives/numberInput/maxValueNumberValidator.directive.js +3 -3
  124. package/es2020/forms/src/directives/numberInput/minValueNumberValidator.directive.js +3 -3
  125. package/es2020/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js +18 -7
  126. package/es2020/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.js.map +1 -1
  127. package/es2020/forms/src/directives/numberInput/numberInputValidator.directive.js +3 -3
  128. package/es2020/forms/src/directives/requiredClass/requiredClass.directive.js +3 -3
  129. package/es2020/forms/src/directives/validationErrorsContainer/validationErrorsContainer.directive.js +3 -3
  130. package/es2020/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +3 -3
  131. package/es2020/forms/src/modules/errorMessage/directives/errorMessage/errorMessage.directive.js +3 -3
  132. package/es2020/forms/src/modules/errorMessage/directives/groupErrorsTemplate/groupErrorsTemplate.directive.js +3 -3
  133. package/es2020/forms/src/modules/errorMessage/modules/errorMessage.module.js +4 -4
  134. package/es2020/forms/src/modules/errorMessage/pipes/withErrorMessage/withErrorMessage.pipe.js +3 -3
  135. package/es2020/forms/src/modules/formPipes/modules/formPipes.module.js +4 -4
  136. package/es2020/forms/src/modules/formPipes/pipes/asFormArray/asFormArray.pipe.js +3 -3
  137. package/es2020/forms/src/modules/formPipes/pipes/asFormControl/asFormControl.pipe.js +3 -3
  138. package/es2020/forms/src/modules/formPipes/pipes/asFormGroup/asFormGroup.pipe.js +3 -3
  139. package/es2020/forms/src/modules/formPipes/pipes/getControl/getControl.pipe.js +3 -3
  140. package/es2020/forms/src/modules/hasError.module.js +4 -4
  141. package/es2020/forms/src/modules/numberInput.module.js +4 -4
  142. package/es2020/forms/src/modules/requiredClass.module.js +4 -4
  143. package/es2020/forms/src/services/errorMessagesExtractor/errorMessagesExtractor.service.js +3 -3
  144. package/es2020/forms/src/services/formModelBuilder/formModelBuilder.service.js +3 -3
  145. package/es2020/forms/src/services/submitted/submitted.service.js +3 -3
  146. package/es2020/forms/src/services/validationErrorRenderer/validationErrorRenderer.service.js +3 -3
  147. package/es2020/hotkeys/src/services/appHotkeys.service.js +3 -3
  148. package/es2020/material/src/components/confirmationDialog/confirmationDialog.component.js +3 -3
  149. package/es2020/material/src/components/movableTitledDialog/movableTitledDialog.component.js +3 -3
  150. package/es2020/material/src/components/titledDialog/titledDialog.component.js +3 -3
  151. package/es2020/material/src/directives/confirmationDialog/confirmationDialog.directive.js +3 -3
  152. package/es2020/material/src/directives/debugDataCopyClick/debugDataCopyClick.directive.js +3 -3
  153. package/es2020/material/src/modules/confirmationDialog.module.js +4 -4
  154. package/es2020/material/src/modules/debugDataCopyClick.module.js +4 -4
  155. package/es2020/material/src/modules/movableTitledDialog.module.js +4 -4
  156. package/es2020/material/src/modules/titledDialog.module.js +4 -4
  157. package/es2020/material/src/services/titledDialog/titledDialog.service.js +3 -3
  158. package/es2020/moment/src/modules/moment.module.js +4 -4
  159. package/es2020/moment/src/pipes/momentConvert/momentConvert.pipe.js +3 -3
  160. package/es2020/moment/src/pipes/momentFormat/momentFormat.pipe.js +3 -3
  161. package/es2020/numeral/src/modules/numeral.module.js +4 -4
  162. package/es2020/numeral/src/pipes/numeral.pipe.js +3 -3
  163. package/es2020/router/src/services/routing/dataRouter.js +3 -3
  164. package/es2020/router/src/services/routing/dataRouterData.js +3 -3
  165. package/es2020/src/directives/bodyRender/bodyRender.directive.js +65 -0
  166. package/es2020/src/directives/bodyRender/bodyRender.directive.js.map +1 -0
  167. package/es2020/src/directives/ngComponentOutletEx/ngComponentOutletEx.directive.js +3 -3
  168. package/es2020/src/index.js +1 -0
  169. package/es2020/src/index.js.map +1 -1
  170. package/es2020/src/modules/castPipes/modules/castPipes.module.js +4 -4
  171. package/es2020/src/modules/castPipes/pipes/asHtmlElement/asHtmlElement.pipe.js +3 -3
  172. package/es2020/src/modules/castPipes/pipes/asNgClassRequired/asNgClassRequired.pipe.js +3 -3
  173. package/es2020/src/modules/castPipes/pipes/asRequired/asRequired.pipe.js +3 -3
  174. package/es2020/src/modules/castPipes/pipes/castType/castType.pipe.js +3 -3
  175. package/es2020/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.js +3 -3
  176. package/es2020/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.js.map +1 -1
  177. package/es2020/src/modules/clickOutside/modules/clickOutside.module.js +4 -4
  178. package/es2020/src/modules/commonDynamic.module.js +4 -4
  179. package/es2020/src/modules/commonLocalize.module.js +4 -4
  180. package/es2020/src/modules/commonUtils.module.js +4 -4
  181. package/es2020/src/modules/debugData/components/debugData/debugData.component.js +3 -3
  182. package/es2020/src/modules/debugData/modules/debugData.module.js +4 -4
  183. package/es2020/src/modules/debugData/services/debugDataEnabled/debugDataEnabled.service.js +3 -3
  184. package/es2020/src/modules/goBack/directives/goBack/goBack.directive.js +3 -3
  185. package/es2020/src/modules/goBack/modules/goBack.module.js +4 -4
  186. package/es2020/src/modules/multiButton/components/multiButton/multiButton.component.js +3 -3
  187. package/es2020/src/modules/multiButton/components/multiButton/multiButton.component.js.map +1 -1
  188. package/es2020/src/modules/multiButton/modules/multiButton.module.js +4 -4
  189. package/es2020/src/modules/position/directives/positionTo/positionTo.directive.js +3 -3
  190. package/es2020/src/modules/position/directives/positionTo/positionTo.directive.js.map +1 -1
  191. package/es2020/src/modules/position/modules/position.module.js +4 -4
  192. package/es2020/src/modules/progressIndicator/components/progressIndicator/progressIndicator.component.js +3 -3
  193. package/es2020/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js +3 -3
  194. package/es2020/src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.js.map +1 -1
  195. package/es2020/src/modules/progressIndicator/interceptors/progressInterceptor.js +3 -3
  196. package/es2020/src/modules/progressIndicator/modules/progressIndicator.module.js +4 -4
  197. package/es2020/src/modules/progressIndicator/services/progressIndicator.service.js +3 -3
  198. package/es2020/src/modules/progressIndicator/services/progressIndicator.service.js.map +1 -1
  199. package/es2020/src/modules/tooltip/components/tooltip/tooltip.component.js +3 -3
  200. package/es2020/src/modules/tooltip/directives/tooltip/tooltip.directive.js +3 -3
  201. package/es2020/src/modules/tooltip/directives/tooltip/tooltip.directive.js.map +1 -1
  202. package/es2020/src/modules/tooltip/directives/tooltipTemplate/tooltipTemplate.directive.js +3 -3
  203. package/es2020/src/modules/tooltip/modules/tooltip.module.js +4 -4
  204. package/es2020/src/pipes/isNaN/isNaN.pipe.js +3 -3
  205. package/es2020/src/pipes/isPresent/isPresent.pipe.js +3 -3
  206. package/es2020/src/pipes/keys/keys.pipe.js +3 -3
  207. package/es2020/src/pipes/localize/localize.pipe.js +7 -3
  208. package/es2020/src/pipes/localize/localize.pipe.js.map +1 -1
  209. package/es2020/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +3 -3
  210. package/es2020/src/pipes/urlEncode/urlEncode.pipe.js +3 -3
  211. package/es2020/src/services/cookies/cookies.service.js +3 -3
  212. package/es2020/src/services/cookies/cookies.service.js.map +1 -1
  213. package/es2020/src/services/notifications/defaultNotifications.service.js +3 -3
  214. package/es2020/src/services/permanentStorage/cookiePermanentStorage.service.js +3 -3
  215. package/es2020/src/services/statusCode/statusCode.service.js +3 -3
  216. package/es2020/src/services/stringLocalization/noStringLocalization.service.js +3 -3
  217. package/es2020/src/services/temporaryStorage/memoryTemporaryStorage.service.js +3 -3
  218. package/es2020/store/src/services/permanentStorage/localPermanentStorage.service.js +3 -3
  219. package/es2020/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +3 -3
  220. package/es2020/structured-log/src/components/console/console.component.js +3 -3
  221. package/es2020/structured-log/src/modules/consoleLog.module.js +4 -4
  222. package/es2020/structured-log/src/services/console/consoleComponentSink.service.js +3 -3
  223. package/es2020/structured-log/src/services/console/consoleSinkConfig.service.js +3 -3
  224. package/es2020/structured-log/src/services/logger.service.js +3 -3
  225. package/es2020/structured-log/src/services/rest/restSink.service.js +3 -3
  226. package/es2020/structured-log/src/services/rest/restSink.service.js.map +1 -1
  227. package/es2020/structured-log/src/services/rest/restSinkConfig.service.js +3 -3
  228. package/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.d.ts +11 -3
  229. package/forms/src/directives/numberInput/numberInputControlValueAccessor.directive.d.ts.map +1 -1
  230. package/package.json +1 -1
  231. package/src/directives/bodyRender/bodyRender.directive.d.ts +36 -0
  232. package/src/directives/bodyRender/bodyRender.directive.d.ts.map +1 -0
  233. package/src/index.d.ts +1 -0
  234. package/src/index.d.ts.map +1 -1
  235. package/src/modules/position/directives/positionTo/positionTo.directive.d.ts +2 -2
  236. package/src/modules/position/directives/positionTo/positionTo.directive.d.ts.map +1 -1
  237. package/src/pipes/localize/localize.pipe.d.ts +1 -1
  238. package/src/pipes/localize/localize.pipe.d.ts.map +1 -1
  239. package/version.bak +1 -1
@@ -6,10 +6,10 @@ import * as i0 from "@angular/core";
6
6
  */
7
7
  export class PositionModule {
8
8
  }
9
- PositionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: PositionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10
- PositionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: PositionModule, declarations: [PositionToDirective], exports: [PositionToDirective] });
11
- PositionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: PositionModule });
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: PositionModule, decorators: [{
9
+ PositionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PositionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10
+ PositionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: PositionModule, declarations: [PositionToDirective], exports: [PositionToDirective] });
11
+ PositionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PositionModule });
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PositionModule, decorators: [{
13
13
  type: NgModule,
14
14
  args: [{
15
15
  imports: [],
@@ -55,9 +55,9 @@ export class ProgressIndicatorComponent {
55
55
  }
56
56
  }
57
57
  }
58
- ProgressIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ProgressIndicatorComponent, deps: [{ token: i1.ProgressIndicatorService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
59
- ProgressIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: ProgressIndicatorComponent, selector: "progress-indicator", inputs: { cssClass: "cssClass" }, ngImport: i0, template: "<div [ngClass]=\"appliedClass\">\n <div class=\"spinner\"></div>\n\n <div class=\"messages\">\n <div *ngFor=\"let msg of messages; let index = index\" [ngClass]=\"'message-' + ((messages.length - index) > 3 ? 'out' : (messages.length - index - 1))\">{{msg | localize}}</div>\n </div>\n</div>", styles: ["\n.progress-indicator\n{\n transition: all 250ms linear;\n background-color: rgba(0, 0, 0, 0.45);\n height: 100%;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 23456;\n opacity: 0;\n visibility: hidden;\n}\n.progress-indicator.running\n{\n visibility: visible;\n opacity: 1;\n}\n.progress-indicator.running > .spinner\n{\n border: 4px solid #eee;\n border-bottom: none;\n border-top-left-radius: 48px;\n border-top-right-radius: 48px;\n height: 24px;\n margin-left: auto;\n margin-right: auto;\n position: relative;\n top: 50%;\n width: 48px;\n animation-name: rotate-progress;\n animation-duration: 450ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n transform-origin: calc(50%) calc(50% + 12px);\n}\n\n.progress-indicator.running > .messages\n{\n color: #eee;\n top: calc(50% + 25px);\n position: relative;\n text-align: center;\n font-weight: bold;\n font-size: 1.25em;\n display: flex;\n flex-direction: column-reverse;\n}\n\n.progress-indicator.running > .messages .message-0,\n.progress-indicator.running > .messages .message-1,\n.progress-indicator.running > .messages .message-2,\n.progress-indicator.running > .messages .message-out\n{\n transition: all 500ms;\n position: absolute;\n width: 100%;\n top: 0;\n}\n\n.progress-indicator.running > .messages .message-1\n{\n transform: scale3d(0.7, 0.7, 0.7) translateZ(-20px) translateY(30px);\n opacity: 0.8;\n}\n\n.progress-indicator.running > .messages .message-2\n{\n transform: scale3d(0.35, 0.35, 0.35) translateZ(-40px) translateY(100px);\n opacity: 0.5;\n}\n\n.progress-indicator.running > .messages .message-out\n{\n transform: scale3d(0, 0, 0) translateZ(-100px) translateY(200px);\n}\n\n@keyframes rotate-progress\n{\n from\n {\n transform: rotate(0deg);\n }\n to\n {\n transform: rotate(360deg);\n }\n}"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i3.LocalizePipe, name: "localize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ProgressIndicatorComponent, decorators: [{
58
+ ProgressIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ProgressIndicatorComponent, deps: [{ token: i1.ProgressIndicatorService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
59
+ ProgressIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: ProgressIndicatorComponent, selector: "progress-indicator", inputs: { cssClass: "cssClass" }, ngImport: i0, template: "<div [ngClass]=\"appliedClass\">\n <div class=\"spinner\"></div>\n\n <div class=\"messages\">\n <div *ngFor=\"let msg of messages; let index = index\" [ngClass]=\"'message-' + ((messages.length - index) > 3 ? 'out' : (messages.length - index - 1))\">{{msg | localize}}</div>\n </div>\n</div>", styles: ["\n.progress-indicator\n{\n transition: all 250ms linear;\n background-color: rgba(0, 0, 0, 0.45);\n height: 100%;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 23456;\n opacity: 0;\n visibility: hidden;\n}\n.progress-indicator.running\n{\n visibility: visible;\n opacity: 1;\n}\n.progress-indicator.running > .spinner\n{\n border: 4px solid #eee;\n border-bottom: none;\n border-top-left-radius: 48px;\n border-top-right-radius: 48px;\n height: 24px;\n margin-left: auto;\n margin-right: auto;\n position: relative;\n top: 50%;\n width: 48px;\n animation-name: rotate-progress;\n animation-duration: 450ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n transform-origin: calc(50%) calc(50% + 12px);\n}\n\n.progress-indicator.running > .messages\n{\n color: #eee;\n top: calc(50% + 25px);\n position: relative;\n text-align: center;\n font-weight: bold;\n font-size: 1.25em;\n display: flex;\n flex-direction: column-reverse;\n}\n\n.progress-indicator.running > .messages .message-0,\n.progress-indicator.running > .messages .message-1,\n.progress-indicator.running > .messages .message-2,\n.progress-indicator.running > .messages .message-out\n{\n transition: all 500ms;\n position: absolute;\n width: 100%;\n top: 0;\n}\n\n.progress-indicator.running > .messages .message-1\n{\n transform: scale3d(0.7, 0.7, 0.7) translateZ(-20px) translateY(30px);\n opacity: 0.8;\n}\n\n.progress-indicator.running > .messages .message-2\n{\n transform: scale3d(0.35, 0.35, 0.35) translateZ(-40px) translateY(100px);\n opacity: 0.5;\n}\n\n.progress-indicator.running > .messages .message-out\n{\n transform: scale3d(0, 0, 0) translateZ(-100px) translateY(200px);\n}\n\n@keyframes rotate-progress\n{\n from\n {\n transform: rotate(0deg);\n }\n to\n {\n transform: rotate(360deg);\n }\n}"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i3.LocalizePipe, name: "localize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ProgressIndicatorComponent, decorators: [{
61
61
  type: Component,
62
62
  args: [{ selector: 'progress-indicator', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngClass]=\"appliedClass\">\n <div class=\"spinner\"></div>\n\n <div class=\"messages\">\n <div *ngFor=\"let msg of messages; let index = index\" [ngClass]=\"'message-' + ((messages.length - index) > 3 ? 'out' : (messages.length - index - 1))\">{{msg | localize}}</div>\n </div>\n</div>", styles: ["\n.progress-indicator\n{\n transition: all 250ms linear;\n background-color: rgba(0, 0, 0, 0.45);\n height: 100%;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 23456;\n opacity: 0;\n visibility: hidden;\n}\n.progress-indicator.running\n{\n visibility: visible;\n opacity: 1;\n}\n.progress-indicator.running > .spinner\n{\n border: 4px solid #eee;\n border-bottom: none;\n border-top-left-radius: 48px;\n border-top-right-radius: 48px;\n height: 24px;\n margin-left: auto;\n margin-right: auto;\n position: relative;\n top: 50%;\n width: 48px;\n animation-name: rotate-progress;\n animation-duration: 450ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n transform-origin: calc(50%) calc(50% + 12px);\n}\n\n.progress-indicator.running > .messages\n{\n color: #eee;\n top: calc(50% + 25px);\n position: relative;\n text-align: center;\n font-weight: bold;\n font-size: 1.25em;\n display: flex;\n flex-direction: column-reverse;\n}\n\n.progress-indicator.running > .messages .message-0,\n.progress-indicator.running > .messages .message-1,\n.progress-indicator.running > .messages .message-2,\n.progress-indicator.running > .messages .message-out\n{\n transition: all 500ms;\n position: absolute;\n width: 100%;\n top: 0;\n}\n\n.progress-indicator.running > .messages .message-1\n{\n transform: scale3d(0.7, 0.7, 0.7) translateZ(-20px) translateY(30px);\n opacity: 0.8;\n}\n\n.progress-indicator.running > .messages .message-2\n{\n transform: scale3d(0.35, 0.35, 0.35) translateZ(-40px) translateY(100px);\n opacity: 0.5;\n}\n\n.progress-indicator.running > .messages .message-out\n{\n transform: scale3d(0, 0, 0) translateZ(-100px) translateY(200px);\n}\n\n@keyframes rotate-progress\n{\n from\n {\n transform: rotate(0deg);\n }\n to\n {\n transform: rotate(360deg);\n }\n}"] }]
63
63
  }], ctorParameters: function () { return [{ type: i1.ProgressIndicatorService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { cssClass: [{
@@ -104,9 +104,9 @@ export class ProgressOverlayDirective {
104
104
  }
105
105
  }
106
106
  }
107
- ProgressOverlayDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ProgressOverlayDirective, deps: [{ token: i1.ProgressIndicatorService }, { token: i0.ElementRef }, { token: DOCUMENT }, { token: STRING_LOCALIZATION }], target: i0.ɵɵFactoryTarget.Directive });
108
- ProgressOverlayDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: ProgressOverlayDirective, selector: "[progressOverlay]", inputs: { name: ["progressOverlay", "name"] }, ngImport: i0 });
109
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ProgressOverlayDirective, decorators: [{
107
+ ProgressOverlayDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ProgressOverlayDirective, deps: [{ token: i1.ProgressIndicatorService }, { token: i0.ElementRef }, { token: DOCUMENT }, { token: STRING_LOCALIZATION }], target: i0.ɵɵFactoryTarget.Directive });
108
+ ProgressOverlayDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: ProgressOverlayDirective, selector: "[progressOverlay]", inputs: { name: ["progressOverlay", "name"] }, ngImport: i0 });
109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ProgressOverlayDirective, decorators: [{
110
110
  type: Directive,
111
111
  args: [{
112
112
  selector: '[progressOverlay]'
@@ -1 +1 @@
1
- {"version":3,"file":"progressOverlay.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.ts"],"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,UAAU,CAAC,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAE5D,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAC5C,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAEzC,MAAM,cAAc,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAEzD,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBAE5B,MAAM,CAAC,SAAS,GAAG,aAAa,CAAC;YACrC,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;gBAE3C,GAAG,CAAC,SAAS,GAAG,WAAW,KAAK,EAAE,CAAC;YACvC,CAAC,CAAC,CAAC;SACN;IACL,CAAC;;qHAlLQ,wBAAwB,oFAuDb,QAAQ,aACR,mBAAmB;yGAxD9B,wBAAwB;2FAAxB,wBAAwB;kBAJpC,SAAS;mBACV;oBACI,QAAQ,EAAE,mBAAmB;iBAChC;0HAwDoD,QAAQ;0BAA5C,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,mBAAmB;4CANhC,IAAI;sBADV,KAAK;uBAAC,iBAAiB","sourcesContent":["import {Directive, Input, OnInit, OnDestroy, ElementRef, Inject} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {Subscription} from 'rxjs';\n\nimport {ProgressIndicatorService} from '../../services/progressIndicator.service';\nimport {STRING_LOCALIZATION} from '../../../../types/tokens';\nimport {StringLocalization} from '../../../../services/stringLocalization';\n\n/**\n * Directive that is used for displaying progress indicator as overlay\n */\n@Directive(\n{\n selector: '[progressOverlay]'\n})\nexport class ProgressOverlayDirective implements OnInit, OnDestroy\n{\n //######################### private fields #########################\n \n /**\n * Previous css position value\n */\n private _notRunningCssPosition: string;\n\n /**\n * Previous css overflow value\n */\n private _notRunningOverflow: string;\n\n /**\n * Subscription for changes in ProgressIndicatorService\n */\n private _subscription: Subscription|null;\n\n /**\n * Array of messages that should be displayed\n */\n private _messages: string[];\n\n /**\n * Indication that this progress indicator is running\n */\n private _running: boolean;\n\n /**\n * Element that is displaying progress indicator overlay\n */\n private _progressElement: HTMLDivElement;\n\n /**\n * Html messages element\n */\n private _messagesElement: HTMLDivElement;\n\n /**\n * Html message elements, last three\n */\n private _lastThreeMessages: HTMLDivElement[] = [];\n\n //######################### public properties - inputs #########################\n\n /**\n * Name of progress indicator group\n */\n @Input('progressOverlay')\n public name: string;\n\n //######################### constructor #########################\n constructor(private _service: ProgressIndicatorService,\n private _element: ElementRef<HTMLElement>,\n @Inject(DOCUMENT) private _document: Document,\n @Inject(STRING_LOCALIZATION) private _localizationSvc: StringLocalization)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._service.registerOverlayGroup(this.name);\n\n this._running = this._service.running[this.name];\n this._messages = this._service.messages[this.name] || [];\n this._renderProgressOverlay();\n\n this._subscription = this._service.stateChange.subscribe(name => \n {\n if(name == this.name)\n {\n this._running = this._service.running[this.name];\n this._messages = this._service.messages[this.name] || [];\n this._renderProgressOverlay();\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 this._service.unregisterOverlayGroup(this.name);\n\n if(this._subscription)\n {\n this._subscription.unsubscribe();\n this._subscription = null;\n }\n }\n\n //######################### private methods #########################\n\n /**\n * Renders progress overlay\n */\n private _renderProgressOverlay()\n {\n //removes progress indicator\n if(this._progressElement && !this._running)\n {\n this._progressElement.remove();\n this._progressElement = null;\n this._messagesElement = null;\n this._lastThreeMessages = [];\n\n this._element.nativeElement.style.position = this._notRunningCssPosition;\n this._notRunningCssPosition = null;\n this._element.nativeElement.style.overflow = this._notRunningOverflow;\n this._notRunningOverflow = null;\n }\n //adds progress indicator\n else if(!this._progressElement && this._running)\n {\n this._notRunningCssPosition = this._element.nativeElement.style.position;\n this._element.nativeElement.style.position = 'relative';\n this._notRunningOverflow = this._element.nativeElement.style.overflow;\n this._element.nativeElement.style.overflow = 'hidden';\n\n this._progressElement = this._document.createElement('div');\n this._progressElement.className = 'progress-overlay-div';\n\n const spinner = this._document.createElement('div');\n spinner.className = 'spinner';\n this._progressElement.append(spinner);\n\n this._messagesElement = this._document.createElement('div');\n this._messagesElement.className = 'messages';\n this._progressElement.append(this._messagesElement);\n\n this._element.nativeElement.append(this._progressElement);\n\n }\n\n this._renderProgressMessages();\n }\n\n /**\n * Renders messages to progress overlay\n */\n private _renderProgressMessages()\n {\n if(!this._messagesElement)\n {\n return;\n }\n\n const newMessages = this._messages.slice(this._messagesElement.childNodes.length);\n\n for(const message of newMessages)\n {\n const messageDiv = this._document.createElement('div');\n messageDiv.textContent = this._localizationSvc.get(message);\n\n this._lastThreeMessages.unshift(messageDiv);\n this._messagesElement.append(messageDiv);\n \n const outMessagesDiv = this._lastThreeMessages.splice(3);\n\n outMessagesDiv.forEach(outMsg =>\n {\n outMsg.className = 'message-out';\n });\n\n this._lastThreeMessages.forEach((msg, index) =>\n {\n msg.className = `message-${index}`;\n });\n }\n }\n}"]}
1
+ {"version":3,"file":"progressOverlay.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/progressIndicator/directives/progressOverlay/progressOverlay.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAqB,UAAU,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACtF,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAGzC,OAAO,EAAC,wBAAwB,EAAC,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;;;AAG7D;;GAEG;AAKH,MAAM,OAAO,wBAAwB;IAoDjC,iEAAiE;IACjE,YAAoB,QAAkC,EACl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gBAE5B,MAAM,CAAC,SAAS,GAAG,aAAa,CAAC;YACrC,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;gBAE3C,GAAG,CAAC,SAAS,GAAG,WAAW,KAAK,EAAE,CAAC;YACvC,CAAC,CAAC,CAAC;SACN;IACL,CAAC;;qHAlLQ,wBAAwB,oFAuDb,QAAQ,aACR,mBAAmB;yGAxD9B,wBAAwB;2FAAxB,wBAAwB;kBAJpC,SAAS;mBACV;oBACI,QAAQ,EAAE,mBAAmB;iBAChC;;0BAwDgB,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,mBAAmB;4CANhC,IAAI;sBADV,KAAK;uBAAC,iBAAiB","sourcesContent":["import {Directive, Input, OnInit, OnDestroy, ElementRef, Inject} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {Subscription} from 'rxjs';\n\nimport {ProgressIndicatorService} from '../../services/progressIndicator.service';\nimport {STRING_LOCALIZATION} from '../../../../types/tokens';\nimport {StringLocalization} from '../../../../services/stringLocalization';\n\n/**\n * Directive that is used for displaying progress indicator as overlay\n */\n@Directive(\n{\n selector: '[progressOverlay]'\n})\nexport class ProgressOverlayDirective implements OnInit, OnDestroy\n{\n //######################### private fields #########################\n \n /**\n * Previous css position value\n */\n private _notRunningCssPosition: string;\n\n /**\n * Previous css overflow value\n */\n private _notRunningOverflow: string;\n\n /**\n * Subscription for changes in ProgressIndicatorService\n */\n private _subscription: Subscription|null;\n\n /**\n * Array of messages that should be displayed\n */\n private _messages: string[];\n\n /**\n * Indication that this progress indicator is running\n */\n private _running: boolean;\n\n /**\n * Element that is displaying progress indicator overlay\n */\n private _progressElement: HTMLDivElement;\n\n /**\n * Html messages element\n */\n private _messagesElement: HTMLDivElement;\n\n /**\n * Html message elements, last three\n */\n private _lastThreeMessages: HTMLDivElement[] = [];\n\n //######################### public properties - inputs #########################\n\n /**\n * Name of progress indicator group\n */\n @Input('progressOverlay')\n public name: string;\n\n //######################### constructor #########################\n constructor(private _service: ProgressIndicatorService,\n private _element: ElementRef<HTMLElement>,\n @Inject(DOCUMENT) private _document: Document,\n @Inject(STRING_LOCALIZATION) private _localizationSvc: StringLocalization)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._service.registerOverlayGroup(this.name);\n\n this._running = this._service.running[this.name];\n this._messages = this._service.messages[this.name] || [];\n this._renderProgressOverlay();\n\n this._subscription = this._service.stateChange.subscribe(name => \n {\n if(name == this.name)\n {\n this._running = this._service.running[this.name];\n this._messages = this._service.messages[this.name] || [];\n this._renderProgressOverlay();\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 this._service.unregisterOverlayGroup(this.name);\n\n if(this._subscription)\n {\n this._subscription.unsubscribe();\n this._subscription = null;\n }\n }\n\n //######################### private methods #########################\n\n /**\n * Renders progress overlay\n */\n private _renderProgressOverlay()\n {\n //removes progress indicator\n if(this._progressElement && !this._running)\n {\n this._progressElement.remove();\n this._progressElement = null;\n this._messagesElement = null;\n this._lastThreeMessages = [];\n\n this._element.nativeElement.style.position = this._notRunningCssPosition;\n this._notRunningCssPosition = null;\n this._element.nativeElement.style.overflow = this._notRunningOverflow;\n this._notRunningOverflow = null;\n }\n //adds progress indicator\n else if(!this._progressElement && this._running)\n {\n this._notRunningCssPosition = this._element.nativeElement.style.position;\n this._element.nativeElement.style.position = 'relative';\n this._notRunningOverflow = this._element.nativeElement.style.overflow;\n this._element.nativeElement.style.overflow = 'hidden';\n\n this._progressElement = this._document.createElement('div');\n this._progressElement.className = 'progress-overlay-div';\n\n const spinner = this._document.createElement('div');\n spinner.className = 'spinner';\n this._progressElement.append(spinner);\n\n this._messagesElement = this._document.createElement('div');\n this._messagesElement.className = 'messages';\n this._progressElement.append(this._messagesElement);\n\n this._element.nativeElement.append(this._progressElement);\n\n }\n\n this._renderProgressMessages();\n }\n\n /**\n * Renders messages to progress overlay\n */\n private _renderProgressMessages()\n {\n if(!this._messagesElement)\n {\n return;\n }\n\n const newMessages = this._messages.slice(this._messagesElement.childNodes.length);\n\n for(const message of newMessages)\n {\n const messageDiv = this._document.createElement('div');\n messageDiv.textContent = this._localizationSvc.get(message);\n\n this._lastThreeMessages.unshift(messageDiv);\n this._messagesElement.append(messageDiv);\n \n const outMessagesDiv = this._lastThreeMessages.splice(3);\n\n outMessagesDiv.forEach(outMsg =>\n {\n outMsg.className = 'message-out';\n });\n\n this._lastThreeMessages.forEach((msg, index) =>\n {\n msg.className = `message-${index}`;\n });\n }\n }\n}"]}
@@ -38,9 +38,9 @@ export class ProgressInterceptor {
38
38
  }, () => this._indicatorSvc.hideProgress(req.context.get(PROGRESS_INDICATOR_GROUP_NAME))));
39
39
  }
40
40
  }
41
- ProgressInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ProgressInterceptor, deps: [{ token: i1.ProgressIndicatorService }], target: i0.ɵɵFactoryTarget.Injectable });
42
- ProgressInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ProgressInterceptor });
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ProgressInterceptor, decorators: [{
41
+ ProgressInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ProgressInterceptor, deps: [{ token: i1.ProgressIndicatorService }], target: i0.ɵɵFactoryTarget.Injectable });
42
+ ProgressInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ProgressInterceptor });
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ProgressInterceptor, decorators: [{
44
44
  type: Injectable
45
45
  }], ctorParameters: function () { return [{ type: i1.ProgressIndicatorService }]; } });
46
46
  /**
@@ -9,14 +9,14 @@ import * as i0 from "@angular/core";
9
9
  */
10
10
  export class ProgressIndicatorModule {
11
11
  }
12
- ProgressIndicatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ProgressIndicatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13
- ProgressIndicatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: ProgressIndicatorModule, declarations: [ProgressIndicatorComponent,
12
+ ProgressIndicatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ProgressIndicatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13
+ ProgressIndicatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: ProgressIndicatorModule, declarations: [ProgressIndicatorComponent,
14
14
  ProgressOverlayDirective], imports: [CommonModule,
15
15
  CommonLocalizeModule], exports: [ProgressIndicatorComponent,
16
16
  ProgressOverlayDirective] });
17
- ProgressIndicatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ProgressIndicatorModule, imports: [CommonModule,
17
+ ProgressIndicatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ProgressIndicatorModule, imports: [CommonModule,
18
18
  CommonLocalizeModule] });
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ProgressIndicatorModule, decorators: [{
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ProgressIndicatorModule, decorators: [{
20
20
  type: NgModule,
21
21
  args: [{
22
22
  imports: [
@@ -241,9 +241,9 @@ export class ProgressIndicatorService {
241
241
  return group;
242
242
  }
243
243
  }
244
- ProgressIndicatorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ProgressIndicatorService, deps: [{ token: PLATFORM_ID }, { token: i1.ProgressIndicatorOptions, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
245
- ProgressIndicatorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ProgressIndicatorService, providedIn: 'root' });
246
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ProgressIndicatorService, decorators: [{
244
+ ProgressIndicatorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ProgressIndicatorService, deps: [{ token: PLATFORM_ID }, { token: i1.ProgressIndicatorOptions, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
245
+ ProgressIndicatorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ProgressIndicatorService, providedIn: 'root' });
246
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ProgressIndicatorService, decorators: [{
247
247
  type: Injectable,
248
248
  args: [{ providedIn: 'root' }]
249
249
  }], ctorParameters: function () { return [{ type: Object, decorators: [{
@@ -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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AAwB,cADZ,MAAM;2FAClB,wBAAwB;kBADpC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;0DA8C0B,MAAM;0BAA/C,MAAM;2BAAC,WAAW;;0BAClB,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(this._platformId);\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(@Inject(PLATFORM_ID) private _platformId: Object,\n @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: null,\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;IA4CjC,kEAAkE;IAClE,YAAyC,WAAmB,EAC7B,MAAiC;QADvB,gBAAW,GAAX,WAAW,CAAQ;QAC7B,WAAM,GAAN,MAAM,CAA2B;QA5ChE,oEAAoE;QAEpE;;WAEG;QACK,eAAU,GAAY,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAElE;;WAEG;QACK,qBAAgB,GAA4C,EAAE,CAAC;QAEvE;;WAEG;QACK,iBAAY,GAAoB,IAAI,OAAO,EAAU,CAAC;QAE9D;;WAEG;QACK,wBAAmB,GAA8B,EAAE,CAAC;QAE5D,uEAAuE;QAEvE;;WAEG;QACI,YAAO,GAA+B,EAAE,CAAC;QAEhD;;WAEG;QACI,aAAQ,GAAgC,EAAE,CAAC;QAc9C,IAAG,MAAM,IAAI,CAAC,CAAC,MAAM,YAAY,wBAAwB,CAAC,EAC1D;YACI,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;YACxB,OAAO,CAAC,IAAI,CAAC,0HAA0H,CAAC,CAAC;SAC5I;QAED,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,CAAC;YAC5C;gBACI,eAAe,EAAE,CAAC;gBAClB,O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,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;;qHAhYQ,wBAAwB,kBA6Cb,WAAW;yHA7CtB,wBAAwB,cADZ,MAAM;2FAClB,wBAAwB;kBADpC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;0BA8Cf,MAAM;2BAAC,WAAW;;0BAClB,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(this._platformId);\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(@Inject(PLATFORM_ID) private _platformId: Object,\n @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: null,\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"]}
@@ -58,9 +58,9 @@ export class TooltipComponent {
58
58
  this._leaveFn();
59
59
  }
60
60
  }
61
- TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
62
- TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", 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 });
63
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: TooltipComponent, decorators: [{
61
+ TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
62
+ TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", 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 });
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TooltipComponent, decorators: [{
64
64
  type: Component,
65
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}"] }]
66
66
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { mouseEnter: [{
@@ -227,9 +227,9 @@ export class TooltipDirective {
227
227
  }
228
228
  }
229
229
  }
230
- TooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", 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 });
231
- TooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: TooltipDirective, selector: "[tooltip]", inputs: { tooltip: "tooltip", allowHtml: "allowHtml", template: "template", tooltipOptions: "tooltipOptions", tooltipVisible: "tooltipVisible" }, host: { listeners: { "mouseleave": "mouseLeave($event)", "mousemove": "mouseMove($event)" } }, queries: [{ propertyName: "tooltipTemplateChild", first: true, predicate: TooltipTemplateDirective, descendants: true }], usesOnChanges: true, ngImport: i0 });
232
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: TooltipDirective, decorators: [{
230
+ TooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", 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 });
231
+ TooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: TooltipDirective, selector: "[tooltip]", inputs: { tooltip: "tooltip", allowHtml: "allowHtml", template: "template", tooltipOptions: "tooltipOptions", tooltipVisible: "tooltipVisible" }, host: { listeners: { "mouseleave": "mouseLeave($event)", "mousemove": "mouseMove($event)" } }, queries: [{ propertyName: "tooltipTemplateChild", first: true, predicate: TooltipTemplateDirective, descendants: true }], usesOnChanges: true, ngImport: i0 });
232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TooltipDirective, decorators: [{
233
233
  type: Directive,
234
234
  args: [{
235
235
  selector: '[tooltip]'
@@ -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,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAC,eAAe,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAC,gBAAgB,EAAC,MAAM,4CAA4C,CAAC;AAE5E,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,mBAAmB,EAAY,cAAc,EAAE,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAC/G,OAAO,EAAC,wBAAwB,EAAC,MAAM,8CAA8C,CAAC;AAEtF,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;;;AAElD;;GAEG;AACH,MAAM,cAAc,GACpB;IACI,KAAK,EAAE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AA9C,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,QAAQ;;0BACf,QAAQ;;0BAAI,MAAM;2BAAC,eAAe;4CAnDxC,OAAO;sBADb,KAAK;gBAOC,SAAS;sBADf,KAAK;gBAOC,QAAQ;sBADd,KAAK;gBAOK,cAAc;sBADxB,KAAK;gBAiBC,cAAc;sBADpB,KAAK;gBASC,oBAAoB;sBAD1B,YAAY;uBAAC,wBAAwB;gBA6D/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 {extend, isBlank, isPresent, nameof} from '@jscrpt/common';\n\nimport {TooltipComponent} from '../../components/tooltip/tooltip.component';\nimport {TooltipOptions, TooltipRenderer} from '../../misc/tooltip.interface';\nimport {TOOLTIP_OPTIONS} from '../../misc/tokens';\nimport {applyPositionResult, Position, PositionOffset, 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: PositionOffset.MouseEnter,\n placement: PositionPlacement.TopStart\n },\n allowSelection: false,\n tooltipRenderer: TooltipComponent,\n tooltipCssClass: null,\n stopPropagation: false,\n enterAnimation: fadeInAnimation,\n exitAnimation: fadeOutAnimation,\n};\n\n/**\n * Directive used for rendering tooltip\n */\n@Directive(\n{\n selector: '[tooltip]'\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(): Partial<TooltipOptions>\n {\n return this._options;\n }\n public set tooltipOptions(value: Partial<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\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 //######################### 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\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 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 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 .toPromise()\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 this._document.body.appendChild(this._tooltipElement);\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,WAAW,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AACtN,OAAO,EAAC,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAC,eAAe,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAC,gBAAgB,EAAC,MAAM,4CAA4C,CAAC;AAE5E,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,mBAAmB,EAAY,cAAc,EAAE,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAC/G,OAAO,EAAC,wBAAwB,EAAC,MAAM,8CAA8C,CAAC;AAEtF,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;;;AAElD;;GAEG;AACH,MAAM,cAAc,GACpB;IACI,KAAK,EAAE,GAAG;IACV,QAAQ,EACR;QACI,MAAM,EAAE,cAAc,CAAC,UAAU;QACjC,SAA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2BAAC,eAAe;4CAnDxC,OAAO;sBADb,KAAK;gBAOC,SAAS;sBADf,KAAK;gBAOC,QAAQ;sBADd,KAAK;gBAOK,cAAc;sBADxB,KAAK;gBAiBC,cAAc;sBADpB,KAAK;gBASC,oBAAoB;sBAD1B,YAAY;uBAAC,wBAAwB;gBA6D/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 {extend, isBlank, isPresent, nameof} from '@jscrpt/common';\n\nimport {TooltipComponent} from '../../components/tooltip/tooltip.component';\nimport {TooltipOptions, TooltipRenderer} from '../../misc/tooltip.interface';\nimport {TOOLTIP_OPTIONS} from '../../misc/tokens';\nimport {applyPositionResult, Position, PositionOffset, 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: PositionOffset.MouseEnter,\n placement: PositionPlacement.TopStart\n },\n allowSelection: false,\n tooltipRenderer: TooltipComponent,\n tooltipCssClass: null,\n stopPropagation: false,\n enterAnimation: fadeInAnimation,\n exitAnimation: fadeOutAnimation,\n};\n\n/**\n * Directive used for rendering tooltip\n */\n@Directive(\n{\n selector: '[tooltip]'\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(): Partial<TooltipOptions>\n {\n return this._options;\n }\n public set tooltipOptions(value: Partial<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\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 //######################### 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\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 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 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 .toPromise()\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 this._document.body.appendChild(this._tooltipElement);\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}"]}
@@ -16,9 +16,9 @@ export class TooltipTemplateDirective {
16
16
  return true;
17
17
  }
18
18
  }
19
- TooltipTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: TooltipTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
20
- TooltipTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: TooltipTemplateDirective, selector: "[tooltipTemplate]", ngImport: i0 });
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: TooltipTemplateDirective, decorators: [{
19
+ TooltipTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TooltipTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
20
+ TooltipTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: TooltipTemplateDirective, selector: "[tooltipTemplate]", ngImport: i0 });
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TooltipTemplateDirective, decorators: [{
22
22
  type: Directive,
23
23
  args: [{
24
24
  selector: '[tooltipTemplate]'
@@ -8,13 +8,13 @@ import * as i0 from "@angular/core";
8
8
  */
9
9
  export class TooltipModule {
10
10
  }
11
- TooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
12
- TooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: TooltipModule, declarations: [TooltipDirective,
11
+ TooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
12
+ TooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: TooltipModule, declarations: [TooltipDirective,
13
13
  TooltipTemplateDirective,
14
14
  TooltipComponent], imports: [CommonModule], exports: [TooltipDirective,
15
15
  TooltipTemplateDirective] });
16
- TooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: TooltipModule, imports: [CommonModule] });
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: TooltipModule, decorators: [{
16
+ TooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TooltipModule, imports: [CommonModule] });
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TooltipModule, decorators: [{
18
18
  type: NgModule,
19
19
  args: [{
20
20
  imports: [
@@ -13,9 +13,9 @@ export class IsNaNPipe {
13
13
  return isNaN(value);
14
14
  }
15
15
  }
16
- IsNaNPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IsNaNPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
17
- IsNaNPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: IsNaNPipe, name: "isNaN" });
18
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IsNaNPipe, decorators: [{
16
+ IsNaNPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: IsNaNPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
17
+ IsNaNPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: IsNaNPipe, name: "isNaN" });
18
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: IsNaNPipe, decorators: [{
19
19
  type: Pipe,
20
20
  args: [{
21
21
  name: 'isNaN'
@@ -14,9 +14,9 @@ export class IsPresentPipe {
14
14
  return isPresent(value);
15
15
  }
16
16
  }
17
- IsPresentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IsPresentPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
18
- IsPresentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: IsPresentPipe, name: "isPresent" });
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IsPresentPipe, decorators: [{
17
+ IsPresentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: IsPresentPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
18
+ IsPresentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: IsPresentPipe, name: "isPresent" });
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: IsPresentPipe, decorators: [{
20
20
  type: Pipe,
21
21
  args: [{
22
22
  name: 'isPresent'
@@ -16,9 +16,9 @@ export class KeysPipe {
16
16
  return Object.keys(value);
17
17
  }
18
18
  }
19
- KeysPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
20
- KeysPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: KeysPipe, name: "keys" });
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: KeysPipe, decorators: [{
19
+ KeysPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
20
+ KeysPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: KeysPipe, name: "keys" });
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: KeysPipe, decorators: [{
22
22
  type: Pipe,
23
23
  args: [{ name: 'keys' }]
24
24
  }] });
@@ -1,4 +1,5 @@
1
1
  import { Pipe, Inject, ChangeDetectorRef } from '@angular/core';
2
+ import { isBlank } from '@jscrpt/common';
2
3
  import { STRING_LOCALIZATION } from '../../types/tokens';
3
4
  import * as i0 from "@angular/core";
4
5
  /**
@@ -17,6 +18,9 @@ export class LocalizePipe {
17
18
  * @param interpolateParams - Optional object storing interpolation parameters
18
19
  */
19
20
  transform(key, interpolateParams) {
21
+ if (isBlank(key)) {
22
+ return '';
23
+ }
20
24
  return this._localizationSvc.get(key, interpolateParams);
21
25
  }
22
26
  //######################### public methods - implementation of OnInit #########################
@@ -39,9 +43,9 @@ export class LocalizePipe {
39
43
  }
40
44
  }
41
45
  }
42
- LocalizePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LocalizePipe, deps: [{ token: STRING_LOCALIZATION }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });
43
- LocalizePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: LocalizePipe, name: "localize", pure: false });
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LocalizePipe, decorators: [{
46
+ LocalizePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: LocalizePipe, deps: [{ token: STRING_LOCALIZATION }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });
47
+ LocalizePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: LocalizePipe, name: "localize", pure: false });
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: LocalizePipe, decorators: [{
45
49
  type: Pipe,
46
50
  args: [{
47
51
  name: 'localize',
@@ -1 +1 @@
1
- {"version":3,"file":"localize.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/localize/localize.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAiB,MAAM,EAAE,iBAAiB,EAAoB,MAAM,eAAe,CAAC;AAGhG,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;;AAGvD;;GAEG;AAMH,MAAM,OAAO,YAAY;IASrB,iEAAiE;IACjE,YAAiD,gBAAoC,EACjE,eAAkC;QADL,qBAAgB,GAAhB,gBAAgB,CAAoB;QACjE,oBAAe,GAAf,eAAe,CAAmB;IAEtD,CAAC;IAED,oEAAoE;IAEpE;;;;OAIG;IACI,SAAS,CAAC,GAAW,EAAE,iBAA0B;QAEpD,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;IAC7D,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,EAAE;YAElE,IAAI,CAAC,eAAe,CAAC,YAAY,EAAE,CAAC;QACxC,CAAC,CAAC,CAAC;IACP,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAG,IAAI,CAAC,aAAa,EACrB;YACI,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC;YACjC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;SAC7B;IACL,CAAC;;yGApDQ,YAAY,kBAUD,mBAAmB;uGAV9B,YAAY;2FAAZ,YAAY;kBALxB,IAAI;mBACL;oBACI,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,KAAK;iBACd;;0BAWgB,MAAM;2BAAC,mBAAmB","sourcesContent":["import {Pipe, PipeTransform, Inject, ChangeDetectorRef, OnInit, OnDestroy} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {STRING_LOCALIZATION} from '../../types/tokens';\nimport {StringLocalization} from '../../services/stringLocalization';\n\n/**\n * Localize strings using 'StringLocalization'\n */\n@Pipe(\n{\n name: 'localize',\n pure: false\n})\nexport class LocalizePipe implements PipeTransform, OnInit, OnDestroy\n{\n //######################### private fields #########################\n\n /**\n * Subscription for changes of texts\n */\n private _subscription: Subscription;\n\n //######################### constructor #########################\n constructor(@Inject(STRING_LOCALIZATION) private _localizationSvc: StringLocalization,\n private _changeDetector: ChangeDetectorRef)\n {\n }\n\n //######################### public methods #########################\n\n /**\n * Gets localized string for specified key, interpolation might be used\n * @param key - Key to be localized\n * @param interpolateParams - Optional object storing interpolation parameters\n */\n public transform(key: string, interpolateParams?: Object): string\n {\n return this._localizationSvc.get(key, interpolateParams);\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._subscription = this._localizationSvc.textsChange.subscribe(() =>\n {\n this._changeDetector.markForCheck();\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._subscription)\n {\n this._subscription.unsubscribe();\n this._subscription = null;\n }\n }\n}"]}
1
+ {"version":3,"file":"localize.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/localize/localize.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAiB,MAAM,EAAE,iBAAiB,EAAoB,MAAM,eAAe,CAAC;AAChG,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAGvC,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;;AAGvD;;GAEG;AAMH,MAAM,OAAO,YAAY;IASrB,iEAAiE;IACjE,YAAiD,gBAAoC,EACjE,eAAkC;QADL,qBAAgB,GAAhB,gBAAgB,CAAoB;QACjE,oBAAe,GAAf,eAAe,CAAmB;IAEtD,CAAC;IAED,oEAAoE;IAEpE;;;;OAIG;IACI,SAAS,CAAC,GAA0B,EAAE,iBAA0B;QAEnE,IAAG,OAAO,CAAC,GAAG,CAAC,EACf;YACI,OAAO,EAAE,CAAC;SACb;QAED,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;IAC7D,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,EAAE;YAElE,IAAI,CAAC,eAAe,CAAC,YAAY,EAAE,CAAC;QACxC,CAAC,CAAC,CAAC;IACP,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAG,IAAI,CAAC,aAAa,EACrB;YACI,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC;YACjC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;SAC7B;IACL,CAAC;;yGAzDQ,YAAY,kBAUD,mBAAmB;uGAV9B,YAAY;2FAAZ,YAAY;kBALxB,IAAI;mBACL;oBACI,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,KAAK;iBACd;;0BAWgB,MAAM;2BAAC,mBAAmB","sourcesContent":["import {Pipe, PipeTransform, Inject, ChangeDetectorRef, OnInit, OnDestroy} from '@angular/core';\nimport {isBlank} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {STRING_LOCALIZATION} from '../../types/tokens';\nimport {StringLocalization} from '../../services/stringLocalization';\n\n/**\n * Localize strings using 'StringLocalization'\n */\n@Pipe(\n{\n name: 'localize',\n pure: false\n})\nexport class LocalizePipe implements PipeTransform, OnInit, OnDestroy\n{\n //######################### private fields #########################\n\n /**\n * Subscription for changes of texts\n */\n private _subscription: Subscription;\n\n //######################### constructor #########################\n constructor(@Inject(STRING_LOCALIZATION) private _localizationSvc: StringLocalization,\n private _changeDetector: ChangeDetectorRef)\n {\n }\n\n //######################### public methods #########################\n\n /**\n * Gets localized string for specified key, interpolation might be used\n * @param key - Key to be localized\n * @param interpolateParams - Optional object storing interpolation parameters\n */\n public transform(key: string|undefined|null, interpolateParams?: Object): string\n {\n if(isBlank(key))\n {\n return '';\n }\n\n return this._localizationSvc.get(key, interpolateParams);\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._subscription = this._localizationSvc.textsChange.subscribe(() =>\n {\n this._changeDetector.markForCheck();\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._subscription)\n {\n this._subscription.unsubscribe();\n this._subscription = null;\n }\n }\n}"]}
@@ -34,9 +34,9 @@ export class MergeCssClassesPipe {
34
34
  return result;
35
35
  }
36
36
  }
37
- MergeCssClassesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MergeCssClassesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
38
- MergeCssClassesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: MergeCssClassesPipe, name: "mergeCssClasses" });
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MergeCssClassesPipe, decorators: [{
37
+ MergeCssClassesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MergeCssClassesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
38
+ MergeCssClassesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: MergeCssClassesPipe, name: "mergeCssClasses" });
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MergeCssClassesPipe, decorators: [{
40
40
  type: Pipe,
41
41
  args: [{ name: 'mergeCssClasses' }]
42
42
  }] });
@@ -17,9 +17,9 @@ export class UrlEncodePipe {
17
17
  return serializeToUrlQuery(value);
18
18
  }
19
19
  }
20
- UrlEncodePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: UrlEncodePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
21
- UrlEncodePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: UrlEncodePipe, name: "urlEncode" });
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: UrlEncodePipe, decorators: [{
20
+ UrlEncodePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: UrlEncodePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
21
+ UrlEncodePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: UrlEncodePipe, name: "urlEncode" });
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: UrlEncodePipe, decorators: [{
23
23
  type: Pipe,
24
24
  args: [{ name: 'urlEncode' }]
25
25
  }] });
@@ -89,9 +89,9 @@ export class CookieService {
89
89
  }
90
90
  }
91
91
  }
92
- CookieService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: CookieService, deps: [{ token: PLATFORM_ID }, { token: HTTP_REQUEST_COOKIE_HEADER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
93
- CookieService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: CookieService, providedIn: 'root' });
94
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: CookieService, decorators: [{
92
+ CookieService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CookieService, deps: [{ token: PLATFORM_ID }, { token: HTTP_REQUEST_COOKIE_HEADER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
93
+ CookieService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CookieService, providedIn: 'root' });
94
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CookieService, decorators: [{
95
95
  type: Injectable,
96
96
  args: [{ providedIn: 'root' }]
97
97
  }], ctorParameters: function () { return [{ type: Object, decorators: [{