@skyux/docs-tools 4.9.6 → 5.0.0-beta.10

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