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