@skyux/core 5.7.2 → 6.0.0-beta.2

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 (249) hide show
  1. package/documentation.json +4 -4
  2. package/esm2020/index.mjs +60 -0
  3. package/esm2020/lib/modules/adapter-service/adapter.module.mjs +16 -0
  4. package/esm2020/lib/modules/adapter-service/adapter.service.mjs +218 -0
  5. package/esm2020/lib/modules/adapter-service/focusable-children-options.mjs +2 -0
  6. package/esm2020/lib/modules/affix/affix-auto-fit-context.mjs +12 -0
  7. package/esm2020/lib/modules/affix/affix-config.mjs +2 -0
  8. package/esm2020/lib/modules/affix/affix-horizontal-alignment.mjs +2 -0
  9. package/esm2020/lib/modules/affix/affix-offset-change.mjs +2 -0
  10. package/esm2020/lib/modules/affix/affix-offset.mjs +2 -0
  11. package/esm2020/lib/modules/affix/affix-placement-change.mjs +2 -0
  12. package/esm2020/lib/modules/affix/affix-placement.mjs +2 -0
  13. package/esm2020/lib/modules/affix/affix-utils.mjs +18 -0
  14. package/esm2020/lib/modules/affix/affix-vertical-alignment.mjs +2 -0
  15. package/esm2020/lib/modules/affix/affix.directive.mjs +100 -0
  16. package/esm2020/lib/modules/affix/affix.module.mjs +18 -0
  17. package/esm2020/lib/modules/affix/affix.service.mjs +24 -0
  18. package/esm2020/lib/modules/affix/affixer.mjs +349 -0
  19. package/esm2020/lib/modules/affix/dom-utils.mjs +77 -0
  20. package/esm2020/lib/modules/dock/dock-dom-adapter.service.mjs +80 -0
  21. package/esm2020/lib/modules/dock/dock-insert-component-config.mjs +2 -0
  22. package/esm2020/lib/modules/dock/dock-item-config.mjs +2 -0
  23. package/esm2020/lib/modules/dock/dock-item-reference.mjs +2 -0
  24. package/esm2020/lib/modules/dock/dock-item.mjs +29 -0
  25. package/esm2020/lib/modules/dock/dock-location.mjs +19 -0
  26. package/esm2020/lib/modules/dock/dock-options.mjs +2 -0
  27. package/esm2020/lib/modules/dock/dock.component.mjs +88 -0
  28. package/esm2020/lib/modules/dock/dock.module.mjs +19 -0
  29. package/esm2020/lib/modules/dock/dock.service.mjs +95 -0
  30. package/esm2020/lib/modules/dock/sort-by-stack-order.mjs +13 -0
  31. package/esm2020/lib/modules/dynamic-component/dynamic-component-location.mjs +27 -0
  32. package/esm2020/lib/modules/dynamic-component/dynamic-component-options.mjs +2 -0
  33. package/esm2020/lib/modules/dynamic-component/dynamic-component.module.mjs +17 -0
  34. package/esm2020/lib/modules/dynamic-component/dynamic-component.service.mjs +83 -0
  35. package/esm2020/lib/modules/format/app-format.mjs +18 -0
  36. package/esm2020/lib/modules/id/id.directive.mjs +34 -0
  37. package/esm2020/lib/modules/id/id.module.mjs +16 -0
  38. package/esm2020/lib/modules/log/log.module.mjs +16 -0
  39. package/esm2020/lib/modules/log/log.service.mjs +23 -0
  40. package/esm2020/lib/modules/media-query/media-breakpoints.mjs +20 -0
  41. package/esm2020/lib/modules/media-query/media-query-listener.mjs +2 -0
  42. package/esm2020/lib/modules/media-query/media-query.module.mjs +16 -0
  43. package/esm2020/lib/modules/media-query/media-query.service.mjs +121 -0
  44. package/esm2020/lib/modules/mutation/mutation-observer-service.mjs +16 -0
  45. package/esm2020/lib/modules/numeric/numeric-symbol.mjs +2 -0
  46. package/esm2020/lib/modules/numeric/numeric.module.mjs +20 -0
  47. package/esm2020/lib/modules/numeric/numeric.options.mjs +41 -0
  48. package/esm2020/lib/modules/numeric/numeric.pipe.mjs +82 -0
  49. package/esm2020/lib/modules/numeric/numeric.service.mjs +188 -0
  50. package/esm2020/lib/modules/overlay/overlay-adapter.service.mjs +41 -0
  51. package/esm2020/lib/modules/overlay/overlay-config.mjs +2 -0
  52. package/esm2020/lib/modules/overlay/overlay-context.mjs +10 -0
  53. package/esm2020/lib/modules/overlay/overlay-instance.mjs +55 -0
  54. package/esm2020/lib/modules/overlay/overlay.component.mjs +149 -0
  55. package/esm2020/lib/modules/overlay/overlay.module.mjs +17 -0
  56. package/esm2020/lib/modules/overlay/overlay.service.mjs +120 -0
  57. package/esm2020/lib/modules/percent-pipe/percent-pipe.module.mjs +20 -0
  58. package/esm2020/lib/modules/percent-pipe/percent.pipe.mjs +48 -0
  59. package/esm2020/lib/modules/scrollable-host/scrollable-host.service.mjs +184 -0
  60. package/esm2020/lib/modules/shared/number-format/number-format-utility.mjs +72 -0
  61. package/esm2020/lib/modules/shared/sky-core-resources.module.mjs +50 -0
  62. package/esm2020/lib/modules/title/set-title-args.mjs +2 -0
  63. package/esm2020/lib/modules/title/title.service.mjs +31 -0
  64. package/esm2020/lib/modules/ui-config/ui-config.service.mjs +21 -0
  65. package/esm2020/lib/modules/viewkeeper/viewkeeper-boundary-info.mjs +2 -0
  66. package/esm2020/lib/modules/viewkeeper/viewkeeper-fixed-styles.mjs +2 -0
  67. package/esm2020/lib/modules/viewkeeper/viewkeeper-host-options.mjs +10 -0
  68. package/esm2020/lib/modules/viewkeeper/viewkeeper-offset.mjs +2 -0
  69. package/esm2020/lib/modules/viewkeeper/viewkeeper-options.mjs +2 -0
  70. package/esm2020/lib/modules/viewkeeper/viewkeeper.directive.mjs +116 -0
  71. package/esm2020/lib/modules/viewkeeper/viewkeeper.mjs +251 -0
  72. package/esm2020/lib/modules/viewkeeper/viewkeeper.module.mjs +16 -0
  73. package/esm2020/lib/modules/viewkeeper/viewkeeper.service.mjs +39 -0
  74. package/esm2020/lib/modules/window/window-ref.mjs +30 -0
  75. package/esm2020/skyux-core.mjs +5 -0
  76. package/esm2020/testing/mock-media-query.service.mjs +41 -0
  77. package/esm2020/testing/mock-ui-config.service.mjs +59 -0
  78. package/esm2020/testing/public-api.mjs +3 -0
  79. package/esm2020/testing/skyux-core-testing.mjs +5 -0
  80. package/fesm2015/{skyux-core-testing.js → skyux-core-testing.mjs} +7 -7
  81. package/fesm2015/skyux-core-testing.mjs.map +1 -0
  82. package/fesm2015/skyux-core.mjs +3043 -0
  83. package/fesm2015/skyux-core.mjs.map +1 -0
  84. package/fesm2020/skyux-core-testing.mjs +103 -0
  85. package/fesm2020/skyux-core-testing.mjs.map +1 -0
  86. package/{fesm2015/skyux-core.js → fesm2020/skyux-core.mjs} +134 -150
  87. package/fesm2020/skyux-core.mjs.map +1 -0
  88. package/package.json +36 -12
  89. package/testing/package.json +5 -5
  90. package/bundles/skyux-core-testing.umd.js +0 -459
  91. package/bundles/skyux-core.umd.js +0 -3648
  92. package/esm2015/index.js +0 -60
  93. package/esm2015/index.js.map +0 -1
  94. package/esm2015/lib/modules/adapter-service/adapter.module.js +0 -16
  95. package/esm2015/lib/modules/adapter-service/adapter.module.js.map +0 -1
  96. package/esm2015/lib/modules/adapter-service/adapter.service.js +0 -218
  97. package/esm2015/lib/modules/adapter-service/adapter.service.js.map +0 -1
  98. package/esm2015/lib/modules/adapter-service/focusable-children-options.js +0 -2
  99. package/esm2015/lib/modules/adapter-service/focusable-children-options.js.map +0 -1
  100. package/esm2015/lib/modules/affix/affix-auto-fit-context.js +0 -12
  101. package/esm2015/lib/modules/affix/affix-auto-fit-context.js.map +0 -1
  102. package/esm2015/lib/modules/affix/affix-config.js +0 -2
  103. package/esm2015/lib/modules/affix/affix-config.js.map +0 -1
  104. package/esm2015/lib/modules/affix/affix-horizontal-alignment.js +0 -2
  105. package/esm2015/lib/modules/affix/affix-horizontal-alignment.js.map +0 -1
  106. package/esm2015/lib/modules/affix/affix-offset-change.js +0 -2
  107. package/esm2015/lib/modules/affix/affix-offset-change.js.map +0 -1
  108. package/esm2015/lib/modules/affix/affix-offset.js +0 -2
  109. package/esm2015/lib/modules/affix/affix-offset.js.map +0 -1
  110. package/esm2015/lib/modules/affix/affix-placement-change.js +0 -2
  111. package/esm2015/lib/modules/affix/affix-placement-change.js.map +0 -1
  112. package/esm2015/lib/modules/affix/affix-placement.js +0 -2
  113. package/esm2015/lib/modules/affix/affix-placement.js.map +0 -1
  114. package/esm2015/lib/modules/affix/affix-utils.js +0 -18
  115. package/esm2015/lib/modules/affix/affix-utils.js.map +0 -1
  116. package/esm2015/lib/modules/affix/affix-vertical-alignment.js +0 -2
  117. package/esm2015/lib/modules/affix/affix-vertical-alignment.js.map +0 -1
  118. package/esm2015/lib/modules/affix/affix.directive.js +0 -100
  119. package/esm2015/lib/modules/affix/affix.directive.js.map +0 -1
  120. package/esm2015/lib/modules/affix/affix.module.js +0 -18
  121. package/esm2015/lib/modules/affix/affix.module.js.map +0 -1
  122. package/esm2015/lib/modules/affix/affix.service.js +0 -24
  123. package/esm2015/lib/modules/affix/affix.service.js.map +0 -1
  124. package/esm2015/lib/modules/affix/affixer.js +0 -349
  125. package/esm2015/lib/modules/affix/affixer.js.map +0 -1
  126. package/esm2015/lib/modules/affix/dom-utils.js +0 -77
  127. package/esm2015/lib/modules/affix/dom-utils.js.map +0 -1
  128. package/esm2015/lib/modules/dock/dock-dom-adapter.service.js +0 -80
  129. package/esm2015/lib/modules/dock/dock-dom-adapter.service.js.map +0 -1
  130. package/esm2015/lib/modules/dock/dock-insert-component-config.js +0 -2
  131. package/esm2015/lib/modules/dock/dock-insert-component-config.js.map +0 -1
  132. package/esm2015/lib/modules/dock/dock-item-config.js +0 -2
  133. package/esm2015/lib/modules/dock/dock-item-config.js.map +0 -1
  134. package/esm2015/lib/modules/dock/dock-item-reference.js +0 -2
  135. package/esm2015/lib/modules/dock/dock-item-reference.js.map +0 -1
  136. package/esm2015/lib/modules/dock/dock-item.js +0 -29
  137. package/esm2015/lib/modules/dock/dock-item.js.map +0 -1
  138. package/esm2015/lib/modules/dock/dock-location.js +0 -19
  139. package/esm2015/lib/modules/dock/dock-location.js.map +0 -1
  140. package/esm2015/lib/modules/dock/dock-options.js +0 -2
  141. package/esm2015/lib/modules/dock/dock-options.js.map +0 -1
  142. package/esm2015/lib/modules/dock/dock.component.js +0 -95
  143. package/esm2015/lib/modules/dock/dock.component.js.map +0 -1
  144. package/esm2015/lib/modules/dock/dock.module.js +0 -20
  145. package/esm2015/lib/modules/dock/dock.module.js.map +0 -1
  146. package/esm2015/lib/modules/dock/dock.service.js +0 -95
  147. package/esm2015/lib/modules/dock/dock.service.js.map +0 -1
  148. package/esm2015/lib/modules/dock/sort-by-stack-order.js +0 -13
  149. package/esm2015/lib/modules/dock/sort-by-stack-order.js.map +0 -1
  150. package/esm2015/lib/modules/dynamic-component/dynamic-component-location.js +0 -27
  151. package/esm2015/lib/modules/dynamic-component/dynamic-component-location.js.map +0 -1
  152. package/esm2015/lib/modules/dynamic-component/dynamic-component-options.js +0 -2
  153. package/esm2015/lib/modules/dynamic-component/dynamic-component-options.js.map +0 -1
  154. package/esm2015/lib/modules/dynamic-component/dynamic-component.module.js +0 -17
  155. package/esm2015/lib/modules/dynamic-component/dynamic-component.module.js.map +0 -1
  156. package/esm2015/lib/modules/dynamic-component/dynamic-component.service.js +0 -83
  157. package/esm2015/lib/modules/dynamic-component/dynamic-component.service.js.map +0 -1
  158. package/esm2015/lib/modules/format/app-format.js +0 -18
  159. package/esm2015/lib/modules/format/app-format.js.map +0 -1
  160. package/esm2015/lib/modules/id/id.directive.js +0 -34
  161. package/esm2015/lib/modules/id/id.directive.js.map +0 -1
  162. package/esm2015/lib/modules/id/id.module.js +0 -16
  163. package/esm2015/lib/modules/id/id.module.js.map +0 -1
  164. package/esm2015/lib/modules/log/log.module.js +0 -16
  165. package/esm2015/lib/modules/log/log.module.js.map +0 -1
  166. package/esm2015/lib/modules/log/log.service.js +0 -23
  167. package/esm2015/lib/modules/log/log.service.js.map +0 -1
  168. package/esm2015/lib/modules/media-query/media-breakpoints.js +0 -20
  169. package/esm2015/lib/modules/media-query/media-breakpoints.js.map +0 -1
  170. package/esm2015/lib/modules/media-query/media-query-listener.js +0 -2
  171. package/esm2015/lib/modules/media-query/media-query-listener.js.map +0 -1
  172. package/esm2015/lib/modules/media-query/media-query.module.js +0 -16
  173. package/esm2015/lib/modules/media-query/media-query.module.js.map +0 -1
  174. package/esm2015/lib/modules/media-query/media-query.service.js +0 -121
  175. package/esm2015/lib/modules/media-query/media-query.service.js.map +0 -1
  176. package/esm2015/lib/modules/mutation/mutation-observer-service.js +0 -16
  177. package/esm2015/lib/modules/mutation/mutation-observer-service.js.map +0 -1
  178. package/esm2015/lib/modules/numeric/numeric-symbol.js +0 -2
  179. package/esm2015/lib/modules/numeric/numeric-symbol.js.map +0 -1
  180. package/esm2015/lib/modules/numeric/numeric.module.js +0 -20
  181. package/esm2015/lib/modules/numeric/numeric.module.js.map +0 -1
  182. package/esm2015/lib/modules/numeric/numeric.options.js +0 -41
  183. package/esm2015/lib/modules/numeric/numeric.options.js.map +0 -1
  184. package/esm2015/lib/modules/numeric/numeric.pipe.js +0 -83
  185. package/esm2015/lib/modules/numeric/numeric.pipe.js.map +0 -1
  186. package/esm2015/lib/modules/numeric/numeric.service.js +0 -189
  187. package/esm2015/lib/modules/numeric/numeric.service.js.map +0 -1
  188. package/esm2015/lib/modules/overlay/overlay-adapter.service.js +0 -41
  189. package/esm2015/lib/modules/overlay/overlay-adapter.service.js.map +0 -1
  190. package/esm2015/lib/modules/overlay/overlay-config.js +0 -2
  191. package/esm2015/lib/modules/overlay/overlay-config.js.map +0 -1
  192. package/esm2015/lib/modules/overlay/overlay-context.js +0 -10
  193. package/esm2015/lib/modules/overlay/overlay-context.js.map +0 -1
  194. package/esm2015/lib/modules/overlay/overlay-instance.js +0 -55
  195. package/esm2015/lib/modules/overlay/overlay-instance.js.map +0 -1
  196. package/esm2015/lib/modules/overlay/overlay.component.js +0 -154
  197. package/esm2015/lib/modules/overlay/overlay.component.js.map +0 -1
  198. package/esm2015/lib/modules/overlay/overlay.module.js +0 -18
  199. package/esm2015/lib/modules/overlay/overlay.module.js.map +0 -1
  200. package/esm2015/lib/modules/overlay/overlay.service.js +0 -120
  201. package/esm2015/lib/modules/overlay/overlay.service.js.map +0 -1
  202. package/esm2015/lib/modules/percent-pipe/percent-pipe.module.js +0 -20
  203. package/esm2015/lib/modules/percent-pipe/percent-pipe.module.js.map +0 -1
  204. package/esm2015/lib/modules/percent-pipe/percent.pipe.js +0 -48
  205. package/esm2015/lib/modules/percent-pipe/percent.pipe.js.map +0 -1
  206. package/esm2015/lib/modules/scrollable-host/scrollable-host.service.js +0 -184
  207. package/esm2015/lib/modules/scrollable-host/scrollable-host.service.js.map +0 -1
  208. package/esm2015/lib/modules/shared/number-format/number-format-utility.js +0 -72
  209. package/esm2015/lib/modules/shared/number-format/number-format-utility.js.map +0 -1
  210. package/esm2015/lib/modules/shared/sky-core-resources.module.js +0 -50
  211. package/esm2015/lib/modules/shared/sky-core-resources.module.js.map +0 -1
  212. package/esm2015/lib/modules/title/set-title-args.js +0 -2
  213. package/esm2015/lib/modules/title/set-title-args.js.map +0 -1
  214. package/esm2015/lib/modules/title/title.service.js +0 -31
  215. package/esm2015/lib/modules/title/title.service.js.map +0 -1
  216. package/esm2015/lib/modules/ui-config/ui-config.service.js +0 -21
  217. package/esm2015/lib/modules/ui-config/ui-config.service.js.map +0 -1
  218. package/esm2015/lib/modules/viewkeeper/viewkeeper-boundary-info.js +0 -2
  219. package/esm2015/lib/modules/viewkeeper/viewkeeper-boundary-info.js.map +0 -1
  220. package/esm2015/lib/modules/viewkeeper/viewkeeper-fixed-styles.js +0 -2
  221. package/esm2015/lib/modules/viewkeeper/viewkeeper-fixed-styles.js.map +0 -1
  222. package/esm2015/lib/modules/viewkeeper/viewkeeper-host-options.js +0 -10
  223. package/esm2015/lib/modules/viewkeeper/viewkeeper-host-options.js.map +0 -1
  224. package/esm2015/lib/modules/viewkeeper/viewkeeper-offset.js +0 -2
  225. package/esm2015/lib/modules/viewkeeper/viewkeeper-offset.js.map +0 -1
  226. package/esm2015/lib/modules/viewkeeper/viewkeeper-options.js +0 -2
  227. package/esm2015/lib/modules/viewkeeper/viewkeeper-options.js.map +0 -1
  228. package/esm2015/lib/modules/viewkeeper/viewkeeper.directive.js +0 -116
  229. package/esm2015/lib/modules/viewkeeper/viewkeeper.directive.js.map +0 -1
  230. package/esm2015/lib/modules/viewkeeper/viewkeeper.js +0 -251
  231. package/esm2015/lib/modules/viewkeeper/viewkeeper.js.map +0 -1
  232. package/esm2015/lib/modules/viewkeeper/viewkeeper.module.js +0 -16
  233. package/esm2015/lib/modules/viewkeeper/viewkeeper.module.js.map +0 -1
  234. package/esm2015/lib/modules/viewkeeper/viewkeeper.service.js +0 -39
  235. package/esm2015/lib/modules/viewkeeper/viewkeeper.service.js.map +0 -1
  236. package/esm2015/lib/modules/window/window-ref.js +0 -30
  237. package/esm2015/lib/modules/window/window-ref.js.map +0 -1
  238. package/esm2015/skyux-core.js +0 -5
  239. package/esm2015/skyux-core.js.map +0 -1
  240. package/esm2015/testing/mock-media-query.service.js +0 -41
  241. package/esm2015/testing/mock-media-query.service.js.map +0 -1
  242. package/esm2015/testing/mock-ui-config.service.js +0 -59
  243. package/esm2015/testing/mock-ui-config.service.js.map +0 -1
  244. package/esm2015/testing/public-api.js +0 -3
  245. package/esm2015/testing/public-api.js.map +0 -1
  246. package/esm2015/testing/skyux-core-testing.js +0 -5
  247. package/esm2015/testing/skyux-core-testing.js.map +0 -1
  248. package/fesm2015/skyux-core-testing.js.map +0 -1
  249. package/fesm2015/skyux-core.js.map +0 -1
@@ -1,29 +0,0 @@
1
- import { Subject } from 'rxjs';
2
- /**
3
- * Represents a single item added to the dock.
4
- */
5
- export class SkyDockItem {
6
- /**
7
- * @param componentInstance The item's component instance.
8
- * @param stackOrder The assigned stack order of the docked item.
9
- */
10
- constructor(componentInstance, stackOrder) {
11
- this.componentInstance = componentInstance;
12
- this.stackOrder = stackOrder;
13
- this._destroyed = new Subject();
14
- }
15
- /**
16
- * An event that emits when the item is removed from the dock.
17
- */
18
- get destroyed() {
19
- return this._destroyed.asObservable();
20
- }
21
- /**
22
- * Removes the item from the dock.
23
- */
24
- destroy() {
25
- this._destroyed.next();
26
- this._destroyed.complete();
27
- }
28
- }
29
- //# sourceMappingURL=dock-item.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dock-item.js","sourceRoot":"","sources":["../../../../../../../../libs/components/core/src/lib/modules/dock/dock-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,MAAM,MAAM,CAAC;AAE3C;;GAEG;AACH,MAAM,OAAO,WAAW;IAUtB;;;OAGG;IACH,YACkB,iBAAoB,EACpB,UAAkB;QADlB,sBAAiB,GAAjB,iBAAiB,CAAG;QACpB,eAAU,GAAV,UAAU,CAAQ;QAR5B,eAAU,GAAG,IAAI,OAAO,EAAQ,CAAC;IAStC,CAAC;IAhBJ;;OAEG;IACH,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;IACxC,CAAC;IAaD;;OAEG;IACI,OAAO;QACZ,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QACvB,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF","sourcesContent":["import { Observable, Subject } from 'rxjs';\n\n/**\n * Represents a single item added to the dock.\n */\nexport class SkyDockItem<T> {\n /**\n * An event that emits when the item is removed from the dock.\n */\n public get destroyed(): Observable<void> {\n return this._destroyed.asObservable();\n }\n\n private _destroyed = new Subject<void>();\n\n /**\n * @param componentInstance The item's component instance.\n * @param stackOrder The assigned stack order of the docked item.\n */\n constructor(\n public readonly componentInstance: T,\n public readonly stackOrder: number\n ) {}\n\n /**\n * Removes the item from the dock.\n */\n public destroy(): void {\n this._destroyed.next();\n this._destroyed.complete();\n }\n}\n"]}
@@ -1,19 +0,0 @@
1
- /**
2
- * The location on the page where the dock component should be rendered.
3
- */
4
- export var SkyDockLocation;
5
- (function (SkyDockLocation) {
6
- /**
7
- * Renders the dock component before a given element.
8
- */
9
- SkyDockLocation[SkyDockLocation["BeforeElement"] = 0] = "BeforeElement";
10
- /**
11
- * Renders the dock component as the last element inside the BODY element.
12
- */
13
- SkyDockLocation[SkyDockLocation["BodyBottom"] = 1] = "BodyBottom";
14
- /**
15
- * Renders the dock component as the last element inside a given element.
16
- */
17
- SkyDockLocation[SkyDockLocation["ElementBottom"] = 2] = "ElementBottom";
18
- })(SkyDockLocation || (SkyDockLocation = {}));
19
- //# sourceMappingURL=dock-location.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dock-location.js","sourceRoot":"","sources":["../../../../../../../../libs/components/core/src/lib/modules/dock/dock-location.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,eAeX;AAfD,WAAY,eAAe;IACzB;;OAEG;IACH,uEAAa,CAAA;IAEb;;OAEG;IACH,iEAAU,CAAA;IAEV;;OAEG;IACH,uEAAa,CAAA;AACf,CAAC,EAfW,eAAe,KAAf,eAAe,QAe1B","sourcesContent":["/**\n * The location on the page where the dock component should be rendered.\n */\nexport enum SkyDockLocation {\n /**\n * Renders the dock component before a given element.\n */\n BeforeElement,\n\n /**\n * Renders the dock component as the last element inside the BODY element.\n */\n BodyBottom,\n\n /**\n * Renders the dock component as the last element inside a given element.\n */\n ElementBottom,\n}\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=dock-options.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dock-options.js","sourceRoot":"","sources":["../../../../../../../../libs/components/core/src/lib/modules/dock/dock-options.ts"],"names":[],"mappings":"","sourcesContent":["import { SkyDockLocation } from './dock-location';\n\n/**\n * Options for adding a dock component to the page.\n */\nexport interface SkyDockOptions {\n /**\n * The location on the page where the dock component should be rendered.\n */\n location?: SkyDockLocation;\n\n /**\n * The reference element used when using the `BeforeElement` or `ElementBottom` locations.\n */\n referenceEl?: HTMLElement;\n\n /**\n * The z-index for the dock element\n */\n zIndex?: number;\n}\n"]}
@@ -1,95 +0,0 @@
1
- import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ComponentFactoryResolver, ElementRef, Injector, ViewChild, ViewContainerRef, } from '@angular/core';
2
- import { SkyDockDomAdapterService } from './dock-dom-adapter.service';
3
- import { SkyDockLocation } from './dock-location';
4
- import { sortByStackOrder } from './sort-by-stack-order';
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "./dock-dom-adapter.service";
7
- /**
8
- * @internal
9
- */
10
- export class SkyDockComponent {
11
- constructor(changeDetector, resolver, elementRef, injector, domAdapter) {
12
- this.changeDetector = changeDetector;
13
- this.resolver = resolver;
14
- this.elementRef = elementRef;
15
- this.injector = injector;
16
- this.domAdapter = domAdapter;
17
- this.itemRefs = [];
18
- }
19
- insertComponent(component, config = {}) {
20
- const factory = this.resolver.resolveComponentFactory(component);
21
- const injector = Injector.create({
22
- providers: config.providers || [],
23
- parent: this.injector,
24
- });
25
- const componentRef = this.target.createComponent(factory, undefined, injector);
26
- const stackOrder = config.stackOrder !== null && config.stackOrder !== undefined
27
- ? config.stackOrder
28
- : this.getHighestStackOrder();
29
- this.itemRefs.push({
30
- componentRef,
31
- stackOrder,
32
- });
33
- this.sortItemsByStackOrder();
34
- this.changeDetector.markForCheck();
35
- return {
36
- componentRef,
37
- stackOrder,
38
- };
39
- }
40
- removeItem(item) {
41
- const viewRef = item.componentRef.hostView;
42
- this.target.remove(this.target.indexOf(viewRef));
43
- const found = this.itemRefs.find((i) => i.componentRef.hostView === viewRef);
44
- this.itemRefs.splice(this.itemRefs.indexOf(found), 1);
45
- }
46
- setOptions(options) {
47
- var _a, _b;
48
- this.options = options;
49
- switch ((_a = this.options) === null || _a === void 0 ? void 0 : _a.location) {
50
- case SkyDockLocation.BeforeElement:
51
- this.domAdapter.unbindDock(this.elementRef);
52
- break;
53
- case SkyDockLocation.ElementBottom:
54
- this.domAdapter.setSticky(this.elementRef);
55
- break;
56
- case SkyDockLocation.BodyBottom:
57
- default:
58
- this.domAdapter.watchDomChanges(this.elementRef);
59
- break;
60
- }
61
- if ((_b = this.options) === null || _b === void 0 ? void 0 : _b.zIndex) {
62
- this.domAdapter.setZIndex(this.options.zIndex, this.elementRef);
63
- }
64
- }
65
- sortItemsByStackOrder() {
66
- this.itemRefs.sort(sortByStackOrder);
67
- // Reassign the correct index for each view.
68
- this.itemRefs.forEach((item, i) => this.target.move(item.componentRef.hostView, i));
69
- }
70
- getHighestStackOrder() {
71
- if (this.itemRefs.length === 0) {
72
- return 0;
73
- }
74
- return this.itemRefs[0].stackOrder + 1;
75
- }
76
- }
77
- SkyDockComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDockComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ComponentFactoryResolver }, { token: i0.ElementRef }, { token: i0.Injector }, { token: i1.SkyDockDomAdapterService }], target: i0.ɵɵFactoryTarget.Component });
78
- SkyDockComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyDockComponent, selector: "sky-dock", providers: [SkyDockDomAdapterService], viewQueries: [{ propertyName: "target", first: true, predicate: ["target"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<ng-container #target></ng-container>\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host:not(.sky-dock-unbound){position:fixed;left:0;bottom:0;right:0}:host.sky-dock-sticky{position:sticky}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
79
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDockComponent, decorators: [{
80
- type: Component,
81
- args: [{
82
- selector: 'sky-dock',
83
- templateUrl: './dock.component.html',
84
- styleUrls: ['./dock.component.scss'],
85
- providers: [SkyDockDomAdapterService],
86
- changeDetection: ChangeDetectionStrategy.OnPush,
87
- }]
88
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ComponentFactoryResolver }, { type: i0.ElementRef }, { type: i0.Injector }, { type: i1.SkyDockDomAdapterService }]; }, propDecorators: { target: [{
89
- type: ViewChild,
90
- args: ['target', {
91
- read: ViewContainerRef,
92
- static: true,
93
- }]
94
- }] } });
95
- //# sourceMappingURL=dock.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dock.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/core/src/lib/modules/dock/dock.component.ts","../../../../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,MAAM,EAAE;YACxB,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;SACjE;IACH,CAAC;IAEO,qBAAqB;QAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAErC,4CAA4C;QAC5C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAChC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC,CAChD,CAAC;IACJ,CAAC;IAEO,oBAAoB;QAC1B,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,OAAO,CAAC,CAAC;SACV;QAED,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC;IACzC,CAAC;;8GApGU,gBAAgB;kGAAhB,gBAAgB,mCAHhB,CAAC,wBAAwB,CAAC,uGAO7B,gBAAgB,2CCjC1B,yCACA;4FD4Ba,gBAAgB;kBAP5B,SAAS;mBAAC;oBACT,QAAQ,EAAE,UAAU;oBACpB,WAAW,EAAE,uBAAuB;oBACpC,SAAS,EAAE,CAAC,uBAAuB,CAAC;oBACpC,SAAS,EAAE,CAAC,wBAAwB,CAAC;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;sOAQS,MAAM;sBAJb,SAAS;uBAAC,QAAQ,EAAE;wBACnB,IAAI,EAAE,gBAAgB;wBACtB,MAAM,EAAE,IAAI;qBACb","sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ComponentFactoryResolver,\n ElementRef,\n Injector,\n Type,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { SkyDockDomAdapterService } from './dock-dom-adapter.service';\nimport { SkyDockInsertComponentConfig } from './dock-insert-component-config';\nimport { SkyDockItemReference } from './dock-item-reference';\nimport { SkyDockLocation } from './dock-location';\nimport { SkyDockOptions } from './dock-options';\nimport { sortByStackOrder } from './sort-by-stack-order';\n\n/**\n * @internal\n */\n@Component({\n selector: 'sky-dock',\n templateUrl: './dock.component.html',\n styleUrls: ['./dock.component.scss'],\n providers: [SkyDockDomAdapterService],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SkyDockComponent {\n private options: SkyDockOptions;\n\n @ViewChild('target', {\n read: ViewContainerRef,\n static: true,\n })\n private target: ViewContainerRef;\n\n private itemRefs: SkyDockItemReference<any>[] = [];\n\n constructor(\n private changeDetector: ChangeDetectorRef,\n private resolver: ComponentFactoryResolver,\n private elementRef: ElementRef,\n private injector: Injector,\n private domAdapter: SkyDockDomAdapterService\n ) {}\n\n public insertComponent<T>(\n component: Type<T>,\n config: SkyDockInsertComponentConfig = {}\n ): SkyDockItemReference<T> {\n const factory = this.resolver.resolveComponentFactory(component);\n const injector = Injector.create({\n providers: config.providers || [],\n parent: this.injector,\n });\n\n const componentRef = this.target.createComponent<T>(\n factory,\n undefined,\n injector\n );\n const stackOrder =\n config.stackOrder !== null && config.stackOrder !== undefined\n ? config.stackOrder\n : this.getHighestStackOrder();\n\n this.itemRefs.push({\n componentRef,\n stackOrder,\n });\n\n this.sortItemsByStackOrder();\n\n this.changeDetector.markForCheck();\n\n return {\n componentRef,\n stackOrder,\n };\n }\n\n public removeItem(item: SkyDockItemReference<any>): void {\n const viewRef = item.componentRef.hostView;\n this.target.remove(this.target.indexOf(viewRef));\n\n const found = this.itemRefs.find(\n (i) => i.componentRef.hostView === viewRef\n );\n this.itemRefs.splice(this.itemRefs.indexOf(found), 1);\n }\n\n public setOptions(options: SkyDockOptions): void {\n this.options = options;\n\n switch (this.options?.location) {\n case SkyDockLocation.BeforeElement:\n this.domAdapter.unbindDock(this.elementRef);\n break;\n case SkyDockLocation.ElementBottom:\n this.domAdapter.setSticky(this.elementRef);\n break;\n case SkyDockLocation.BodyBottom:\n default:\n this.domAdapter.watchDomChanges(this.elementRef);\n break;\n }\n\n if (this.options?.zIndex) {\n this.domAdapter.setZIndex(this.options.zIndex, this.elementRef);\n }\n }\n\n private sortItemsByStackOrder(): void {\n this.itemRefs.sort(sortByStackOrder);\n\n // Reassign the correct index for each view.\n this.itemRefs.forEach((item, i) =>\n this.target.move(item.componentRef.hostView, i)\n );\n }\n\n private getHighestStackOrder(): number {\n if (this.itemRefs.length === 0) {\n return 0;\n }\n\n return this.itemRefs[0].stackOrder + 1;\n }\n}\n","<ng-container #target></ng-container>\n"]}
@@ -1,20 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { NgModule } from '@angular/core';
3
- import { MutationObserverService } from '../mutation/mutation-observer-service';
4
- import { SkyDockComponent } from './dock.component';
5
- import * as i0 from "@angular/core";
6
- export class SkyDockModule {
7
- }
8
- SkyDockModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
9
- SkyDockModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDockModule, declarations: [SkyDockComponent], imports: [CommonModule] });
10
- SkyDockModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDockModule, providers: [MutationObserverService], imports: [[CommonModule]] });
11
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDockModule, decorators: [{
12
- type: NgModule,
13
- args: [{
14
- imports: [CommonModule],
15
- declarations: [SkyDockComponent],
16
- entryComponents: [SkyDockComponent],
17
- providers: [MutationObserverService],
18
- }]
19
- }] });
20
- //# sourceMappingURL=dock.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dock.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/core/src/lib/modules/dock/dock.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAEhF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;;AAQpD,MAAM,OAAO,aAAa;;2GAAb,aAAa;4GAAb,aAAa,iBAJT,gBAAgB,aADrB,YAAY;4GAKX,aAAa,aAFb,CAAC,uBAAuB,CAAC,YAH3B,CAAC,YAAY,CAAC;4FAKZ,aAAa;kBANzB,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,CAAC,gBAAgB,CAAC;oBAChC,eAAe,EAAE,CAAC,gBAAgB,CAAC;oBACnC,SAAS,EAAE,CAAC,uBAAuB,CAAC;iBACrC","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { MutationObserverService } from '../mutation/mutation-observer-service';\n\nimport { SkyDockComponent } from './dock.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [SkyDockComponent],\n entryComponents: [SkyDockComponent],\n providers: [MutationObserverService],\n})\nexport class SkyDockModule {}\n"]}
@@ -1,95 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { SkyDynamicComponentLocation } from '../dynamic-component/dynamic-component-location';
3
- import { SkyDynamicComponentService } from '../dynamic-component/dynamic-component.service';
4
- import { SkyDockItem } from './dock-item';
5
- import { SkyDockLocation } from './dock-location';
6
- import { SkyDockComponent } from './dock.component';
7
- import { sortByStackOrder } from './sort-by-stack-order';
8
- import * as i0 from "@angular/core";
9
- import * as i1 from "../dynamic-component/dynamic-component.service";
10
- /**
11
- * This service docks components to specific areas on the page.
12
- */
13
- export class SkyDockService {
14
- constructor(dynamicComponentService) {
15
- this.dynamicComponentService = dynamicComponentService;
16
- }
17
- /**
18
- * Returns all docked items.
19
- */
20
- get items() {
21
- return SkyDockService._items;
22
- }
23
- /**
24
- * Docks a component to the bottom of the page.
25
- * @param component The component to dock.
26
- * @param config Options that affect the docking action.
27
- */
28
- insertComponent(component, config) {
29
- if (!SkyDockService.dockRef) {
30
- this.createDock();
31
- }
32
- const itemRef = SkyDockService.dockRef.instance.insertComponent(component, config);
33
- const item = new SkyDockItem(itemRef.componentRef.instance, itemRef.stackOrder);
34
- item.destroyed.subscribe(() => {
35
- SkyDockService.dockRef.instance.removeItem(itemRef);
36
- SkyDockService._items.splice(SkyDockService._items.indexOf(item), 1);
37
- if (SkyDockService._items.length === 0) {
38
- this.destroyDock();
39
- }
40
- });
41
- SkyDockService._items.push(item);
42
- SkyDockService._items.sort(sortByStackOrder);
43
- return item;
44
- }
45
- /**
46
- * Sets options for the positioning and styling of the dock component. Since the dock service is a
47
- * singleton instance, these options will be applied to all components inserted into the dock. In
48
- * order to create a seperate dock with different options, consumers should provide a different
49
- * instance of the dock service.
50
- * @param options The options for positioning and styling
51
- */
52
- setDockOptions(options) {
53
- this.options = options;
54
- }
55
- createDock() {
56
- let dockOptions;
57
- if (this.options) {
58
- let dynamicLocation;
59
- switch (this.options.location) {
60
- case SkyDockLocation.BeforeElement:
61
- dynamicLocation = SkyDynamicComponentLocation.BeforeElement;
62
- break;
63
- case SkyDockLocation.ElementBottom:
64
- dynamicLocation = SkyDynamicComponentLocation.ElementBottom;
65
- break;
66
- default:
67
- dynamicLocation = SkyDynamicComponentLocation.BodyTop;
68
- break;
69
- }
70
- dockOptions = {
71
- location: dynamicLocation,
72
- referenceEl: this.options.referenceEl,
73
- };
74
- }
75
- SkyDockService.dockRef = this.dynamicComponentService.createComponent(SkyDockComponent, dockOptions);
76
- SkyDockService.dockRef.instance.setOptions(this.options);
77
- }
78
- destroyDock() {
79
- this.dynamicComponentService.removeComponent(SkyDockService.dockRef);
80
- SkyDockService.dockRef = undefined;
81
- }
82
- }
83
- SkyDockService._items = [];
84
- SkyDockService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDockService, deps: [{ token: i1.SkyDynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable });
85
- SkyDockService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDockService, providedIn: 'any' });
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDockService, decorators: [{
87
- type: Injectable,
88
- args: [{
89
- // Must be 'any' so that the dock component is created in the context of its module's injector.
90
- // If set to 'root', the component's dependency injections would only be derived from the root
91
- // injector and may loose context if the dock was opened from within a lazy-loaded module.
92
- providedIn: 'any',
93
- }]
94
- }], ctorParameters: function () { return [{ type: i1.SkyDynamicComponentService }]; } });
95
- //# sourceMappingURL=dock.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dock.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/core/src/lib/modules/dock/dock.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAAQ,MAAM,eAAe,CAAC;AAE/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC;AAE9F,OAAO,EAAE,0BAA0B,EAAE,MAAM,gDAAgD,CAAC;AAG5F,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;;;AAEzD;;GAEG;AAOH,MAAM,OAAO,cAAc;IAazB,YAAoB,uBAAmD;QAAnD,4BAAuB,GAAvB,uBAAuB,CAA4B;IAAG,CAAC;IAT3E;;OAEG;IACH,IAAW,KAAK;QACd,OAAO,cAAc,CAAC,MAAM,CAAC;IAC/B,CAAC;IAMD;;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C,aAAa;oBAChC,eAAe,GAAG,2BAA2B,CAAC,aAAa,CAAC;oBAC5D,MAAM;gBACR;oBACE,eAAe,GAAG,2BAA2B,CAAC,OAAO,CAAC;oBACtD,MAAM;aACT;YAED,WAAW,GAAG;gBACZ,QAAQ,EAAE,eAAe;gBACzB,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW;aACtC,CAAC;SACH;QAED,cAAc,CAAC,OAAO,GAAG,IAAI,CAAC,uBAAuB,CAAC,eAAe,CACnE,gBAAgB,EAChB,WAAW,CACZ,CAAC;QACF,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAEO,WAAW;QACjB,IAAI,CAAC,uBAAuB,CAAC,eAAe,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACrE,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC;IACrC,CAAC;;AA7Fc,qBAAM,GAAuB,EAAE,CAAC;4GAFpC,cAAc;gHAAd,cAAc,cAFb,KAAK;4FAEN,cAAc;kBAN1B,UAAU;mBAAC;oBACV,+FAA+F;oBAC/F,8FAA8F;oBAC9F,0FAA0F;oBAC1F,UAAU,EAAE,KAAK;iBAClB","sourcesContent":["import { ComponentRef, Injectable, Type } from '@angular/core';\n\nimport { SkyDynamicComponentLocation } from '../dynamic-component/dynamic-component-location';\nimport { SkyDynamicComponentOptions } from '../dynamic-component/dynamic-component-options';\nimport { SkyDynamicComponentService } from '../dynamic-component/dynamic-component.service';\n\nimport { SkyDockInsertComponentConfig } from './dock-insert-component-config';\nimport { SkyDockItem } from './dock-item';\nimport { SkyDockLocation } from './dock-location';\nimport { SkyDockOptions } from './dock-options';\nimport { SkyDockComponent } from './dock.component';\nimport { sortByStackOrder } from './sort-by-stack-order';\n\n/**\n * This service docks components to specific areas on the page.\n */\n@Injectable({\n // Must be 'any' so that the dock component is created in the context of its module's injector.\n // If set to 'root', the component's dependency injections would only be derived from the root\n // injector and may loose context if the dock was opened from within a lazy-loaded module.\n providedIn: 'any',\n})\nexport class SkyDockService {\n private static dockRef: ComponentRef<SkyDockComponent>;\n private static _items: SkyDockItem<any>[] = [];\n\n /**\n * Returns all docked items.\n */\n public get items(): SkyDockItem<any>[] {\n return SkyDockService._items;\n }\n\n private options: SkyDockOptions;\n\n constructor(private dynamicComponentService: SkyDynamicComponentService) {}\n\n /**\n * Docks a component to the bottom of the page.\n * @param component The component to dock.\n * @param config Options that affect the docking action.\n */\n public insertComponent<T>(\n component: Type<T>,\n config?: SkyDockInsertComponentConfig\n ): SkyDockItem<T> {\n if (!SkyDockService.dockRef) {\n this.createDock();\n }\n\n const itemRef = SkyDockService.dockRef.instance.insertComponent(\n component,\n config\n );\n const item = new SkyDockItem(\n itemRef.componentRef.instance,\n itemRef.stackOrder\n );\n\n item.destroyed.subscribe(() => {\n SkyDockService.dockRef.instance.removeItem(itemRef);\n SkyDockService._items.splice(SkyDockService._items.indexOf(item), 1);\n if (SkyDockService._items.length === 0) {\n this.destroyDock();\n }\n });\n\n SkyDockService._items.push(item);\n SkyDockService._items.sort(sortByStackOrder);\n\n return item;\n }\n\n /**\n * Sets options for the positioning and styling of the dock component. Since the dock service is a\n * singleton instance, these options will be applied to all components inserted into the dock. In\n * order to create a seperate dock with different options, consumers should provide a different\n * instance of the dock service.\n * @param options The options for positioning and styling\n */\n public setDockOptions(options: SkyDockOptions): void {\n this.options = options;\n }\n\n private createDock(): void {\n let dockOptions: SkyDynamicComponentOptions;\n\n if (this.options) {\n let dynamicLocation: SkyDynamicComponentLocation;\n switch (this.options.location) {\n case SkyDockLocation.BeforeElement:\n dynamicLocation = SkyDynamicComponentLocation.BeforeElement;\n break;\n case SkyDockLocation.ElementBottom:\n dynamicLocation = SkyDynamicComponentLocation.ElementBottom;\n break;\n default:\n dynamicLocation = SkyDynamicComponentLocation.BodyTop;\n break;\n }\n\n dockOptions = {\n location: dynamicLocation,\n referenceEl: this.options.referenceEl,\n };\n }\n\n SkyDockService.dockRef = this.dynamicComponentService.createComponent(\n SkyDockComponent,\n dockOptions\n );\n SkyDockService.dockRef.instance.setOptions(this.options);\n }\n\n private destroyDock(): void {\n this.dynamicComponentService.removeComponent(SkyDockService.dockRef);\n SkyDockService.dockRef = undefined;\n }\n}\n"]}
@@ -1,13 +0,0 @@
1
- /**
2
- * @internal
3
- */
4
- export function sortByStackOrder(a, b) {
5
- if (a.stackOrder > b.stackOrder) {
6
- return -1;
7
- }
8
- if (a.stackOrder < b.stackOrder) {
9
- return 1;
10
- }
11
- return 0;
12
- }
13
- //# sourceMappingURL=sort-by-stack-order.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sort-by-stack-order.js","sourceRoot":"","sources":["../../../../../../../../libs/components/core/src/lib/modules/dock/sort-by-stack-order.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,CAAM,EAAE,CAAM;IAC7C,IAAI,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,EAAE;QAC/B,OAAO,CAAC,CAAC,CAAC;KACX;IAED,IAAI,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,EAAE;QAC/B,OAAO,CAAC,CAAC;KACV;IAED,OAAO,CAAC,CAAC;AACX,CAAC","sourcesContent":["/**\n * @internal\n */\nexport function sortByStackOrder(a: any, b: any): number {\n if (a.stackOrder > b.stackOrder) {\n return -1;\n }\n\n if (a.stackOrder < b.stackOrder) {\n return 1;\n }\n\n return 0;\n}\n"]}
@@ -1,27 +0,0 @@
1
- /**
2
- * The location on the page where the dynamic component should be rendered.
3
- */
4
- export var SkyDynamicComponentLocation;
5
- (function (SkyDynamicComponentLocation) {
6
- /**
7
- * Renders the dynamic component before a given element.
8
- */
9
- SkyDynamicComponentLocation[SkyDynamicComponentLocation["BeforeElement"] = 0] = "BeforeElement";
10
- /**
11
- * Renders the dynamic component as the last element inside the BODY element.
12
- */
13
- SkyDynamicComponentLocation[SkyDynamicComponentLocation["BodyBottom"] = 1] = "BodyBottom";
14
- /**
15
- * Renders the dynamic component as the first element inside the BODY element.
16
- */
17
- SkyDynamicComponentLocation[SkyDynamicComponentLocation["BodyTop"] = 2] = "BodyTop";
18
- /**
19
- * Renders the dynamic component as the last element inside a given element.
20
- */
21
- SkyDynamicComponentLocation[SkyDynamicComponentLocation["ElementBottom"] = 3] = "ElementBottom";
22
- /**
23
- * Renders the dynamic component as the first element inside a given element.
24
- */
25
- SkyDynamicComponentLocation[SkyDynamicComponentLocation["ElementTop"] = 4] = "ElementTop";
26
- })(SkyDynamicComponentLocation || (SkyDynamicComponentLocation = {}));
27
- //# sourceMappingURL=dynamic-component-location.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamic-component-location.js","sourceRoot":"","sources":["../../../../../../../../libs/components/core/src/lib/modules/dynamic-component/dynamic-component-location.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,2BAyBX;AAzBD,WAAY,2BAA2B;IACrC;;OAEG;IACH,+FAAa,CAAA;IAEb;;OAEG;IACH,yFAAU,CAAA;IAEV;;OAEG;IACH,mFAAO,CAAA;IAEP;;OAEG;IACH,+FAAa,CAAA;IAEb;;OAEG;IACH,yFAAU,CAAA;AACZ,CAAC,EAzBW,2BAA2B,KAA3B,2BAA2B,QAyBtC","sourcesContent":["/**\n * The location on the page where the dynamic component should be rendered.\n */\nexport enum SkyDynamicComponentLocation {\n /**\n * Renders the dynamic component before a given element.\n */\n BeforeElement,\n\n /**\n * Renders the dynamic component as the last element inside the BODY element.\n */\n BodyBottom,\n\n /**\n * Renders the dynamic component as the first element inside the BODY element.\n */\n BodyTop,\n\n /**\n * Renders the dynamic component as the last element inside a given element.\n */\n ElementBottom,\n\n /**\n * Renders the dynamic component as the first element inside a given element.\n */\n ElementTop,\n}\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=dynamic-component-options.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamic-component-options.js","sourceRoot":"","sources":["../../../../../../../../libs/components/core/src/lib/modules/dynamic-component/dynamic-component-options.ts"],"names":[],"mappings":"","sourcesContent":["import { SkyDynamicComponentLocation } from './dynamic-component-location';\n\n/**\n * Options for adding a dynamic component to the page.\n */\nexport interface SkyDynamicComponentOptions {\n /**\n * The location on the page where the dynamic component should be rendered.\n */\n location?: SkyDynamicComponentLocation;\n\n /**\n * The reference element used when using the `ElementTop` or `ElementBottom` locations.\n */\n referenceEl?: HTMLElement;\n}\n"]}
@@ -1,17 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Provides services required to create dynamic components on the page.
5
- * @deprecated The `SkyDynamicComponentService` no longer needs the `SkyDynamicComponentModule`.
6
- * The `SkyDynamicComponentModule` can be removed from your project.
7
- */
8
- export class SkyDynamicComponentModule {
9
- }
10
- SkyDynamicComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDynamicComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
11
- SkyDynamicComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDynamicComponentModule });
12
- SkyDynamicComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDynamicComponentModule });
13
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDynamicComponentModule, decorators: [{
14
- type: NgModule,
15
- args: [{}]
16
- }] });
17
- //# sourceMappingURL=dynamic-component.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamic-component.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/core/src/lib/modules/dynamic-component/dynamic-component.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;;AAEzC;;;;GAIG;AAEH,MAAM,OAAO,yBAAyB;;uHAAzB,yBAAyB;wHAAzB,yBAAyB;wHAAzB,yBAAyB;4FAAzB,yBAAyB;kBADrC,QAAQ;mBAAC,EAAE","sourcesContent":["import { NgModule } from '@angular/core';\n\n/**\n * Provides services required to create dynamic components on the page.\n * @deprecated The `SkyDynamicComponentService` no longer needs the `SkyDynamicComponentModule`.\n * The `SkyDynamicComponentModule` can be removed from your project.\n */\n@NgModule({})\nexport class SkyDynamicComponentModule {}\n"]}
@@ -1,83 +0,0 @@
1
- import { ApplicationRef, ComponentFactoryResolver, Injectable, Injector, RendererFactory2, } from '@angular/core';
2
- import { SkyAppWindowRef } from '../window/window-ref';
3
- import { SkyDynamicComponentLocation } from './dynamic-component-location';
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "../window/window-ref";
6
- /**
7
- * Angular service for creating and rendering a dynamic component.
8
- */
9
- export class SkyDynamicComponentService {
10
- constructor(componentFactoryResolver, applicationRef, injector, windowRef, rendererFactory) {
11
- this.componentFactoryResolver = componentFactoryResolver;
12
- this.applicationRef = applicationRef;
13
- this.injector = injector;
14
- this.windowRef = windowRef;
15
- // Based on suggestions from https://github.com/angular/angular/issues/17824
16
- // for accessing an instance of Renderer2 in a service since Renderer2 can't
17
- // be injected into a service. Passing undefined for both parameters results
18
- // in the default renderer which is what we want here.
19
- this.renderer = rendererFactory.createRenderer(undefined, undefined);
20
- }
21
- /**
22
- * Creates an instance of the specified component and adds it to the specified location
23
- * on the page.
24
- * @param options Options for creating the dynamic component.
25
- */
26
- createComponent(componentType, options) {
27
- options = options || {
28
- location: SkyDynamicComponentLocation.BodyBottom,
29
- };
30
- const componentRef = this.componentFactoryResolver
31
- .resolveComponentFactory(componentType)
32
- .create(this.injector);
33
- this.applicationRef.attachView(componentRef.hostView);
34
- const el = this.getRootNode(componentRef);
35
- const bodyEl = this.windowRef.nativeWindow.document.body;
36
- switch (options.location) {
37
- case SkyDynamicComponentLocation.BeforeElement:
38
- this.renderer.insertBefore(options.referenceEl.parentElement, el, options.referenceEl);
39
- break;
40
- case SkyDynamicComponentLocation.ElementTop:
41
- this.renderer.insertBefore(options.referenceEl, el, options.referenceEl.firstChild);
42
- break;
43
- case SkyDynamicComponentLocation.ElementBottom:
44
- this.renderer.appendChild(options.referenceEl, el);
45
- break;
46
- case SkyDynamicComponentLocation.BodyTop:
47
- this.renderer.insertBefore(bodyEl, el, bodyEl.firstChild);
48
- break;
49
- default:
50
- this.renderer.appendChild(bodyEl, el);
51
- break;
52
- }
53
- return componentRef;
54
- }
55
- /**
56
- * Removes a component ref from the page
57
- * @param componentRef Component ref for the component being removed
58
- */
59
- removeComponent(componentRef) {
60
- if (!componentRef) {
61
- return;
62
- }
63
- this.applicationRef.detachView(componentRef.hostView);
64
- componentRef.destroy();
65
- }
66
- getRootNode(componentRef) {
67
- // Technique for retrieving the component's root node taken from here:
68
- // https://malcoded.com/posts/angular-dynamic-components
69
- return componentRef.hostView.rootNodes[0];
70
- }
71
- }
72
- SkyDynamicComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDynamicComponentService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }, { token: i1.SkyAppWindowRef }, { token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
73
- SkyDynamicComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDynamicComponentService, providedIn: 'any' });
74
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDynamicComponentService, decorators: [{
75
- type: Injectable,
76
- args: [{
77
- // Must be 'any' so that the component is created in the context of its module's injector.
78
- // If set to 'root', the component's dependency injections would only be derived from the root
79
- // injector and may loose context if the component is created within a lazy-loaded module.
80
- providedIn: 'any',
81
- }]
82
- }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: i1.SkyAppWindowRef }, { type: i0.RendererFactory2 }]; } });
83
- //# sourceMappingURL=dynamic-component.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamic-component.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/core/src/lib/modules/dynamic-component/dynamic-component.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,wBAAwB,EAGxB,UAAU,EACV,QAAQ,EAER,gBAAgB,GAEjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;;;AAG3E;;GAEG;AAOH,MAAM,OAAO,0BAA0B;IAGrC,YACU,wBAAkD,EAClD,cAA8B,EAC9B,QAAkB,EAClB,SAA0B,EAClC,eAAiC;QAJzB,6BAAwB,GAAxB,wBAAwB,CAA0B;QAClD,mBAAc,GAAd,cAAc,CAAgB;QAC9B,aAAQ,GAAR,QAAQ,CAAU;QAClB,cAAS,GAAT,SAAS,CAAiB;QAGlC,4EAA4E;QAC5E,4EAA4E;QAC5E,6EAA6E;QAC7E,sDAAsD;QACtD,IAAI,CAAC,QAAQ,GAAG,eAAe,CAAC,cAAc,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACvE,CAAC;IAED;;;;OAIG;IACI,eAAe,CACpB,aAAsB,EACtB,OAAoC;QAEpC,OAAO,GAAG,OAAO,IAAI;YACnB,QAAQ,EAAE,2BAA2B,CAAC,UAAU;SACjD,CAAC;QAEF,MAAM,YAAY,GAAG,IAAI,CAAC,wBAAwB;aAC/C,uBAAuB,CAAI,aAAa,CAAC;aACzC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEzB,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAEtD,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW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;wHAtFU,0BAA0B;4HAA1B,0BAA0B,cAFzB,KAAK;4FAEN,0BAA0B;kBANtC,UAAU;mBAAC;oBACV,0FAA0F;oBAC1F,8FAA8F;oBAC9F,0FAA0F;oBAC1F,UAAU,EAAE,KAAK;iBAClB","sourcesContent":["import {\n ApplicationRef,\n ComponentFactoryResolver,\n ComponentRef,\n EmbeddedViewRef,\n Injectable,\n Injector,\n Renderer2,\n RendererFactory2,\n Type,\n} from '@angular/core';\n\nimport { SkyAppWindowRef } from '../window/window-ref';\n\nimport { SkyDynamicComponentLocation } from './dynamic-component-location';\nimport { SkyDynamicComponentOptions } from './dynamic-component-options';\n\n/**\n * Angular service for creating and rendering a dynamic component.\n */\n@Injectable({\n // Must be 'any' so that the component is created in the context of its module's injector.\n // If set to 'root', the component's dependency injections would only be derived from the root\n // injector and may loose context if the component is created within a lazy-loaded module.\n providedIn: 'any',\n})\nexport class SkyDynamicComponentService {\n private renderer: Renderer2;\n\n constructor(\n private componentFactoryResolver: ComponentFactoryResolver,\n private applicationRef: ApplicationRef,\n private injector: Injector,\n private windowRef: SkyAppWindowRef,\n rendererFactory: RendererFactory2\n ) {\n // Based on suggestions from https://github.com/angular/angular/issues/17824\n // for accessing an instance of Renderer2 in a service since Renderer2 can't\n // be injected into a service. Passing undefined for both parameters results\n // in the default renderer which is what we want here.\n this.renderer = rendererFactory.createRenderer(undefined, undefined);\n }\n\n /**\n * Creates an instance of the specified component and adds it to the specified location\n * on the page.\n * @param options Options for creating the dynamic component.\n */\n public createComponent<T>(\n componentType: Type<T>,\n options?: SkyDynamicComponentOptions\n ): ComponentRef<T> {\n options = options || {\n location: SkyDynamicComponentLocation.BodyBottom,\n };\n\n const componentRef = this.componentFactoryResolver\n .resolveComponentFactory<T>(componentType)\n .create(this.injector);\n\n this.applicationRef.attachView(componentRef.hostView);\n\n const el = this.getRootNode(componentRef);\n\n const bodyEl = this.windowRef.nativeWindow.document.body;\n\n switch (options.location) {\n case SkyDynamicComponentLocation.BeforeElement:\n this.renderer.insertBefore(\n options.referenceEl.parentElement,\n el,\n options.referenceEl\n );\n break;\n case SkyDynamicComponentLocation.ElementTop:\n this.renderer.insertBefore(\n options.referenceEl,\n el,\n options.referenceEl.firstChild\n );\n break;\n case SkyDynamicComponentLocation.ElementBottom:\n this.renderer.appendChild(options.referenceEl, el);\n break;\n case SkyDynamicComponentLocation.BodyTop:\n this.renderer.insertBefore(bodyEl, el, bodyEl.firstChild);\n break;\n default:\n this.renderer.appendChild(bodyEl, el);\n break;\n }\n\n return componentRef;\n }\n\n /**\n * Removes a component ref from the page\n * @param componentRef Component ref for the component being removed\n */\n public removeComponent<T>(componentRef: ComponentRef<T>): void {\n if (!componentRef) {\n return;\n }\n\n this.applicationRef.detachView(componentRef.hostView);\n componentRef.destroy();\n }\n\n private getRootNode<T>(componentRef: ComponentRef<T>): any {\n // Technique for retrieving the component's root node taken from here:\n // https://malcoded.com/posts/angular-dynamic-components\n return (componentRef.hostView as EmbeddedViewRef<T>).rootNodes[0];\n }\n}\n"]}
@@ -1,18 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export class SkyAppFormat {
4
- formatText(format, ...args) {
5
- return String(format).replace(/\{(\d+)\}/g, function (match, capture) {
6
- return args[parseInt(capture, 10)];
7
- });
8
- }
9
- }
10
- SkyAppFormat.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAppFormat, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11
- SkyAppFormat.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAppFormat, providedIn: 'root' });
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAppFormat, decorators: [{
13
- type: Injectable,
14
- args: [{
15
- providedIn: 'root',
16
- }]
17
- }] });
18
- //# sourceMappingURL=app-format.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-format.js","sourceRoot":"","sources":["../../../../../../../../libs/components/core/src/lib/modules/format/app-format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;;AAK3C,MAAM,OAAO,YAAY;IAChB,UAAU,CAAC,MAAc,EAAE,GAAG,IAAW;QAC9C,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAC3B,YAAY,EACZ,UAAU,KAAK,EAAE,OAAO;YACtB,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;QACrC,CAAC,CACF,CAAC;IACJ,CAAC;;0GARU,YAAY;8GAAZ,YAAY,cAFX,MAAM;4FAEP,YAAY;kBAHxB,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB","sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SkyAppFormat {\n public formatText(format: string, ...args: any[]): string {\n return String(format).replace(\n /\\{(\\d+)\\}/g,\n function (match, capture): string {\n return args[parseInt(capture, 10)];\n }\n );\n }\n}\n"]}
@@ -1,34 +0,0 @@
1
- import { Directive, ElementRef, Renderer2 } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- let idIndex = 0;
4
- function generateId() {
5
- idIndex++;
6
- return `sky-id-gen__${idIndex}`;
7
- }
8
- /**
9
- * Sets the element's `id` attribute to a unique ID. To reference this unique ID on other elements,
10
- * such as in a `label` element's `for` attribute, assign this directive to a template reference
11
- * variable, then use its `id` property.
12
- */
13
- export class SkyIdDirective {
14
- constructor(elRef, renderer) {
15
- // Generate and apply the ID before the template is rendered
16
- // to avoid a changed-after-checked error.
17
- const id = generateId();
18
- renderer.setAttribute(elRef.nativeElement, 'id', id);
19
- this._id = id;
20
- }
21
- get id() {
22
- return this._id;
23
- }
24
- }
25
- SkyIdDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyIdDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
26
- SkyIdDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SkyIdDirective, selector: "[skyId]", exportAs: ["skyId"], ngImport: i0 });
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyIdDirective, decorators: [{
28
- type: Directive,
29
- args: [{
30
- selector: '[skyId]',
31
- exportAs: 'skyId',
32
- }]
33
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; } });
34
- //# sourceMappingURL=id.directive.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"id.directive.js","sourceRoot":"","sources":["../../../../../../../../libs/components/core/src/lib/modules/id/id.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;;AAEjE,IAAI,OAAO,GAAG,CAAC,CAAC;AAEhB,SAAS,UAAU;IACjB,OAAO,EAAE,CAAC;IAEV,OAAO,eAAe,OAAO,EAAE,CAAC;AAClC,CAAC;AAED;;;;GAIG;AAKH,MAAM,OAAO,cAAc;IAOzB,YAAY,KAAiB,EAAE,QAAmB;QAChD,4DAA4D;QAC5D,0CAA0C;QAC1C,MAAM,EAAE,GAAG,UAAU,EAAE,CAAC;QAExB,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAErD,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;IAChB,CAAC;IAdD,IAAW,EAAE;QACX,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;;4GAHU,cAAc;gGAAd,cAAc;4FAAd,cAAc;kBAJ1B,SAAS;mBAAC;oBACT,QAAQ,EAAE,SAAS;oBACnB,QAAQ,EAAE,OAAO;iBAClB","sourcesContent":["import { Directive, ElementRef, Renderer2 } from '@angular/core';\n\nlet idIndex = 0;\n\nfunction generateId(): string {\n idIndex++;\n\n return `sky-id-gen__${idIndex}`;\n}\n\n/**\n * Sets the element's `id` attribute to a unique ID. To reference this unique ID on other elements,\n * such as in a `label` element's `for` attribute, assign this directive to a template reference\n * variable, then use its `id` property.\n */\n@Directive({\n selector: '[skyId]',\n exportAs: 'skyId',\n})\nexport class SkyIdDirective {\n public get id(): string {\n return this._id;\n }\n\n private _id: string;\n\n constructor(elRef: ElementRef, renderer: Renderer2) {\n // Generate and apply the ID before the template is rendered\n // to avoid a changed-after-checked error.\n const id = generateId();\n\n renderer.setAttribute(elRef.nativeElement, 'id', id);\n\n this._id = id;\n }\n}\n"]}
@@ -1,16 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { SkyIdDirective } from './id.directive';
3
- import * as i0 from "@angular/core";
4
- export class SkyIdModule {
5
- }
6
- SkyIdModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyIdModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
7
- SkyIdModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyIdModule, declarations: [SkyIdDirective], exports: [SkyIdDirective] });
8
- SkyIdModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyIdModule });
9
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyIdModule, decorators: [{
10
- type: NgModule,
11
- args: [{
12
- declarations: [SkyIdDirective],
13
- exports: [SkyIdDirective],
14
- }]
15
- }] });
16
- //# sourceMappingURL=id.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"id.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/core/src/lib/modules/id/id.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;;AAMhD,MAAM,OAAO,WAAW;;yGAAX,WAAW;0GAAX,WAAW,iBAHP,cAAc,aACnB,cAAc;0GAEb,WAAW;4FAAX,WAAW;kBAJvB,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,cAAc,CAAC;oBAC9B,OAAO,EAAE,CAAC,cAAc,CAAC;iBAC1B","sourcesContent":["import { NgModule } from '@angular/core';\n\nimport { SkyIdDirective } from './id.directive';\n\n@NgModule({\n declarations: [SkyIdDirective],\n exports: [SkyIdDirective],\n})\nexport class SkyIdModule {}\n"]}
@@ -1,16 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * @deprecated The `SkyLogService` no longer needs the `SkyLogModule`.
5
- * The `SkyLogModule` can be removed from your project.
6
- */
7
- export class SkyLogModule {
8
- }
9
- SkyLogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10
- SkyLogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLogModule });
11
- SkyLogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLogModule });
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLogModule, decorators: [{
13
- type: NgModule,
14
- args: [{}]
15
- }] });
16
- //# sourceMappingURL=log.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"log.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/core/src/lib/modules/log/log.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;;AAEzC;;;GAGG;AAEH,MAAM,OAAO,YAAY;;0GAAZ,YAAY;2GAAZ,YAAY;2GAAZ,YAAY;4FAAZ,YAAY;kBADxB,QAAQ;mBAAC,EAAE","sourcesContent":["import { NgModule } from '@angular/core';\n\n/**\n * @deprecated The `SkyLogService` no longer needs the `SkyLogModule`.\n * The `SkyLogModule` can be removed from your project.\n */\n@NgModule({})\nexport class SkyLogModule {}\n"]}