@skyux/docs-tools 4.9.7 → 5.0.0-beta.11

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 (283) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +8 -0
  3. package/bundles/skyux-docs-tools.umd.js +2076 -1855
  4. package/docs-tools.module.d.ts +10 -0
  5. package/documentation.json +10784 -0
  6. package/esm2015/docs-tools.module.js +30 -21
  7. package/esm2015/modules/anatomy/anatomy-item.component.js +18 -16
  8. package/esm2015/modules/anatomy/anatomy.component.js +23 -20
  9. package/esm2015/modules/anatomy/anatomy.module.js +15 -22
  10. package/esm2015/modules/code-examples/code-example-module-dependencies.js +2 -1
  11. package/esm2015/modules/code-examples/code-example-theme.js +1 -1
  12. package/esm2015/modules/code-examples/code-example.component.js +25 -28
  13. package/esm2015/modules/code-examples/code-example.js +2 -1
  14. package/esm2015/modules/code-examples/code-examples-editor.service.js +67 -59
  15. package/esm2015/modules/code-examples/code-examples.component.js +34 -27
  16. package/esm2015/modules/code-examples/code-examples.module.js +30 -27
  17. package/esm2015/modules/demo/demo-content-alignment.js +2 -1
  18. package/esm2015/modules/demo/demo-control-panel-change.js +2 -1
  19. package/esm2015/modules/demo/demo-control-panel-checkbox.component.js +26 -29
  20. package/esm2015/modules/demo/demo-control-panel-radio-choice.js +2 -1
  21. package/esm2015/modules/demo/demo-control-panel-radio-group.component.js +30 -33
  22. package/esm2015/modules/demo/demo-control-panel-section.component.js +15 -13
  23. package/esm2015/modules/demo/demo-control-panel.component.js +33 -36
  24. package/esm2015/modules/demo/demo.component.js +29 -38
  25. package/esm2015/modules/demo/demo.module.js +52 -32
  26. package/esm2015/modules/demo-page/demo-page-dom-adapter.service.js +11 -13
  27. package/esm2015/modules/demo-page/demo-page-module-info.component.js +13 -11
  28. package/esm2015/modules/demo-page/demo-page-section.component.js +21 -17
  29. package/esm2015/modules/demo-page/demo-page-summary.component.js +15 -13
  30. package/esm2015/modules/demo-page/demo-page-title.service.js +13 -12
  31. package/esm2015/modules/demo-page/demo-page-type-definitions.component.js +29 -21
  32. package/esm2015/modules/demo-page/demo-page.component.js +58 -61
  33. package/esm2015/modules/demo-page/demo-page.module.js +63 -32
  34. package/esm2015/modules/design-guidelines/design-guideline-thumbnail.component.js +28 -31
  35. package/esm2015/modules/design-guidelines/design-guideline.component.js +25 -23
  36. package/esm2015/modules/design-guidelines/design-guidelines.component.js +14 -12
  37. package/esm2015/modules/design-guidelines/design-guidelines.module.js +27 -24
  38. package/esm2015/modules/heading-anchor/heading-anchor.component.js +22 -19
  39. package/esm2015/modules/heading-anchor/heading-anchor.module.js +15 -20
  40. package/esm2015/modules/markdown/markdown.module.js +15 -18
  41. package/esm2015/modules/markdown/markdown.pipe.js +12 -10
  42. package/esm2015/modules/module-info/module-info.component.js +37 -35
  43. package/esm2015/modules/module-info/module-info.module.js +29 -18
  44. package/esm2015/modules/safe-html/safe-html.component.js +17 -19
  45. package/esm2015/modules/safe-html/safe-html.module.js +15 -18
  46. package/esm2015/modules/shared/docs-tools-component-info.js +2 -1
  47. package/esm2015/modules/shared/docs-tools-options.js +1 -1
  48. package/esm2015/modules/shared/docs-tools-supportal.service.js +13 -12
  49. package/esm2015/modules/shared/sky-docs-tools-resources.module.js +53 -0
  50. package/esm2015/modules/source-code/source-code-file.js +2 -1
  51. package/esm2015/modules/source-code/source-code-provider.js +12 -8
  52. package/esm2015/modules/source-code/source-code.service.js +15 -14
  53. package/esm2015/modules/thumbnail/thumbnail.component.js +29 -31
  54. package/esm2015/modules/thumbnail/thumbnail.module.js +15 -19
  55. package/esm2015/modules/type-definitions/anchor-link-service-config.js +2 -1
  56. package/esm2015/modules/type-definitions/anchor-link-service-format.js +2 -1
  57. package/esm2015/modules/type-definitions/anchor-link.js +2 -1
  58. package/esm2015/modules/type-definitions/anchor-link.service.js +26 -17
  59. package/esm2015/modules/type-definitions/call-signature-definition.component.js +25 -22
  60. package/esm2015/modules/type-definitions/call-signature-definition.js +2 -1
  61. package/esm2015/modules/type-definitions/class-definition.component.js +24 -16
  62. package/esm2015/modules/type-definitions/class-definition.js +2 -1
  63. package/esm2015/modules/type-definitions/comment-tags.js +2 -1
  64. package/esm2015/modules/type-definitions/directive-definition.component.js +24 -16
  65. package/esm2015/modules/type-definitions/directive-definition.js +2 -1
  66. package/esm2015/modules/type-definitions/entry-child-definition.js +2 -1
  67. package/esm2015/modules/type-definitions/entry-definition.js +2 -1
  68. package/esm2015/modules/type-definitions/enumeration-definition.component.js +22 -15
  69. package/esm2015/modules/type-definitions/enumeration-definition.js +2 -1
  70. package/esm2015/modules/type-definitions/enumeration-member-definition.js +2 -1
  71. package/esm2015/modules/type-definitions/index-signature-definition.js +2 -1
  72. package/esm2015/modules/type-definitions/interface-definition.component.js +27 -20
  73. package/esm2015/modules/type-definitions/interface-definition.js +2 -1
  74. package/esm2015/modules/type-definitions/interface-property-definition.js +2 -1
  75. package/esm2015/modules/type-definitions/method-definition.js +2 -1
  76. package/esm2015/modules/type-definitions/method-definitions.component.js +30 -27
  77. package/esm2015/modules/type-definitions/parameter-definition.js +2 -1
  78. package/esm2015/modules/type-definitions/pipe-definition.component.js +24 -16
  79. package/esm2015/modules/type-definitions/pipe-definition.js +2 -1
  80. package/esm2015/modules/type-definitions/property-decorator.js +2 -1
  81. package/esm2015/modules/type-definitions/property-definition.js +2 -1
  82. package/esm2015/modules/type-definitions/property-definitions.component.js +34 -33
  83. package/esm2015/modules/type-definitions/type-alias-definition.component.js +28 -21
  84. package/esm2015/modules/type-definitions/type-alias-definition.js +2 -1
  85. package/esm2015/modules/type-definitions/type-anchor-links.pipe.js +15 -16
  86. package/esm2015/modules/type-definitions/type-definition.js +2 -1
  87. package/esm2015/modules/type-definitions/type-definitions-format.service.js +31 -25
  88. package/esm2015/modules/type-definitions/type-definitions-provider.js +9 -8
  89. package/esm2015/modules/type-definitions/type-definitions.js +2 -1
  90. package/esm2015/modules/type-definitions/type-definitions.module.js +75 -51
  91. package/esm2015/modules/type-definitions/type-definitions.service.js +71 -61
  92. package/esm2015/modules/type-definitions/type-parameter-definition.js +2 -1
  93. package/esm2015/modules/type-definitions/typedoc-adapter.service.js +130 -72
  94. package/esm2015/modules/type-definitions/typedoc-types.js +2 -1
  95. package/esm2015/public-api.js +66 -0
  96. package/esm2015/skyux-docs-tools.js +2 -46
  97. package/fesm2015/skyux-docs-tools.js +1720 -1602
  98. package/fesm2015/skyux-docs-tools.js.map +1 -1
  99. package/modules/anatomy/anatomy-item.component.d.ts +3 -0
  100. package/modules/anatomy/anatomy.component.d.ts +3 -0
  101. package/modules/anatomy/anatomy.module.d.ts +9 -0
  102. package/modules/code-examples/code-example.component.d.ts +3 -0
  103. package/modules/code-examples/code-example.d.ts +1 -0
  104. package/modules/code-examples/code-examples-editor.service.d.ts +3 -0
  105. package/modules/code-examples/code-examples.component.d.ts +4 -0
  106. package/modules/code-examples/code-examples.module.d.ts +12 -0
  107. package/modules/demo/demo-control-panel-checkbox.component.d.ts +3 -0
  108. package/modules/demo/demo-control-panel-radio-group.component.d.ts +3 -0
  109. package/modules/demo/demo-control-panel-section.component.d.ts +3 -0
  110. package/modules/demo/demo-control-panel.component.d.ts +3 -5
  111. package/modules/demo/demo.component.d.ts +3 -6
  112. package/modules/demo/demo.module.d.ts +15 -0
  113. package/modules/demo-page/demo-page-dom-adapter.service.d.ts +3 -0
  114. package/modules/demo-page/demo-page-module-info.component.d.ts +3 -0
  115. package/modules/demo-page/demo-page-section.component.d.ts +3 -0
  116. package/modules/demo-page/demo-page-summary.component.d.ts +3 -0
  117. package/modules/demo-page/demo-page-title.service.d.ts +3 -0
  118. package/modules/demo-page/demo-page-type-definitions.component.d.ts +4 -0
  119. package/modules/demo-page/demo-page.component.d.ts +7 -0
  120. package/modules/demo-page/demo-page.module.d.ts +19 -0
  121. package/modules/design-guidelines/design-guideline-thumbnail.component.d.ts +3 -0
  122. package/modules/design-guidelines/design-guideline.component.d.ts +3 -0
  123. package/modules/design-guidelines/design-guidelines.component.d.ts +3 -0
  124. package/modules/design-guidelines/design-guidelines.module.d.ts +10 -0
  125. package/modules/heading-anchor/heading-anchor.component.d.ts +3 -0
  126. package/modules/heading-anchor/heading-anchor.module.d.ts +8 -0
  127. package/modules/markdown/markdown.module.d.ts +5 -0
  128. package/modules/markdown/markdown.pipe.d.ts +3 -0
  129. package/modules/module-info/module-info.component.d.ts +3 -0
  130. package/modules/module-info/module-info.module.d.ts +11 -0
  131. package/modules/safe-html/safe-html.component.d.ts +3 -0
  132. package/modules/safe-html/safe-html.module.d.ts +6 -0
  133. package/modules/shared/docs-tools-supportal.service.d.ts +3 -0
  134. package/modules/shared/sky-docs-tools-resources.module.d.ts +14 -0
  135. package/modules/source-code/source-code-provider.d.ts +3 -0
  136. package/modules/source-code/source-code.service.d.ts +3 -0
  137. package/modules/thumbnail/thumbnail.component.d.ts +3 -0
  138. package/modules/thumbnail/thumbnail.module.d.ts +7 -0
  139. package/modules/type-definitions/anchor-link.service.d.ts +3 -0
  140. package/modules/type-definitions/call-signature-definition.component.d.ts +3 -0
  141. package/modules/type-definitions/class-definition.component.d.ts +3 -0
  142. package/modules/type-definitions/directive-definition.component.d.ts +3 -0
  143. package/modules/type-definitions/enumeration-definition.component.d.ts +3 -0
  144. package/modules/type-definitions/interface-definition.component.d.ts +3 -0
  145. package/modules/type-definitions/method-definitions.component.d.ts +3 -0
  146. package/modules/type-definitions/pipe-definition.component.d.ts +3 -0
  147. package/modules/type-definitions/property-definitions.component.d.ts +3 -0
  148. package/modules/type-definitions/type-alias-definition.component.d.ts +3 -0
  149. package/modules/type-definitions/type-anchor-links.pipe.d.ts +3 -0
  150. package/modules/type-definitions/type-definitions-format.service.d.ts +3 -0
  151. package/modules/type-definitions/type-definitions-provider.d.ts +3 -0
  152. package/modules/type-definitions/type-definitions.module.d.ts +22 -0
  153. package/modules/type-definitions/type-definitions.service.d.ts +4 -1
  154. package/modules/type-definitions/typedoc-adapter.service.d.ts +3 -0
  155. package/modules/type-definitions/typedoc-types.d.ts +5 -3
  156. package/package.json +23 -32
  157. package/public-api.d.ts +63 -0
  158. package/skyux-docs-tools.d.ts +2 -45
  159. package/CHANGELOG.md +0 -399
  160. package/bundles/skyux-docs-tools.umd.js.map +0 -1
  161. package/bundles/skyux-docs-tools.umd.min.js +0 -2
  162. package/bundles/skyux-docs-tools.umd.min.js.map +0 -1
  163. package/esm2015/modules/demo/demo-control-panel-theme.component.js +0 -102
  164. package/esm2015/modules/demo/demo-theme.service.js +0 -14
  165. package/esm2015/modules/shared/docs-tools-resources.module.js +0 -20
  166. package/esm2015/modules/source-code/source-code.module.js +0 -16
  167. package/esm2015/plugin-resources/docs-tools-resources-provider.js +0 -16
  168. package/esm2015/public_api.js +0 -19
  169. package/esm5/docs-tools.module.js +0 -34
  170. package/esm5/modules/anatomy/anatomy-item.component.js +0 -21
  171. package/esm5/modules/anatomy/anatomy.component.js +0 -29
  172. package/esm5/modules/anatomy/anatomy.module.js +0 -31
  173. package/esm5/modules/code-examples/code-example-module-dependencies.js +0 -1
  174. package/esm5/modules/code-examples/code-example-theme.js +0 -6
  175. package/esm5/modules/code-examples/code-example.component.js +0 -77
  176. package/esm5/modules/code-examples/code-example.js +0 -1
  177. package/esm5/modules/code-examples/code-examples-editor.service.js +0 -158
  178. package/esm5/modules/code-examples/code-examples.component.js +0 -101
  179. package/esm5/modules/code-examples/code-examples.module.js +0 -43
  180. package/esm5/modules/demo/demo-content-alignment.js +0 -1
  181. package/esm5/modules/demo/demo-control-panel-change.js +0 -1
  182. package/esm5/modules/demo/demo-control-panel-checkbox.component.js +0 -94
  183. package/esm5/modules/demo/demo-control-panel-radio-choice.js +0 -1
  184. package/esm5/modules/demo/demo-control-panel-radio-group.component.js +0 -85
  185. package/esm5/modules/demo/demo-control-panel-section.component.js +0 -28
  186. package/esm5/modules/demo/demo-control-panel-theme.component.js +0 -114
  187. package/esm5/modules/demo/demo-control-panel.component.js +0 -95
  188. package/esm5/modules/demo/demo-theme.service.js +0 -15
  189. package/esm5/modules/demo/demo.component.js +0 -84
  190. package/esm5/modules/demo/demo.module.js +0 -52
  191. package/esm5/modules/demo-page/demo-page-dom-adapter.service.js +0 -93
  192. package/esm5/modules/demo-page/demo-page-module-info.component.js +0 -15
  193. package/esm5/modules/demo-page/demo-page-section.component.js +0 -51
  194. package/esm5/modules/demo-page/demo-page-summary.component.js +0 -27
  195. package/esm5/modules/demo-page/demo-page-title.service.js +0 -32
  196. package/esm5/modules/demo-page/demo-page-type-definitions.component.js +0 -32
  197. package/esm5/modules/demo-page/demo-page.component.js +0 -146
  198. package/esm5/modules/demo-page/demo-page.module.js +0 -60
  199. package/esm5/modules/design-guidelines/design-guideline-thumbnail.component.js +0 -36
  200. package/esm5/modules/design-guidelines/design-guideline.component.js +0 -41
  201. package/esm5/modules/design-guidelines/design-guidelines.component.js +0 -16
  202. package/esm5/modules/design-guidelines/design-guidelines.module.js +0 -34
  203. package/esm5/modules/heading-anchor/heading-anchor.component.js +0 -24
  204. package/esm5/modules/heading-anchor/heading-anchor.module.js +0 -28
  205. package/esm5/modules/markdown/markdown.module.js +0 -23
  206. package/esm5/modules/markdown/markdown.pipe.js +0 -21
  207. package/esm5/modules/module-info/module-info.component.js +0 -101
  208. package/esm5/modules/module-info/module-info.module.js +0 -34
  209. package/esm5/modules/safe-html/safe-html.component.js +0 -27
  210. package/esm5/modules/safe-html/safe-html.module.js +0 -24
  211. package/esm5/modules/shared/docs-tools-component-info.js +0 -1
  212. package/esm5/modules/shared/docs-tools-options.js +0 -7
  213. package/esm5/modules/shared/docs-tools-resources.module.js +0 -23
  214. package/esm5/modules/shared/docs-tools-supportal.service.js +0 -23
  215. package/esm5/modules/source-code/source-code-file.js +0 -1
  216. package/esm5/modules/source-code/source-code-provider.js +0 -12
  217. package/esm5/modules/source-code/source-code.module.js +0 -19
  218. package/esm5/modules/source-code/source-code.service.js +0 -42
  219. package/esm5/modules/thumbnail/thumbnail.component.js +0 -36
  220. package/esm5/modules/thumbnail/thumbnail.module.js +0 -26
  221. package/esm5/modules/type-definitions/anchor-link-service-config.js +0 -1
  222. package/esm5/modules/type-definitions/anchor-link-service-format.js +0 -1
  223. package/esm5/modules/type-definitions/anchor-link.js +0 -1
  224. package/esm5/modules/type-definitions/anchor-link.service.js +0 -99
  225. package/esm5/modules/type-definitions/call-signature-definition.component.js +0 -54
  226. package/esm5/modules/type-definitions/call-signature-definition.js +0 -1
  227. package/esm5/modules/type-definitions/class-definition.component.js +0 -20
  228. package/esm5/modules/type-definitions/class-definition.js +0 -1
  229. package/esm5/modules/type-definitions/comment-tags.js +0 -1
  230. package/esm5/modules/type-definitions/directive-definition.component.js +0 -20
  231. package/esm5/modules/type-definitions/directive-definition.js +0 -1
  232. package/esm5/modules/type-definitions/entry-child-definition.js +0 -1
  233. package/esm5/modules/type-definitions/entry-definition.js +0 -1
  234. package/esm5/modules/type-definitions/enumeration-definition.component.js +0 -19
  235. package/esm5/modules/type-definitions/enumeration-definition.js +0 -1
  236. package/esm5/modules/type-definitions/enumeration-member-definition.js +0 -1
  237. package/esm5/modules/type-definitions/index-signature-definition.js +0 -1
  238. package/esm5/modules/type-definitions/interface-definition.component.js +0 -38
  239. package/esm5/modules/type-definitions/interface-definition.js +0 -1
  240. package/esm5/modules/type-definitions/interface-property-definition.js +0 -1
  241. package/esm5/modules/type-definitions/method-definition.js +0 -1
  242. package/esm5/modules/type-definitions/method-definitions.component.js +0 -66
  243. package/esm5/modules/type-definitions/parameter-definition.js +0 -1
  244. package/esm5/modules/type-definitions/pipe-definition.component.js +0 -20
  245. package/esm5/modules/type-definitions/pipe-definition.js +0 -1
  246. package/esm5/modules/type-definitions/property-decorator.js +0 -1
  247. package/esm5/modules/type-definitions/property-definition.js +0 -1
  248. package/esm5/modules/type-definitions/property-definitions.component.js +0 -75
  249. package/esm5/modules/type-definitions/type-alias-definition.component.js +0 -39
  250. package/esm5/modules/type-definitions/type-alias-definition.js +0 -1
  251. package/esm5/modules/type-definitions/type-anchor-links.pipe.js +0 -29
  252. package/esm5/modules/type-definitions/type-definition.js +0 -1
  253. package/esm5/modules/type-definitions/type-definitions-format.service.js +0 -248
  254. package/esm5/modules/type-definitions/type-definitions-provider.js +0 -12
  255. package/esm5/modules/type-definitions/type-definitions.js +0 -1
  256. package/esm5/modules/type-definitions/type-definitions.module.js +0 -81
  257. package/esm5/modules/type-definitions/type-definitions.service.js +0 -95
  258. package/esm5/modules/type-definitions/type-parameter-definition.js +0 -1
  259. package/esm5/modules/type-definitions/typedoc-adapter.service.js +0 -462
  260. package/esm5/modules/type-definitions/typedoc-types.js +0 -1
  261. package/esm5/plugin-resources/docs-tools-resources-provider.js +0 -17
  262. package/esm5/public_api.js +0 -19
  263. package/esm5/skyux-docs-tools.js +0 -49
  264. package/fesm5/skyux-docs-tools.js +0 -3211
  265. package/fesm5/skyux-docs-tools.js.map +0 -1
  266. package/modules/demo/demo-control-panel-theme.component.d.ts +0 -32
  267. package/modules/demo/demo-theme.service.d.ts +0 -6
  268. package/modules/shared/docs-tools-resources.module.d.ts +0 -2
  269. package/modules/source-code/source-code.module.d.ts +0 -2
  270. package/plugin-resources/docs-tools-resources-provider.d.ts +0 -5
  271. package/public_api.d.ts +0 -33
  272. package/skyux-docs-tools.metadata.json +0 -1
  273. package/src/assets/img/guidelines/popover/anatomy.png +0 -0
  274. package/src/assets/img/guidelines/popover/behavior-responsive.png +0 -0
  275. package/src/assets/img/guidelines/popover/content-dont-overload.png +0 -0
  276. package/src/assets/img/guidelines/popover/content-html.png +0 -0
  277. package/src/assets/img/guidelines/popover/content-simple.png +0 -0
  278. package/src/assets/img/guidelines/popover/layout-alternate.png +0 -0
  279. package/src/assets/img/guidelines/popover/layout-default.png +0 -0
  280. package/src/assets/img/guidelines/popover/option-position.png +0 -0
  281. package/src/assets/img/guidelines/popover/popover-auto.mp4 +0 -0
  282. package/src/assets/img/guidelines/popover/popover-click.mp4 +0 -0
  283. package/src/assets/locales/resources_en_US.json +0 -22
@@ -1,3211 +0,0 @@
1
- import { __decorate, __param, __spread, __assign } from 'tslib';
2
- import { CommonModule } from '@angular/common';
3
- import { Input, Component, ChangeDetectionStrategy, ContentChildren, NgModule, Injectable, Optional, ChangeDetectorRef, EventEmitter, Output, ElementRef, Pipe, ContentChild } from '@angular/core';
4
- import { SkyImageModule } from '@blackbaud/skyux-lib-media';
5
- import { SkyFluidGridModule, SkyDefinitionListModule } from '@skyux/layout';
6
- import { SkyCodeBlockModule, SkyCodeModule } from '@blackbaud/skyux-lib-code-block';
7
- import { SkyIconModule, SkyHelpInlineModule } from '@skyux/indicators';
8
- import { SkyRepeaterModule } from '@skyux/lists';
9
- import { SkyVerticalTabsetModule, SkyTabsModule } from '@skyux/tabs';
10
- import { getStringForLocale, SKY_LIB_RESOURCES_PROVIDERS, SkyI18nModule } from '@skyux/i18n';
11
- import { SkyThemeService, SkyTheme, SkyThemeSettings, SkyThemeMode, SkyThemeModule } from '@skyux/theme';
12
- import { Subject, BehaviorSubject, merge } from 'rxjs';
13
- import { takeUntil, map, share } from 'rxjs/operators';
14
- import StackBlitzSDK from '@stackblitz/sdk';
15
- import { FormsModule } from '@angular/forms';
16
- import { SkyCheckboxModule, SkyRadioModule } from '@skyux/forms';
17
- import { SkyRestrictedViewModule } from '@blackbaud/skyux-lib-restricted-view';
18
- import { StachePageSummaryModule, StacheWrapperModule } from '@blackbaud/skyux-lib-stache';
19
- import { RouterModule, ActivatedRoute, Router } from '@angular/router';
20
- import marked from 'marked';
21
- import { SkyClipboardModule } from '@blackbaud/skyux-lib-clipboard';
22
- import { SkyPopoverModule } from '@skyux/popovers';
23
- import { SkyMediaBreakpoints, SkyMediaQueryService, SkyMediaQueryModule, SkyAppWindowRef } from '@skyux/core';
24
- import { DomSanitizer, Title } from '@angular/platform-browser';
25
- import orderBy from 'lodash.orderby';
26
- import { SkyAppConfig } from '@skyux/config';
27
- import { HttpClient } from '@angular/common/http';
28
- import { SkyAuthHttpClientModule } from '@skyux/http';
29
-
30
- var SkyDocsAnatomyItemComponent = /** @class */ (function () {
31
- function SkyDocsAnatomyItemComponent() {
32
- this.isOptional = false;
33
- }
34
- __decorate([
35
- Input()
36
- ], SkyDocsAnatomyItemComponent.prototype, "isOptional", void 0);
37
- SkyDocsAnatomyItemComponent = __decorate([
38
- Component({
39
- selector: 'sky-docs-anatomy-item',
40
- template: "<div\n class=\"sky-docs-anatomy-item\"\n [ngClass]=\"{\n 'sky-docs-anatomy-item-optional': isOptional\n }\"\n>\n <div class=\"sky-docs-anatomy-item-marker\">\n {{ marker }}\n </div>\n <div class=\"sky-docs-anatomy-item-description\">\n <ng-content></ng-content>\n <span *ngIf=\"isOptional\"\n class=\"sky-deemphasized\"\n >&nbsp;(optional)</span>\n </div>\n</div>",
41
- changeDetection: ChangeDetectionStrategy.OnPush,
42
- styles: [".sky-docs-anatomy-item-marker{display:flex;width:22px;height:22px;border-radius:50%;justify-content:center;align-items:center;margin-right:5px;color:#fff;background-color:#4d842d}.sky-docs-anatomy-item{margin-bottom:10px;display:flex;align-items:center}.sky-docs-anatomy-item.sky-docs-anatomy-item-optional .sky-docs-anatomy-item-marker{background-color:#b7da9b;color:#212327}"]
43
- })
44
- ], SkyDocsAnatomyItemComponent);
45
- return SkyDocsAnatomyItemComponent;
46
- }());
47
-
48
- var SkyDocsAnatomyComponent = /** @class */ (function () {
49
- function SkyDocsAnatomyComponent() {
50
- }
51
- SkyDocsAnatomyComponent.prototype.ngAfterContentInit = function () {
52
- this.anatomyItems.forEach(function (item, i) {
53
- item.marker = (i + 1).toString();
54
- });
55
- };
56
- __decorate([
57
- Input()
58
- ], SkyDocsAnatomyComponent.prototype, "imagePath", void 0);
59
- __decorate([
60
- ContentChildren(SkyDocsAnatomyItemComponent)
61
- ], SkyDocsAnatomyComponent.prototype, "anatomyItems", void 0);
62
- SkyDocsAnatomyComponent = __decorate([
63
- Component({
64
- selector: 'sky-docs-anatomy',
65
- template: "<div class=\"sky-docs-anatomy\">\n <sky-row>\n <sky-column\n screenSmall=\"6\"\n screenMedium=\"5\"\n screenLarge=\"4\"\n >\n <ng-content select=\"sky-docs-anatomy-item\"></ng-content>\n </sky-column>\n <sky-column\n screenSmall=\"6\"\n screenMedium=\"7\"\n screenLarge=\"8\"\n >\n <sky-image\n [imageSource]=\"imagePath\"\n ></sky-image>\n </sky-column>\n </sky-row>\n</div>",
66
- changeDetection: ChangeDetectionStrategy.OnPush,
67
- styles: [""]
68
- })
69
- ], SkyDocsAnatomyComponent);
70
- return SkyDocsAnatomyComponent;
71
- }());
72
-
73
- var SkyDocsAnatomyModule = /** @class */ (function () {
74
- function SkyDocsAnatomyModule() {
75
- }
76
- SkyDocsAnatomyModule = __decorate([
77
- NgModule({
78
- imports: [
79
- CommonModule,
80
- SkyFluidGridModule,
81
- SkyImageModule
82
- ],
83
- declarations: [
84
- SkyDocsAnatomyComponent,
85
- SkyDocsAnatomyItemComponent
86
- ],
87
- exports: [
88
- SkyDocsAnatomyComponent,
89
- SkyDocsAnatomyItemComponent
90
- ]
91
- })
92
- ], SkyDocsAnatomyModule);
93
- return SkyDocsAnatomyModule;
94
- }());
95
-
96
- var SkyDocsToolsResourcesProvider = /** @class */ (function () {
97
- function SkyDocsToolsResourcesProvider() {
98
- this.resources = { "EN-US": { "sky-docs-demo-heading": "Demo", "sky-docs-demo-toggle-button-on": "Show options", "sky-docs-demo-toggle-button-off": "Hide options", "sky-docs-code-example-launch-button-label": "Run in StackBlitz", "sky-docs-demo-control-panel-reset-button-label": "Reset" } };
99
- }
100
- SkyDocsToolsResourcesProvider.prototype.getString = function (localeInfo, name) {
101
- return getStringForLocale(this.resources, localeInfo.locale, name);
102
- };
103
- SkyDocsToolsResourcesProvider = __decorate([
104
- Injectable()
105
- ], SkyDocsToolsResourcesProvider);
106
- return SkyDocsToolsResourcesProvider;
107
- }());
108
-
109
- var SkyDocsToolsResourcesModule = /** @class */ (function () {
110
- function SkyDocsToolsResourcesModule() {
111
- }
112
- SkyDocsToolsResourcesModule = __decorate([
113
- NgModule({
114
- providers: [{
115
- provide: SKY_LIB_RESOURCES_PROVIDERS,
116
- useClass: SkyDocsToolsResourcesProvider,
117
- multi: true
118
- }],
119
- exports: [
120
- SkyI18nModule
121
- ]
122
- })
123
- ], SkyDocsToolsResourcesModule);
124
- return SkyDocsToolsResourcesModule;
125
- }());
126
-
127
- var SkyDocsSourceCodeProvider = /** @class */ (function () {
128
- function SkyDocsSourceCodeProvider() {
129
- }
130
- SkyDocsSourceCodeProvider = __decorate([
131
- Injectable()
132
- ], SkyDocsSourceCodeProvider);
133
- return SkyDocsSourceCodeProvider;
134
- }());
135
-
136
- var SkyDocsSourceCodeService = /** @class */ (function () {
137
- function SkyDocsSourceCodeService(sourceCodeProvider) {
138
- this.sourceCodeProvider = sourceCodeProvider;
139
- }
140
- SkyDocsSourceCodeService.prototype.getSourceCode = function (path) {
141
- var sourceCode = this.sourceCodeProvider.sourceCode;
142
- if (!sourceCode || !sourceCode.length) {
143
- return [];
144
- }
145
- return sourceCode
146
- .filter(function (file) { return file.filePath.indexOf(path) === 0; })
147
- .map(function (file) {
148
- // TODO: Remove decoding after migrating to Angular CLI. Code examples will not be encoded for SKY UX 5 libraries.
149
- // SKY UX 4 libraries will return rawContents encoded, while later libraries will
150
- // return rawContents decoded. Check if the contents need decoded before returning them.
151
- var decodedContents;
152
- try {
153
- decodedContents = decodeURIComponent(file.rawContents);
154
- if (decodedContents !== file.rawContents) {
155
- file.rawContents = decodedContents;
156
- }
157
- }
158
- catch (error) {
159
- // Pre-decoded contents may contain characters like '%' that would throw errors.
160
- // In these cases, pass along the original rawContents.
161
- }
162
- return file;
163
- });
164
- };
165
- SkyDocsSourceCodeService.ctorParameters = function () { return [
166
- { type: SkyDocsSourceCodeProvider }
167
- ]; };
168
- SkyDocsSourceCodeService = __decorate([
169
- Injectable()
170
- ], SkyDocsSourceCodeService);
171
- return SkyDocsSourceCodeService;
172
- }());
173
-
174
- var SkyDocsSourceCodeModule = /** @class */ (function () {
175
- function SkyDocsSourceCodeModule() {
176
- }
177
- SkyDocsSourceCodeModule = __decorate([
178
- NgModule({
179
- providers: [
180
- SkyDocsSourceCodeProvider,
181
- SkyDocsSourceCodeService
182
- ]
183
- })
184
- ], SkyDocsSourceCodeModule);
185
- return SkyDocsSourceCodeModule;
186
- }());
187
-
188
- var SkyDocsCodeExampleTheme;
189
- (function (SkyDocsCodeExampleTheme) {
190
- SkyDocsCodeExampleTheme["Default"] = "default";
191
- SkyDocsCodeExampleTheme["Modern"] = "modern";
192
- })(SkyDocsCodeExampleTheme || (SkyDocsCodeExampleTheme = {}));
193
-
194
- /**
195
- * Renders a single code example.
196
- * @example
197
- * ```
198
- * <sky-docs-code-example
199
- * heading="My code example"
200
- * sourceCodePath="src/app/public/plugin-resources/foobar"
201
- * >
202
- * </sky-docs-code-example>
203
- * ```
204
- */
205
- var SkyDocsCodeExampleComponent = /** @class */ (function () {
206
- function SkyDocsCodeExampleComponent(themeSvc) {
207
- var _this = this;
208
- this.ngUnsubscribe = new Subject();
209
- // Update theme property with SkyThemeService if it has not been set.
210
- if (!this._theme && themeSvc) {
211
- themeSvc.settingsChange
212
- .pipe(takeUntil(this.ngUnsubscribe))
213
- .subscribe(function (change) {
214
- if (change.currentSettings.theme.name === 'modern') {
215
- _this.theme = SkyDocsCodeExampleTheme.Modern;
216
- }
217
- else if (change.currentSettings.theme.name === 'default') {
218
- _this.theme = SkyDocsCodeExampleTheme.Default;
219
- }
220
- });
221
- }
222
- }
223
- Object.defineProperty(SkyDocsCodeExampleComponent.prototype, "theme", {
224
- get: function () {
225
- return this._theme || SkyDocsCodeExampleTheme.Default;
226
- },
227
- /**
228
- * Specifies if the editor service should show the example in modern theme.
229
- * The value will be gleaned from `SkyThemeService` first, then fallback to 'default' if the service is not found.
230
- */
231
- set: function (value) {
232
- this._theme = value;
233
- },
234
- enumerable: true,
235
- configurable: true
236
- });
237
- SkyDocsCodeExampleComponent.prototype.ngOnDestroy = function () {
238
- this.ngUnsubscribe.next();
239
- this.ngUnsubscribe.complete();
240
- };
241
- SkyDocsCodeExampleComponent.ctorParameters = function () { return [
242
- { type: SkyThemeService, decorators: [{ type: Optional }] }
243
- ]; };
244
- __decorate([
245
- Input()
246
- ], SkyDocsCodeExampleComponent.prototype, "heading", void 0);
247
- __decorate([
248
- Input()
249
- ], SkyDocsCodeExampleComponent.prototype, "sourceCodePath", void 0);
250
- __decorate([
251
- Input()
252
- ], SkyDocsCodeExampleComponent.prototype, "theme", null);
253
- SkyDocsCodeExampleComponent = __decorate([
254
- Component({
255
- selector: 'sky-docs-code-example',
256
- template: '',
257
- changeDetection: ChangeDetectionStrategy.OnPush
258
- }),
259
- __param(0, Optional())
260
- ], SkyDocsCodeExampleComponent);
261
- return SkyDocsCodeExampleComponent;
262
- }());
263
-
264
- /**
265
- * @internal
266
- */
267
- var SkyDocsCodeExamplesEditorService = /** @class */ (function () {
268
- function SkyDocsCodeExamplesEditorService() {
269
- }
270
- SkyDocsCodeExamplesEditorService.prototype.launchEditor = function (codeExample) {
271
- var project = this.getPayload(codeExample);
272
- var options = {};
273
- StackBlitzSDK.openProject(project, options);
274
- };
275
- SkyDocsCodeExamplesEditorService.prototype.getPayload = function (codeExample) {
276
- var angularVersion = '^9.0.0';
277
- var skyuxVersion = '^4';
278
- var defaultDependencies = {
279
- '@angular/animations': angularVersion,
280
- '@angular/common': angularVersion,
281
- '@angular/compiler': angularVersion,
282
- '@angular/core': angularVersion,
283
- '@angular/forms': angularVersion,
284
- '@angular/platform-browser': angularVersion,
285
- '@angular/platform-browser-dynamic': angularVersion,
286
- '@angular/router': angularVersion,
287
- '@skyux/animations': skyuxVersion,
288
- '@skyux/assets': skyuxVersion,
289
- '@skyux/config': skyuxVersion,
290
- '@skyux/core': skyuxVersion,
291
- '@skyux/errors': skyuxVersion,
292
- '@skyux/forms': skyuxVersion,
293
- '@skyux/http': skyuxVersion,
294
- '@skyux/i18n': skyuxVersion,
295
- '@skyux/indicators': skyuxVersion,
296
- '@skyux/layout': skyuxVersion,
297
- '@skyux/modals': skyuxVersion,
298
- '@skyux/popovers': skyuxVersion,
299
- '@skyux/router': skyuxVersion,
300
- '@skyux/theme': skyuxVersion,
301
- 'core-js': '2',
302
- 'rxjs': '^6.0.0',
303
- 'rxjs-compat': '^6.0.0',
304
- 'tslib': '~1.14.1',
305
- 'zone.js': '~0.11.4'
306
- };
307
- var mergedDependencies = Object.assign({}, defaultDependencies, codeExample.packageDependencies);
308
- // Ensure any @skyux dependencies list the correct version of SKY UX.
309
- // e.g. `"@skyux/core": "*"` --> `"@skyux/core": "4.0.0"`
310
- for (var packageName in mergedDependencies) {
311
- if (mergedDependencies.hasOwnProperty(packageName)) {
312
- var version = mergedDependencies[packageName];
313
- if (version === '*' && /^(@blackbaud\/skyux-lib-|@skyux)/.test(packageName)) {
314
- mergedDependencies[packageName] = skyuxVersion;
315
- }
316
- }
317
- }
318
- var files = this.parseStackBlitzFiles(codeExample.sourceCode, mergedDependencies, codeExample.theme);
319
- return {
320
- files: files,
321
- title: 'SKY UX Demo',
322
- description: 'SKY UX Demo',
323
- template: 'angular-cli',
324
- dependencies: mergedDependencies,
325
- settings: {
326
- compile: {
327
- clearConsole: false
328
- }
329
- }
330
- };
331
- };
332
- SkyDocsCodeExamplesEditorService.prototype.parseStackBlitzFiles = function (sourceCode, dependencies, theme) {
333
- var _this = this;
334
- var srcPath = 'src/';
335
- var appPath = srcPath + "app/";
336
- var banner = "/**\n * This file is needed for the StackBlitz demo only.\n * It is automatically built when using SKY UX CLI.\n * Visit https://developer.blackbaud/skyux for more information\n **/\n ";
337
- var moduleImportStatements = [
338
- "import {\n Component,\n NgModule\n} from '@angular/core';",
339
- "import {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';",
340
- "import {\n platformBrowserDynamic\n} from '@angular/platform-browser-dynamic';",
341
- "import {\n BrowserModule\n} from '@angular/platform-browser';",
342
- "import {\n RouterModule\n} from '@angular/router';",
343
- "import {\n SkyAppLocaleProvider\n} from '@skyux/i18n';",
344
- "import {\n SkyThemeService\n} from '@skyux/theme';",
345
- "import {\n of as observableOf\n} from 'rxjs';",
346
- "import {\n AppComponent\n} from './app.component';"
347
- ];
348
- var moduleImports = [
349
- 'BrowserModule',
350
- 'FormsModule',
351
- 'ReactiveFormsModule',
352
- 'RouterModule.forRoot([])'
353
- ];
354
- var files = {};
355
- var appComponentTemplate = '';
356
- sourceCode.forEach(function (file) {
357
- files["" + appPath + file.fileName] = file.rawContents;
358
- // Setup module imports and component selectors.
359
- if (file.fileName.indexOf('.module.ts') > -1) {
360
- var moduleName = _this.getModuleName(file.rawContents);
361
- var importPath = "./" + _this.getFilenameNoExtension(file.fileName);
362
- var exportedComponent = _this.getExportedComponent(file.rawContents);
363
- var componentSelector = _this.getComponentSelector(exportedComponent, sourceCode);
364
- appComponentTemplate += "<" + componentSelector + "></" + componentSelector + ">";
365
- moduleImports.push(moduleName);
366
- moduleImportStatements.push("import {\n " + moduleName + "\n} from '" + importPath + "';");
367
- }
368
- });
369
- files[appPath + "app.component.ts"] = banner + "\nimport {\n Component,\n Renderer2\n} from '@angular/core';\n\nimport {\n SkyTheme,\n SkyThemeMode,\n SkyThemeService,\n SkyThemeSettings\n} from '@skyux/theme';\n\n@Component({\n selector: 'sky-demo-app',\n template: '" + appComponentTemplate + "'\n})\nexport class AppComponent {\n\n constructor(\n themeSvc: SkyThemeService,\n renderer?: Renderer2\n ) {\n const themeSettings = new SkyThemeSettings(\n SkyTheme.presets['" + (theme === SkyDocsCodeExampleTheme.Modern ? 'modern' : 'default') + "'],\n SkyThemeMode.presets.light\n );\n\n themeSvc.init(\n document.body,\n renderer,\n themeSettings\n );\n }\n\n}";
370
- files[appPath + "app.module.ts"] = moduleImportStatements.join('\n\n') + "\n\n@NgModule({\n imports: [\n " + moduleImports.join(',\n ') + "\n ],\n declarations: [\n AppComponent\n ],\n bootstrap: [\n AppComponent\n ],\n providers: [\n SkyThemeService,\n {\n provide: SkyAppLocaleProvider,\n useValue: {\n getLocaleInfo: () => observableOf({\n locale: 'en-US'\n })\n }\n }\n ]\n})\nexport class AppModule { }\n";
371
- files[srcPath + "index.html"] = "<!--\n The CSS links are needed for the StackBlitz demo only.\n This is a workaround for a known bug that prevents external imports in CSS.\n https://github.com/stackblitz/core/issues/133\n-->\n<link rel=\"stylesheet\" type=\"text/css\" href=\"https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css\" />" + (theme === SkyDocsCodeExampleTheme.Modern ? "<link rel=\"stylesheet\" type=\"text/css\" href=\"https://sky.blackbaudcdn.net/static/skyux-icons/4.0.0-beta.2/assets/css/skyux-icons.min.css\" />" : "") + "\n\n<sky-demo-app>\n Loading...\n</sky-demo-app>";
372
- files[srcPath + "main.ts"] = banner + "\nimport './polyfills';\n\nimport {\n enableProdMode\n} from '@angular/core';\n\nimport {\n platformBrowserDynamic\n} from '@angular/platform-browser-dynamic';\n\nimport {\n AppModule\n} from './app/app.module';\n\nplatformBrowserDynamic().bootstrapModule(AppModule).then(ref => {\n if (window['ngRef']) {\n window['ngRef'].destroy();\n }\n\n window['ngRef'] = ref;\n}).catch(err => console.error(err));\n";
373
- files[srcPath + "polyfills.ts"] = banner + "\nimport 'core-js/es6/reflect';\nimport 'core-js/es7/reflect';\nimport 'zone.js/dist/zone';\n";
374
- files[srcPath + "styles.scss"] = "@import '~@skyux/theme/css/sky';\n" + (theme === SkyDocsCodeExampleTheme.Modern ? "@import '~@skyux/theme/css/themes/modern/styles';" : "") + "\nbody {\n background-color: #fff;\n margin: 15px;\n}";
375
- files['angular.json'] = "{\n \"projects\": {\n \"demo\": {\n \"architect\": {\n \"build\": {\n \"options\": {\n \"index\": \"src/index.html\",\n \"styles\": [\n \"src/styles.scss\"\n ]\n }\n }\n }\n }\n }\n}";
376
- files['package.json'] = JSON.stringify({
377
- dependencies: dependencies
378
- }, undefined, 2);
379
- files['tsconfig.json'] = "{\n \"compilerOptions\": {\n \"target\": \"es5\",\n \"moduleResolution\": \"node\",\n \"emitDecoratorMetadata\": true,\n \"experimentalDecorators\": true,\n \"importHelpers\": true,\n \"lib\": [\n \"dom\",\n \"es6\"\n ]\n }\n}";
380
- return files;
381
- };
382
- SkyDocsCodeExamplesEditorService.prototype.getModuleName = function (contents) {
383
- return contents.split('export class ')[1].split(' {')[0];
384
- };
385
- SkyDocsCodeExamplesEditorService.prototype.getFilenameNoExtension = function (fileName) {
386
- var extension = fileName.split('.').pop();
387
- return fileName.replace("." + extension, '');
388
- };
389
- SkyDocsCodeExamplesEditorService.prototype.getExportedComponent = function (contents) {
390
- var trimmed = contents.replace(/\s/g, '');
391
- var fragment = trimmed.split('exports:[')[1];
392
- if (!fragment) {
393
- throw 'You must export a component from the code example module!';
394
- }
395
- fragment = fragment.split(']')[0];
396
- var components = fragment.split(',');
397
- if (components.length > 1) {
398
- throw 'You may only export a single component from the code example module' +
399
- ("(we found " + components.length + ": " + components.join(', ') + ").") +
400
- 'Is it possible to create a new code example with the extra components?';
401
- }
402
- return components[0];
403
- };
404
- SkyDocsCodeExamplesEditorService.prototype.getComponentSelector = function (componentClassName, sourceCode) {
405
- var found = sourceCode.find(function (file) {
406
- return (file.rawContents.indexOf(componentClassName) > -1);
407
- });
408
- var trimmed = found.rawContents.replace(/\s/g, '');
409
- return trimmed.split("selector:'")[1].split("'")[0];
410
- };
411
- SkyDocsCodeExamplesEditorService = __decorate([
412
- Injectable()
413
- ], SkyDocsCodeExamplesEditorService);
414
- return SkyDocsCodeExamplesEditorService;
415
- }());
416
-
417
- /**
418
- * Wraps all code examples and handles their configuration and styles.
419
- * @example
420
- * ```
421
- * <sky-docs-code-examples
422
- * [packageDependencies]="{
423
- * "foobar": "*",
424
- * "baz": "1.2.3"
425
- * }"
426
- * >
427
- * <sky-docs-code-example>
428
- * </sky-docs-code-example>
429
- * </sky-docs-code-examples>
430
- * ```
431
- */
432
- var SkyDocsCodeExamplesComponent = /** @class */ (function () {
433
- function SkyDocsCodeExamplesComponent(editorService, sourceCodeService) {
434
- this.editorService = editorService;
435
- this.sourceCodeService = sourceCodeService;
436
- this.codeExamples = [];
437
- }
438
- Object.defineProperty(SkyDocsCodeExamplesComponent.prototype, "packageDependencies", {
439
- get: function () {
440
- return this._packageDependencies || {};
441
- },
442
- /**
443
- * Any extra NPM package dependencies that are needed for the editor to run the code example.
444
- * @default {}
445
- */
446
- set: function (value) {
447
- this._packageDependencies = value;
448
- },
449
- enumerable: true,
450
- configurable: true
451
- });
452
- SkyDocsCodeExamplesComponent.prototype.ngAfterContentInit = function () {
453
- var _this = this;
454
- this.codeExampleComponents.forEach(function (component) {
455
- // Make sure the source code path ends in a slash, so that similarly named directories aren't included.
456
- var sourceCodePath = component.sourceCodePath;
457
- if (sourceCodePath.slice(-1) !== '/') {
458
- sourceCodePath += '/';
459
- }
460
- var sourceCode = _this.sourceCodeService.getSourceCode(sourceCodePath);
461
- if (!sourceCode.length) {
462
- console.warn("Source code not found at location \"" + sourceCodePath + "\" for \"" + component.heading + "\"!");
463
- return;
464
- }
465
- _this.codeExamples.push({
466
- heading: component.heading,
467
- packageDependencies: _this.packageDependencies,
468
- sourceCode: sourceCode,
469
- theme: component.theme
470
- });
471
- });
472
- };
473
- SkyDocsCodeExamplesComponent.prototype.launchEditor = function (codeExample) {
474
- this.editorService.launchEditor(codeExample);
475
- };
476
- /**
477
- * Returns a string representing one of PrismJS's supported language types.
478
- * See: https://prismjs.com/#supported-languages
479
- */
480
- SkyDocsCodeExamplesComponent.prototype.parseCodeLanguageType = function (fileName) {
481
- var extension = fileName.split('.').pop().toLowerCase();
482
- switch (extension) {
483
- case 'ts':
484
- return 'typescript';
485
- case 'html':
486
- return 'markup';
487
- default:
488
- return extension;
489
- }
490
- };
491
- SkyDocsCodeExamplesComponent.ctorParameters = function () { return [
492
- { type: SkyDocsCodeExamplesEditorService },
493
- { type: SkyDocsSourceCodeService }
494
- ]; };
495
- __decorate([
496
- Input()
497
- ], SkyDocsCodeExamplesComponent.prototype, "packageDependencies", null);
498
- __decorate([
499
- ContentChildren(SkyDocsCodeExampleComponent)
500
- ], SkyDocsCodeExamplesComponent.prototype, "codeExampleComponents", void 0);
501
- SkyDocsCodeExamplesComponent = __decorate([
502
- Component({
503
- selector: 'sky-docs-code-examples',
504
- template: "<div *ngIf=\"codeExamples && codeExamples.length\" class=\"sky-docs-code-examples\">\n <sky-repeater *ngIf=\"codeExamples.length > 1 else singleCodeExample\" expandMode=\"multiple\">\n <sky-repeater-item *ngFor=\"let codeExample of codeExamples\" [isExpanded]=\"false\">\n <sky-repeater-item-title>\n <ng-container *ngTemplateOutlet=\"codeExampleHeaderTemplate; context: {$implicit: codeExample}\">\n </ng-container>\n </sky-repeater-item-title>\n <sky-repeater-item-content>\n <ng-container *ngTemplateOutlet=\"codeExampleTemplate; context: {$implicit: codeExample}\">\n </ng-container>\n </sky-repeater-item-content>\n </sky-repeater-item>\n </sky-repeater>\n</div>\n\n<ng-template>\n <ng-content select=\"sky-docs-code-example\">\n </ng-content>\n</ng-template>\n\n<ng-template let-item #codeExampleTemplate>\n <div class=\"sky-docs-code-example-wrapper\">\n <sky-vertical-tabset *ngIf=\"item.sourceCode && item.sourceCode.length\">\n <sky-vertical-tab *ngFor=\"let file of item.sourceCode; let i = index;\" [active]=\"i === 0\" [tabHeading]=\"file.fileName\">\n <sky-code-block [code]=\"file.rawContents\" [languageType]=\"parseCodeLanguageType(file.fileName)\" ngPreserveWhitespaces=\"true\">\n </sky-code-block>\n </sky-vertical-tab>\n </sky-vertical-tabset>\n </div>\n</ng-template>\n\n<ng-template #singleCodeExample>\n <ng-container *ngTemplateOutlet=\"codeExampleHeaderTemplate; context: {$implicit: codeExamples[0]}\">\n </ng-container>\n <ng-container *ngTemplateOutlet=\"codeExampleTemplate; context: {$implicit: codeExamples[0]}\">\n </ng-container>\n</ng-template>\n\n<ng-template let-codeExample #codeExampleHeaderTemplate>\n <div class=\"sky-docs-code-example-header\">\n <div class=\"sky-docs-code-example-header-title sky-emphasized\">\n {{ codeExample.heading }}\n </div>\n <div class=\"sky-docs-code-example-header-controls\">\n <button class=\"sky-btn sky-btn-default\" type=\"button\" (click)=\"launchEditor(codeExample);$event.stopPropagation();\">\n <sky-icon icon=\"pencil\"></sky-icon>\n {{ 'sky-docs-code-example-launch-button-label' | skyLibResources }}\n </button>\n </div>\n </div>\n</ng-template>",
505
- changeDetection: ChangeDetectionStrategy.OnPush,
506
- styles: [".sky-docs-code-example-header{display:flex;align-items:baseline}.sky-docs-code-example-header-title{flex-grow:1}.sky-docs-code-example-header-controls{flex-grow:0}.sky-docs-code-example-header-controls .sky-btn{font-weight:400}.sky-docs-code-example-wrapper{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;margin-top:10px}.sky-docs-code-example-wrapper ::ng-deep .sky-vertical-tabset-content{margin:0}.sky-docs-code-example-wrapper ::ng-deep sky-code-block{margin:0!important}.sky-docs-code-example-wrapper ::ng-deep .sky-code-block-header{border:0}.sky-docs-code-example-wrapper ::ng-deep .sky-code-output{border-left:0;border-right:0;border-bottom:0}"]
507
- })
508
- ], SkyDocsCodeExamplesComponent);
509
- return SkyDocsCodeExamplesComponent;
510
- }());
511
-
512
- var SkyDocsCodeExamplesModule = /** @class */ (function () {
513
- function SkyDocsCodeExamplesModule() {
514
- }
515
- SkyDocsCodeExamplesModule = __decorate([
516
- NgModule({
517
- imports: [
518
- CommonModule,
519
- SkyCodeBlockModule,
520
- SkyDocsSourceCodeModule,
521
- SkyDocsToolsResourcesModule,
522
- SkyIconModule,
523
- SkyRepeaterModule,
524
- SkyVerticalTabsetModule
525
- ],
526
- declarations: [
527
- SkyDocsCodeExampleComponent,
528
- SkyDocsCodeExamplesComponent
529
- ],
530
- exports: [
531
- SkyDocsCodeExampleComponent,
532
- SkyDocsCodeExamplesComponent
533
- ],
534
- providers: [
535
- SkyDocsCodeExamplesEditorService
536
- ]
537
- })
538
- ], SkyDocsCodeExamplesModule);
539
- return SkyDocsCodeExamplesModule;
540
- }());
541
-
542
- /**
543
- * Renders a checkbox control within the control panel.
544
- * @example
545
- * ```markup
546
- * <sky-docs-demo-control-panel-checkbox
547
- * label="Show title"
548
- * [checked]="true"
549
- * [propertyName]="showTitle"
550
- * >
551
- * </sky-docs-demo-control-panel-checkbox>
552
- * ```
553
- */
554
- var SkyDocsDemoControlPanelCheckboxComponent = /** @class */ (function () {
555
- function SkyDocsDemoControlPanelCheckboxComponent(changeDetector) {
556
- this.changeDetector = changeDetector;
557
- /**
558
- * Indicates whether to disable the checkbox.
559
- */
560
- this.disabled = false;
561
- this.selectionChange = new Subject();
562
- this.initialState = {};
563
- }
564
- Object.defineProperty(SkyDocsDemoControlPanelCheckboxComponent.prototype, "checked", {
565
- get: function () {
566
- return this._checked || false;
567
- },
568
- /**
569
- * The checked status of the checkbox.
570
- * @default false
571
- */
572
- set: function (value) {
573
- if (value !== undefined && this._checked === undefined) {
574
- this.initialState.checked = value;
575
- }
576
- this._checked = value;
577
- },
578
- enumerable: true,
579
- configurable: true
580
- });
581
- SkyDocsDemoControlPanelCheckboxComponent.prototype.ngOnInit = function () {
582
- var _this = this;
583
- setTimeout(function () {
584
- _this.initialState.checked = _this.checked;
585
- _this.notifyChange();
586
- });
587
- };
588
- SkyDocsDemoControlPanelCheckboxComponent.prototype.ngOnDestroy = function () {
589
- this.selectionChange.complete();
590
- };
591
- SkyDocsDemoControlPanelCheckboxComponent.prototype.onModelChange = function () {
592
- this.notifyChange();
593
- };
594
- SkyDocsDemoControlPanelCheckboxComponent.prototype.resetState = function () {
595
- if (this.initialState.checked !== this.checked) {
596
- this.checked = !!this.initialState.checked;
597
- this.notifyChange();
598
- this.changeDetector.markForCheck();
599
- }
600
- };
601
- SkyDocsDemoControlPanelCheckboxComponent.prototype.notifyChange = function () {
602
- var _a;
603
- this.selectionChange.next((_a = {},
604
- _a[this.propertyName] = this.checked,
605
- _a));
606
- };
607
- SkyDocsDemoControlPanelCheckboxComponent.ctorParameters = function () { return [
608
- { type: ChangeDetectorRef }
609
- ]; };
610
- __decorate([
611
- Input()
612
- ], SkyDocsDemoControlPanelCheckboxComponent.prototype, "checked", null);
613
- __decorate([
614
- Input()
615
- ], SkyDocsDemoControlPanelCheckboxComponent.prototype, "disabled", void 0);
616
- __decorate([
617
- Input()
618
- ], SkyDocsDemoControlPanelCheckboxComponent.prototype, "label", void 0);
619
- __decorate([
620
- Input()
621
- ], SkyDocsDemoControlPanelCheckboxComponent.prototype, "propertyName", void 0);
622
- SkyDocsDemoControlPanelCheckboxComponent = __decorate([
623
- Component({
624
- selector: 'sky-docs-demo-control-panel-checkbox',
625
- template: "<sky-checkbox\n [disabled]=\"disabled\"\n [name]=\"propertyName\"\n [(ngModel)]=\"checked\"\n (change)=\"onModelChange()\"\n>\n <sky-checkbox-label>{{ label }}</sky-checkbox-label>\n</sky-checkbox>\n",
626
- changeDetection: ChangeDetectionStrategy.OnPush
627
- })
628
- ], SkyDocsDemoControlPanelCheckboxComponent);
629
- return SkyDocsDemoControlPanelCheckboxComponent;
630
- }());
631
-
632
- /**
633
- * Renders a radio control group.
634
- * @example
635
- * ```markup
636
- * <sky-docs-demo-control-panel-radio-group
637
- * [choices]="[
638
- * { 'label': 'Red', value: '#f00' },
639
- * { 'label': 'Green', value: '#0f0' },
640
- * { 'label': 'Blue', value: '#00f' }
641
- * ]"
642
- * heading="Choose a color"
643
- * initialValue="Red"
644
- * propertyName="color"
645
- * >
646
- * </sky-docs-demo-control-panel-radio-group>
647
- * ```
648
- */
649
- var SkyDocsDemoControlPanelRadioGroupComponent = /** @class */ (function () {
650
- function SkyDocsDemoControlPanelRadioGroupComponent(changeDetector) {
651
- this.changeDetector = changeDetector;
652
- /**
653
- * Indicates whether to disable the radio group.
654
- */
655
- this.disabled = false;
656
- /**
657
- * @internal
658
- */
659
- this.selectionChange = new Subject();
660
- }
661
- SkyDocsDemoControlPanelRadioGroupComponent.prototype.ngOnInit = function () {
662
- this.value = this.cloneValue(this.initialValue);
663
- };
664
- SkyDocsDemoControlPanelRadioGroupComponent.prototype.ngOnDestroy = function () {
665
- this.selectionChange.complete();
666
- };
667
- SkyDocsDemoControlPanelRadioGroupComponent.prototype.onModelChange = function (value) {
668
- var _a;
669
- this.value = value;
670
- this.selectionChange.next((_a = {},
671
- _a[this.propertyName] = this.value,
672
- _a));
673
- };
674
- SkyDocsDemoControlPanelRadioGroupComponent.prototype.resetValue = function () {
675
- this.value = this.cloneValue(this.initialValue);
676
- this.changeDetector.markForCheck();
677
- };
678
- SkyDocsDemoControlPanelRadioGroupComponent.prototype.cloneValue = function (value) {
679
- if (typeof value === 'object') {
680
- return JSON.parse(JSON.stringify(value));
681
- }
682
- return value;
683
- };
684
- SkyDocsDemoControlPanelRadioGroupComponent.ctorParameters = function () { return [
685
- { type: ChangeDetectorRef }
686
- ]; };
687
- __decorate([
688
- Input()
689
- ], SkyDocsDemoControlPanelRadioGroupComponent.prototype, "choices", void 0);
690
- __decorate([
691
- Input()
692
- ], SkyDocsDemoControlPanelRadioGroupComponent.prototype, "disabled", void 0);
693
- __decorate([
694
- Input()
695
- ], SkyDocsDemoControlPanelRadioGroupComponent.prototype, "heading", void 0);
696
- __decorate([
697
- Input()
698
- ], SkyDocsDemoControlPanelRadioGroupComponent.prototype, "initialValue", void 0);
699
- __decorate([
700
- Input()
701
- ], SkyDocsDemoControlPanelRadioGroupComponent.prototype, "propertyName", void 0);
702
- SkyDocsDemoControlPanelRadioGroupComponent = __decorate([
703
- Component({
704
- selector: 'sky-docs-demo-control-panel-radio-group',
705
- template: "<div\n class=\"sky-demo-control-panel-radio-group\"\n>\n <strong *ngIf=\"heading\">{{ heading }}</strong>\n <sky-radio-group\n [disabled]=\"disabled\"\n [name]=\"propertyName\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event);\"\n >\n <ul\n class=\"sky-list-unstyled\"\n >\n <li *ngFor=\"let choice of choices\">\n <sky-radio\n [value]=\"choice.value\"\n >\n <sky-radio-label>{{ choice.label }}</sky-radio-label>\n </sky-radio>\n </li>\n </ul>\n </sky-radio-group>\n</div>\n",
706
- changeDetection: ChangeDetectionStrategy.OnPush,
707
- styles: [".sky-demo-control-panel-radio-group{margin-bottom:20px}ul{margin:0}"]
708
- })
709
- ], SkyDocsDemoControlPanelRadioGroupComponent);
710
- return SkyDocsDemoControlPanelRadioGroupComponent;
711
- }());
712
-
713
- var SkyDocsDemoThemeService = /** @class */ (function () {
714
- function SkyDocsDemoThemeService() {
715
- this.supportsTheming = new BehaviorSubject(false);
716
- this.themeSettings = new BehaviorSubject(undefined);
717
- }
718
- SkyDocsDemoThemeService = __decorate([
719
- Injectable()
720
- ], SkyDocsDemoThemeService);
721
- return SkyDocsDemoThemeService;
722
- }());
723
-
724
- /**
725
- * Handles the appearance and configuration of the behavior demo control panel.
726
- * @example
727
- * ```markup
728
- * <sky-docs-demo-control-panel
729
- * (selectionChange)="onSelectionChange($event)"
730
- * >
731
- * Control panel content here.
732
- * </sky-docs-demo-control-panel>
733
- * ```
734
- */
735
- var SkyDocsDemoControlPanelComponent = /** @class */ (function () {
736
- function SkyDocsDemoControlPanelComponent(demoThemeSvc) {
737
- this.demoThemeSvc = demoThemeSvc;
738
- /**
739
- * Fires when the user clicks the reset button.
740
- */
741
- this.reset = new EventEmitter();
742
- /**
743
- * Fires when a user makes a selection from one of the controls in the panel.
744
- */
745
- this.selectionChange = new EventEmitter();
746
- this.ngUnsubscribe = new Subject();
747
- }
748
- SkyDocsDemoControlPanelComponent.prototype.ngAfterContentInit = function () {
749
- var _this = this;
750
- this.addEventListeners();
751
- merge(this.checkboxes.changes, this.radioGroups.changes)
752
- .pipe(takeUntil(this.ngUnsubscribe))
753
- .subscribe(function () {
754
- _this.addEventListeners();
755
- });
756
- };
757
- SkyDocsDemoControlPanelComponent.prototype.ngOnDestroy = function () {
758
- this.reset.complete();
759
- this.selectionChange.complete();
760
- this.ngUnsubscribe.next();
761
- this.ngUnsubscribe.complete();
762
- };
763
- SkyDocsDemoControlPanelComponent.prototype.onResetButtonClick = function () {
764
- this.radioGroups.forEach(function (radioGroup) {
765
- radioGroup.resetValue();
766
- });
767
- this.checkboxes.forEach(function (checkbox) {
768
- checkbox.resetState();
769
- });
770
- this.reset.emit();
771
- };
772
- SkyDocsDemoControlPanelComponent.prototype.onThemeSettingsChange = function (themeSettings) {
773
- this.demoThemeSvc.themeSettings.next(themeSettings);
774
- };
775
- SkyDocsDemoControlPanelComponent.prototype.addEventListeners = function () {
776
- var _this = this;
777
- if (this.eventListeners) {
778
- this.eventListeners.unsubscribe();
779
- }
780
- this.eventListeners = merge.apply(void 0, __spread(this.checkboxes.map(function (c) { return c.selectionChange; }), this.radioGroups.map(function (c) { return c.selectionChange; }))).pipe(takeUntil(this.ngUnsubscribe))
781
- .subscribe(function (change) {
782
- _this.selectionChange.next(change);
783
- });
784
- };
785
- SkyDocsDemoControlPanelComponent.ctorParameters = function () { return [
786
- { type: SkyDocsDemoThemeService }
787
- ]; };
788
- __decorate([
789
- Output()
790
- ], SkyDocsDemoControlPanelComponent.prototype, "reset", void 0);
791
- __decorate([
792
- Output()
793
- ], SkyDocsDemoControlPanelComponent.prototype, "selectionChange", void 0);
794
- __decorate([
795
- ContentChildren(SkyDocsDemoControlPanelRadioGroupComponent, { descendants: true })
796
- ], SkyDocsDemoControlPanelComponent.prototype, "radioGroups", void 0);
797
- __decorate([
798
- ContentChildren(SkyDocsDemoControlPanelCheckboxComponent, { descendants: true })
799
- ], SkyDocsDemoControlPanelComponent.prototype, "checkboxes", void 0);
800
- SkyDocsDemoControlPanelComponent = __decorate([
801
- Component({
802
- selector: 'sky-docs-demo-control-panel',
803
- template: "<div class=\"sky-docs-demo-control-panel\">\n <div class=\"sky-docs-demo-control-panel-row sky-rounded-corners\">\n <div class=\"sky-docs-demo-control-panel-column sky-docs-demo-control-panel-sections-column\">\n <ng-content select=\"sky-docs-demo-control-panel-section\"></ng-content>\n </div>\n\n <div class=\"sky-docs-demo-control-panel-column sky-docs-demo-control-panel-button-column\">\n <button\n class=\"sky-btn sky-btn-link\"\n type=\"button\"\n [attr.data-test-selector]=\"'sky-docs-demo-control-panel-reset-button'\"\n (click)=\"onResetButtonClick()\"\n >\n {{ 'sky-docs-demo-control-panel-reset-button-label' | skyLibResources }}\n </button>\n </div>\n <ng-container *ngIf=\"demoThemeSvc.supportsTheming | async\">\n <sky-restricted-view>\n <div\n class=\"sky-docs-demo-control-panel-column sky-docs-demo-control-panel-theme-column\"\n >\n <sky-docs-demo-control-panel-theme\n (themeSettingsChange)=\"onThemeSettingsChange($event)\"\n ></sky-docs-demo-control-panel-theme>\n </div>\n </sky-restricted-view>\n </ng-container>\n </div>\n</div>\n",
804
- changeDetection: ChangeDetectionStrategy.OnPush,
805
- styles: [".sky-docs-demo-control-panel{margin-bottom:20px;margin-top:-1px;margin-left:-15px}.sky-docs-demo-control-panel-row{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;padding:15px;background-color:#fff;display:inline-flex;min-width:220px}.sky-docs-demo-control-panel-sections-column{display:flex}.sky-docs-demo-control-panel-sections-column ::ng-deep sky-docs-demo-control-panel-section{min-width:120px}.sky-docs-demo-control-panel-button-column{align-self:flex-end}.sky-docs-demo-control-panel-button-column .sky-btn{border:0}.sky-docs-demo-control-panel-theme-column{border-left:1px solid #cdcfd2;height:100%;padding-left:20px}"]
806
- })
807
- ], SkyDocsDemoControlPanelComponent);
808
- return SkyDocsDemoControlPanelComponent;
809
- }());
810
-
811
- /**
812
- * Wraps all behavior demo components and handles the configuration and appearance of the behavior demo.
813
- * @example
814
- * ```markup
815
- * <sky-docs-demo>
816
- * Demo content here.
817
- * </sky-docs-demo>
818
- * ```
819
- */
820
- var SkyDocsDemoComponent = /** @class */ (function () {
821
- function SkyDocsDemoComponent(demoThemeSvc) {
822
- this.demoThemeSvc = demoThemeSvc;
823
- this.areOptionsVisible = false;
824
- }
825
- Object.defineProperty(SkyDocsDemoComponent.prototype, "alignContents", {
826
- get: function () {
827
- return this._alignContents || 'left';
828
- },
829
- /**
830
- * Specifies the horizontal alignment of the demo contents.
831
- * @default 'left'
832
- */
833
- set: function (value) {
834
- this._alignContents = value;
835
- },
836
- enumerable: true,
837
- configurable: true
838
- });
839
- Object.defineProperty(SkyDocsDemoComponent.prototype, "supportsTheming", {
840
- set: function (value) {
841
- this.demoThemeSvc.supportsTheming.next(value);
842
- },
843
- enumerable: true,
844
- configurable: true
845
- });
846
- Object.defineProperty(SkyDocsDemoComponent.prototype, "hasOptions", {
847
- get: function () {
848
- return this.supportsTheming || (this.controlPanels && this.controlPanels.length > 0);
849
- },
850
- enumerable: true,
851
- configurable: true
852
- });
853
- Object.defineProperty(SkyDocsDemoComponent.prototype, "toggleOptionsButtonIcon", {
854
- get: function () {
855
- return (this.areOptionsVisible) ? 'chevron-up' : 'chevron-down';
856
- },
857
- enumerable: true,
858
- configurable: true
859
- });
860
- SkyDocsDemoComponent.prototype.onToggleOptionsButtonClick = function () {
861
- this.areOptionsVisible = !this.areOptionsVisible;
862
- };
863
- SkyDocsDemoComponent.ctorParameters = function () { return [
864
- { type: SkyDocsDemoThemeService }
865
- ]; };
866
- __decorate([
867
- Input()
868
- ], SkyDocsDemoComponent.prototype, "alignContents", null);
869
- __decorate([
870
- Input()
871
- ], SkyDocsDemoComponent.prototype, "heading", void 0);
872
- __decorate([
873
- Input()
874
- ], SkyDocsDemoComponent.prototype, "supportsTheming", null);
875
- __decorate([
876
- ContentChildren(SkyDocsDemoControlPanelComponent, { read: ElementRef })
877
- ], SkyDocsDemoComponent.prototype, "controlPanels", void 0);
878
- SkyDocsDemoComponent = __decorate([
879
- Component({
880
- selector: 'sky-docs-demo',
881
- template: "<div class=\"sky-docs-demo\">\n <div\n aria-level=\"3\"\n class=\"sky-docs-demo-heading\"\n role=\"heading\"\n >\n <span\n class=\"sky-section-heading\"\n [attr.data-test-selector]=\"'sky-docs-demo-heading-text'\"\n >\n {{ heading || ('sky-docs-demo-heading' | skyLibResources) }}\n </span>\n\n <div\n class=\"sky-docs-demo-control-panel-wrapper\"\n >\n <div\n class=\"sky-docs-demo-control-panel-wrapper-header\"\n >\n <button *ngIf=\"hasOptions\"\n class=\"sky-btn\"\n type=\"button\"\n [attr.data-test-selector]=\"'sky-docs-demo-heading-button'\"\n [ngClass]=\"{\n 'sky-docs-demo-heading-btn-open': areOptionsVisible\n }\"\n (click)=\"onToggleOptionsButtonClick()\"\n >\n <sky-icon\n [icon]=\"toggleOptionsButtonIcon\"\n ></sky-icon>\n <ng-container *ngIf=\"areOptionsVisible\">\n {{ 'sky-docs-demo-toggle-button-off' | skyLibResources }}\n </ng-container>\n <ng-container *ngIf=\"!areOptionsVisible\">\n {{ 'sky-docs-demo-toggle-button-on' | skyLibResources }}\n </ng-container>\n </button>\n </div>\n <div\n class=\"sky-docs-demo-control-panel-wrapper-body\"\n >\n <ng-container *ngIf=\"areOptionsVisible\">\n <ng-container *ngTemplateOutlet=\"controlPanels\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n\n <div\n class=\"sky-docs-demo-viewport\"\n [ngClass]=\"'sky-docs-demo-viewport-align-' + alignContents\"\n [skyTheme]=\"demoThemeSvc.themeSettings | async\"\n >\n <div class=\"sky-docs-demo-viewport-gutter\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<ng-template #controlPanels>\n <ng-content select=\"sky-docs-demo-control-panel\"></ng-content>\n</ng-template>\n",
882
- providers: [SkyDocsDemoThemeService],
883
- changeDetection: ChangeDetectionStrategy.OnPush,
884
- styles: [".sky-docs-demo{margin-bottom:20px}.sky-docs-demo-heading{margin-bottom:10px;display:flex;flex-direction:row}.sky-docs-demo-heading .sky-docs-demo-heading-btn-open{border-bottom-color:#fff;border-bottom-left-radius:0;border-bottom-right-radius:0;position:relative}.sky-docs-demo-control-panel-wrapper{display:flex;flex-direction:column}.sky-section-heading{margin-right:10px}.sky-docs-demo-viewport{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;margin-bottom:10px;padding:15px}.sky-docs-demo-viewport-align-center{display:flex;align-items:center;justify-content:center}"]
885
- })
886
- ], SkyDocsDemoComponent);
887
- return SkyDocsDemoComponent;
888
- }());
889
-
890
- /**
891
- * Renders a section within the control panel.
892
- * @example
893
- * ```markup
894
- * <sky-docs-demo-control-panel>
895
- * <sky-docs-demo-control-panel-section>
896
- * Section content here.
897
- * </sky-docs-demo-control-panel-section>
898
- * </sky-docs-demo-control-panel>
899
- * ```
900
- */
901
- var SkyDocsDemoControlPanelSectionComponent = /** @class */ (function () {
902
- function SkyDocsDemoControlPanelSectionComponent() {
903
- }
904
- SkyDocsDemoControlPanelSectionComponent = __decorate([
905
- Component({
906
- selector: 'sky-docs-demo-control-panel-section',
907
- template: "<div\n class=\"sky-demo-control-panel-section\"\n>\n <ng-content select=\"sky-docs-demo-control-panel-radio-group\"></ng-content>\n <ng-content select=\"sky-docs-demo-control-panel-checkbox\"></ng-content>\n <ng-content select=\"sky-docs-demo-control-panel-theme\"></ng-content>\n</div>\n",
908
- changeDetection: ChangeDetectionStrategy.OnPush,
909
- styles: [".sky-demo-control-panel-section{padding-right:20px}"]
910
- })
911
- ], SkyDocsDemoControlPanelSectionComponent);
912
- return SkyDocsDemoControlPanelSectionComponent;
913
- }());
914
-
915
- var SkyDocsDemoControlPanelThemeComponent = /** @class */ (function () {
916
- function SkyDocsDemoControlPanelThemeComponent(changeDetector, themeSvc) {
917
- var _this = this;
918
- this.changeDetector = changeDetector;
919
- this.themeSvc = themeSvc;
920
- this.themeSettingsChange = new EventEmitter();
921
- this.ngUnsubscribe = new Subject();
922
- this._mode = 'light';
923
- this._theme = 'default';
924
- // Update theme property with SkyThemeService if it has not been set.
925
- if (this.themeSvc) {
926
- this.themeSvc.settingsChange
927
- .pipe(takeUntil(this.ngUnsubscribe))
928
- .subscribe(function (change) {
929
- if (change.currentSettings.theme.name !== _this.theme) {
930
- _this.theme = change.currentSettings.theme.name;
931
- }
932
- if (change.currentSettings.mode.name !== _this.mode) {
933
- _this.mode = change.currentSettings.mode.name;
934
- }
935
- _this.changeDetector.markForCheck();
936
- });
937
- }
938
- }
939
- Object.defineProperty(SkyDocsDemoControlPanelThemeComponent.prototype, "mode", {
940
- get: function () {
941
- return this._mode;
942
- },
943
- set: function (value) {
944
- this._mode = value;
945
- this.updateTheme();
946
- },
947
- enumerable: true,
948
- configurable: true
949
- });
950
- Object.defineProperty(SkyDocsDemoControlPanelThemeComponent.prototype, "theme", {
951
- get: function () {
952
- return this._theme;
953
- },
954
- set: function (value) {
955
- this._theme = value;
956
- this.updateModesForTheme();
957
- this.updateTheme();
958
- },
959
- enumerable: true,
960
- configurable: true
961
- });
962
- SkyDocsDemoControlPanelThemeComponent.prototype.ngOnInit = function () {
963
- var _this = this;
964
- this.themeOptions = Object.keys(SkyTheme.presets).map(function (key) { return _this.createRadioItem(key); });
965
- this.updateModesForTheme();
966
- this.updateTheme();
967
- };
968
- SkyDocsDemoControlPanelThemeComponent.prototype.ngOnDestroy = function () {
969
- this.ngUnsubscribe.next();
970
- this.ngUnsubscribe.complete();
971
- };
972
- SkyDocsDemoControlPanelThemeComponent.prototype.updateModesForTheme = function () {
973
- var _this = this;
974
- var selectedTheme = this.getThemeByName(this.theme);
975
- this.modeOptions = selectedTheme.supportedModes
976
- .map(function (supportedMode) { return _this.createRadioItem(supportedMode.name); });
977
- if (!this.modeOptions.some(function (item) { return item.value === _this.mode; })) {
978
- this.mode = this.modeOptions[0].value;
979
- }
980
- };
981
- SkyDocsDemoControlPanelThemeComponent.prototype.createRadioItem = function (name) {
982
- return {
983
- label: this.capitalize(name),
984
- value: name
985
- };
986
- };
987
- SkyDocsDemoControlPanelThemeComponent.prototype.capitalize = function (name) {
988
- return name.charAt(0).toUpperCase() + name.substr(1);
989
- };
990
- SkyDocsDemoControlPanelThemeComponent.prototype.getThemeSettings = function () {
991
- return new SkyThemeSettings(this.getThemeByName(this.theme), this.getModeByName(this.mode));
992
- };
993
- SkyDocsDemoControlPanelThemeComponent.prototype.getThemeByName = function (name) {
994
- var themePresets = SkyTheme.presets;
995
- return themePresets[name];
996
- };
997
- SkyDocsDemoControlPanelThemeComponent.prototype.getModeByName = function (name) {
998
- var modePresets = SkyThemeMode.presets;
999
- return modePresets[name];
1000
- };
1001
- SkyDocsDemoControlPanelThemeComponent.prototype.updateTheme = function () {
1002
- this.themeSettingsChange.emit(this.getThemeSettings());
1003
- };
1004
- SkyDocsDemoControlPanelThemeComponent.ctorParameters = function () { return [
1005
- { type: ChangeDetectorRef },
1006
- { type: SkyThemeService, decorators: [{ type: Optional }] }
1007
- ]; };
1008
- __decorate([
1009
- Output()
1010
- ], SkyDocsDemoControlPanelThemeComponent.prototype, "themeSettingsChange", void 0);
1011
- SkyDocsDemoControlPanelThemeComponent = __decorate([
1012
- Component({
1013
- selector: 'sky-docs-demo-control-panel-theme',
1014
- template: "<strong>Theme</strong>\n<sky-radio-group\n name=\"theme\"\n [(ngModel)]=\"theme\"\n>\n <ul\n class=\"sky-list-unstyled\"\n >\n <li *ngFor=\"let themeOption of themeOptions\">\n <sky-radio\n [value]=\"themeOption.value\"\n >\n <sky-radio-label>{{ themeOption.label }}</sky-radio-label>\n </sky-radio>\n </li>\n </ul>\n</sky-radio-group>\n\n<strong>Mode</strong>\n<sky-radio-group\n name=\"mode\"\n [(ngModel)]=\"mode\"\n>\n <ul\n class=\"sky-list-unstyled\"\n >\n <li *ngFor=\"let modeOption of modeOptions\">\n <sky-radio\n [value]=\"modeOption.value\"\n >\n <sky-radio-label>{{ modeOption.label }}</sky-radio-label>\n </sky-radio>\n </li>\n </ul>\n</sky-radio-group>\n",
1015
- changeDetection: ChangeDetectionStrategy.OnPush,
1016
- styles: ["ul{margin:0}"]
1017
- }),
1018
- __param(1, Optional())
1019
- ], SkyDocsDemoControlPanelThemeComponent);
1020
- return SkyDocsDemoControlPanelThemeComponent;
1021
- }());
1022
-
1023
- var SkyDocsDemoModule = /** @class */ (function () {
1024
- function SkyDocsDemoModule() {
1025
- }
1026
- SkyDocsDemoModule = __decorate([
1027
- NgModule({
1028
- imports: [
1029
- CommonModule,
1030
- FormsModule,
1031
- SkyCheckboxModule,
1032
- SkyDocsToolsResourcesModule,
1033
- SkyIconModule,
1034
- SkyRadioModule,
1035
- SkyRestrictedViewModule,
1036
- SkyThemeModule
1037
- ],
1038
- declarations: [
1039
- SkyDocsDemoComponent,
1040
- SkyDocsDemoControlPanelCheckboxComponent,
1041
- SkyDocsDemoControlPanelComponent,
1042
- SkyDocsDemoControlPanelRadioGroupComponent,
1043
- SkyDocsDemoControlPanelSectionComponent,
1044
- SkyDocsDemoControlPanelThemeComponent
1045
- ],
1046
- exports: [
1047
- SkyDocsDemoComponent,
1048
- SkyDocsDemoControlPanelCheckboxComponent,
1049
- SkyDocsDemoControlPanelComponent,
1050
- SkyDocsDemoControlPanelRadioGroupComponent,
1051
- SkyDocsDemoControlPanelSectionComponent,
1052
- SkyDocsDemoControlPanelThemeComponent
1053
- ]
1054
- })
1055
- ], SkyDocsDemoModule);
1056
- return SkyDocsDemoModule;
1057
- }());
1058
-
1059
- var SkyDocsHeadingAnchorComponent = /** @class */ (function () {
1060
- function SkyDocsHeadingAnchorComponent() {
1061
- this.headingLevel = '2';
1062
- }
1063
- __decorate([
1064
- Input()
1065
- ], SkyDocsHeadingAnchorComponent.prototype, "anchorId", void 0);
1066
- __decorate([
1067
- Input()
1068
- ], SkyDocsHeadingAnchorComponent.prototype, "headingLevel", void 0);
1069
- SkyDocsHeadingAnchorComponent = __decorate([
1070
- Component({
1071
- selector: 'sky-docs-heading-anchor',
1072
- template: "<div\n class=\"sky-docs-heading-anchor\"\n role=\"heading\"\n [ngClass]=\"'sky-docs-tools-heading-anchor-h' + headingLevel\"\n [attr.aria-level]=\"headingLevel\"\n [attr.id]=\"anchorId || null\"\n>\n <ng-content></ng-content>\n <a *ngIf=\"anchorId\"\n aria-hidden=\"true\"\n class=\"sky-docs-heading-anchor\"\n queryParamsHandling=\"merge\"\n [fragment]=\"anchorId\"\n [routerLink]=\"[]\"\n >\n <sky-icon\n class=\"sky-docs-heading-anchor-icon\"\n icon=\"link\"\n ></sky-icon>\n </a>\n</div>",
1073
- changeDetection: ChangeDetectionStrategy.OnPush,
1074
- styles: [".sky-docs-heading-anchor{color:#212327}.sky-docs-heading-anchor:hover{text-decoration:none}.sky-docs-heading-anchor:focus .sky-docs-heading-anchor-icon,.sky-docs-heading-anchor:hover .sky-docs-heading-anchor-icon{opacity:1}.sky-docs-heading-anchor-icon{opacity:0;transition:opacity .15s ease-in-out;color:#0974a1;font-weight:400;font-size:18px}.sky-docs-tools-heading-anchor-h1,.sky-docs-tools-heading-anchor-h2,.sky-docs-tools-heading-anchor-h3,.sky-docs-tools-heading-anchor-h4,.sky-docs-tools-heading-anchor-h5,.sky-docs-tools-heading-anchor-h6{line-height:1.1;font-family:\"Blackbaud Sans\",\"Helvetica Neue\",Arial,sans-serif;color:#212327;font-weight:400;margin:30px 0 15px}.sky-docs-tools-heading-anchor-h1{line-height:1.1;font-family:\"Blackbaud Sans\",\"Helvetica Neue\",Arial,sans-serif;color:#212327;margin:30px 0 15px;font-weight:300;font-size:34px}.sky-docs-tools-heading-anchor-h2{line-height:1.1;font-family:\"Blackbaud Sans\",\"Helvetica Neue\",Arial,sans-serif;color:#212327;margin:30px 0;font-weight:300;font-size:26px}.sky-docs-tools-heading-anchor-h3{line-height:1.1;font-family:\"Blackbaud Sans\",\"Helvetica Neue\",Arial,sans-serif;color:#212327;margin:30px 0 15px;font-size:19px;font-weight:400}.sky-docs-tools-heading-anchor-h4{line-height:1.1;font-family:\"Blackbaud Sans\",\"Helvetica Neue\",Arial,sans-serif;color:#212327;margin:0 0 10px;font-weight:600;font-size:15px}"]
1075
- })
1076
- ], SkyDocsHeadingAnchorComponent);
1077
- return SkyDocsHeadingAnchorComponent;
1078
- }());
1079
-
1080
- var SkyDocsHeadingAnchorModule = /** @class */ (function () {
1081
- function SkyDocsHeadingAnchorModule() {
1082
- }
1083
- SkyDocsHeadingAnchorModule = __decorate([
1084
- NgModule({
1085
- declarations: [
1086
- SkyDocsHeadingAnchorComponent
1087
- ],
1088
- imports: [
1089
- CommonModule,
1090
- RouterModule,
1091
- SkyIconModule
1092
- ],
1093
- exports: [
1094
- SkyDocsHeadingAnchorComponent
1095
- ]
1096
- })
1097
- ], SkyDocsHeadingAnchorModule);
1098
- return SkyDocsHeadingAnchorModule;
1099
- }());
1100
-
1101
- var SkyDocsMarkdownPipe = /** @class */ (function () {
1102
- function SkyDocsMarkdownPipe() {
1103
- }
1104
- SkyDocsMarkdownPipe.prototype.transform = function (markdown) {
1105
- if (!markdown) {
1106
- return '';
1107
- }
1108
- return marked(markdown);
1109
- };
1110
- SkyDocsMarkdownPipe = __decorate([
1111
- Pipe({
1112
- name: 'skyDocsMarkdown'
1113
- })
1114
- ], SkyDocsMarkdownPipe);
1115
- return SkyDocsMarkdownPipe;
1116
- }());
1117
-
1118
- var SkyDocsMarkdownModule = /** @class */ (function () {
1119
- function SkyDocsMarkdownModule() {
1120
- }
1121
- SkyDocsMarkdownModule = __decorate([
1122
- NgModule({
1123
- declarations: [
1124
- SkyDocsMarkdownPipe
1125
- ],
1126
- providers: [
1127
- SkyDocsMarkdownPipe
1128
- ],
1129
- exports: [
1130
- SkyDocsMarkdownPipe
1131
- ]
1132
- })
1133
- ], SkyDocsMarkdownModule);
1134
- return SkyDocsMarkdownModule;
1135
- }());
1136
-
1137
- var SkyDocsToolsOptions = /** @class */ (function () {
1138
- function SkyDocsToolsOptions() {
1139
- }
1140
- return SkyDocsToolsOptions;
1141
- }());
1142
-
1143
- var SkyDocsModuleInfoComponent = /** @class */ (function () {
1144
- function SkyDocsModuleInfoComponent(options) {
1145
- this.options = options;
1146
- }
1147
- Object.defineProperty(SkyDocsModuleInfoComponent.prototype, "gitRepoUrl", {
1148
- get: function () {
1149
- return this._gitRepoUrl || this.options && this.options.gitRepoUrl;
1150
- },
1151
- set: function (value) {
1152
- this._gitRepoUrl = value;
1153
- },
1154
- enumerable: true,
1155
- configurable: true
1156
- });
1157
- Object.defineProperty(SkyDocsModuleInfoComponent.prototype, "packageName", {
1158
- get: function () {
1159
- return this._packageName || this.options && this.options.packageName;
1160
- },
1161
- set: function (value) {
1162
- this._packageName = value;
1163
- },
1164
- enumerable: true,
1165
- configurable: true
1166
- });
1167
- Object.defineProperty(SkyDocsModuleInfoComponent.prototype, "packageUrl", {
1168
- get: function () {
1169
- if (this._packageUrl) {
1170
- return this._packageUrl;
1171
- }
1172
- if (this.packageName) {
1173
- return "https://npmjs.org/package/" + this.packageName;
1174
- }
1175
- return '';
1176
- },
1177
- set: function (value) {
1178
- this._packageUrl = value;
1179
- },
1180
- enumerable: true,
1181
- configurable: true
1182
- });
1183
- Object.defineProperty(SkyDocsModuleInfoComponent.prototype, "externalLinks", {
1184
- get: function () {
1185
- var externalLinks = [];
1186
- if (this.packageName) {
1187
- externalLinks.push({
1188
- url: this.packageUrl,
1189
- label: 'View in NPM'
1190
- });
1191
- }
1192
- if (this.gitRepoUrl) {
1193
- externalLinks.push({
1194
- url: this.gitRepoUrl,
1195
- label: 'View in GitHub'
1196
- });
1197
- }
1198
- return externalLinks;
1199
- },
1200
- enumerable: true,
1201
- configurable: true
1202
- });
1203
- Object.defineProperty(SkyDocsModuleInfoComponent.prototype, "installationCommand", {
1204
- get: function () {
1205
- if (!this.packageName) {
1206
- return '';
1207
- }
1208
- return "npm install --save-exact " + this.packageName;
1209
- },
1210
- enumerable: true,
1211
- configurable: true
1212
- });
1213
- SkyDocsModuleInfoComponent.ctorParameters = function () { return [
1214
- { type: SkyDocsToolsOptions, decorators: [{ type: Optional }] }
1215
- ]; };
1216
- __decorate([
1217
- Input()
1218
- ], SkyDocsModuleInfoComponent.prototype, "gitRepoUrl", null);
1219
- __decorate([
1220
- Input()
1221
- ], SkyDocsModuleInfoComponent.prototype, "moduleName", void 0);
1222
- __decorate([
1223
- Input()
1224
- ], SkyDocsModuleInfoComponent.prototype, "packageName", null);
1225
- __decorate([
1226
- Input()
1227
- ], SkyDocsModuleInfoComponent.prototype, "packageUrl", null);
1228
- SkyDocsModuleInfoComponent = __decorate([
1229
- Component({
1230
- selector: 'sky-docs-module-info',
1231
- template: "<div class=\"sky-docs-module-info\">\n <sky-definition-list\n defaultValue=\"\"\n labelWidth=\"120px\"\n >\n <sky-definition-list-content *ngIf=\"moduleName\">\n <sky-definition-list-label>\n Defined in\n </sky-definition-list-label>\n <sky-definition-list-value>\n <sky-code>{{ moduleName }}</sky-code>\n </sky-definition-list-value>\n </sky-definition-list-content>\n <sky-definition-list-content *ngIf=\"packageName\">\n <sky-definition-list-label>\n NPM package\n </sky-definition-list-label>\n <sky-definition-list-value>\n <span class=\"sky-docs-module-info-package-name\"><sky-code>{{ packageName }}</sky-code></span>\n <ng-container *ngFor=\"let externalLink of externalLinks; let i = index;\">\n <a [attr.href]=\"externalLink.url\">{{ externalLink.label }}</a>\n <ng-container *ngIf=\"i < externalLinks.length - 1\">&nbsp;| </ng-container>\n </ng-container>\n </sky-definition-list-value>\n </sky-definition-list-content>\n\n <sky-definition-list-content *ngIf=\"installationCommand\">\n <sky-definition-list-label>\n Installation\n <sky-help-inline\n [skyPopover]=\"installationCommandPopover\"\n skyPopoverPlacement=\"right\"\n >\n </sky-help-inline>\n </sky-definition-list-label>\n <sky-definition-list-value>\n <sky-popover #installationCommandPopover>\n To use this module, you must install peer dependencies along with its package. Also, after you install the package, you must add the module as an export in your SPA's main module to make exports available to your SPA. If you use the SKY UX SDK, the main module is <sky-code>app-sky.module.ts</sky-code>.\n </sky-popover>\n <div class=\"sky-docs-module-info-installation-command\">\n <span class=\"sky-docs-module-info-installation-command-code\" #copyTarget>\n <sky-code>{{ installationCommand }}</sky-code>\n </span>\n <sky-copy-to-clipboard\n buttonText=\"Copy\"\n [copyTarget]=\"copyTarget\"\n ></sky-copy-to-clipboard>\n </div>\n </sky-definition-list-value>\n </sky-definition-list-content>\n </sky-definition-list>\n\n <div\n class=\"sky-docs-module-info-additional-content\"\n >\n <ng-content></ng-content>\n </div>\n</div>\n",
1232
- changeDetection: ChangeDetectionStrategy.OnPush,
1233
- styles: [".sky-docs-module-info-installation-command{display:flex}.sky-docs-module-info-installation-command-code,.sky-docs-module-info-package-name{margin-right:10px}"]
1234
- }),
1235
- __param(0, Optional())
1236
- ], SkyDocsModuleInfoComponent);
1237
- return SkyDocsModuleInfoComponent;
1238
- }());
1239
-
1240
- var SkyDocsModuleInfoModule = /** @class */ (function () {
1241
- function SkyDocsModuleInfoModule() {
1242
- }
1243
- SkyDocsModuleInfoModule = __decorate([
1244
- NgModule({
1245
- imports: [
1246
- CommonModule,
1247
- SkyCodeModule,
1248
- SkyClipboardModule,
1249
- SkyDefinitionListModule,
1250
- SkyHelpInlineModule,
1251
- SkyPopoverModule
1252
- ],
1253
- declarations: [
1254
- SkyDocsModuleInfoComponent
1255
- ],
1256
- exports: [
1257
- SkyDocsModuleInfoComponent
1258
- ]
1259
- })
1260
- ], SkyDocsModuleInfoModule);
1261
- return SkyDocsModuleInfoModule;
1262
- }());
1263
-
1264
- var SkyDocsSafeHtmlComponent = /** @class */ (function () {
1265
- function SkyDocsSafeHtmlComponent(domSanitizer) {
1266
- this.domSanitizer = domSanitizer;
1267
- }
1268
- SkyDocsSafeHtmlComponent.prototype.getTrustedHtml = function (content) {
1269
- return this.domSanitizer.bypassSecurityTrustHtml(content);
1270
- };
1271
- SkyDocsSafeHtmlComponent.ctorParameters = function () { return [
1272
- { type: DomSanitizer }
1273
- ]; };
1274
- __decorate([
1275
- Input()
1276
- ], SkyDocsSafeHtmlComponent.prototype, "innerHtml", void 0);
1277
- SkyDocsSafeHtmlComponent = __decorate([
1278
- Component({
1279
- selector: 'sky-docs-safe-html',
1280
- template: "<div\n class=\"sky-docs-safe-html\"\n [innerHtml]=\"getTrustedHtml(innerHtml)\"\n></div>",
1281
- changeDetection: ChangeDetectionStrategy.OnPush
1282
- })
1283
- ], SkyDocsSafeHtmlComponent);
1284
- return SkyDocsSafeHtmlComponent;
1285
- }());
1286
-
1287
- var SkyDocsSafeHtmlModule = /** @class */ (function () {
1288
- function SkyDocsSafeHtmlModule() {
1289
- }
1290
- SkyDocsSafeHtmlModule = __decorate([
1291
- NgModule({
1292
- declarations: [
1293
- SkyDocsSafeHtmlComponent
1294
- ],
1295
- imports: [
1296
- CommonModule
1297
- ],
1298
- exports: [
1299
- SkyDocsSafeHtmlComponent
1300
- ]
1301
- })
1302
- ], SkyDocsSafeHtmlModule);
1303
- return SkyDocsSafeHtmlModule;
1304
- }());
1305
-
1306
- var SkyDocsTypeDefinitionsProvider = /** @class */ (function () {
1307
- function SkyDocsTypeDefinitionsProvider() {
1308
- }
1309
- SkyDocsTypeDefinitionsProvider = __decorate([
1310
- Injectable()
1311
- ], SkyDocsTypeDefinitionsProvider);
1312
- return SkyDocsTypeDefinitionsProvider;
1313
- }());
1314
-
1315
- /**
1316
- * Finds any type name that is NOT surrounded by alpha-numeric (and '>', '<', '.') characters.
1317
- * (This is to avoid matching types that share similar words, such as `Foo` and `FooUser`.)
1318
- * Notes:
1319
- * - If the type name is surrounded by angle brackets, then it has already been processed as a link.
1320
- * - If the type name starts with a period '.', then it is a sub property of an enumeration, etc. and should not be processed as a link.
1321
- * - If the type name ends with a period followed immediately by any word character, then it is a method or property (Foo.bar).
1322
- * Only the type name should be processed as a link.
1323
- */
1324
- function createRegex(keyword) {
1325
- return new RegExp("(^|[^a-zA-Z0-9>.[/])(" + keyword + ")(\\.\\w+)?(?=[^a-zA-Z0-9<]+|$)", 'g');
1326
- }
1327
- var SkyDocsAnchorLinkService = /** @class */ (function () {
1328
- function SkyDocsAnchorLinkService(typeDefinitionsProvider) {
1329
- this.anchorIds = typeDefinitionsProvider.anchorIds;
1330
- }
1331
- /**
1332
- * Formats known type names with `<code>` tags and wraps them with anchor tags, linking to the appropriate type.
1333
- * If the content is already contained within a `<code>` tag, set `codeFormat = false` to prevent extra `<code>` tags from being added.
1334
- */
1335
- SkyDocsAnchorLinkService.prototype.applyTypeAnchorLinks = function (content, config) {
1336
- var _this = this;
1337
- if (!this.anchorIds || !content) {
1338
- return content;
1339
- }
1340
- // Set default for code formatting.
1341
- if (!config) {
1342
- config = {
1343
- applyCodeFormatting: true
1344
- };
1345
- }
1346
- content = this.removeDoubleSquareBrackets(content);
1347
- Object.keys(this.anchorIds).forEach(function (typeName) {
1348
- content = _this.removeBackticks(typeName, content);
1349
- var matches;
1350
- var counter = 0;
1351
- var max = 100;
1352
- var regex = createRegex(typeName);
1353
- do {
1354
- matches = regex.exec(content);
1355
- if (matches) {
1356
- var anchorId = _this.anchorIds[typeName];
1357
- var anchorHtml = '<a class="sky-docs-anchor-link" href="#' + anchorId + '">' + typeName + '</a>';
1358
- // Group 3 of the regex pattern captures type properties like Foo.bar.
1359
- // If these are found, they do not need hyperlinked, but add them to the encapsulating code tag.
1360
- var typeProperty = (matches[3] ? matches[3] : '');
1361
- var replacement = void 0;
1362
- if (config.applyCodeFormatting) {
1363
- replacement = '<code>' + anchorHtml + typeProperty + '</code>';
1364
- }
1365
- else {
1366
- replacement = anchorHtml + typeProperty;
1367
- }
1368
- // Regex Positive lookbehinds aren't supported in IE11 and Safari, so we have to check if the match has a starting extra character
1369
- // (usually whitespace " Foo"), and then modify the starting/ending indexes to account for the extra character.
1370
- var isMatchExact = matches[0].substr(0, typeName.length) === typeName;
1371
- var startIndex = isMatchExact ? matches.index : matches.index + 1;
1372
- var endIndex = isMatchExact ? matches[0].length : matches[0].length - 1;
1373
- var contentWithCodeTags = content.substr(0, startIndex) + replacement + content.substr(startIndex + endIndex);
1374
- content = contentWithCodeTags;
1375
- counter++;
1376
- }
1377
- } while (matches !== null && counter < max);
1378
- });
1379
- return content;
1380
- };
1381
- /**
1382
- * For backwards compatibility, we need to remove any double brackets wrapped around types.
1383
- * e.g., `[[SampleType]]`
1384
- */
1385
- SkyDocsAnchorLinkService.prototype.removeDoubleSquareBrackets = function (content) {
1386
- var match = content.match(/\[\[.*\]\]/);
1387
- if (match) {
1388
- var typeName = match[0].replace(/\[\[/g, '').replace(/\]\]/g, '');
1389
- content = content.replace(match[0], typeName);
1390
- }
1391
- return content;
1392
- };
1393
- /**
1394
- * Removes backtick characters around known types to prevent
1395
- * the markdown pipe from wrapping them with code elements.
1396
- */
1397
- SkyDocsAnchorLinkService.prototype.removeBackticks = function (typeName, content) {
1398
- var regexp = new RegExp("`(" + typeName + ")`", 'g');
1399
- return content.replace(regexp, typeName);
1400
- };
1401
- SkyDocsAnchorLinkService.ctorParameters = function () { return [
1402
- { type: SkyDocsTypeDefinitionsProvider }
1403
- ]; };
1404
- SkyDocsAnchorLinkService = __decorate([
1405
- Injectable()
1406
- ], SkyDocsAnchorLinkService);
1407
- return SkyDocsAnchorLinkService;
1408
- }());
1409
-
1410
- /**
1411
- * Formats type definitions into HTML-compatible strings.
1412
- */
1413
- var SkyDocsTypeDefinitionsFormatService = /** @class */ (function () {
1414
- function SkyDocsTypeDefinitionsFormatService() {
1415
- }
1416
- /**
1417
- * Returns an HTML-formatted representation of the provided interface config.
1418
- */
1419
- SkyDocsTypeDefinitionsFormatService.prototype.getInterfaceSourceCode = function (definition) {
1420
- var typeParameters = this.getFormattedTypeParameters(definition.typeParameters);
1421
- var config = {
1422
- escapeSpecialCharacters: false
1423
- };
1424
- var signature = "interface " + definition.name + typeParameters + " {";
1425
- signature += this.getFormattedInterfaceProperties(definition, config);
1426
- signature += '\n}';
1427
- return signature;
1428
- };
1429
- /**
1430
- * Returns an HTML-formatted representation of the provided method config.
1431
- */
1432
- SkyDocsTypeDefinitionsFormatService.prototype.getMethodSourceCode = function (definition) {
1433
- var _this = this;
1434
- var config = {
1435
- escapeSpecialCharacters: false
1436
- };
1437
- var typeArguments = this.getFormattedTypeArguments(definition.type, config);
1438
- var callSignature = definition.type.callSignature;
1439
- var returnType = this.getFormattedType(callSignature.returnType, config);
1440
- var params = '';
1441
- if (callSignature.parameters) {
1442
- params += callSignature.parameters
1443
- .map(function (p) { return _this.getFormattedParameterName(p, config); })
1444
- .join(', ');
1445
- }
1446
- return "public " + definition.name + typeArguments + "(" + params + "): " + returnType;
1447
- };
1448
- /**
1449
- * Returns an HTML-formatted representation of the provided type alias config.
1450
- */
1451
- SkyDocsTypeDefinitionsFormatService.prototype.getTypeAliasSourceCode = function (definition) {
1452
- var config = {
1453
- escapeSpecialCharacters: false
1454
- };
1455
- var typeParameters = this.getFormattedTypeParameters(definition.typeParameters);
1456
- var signature = "type " + definition.name + typeParameters + " = ";
1457
- if (definition.type.callSignature) {
1458
- signature += this.getFormattedCallSignature(definition.type.callSignature, {
1459
- escapeSpecialCharacters: false
1460
- });
1461
- }
1462
- else if (definition.type.indexSignature) {
1463
- var indexSignature = definition.type.indexSignature;
1464
- var type = this.getFormattedType(indexSignature.type, {
1465
- escapeSpecialCharacters: false
1466
- });
1467
- signature += "{\n [" + indexSignature.key.name + ": string]: " + type + ";\n}";
1468
- }
1469
- else {
1470
- /*istanbul ignore else */
1471
- if (definition.type.type === 'union') {
1472
- signature += this.getFormattedUnion(definition.type, config);
1473
- }
1474
- }
1475
- return signature;
1476
- };
1477
- /**
1478
- * Returns a formatted string representing a parameter's name and value. For example: `'foo: string'`.
1479
- */
1480
- SkyDocsTypeDefinitionsFormatService.prototype.getFormattedParameterName = function (parameter, config) {
1481
- if (config === void 0) { config = {
1482
- escapeSpecialCharacters: true
1483
- }; }
1484
- var optionalMarker = (parameter.isOptional) ? '?' : '';
1485
- var parameterType = this.getFormattedType(parameter.type, config);
1486
- var signature = "" + parameter.name + optionalMarker + ": " + parameterType;
1487
- if (config.escapeSpecialCharacters) {
1488
- signature = this.escapeSpecialCharacters(signature);
1489
- }
1490
- return signature;
1491
- };
1492
- /**
1493
- * Returns a formatted string representing a property (or method's) name and value. For example: `'public foo: string'`.
1494
- */
1495
- SkyDocsTypeDefinitionsFormatService.prototype.getFormattedPropertyName = function (property) {
1496
- var _a, _b;
1497
- var signature = '';
1498
- if ((_a = property.decorator) === null || _a === void 0 ? void 0 : _a.name) {
1499
- signature += "@" + property.decorator.name + "()<br>";
1500
- }
1501
- var indexSignature = (_b = property.type) === null || _b === void 0 ? void 0 : _b.indexSignature;
1502
- var name;
1503
- if (indexSignature) {
1504
- name = "[" + indexSignature.key.name + ": " + this.getFormattedType(indexSignature.key.type) + "]";
1505
- }
1506
- else {
1507
- name = property.name;
1508
- }
1509
- if (property.deprecationWarning !== undefined) {
1510
- signature += "<strike>" + name + "</strike>";
1511
- }
1512
- else {
1513
- signature += name;
1514
- }
1515
- if (property.isOptional && !indexSignature) {
1516
- signature += '?';
1517
- }
1518
- if (indexSignature) {
1519
- signature += ": " + this.getFormattedType(indexSignature.type);
1520
- }
1521
- else if (property.type) {
1522
- signature += ": " + this.getFormattedType(property.type);
1523
- }
1524
- return signature;
1525
- };
1526
- /**
1527
- * Returns an HTML-formatted method name to be used on the properties table.
1528
- */
1529
- SkyDocsTypeDefinitionsFormatService.prototype.getFormattedMethodName = function (definition) {
1530
- var formatted = '';
1531
- if (definition.deprecationWarning !== undefined) {
1532
- formatted += "<strike>" + definition.name + "</strike>";
1533
- }
1534
- else {
1535
- formatted += definition.name;
1536
- }
1537
- return formatted + "()";
1538
- };
1539
- /**
1540
- * Returns a formatted string representing the provided type.
1541
- */
1542
- SkyDocsTypeDefinitionsFormatService.prototype.getFormattedType = function (type, config) {
1543
- if (config === void 0) { config = {
1544
- escapeSpecialCharacters: true
1545
- }; }
1546
- var formatted = 'any';
1547
- if (!type) {
1548
- return formatted;
1549
- }
1550
- if (type.callSignature) {
1551
- return this.getFormattedCallSignature(type.callSignature, config);
1552
- }
1553
- if (type.unionTypes) {
1554
- return this.getFormattedUnion(type, config);
1555
- }
1556
- if (type.name) {
1557
- formatted = type.name;
1558
- }
1559
- if (type.typeArguments) {
1560
- formatted += this.getFormattedTypeArguments(type, config);
1561
- }
1562
- if (type.type === 'array') {
1563
- formatted += '[]';
1564
- }
1565
- if (type.typeLiteral) {
1566
- var formattedTypeLiteral = this.getFormattedInterfaceProperties(type.typeLiteral, config)
1567
- .replace(/\n/g, ' ')
1568
- .replace(/\s\s+/g, ' ');
1569
- formatted = "{" + formattedTypeLiteral + " }";
1570
- }
1571
- if (config.escapeSpecialCharacters) {
1572
- return this.escapeSpecialCharacters(formatted);
1573
- }
1574
- return formatted;
1575
- };
1576
- SkyDocsTypeDefinitionsFormatService.prototype.escapeSpecialCharacters = function (value) {
1577
- return value.replace(/</g, '&lt;').replace(/>/g, '&gt;');
1578
- };
1579
- SkyDocsTypeDefinitionsFormatService.prototype.getFormattedCallSignature = function (callSignature, config) {
1580
- var _this = this;
1581
- if (config === void 0) { config = {
1582
- escapeSpecialCharacters: true
1583
- }; }
1584
- var returnType = this.getFormattedType(callSignature.returnType, config);
1585
- if (!callSignature.parameters) {
1586
- return "() => " + returnType;
1587
- }
1588
- var formattedParams = callSignature.parameters
1589
- .map(function (p) { return _this.getFormattedParameterName(p, config); })
1590
- .join(', ');
1591
- return "(" + formattedParams + ") => " + returnType;
1592
- };
1593
- SkyDocsTypeDefinitionsFormatService.prototype.getFormattedUnion = function (typeConfig, config) {
1594
- var _this = this;
1595
- return typeConfig.unionTypes.map(function (t) {
1596
- return _this.getFormattedType(t, config);
1597
- }).join(' | ');
1598
- };
1599
- /**
1600
- * Parse any type arguments e.g. `<T, F>`.
1601
- */
1602
- SkyDocsTypeDefinitionsFormatService.prototype.getFormattedTypeArguments = function (typeConfig, config) {
1603
- var _this = this;
1604
- if (!typeConfig.typeArguments) {
1605
- return '';
1606
- }
1607
- var typeArguments = typeConfig.typeArguments.map(function (typeArgument) {
1608
- if (typeArgument.type === 'array') {
1609
- return typeArgument.name + "[]";
1610
- }
1611
- if (typeArgument.unionTypes) {
1612
- return _this.getFormattedUnion(typeArgument, config);
1613
- }
1614
- return typeArgument.name;
1615
- });
1616
- return "<" + typeArguments.join(', ') + ">";
1617
- };
1618
- SkyDocsTypeDefinitionsFormatService.prototype.getFormattedTypeParameters = function (typeParameters) {
1619
- if (!typeParameters) {
1620
- return '';
1621
- }
1622
- var formatted = typeParameters.map(function (typeParameter) {
1623
- var result = typeParameter.name;
1624
- if (typeParameter.type && typeParameter.type.type === 'reference') {
1625
- result += " extends " + typeParameter.type.name;
1626
- }
1627
- return result;
1628
- });
1629
- return "<" + formatted.join(', ') + ">";
1630
- };
1631
- SkyDocsTypeDefinitionsFormatService.prototype.getFormattedInterfaceProperties = function (definition, config) {
1632
- var _this = this;
1633
- var signature = '';
1634
- definition.properties.forEach(function (property) {
1635
- var indexSignature = property.type.indexSignature;
1636
- var optionalIndicator = (property.isOptional && !indexSignature) ? '?' : '';
1637
- var propertyType = _this.getFormattedType(property.type, config);
1638
- var name;
1639
- if (indexSignature) {
1640
- name = "[" + indexSignature.key.name + ": string]";
1641
- }
1642
- else {
1643
- name = property.name;
1644
- }
1645
- signature += "\n " + name + optionalIndicator + ": " + propertyType + ";";
1646
- });
1647
- return signature;
1648
- };
1649
- SkyDocsTypeDefinitionsFormatService = __decorate([
1650
- Injectable()
1651
- ], SkyDocsTypeDefinitionsFormatService);
1652
- return SkyDocsTypeDefinitionsFormatService;
1653
- }());
1654
-
1655
- /**
1656
- * "Call signatures" include methods, functions, and inline arrow functions.
1657
- * This component is used to document both the return type and parameters of a given call signature.
1658
- */
1659
- var SkyDocsCallSignatureDefinitionComponent = /** @class */ (function () {
1660
- function SkyDocsCallSignatureDefinitionComponent(formatService) {
1661
- this.formatService = formatService;
1662
- }
1663
- Object.defineProperty(SkyDocsCallSignatureDefinitionComponent.prototype, "config", {
1664
- get: function () {
1665
- return this._config;
1666
- },
1667
- set: function (value) {
1668
- this._config = value;
1669
- this.updateView();
1670
- },
1671
- enumerable: true,
1672
- configurable: true
1673
- });
1674
- SkyDocsCallSignatureDefinitionComponent.prototype.updateView = function () {
1675
- var _this = this;
1676
- var _a, _b, _c;
1677
- this.parameters = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.parameters) === null || _b === void 0 ? void 0 : _b.map(function (p) {
1678
- var vm = {
1679
- defaultValue: p.defaultValue,
1680
- description: p.description,
1681
- formattedName: _this.formatService.getFormattedParameterName(p),
1682
- isOptional: p.isOptional
1683
- };
1684
- return vm;
1685
- });
1686
- this.returnTypeFormatted = this.formatService.getFormattedType((_c = this.config) === null || _c === void 0 ? void 0 : _c.returnType);
1687
- };
1688
- SkyDocsCallSignatureDefinitionComponent.ctorParameters = function () { return [
1689
- { type: SkyDocsTypeDefinitionsFormatService }
1690
- ]; };
1691
- __decorate([
1692
- Input()
1693
- ], SkyDocsCallSignatureDefinitionComponent.prototype, "config", null);
1694
- SkyDocsCallSignatureDefinitionComponent = __decorate([
1695
- Component({
1696
- selector: 'sky-docs-call-signature-definition',
1697
- template: "<div *ngIf=\"config\"\n class=\"sky-docs-call-signature-definition\"\n>\n <ng-container *ngIf=\"parameters\">\n <h4\n class=\"sky-docs-call-signature-definition-heading\"\n >\n Parameters\n </h4>\n <table\n class=\"sky-docs-parameter-definitions\"\n >\n <tbody>\n <tr *ngFor=\"let parameter of parameters\">\n <th\n class=\"sky-docs-parameter-definition-header\"\n >\n <sky-code><span\n [innerHtml]=\"parameter.formattedName | skyDocsTypeAnchorLinks:'no-code-tags'\"\n ></span></sky-code>\n </th>\n <td\n class=\"sky-docs-parameter-definition-body\"\n >\n <div *ngIf=\"parameter.description\"\n class=\"sky-docs-parameter-definition-description\"\n >\n <sky-docs-safe-html *ngIf=\"parameter.description\"\n [innerHtml]=\"parameter.description | skyDocsTypeAnchorLinks | skyDocsMarkdown\"\n ></sky-docs-safe-html>\n </div>\n <div *ngIf=\"parameter.isOptional\"\n class=\"sky-docs-parameter-definition-label-optional\"\n >\n Optional.\n <ng-container *ngIf=\"parameter.defaultValue\">\n Default is\n <sky-code><span\n [innerHtml]=\"parameter.defaultValue | skyDocsTypeAnchorLinks:'no-code-tags'\"\n ></span></sky-code>.\n </ng-container>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n\n <ng-container *ngIf=\"returnTypeFormatted\">\n <h4\n class=\"sky-docs-call-signature-definition-heading\"\n >\n Returns\n </h4>\n\n <div\n class=\"sky-docs-call-signature-definition-return-type\"\n >\n <sky-code><span\n [innerHtml]=\"returnTypeFormatted | skyDocsTypeAnchorLinks:'no-code-tags'\"\n ></span></sky-code>\n </div>\n </ng-container>\n\n</div>\n",
1698
- changeDetection: ChangeDetectionStrategy.OnPush,
1699
- styles: [".sky-docs-call-signature-definition-heading{line-height:1.1;font-family:\"Blackbaud Sans\",\"Helvetica Neue\",Arial,sans-serif;color:#212327;margin:0 0 10px;font-weight:600;font-size:15px}.sky-docs-parameter-definitions{width:auto;max-width:100%;border-spacing:0;border-collapse:collapse;background-color:#fff;margin-left:15px}.sky-docs-parameter-definitions td,.sky-docs-parameter-definitions th{padding:10px;border-bottom:1px dotted #cdcfd2;vertical-align:top;text-align:left}.sky-docs-parameter-definitions td ::ng-deep:first-child .sky-code,.sky-docs-parameter-definitions th ::ng-deep:first-child .sky-code{display:inline-block;white-space:normal}.sky-docs-parameter-definitions td ::ng-deep p,.sky-docs-parameter-definitions th ::ng-deep p{margin:10px 0}.sky-docs-parameter-definitions td ::ng-deep p:first-child,.sky-docs-parameter-definitions th ::ng-deep p:first-child{margin-top:0!important}.sky-docs-parameter-definitions td ::ng-deep p:last-child,.sky-docs-parameter-definitions th ::ng-deep p:last-child{margin-bottom:0!important}.sky-docs-parameter-definitions th{width:25%;padding-left:0}.sky-docs-parameter-definitions tr:first-child>td,.sky-docs-parameter-definitions tr:first-child>th{padding-top:0}.sky-docs-parameter-definitions tr:last-child>td,.sky-docs-parameter-definitions tr:last-child>th{border-bottom:0;padding-bottom:0}.sky-docs-parameter-definition-header{width:1%;white-space:nowrap;font-weight:400}.sky-docs-parameter-definition-label-optional{color:#686c73}.sky-docs-call-signature-definition-return-type{margin-left:15px}"]
1700
- })
1701
- ], SkyDocsCallSignatureDefinitionComponent);
1702
- return SkyDocsCallSignatureDefinitionComponent;
1703
- }());
1704
-
1705
- var SkyDocsDirectiveDefinitionComponent = /** @class */ (function () {
1706
- function SkyDocsDirectiveDefinitionComponent() {
1707
- }
1708
- __decorate([
1709
- Input()
1710
- ], SkyDocsDirectiveDefinitionComponent.prototype, "config", void 0);
1711
- SkyDocsDirectiveDefinitionComponent = __decorate([
1712
- Component({
1713
- selector: 'sky-docs-directive-definition',
1714
- template: "<div *ngIf=\"config\" class=\"sky-docs-directive-definition sky-docs-type-definition-wrapper\">\n <sky-docs-heading-anchor headingLevel=\"3\" [anchorId]=\"config.anchorId\">\n {{ config.name }}\n </sky-docs-heading-anchor>\n\n <sky-docs-safe-html *ngIf=\"config.description\" class=\"sky-docs-directive-definition-description\" [innerHtml]=\"config.description | skyDocsTypeAnchorLinks | skyDocsMarkdown\"></sky-docs-safe-html>\n\n <h4 class=\"sky-docs-directive-definition-h4\">\n Selector\n </h4>\n\n <p class=\"sky-docs-directive-selector\">\n <sky-code>{{ config.selector }}</sky-code>\n </p>\n\n <ng-container *ngIf=\"config.codeExample\">\n <h4 class=\"sky-docs-directive-definition-h4\">\n Example\n </h4>\n <sky-code-block class=\"sky-docs-code-block\" [code]=\"config.codeExample\" [hideHeader]=\"true\" [languageType]=\"config.codeExampleLanguage\" ngPreserveWhitespaces=\"true\">\n </sky-code-block>\n </ng-container>\n\n <sky-docs-property-definitions *ngIf=\"config.inputProperties?.length\" propertyType=\"Input\" [config]=\"{\n properties: config.inputProperties\n }\"></sky-docs-property-definitions>\n\n <sky-docs-property-definitions *ngIf=\"config.eventProperties?.length\" propertyType=\"Event\" [config]=\"{\n properties: config.eventProperties\n }\"></sky-docs-property-definitions>\n</div>\n",
1715
- changeDetection: ChangeDetectionStrategy.OnPush,
1716
- styles: [".sky-docs-directive-definition-h4{line-height:1.1;font-family:\"Blackbaud Sans\",\"Helvetica Neue\",Arial,sans-serif;color:#212327;margin:0 0 10px;font-weight:600;font-size:15px}.sky-docs-directive-selector{margin-left:15px!important;margin-top:10px!important}"]
1717
- })
1718
- ], SkyDocsDirectiveDefinitionComponent);
1719
- return SkyDocsDirectiveDefinitionComponent;
1720
- }());
1721
-
1722
- var SkyDocsEnumerationDefinitionComponent = /** @class */ (function () {
1723
- function SkyDocsEnumerationDefinitionComponent() {
1724
- }
1725
- __decorate([
1726
- Input()
1727
- ], SkyDocsEnumerationDefinitionComponent.prototype, "config", void 0);
1728
- SkyDocsEnumerationDefinitionComponent = __decorate([
1729
- Component({
1730
- selector: 'sky-docs-enumeration-definition',
1731
- template: "<div *ngIf=\"config\"\n class=\"sky-docs-enumeration-definition sky-docs-type-definition-wrapper\"\n>\n <sky-docs-heading-anchor\n headingLevel=\"3\"\n [anchorId]=\"config.anchorId\"\n >\n {{ config.name }}\n </sky-docs-heading-anchor>\n\n <sky-docs-safe-html *ngIf=\"config.description\"\n class=\"sky-docs-enumeration-definition-description\"\n [innerHtml]=\"config.description | skyDocsTypeAnchorLinks | skyDocsMarkdown\"\n ></sky-docs-safe-html>\n\n <sky-docs-property-definitions *ngIf=\"config.members\"\n propertyType=\"Member\"\n [config]=\"{ properties: config.members }\"\n [showOptionalStatus]=\"false\"\n ></sky-docs-property-definitions>\n</div>",
1732
- changeDetection: ChangeDetectionStrategy.OnPush
1733
- })
1734
- ], SkyDocsEnumerationDefinitionComponent);
1735
- return SkyDocsEnumerationDefinitionComponent;
1736
- }());
1737
-
1738
- var SkyDocsInterfaceDefinitionComponent = /** @class */ (function () {
1739
- function SkyDocsInterfaceDefinitionComponent(formatService) {
1740
- this.formatService = formatService;
1741
- }
1742
- Object.defineProperty(SkyDocsInterfaceDefinitionComponent.prototype, "config", {
1743
- get: function () {
1744
- return this._config;
1745
- },
1746
- set: function (value) {
1747
- this._config = value;
1748
- this.updateView();
1749
- },
1750
- enumerable: true,
1751
- configurable: true
1752
- });
1753
- SkyDocsInterfaceDefinitionComponent.prototype.updateView = function () {
1754
- this.sourceCode = (this.config) ? this.formatService.getInterfaceSourceCode(this.config) : undefined;
1755
- };
1756
- SkyDocsInterfaceDefinitionComponent.ctorParameters = function () { return [
1757
- { type: SkyDocsTypeDefinitionsFormatService }
1758
- ]; };
1759
- __decorate([
1760
- Input()
1761
- ], SkyDocsInterfaceDefinitionComponent.prototype, "config", null);
1762
- SkyDocsInterfaceDefinitionComponent = __decorate([
1763
- Component({
1764
- selector: 'sky-docs-interface-definition',
1765
- template: "<div *ngIf=\"config\" class=\"sky-docs-interface-definition sky-docs-type-definition-wrapper\">\n <sky-docs-heading-anchor headingLevel=\"3\" [anchorId]=\"config.anchorId\">\n {{ config.name }}\n </sky-docs-heading-anchor>\n\n <sky-docs-safe-html *ngIf=\"config.description\" class=\"sky-docs-interface-definition-description\" [innerHtml]=\"config.description | skyDocsTypeAnchorLinks | skyDocsMarkdown\"></sky-docs-safe-html>\n\n <sky-code-block *ngIf=\"sourceCode\" class=\"sky-docs-code-block\" languageType=\"typescript\" [code]=\"sourceCode\" [hideHeader]=\"true\" ngPreserveWhitespaces=\"true\"></sky-code-block>\n\n <sky-docs-property-definitions *ngIf=\"config.properties\" [config]=\"{ properties: config.properties }\" [showOptionalStatus]=\"false\"></sky-docs-property-definitions>\n</div>\n",
1766
- changeDetection: ChangeDetectionStrategy.OnPush
1767
- })
1768
- ], SkyDocsInterfaceDefinitionComponent);
1769
- return SkyDocsInterfaceDefinitionComponent;
1770
- }());
1771
-
1772
- var SkyDocsMethodDefinitionsComponent = /** @class */ (function () {
1773
- function SkyDocsMethodDefinitionsComponent(changeDetector, formatService, mediaQueryService) {
1774
- this.changeDetector = changeDetector;
1775
- this.formatService = formatService;
1776
- this.mediaQueryService = mediaQueryService;
1777
- this.deprecationWarningPrefix = "<span class=\"sky-text-warning\"></span>**Deprecated.** ";
1778
- this.isMobile = true;
1779
- }
1780
- Object.defineProperty(SkyDocsMethodDefinitionsComponent.prototype, "config", {
1781
- get: function () {
1782
- return this._config || {};
1783
- },
1784
- set: function (value) {
1785
- this._config = value;
1786
- this.updateView();
1787
- },
1788
- enumerable: true,
1789
- configurable: true
1790
- });
1791
- SkyDocsMethodDefinitionsComponent.prototype.ngOnInit = function () {
1792
- var _this = this;
1793
- this.mediaQueryService.subscribe(function (breakpoints) {
1794
- _this.isMobile = (breakpoints <= SkyMediaBreakpoints.sm);
1795
- _this.changeDetector.markForCheck();
1796
- });
1797
- };
1798
- SkyDocsMethodDefinitionsComponent.prototype.updateView = function () {
1799
- var _this = this;
1800
- var _a, _b;
1801
- this.methods = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.methods) === null || _b === void 0 ? void 0 : _b.map(function (method) {
1802
- var vm = {
1803
- callSignature: method.type.callSignature,
1804
- codeExample: method.codeExample,
1805
- codeExampleLanguage: method.codeExampleLanguage,
1806
- deprecationWarning: method.deprecationWarning,
1807
- description: method.description,
1808
- formattedName: _this.formatService.getFormattedMethodName(method),
1809
- sourceCode: _this.formatService.getMethodSourceCode(method)
1810
- };
1811
- return vm;
1812
- });
1813
- };
1814
- SkyDocsMethodDefinitionsComponent.ctorParameters = function () { return [
1815
- { type: ChangeDetectorRef },
1816
- { type: SkyDocsTypeDefinitionsFormatService },
1817
- { type: SkyMediaQueryService }
1818
- ]; };
1819
- __decorate([
1820
- Input()
1821
- ], SkyDocsMethodDefinitionsComponent.prototype, "config", null);
1822
- SkyDocsMethodDefinitionsComponent = __decorate([
1823
- Component({
1824
- selector: 'sky-docs-method-definitions',
1825
- template: "<div *ngIf=\"methods\" class=\"sky-docs-method-definitions\">\n <table *ngIf=\"!isMobile else mobileTemplate\" class=\"sky-docs-table\">\n <tr class=\"sky-docs-table-row\">\n <th class=\"sky-docs-table-column-header sky-docs-table-column-header-name\">\n Methods\n </th>\n <th class=\"sky-docs-table-column-header sky-docs-table-column-header-description\">\n Description\n </th>\n </tr>\n <tr *ngFor=\"let method of methods\" class=\"sky-docs-table-row\">\n <td class=\"sky-docs-table-cell sky-docs-method-definitions-table-cell-name\">\n <ng-template [ngTemplateOutlet]=\"nameTemplate\" [ngTemplateOutletContext]=\"{$implicit: method}\"></ng-template>\n </td>\n <td class=\"sky-docs-table-cell sky-docs-method-definitions-table-cell-description\">\n <ng-template [ngTemplateOutlet]=\"descriptionTemplate\" [ngTemplateOutletContext]=\"{$implicit: method}\"></ng-template>\n </td>\n </tr>\n </table>\n\n <ng-template #mobileTemplate>\n <dl class=\"sky-docs-method-definition-list\">\n <div *ngFor=\"let method of methods\" class=\"sky-docs-method-definition-list-item\">\n <dt class=\"sky-field-label\">\n Methods\n </dt>\n <dd class=\"sky-docs-method-definitions-dd-name\">\n <ng-template [ngTemplateOutlet]=\"nameTemplate\" [ngTemplateOutletContext]=\"{$implicit: method}\"></ng-template>\n </dd>\n <dt class=\"sky-field-label\">Description</dt>\n <dd class=\"sky-docs-method-definitions-dd-description\">\n <ng-template [ngTemplateOutlet]=\"descriptionTemplate\" [ngTemplateOutletContext]=\"{$implicit: method}\"></ng-template>\n </dd>\n </div>\n </dl>\n </ng-template>\n</div>\n\n<ng-template let-method #nameTemplate>\n <sky-code><span [innerHtml]=\"method.formattedName | skyDocsTypeAnchorLinks:'no-code-tags'\"></span></sky-code>\n</ng-template>\n\n<ng-template let-method #descriptionTemplate>\n\n <sky-docs-safe-html *ngIf=\"method.deprecationWarning !== undefined\" class=\"sky-docs-method-definition-deprecation-warning\" [innerHtml]=\"deprecationWarningPrefix + method.deprecationWarning | skyDocsTypeAnchorLinks | skyDocsMarkdown\"></sky-docs-safe-html>\n\n <sky-docs-safe-html *ngIf=\"method.description\" class=\"sky-docs-method-definition-description\" [innerHtml]=\"method.description | skyDocsTypeAnchorLinks | skyDocsMarkdown\"></sky-docs-safe-html>\n\n <sky-code-block *ngIf=\"method.sourceCode\" class=\"sky-docs-code-block\" languageType=\"typescript\" [code]=\"method.sourceCode\" [hideHeader]=\"true\" ngPreserveWhitespaces=\"true\"></sky-code-block>\n\n <sky-docs-call-signature-definition *ngIf=\"method.callSignature\" [config]=\"method.callSignature\"></sky-docs-call-signature-definition>\n\n <ng-container *ngIf=\"method.codeExample\">\n <h4 class=\"sky-docs-method-definition-heading\">\n Example\n </h4>\n <sky-code-block *ngIf=\"method.codeExample\" class=\"sky-docs-code-block\" languageType=\"method.codeExampleLanguage\" [code]=\"method.codeExample\" [hideHeader]=\"true\" ngPreserveWhitespaces=\"true\"></sky-code-block>\n </ng-container>\n</ng-template>\n",
1826
- changeDetection: ChangeDetectionStrategy.OnPush,
1827
- styles: [":host{margin:15px 0}.sky-docs-method-definitions{width:100%;max-width:100%;overflow:auto}.sky-docs-table-column-header-name{width:25%}.sky-docs-method-definition-label-optional{color:#686c73}.sky-docs-method-definition-list{margin:0}.sky-docs-method-definition-list-item{border-bottom:1px dotted #cdcfd2;margin:10px 0}.sky-docs-method-definition-list-item .sky-field-label{margin:10px 0}"]
1828
- })
1829
- ], SkyDocsMethodDefinitionsComponent);
1830
- return SkyDocsMethodDefinitionsComponent;
1831
- }());
1832
-
1833
- var SkyDocsPipeDefinitionComponent = /** @class */ (function () {
1834
- function SkyDocsPipeDefinitionComponent() {
1835
- }
1836
- __decorate([
1837
- Input()
1838
- ], SkyDocsPipeDefinitionComponent.prototype, "config", void 0);
1839
- SkyDocsPipeDefinitionComponent = __decorate([
1840
- Component({
1841
- selector: 'sky-docs-pipe-definition',
1842
- template: "<div *ngIf=\"config\" class=\"sky-docs-pipe-definition sky-docs-type-definition-wrapper\">\n <sky-docs-heading-anchor headingLevel=\"3\" [anchorId]=\"config.anchorId\">\n {{ config.name }}\n </sky-docs-heading-anchor>\n\n <sky-docs-safe-html *ngIf=\"config.description\" [innerHtml]=\"config.description | skyDocsTypeAnchorLinks | skyDocsMarkdown\"></sky-docs-safe-html>\n\n <ng-container *ngIf=\"config.codeExample\">\n <h4 class=\"sky-docs-pipe-definition-heading\">\n Example\n </h4>\n <sky-code-block class=\"sky-docs-code-block\" [code]=\"config.codeExample\" [hideHeader]=\"true\" [languageType]=\"config.codeExampleLanguage\" ngPreserveWhitespaces=\"true\"></sky-code-block>\n </ng-container>\n\n <sky-docs-method-definitions [config]=\"{\n methods: [config.transformMethod]\n }\"></sky-docs-method-definitions>\n</div>\n",
1843
- changeDetection: ChangeDetectionStrategy.OnPush,
1844
- styles: [".sky-docs-pipe-definition-heading{line-height:1.1;font-family:\"Blackbaud Sans\",\"Helvetica Neue\",Arial,sans-serif;color:#212327;margin:0 0 10px;font-weight:600;font-size:15px}"]
1845
- })
1846
- ], SkyDocsPipeDefinitionComponent);
1847
- return SkyDocsPipeDefinitionComponent;
1848
- }());
1849
-
1850
- var SkyDocsPropertyDefinitionsComponent = /** @class */ (function () {
1851
- function SkyDocsPropertyDefinitionsComponent(changeDetector, formatService, mediaQueryService) {
1852
- this.changeDetector = changeDetector;
1853
- this.formatService = formatService;
1854
- this.mediaQueryService = mediaQueryService;
1855
- this.propertyType = 'Property';
1856
- this.showOptionalStatus = true;
1857
- this.deprecationWarningPrefix = "<span class=\"sky-text-warning\"></span>**Deprecated.** ";
1858
- this.isMobile = true;
1859
- this.properties = [];
1860
- }
1861
- Object.defineProperty(SkyDocsPropertyDefinitionsComponent.prototype, "config", {
1862
- get: function () {
1863
- return this._config || {};
1864
- },
1865
- set: function (value) {
1866
- this._config = value;
1867
- this.updateView();
1868
- },
1869
- enumerable: true,
1870
- configurable: true
1871
- });
1872
- SkyDocsPropertyDefinitionsComponent.prototype.ngOnInit = function () {
1873
- var _this = this;
1874
- this.mediaQueryService.subscribe(function (breakpoints) {
1875
- _this.isMobile = (breakpoints <= SkyMediaBreakpoints.sm);
1876
- _this.changeDetector.markForCheck();
1877
- });
1878
- };
1879
- SkyDocsPropertyDefinitionsComponent.prototype.updateView = function () {
1880
- var _this = this;
1881
- var _a, _b;
1882
- this.properties = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.map(function (property) {
1883
- var _a;
1884
- var vm = {
1885
- callSignature: (_a = property.type) === null || _a === void 0 ? void 0 : _a.callSignature,
1886
- defaultValue: _this.formatService.escapeSpecialCharacters(property.defaultValue || ''),
1887
- deprecationWarning: property.deprecationWarning,
1888
- description: property.description,
1889
- formattedName: _this.formatService.getFormattedPropertyName(property),
1890
- isOptional: property.isOptional
1891
- };
1892
- return vm;
1893
- });
1894
- };
1895
- SkyDocsPropertyDefinitionsComponent.ctorParameters = function () { return [
1896
- { type: ChangeDetectorRef },
1897
- { type: SkyDocsTypeDefinitionsFormatService },
1898
- { type: SkyMediaQueryService }
1899
- ]; };
1900
- __decorate([
1901
- Input()
1902
- ], SkyDocsPropertyDefinitionsComponent.prototype, "config", null);
1903
- __decorate([
1904
- Input()
1905
- ], SkyDocsPropertyDefinitionsComponent.prototype, "propertyType", void 0);
1906
- __decorate([
1907
- Input()
1908
- ], SkyDocsPropertyDefinitionsComponent.prototype, "showOptionalStatus", void 0);
1909
- SkyDocsPropertyDefinitionsComponent = __decorate([
1910
- Component({
1911
- selector: 'sky-docs-property-definitions',
1912
- template: "<div *ngIf=\"properties\"\n class=\"sky-docs-property-definitions\"\n>\n <table *ngIf=\"!isMobile else mobileTemplate\"\n class=\"sky-docs-table\"\n >\n <tr\n class=\"sky-docs-table-row\"\n >\n <th\n class=\"sky-docs-table-column-header sky-docs-table-column-header-name\"\n >\n {{ propertyType }}\n </th>\n <th\n class=\"sky-docs-table-column-header sky-docs-table-column-header-description\"\n >\n Description\n </th>\n </tr>\n <tr *ngFor=\"let property of properties\"\n class=\"sky-docs-table-row\"\n >\n <td\n class=\"sky-docs-table-cell sky-docs-property-definitions-table-cell-name\"\n >\n <ng-template\n [ngTemplateOutlet]=\"nameTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: property}\"\n ></ng-template>\n </td>\n <td\n class=\"sky-docs-table-cell sky-docs-property-definitions-table-cell-description\"\n >\n <ng-template\n [ngTemplateOutlet]=\"descriptionTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: property}\"\n ></ng-template>\n </td>\n </tr>\n </table>\n\n <ng-template #mobileTemplate>\n <dl\n class=\"sky-docs-property-definition-list\"\n >\n <div *ngFor=\"let property of properties\"\n class=\"sky-docs-property-definition-list-item\"\n >\n <dt\n class=\"sky-field-label\"\n >{{ propertyType }}</dt>\n <dd\n class=\"sky-docs-property-definitions-dd-name\"\n >\n <ng-template\n [ngTemplateOutlet]=\"nameTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: property}\"\n ></ng-template>\n </dd>\n <dt\n class=\"sky-field-label\"\n >Description</dt>\n <dd\n class=\"sky-docs-property-definitions-dd-description\"\n >\n <ng-template\n [ngTemplateOutlet]=\"descriptionTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: property}\"\n ></ng-template>\n </dd>\n </div>\n </dl>\n </ng-template>\n</div>\n\n<ng-template let-property #nameTemplate>\n <sky-code><span\n [innerHtml]=\"property.formattedName | skyDocsTypeAnchorLinks:'no-code-tags'\"\n ></span></sky-code>\n</ng-template>\n\n<ng-template let-property #descriptionTemplate>\n <div *ngIf=\"!property.isOptional && showOptionalStatus\"\n class=\"sky-docs-property-definition-label sky-text-danger\"\n >Required.</div>\n\n <sky-docs-safe-html *ngIf=\"property.deprecationWarning !== undefined\"\n class=\"sky-docs-property-definitions-deprecation-warning\"\n [innerHtml]=\"deprecationWarningPrefix + property.deprecationWarning | skyDocsTypeAnchorLinks | skyDocsMarkdown\"\n ></sky-docs-safe-html>\n\n <sky-docs-safe-html *ngIf=\"property.description\"\n class=\"sky-docs-property-definitions-description\"\n [innerHtml]=\"property.description | skyDocsTypeAnchorLinks | skyDocsMarkdown\"\n ></sky-docs-safe-html>\n\n <div *ngIf=\"property.isOptional && showOptionalStatus\"\n class=\"sky-docs-property-definition-label sky-docs-property-definition-label-optional\"\n >\n Optional. <ng-container *ngIf=\"property.defaultValue\">Default is <sky-code><span\n [innerHtml]=\"property.defaultValue | skyDocsTypeAnchorLinks:'no-code-tags'\"\n ></span></sky-code>.</ng-container>\n </div>\n\n <sky-docs-call-signature-definition *ngIf=\"property.callSignature\"\n [config]=\"property.callSignature\"\n ></sky-docs-call-signature-definition>\n</ng-template>\n",
1913
- changeDetection: ChangeDetectionStrategy.OnPush,
1914
- styles: [":host{margin:15px 0}.sky-docs-property-definitions{width:100%;max-width:100%;overflow:auto}.sky-docs-table-column-header-name{width:25%}.sky-docs-property-definition-label-optional{color:#686c73;margin-bottom:10px}.sky-docs-property-definition-list{margin:0}.sky-docs-property-definition-list-item{border-bottom:1px dotted #cdcfd2;margin:10px 0}.sky-docs-property-definition-list-item .sky-field-label{margin:10px 0}"]
1915
- })
1916
- ], SkyDocsPropertyDefinitionsComponent);
1917
- return SkyDocsPropertyDefinitionsComponent;
1918
- }());
1919
-
1920
- var SkyDocsClassDefinitionComponent = /** @class */ (function () {
1921
- function SkyDocsClassDefinitionComponent() {
1922
- }
1923
- __decorate([
1924
- Input()
1925
- ], SkyDocsClassDefinitionComponent.prototype, "config", void 0);
1926
- SkyDocsClassDefinitionComponent = __decorate([
1927
- Component({
1928
- selector: 'sky-docs-class-definition',
1929
- template: "<div *ngIf=\"config\"\n class=\"sky-docs-class-definition sky-docs-type-definition-wrapper\"\n>\n <sky-docs-heading-anchor\n headingLevel=\"3\"\n [anchorId]=\"config.anchorId\"\n >\n {{ config.name }}\n </sky-docs-heading-anchor>\n\n <sky-docs-safe-html *ngIf=\"config.description\"\n class=\"sky-docs-class-definition-description\"\n [innerHtml]=\"config.description | skyDocsTypeAnchorLinks | skyDocsMarkdown\"\n ></sky-docs-safe-html>\n\n <ng-container *ngIf=\"config.properties?.length\">\n <sky-docs-property-definitions\n [config]=\"{ properties: config.properties }\"\n ></sky-docs-property-definitions>\n </ng-container>\n\n <ng-container *ngIf=\"config.methods?.length\">\n <sky-docs-method-definitions\n [config]=\"{ methods: config.methods }\"\n ></sky-docs-method-definitions>\n </ng-container>\n</div>\n",
1930
- changeDetection: ChangeDetectionStrategy.OnPush,
1931
- styles: [".sky-docs-class-definition-heading{line-height:1.1;font-family:\"Blackbaud Sans\",\"Helvetica Neue\",Arial,sans-serif;color:#212327;margin:0 0 10px;font-weight:600;font-size:15px}.sky-docs-class-definition-return-type{margin-left:15px}"]
1932
- })
1933
- ], SkyDocsClassDefinitionComponent);
1934
- return SkyDocsClassDefinitionComponent;
1935
- }());
1936
-
1937
- var SkyDocsTypeAliasDefinitionComponent = /** @class */ (function () {
1938
- function SkyDocsTypeAliasDefinitionComponent(formatService) {
1939
- this.formatService = formatService;
1940
- }
1941
- Object.defineProperty(SkyDocsTypeAliasDefinitionComponent.prototype, "config", {
1942
- get: function () {
1943
- return this._config;
1944
- },
1945
- set: function (value) {
1946
- this._config = value;
1947
- this.updateView();
1948
- },
1949
- enumerable: true,
1950
- configurable: true
1951
- });
1952
- SkyDocsTypeAliasDefinitionComponent.prototype.updateView = function () {
1953
- this.sourceCode = (this.config) ? this.formatService.getTypeAliasSourceCode(this.config) : undefined;
1954
- };
1955
- SkyDocsTypeAliasDefinitionComponent.ctorParameters = function () { return [
1956
- { type: SkyDocsTypeDefinitionsFormatService }
1957
- ]; };
1958
- __decorate([
1959
- Input()
1960
- ], SkyDocsTypeAliasDefinitionComponent.prototype, "config", null);
1961
- SkyDocsTypeAliasDefinitionComponent = __decorate([
1962
- Component({
1963
- selector: 'sky-docs-type-alias-definition',
1964
- template: "<div *ngIf=\"config\" class=\"sky-docs-type-alias-definition sky-docs-type-definition-wrapper\">\n <sky-docs-heading-anchor headingLevel=\"3\" [anchorId]=\"config.anchorId\">\n {{ config.name }}\n </sky-docs-heading-anchor>\n\n <sky-docs-safe-html *ngIf=\"config.description\" class=\"sky-docs-type-alias-definition-description\" [innerHtml]=\"config.description | skyDocsTypeAnchorLinks | skyDocsMarkdown\"></sky-docs-safe-html>\n\n <sky-code-block *ngIf=\"sourceCode\" class=\"sky-docs-code-block\" languageType=\"typescript\" [code]=\"sourceCode\" [hideHeader]=\"true\" ngPreserveWhitespaces=\"true\"></sky-code-block>\n\n <sky-docs-call-signature-definition *ngIf=\"config.type.callSignature\" [config]=\"config.type.callSignature\"></sky-docs-call-signature-definition>\n</div>\n",
1965
- changeDetection: ChangeDetectionStrategy.OnPush,
1966
- styles: [".sky-docs-type-alias-definition-heading{line-height:1.1;font-family:\"Blackbaud Sans\",\"Helvetica Neue\",Arial,sans-serif;color:#212327;margin:0 0 10px;font-weight:600;font-size:15px}.sky-docs-type-alias-definition-return-type{margin-left:15px}"]
1967
- })
1968
- ], SkyDocsTypeAliasDefinitionComponent);
1969
- return SkyDocsTypeAliasDefinitionComponent;
1970
- }());
1971
-
1972
- /**
1973
- * Converts TypeDoc types into SKY UX docs-tools types, to be supplied to the various definitions components.
1974
- */
1975
- var SkyDocsTypeDocAdapterService = /** @class */ (function () {
1976
- function SkyDocsTypeDocAdapterService(typeDefinitionsProvider) {
1977
- this.typeDefinitionsProvider = typeDefinitionsProvider;
1978
- }
1979
- SkyDocsTypeDocAdapterService.prototype.toClassDefinition = function (entry) {
1980
- var definition = {
1981
- anchorId: this.getAnchorId(entry),
1982
- name: entry.name
1983
- };
1984
- var tags = this.getCommentTags(entry.comment);
1985
- this.applyCommentTagValues(definition, tags);
1986
- var methods = this.getClassMethods(entry);
1987
- if (methods.length) {
1988
- definition.methods = methods;
1989
- }
1990
- var properties = this.getClassProperties(entry);
1991
- if (properties.length) {
1992
- definition.properties = properties;
1993
- }
1994
- return definition;
1995
- };
1996
- SkyDocsTypeDocAdapterService.prototype.toDirectiveDefinition = function (entry) {
1997
- var definition = {
1998
- anchorId: this.getAnchorId(entry),
1999
- name: entry.name,
2000
- selector: this.getSelector(entry)
2001
- };
2002
- var tags = this.getCommentTags(entry.comment);
2003
- this.applyCommentTagValues(definition, tags);
2004
- var properties = this.getClassProperties(entry);
2005
- var eventProperties = properties.filter(function (p) { var _a; return ((_a = p.decorator) === null || _a === void 0 ? void 0 : _a.name) === 'Output'; });
2006
- if (eventProperties.length) {
2007
- definition.eventProperties = eventProperties;
2008
- }
2009
- var inputProperties = properties.filter(function (p) { var _a; return ((_a = p.decorator) === null || _a === void 0 ? void 0 : _a.name) === 'Input'; });
2010
- if (inputProperties.length) {
2011
- definition.inputProperties = inputProperties;
2012
- }
2013
- return definition;
2014
- };
2015
- SkyDocsTypeDocAdapterService.prototype.toEnumerationDefinition = function (entry) {
2016
- var members = this.getEnumerationMembers(entry);
2017
- var definition = {
2018
- anchorId: this.getAnchorId(entry),
2019
- members: members,
2020
- name: entry.name
2021
- };
2022
- var tags = this.getCommentTags(entry.comment);
2023
- this.applyCommentTagValues(definition, tags);
2024
- return definition;
2025
- };
2026
- SkyDocsTypeDocAdapterService.prototype.toInterfaceDefinition = function (entry) {
2027
- var properties = this.getInterfaceProperties(entry);
2028
- var definition = {
2029
- anchorId: this.getAnchorId(entry),
2030
- name: entry.name,
2031
- properties: properties
2032
- };
2033
- var tags = this.getCommentTags(entry.comment);
2034
- this.applyCommentTagValues(definition, tags);
2035
- var typeParameters = this.getTypeParameterDefinitions(entry.typeParameter);
2036
- if (typeParameters.length) {
2037
- definition.typeParameters = typeParameters;
2038
- }
2039
- return definition;
2040
- };
2041
- SkyDocsTypeDocAdapterService.prototype.toPipeDefinition = function (entry) {
2042
- var methods = this.getClassMethods(entry);
2043
- var transformMethod = methods.find(function (m) { return m.name === 'transform'; });
2044
- var definition = {
2045
- anchorId: this.getAnchorId(entry),
2046
- name: entry.name,
2047
- transformMethod: transformMethod
2048
- };
2049
- var tags = this.getCommentTags(entry.comment);
2050
- this.applyCommentTagValues(definition, tags);
2051
- return definition;
2052
- };
2053
- SkyDocsTypeDocAdapterService.prototype.toTypeAliasDefinition = function (entry) {
2054
- var definition = {
2055
- anchorId: this.getAnchorId(entry),
2056
- name: entry.name,
2057
- type: this.getTypeDefinition({
2058
- comment: entry.comment,
2059
- type: entry.type
2060
- })
2061
- };
2062
- var tags = this.getCommentTags(entry.comment);
2063
- this.applyCommentTagValues(definition, tags);
2064
- var typeParameters = this.getTypeParameterDefinitions(entry.typeParameter);
2065
- if (typeParameters.length) {
2066
- definition.typeParameters = typeParameters;
2067
- }
2068
- return definition;
2069
- };
2070
- SkyDocsTypeDocAdapterService.prototype.getSelector = function (entry) {
2071
- var decoratorSource = entry.decorators[0].arguments.obj;
2072
- return (decoratorSource.indexOf('selector: `') > -1)
2073
- ? decoratorSource.split('selector: `')[1].split('`')[0].replace(/\s\s+/g, ' ')
2074
- : decoratorSource.split('selector: \'')[1].split('\'')[0];
2075
- };
2076
- SkyDocsTypeDocAdapterService.prototype.getClassProperties = function (entry) {
2077
- var _this = this;
2078
- if (!entry.children) {
2079
- return [];
2080
- }
2081
- var definitions = entry.children
2082
- .filter(function (child) { return child.kindString === 'Property' || child.kindString === 'Accessor'; })
2083
- .map(function (child) {
2084
- var tags = _this.getCommentTags(child.comment);
2085
- var definition = {
2086
- isOptional: !tags.extras.required,
2087
- name: _this.getPropertyName(child),
2088
- type: _this.getTypeDefinition(child)
2089
- };
2090
- _this.applyCommentTagValues(definition, tags);
2091
- var decorator = _this.getDecorator(child);
2092
- if (decorator) {
2093
- definition.decorator = decorator;
2094
- }
2095
- var defaultValue = _this.getDefaultValue(child, tags);
2096
- if (defaultValue) {
2097
- definition.defaultValue = defaultValue;
2098
- }
2099
- return definition;
2100
- });
2101
- return orderBy(definitions, ['isOptional', 'name'], ['asc', 'asc']);
2102
- };
2103
- SkyDocsTypeDocAdapterService.prototype.getClassMethods = function (entry) {
2104
- var _this = this;
2105
- if (!entry.children) {
2106
- return [];
2107
- }
2108
- var methods = entry.children
2109
- .filter(function (child) { return child.kindString === 'Method' && /^ng/.test(child.name) === false; })
2110
- .map(function (child) {
2111
- var definition = {
2112
- name: _this.getPropertyName(child),
2113
- type: _this.getTypeDefinition(child)
2114
- };
2115
- // Comments for methods are stored in a different location.
2116
- var comment = child.signatures[0].comment;
2117
- var tags = _this.getCommentTags(comment);
2118
- _this.applyCommentTagValues(definition, tags);
2119
- var typeParameters = _this.getTypeParameterDefinitions(child.signatures[0].typeParameter);
2120
- if (typeParameters.length) {
2121
- definition.typeParameters = typeParameters;
2122
- }
2123
- return definition;
2124
- });
2125
- return orderBy(methods, ['name'], ['asc']);
2126
- };
2127
- SkyDocsTypeDocAdapterService.prototype.getInterfaceProperties = function (entry) {
2128
- var _this = this;
2129
- var _a;
2130
- if (!entry.children && !entry.indexSignature) {
2131
- return [];
2132
- }
2133
- var definitions = ((_a = entry.children) === null || _a === void 0 ? void 0 : _a.map(function (child) {
2134
- var _a;
2135
- var tags = _this.getCommentTags(child.comment);
2136
- var definition = {
2137
- isOptional: (tags.extras.required) ? false : !!((_a = child.flags) === null || _a === void 0 ? void 0 : _a.isOptional),
2138
- name: _this.getPropertyName(child),
2139
- type: _this.getTypeDefinition(child)
2140
- };
2141
- _this.applyCommentTagValues(definition, tags);
2142
- return definition;
2143
- })) || [];
2144
- var sorted = orderBy(definitions, ['isOptional', 'name'], ['asc', 'asc']);
2145
- // Add any index signatures, e.g. `[_: string]: any`
2146
- if (entry.indexSignature) {
2147
- var indexSignature = entry.indexSignature[0];
2148
- var definition = {
2149
- isOptional: true,
2150
- name: indexSignature.name,
2151
- type: {
2152
- indexSignature: this.getIndexSignatureDefinition(indexSignature)
2153
- }
2154
- };
2155
- var tags = this.getCommentTags(indexSignature.comment);
2156
- this.applyCommentTagValues(definition, tags);
2157
- sorted.push(definition);
2158
- }
2159
- return sorted;
2160
- };
2161
- SkyDocsTypeDocAdapterService.prototype.getEnumerationMembers = function (entry) {
2162
- var _this = this;
2163
- if (!entry.children) {
2164
- return [];
2165
- }
2166
- return entry.children.map(function (child) {
2167
- var definition = {
2168
- name: child.name
2169
- };
2170
- var tags = _this.getCommentTags(child.comment);
2171
- _this.applyCommentTagValues(definition, tags);
2172
- return definition;
2173
- });
2174
- };
2175
- SkyDocsTypeDocAdapterService.prototype.getTypeDefinition = function (child) {
2176
- var _this = this;
2177
- var _a;
2178
- var definition;
2179
- var kindString = child.kindString;
2180
- switch (kindString) {
2181
- case 'Accessor':
2182
- if (child.setSignature) {
2183
- return this.getTypeDefinition(child.setSignature[0].parameters[0]);
2184
- }
2185
- return this.getTypeDefinition(child.getSignature[0]);
2186
- case 'Method':
2187
- definition = {
2188
- callSignature: this.getCallSignatureDefinition(child.signatures[0], this.getCommentTags(child.comment)),
2189
- name: child.signatures[0].name
2190
- };
2191
- return definition;
2192
- default:
2193
- var name_1 = child.type.name || ((_a = child.type.elementType) === null || _a === void 0 ? void 0 : _a.name) || child.type.value;
2194
- definition = {
2195
- type: child.type.type
2196
- };
2197
- if (name_1) {
2198
- definition.name = name_1;
2199
- }
2200
- // Union?
2201
- if (child.type.types) {
2202
- definition.unionTypes = child.type.types.map(function (t) { return _this.getTypeDefinition({ type: t }); });
2203
- }
2204
- // Convert reflection types.
2205
- if (child.type.type === 'reflection') {
2206
- var declaration = child.type.declaration;
2207
- /*istanbul ignore else */
2208
- if (declaration) {
2209
- if (declaration.signatures) {
2210
- definition.callSignature = this.getCallSignatureDefinition(declaration.signatures[0], this.getCommentTags(child.comment));
2211
- }
2212
- else if (declaration.indexSignature) {
2213
- var indexSignature = declaration.indexSignature[0];
2214
- definition.indexSignature = this.getIndexSignatureDefinition(indexSignature);
2215
- }
2216
- else if (declaration.children) {
2217
- definition.typeLiteral = {
2218
- properties: this.getInterfaceProperties({
2219
- children: declaration.children
2220
- })
2221
- };
2222
- }
2223
- }
2224
- }
2225
- if (child.type.type === 'typeOperator') {
2226
- definition.name = child.type.operator + " " + child.type.target.name;
2227
- }
2228
- if (child.type.typeArguments) {
2229
- definition.typeArguments = this.getTypeArgumentDefinitions(child.type);
2230
- }
2231
- return definition;
2232
- }
2233
- };
2234
- SkyDocsTypeDocAdapterService.prototype.getParameterDefinitions = function (callSignature, parentTags) {
2235
- var _this = this;
2236
- if (!callSignature.parameters) {
2237
- return [];
2238
- }
2239
- var parameters = callSignature.parameters.map(function (p) {
2240
- var _a;
2241
- var tags = _this.getParameterCommentTags(p, parentTags);
2242
- var defaultValue = _this.getDefaultValue(p, tags);
2243
- var typeArguments = _this.getTypeArgumentDefinitions(p.type);
2244
- var parameter = {
2245
- isOptional: !!(defaultValue || !!((_a = p.flags) === null || _a === void 0 ? void 0 : _a.isOptional)),
2246
- name: p.name,
2247
- type: _this.getTypeDefinition(p)
2248
- };
2249
- if (defaultValue !== undefined) {
2250
- parameter.defaultValue = defaultValue;
2251
- }
2252
- if (tags.description) {
2253
- parameter.description = tags.description;
2254
- }
2255
- if (typeArguments.length) {
2256
- parameter.typeArguments = typeArguments;
2257
- }
2258
- return parameter;
2259
- });
2260
- return parameters;
2261
- };
2262
- SkyDocsTypeDocAdapterService.prototype.getTypeArgumentDefinitions = function (typeConfig) {
2263
- var _this = this;
2264
- if (!typeConfig || !typeConfig.typeArguments) {
2265
- return [];
2266
- }
2267
- return typeConfig.typeArguments.map(function (typeArgument) {
2268
- return _this.getTypeDefinition({ type: typeArgument });
2269
- });
2270
- };
2271
- SkyDocsTypeDocAdapterService.prototype.getCallSignatureDefinition = function (callSignature, tags) {
2272
- var definition = {
2273
- returnType: this.getTypeDefinition(callSignature)
2274
- };
2275
- var parameters = this.getParameterDefinitions(callSignature, tags);
2276
- if (parameters.length) {
2277
- definition.parameters = parameters;
2278
- }
2279
- return definition;
2280
- };
2281
- SkyDocsTypeDocAdapterService.prototype.getIndexSignatureDefinition = function (signature) {
2282
- return {
2283
- key: {
2284
- name: signature.parameters[0].name,
2285
- type: this.getTypeDefinition(signature.parameters[0])
2286
- },
2287
- type: this.getTypeDefinition(signature)
2288
- };
2289
- };
2290
- SkyDocsTypeDocAdapterService.prototype.getTypeParameterDefinitions = function (typeParameters) {
2291
- var _this = this;
2292
- if (!typeParameters) {
2293
- return [];
2294
- }
2295
- return typeParameters.map(function (typeParam) {
2296
- var definition = {
2297
- name: typeParam.name
2298
- };
2299
- if (typeParam.type) {
2300
- definition.type = _this.getTypeDefinition({
2301
- type: typeParam.type
2302
- });
2303
- }
2304
- return definition;
2305
- });
2306
- };
2307
- SkyDocsTypeDocAdapterService.prototype.getCommentTags = function (comment) {
2308
- var codeExample;
2309
- var codeExampleLanguage = 'markup';
2310
- var deprecationWarning;
2311
- var defaultValue;
2312
- var description = '';
2313
- var parameters;
2314
- var extras = {};
2315
- if (comment) {
2316
- if (comment.tags) {
2317
- comment.tags.forEach(function (tag) {
2318
- switch (tag.tag) {
2319
- case 'deprecated':
2320
- deprecationWarning = tag.text.trim();
2321
- break;
2322
- case 'default':
2323
- case 'defaultValue':
2324
- defaultValue = tag.text.trim();
2325
- break;
2326
- case 'example':
2327
- codeExample = tag.text.trim().split('```')[1].trim();
2328
- var language = codeExample.split('\n')[0];
2329
- if (language === 'markup' || language === 'typescript') {
2330
- codeExample = codeExample.slice(language.length).trim();
2331
- codeExampleLanguage = language;
2332
- }
2333
- break;
2334
- case 'param':
2335
- parameters = parameters || [];
2336
- parameters.push({
2337
- name: tag.param,
2338
- description: tag.text.trim()
2339
- });
2340
- break;
2341
- default:
2342
- extras[tag.tag] = tag.text;
2343
- break;
2344
- }
2345
- });
2346
- }
2347
- description = (comment.shortText || comment.text || '').trim();
2348
- }
2349
- return {
2350
- codeExample: codeExample,
2351
- codeExampleLanguage: codeExampleLanguage,
2352
- defaultValue: defaultValue,
2353
- deprecationWarning: deprecationWarning,
2354
- description: description,
2355
- extras: extras,
2356
- parameters: parameters
2357
- };
2358
- };
2359
- /**
2360
- * Parameter descriptions are derived from the parent's (function/method) comment.
2361
- */
2362
- SkyDocsTypeDocAdapterService.prototype.getParameterCommentTags = function (parameter, parentTags) {
2363
- var tags = this.getCommentTags(parameter.comment);
2364
- var paramTags = parentTags.parameters;
2365
- var tagParam = (paramTags) ? paramTags.find(function (param) { return param.name === parameter.name; }) : undefined;
2366
- if (!tagParam || !tagParam.description) {
2367
- return tags;
2368
- }
2369
- return __assign(__assign({}, tags), {
2370
- description: tagParam.description
2371
- });
2372
- };
2373
- /**
2374
- * Applies comment tag (e.g. `@param`) values to the provided definition, if the value is defined.
2375
- */
2376
- SkyDocsTypeDocAdapterService.prototype.applyCommentTagValues = function (definition, tags) {
2377
- if (tags.codeExample) {
2378
- definition.codeExample = tags.codeExample;
2379
- definition.codeExampleLanguage = tags.codeExampleLanguage;
2380
- }
2381
- if (tags.deprecationWarning !== undefined) {
2382
- definition.deprecationWarning = tags.deprecationWarning;
2383
- }
2384
- if (tags.description) {
2385
- definition.description = tags.description;
2386
- }
2387
- };
2388
- SkyDocsTypeDocAdapterService.prototype.getDecorator = function (child) {
2389
- var name = child.decorators && child.decorators[0] && child.decorators[0].name;
2390
- if (name) {
2391
- return { name: name };
2392
- }
2393
- };
2394
- SkyDocsTypeDocAdapterService.prototype.getPropertyName = function (property) {
2395
- var _a;
2396
- var decorators = property.decorators && property.decorators[0];
2397
- // Use the Input's bound property name, if found.
2398
- // e.g. @Input('foobar')
2399
- return ((_a = decorators === null || decorators === void 0 ? void 0 : decorators.arguments) === null || _a === void 0 ? void 0 : _a.bindingPropertyName)
2400
- ? decorators.arguments.bindingPropertyName.replace(/(\'|\")/g, '')
2401
- : property.name;
2402
- };
2403
- SkyDocsTypeDocAdapterService.prototype.getDefaultValue = function (child, tags) {
2404
- if (tags.defaultValue) {
2405
- return tags.defaultValue;
2406
- }
2407
- // TypeDoc version 0.20.x stopped auto-generating initializers for the default value
2408
- // (and replaced them with "...") due to the complicated logic it required.
2409
- // See: https://github.com/TypeStrong/typedoc/issues/1552
2410
- if (child.defaultValue === '...') {
2411
- return;
2412
- }
2413
- return child.defaultValue;
2414
- };
2415
- SkyDocsTypeDocAdapterService.prototype.getAnchorId = function (entry) {
2416
- var _a;
2417
- return entry.anchorId || ((_a = this.typeDefinitionsProvider) === null || _a === void 0 ? void 0 : _a.anchorIds[entry.name]) || '';
2418
- };
2419
- SkyDocsTypeDocAdapterService.ctorParameters = function () { return [
2420
- { type: SkyDocsTypeDefinitionsProvider, decorators: [{ type: Optional }] }
2421
- ]; };
2422
- SkyDocsTypeDocAdapterService = __decorate([
2423
- Injectable(),
2424
- __param(0, Optional())
2425
- ], SkyDocsTypeDocAdapterService);
2426
- return SkyDocsTypeDocAdapterService;
2427
- }());
2428
-
2429
- /**
2430
- * Handles all type definitions that have been converted from the third-party documentation generator.
2431
- */
2432
- var SkyDocsTypeDefinitionsService = /** @class */ (function () {
2433
- function SkyDocsTypeDefinitionsService(typeDefinitionsProvider, adapter) {
2434
- this.typeDefinitionsProvider = typeDefinitionsProvider;
2435
- this.adapter = adapter;
2436
- }
2437
- /**
2438
- * Returns type definitions from a specific source code location.
2439
- * @param sourceCodePath The directory of the source code you wish to pull type definitions from,
2440
- * relative to the application's root directory.
2441
- */
2442
- SkyDocsTypeDefinitionsService.prototype.getTypeDefinitions = function (sourceCodePath) {
2443
- var _this = this;
2444
- if (sourceCodePath.charAt(sourceCodePath.length - 1) !== '/') {
2445
- throw new Error('The source code path must end with a forward slash (`/`).');
2446
- }
2447
- var allDefinitions = this.typeDefinitionsProvider.typeDefinitions;
2448
- var requestedDir = sourceCodePath
2449
- .replace(/src\/app\/public\//, '')
2450
- .replace(/^\//, ''); // remove first slash.
2451
- var types = {
2452
- classes: [],
2453
- components: [],
2454
- directives: [],
2455
- enumerations: [],
2456
- interfaces: [],
2457
- pipes: [],
2458
- services: [],
2459
- typeAliases: []
2460
- };
2461
- if (!allDefinitions) {
2462
- console.warn("No types were found for this project!");
2463
- return types;
2464
- }
2465
- // Only process types that match the requested source code location.
2466
- var typeDefinitions = allDefinitions.filter(function (i) { return i.sources[0].fileName.match(requestedDir); });
2467
- if (typeDefinitions.length === 0) {
2468
- console.warn("Type definitions were not found for location: " + requestedDir);
2469
- }
2470
- typeDefinitions.forEach(function (item) {
2471
- var decorator = item.decorators && item.decorators[0].name;
2472
- var kindString = item.kindString;
2473
- switch (decorator) {
2474
- case 'Component':
2475
- types.components.push(_this.adapter.toDirectiveDefinition(item));
2476
- break;
2477
- case 'Directive':
2478
- types.directives.push(_this.adapter.toDirectiveDefinition(item));
2479
- break;
2480
- case 'Injectable':
2481
- types.services.push(_this.adapter.toClassDefinition(item));
2482
- break;
2483
- case 'NgModule':
2484
- // Don't document modules.
2485
- break;
2486
- case 'Pipe':
2487
- types.pipes.push(_this.adapter.toPipeDefinition(item));
2488
- break;
2489
- default:
2490
- /*tslint:disable-next-line:switch-default*/
2491
- switch (kindString) {
2492
- case 'Class':
2493
- types.classes.push(_this.adapter.toClassDefinition(item));
2494
- break;
2495
- case 'Interface':
2496
- types.interfaces.push(_this.adapter.toInterfaceDefinition(item));
2497
- break;
2498
- case 'Enumeration':
2499
- types.enumerations.push(_this.adapter.toEnumerationDefinition(item));
2500
- break;
2501
- case 'Type alias':
2502
- types.typeAliases.push(_this.adapter.toTypeAliasDefinition(item));
2503
- break;
2504
- }
2505
- }
2506
- });
2507
- return types;
2508
- };
2509
- SkyDocsTypeDefinitionsService.ctorParameters = function () { return [
2510
- { type: SkyDocsTypeDefinitionsProvider },
2511
- { type: SkyDocsTypeDocAdapterService }
2512
- ]; };
2513
- SkyDocsTypeDefinitionsService = __decorate([
2514
- Injectable()
2515
- ], SkyDocsTypeDefinitionsService);
2516
- return SkyDocsTypeDefinitionsService;
2517
- }());
2518
-
2519
- /**
2520
- * Adds same-page anchor tags around known TypeScript types.
2521
- */
2522
- var SkyDocsTypeAnchorLinksPipe = /** @class */ (function () {
2523
- function SkyDocsTypeAnchorLinksPipe(anchorLinkService) {
2524
- this.anchorLinkService = anchorLinkService;
2525
- }
2526
- SkyDocsTypeAnchorLinksPipe.prototype.transform = function (value, formatType) {
2527
- var anchorLinkConfig = {
2528
- applyCodeFormatting: (formatType !== 'no-code-tags')
2529
- };
2530
- return this.anchorLinkService.applyTypeAnchorLinks(value, anchorLinkConfig);
2531
- };
2532
- SkyDocsTypeAnchorLinksPipe.ctorParameters = function () { return [
2533
- { type: SkyDocsAnchorLinkService }
2534
- ]; };
2535
- SkyDocsTypeAnchorLinksPipe = __decorate([
2536
- Pipe({
2537
- name: 'skyDocsTypeAnchorLinks',
2538
- pure: true
2539
- })
2540
- ], SkyDocsTypeAnchorLinksPipe);
2541
- return SkyDocsTypeAnchorLinksPipe;
2542
- }());
2543
-
2544
- var SkyDocsTypeDefinitionsModule = /** @class */ (function () {
2545
- function SkyDocsTypeDefinitionsModule() {
2546
- }
2547
- SkyDocsTypeDefinitionsModule = __decorate([
2548
- NgModule({
2549
- imports: [
2550
- CommonModule,
2551
- RouterModule,
2552
- SkyCodeBlockModule,
2553
- SkyCodeModule,
2554
- SkyDefinitionListModule,
2555
- SkyDocsHeadingAnchorModule,
2556
- SkyDocsMarkdownModule,
2557
- SkyDocsSafeHtmlModule,
2558
- SkyIconModule,
2559
- SkyMediaQueryModule
2560
- ],
2561
- declarations: [
2562
- SkyDocsCallSignatureDefinitionComponent,
2563
- SkyDocsClassDefinitionComponent,
2564
- SkyDocsDirectiveDefinitionComponent,
2565
- SkyDocsEnumerationDefinitionComponent,
2566
- SkyDocsInterfaceDefinitionComponent,
2567
- SkyDocsMethodDefinitionsComponent,
2568
- SkyDocsPipeDefinitionComponent,
2569
- SkyDocsPropertyDefinitionsComponent,
2570
- SkyDocsTypeAliasDefinitionComponent,
2571
- SkyDocsTypeAnchorLinksPipe
2572
- ],
2573
- exports: [
2574
- SkyDocsCallSignatureDefinitionComponent,
2575
- SkyDocsClassDefinitionComponent,
2576
- SkyDocsDirectiveDefinitionComponent,
2577
- SkyDocsEnumerationDefinitionComponent,
2578
- SkyDocsInterfaceDefinitionComponent,
2579
- SkyDocsMethodDefinitionsComponent,
2580
- SkyDocsPipeDefinitionComponent,
2581
- SkyDocsPropertyDefinitionsComponent,
2582
- SkyDocsTypeAliasDefinitionComponent,
2583
- SkyDocsTypeAnchorLinksPipe
2584
- ],
2585
- providers: [
2586
- SkyDocsAnchorLinkService,
2587
- SkyDocsTypeAnchorLinksPipe,
2588
- SkyDocsTypeDefinitionsFormatService,
2589
- SkyDocsTypeDefinitionsProvider,
2590
- SkyDocsTypeDefinitionsService,
2591
- SkyDocsTypeDocAdapterService
2592
- ]
2593
- })
2594
- ], SkyDocsTypeDefinitionsModule);
2595
- return SkyDocsTypeDefinitionsModule;
2596
- }());
2597
-
2598
- /**
2599
- * Specifies a section of page content.
2600
- * @example
2601
- * ```
2602
- * <sky-docs-demo-page-section
2603
- * heading="Section heading"
2604
- * >
2605
- * Section content here.
2606
- * </sky-docs-demo-page-section>
2607
- * ```
2608
- */
2609
- var SkyDocsDemoPageSectionComponent = /** @class */ (function () {
2610
- function SkyDocsDemoPageSectionComponent() {
2611
- }
2612
- Object.defineProperty(SkyDocsDemoPageSectionComponent.prototype, "anchorId", {
2613
- get: function () {
2614
- return "section-" + this.getSanitizedName(this.heading);
2615
- },
2616
- enumerable: true,
2617
- configurable: true
2618
- });
2619
- SkyDocsDemoPageSectionComponent.prototype.getSanitizedName = function (value) {
2620
- if (!value) {
2621
- return;
2622
- }
2623
- var sanitized = value.toLowerCase()
2624
- // Remove special characters.
2625
- .replace(/[\_\~\`\@\!\#\$\%\^\&\*\(\)\[\]\{\}\;\:\'\/\\\<\>\,\.\?\=\+\|"]/g, '')
2626
- // Replace space characters with a dash.
2627
- .replace(/\s/g, '-')
2628
- // Remove any double-dashes.
2629
- .replace(/--/g, '-');
2630
- return sanitized;
2631
- };
2632
- __decorate([
2633
- Input()
2634
- ], SkyDocsDemoPageSectionComponent.prototype, "heading", void 0);
2635
- SkyDocsDemoPageSectionComponent = __decorate([
2636
- Component({
2637
- selector: 'sky-docs-demo-page-section',
2638
- template: "<div class=\"sky-docs-demo-page-section sky-rounded-corners\">\n <div *ngIf=\"heading\"\n class=\"sky-docs-demo-page-section-header\"\n >\n <sky-docs-heading-anchor\n headingLevel=\"2\"\n [anchorId]=\"anchorId\"\n >\n {{ heading }}\n </sky-docs-heading-anchor>\n </div>\n <div class=\"sky-docs-demo-page-section-body\">\n <ng-content></ng-content>\n </div>\n</div>",
2639
- changeDetection: ChangeDetectionStrategy.OnPush,
2640
- styles: [".sky-docs-demo-page-section{margin-bottom:50px}"]
2641
- })
2642
- ], SkyDocsDemoPageSectionComponent);
2643
- return SkyDocsDemoPageSectionComponent;
2644
- }());
2645
-
2646
- /**
2647
- * The page summary provides a section at the top of the page
2648
- * to summarize what a user should expect to find or learn on the page.
2649
- * @example
2650
- * ```
2651
- * <sky-docs-demo-page-summary>
2652
- * Page summary here.
2653
- * </sky-docs-demo-page-summary>
2654
- * ```
2655
- */
2656
- var SkyDocsDemoPageSummaryComponent = /** @class */ (function () {
2657
- function SkyDocsDemoPageSummaryComponent() {
2658
- }
2659
- SkyDocsDemoPageSummaryComponent = __decorate([
2660
- Component({
2661
- selector: 'sky-docs-demo-page-summary',
2662
- template: "<div class=\"sky-docs-demo-page-summary\">\n <ng-content></ng-content>\n</div>\n",
2663
- changeDetection: ChangeDetectionStrategy.OnPush,
2664
- styles: [".sky-docs-demo-page-summary{margin-bottom:20px}"]
2665
- })
2666
- ], SkyDocsDemoPageSummaryComponent);
2667
- return SkyDocsDemoPageSummaryComponent;
2668
- }());
2669
-
2670
- /**
2671
- * @internal
2672
- */
2673
- var SkyDocsDemoPageTitleService = /** @class */ (function () {
2674
- function SkyDocsDemoPageTitleService(title) {
2675
- this.title = title;
2676
- }
2677
- SkyDocsDemoPageTitleService.prototype.setTitle = function () {
2678
- var parts = [];
2679
- for (var _i = 0; _i < arguments.length; _i++) {
2680
- parts[_i] = arguments[_i];
2681
- }
2682
- var windowTitle = 'SKY UX';
2683
- if (parts && parts.length > 0) {
2684
- parts.push(windowTitle);
2685
- windowTitle = parts.join(' - ');
2686
- }
2687
- this.title.setTitle(windowTitle);
2688
- };
2689
- SkyDocsDemoPageTitleService.ctorParameters = function () { return [
2690
- { type: Title }
2691
- ]; };
2692
- SkyDocsDemoPageTitleService = __decorate([
2693
- Injectable()
2694
- ], SkyDocsDemoPageTitleService);
2695
- return SkyDocsDemoPageTitleService;
2696
- }());
2697
-
2698
- var SkyDocsDesignGuidelinesComponent = /** @class */ (function () {
2699
- function SkyDocsDesignGuidelinesComponent() {
2700
- }
2701
- SkyDocsDesignGuidelinesComponent = __decorate([
2702
- Component({
2703
- selector: 'sky-docs-design-guidelines',
2704
- template: "<div class=\"sky-docs-design-guidelines\">\n <ng-content></ng-content>\n</div>\n",
2705
- changeDetection: ChangeDetectionStrategy.OnPush
2706
- })
2707
- ], SkyDocsDesignGuidelinesComponent);
2708
- return SkyDocsDesignGuidelinesComponent;
2709
- }());
2710
-
2711
- var SkyDocsSupportalService = /** @class */ (function () {
2712
- function SkyDocsSupportalService(http) {
2713
- this.http = http;
2714
- }
2715
- SkyDocsSupportalService.prototype.getComponentsInfo = function () {
2716
- return this.http
2717
- .get('https://sky-pusa01.app.blackbaud.net/skysp/v1/docs/components-info')
2718
- .pipe(map(function (results) { return results.components; }), share());
2719
- };
2720
- SkyDocsSupportalService.ctorParameters = function () { return [
2721
- { type: HttpClient }
2722
- ]; };
2723
- SkyDocsSupportalService = __decorate([
2724
- Injectable()
2725
- ], SkyDocsSupportalService);
2726
- return SkyDocsSupportalService;
2727
- }());
2728
-
2729
- /**
2730
- * @internal
2731
- */
2732
- var SkyDocsDemoPageDomAdapterService = /** @class */ (function () {
2733
- function SkyDocsDemoPageDomAdapterService(windowRef) {
2734
- var _this = this;
2735
- this.windowRef = windowRef;
2736
- this._anchorLinkClick = new Subject();
2737
- this.eventListener = function (e) {
2738
- e.preventDefault();
2739
- _this._anchorLinkClick.next({
2740
- href: e.target.href
2741
- });
2742
- };
2743
- }
2744
- Object.defineProperty(SkyDocsDemoPageDomAdapterService.prototype, "anchorLinks", {
2745
- get: function () {
2746
- return document.querySelectorAll('a.sky-docs-anchor-link');
2747
- },
2748
- enumerable: true,
2749
- configurable: true
2750
- });
2751
- Object.defineProperty(SkyDocsDemoPageDomAdapterService.prototype, "currentUrl", {
2752
- get: function () {
2753
- return this.windowRef.nativeWindow.location.href.split('#')[0];
2754
- },
2755
- enumerable: true,
2756
- configurable: true
2757
- });
2758
- SkyDocsDemoPageDomAdapterService.prototype.ngOnDestroy = function () {
2759
- this.removeClickEventListeners();
2760
- };
2761
- SkyDocsDemoPageDomAdapterService.prototype.setupAnchorLinks = function () {
2762
- for (var index = 0; index < this.anchorLinks.length; index++) {
2763
- var anchor = this.anchorLinks[index];
2764
- var fragment = anchor.href.split('#')[1];
2765
- var url = this.currentUrl;
2766
- var href = url + "#" + fragment;
2767
- anchor.href = href;
2768
- }
2769
- };
2770
- Object.defineProperty(SkyDocsDemoPageDomAdapterService.prototype, "anchorLinkClick", {
2771
- get: function () {
2772
- if (this._anchorLinkClick.observers.length === 0) {
2773
- this.addClickEventListeners();
2774
- }
2775
- else {
2776
- this.removeClickEventListeners();
2777
- }
2778
- return this._anchorLinkClick;
2779
- },
2780
- enumerable: true,
2781
- configurable: true
2782
- });
2783
- SkyDocsDemoPageDomAdapterService.prototype.scrollToFragment = function (fragment) {
2784
- var _this = this;
2785
- this.windowRef.nativeWindow.setTimeout(function () {
2786
- var element = document.getElementById(fragment);
2787
- if (element) {
2788
- _this.windowRef.nativeWindow.scrollTo(0, element.offsetTop);
2789
- }
2790
- }, 250);
2791
- };
2792
- SkyDocsDemoPageDomAdapterService.prototype.addClickEventListeners = function () {
2793
- var _this = this;
2794
- // Wait for a tick to allow all anchors to be written.
2795
- this.windowRef.nativeWindow.setTimeout(function () {
2796
- for (var index = 0; index < _this.anchorLinks.length; index++) {
2797
- var anchor = _this.anchorLinks[index];
2798
- anchor.addEventListener('click', _this.eventListener);
2799
- }
2800
- });
2801
- };
2802
- SkyDocsDemoPageDomAdapterService.prototype.removeClickEventListeners = function () {
2803
- for (var index = 0; index < this.anchorLinks.length; index++) {
2804
- var anchor = this.anchorLinks[index];
2805
- anchor.removeEventListener('click', this.eventListener);
2806
- }
2807
- };
2808
- SkyDocsDemoPageDomAdapterService.ctorParameters = function () { return [
2809
- { type: SkyAppWindowRef }
2810
- ]; };
2811
- SkyDocsDemoPageDomAdapterService = __decorate([
2812
- Injectable()
2813
- ], SkyDocsDemoPageDomAdapterService);
2814
- return SkyDocsDemoPageDomAdapterService;
2815
- }());
2816
-
2817
- /**
2818
- * The demo page component wraps all documentation components and handles the configuration and layout of the page.
2819
- * @example
2820
- * ```
2821
- * <sky-docs-demo-page
2822
- * pageTitle="My demo page"
2823
- * >
2824
- * Content here.
2825
- * </sky-docs-demo-page>
2826
- * ```
2827
- */
2828
- var SkyDocsDemoPageComponent = /** @class */ (function () {
2829
- function SkyDocsDemoPageComponent(activatedRoute, changeDetector, router, skyAppConfig, domAdapter, supportalService, titleService) {
2830
- this.activatedRoute = activatedRoute;
2831
- this.changeDetector = changeDetector;
2832
- this.router = router;
2833
- this.skyAppConfig = skyAppConfig;
2834
- this.domAdapter = domAdapter;
2835
- this.supportalService = supportalService;
2836
- this.titleService = titleService;
2837
- /**
2838
- * @internal
2839
- */
2840
- this.enableCodeExamples = false;
2841
- /**
2842
- * @internal
2843
- */
2844
- this.enableTabLayout = false;
2845
- }
2846
- SkyDocsDemoPageComponent.prototype.ngOnInit = function () {
2847
- var _this = this;
2848
- var currentHostUrl = this.skyAppConfig.skyux.host.url + '/' + this.skyAppConfig.skyux.name;
2849
- this.updateTitle();
2850
- this.supportalService
2851
- .getComponentsInfo()
2852
- .subscribe(function (results) {
2853
- _this.sidebarRoutes = [{
2854
- name: 'Components',
2855
- path: 'https://developer.blackbaud.com/skyux/components',
2856
- children: results.map(function (component) { return ({
2857
- name: component.name,
2858
- path: _this.getPath(component.url, currentHostUrl)
2859
- }); })
2860
- }];
2861
- _this.changeDetector.markForCheck();
2862
- });
2863
- };
2864
- SkyDocsDemoPageComponent.prototype.ngAfterContentInit = function () {
2865
- this.enableCodeExamples = (this.codeExampleComponents.length > 0);
2866
- this.enableTabLayout = !!(this.designGuidelinesComponent);
2867
- };
2868
- SkyDocsDemoPageComponent.prototype.ngAfterViewInit = function () {
2869
- var _this = this;
2870
- // Watch for route fragment to change and scroll to heading.
2871
- this.activatedRoute.fragment.subscribe(function (fragment) {
2872
- _this.domAdapter.scrollToFragment(fragment);
2873
- });
2874
- // Change the HREF attribute for all dynamic links when the query params change.
2875
- // This will also generate the appropriate HREF if the user wants to open the link in a new window.
2876
- this.activatedRoute.queryParams.subscribe(function () {
2877
- _this.domAdapter.setupAnchorLinks();
2878
- });
2879
- // When a dynamic link is clicked, use Angular's router so that everything works correctly.
2880
- this.domAdapter.anchorLinkClick.subscribe(function (anchorLink) {
2881
- var fragment = anchorLink.href.split('#')[1];
2882
- _this.router.navigate([], {
2883
- fragment: fragment,
2884
- queryParamsHandling: 'merge'
2885
- });
2886
- if (_this.activatedRoute.snapshot.fragment === fragment) {
2887
- _this.domAdapter.scrollToFragment(fragment);
2888
- }
2889
- });
2890
- };
2891
- SkyDocsDemoPageComponent.prototype.updateTitle = function () {
2892
- if (this.pageTitle) {
2893
- this.titleService.setTitle(this.pageTitle, 'Components');
2894
- }
2895
- };
2896
- SkyDocsDemoPageComponent.prototype.getPath = function (url, currentHostUrl) {
2897
- // Replace host + SPA so Stache will mark active.
2898
- // Strip URL params is url is local, as those will be preserved by stacheRouterLink.
2899
- if (url.indexOf(currentHostUrl) > -1) {
2900
- return url.replace(currentHostUrl, '').split('?')[0];
2901
- }
2902
- else {
2903
- return url;
2904
- }
2905
- };
2906
- SkyDocsDemoPageComponent.ctorParameters = function () { return [
2907
- { type: ActivatedRoute },
2908
- { type: ChangeDetectorRef },
2909
- { type: Router },
2910
- { type: SkyAppConfig },
2911
- { type: SkyDocsDemoPageDomAdapterService },
2912
- { type: SkyDocsSupportalService },
2913
- { type: SkyDocsDemoPageTitleService }
2914
- ]; };
2915
- __decorate([
2916
- Input()
2917
- ], SkyDocsDemoPageComponent.prototype, "gitRepoUrl", void 0);
2918
- __decorate([
2919
- Input()
2920
- ], SkyDocsDemoPageComponent.prototype, "moduleName", void 0);
2921
- __decorate([
2922
- Input()
2923
- ], SkyDocsDemoPageComponent.prototype, "moduleSourceCodePath", void 0);
2924
- __decorate([
2925
- Input()
2926
- ], SkyDocsDemoPageComponent.prototype, "packageName", void 0);
2927
- __decorate([
2928
- Input()
2929
- ], SkyDocsDemoPageComponent.prototype, "packageUrl", void 0);
2930
- __decorate([
2931
- Input()
2932
- ], SkyDocsDemoPageComponent.prototype, "pageTitle", void 0);
2933
- __decorate([
2934
- ContentChild(SkyDocsDesignGuidelinesComponent)
2935
- ], SkyDocsDemoPageComponent.prototype, "designGuidelinesComponent", void 0);
2936
- __decorate([
2937
- ContentChildren(SkyDocsCodeExamplesComponent)
2938
- ], SkyDocsDemoPageComponent.prototype, "codeExampleComponents", void 0);
2939
- SkyDocsDemoPageComponent = __decorate([
2940
- Component({
2941
- selector: 'sky-docs-demo-page',
2942
- template: "<div class=\"sky-docs-demo-page\">\n <stache\n layout=\"sidebar\"\n [pageTitle]=\"pageTitle\"\n [showBreadcrumbs]=\"false\"\n [showTableOfContents]=\"false\"\n [sidebarRoutes]=\"sidebarRoutes\"\n >\n <ng-content\n select=\"sky-docs-demo-page-summary\"\n ></ng-content>\n\n <ng-content\n select=\"sky-docs-demo\"\n ></ng-content>\n\n <div\n class=\"sky-docs-demo-page-main\"\n >\n <sky-tabset *ngIf=\"enableTabLayout else content\"\n permalinkId=\"docs\"\n >\n <sky-tab tabHeading=\"Design\">\n <ng-content\n select=\"sky-docs-design-guidelines\"\n ></ng-content>\n </sky-tab>\n\n <sky-tab tabHeading=\"Development\">\n <ng-container\n [ngTemplateOutlet]=\"content\"\n ></ng-container>\n </sky-tab>\n </sky-tabset>\n </div>\n </stache>\n</div>\n\n<ng-template #content>\n <sky-docs-demo-page-section *ngIf=\"moduleName\"\n heading=\"Installation\"\n >\n <sky-docs-module-info\n [gitRepoUrl]=\"gitRepoUrl\"\n [moduleName]=\"moduleName\"\n [packageName]=\"packageName\"\n [packageUrl]=\"packageUrl\"\n >\n <ng-content\n select=\"sky-docs-demo-page-module-info\"\n ></ng-content>\n </sky-docs-module-info>\n </sky-docs-demo-page-section>\n\n <ng-content></ng-content>\n\n <sky-docs-demo-page-type-definitions\n [moduleSourceCodePath]=\"moduleSourceCodePath\"\n >\n </sky-docs-demo-page-type-definitions>\n\n <sky-docs-demo-page-section *ngIf=\"enableCodeExamples\"\n heading=\"Code examples\"\n >\n <ng-content\n select=\"sky-docs-code-examples\"\n ></ng-content>\n </sky-docs-demo-page-section>\n</ng-template>",
2943
- providers: [
2944
- SkyDocsDemoPageDomAdapterService
2945
- ],
2946
- changeDetection: ChangeDetectionStrategy.OnPush,
2947
- styles: [".sky-docs-demo-page ::ng-deep p{margin:15px 0}.sky-docs-demo-page ::ng-deep .stache-max-width-container{max-width:none;margin:0}.sky-docs-demo-page ::ng-deep .sky-docs-code-block{margin:15px 0;display:block}.sky-docs-demo-page ::ng-deep .sky-docs-code-block .sky-code-block{font-size:13.5px}.sky-docs-demo-page ::ng-deep .sky-docs-code-block .sky-code-output{margin:-2px 0 0;padding:0 0 0 15px;background:0 0;border:0}.sky-docs-demo-page ::ng-deep .sky-definition-list{margin:0}.sky-docs-demo-page ::ng-deep .sky-definition-list .sky-docs-code-block{margin:0}.sky-docs-demo-page ::ng-deep .sky-docs-type-definition-wrapper{margin-bottom:40px}.sky-docs-demo-page-main{padding:30px 0}.sky-docs-demo-page-main table{margin-top:15px;margin-bottom:15px}.sky-docs-demo-page-main ::ng-deep .sky-tabset{margin-left:-45px;margin-right:-45px;padding-left:45px;padding-right:45px}"]
2948
- })
2949
- ], SkyDocsDemoPageComponent);
2950
- return SkyDocsDemoPageComponent;
2951
- }());
2952
-
2953
- var SkyDocsDemoPageModuleInfoComponent = /** @class */ (function () {
2954
- function SkyDocsDemoPageModuleInfoComponent() {
2955
- }
2956
- SkyDocsDemoPageModuleInfoComponent = __decorate([
2957
- Component({
2958
- selector: 'sky-docs-demo-page-module-info',
2959
- template: '<ng-content></ng-content>'
2960
- })
2961
- ], SkyDocsDemoPageModuleInfoComponent);
2962
- return SkyDocsDemoPageModuleInfoComponent;
2963
- }());
2964
-
2965
- /**
2966
- * @internal
2967
- */
2968
- var SkyDocsDemoPageTypeDefinitionsComponent = /** @class */ (function () {
2969
- function SkyDocsDemoPageTypeDefinitionsComponent(typeDefinitionService) {
2970
- this.typeDefinitionService = typeDefinitionService;
2971
- }
2972
- SkyDocsDemoPageTypeDefinitionsComponent.prototype.ngOnInit = function () {
2973
- if (this.moduleSourceCodePath) {
2974
- this.types = this.typeDefinitionService.getTypeDefinitions(this.moduleSourceCodePath);
2975
- }
2976
- };
2977
- SkyDocsDemoPageTypeDefinitionsComponent.ctorParameters = function () { return [
2978
- { type: SkyDocsTypeDefinitionsService }
2979
- ]; };
2980
- __decorate([
2981
- Input()
2982
- ], SkyDocsDemoPageTypeDefinitionsComponent.prototype, "moduleSourceCodePath", void 0);
2983
- SkyDocsDemoPageTypeDefinitionsComponent = __decorate([
2984
- Component({
2985
- selector: 'sky-docs-demo-page-type-definitions',
2986
- template: "<ng-template [ngIf]=\"types\">\n <sky-docs-demo-page-section *ngIf=\"types.components.length\"\n heading=\"Components\"\n >\n <sky-docs-directive-definition *ngFor=\"let config of types.components\"\n [config]=\"config\"\n ></sky-docs-directive-definition>\n </sky-docs-demo-page-section>\n\n <sky-docs-demo-page-section *ngIf=\"types.directives.length\"\n heading=\"Directives\"\n >\n <sky-docs-directive-definition *ngFor=\"let config of types.directives\"\n [config]=\"config\"\n ></sky-docs-directive-definition>\n </sky-docs-demo-page-section>\n\n <sky-docs-demo-page-section *ngIf=\"types.pipes.length\"\n heading=\"Pipes\"\n >\n <sky-docs-pipe-definition *ngFor=\"let config of types.pipes\"\n [config]=\"config\"\n ></sky-docs-pipe-definition>\n </sky-docs-demo-page-section>\n\n <sky-docs-demo-page-section *ngIf=\"types.services.length\"\n heading=\"Services\"\n >\n <sky-docs-class-definition *ngFor=\"let config of types.services\"\n [config]=\"config\"\n ></sky-docs-class-definition>\n </sky-docs-demo-page-section>\n\n <sky-docs-demo-page-section *ngIf=\"types.classes.length\"\n heading=\"Classes\"\n >\n <sky-docs-class-definition *ngFor=\"let config of types.classes\"\n [config]=\"config\"\n ></sky-docs-class-definition>\n </sky-docs-demo-page-section>\n\n <sky-docs-demo-page-section *ngIf=\"types.interfaces.length\"\n heading=\"Interfaces\"\n >\n <sky-docs-interface-definition *ngFor=\"let config of types.interfaces\"\n [config]=\"config\"\n ></sky-docs-interface-definition>\n </sky-docs-demo-page-section>\n\n <sky-docs-demo-page-section *ngIf=\"types.enumerations.length\"\n heading=\"Enumerations\"\n >\n <sky-docs-enumeration-definition *ngFor=\"let config of types.enumerations\"\n [config]=\"config\"\n ></sky-docs-enumeration-definition>\n </sky-docs-demo-page-section>\n\n <sky-docs-demo-page-section *ngIf=\"types.typeAliases.length\"\n heading=\"Type aliases\"\n >\n <sky-docs-type-alias-definition *ngFor=\"let config of types.typeAliases\"\n [config]=\"config\"\n ></sky-docs-type-alias-definition>\n </sky-docs-demo-page-section>\n</ng-template>",
2987
- changeDetection: ChangeDetectionStrategy.OnPush
2988
- })
2989
- ], SkyDocsDemoPageTypeDefinitionsComponent);
2990
- return SkyDocsDemoPageTypeDefinitionsComponent;
2991
- }());
2992
-
2993
- var SkyDocsDemoPageModule = /** @class */ (function () {
2994
- function SkyDocsDemoPageModule() {
2995
- }
2996
- SkyDocsDemoPageModule = __decorate([
2997
- NgModule({
2998
- imports: [
2999
- CommonModule,
3000
- RouterModule,
3001
- SkyCodeBlockModule,
3002
- SkyCodeModule,
3003
- SkyDocsDemoModule,
3004
- SkyDocsHeadingAnchorModule,
3005
- SkyDocsMarkdownModule,
3006
- SkyDocsModuleInfoModule,
3007
- SkyDocsTypeDefinitionsModule,
3008
- SkyTabsModule,
3009
- StachePageSummaryModule,
3010
- StacheWrapperModule
3011
- ],
3012
- declarations: [
3013
- SkyDocsDemoPageComponent,
3014
- SkyDocsDemoPageModuleInfoComponent,
3015
- SkyDocsDemoPageSectionComponent,
3016
- SkyDocsDemoPageSummaryComponent,
3017
- SkyDocsDemoPageTypeDefinitionsComponent
3018
- ],
3019
- exports: [
3020
- SkyDocsDemoPageComponent,
3021
- SkyDocsDemoPageModuleInfoComponent,
3022
- SkyDocsDemoPageSectionComponent,
3023
- SkyDocsDemoPageSummaryComponent,
3024
- SkyDocsDemoPageTypeDefinitionsComponent
3025
- ],
3026
- providers: [
3027
- SkyDocsDemoPageTitleService
3028
- ]
3029
- })
3030
- ], SkyDocsDemoPageModule);
3031
- return SkyDocsDemoPageModule;
3032
- }());
3033
-
3034
- var SkyDocsThumbnailComponent = /** @class */ (function () {
3035
- function SkyDocsThumbnailComponent() {
3036
- this.showBorder = false;
3037
- }
3038
- __decorate([
3039
- Input()
3040
- ], SkyDocsThumbnailComponent.prototype, "caption", void 0);
3041
- __decorate([
3042
- Input()
3043
- ], SkyDocsThumbnailComponent.prototype, "captionType", void 0);
3044
- __decorate([
3045
- Input()
3046
- ], SkyDocsThumbnailComponent.prototype, "imageAlt", void 0);
3047
- __decorate([
3048
- Input()
3049
- ], SkyDocsThumbnailComponent.prototype, "imageSource", void 0);
3050
- __decorate([
3051
- Input()
3052
- ], SkyDocsThumbnailComponent.prototype, "showBorder", void 0);
3053
- __decorate([
3054
- Input()
3055
- ], SkyDocsThumbnailComponent.prototype, "videoSource", void 0);
3056
- SkyDocsThumbnailComponent = __decorate([
3057
- Component({
3058
- selector: 'sky-docs-thumbnail',
3059
- template: "<div class=\"sky-docs-thumbnail\">\n <sky-image *ngIf=\"imageSource\"\n [caption]=\"caption\"\n [captionType]=\"captionType\"\n [imageAlt]=\"imageAlt\"\n [imageSource]=\"imageSource\"\n [showBorder]=\"showBorder\"\n [showCaptionPrefix]=\"false\"\n ></sky-image>\n <div *ngIf=\"videoSource\"\n class=\"sky-docs-video\"\n [ngClass]=\"{\n 'sky-docs-video-border': showBorder\n }\"\n >\n <video controls>\n <source\n [attr.src]=\"videoSource\"\n type=\"video/mp4\"\n />\n </video>\n </div>\n</div>\n",
3060
- changeDetection: ChangeDetectionStrategy.OnPush,
3061
- styles: [".sky-docs-thumbnail{margin-bottom:50px}.sky-docs-video video{max-width:100%}.sky-docs-video-border video{border-top:1px solid #e2e3e4;border-right:1px solid #e2e3e4;border-bottom:1px solid #e2e3e4;border-left:1px solid #e2e3e4}"]
3062
- })
3063
- ], SkyDocsThumbnailComponent);
3064
- return SkyDocsThumbnailComponent;
3065
- }());
3066
-
3067
- var SkyDocsThumbnailModule = /** @class */ (function () {
3068
- function SkyDocsThumbnailModule() {
3069
- }
3070
- SkyDocsThumbnailModule = __decorate([
3071
- NgModule({
3072
- imports: [
3073
- CommonModule,
3074
- SkyImageModule
3075
- ],
3076
- exports: [
3077
- SkyDocsThumbnailComponent
3078
- ],
3079
- declarations: [
3080
- SkyDocsThumbnailComponent
3081
- ]
3082
- })
3083
- ], SkyDocsThumbnailModule);
3084
- return SkyDocsThumbnailModule;
3085
- }());
3086
-
3087
- var SkyDocsDesignGuidelineThumbnailComponent = /** @class */ (function () {
3088
- function SkyDocsDesignGuidelineThumbnailComponent() {
3089
- this.showBorder = false;
3090
- }
3091
- __decorate([
3092
- Input()
3093
- ], SkyDocsDesignGuidelineThumbnailComponent.prototype, "caption", void 0);
3094
- __decorate([
3095
- Input()
3096
- ], SkyDocsDesignGuidelineThumbnailComponent.prototype, "captionType", void 0);
3097
- __decorate([
3098
- Input()
3099
- ], SkyDocsDesignGuidelineThumbnailComponent.prototype, "imageAlt", void 0);
3100
- __decorate([
3101
- Input()
3102
- ], SkyDocsDesignGuidelineThumbnailComponent.prototype, "imageSource", void 0);
3103
- __decorate([
3104
- Input()
3105
- ], SkyDocsDesignGuidelineThumbnailComponent.prototype, "videoSource", void 0);
3106
- __decorate([
3107
- Input()
3108
- ], SkyDocsDesignGuidelineThumbnailComponent.prototype, "showBorder", void 0);
3109
- SkyDocsDesignGuidelineThumbnailComponent = __decorate([
3110
- Component({
3111
- selector: 'sky-docs-design-guideline-thumbnail',
3112
- template: "<div class=\"sky-docs-design-guideline-thumbnail\">\n <sky-docs-thumbnail\n [caption]=\"caption\"\n [captionType]=\"captionType\"\n [imageAlt]=\"imageAlt\"\n [imageSource]=\"imageSource\"\n [videoSource]=\"videoSource\"\n [showBorder]=\"showBorder\"\n ></sky-docs-thumbnail>\n</div>\n",
3113
- changeDetection: ChangeDetectionStrategy.OnPush,
3114
- styles: [".sky-docs-design-guideline-thumbnail{margin-bottom:50px}.sky-docs-design-guideline-video video{max-width:100%}.sky-docs-design-guideline-video-border video{border-top:1px solid #e2e3e4;border-right:1px solid #e2e3e4;border-bottom:1px solid #e2e3e4;border-left:1px solid #e2e3e4}"]
3115
- })
3116
- ], SkyDocsDesignGuidelineThumbnailComponent);
3117
- return SkyDocsDesignGuidelineThumbnailComponent;
3118
- }());
3119
-
3120
- var SkyDocsDesignGuidelineComponent = /** @class */ (function () {
3121
- function SkyDocsDesignGuidelineComponent() {
3122
- this.headingStyle = 'default';
3123
- this.hasThumbnails = false;
3124
- }
3125
- Object.defineProperty(SkyDocsDesignGuidelineComponent.prototype, "classNames", {
3126
- get: function () {
3127
- var classNames = [];
3128
- classNames.push("sky-text-" + this.headingStyle);
3129
- return classNames.join(' ');
3130
- },
3131
- enumerable: true,
3132
- configurable: true
3133
- });
3134
- SkyDocsDesignGuidelineComponent.prototype.ngAfterContentInit = function () {
3135
- this.hasThumbnails = !!this.thumbnails.length;
3136
- };
3137
- __decorate([
3138
- Input()
3139
- ], SkyDocsDesignGuidelineComponent.prototype, "heading", void 0);
3140
- __decorate([
3141
- Input()
3142
- ], SkyDocsDesignGuidelineComponent.prototype, "headingStyle", void 0);
3143
- __decorate([
3144
- ContentChildren(SkyDocsDesignGuidelineThumbnailComponent)
3145
- ], SkyDocsDesignGuidelineComponent.prototype, "thumbnails", void 0);
3146
- SkyDocsDesignGuidelineComponent = __decorate([
3147
- Component({
3148
- selector: 'sky-docs-design-guideline',
3149
- template: "<div class=\"sky-docs-design-guideline\">\n <h3 *ngIf=\"heading\"\n class=\"sky-docs-design-guideline-heading\"\n [ngClass]=\"classNames\"\n >\n {{ heading }}\n </h3>\n <sky-row *ngIf=\"hasThumbnails; else content\">\n <sky-column\n screenSmall=\"6\"\n screenMedium=\"5\"\n screenLarge=\"4\"\n >\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </sky-column>\n <sky-column\n screenSmall=\"6\"\n screenMedium=\"7\"\n screenLarge=\"8\"\n >\n <div class=\"sky-docs-design-guideline-thumbnails\">\n <ng-container *ngTemplateOutlet=\"thumbnails\"></ng-container>\n </div>\n </sky-column>\n </sky-row>\n</div>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n\n<ng-template #thumbnails>\n <ng-content select=\"sky-docs-design-guideline-thumbnail\"></ng-content>\n</ng-template>\n",
3150
- changeDetection: ChangeDetectionStrategy.OnPush,
3151
- styles: [".sky-docs-design-guideline-heading{line-height:1.1;font-family:\"Blackbaud Sans\",\"Helvetica Neue\",Arial,sans-serif;color:#212327;margin:30px 0 15px;font-size:19px;font-weight:400}.sky-docs-design-guideline-thumbnails{display:flex;flex-wrap:wrap}.sky-docs-design-guideline-thumbnails ::ng-deep sky-docs-design-guideline-thumbnail:first-child{padding-right:20px}"]
3152
- })
3153
- ], SkyDocsDesignGuidelineComponent);
3154
- return SkyDocsDesignGuidelineComponent;
3155
- }());
3156
-
3157
- var SkyDocsDesignGuidelinesModule = /** @class */ (function () {
3158
- function SkyDocsDesignGuidelinesModule() {
3159
- }
3160
- SkyDocsDesignGuidelinesModule = __decorate([
3161
- NgModule({
3162
- imports: [
3163
- CommonModule,
3164
- SkyDocsThumbnailModule,
3165
- SkyFluidGridModule
3166
- ],
3167
- declarations: [
3168
- SkyDocsDesignGuidelineComponent,
3169
- SkyDocsDesignGuidelineThumbnailComponent,
3170
- SkyDocsDesignGuidelinesComponent
3171
- ],
3172
- exports: [
3173
- SkyDocsDesignGuidelineComponent,
3174
- SkyDocsDesignGuidelineThumbnailComponent,
3175
- SkyDocsDesignGuidelinesComponent
3176
- ]
3177
- })
3178
- ], SkyDocsDesignGuidelinesModule);
3179
- return SkyDocsDesignGuidelinesModule;
3180
- }());
3181
-
3182
- /**
3183
- * This module conveniently exports the most commonly used modules.
3184
- */
3185
- var SkyDocsToolsModule = /** @class */ (function () {
3186
- function SkyDocsToolsModule() {
3187
- }
3188
- SkyDocsToolsModule = __decorate([
3189
- NgModule({
3190
- exports: [
3191
- SkyAuthHttpClientModule,
3192
- SkyDocsAnatomyModule,
3193
- SkyDocsCodeExamplesModule,
3194
- SkyDocsDemoModule,
3195
- SkyDocsDemoPageModule,
3196
- SkyDocsDesignGuidelinesModule
3197
- ],
3198
- providers: [
3199
- SkyDocsSupportalService
3200
- ]
3201
- })
3202
- ], SkyDocsToolsModule);
3203
- return SkyDocsToolsModule;
3204
- }());
3205
-
3206
- /**
3207
- * Generated bundle index. Do not edit.
3208
- */
3209
-
3210
- export { SkyDocsAnatomyModule, SkyDocsCodeExampleTheme, SkyDocsCodeExamplesModule, SkyDocsDemoModule, SkyDocsDemoPageModule, SkyDocsDesignGuidelinesModule, SkyDocsHeadingAnchorModule, SkyDocsMarkdownModule, SkyDocsMarkdownPipe, SkyDocsModuleInfoModule, SkyDocsSourceCodeProvider, SkyDocsSupportalService, SkyDocsThumbnailModule, SkyDocsToolsModule, SkyDocsToolsOptions, SkyDocsTypeDefinitionsModule, SkyDocsTypeDefinitionsProvider, SkyDocsTypeDefinitionsService, SkyDocsAnatomyComponent as ɵa, SkyDocsAnatomyItemComponent as ɵb, SkyDocsMethodDefinitionsComponent as ɵba, SkyDocsPipeDefinitionComponent as ɵbb, SkyDocsPropertyDefinitionsComponent as ɵbc, SkyDocsTypeAliasDefinitionComponent as ɵbd, SkyDocsTypeAnchorLinksPipe as ɵbe, SkyDocsAnchorLinkService as ɵbf, SkyDocsTypeDocAdapterService as ɵbg, SkyDocsDemoPageComponent as ɵbh, SkyDocsDemoPageDomAdapterService as ɵbi, SkyDocsDesignGuidelinesComponent as ɵbj, SkyDocsDemoPageTitleService as ɵbk, SkyDocsDemoPageModuleInfoComponent as ɵbl, SkyDocsDemoPageSectionComponent as ɵbm, SkyDocsDemoPageSummaryComponent as ɵbn, SkyDocsDemoPageTypeDefinitionsComponent as ɵbo, SkyDocsThumbnailComponent as ɵbp, SkyDocsDesignGuidelineComponent as ɵbq, SkyDocsDesignGuidelineThumbnailComponent as ɵbr, SkyDocsSourceCodeModule as ɵc, SkyDocsSourceCodeService as ɵd, SkyDocsToolsResourcesModule as ɵe, SkyDocsToolsResourcesProvider as ɵf, SkyDocsCodeExampleComponent as ɵg, SkyDocsCodeExamplesComponent as ɵh, SkyDocsCodeExamplesEditorService as ɵi, SkyDocsDemoComponent as ɵj, SkyDocsDemoThemeService as ɵk, SkyDocsDemoControlPanelComponent as ɵl, SkyDocsDemoControlPanelRadioGroupComponent as ɵm, SkyDocsDemoControlPanelCheckboxComponent as ɵn, SkyDocsDemoControlPanelSectionComponent as ɵo, SkyDocsDemoControlPanelThemeComponent as ɵp, SkyDocsHeadingAnchorComponent as ɵq, SkyDocsModuleInfoComponent as ɵr, SkyDocsSafeHtmlModule as ɵs, SkyDocsSafeHtmlComponent as ɵt, SkyDocsCallSignatureDefinitionComponent as ɵu, SkyDocsTypeDefinitionsFormatService as ɵv, SkyDocsClassDefinitionComponent as ɵw, SkyDocsDirectiveDefinitionComponent as ɵx, SkyDocsEnumerationDefinitionComponent as ɵy, SkyDocsInterfaceDefinitionComponent as ɵz };
3211
- //# sourceMappingURL=skyux-docs-tools.js.map