@sunbird-cb/utils 1.0.8 → 1.0.9

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 (245) hide show
  1. package/bundles/sunbird-cb-utils.umd.js +5320 -5304
  2. package/bundles/sunbird-cb-utils.umd.js.map +1 -1
  3. package/bundles/sunbird-cb-utils.umd.min.js +2 -2
  4. package/bundles/sunbird-cb-utils.umd.min.js.map +1 -1
  5. package/esm2015/lib/components/image-crop/image-crop.component.js +194 -194
  6. package/esm2015/lib/components/image-crop/image-crop.module.js +26 -26
  7. package/esm2015/lib/constants/features.enum.js +554 -554
  8. package/esm2015/lib/constants/instances.enum.js +4 -4
  9. package/esm2015/lib/directives/class-change-on-scroll/class-change-on-scroll.directive.js +86 -86
  10. package/esm2015/lib/directives/class-change-on-scroll/class-change-on-scroll.module.js +14 -14
  11. package/esm2015/lib/directives/default-thumbnail/default-thumbnail.directive.js +37 -37
  12. package/esm2015/lib/directives/default-thumbnail/default-thumbnail.module.js +14 -14
  13. package/esm2015/lib/directives/image-responsive/image-responsive.directive.js +91 -91
  14. package/esm2015/lib/directives/image-responsive/image-responsive.module.js +14 -14
  15. package/esm2015/lib/directives/in-view-port/in-view-port.directive.js +67 -67
  16. package/esm2015/lib/directives/in-view-port/in-view-port.module.js +14 -14
  17. package/esm2015/lib/directives/navigation/navigation.directive.js +38 -38
  18. package/esm2015/lib/directives/navigation/navigation.module.js +14 -14
  19. package/esm2015/lib/directives/permission/permission.directive.js +10 -10
  20. package/esm2015/lib/directives/permission/permission.module.js +14 -14
  21. package/esm2015/lib/helpers/functions/getStringifiedQueryParams.js +8 -8
  22. package/esm2015/lib/helpers/horizontal-scroller/horizontal-scroller.component.js +98 -98
  23. package/esm2015/lib/helpers/horizontal-scroller/horizontal-scroller.module.js +18 -18
  24. package/esm2015/lib/helpers/logout/logout.component.js +57 -56
  25. package/esm2015/lib/helpers/logout/logout.module.js +17 -17
  26. package/esm2015/lib/models/contentRating.model.js +12 -12
  27. package/esm2015/lib/pipes/pipe-concise-date-range/pipe-concise-date-range.module.js +12 -12
  28. package/esm2015/lib/pipes/pipe-concise-date-range/pipe-concise-date-range.pipe.js +58 -58
  29. package/esm2015/lib/pipes/pipe-count-transform/pipe-count-transform.module.js +14 -14
  30. package/esm2015/lib/pipes/pipe-count-transform/pipe-count-transform.pipe.js +32 -32
  31. package/esm2015/lib/pipes/pipe-date-concat/pipe-date-concat.module.js +14 -14
  32. package/esm2015/lib/pipes/pipe-date-concat/pipe-date-concat.pipe.js +42 -42
  33. package/esm2015/lib/pipes/pipe-duration-transform/pipe-duration-transform.module.js +14 -14
  34. package/esm2015/lib/pipes/pipe-duration-transform/pipe-duration-transform.pipe.js +59 -59
  35. package/esm2015/lib/pipes/pipe-filter/pipe-filter.module.js +14 -14
  36. package/esm2015/lib/pipes/pipe-filter/pipe-filter.pipe.js +15 -15
  37. package/esm2015/lib/pipes/pipe-filter-search/pipe-filter-search.module.js +14 -14
  38. package/esm2015/lib/pipes/pipe-filter-search/pipe-filter-search.pipe.js +29 -29
  39. package/esm2015/lib/pipes/pipe-html-tag-removal/pipe-html-tag-removal.module.js +14 -14
  40. package/esm2015/lib/pipes/pipe-html-tag-removal/pipe-html-tag-removal.pipe.js +11 -11
  41. package/esm2015/lib/pipes/pipe-limit-to/pipe-limit-to.module.js +14 -14
  42. package/esm2015/lib/pipes/pipe-limit-to/pipe-limit-to.pipe.js +24 -24
  43. package/esm2015/lib/pipes/pipe-list-filter/pipe-list-filter.module.js +14 -14
  44. package/esm2015/lib/pipes/pipe-list-filter/pipe-list-filter.pipe.js +16 -16
  45. package/esm2015/lib/pipes/pipe-name-transform/pipe-name-transform.module.js +14 -14
  46. package/esm2015/lib/pipes/pipe-name-transform/pipe-name-transform.pipe.js +30 -30
  47. package/esm2015/lib/pipes/pipe-order-by/pipe-order-by.module.js +14 -14
  48. package/esm2015/lib/pipes/pipe-order-by/pipe-order-by.pipe.js +15 -15
  49. package/esm2015/lib/pipes/pipe-partial-content/pipe-partial-content.module.js +14 -14
  50. package/esm2015/lib/pipes/pipe-partial-content/pipe-partial-content.pipe.js +17 -17
  51. package/esm2015/lib/pipes/pipe-relative-time/pipe-relative-time.module.js +14 -14
  52. package/esm2015/lib/pipes/pipe-relative-time/pipe-relative-time.pipe.js +15 -15
  53. package/esm2015/lib/pipes/pipe-safe-sanitizer/pipe-safe-sanitizer.module.js +14 -14
  54. package/esm2015/lib/pipes/pipe-safe-sanitizer/pipe-safe-sanitizer.pipe.js +34 -34
  55. package/esm2015/lib/resolvers/explore-detail.resolver.js +88 -88
  56. package/esm2015/lib/resolvers/marketing-offering.resolve.js +39 -39
  57. package/esm2015/lib/resolvers/page.constant.js +3 -3
  58. package/esm2015/lib/resolvers/page.model.js +46 -46
  59. package/esm2015/lib/resolvers/page.resolver.js +89 -89
  60. package/esm2015/lib/resolvers/resolver.model.js +5 -5
  61. package/esm2015/lib/services/auth-keycloak.service.js +235 -225
  62. package/esm2015/lib/services/auth-microsoft.service.js +195 -195
  63. package/esm2015/lib/services/card-content.model.js +30 -30
  64. package/esm2015/lib/services/configurations.model.js +508 -508
  65. package/esm2015/lib/services/configurations.service.js +103 -103
  66. package/esm2015/lib/services/content-strip-multiple.model.js +74 -74
  67. package/esm2015/lib/services/event.model.js +227 -227
  68. package/esm2015/lib/services/event.service.js +107 -107
  69. package/esm2015/lib/services/logger.service.js +54 -54
  70. package/esm2015/lib/services/ms-office.model.js +7 -7
  71. package/esm2015/lib/services/subapplication-respond.service.js +224 -224
  72. package/esm2015/lib/services/telemetry.service.js +449 -449
  73. package/esm2015/lib/services/user-preference.model.js +28 -28
  74. package/esm2015/lib/services/user-preference.service.js +89 -89
  75. package/esm2015/lib/services/utility.service.js +144 -144
  76. package/esm2015/lib/services/value.service.js +30 -30
  77. package/esm2015/lib/services/widget-content.model.js +341 -341
  78. package/esm2015/lib/services/widget-content.service.js +191 -191
  79. package/esm2015/lib/services/widget-resolver.model.js +56 -56
  80. package/esm2015/lib/services/widget-search.model.js +125 -125
  81. package/esm2015/public-api.js +66 -66
  82. package/esm2015/sunbird-cb-utils.js +8 -8
  83. package/esm5/lib/components/image-crop/image-crop.component.js +199 -199
  84. package/esm5/lib/components/image-crop/image-crop.module.js +30 -30
  85. package/esm5/lib/constants/features.enum.js +554 -554
  86. package/esm5/lib/constants/instances.enum.js +4 -4
  87. package/esm5/lib/directives/class-change-on-scroll/class-change-on-scroll.directive.js +104 -104
  88. package/esm5/lib/directives/class-change-on-scroll/class-change-on-scroll.module.js +18 -18
  89. package/esm5/lib/directives/default-thumbnail/default-thumbnail.directive.js +39 -39
  90. package/esm5/lib/directives/default-thumbnail/default-thumbnail.module.js +18 -18
  91. package/esm5/lib/directives/image-responsive/image-responsive.directive.js +94 -94
  92. package/esm5/lib/directives/image-responsive/image-responsive.module.js +18 -18
  93. package/esm5/lib/directives/in-view-port/in-view-port.directive.js +72 -72
  94. package/esm5/lib/directives/in-view-port/in-view-port.module.js +18 -18
  95. package/esm5/lib/directives/navigation/navigation.directive.js +40 -40
  96. package/esm5/lib/directives/navigation/navigation.module.js +18 -18
  97. package/esm5/lib/directives/permission/permission.directive.js +13 -13
  98. package/esm5/lib/directives/permission/permission.module.js +18 -18
  99. package/esm5/lib/helpers/functions/getStringifiedQueryParams.js +8 -8
  100. package/esm5/lib/helpers/horizontal-scroller/horizontal-scroller.component.js +102 -102
  101. package/esm5/lib/helpers/horizontal-scroller/horizontal-scroller.module.js +22 -22
  102. package/esm5/lib/helpers/logout/logout.component.js +63 -62
  103. package/esm5/lib/helpers/logout/logout.module.js +21 -21
  104. package/esm5/lib/models/contentRating.model.js +12 -12
  105. package/esm5/lib/pipes/pipe-concise-date-range/pipe-concise-date-range.module.js +16 -16
  106. package/esm5/lib/pipes/pipe-concise-date-range/pipe-concise-date-range.pipe.js +62 -62
  107. package/esm5/lib/pipes/pipe-count-transform/pipe-count-transform.module.js +18 -18
  108. package/esm5/lib/pipes/pipe-count-transform/pipe-count-transform.pipe.js +36 -36
  109. package/esm5/lib/pipes/pipe-date-concat/pipe-date-concat.module.js +18 -18
  110. package/esm5/lib/pipes/pipe-date-concat/pipe-date-concat.pipe.js +44 -44
  111. package/esm5/lib/pipes/pipe-duration-transform/pipe-duration-transform.module.js +18 -18
  112. package/esm5/lib/pipes/pipe-duration-transform/pipe-duration-transform.pipe.js +63 -63
  113. package/esm5/lib/pipes/pipe-filter/pipe-filter.module.js +18 -18
  114. package/esm5/lib/pipes/pipe-filter/pipe-filter.pipe.js +19 -19
  115. package/esm5/lib/pipes/pipe-filter-search/pipe-filter-search.module.js +18 -18
  116. package/esm5/lib/pipes/pipe-filter-search/pipe-filter-search.pipe.js +37 -37
  117. package/esm5/lib/pipes/pipe-html-tag-removal/pipe-html-tag-removal.module.js +18 -18
  118. package/esm5/lib/pipes/pipe-html-tag-removal/pipe-html-tag-removal.pipe.js +15 -15
  119. package/esm5/lib/pipes/pipe-limit-to/pipe-limit-to.module.js +18 -18
  120. package/esm5/lib/pipes/pipe-limit-to/pipe-limit-to.pipe.js +29 -29
  121. package/esm5/lib/pipes/pipe-list-filter/pipe-list-filter.module.js +18 -18
  122. package/esm5/lib/pipes/pipe-list-filter/pipe-list-filter.pipe.js +20 -20
  123. package/esm5/lib/pipes/pipe-name-transform/pipe-name-transform.module.js +18 -18
  124. package/esm5/lib/pipes/pipe-name-transform/pipe-name-transform.pipe.js +34 -34
  125. package/esm5/lib/pipes/pipe-order-by/pipe-order-by.module.js +18 -18
  126. package/esm5/lib/pipes/pipe-order-by/pipe-order-by.pipe.js +17 -17
  127. package/esm5/lib/pipes/pipe-partial-content/pipe-partial-content.module.js +18 -18
  128. package/esm5/lib/pipes/pipe-partial-content/pipe-partial-content.pipe.js +33 -33
  129. package/esm5/lib/pipes/pipe-relative-time/pipe-relative-time.module.js +18 -18
  130. package/esm5/lib/pipes/pipe-relative-time/pipe-relative-time.pipe.js +19 -19
  131. package/esm5/lib/pipes/pipe-safe-sanitizer/pipe-safe-sanitizer.module.js +18 -18
  132. package/esm5/lib/pipes/pipe-safe-sanitizer/pipe-safe-sanitizer.pipe.js +37 -37
  133. package/esm5/lib/resolvers/explore-detail.resolver.js +92 -92
  134. package/esm5/lib/resolvers/marketing-offering.resolve.js +42 -42
  135. package/esm5/lib/resolvers/page.constant.js +3 -3
  136. package/esm5/lib/resolvers/page.model.js +46 -46
  137. package/esm5/lib/resolvers/page.resolver.js +97 -97
  138. package/esm5/lib/resolvers/resolver.model.js +5 -5
  139. package/esm5/lib/services/auth-keycloak.service.js +310 -293
  140. package/esm5/lib/services/auth-microsoft.service.js +250 -250
  141. package/esm5/lib/services/card-content.model.js +30 -30
  142. package/esm5/lib/services/configurations.model.js +508 -508
  143. package/esm5/lib/services/configurations.service.js +105 -105
  144. package/esm5/lib/services/content-strip-multiple.model.js +74 -74
  145. package/esm5/lib/services/event.model.js +227 -227
  146. package/esm5/lib/services/event.service.js +110 -110
  147. package/esm5/lib/services/logger.service.js +72 -72
  148. package/esm5/lib/services/ms-office.model.js +7 -7
  149. package/esm5/lib/services/subapplication-respond.service.js +229 -229
  150. package/esm5/lib/services/telemetry.service.js +484 -484
  151. package/esm5/lib/services/user-preference.model.js +28 -28
  152. package/esm5/lib/services/user-preference.service.js +108 -108
  153. package/esm5/lib/services/utility.service.js +177 -177
  154. package/esm5/lib/services/value.service.js +32 -32
  155. package/esm5/lib/services/widget-content.model.js +341 -341
  156. package/esm5/lib/services/widget-content.service.js +213 -213
  157. package/esm5/lib/services/widget-resolver.model.js +56 -56
  158. package/esm5/lib/services/widget-search.model.js +125 -125
  159. package/esm5/public-api.js +66 -66
  160. package/esm5/sunbird-cb-utils.js +8 -8
  161. package/fesm2015/sunbird-cb-utils.js +4892 -4883
  162. package/fesm2015/sunbird-cb-utils.js.map +1 -1
  163. package/fesm5/sunbird-cb-utils.js +5319 -5303
  164. package/fesm5/sunbird-cb-utils.js.map +1 -1
  165. package/lib/components/image-crop/image-crop.component.d.ts +56 -56
  166. package/lib/components/image-crop/image-crop.module.d.ts +2 -2
  167. package/lib/constants/features.enum.d.ts +553 -553
  168. package/lib/constants/instances.enum.d.ts +3 -3
  169. package/lib/constants/misc.constants.d.ts +2 -2
  170. package/lib/directives/class-change-on-scroll/class-change-on-scroll.directive.d.ts +18 -18
  171. package/lib/directives/class-change-on-scroll/class-change-on-scroll.module.d.ts +2 -2
  172. package/lib/directives/default-thumbnail/default-thumbnail.directive.d.ts +9 -9
  173. package/lib/directives/default-thumbnail/default-thumbnail.module.d.ts +2 -2
  174. package/lib/directives/image-responsive/image-responsive.directive.d.ts +17 -17
  175. package/lib/directives/image-responsive/image-responsive.module.d.ts +2 -2
  176. package/lib/directives/in-view-port/in-view-port.directive.d.ts +11 -11
  177. package/lib/directives/in-view-port/in-view-port.module.d.ts +2 -2
  178. package/lib/directives/navigation/navigation.directive.d.ts +9 -9
  179. package/lib/directives/navigation/navigation.module.d.ts +2 -2
  180. package/lib/directives/permission/permission.directive.d.ts +3 -3
  181. package/lib/directives/permission/permission.module.d.ts +2 -2
  182. package/lib/helpers/functions/getStringifiedQueryParams.d.ts +3 -3
  183. package/lib/helpers/horizontal-scroller/horizontal-scroller.component.d.ts +18 -18
  184. package/lib/helpers/horizontal-scroller/horizontal-scroller.module.d.ts +2 -2
  185. package/lib/helpers/logout/logout.component.d.ts +18 -18
  186. package/lib/helpers/logout/logout.module.d.ts +2 -2
  187. package/lib/models/contentRating.model.d.ts +9 -9
  188. package/lib/pipes/pipe-concise-date-range/pipe-concise-date-range.module.d.ts +2 -2
  189. package/lib/pipes/pipe-concise-date-range/pipe-concise-date-range.pipe.d.ts +10 -10
  190. package/lib/pipes/pipe-count-transform/pipe-count-transform.module.d.ts +2 -2
  191. package/lib/pipes/pipe-count-transform/pipe-count-transform.pipe.d.ts +4 -4
  192. package/lib/pipes/pipe-date-concat/pipe-date-concat.module.d.ts +2 -2
  193. package/lib/pipes/pipe-date-concat/pipe-date-concat.pipe.d.ts +13 -13
  194. package/lib/pipes/pipe-duration-transform/pipe-duration-transform.module.d.ts +2 -2
  195. package/lib/pipes/pipe-duration-transform/pipe-duration-transform.pipe.d.ts +5 -5
  196. package/lib/pipes/pipe-filter/pipe-filter.module.d.ts +2 -2
  197. package/lib/pipes/pipe-filter/pipe-filter.pipe.d.ts +4 -4
  198. package/lib/pipes/pipe-filter-search/pipe-filter-search.module.d.ts +2 -2
  199. package/lib/pipes/pipe-filter-search/pipe-filter-search.pipe.d.ts +4 -4
  200. package/lib/pipes/pipe-html-tag-removal/pipe-html-tag-removal.module.d.ts +2 -2
  201. package/lib/pipes/pipe-html-tag-removal/pipe-html-tag-removal.pipe.d.ts +4 -4
  202. package/lib/pipes/pipe-limit-to/pipe-limit-to.module.d.ts +2 -2
  203. package/lib/pipes/pipe-limit-to/pipe-limit-to.pipe.d.ts +4 -4
  204. package/lib/pipes/pipe-list-filter/pipe-list-filter.module.d.ts +2 -2
  205. package/lib/pipes/pipe-list-filter/pipe-list-filter.pipe.d.ts +4 -4
  206. package/lib/pipes/pipe-name-transform/pipe-name-transform.module.d.ts +2 -2
  207. package/lib/pipes/pipe-name-transform/pipe-name-transform.pipe.d.ts +10 -10
  208. package/lib/pipes/pipe-order-by/pipe-order-by.module.d.ts +2 -2
  209. package/lib/pipes/pipe-order-by/pipe-order-by.pipe.d.ts +9 -9
  210. package/lib/pipes/pipe-partial-content/pipe-partial-content.module.d.ts +2 -2
  211. package/lib/pipes/pipe-partial-content/pipe-partial-content.pipe.d.ts +4 -4
  212. package/lib/pipes/pipe-relative-time/pipe-relative-time.module.d.ts +2 -2
  213. package/lib/pipes/pipe-relative-time/pipe-relative-time.pipe.d.ts +4 -4
  214. package/lib/pipes/pipe-safe-sanitizer/pipe-safe-sanitizer.module.d.ts +2 -2
  215. package/lib/pipes/pipe-safe-sanitizer/pipe-safe-sanitizer.pipe.d.ts +7 -7
  216. package/lib/resolvers/explore-detail.resolver.d.ts +16 -16
  217. package/lib/resolvers/marketing-offering.resolve.d.ts +10 -10
  218. package/lib/resolvers/page.constant.d.ts +1 -1
  219. package/lib/resolvers/page.model.d.ts +40 -40
  220. package/lib/resolvers/page.resolver.d.ts +17 -17
  221. package/lib/resolvers/resolver.model.d.ts +4 -4
  222. package/lib/services/auth-keycloak.service.d.ts +30 -27
  223. package/lib/services/auth-microsoft.service.d.ts +30 -30
  224. package/lib/services/card-content.model.d.ts +29 -29
  225. package/lib/services/configurations.model.d.ts +487 -487
  226. package/lib/services/configurations.service.d.ts +49 -49
  227. package/lib/services/content-strip-multiple.model.d.ts +79 -79
  228. package/lib/services/event.model.d.ts +192 -192
  229. package/lib/services/event.service.d.ts +14 -14
  230. package/lib/services/logger.service.d.ts +15 -15
  231. package/lib/services/ms-office.model.d.ts +6 -6
  232. package/lib/services/subapplication-respond.service.d.ts +25 -25
  233. package/lib/services/telemetry.service.d.ts +42 -42
  234. package/lib/services/user-preference.model.d.ts +26 -26
  235. package/lib/services/user-preference.service.d.ts +11 -11
  236. package/lib/services/utility.service.d.ts +31 -31
  237. package/lib/services/value.service.d.ts +8 -8
  238. package/lib/services/widget-content.model.d.ts +314 -314
  239. package/lib/services/widget-content.service.d.ts +49 -49
  240. package/lib/services/widget-resolver.model.d.ts +48 -48
  241. package/lib/services/widget-search.model.d.ts +114 -114
  242. package/package.json +1 -1
  243. package/public-api.d.ts +66 -66
  244. package/sunbird-cb-utils.d.ts +8 -8
  245. package/sunbird-cb-utils.metadata.json +1 -1
@@ -1,178 +1,178 @@
1
- import { Platform } from '@angular/cdk/platform';
2
- import { HttpClient } from '@angular/common/http';
3
- import { Injectable } from '@angular/core';
4
- import { Router, NavigationEnd, ActivatedRoute } from '@angular/router';
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "@angular/common/http";
7
- import * as i2 from "@angular/cdk/platform";
8
- import * as i3 from "@angular/router";
9
- function IWindowMobileAppModified() { }
10
- if (false) {
11
- IWindowMobileAppModified.prototype.appRef;
12
- IWindowMobileAppModified.prototype.webkit;
13
- }
14
- var RANDOM_ID_PER_USER = 0;
15
- function IRecursiveData() { }
16
- if (false) {
17
- IRecursiveData.prototype.identifier;
18
- IRecursiveData.prototype.children;
19
- }
20
- var UtilityService = (function () {
21
- function UtilityService(http, platform, router, route) {
22
- var _this = this;
23
- this.http = http;
24
- this.platform = platform;
25
- this.router = router;
26
- this.route = route;
27
- this.currentRouteData = [];
28
- this.router.events.subscribe((function (event) {
29
- if (event instanceof NavigationEnd) {
30
- var snapshot = _this.route.snapshot;
31
- var firstChild = snapshot.root.firstChild;
32
- _this.getChildRouteData(snapshot, firstChild);
33
- }
34
- }));
35
- }
36
- UtilityService.prototype.getChildRouteData = function (snapshot, firstChild) {
37
- if (firstChild) {
38
- if (firstChild.data) {
39
- this.currentRouteData.push(firstChild.data);
40
- }
41
- if (firstChild.firstChild) {
42
- this.getChildRouteData(snapshot, firstChild.firstChild);
43
- }
44
- }
45
- };
46
- Object.defineProperty(UtilityService.prototype, "randomId", {
47
- get: function () {
48
- return RANDOM_ID_PER_USER + 1;
49
- },
50
- enumerable: true,
51
- configurable: true
52
- });
53
- UtilityService.prototype.getJson = function (url) {
54
- return this.http.get(url);
55
- };
56
- UtilityService.prototype.getLeafNodes = function (node, nodes) {
57
- var _this = this;
58
- if ((node.children || []).length === 0) {
59
- nodes.push(node);
60
- }
61
- else {
62
- if (node.children) {
63
- node.children.forEach((function (child) {
64
- _this.getLeafNodes(child, nodes);
65
- }));
66
- }
67
- }
68
- return nodes;
69
- };
70
- UtilityService.prototype.getPath = function (node, id) {
71
- var path = [];
72
- this.hasPath(node, path, id);
73
- return path;
74
- };
75
- UtilityService.prototype.hasPath = function (node, pathArr, id) {
76
- var _this = this;
77
- if (node == null) {
78
- return false;
79
- }
80
- pathArr.push(node);
81
- if (node.identifier === id) {
82
- return true;
83
- }
84
- var children = node.children || [];
85
- if (children.some((function (u) { return _this.hasPath(u, pathArr, id); }))) {
86
- return true;
87
- }
88
- pathArr.pop();
89
- return false;
90
- };
91
- Object.defineProperty(UtilityService.prototype, "isMobile", {
92
- get: function () {
93
- if (this.isIos || this.isAndroid) {
94
- return true;
95
- }
96
- return false;
97
- },
98
- enumerable: true,
99
- configurable: true
100
- });
101
- Object.defineProperty(UtilityService.prototype, "isIos", {
102
- get: function () {
103
- return this.platform.IOS;
104
- },
105
- enumerable: true,
106
- configurable: true
107
- });
108
- Object.defineProperty(UtilityService.prototype, "isAndroid", {
109
- get: function () {
110
- return this.platform.ANDROID;
111
- },
112
- enumerable: true,
113
- configurable: true
114
- });
115
- Object.defineProperty(UtilityService.prototype, "isAndroidApp", {
116
- get: function () {
117
- return Boolean(window.appRef);
118
- },
119
- enumerable: true,
120
- configurable: true
121
- });
122
- Object.defineProperty(UtilityService.prototype, "iOsAppRef", {
123
- get: function () {
124
- if (window.webkit &&
125
- window.webkit.messageHandlers &&
126
- window.webkit.messageHandlers.appRef) {
127
- return window.webkit.messageHandlers.appRef;
128
- }
129
- return null;
130
- },
131
- enumerable: true,
132
- configurable: true
133
- });
134
- UtilityService.prototype.setRouteData = function (data) {
135
- this.currentRouteData = data;
136
- };
137
- Object.defineProperty(UtilityService.prototype, "routeData", {
138
- get: function () {
139
- var data = {
140
- module: '',
141
- pageId: '',
142
- };
143
- this.currentRouteData.map((function (rd) {
144
- if (rd.pageId) {
145
- data.pageId = data.pageId + "/" + rd.pageId;
146
- }
147
- if (rd.module) {
148
- data.module = rd.module;
149
- }
150
- }));
151
- return data;
152
- },
153
- enumerable: true,
154
- configurable: true
155
- });
156
- UtilityService.decorators = [
157
- { type: Injectable, args: [{
158
- providedIn: 'root',
159
- },] }
160
- ];
161
- UtilityService.ctorParameters = function () { return [
162
- { type: HttpClient },
163
- { type: Platform },
164
- { type: Router },
165
- { type: ActivatedRoute }
166
- ]; };
167
- /** @nocollapse */ UtilityService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function UtilityService_Factory() { return new UtilityService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.Platform), i0.ɵɵinject(i3.Router), i0.ɵɵinject(i3.ActivatedRoute)); }, token: UtilityService, providedIn: "root" });
168
- return UtilityService;
169
- }());
170
- export { UtilityService };
171
- if (false) {
172
- UtilityService.prototype.currentRouteData;
173
- UtilityService.prototype.http;
174
- UtilityService.prototype.platform;
175
- UtilityService.prototype.router;
176
- UtilityService.prototype.route;
177
- }
1
+ import { Platform } from '@angular/cdk/platform';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import { Injectable } from '@angular/core';
4
+ import { Router, NavigationEnd, ActivatedRoute } from '@angular/router';
5
+ import * as i0 from "@angular/core";
6
+ import * as i1 from "@angular/common/http";
7
+ import * as i2 from "@angular/cdk/platform";
8
+ import * as i3 from "@angular/router";
9
+ function IWindowMobileAppModified() { }
10
+ if (false) {
11
+ IWindowMobileAppModified.prototype.appRef;
12
+ IWindowMobileAppModified.prototype.webkit;
13
+ }
14
+ var RANDOM_ID_PER_USER = 0;
15
+ function IRecursiveData() { }
16
+ if (false) {
17
+ IRecursiveData.prototype.identifier;
18
+ IRecursiveData.prototype.children;
19
+ }
20
+ var UtilityService = (function () {
21
+ function UtilityService(http, platform, router, route) {
22
+ var _this = this;
23
+ this.http = http;
24
+ this.platform = platform;
25
+ this.router = router;
26
+ this.route = route;
27
+ this.currentRouteData = [];
28
+ this.router.events.subscribe((function (event) {
29
+ if (event instanceof NavigationEnd) {
30
+ var snapshot = _this.route.snapshot;
31
+ var firstChild = snapshot.root.firstChild;
32
+ _this.getChildRouteData(snapshot, firstChild);
33
+ }
34
+ }));
35
+ }
36
+ UtilityService.prototype.getChildRouteData = function (snapshot, firstChild) {
37
+ if (firstChild) {
38
+ if (firstChild.data) {
39
+ this.currentRouteData.push(firstChild.data);
40
+ }
41
+ if (firstChild.firstChild) {
42
+ this.getChildRouteData(snapshot, firstChild.firstChild);
43
+ }
44
+ }
45
+ };
46
+ Object.defineProperty(UtilityService.prototype, "randomId", {
47
+ get: function () {
48
+ return RANDOM_ID_PER_USER + 1;
49
+ },
50
+ enumerable: true,
51
+ configurable: true
52
+ });
53
+ UtilityService.prototype.getJson = function (url) {
54
+ return this.http.get(url);
55
+ };
56
+ UtilityService.prototype.getLeafNodes = function (node, nodes) {
57
+ var _this = this;
58
+ if ((node.children || []).length === 0) {
59
+ nodes.push(node);
60
+ }
61
+ else {
62
+ if (node.children) {
63
+ node.children.forEach((function (child) {
64
+ _this.getLeafNodes(child, nodes);
65
+ }));
66
+ }
67
+ }
68
+ return nodes;
69
+ };
70
+ UtilityService.prototype.getPath = function (node, id) {
71
+ var path = [];
72
+ this.hasPath(node, path, id);
73
+ return path;
74
+ };
75
+ UtilityService.prototype.hasPath = function (node, pathArr, id) {
76
+ var _this = this;
77
+ if (node == null) {
78
+ return false;
79
+ }
80
+ pathArr.push(node);
81
+ if (node.identifier === id) {
82
+ return true;
83
+ }
84
+ var children = node.children || [];
85
+ if (children.some((function (u) { return _this.hasPath(u, pathArr, id); }))) {
86
+ return true;
87
+ }
88
+ pathArr.pop();
89
+ return false;
90
+ };
91
+ Object.defineProperty(UtilityService.prototype, "isMobile", {
92
+ get: function () {
93
+ if (this.isIos || this.isAndroid) {
94
+ return true;
95
+ }
96
+ return false;
97
+ },
98
+ enumerable: true,
99
+ configurable: true
100
+ });
101
+ Object.defineProperty(UtilityService.prototype, "isIos", {
102
+ get: function () {
103
+ return this.platform.IOS;
104
+ },
105
+ enumerable: true,
106
+ configurable: true
107
+ });
108
+ Object.defineProperty(UtilityService.prototype, "isAndroid", {
109
+ get: function () {
110
+ return this.platform.ANDROID;
111
+ },
112
+ enumerable: true,
113
+ configurable: true
114
+ });
115
+ Object.defineProperty(UtilityService.prototype, "isAndroidApp", {
116
+ get: function () {
117
+ return Boolean(window.appRef);
118
+ },
119
+ enumerable: true,
120
+ configurable: true
121
+ });
122
+ Object.defineProperty(UtilityService.prototype, "iOsAppRef", {
123
+ get: function () {
124
+ if (window.webkit &&
125
+ window.webkit.messageHandlers &&
126
+ window.webkit.messageHandlers.appRef) {
127
+ return window.webkit.messageHandlers.appRef;
128
+ }
129
+ return null;
130
+ },
131
+ enumerable: true,
132
+ configurable: true
133
+ });
134
+ UtilityService.prototype.setRouteData = function (data) {
135
+ this.currentRouteData = data;
136
+ };
137
+ Object.defineProperty(UtilityService.prototype, "routeData", {
138
+ get: function () {
139
+ var data = {
140
+ module: '',
141
+ pageId: '',
142
+ };
143
+ this.currentRouteData.map((function (rd) {
144
+ if (rd.pageId) {
145
+ data.pageId = data.pageId + "/" + rd.pageId;
146
+ }
147
+ if (rd.module) {
148
+ data.module = rd.module;
149
+ }
150
+ }));
151
+ return data;
152
+ },
153
+ enumerable: true,
154
+ configurable: true
155
+ });
156
+ UtilityService.decorators = [
157
+ { type: Injectable, args: [{
158
+ providedIn: 'root',
159
+ },] }
160
+ ];
161
+ UtilityService.ctorParameters = function () { return [
162
+ { type: HttpClient },
163
+ { type: Platform },
164
+ { type: Router },
165
+ { type: ActivatedRoute }
166
+ ]; };
167
+ /** @nocollapse */ UtilityService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function UtilityService_Factory() { return new UtilityService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.Platform), i0.ɵɵinject(i3.Router), i0.ɵɵinject(i3.ActivatedRoute)); }, token: UtilityService, providedIn: "root" });
168
+ return UtilityService;
169
+ }());
170
+ export { UtilityService };
171
+ if (false) {
172
+ UtilityService.prototype.currentRouteData;
173
+ UtilityService.prototype.http;
174
+ UtilityService.prototype.platform;
175
+ UtilityService.prototype.router;
176
+ UtilityService.prototype.route;
177
+ }
178
178
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbGl0eS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHN1bmJpcmQtY2IvdXRpbHMvIiwic291cmNlcyI6WyJsaWIvc2VydmljZXMvdXRpbGl0eS5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSx1QkFBdUIsQ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Q29udGV4dCB7XHJcbiAgICBjb25zdCBkYXRhOiBXc0V2ZW50cy5JVGVsZW1ldHJ5UGFnZUNvbnRleHQgPSB7XHJcbiAgICAgIG1vZHVsZTogJycsXHJcbiAgICAgIHBhZ2VJZDogJycsXHJcbiAgICB9XHJcbiAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6IG5vLWNvbnNvbGVcclxuICAgIC8vIGNvbnNvbGUubG9nKCdGaW5hbCBjdXJyZW50RGF0YVJvdXRlIGdldCByb3V0ZURhdGEoKScsIHRoaXMuY3VycmVudFJvdXRlRGF0YSlcclxuICAgIHRoaXMuY3VycmVudFJvdXRlRGF0YS5tYXAoKHJkOiBhbnkpID0+IHtcclxuICAgICAgaWYgKHJkLnBhZ2VJZCkge1xyXG4gICAgICAgIGRhdGEucGFnZUlkID0gYCR7ZGF0YS5wYWdlSWR9LyR7cmQucGFnZUlkfWBcclxuICAgICAgfVxyXG4gICAgICBpZiAocmQubW9kdWxlKSB7XHJcbiAgICAgICAgZGF0YS5tb2R1bGUgPSByZC5tb2R1bGVcclxuICAgICAgfVxyXG4gICAgfSlcclxuICAgIHJldHVybiBkYXRhXHJcbiAgfVxyXG59XHJcbiJdfQ==
@@ -1,33 +1,33 @@
1
- import { Injectable } from '@angular/core';
2
- import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
3
- import { map } from 'rxjs/operators';
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "@angular/cdk/layout";
6
- var ValueService = (function () {
7
- function ValueService(breakpointObserver) {
8
- this.breakpointObserver = breakpointObserver;
9
- this.isXSmall$ = this.breakpointObserver
10
- .observe([Breakpoints.XSmall])
11
- .pipe(map((function (res) { return res.matches; })));
12
- this.isLtMedium$ = this.breakpointObserver
13
- .observe([Breakpoints.XSmall, Breakpoints.Small])
14
- .pipe(map((function (res) { return res.matches; })));
15
- }
16
- ValueService.decorators = [
17
- { type: Injectable, args: [{
18
- providedIn: 'root',
19
- },] }
20
- ];
21
- ValueService.ctorParameters = function () { return [
22
- { type: BreakpointObserver }
23
- ]; };
24
- /** @nocollapse */ ValueService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function ValueService_Factory() { return new ValueService(i0.ɵɵinject(i1.BreakpointObserver)); }, token: ValueService, providedIn: "root" });
25
- return ValueService;
26
- }());
27
- export { ValueService };
28
- if (false) {
29
- ValueService.prototype.isXSmall$;
30
- ValueService.prototype.isLtMedium$;
31
- ValueService.prototype.breakpointObserver;
32
- }
1
+ import { Injectable } from '@angular/core';
2
+ import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
3
+ import { map } from 'rxjs/operators';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/cdk/layout";
6
+ var ValueService = (function () {
7
+ function ValueService(breakpointObserver) {
8
+ this.breakpointObserver = breakpointObserver;
9
+ this.isXSmall$ = this.breakpointObserver
10
+ .observe([Breakpoints.XSmall])
11
+ .pipe(map((function (res) { return res.matches; })));
12
+ this.isLtMedium$ = this.breakpointObserver
13
+ .observe([Breakpoints.XSmall, Breakpoints.Small])
14
+ .pipe(map((function (res) { return res.matches; })));
15
+ }
16
+ ValueService.decorators = [
17
+ { type: Injectable, args: [{
18
+ providedIn: 'root',
19
+ },] }
20
+ ];
21
+ ValueService.ctorParameters = function () { return [
22
+ { type: BreakpointObserver }
23
+ ]; };
24
+ /** @nocollapse */ ValueService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function ValueService_Factory() { return new ValueService(i0.ɵɵinject(i1.BreakpointObserver)); }, token: ValueService, providedIn: "root" });
25
+ return ValueService;
26
+ }());
27
+ export { ValueService };
28
+ if (false) {
29
+ ValueService.prototype.isXSmall$;
30
+ ValueService.prototype.isLtMedium$;
31
+ ValueService.prototype.breakpointObserver;
32
+ }
33
33
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsdWUuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BzdW5i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