@skyux/docs-tools 5.0.0-beta.0 → 5.0.0-beta.12
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 +2098 -1852
- 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 +75 -57
- 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 +144 -71
- 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 +1746 -1603
- 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 +7 -5
- package/package.json +23 -35
- 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 -148
- 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 -3201
- 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,14 +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.
|
|
261
|
+
// e.g. `"@skyux/core": "*"` --> `"@skyux/core": "5.0.0"`
|
|
262
|
+
for (const packageName in mergedDependencies) {
|
|
263
|
+
/*istanbul ignore else*/
|
|
264
|
+
if (mergedDependencies.hasOwnProperty(packageName)) {
|
|
265
|
+
const version = mergedDependencies[packageName];
|
|
266
|
+
if (version === '*' &&
|
|
267
|
+
/^(@blackbaud\/skyux-lib-|@skyux)/.test(packageName)) {
|
|
268
|
+
mergedDependencies[packageName] = skyuxVersion;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
const files = this.parseStackBlitzFiles(codeExample.sourceCode, mergedDependencies, codeExample.theme, codeExample.stylesheets);
|
|
283
273
|
return {
|
|
284
274
|
files,
|
|
285
275
|
title: 'SKY UX Demo',
|
|
@@ -288,36 +278,34 @@ let SkyDocsCodeExamplesEditorService = class SkyDocsCodeExamplesEditorService {
|
|
|
288
278
|
dependencies: mergedDependencies,
|
|
289
279
|
settings: {
|
|
290
280
|
compile: {
|
|
291
|
-
clearConsole: false
|
|
292
|
-
}
|
|
293
|
-
}
|
|
281
|
+
clearConsole: false,
|
|
282
|
+
},
|
|
283
|
+
},
|
|
294
284
|
};
|
|
295
285
|
}
|
|
296
|
-
parseStackBlitzFiles(sourceCode, dependencies, theme) {
|
|
286
|
+
parseStackBlitzFiles(sourceCode, dependencies, theme, stylesheets = []) {
|
|
297
287
|
const srcPath = 'src/';
|
|
298
288
|
const appPath = `${srcPath}app/`;
|
|
299
289
|
const banner = `/**
|
|
300
290
|
* This file is needed for the StackBlitz demo only.
|
|
301
|
-
* It is automatically
|
|
302
|
-
* Visit https://developer.blackbaud/skyux for more information
|
|
291
|
+
* It is automatically provided when using the Angular CLI.
|
|
303
292
|
**/
|
|
304
293
|
`;
|
|
305
294
|
const moduleImportStatements = [
|
|
306
|
-
`import {\n
|
|
295
|
+
`import {\n NgModule\n} from '@angular/core';`,
|
|
307
296
|
`import {\n FormsModule,\n ReactiveFormsModule\n} from '@angular/forms';`,
|
|
308
|
-
`import {\n
|
|
309
|
-
`import {\n BrowserModule\n} from '@angular/platform-browser';`,
|
|
297
|
+
`import {\n BrowserAnimationsModule\n} from '@angular/platform-browser/animations';`,
|
|
310
298
|
`import {\n RouterModule\n} from '@angular/router';`,
|
|
311
299
|
`import {\n SkyAppLocaleProvider\n} from '@skyux/i18n';`,
|
|
312
300
|
`import {\n SkyThemeService\n} from '@skyux/theme';`,
|
|
313
301
|
`import {\n of as observableOf\n} from 'rxjs';`,
|
|
314
|
-
`import {\n AppComponent\n} from './app.component'
|
|
302
|
+
`import {\n AppComponent\n} from './app.component';`,
|
|
315
303
|
];
|
|
316
304
|
const moduleImports = [
|
|
317
|
-
'
|
|
305
|
+
'BrowserAnimationsModule',
|
|
318
306
|
'FormsModule',
|
|
319
307
|
'ReactiveFormsModule',
|
|
320
|
-
'RouterModule.forRoot([])'
|
|
308
|
+
'RouterModule.forRoot([])',
|
|
321
309
|
];
|
|
322
310
|
const files = {};
|
|
323
311
|
let appComponentTemplate = '';
|
|
@@ -357,16 +345,16 @@ export class AppComponent {
|
|
|
357
345
|
themeSvc: SkyThemeService,
|
|
358
346
|
renderer?: Renderer2
|
|
359
347
|
) {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
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
|
+
);
|
|
370
358
|
}
|
|
371
359
|
|
|
372
360
|
}`;
|
|
@@ -401,7 +389,9 @@ export class AppModule { }
|
|
|
401
389
|
This is a workaround for a known bug that prevents external imports in CSS.
|
|
402
390
|
https://github.com/stackblitz/core/issues/133
|
|
403
391
|
-->
|
|
404
|
-
<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
|
+
: ``}
|
|
405
395
|
|
|
406
396
|
<sky-demo-app>
|
|
407
397
|
Loading...
|
|
@@ -409,10 +399,6 @@ export class AppModule { }
|
|
|
409
399
|
files[`${srcPath}main.ts`] = `${banner}
|
|
410
400
|
import './polyfills';
|
|
411
401
|
|
|
412
|
-
import {
|
|
413
|
-
enableProdMode
|
|
414
|
-
} from '@angular/core';
|
|
415
|
-
|
|
416
402
|
import {
|
|
417
403
|
platformBrowserDynamic
|
|
418
404
|
} from '@angular/platform-browser-dynamic';
|
|
@@ -430,16 +416,17 @@ platformBrowserDynamic().bootstrapModule(AppModule).then(ref => {
|
|
|
430
416
|
}).catch(err => console.error(err));
|
|
431
417
|
`;
|
|
432
418
|
files[`${srcPath}polyfills.ts`] = `${banner}
|
|
433
|
-
import '
|
|
434
|
-
import 'core-js/es7/reflect';
|
|
435
|
-
import 'zone.js/dist/zone';
|
|
419
|
+
import 'zone.js';
|
|
436
420
|
`;
|
|
437
421
|
files[`${srcPath}styles.scss`] = `@import '~@skyux/theme/css/sky';
|
|
438
|
-
${theme === SkyDocsCodeExampleTheme.Modern
|
|
422
|
+
${theme === SkyDocsCodeExampleTheme.Modern
|
|
423
|
+
? `@import '~@skyux/theme/css/themes/modern/styles';`
|
|
424
|
+
: ``}
|
|
439
425
|
body {
|
|
440
426
|
background-color: #fff;
|
|
441
427
|
margin: 15px;
|
|
442
428
|
}`;
|
|
429
|
+
stylesheets.push('src/styles.scss');
|
|
443
430
|
files['angular.json'] = `{
|
|
444
431
|
"projects": {
|
|
445
432
|
"demo": {
|
|
@@ -447,9 +434,7 @@ body {
|
|
|
447
434
|
"build": {
|
|
448
435
|
"options": {
|
|
449
436
|
"index": "src/index.html",
|
|
450
|
-
"styles":
|
|
451
|
-
"src/styles.scss"
|
|
452
|
-
]
|
|
437
|
+
"styles": ${JSON.stringify(stylesheets)}
|
|
453
438
|
}
|
|
454
439
|
}
|
|
455
440
|
}
|
|
@@ -457,19 +442,28 @@ body {
|
|
|
457
442
|
}
|
|
458
443
|
}`;
|
|
459
444
|
files['package.json'] = JSON.stringify({
|
|
460
|
-
dependencies
|
|
445
|
+
dependencies,
|
|
461
446
|
}, undefined, 2);
|
|
462
447
|
files['tsconfig.json'] = `{
|
|
463
448
|
"compilerOptions": {
|
|
464
|
-
"target": "
|
|
449
|
+
"target": "es2017",
|
|
450
|
+
"module": "es2020",
|
|
465
451
|
"moduleResolution": "node",
|
|
466
452
|
"emitDecoratorMetadata": true,
|
|
467
453
|
"experimentalDecorators": true,
|
|
468
454
|
"importHelpers": true,
|
|
455
|
+
"typeRoots": ["node_modules/@types"],
|
|
469
456
|
"lib": [
|
|
470
|
-
"
|
|
471
|
-
"
|
|
457
|
+
"es2018",
|
|
458
|
+
"dom"
|
|
472
459
|
]
|
|
460
|
+
},
|
|
461
|
+
"angularCompilerOptions": {
|
|
462
|
+
"fullTemplateTypeCheck": true,
|
|
463
|
+
"strictInjectionParameters": true,
|
|
464
|
+
"strictInputAccessModifiers": true,
|
|
465
|
+
"strictTemplates": true,
|
|
466
|
+
"enableIvy": false
|
|
473
467
|
}
|
|
474
468
|
}`;
|
|
475
469
|
return files;
|
|
@@ -488,25 +482,80 @@ body {
|
|
|
488
482
|
throw 'You must export a component from the code example module!';
|
|
489
483
|
}
|
|
490
484
|
fragment = fragment.split(']')[0];
|
|
491
|
-
const components = fragment.split(',');
|
|
485
|
+
const components = fragment.split(',').filter((x) => x);
|
|
492
486
|
if (components.length > 1) {
|
|
493
|
-
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' +
|
|
494
488
|
`(we found ${components.length}: ${components.join(', ')}).` +
|
|
495
|
-
'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?');
|
|
496
490
|
}
|
|
497
491
|
return components[0];
|
|
498
492
|
}
|
|
499
493
|
getComponentSelector(componentClassName, sourceCode) {
|
|
500
494
|
const found = sourceCode.find((file) => {
|
|
501
|
-
return
|
|
495
|
+
return file.rawContents.indexOf(componentClassName) > -1;
|
|
502
496
|
});
|
|
503
497
|
const trimmed = found.rawContents.replace(/\s/g, '');
|
|
504
498
|
return trimmed.split(`selector:'`)[1].split(`'`)[0];
|
|
505
499
|
}
|
|
506
|
-
}
|
|
507
|
-
SkyDocsCodeExamplesEditorService =
|
|
508
|
-
|
|
509
|
-
|
|
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 }]; } });
|
|
510
559
|
|
|
511
560
|
/**
|
|
512
561
|
* Wraps all code examples and handles their configuration and styles.
|
|
@@ -523,10 +572,11 @@ SkyDocsCodeExamplesEditorService = __decorate([
|
|
|
523
572
|
* </sky-docs-code-examples>
|
|
524
573
|
* ```
|
|
525
574
|
*/
|
|
526
|
-
|
|
575
|
+
class SkyDocsCodeExamplesComponent {
|
|
527
576
|
constructor(editorService, sourceCodeService) {
|
|
528
577
|
this.editorService = editorService;
|
|
529
578
|
this.sourceCodeService = sourceCodeService;
|
|
579
|
+
this.stylesheets = [];
|
|
530
580
|
this.codeExamples = [];
|
|
531
581
|
}
|
|
532
582
|
/**
|
|
@@ -555,7 +605,8 @@ let SkyDocsCodeExamplesComponent = class SkyDocsCodeExamplesComponent {
|
|
|
555
605
|
heading: component.heading,
|
|
556
606
|
packageDependencies: this.packageDependencies,
|
|
557
607
|
sourceCode,
|
|
558
|
-
|
|
608
|
+
stylesheets: this.stylesheets,
|
|
609
|
+
theme: component.theme,
|
|
559
610
|
});
|
|
560
611
|
});
|
|
561
612
|
}
|
|
@@ -577,52 +628,58 @@ let SkyDocsCodeExamplesComponent = class SkyDocsCodeExamplesComponent {
|
|
|
577
628
|
return extension;
|
|
578
629
|
}
|
|
579
630
|
}
|
|
580
|
-
}
|
|
581
|
-
SkyDocsCodeExamplesComponent
|
|
582
|
-
{ type:
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
]
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
]
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
}
|
|
602
|
-
SkyDocsCodeExamplesModule =
|
|
603
|
-
|
|
604
|
-
|
|
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: [[
|
|
605
661
|
CommonModule,
|
|
606
662
|
SkyCodeBlockModule,
|
|
607
|
-
SkyDocsSourceCodeModule,
|
|
608
663
|
SkyDocsToolsResourcesModule,
|
|
609
664
|
SkyIconModule,
|
|
610
665
|
SkyRepeaterModule,
|
|
611
|
-
SkyVerticalTabsetModule
|
|
612
|
-
]
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
],
|
|
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
|
+
}] });
|
|
626
683
|
|
|
627
684
|
/**
|
|
628
685
|
* Renders a checkbox control within the control panel.
|
|
@@ -636,7 +693,7 @@ SkyDocsCodeExamplesModule = __decorate([
|
|
|
636
693
|
* </sky-docs-demo-control-panel-checkbox>
|
|
637
694
|
* ```
|
|
638
695
|
*/
|
|
639
|
-
|
|
696
|
+
class SkyDocsDemoControlPanelCheckboxComponent {
|
|
640
697
|
constructor(changeDetector) {
|
|
641
698
|
this.changeDetector = changeDetector;
|
|
642
699
|
/**
|
|
@@ -680,32 +737,28 @@ let SkyDocsDemoControlPanelCheckboxComponent = class SkyDocsDemoControlPanelChec
|
|
|
680
737
|
}
|
|
681
738
|
notifyChange() {
|
|
682
739
|
this.selectionChange.next({
|
|
683
|
-
[this.propertyName]: this.checked
|
|
740
|
+
[this.propertyName]: this.checked,
|
|
684
741
|
});
|
|
685
742
|
}
|
|
686
|
-
}
|
|
687
|
-
SkyDocsDemoControlPanelCheckboxComponent
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
]
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
],
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
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",
|
|
706
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
707
|
-
})
|
|
708
|
-
], 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
|
+
}] } });
|
|
709
762
|
|
|
710
763
|
/**
|
|
711
764
|
* Renders a radio control group.
|
|
@@ -724,7 +777,7 @@ SkyDocsDemoControlPanelCheckboxComponent = __decorate([
|
|
|
724
777
|
* </sky-docs-demo-control-panel-radio-group>
|
|
725
778
|
* ```
|
|
726
779
|
*/
|
|
727
|
-
|
|
780
|
+
class SkyDocsDemoControlPanelRadioGroupComponent {
|
|
728
781
|
constructor(changeDetector) {
|
|
729
782
|
this.changeDetector = changeDetector;
|
|
730
783
|
/**
|
|
@@ -745,7 +798,7 @@ let SkyDocsDemoControlPanelRadioGroupComponent = class SkyDocsDemoControlPanelRa
|
|
|
745
798
|
onModelChange(value) {
|
|
746
799
|
this.value = value;
|
|
747
800
|
this.selectionChange.next({
|
|
748
|
-
[this.propertyName]: this.value
|
|
801
|
+
[this.propertyName]: this.value,
|
|
749
802
|
});
|
|
750
803
|
}
|
|
751
804
|
resetValue() {
|
|
@@ -758,43 +811,28 @@ let SkyDocsDemoControlPanelRadioGroupComponent = class SkyDocsDemoControlPanelRa
|
|
|
758
811
|
}
|
|
759
812
|
return value;
|
|
760
813
|
}
|
|
761
|
-
}
|
|
762
|
-
SkyDocsDemoControlPanelRadioGroupComponent
|
|
763
|
-
{ type:
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
],
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
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",
|
|
784
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
785
|
-
styles: [".sky-demo-control-panel-radio-group{margin-bottom:20px}ul{margin:0}"]
|
|
786
|
-
})
|
|
787
|
-
], SkyDocsDemoControlPanelRadioGroupComponent);
|
|
788
|
-
|
|
789
|
-
let SkyDocsDemoThemeService = class SkyDocsDemoThemeService {
|
|
790
|
-
constructor() {
|
|
791
|
-
this.supportsTheming = new BehaviorSubject(false);
|
|
792
|
-
this.themeSettings = new BehaviorSubject(undefined);
|
|
793
|
-
}
|
|
794
|
-
};
|
|
795
|
-
SkyDocsDemoThemeService = __decorate([
|
|
796
|
-
Injectable()
|
|
797
|
-
], 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
|
+
}] } });
|
|
798
836
|
|
|
799
837
|
/**
|
|
800
838
|
* Handles the appearance and configuration of the behavior demo control panel.
|
|
@@ -807,9 +845,8 @@ SkyDocsDemoThemeService = __decorate([
|
|
|
807
845
|
* </sky-docs-demo-control-panel>
|
|
808
846
|
* ```
|
|
809
847
|
*/
|
|
810
|
-
|
|
811
|
-
constructor(
|
|
812
|
-
this.demoThemeSvc = demoThemeSvc;
|
|
848
|
+
class SkyDocsDemoControlPanelComponent {
|
|
849
|
+
constructor() {
|
|
813
850
|
/**
|
|
814
851
|
* Fires when the user clicks the reset button.
|
|
815
852
|
*/
|
|
@@ -843,43 +880,42 @@ let SkyDocsDemoControlPanelComponent = class SkyDocsDemoControlPanelComponent {
|
|
|
843
880
|
});
|
|
844
881
|
this.reset.emit();
|
|
845
882
|
}
|
|
846
|
-
onThemeSettingsChange(themeSettings) {
|
|
847
|
-
this.demoThemeSvc.themeSettings.next(themeSettings);
|
|
848
|
-
}
|
|
849
883
|
addEventListeners() {
|
|
850
884
|
if (this.eventListeners) {
|
|
851
885
|
this.eventListeners.unsubscribe();
|
|
852
886
|
}
|
|
853
|
-
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))
|
|
854
888
|
.pipe(takeUntil(this.ngUnsubscribe))
|
|
855
889
|
.subscribe((change) => {
|
|
856
890
|
this.selectionChange.next(change);
|
|
857
891
|
});
|
|
858
892
|
}
|
|
859
|
-
}
|
|
860
|
-
SkyDocsDemoControlPanelComponent
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
],
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
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
|
+
}] } });
|
|
883
919
|
|
|
884
920
|
/**
|
|
885
921
|
* Wraps all behavior demo components and handles the configuration and appearance of the behavior demo.
|
|
@@ -890,9 +926,8 @@ SkyDocsDemoControlPanelComponent = __decorate([
|
|
|
890
926
|
* </sky-docs-demo>
|
|
891
927
|
* ```
|
|
892
928
|
*/
|
|
893
|
-
|
|
894
|
-
constructor(
|
|
895
|
-
this.demoThemeSvc = demoThemeSvc;
|
|
929
|
+
class SkyDocsDemoComponent {
|
|
930
|
+
constructor() {
|
|
896
931
|
this.areOptionsVisible = false;
|
|
897
932
|
}
|
|
898
933
|
/**
|
|
@@ -905,43 +940,34 @@ let SkyDocsDemoComponent = class SkyDocsDemoComponent {
|
|
|
905
940
|
get alignContents() {
|
|
906
941
|
return this._alignContents || 'left';
|
|
907
942
|
}
|
|
908
|
-
set supportsTheming(value) {
|
|
909
|
-
this.demoThemeSvc.supportsTheming.next(value);
|
|
910
|
-
}
|
|
911
943
|
get hasOptions() {
|
|
912
|
-
return this.
|
|
944
|
+
return this.controlPanels && this.controlPanels.length > 0;
|
|
913
945
|
}
|
|
914
946
|
get toggleOptionsButtonIcon() {
|
|
915
|
-
return
|
|
947
|
+
return this.areOptionsVisible ? 'chevron-up' : 'chevron-down';
|
|
916
948
|
}
|
|
917
949
|
onToggleOptionsButtonClick() {
|
|
918
950
|
this.areOptionsVisible = !this.areOptionsVisible;
|
|
919
951
|
}
|
|
920
|
-
}
|
|
921
|
-
SkyDocsDemoComponent
|
|
922
|
-
{ type:
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
],
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
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",
|
|
940
|
-
providers: [SkyDocsDemoThemeService],
|
|
941
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
942
|
-
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}"]
|
|
943
|
-
})
|
|
944
|
-
], 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
|
+
}] } });
|
|
945
971
|
|
|
946
972
|
/**
|
|
947
973
|
* Renders a section within the control panel.
|
|
@@ -954,218 +980,146 @@ SkyDocsDemoComponent = __decorate([
|
|
|
954
980
|
* </sky-docs-demo-control-panel>
|
|
955
981
|
* ```
|
|
956
982
|
*/
|
|
957
|
-
|
|
958
|
-
}
|
|
959
|
-
SkyDocsDemoControlPanelSectionComponent =
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
],
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
}
|
|
991
|
-
get mode() {
|
|
992
|
-
return this._mode;
|
|
993
|
-
}
|
|
994
|
-
set mode(value) {
|
|
995
|
-
this._mode = value;
|
|
996
|
-
this.updateTheme();
|
|
997
|
-
}
|
|
998
|
-
get theme() {
|
|
999
|
-
return this._theme;
|
|
1000
|
-
}
|
|
1001
|
-
set theme(value) {
|
|
1002
|
-
this._theme = value;
|
|
1003
|
-
this.updateModesForTheme();
|
|
1004
|
-
this.updateTheme();
|
|
1005
|
-
}
|
|
1006
|
-
ngOnInit() {
|
|
1007
|
-
this.themeOptions = Object.keys(SkyTheme.presets).map(key => this.createRadioItem(key));
|
|
1008
|
-
this.updateModesForTheme();
|
|
1009
|
-
this.updateTheme();
|
|
1010
|
-
}
|
|
1011
|
-
ngOnDestroy() {
|
|
1012
|
-
this.ngUnsubscribe.next();
|
|
1013
|
-
this.ngUnsubscribe.complete();
|
|
1014
|
-
}
|
|
1015
|
-
updateModesForTheme() {
|
|
1016
|
-
let selectedTheme = this.getThemeByName(this.theme);
|
|
1017
|
-
this.modeOptions = selectedTheme.supportedModes
|
|
1018
|
-
.map(supportedMode => this.createRadioItem(supportedMode.name));
|
|
1019
|
-
if (!this.modeOptions.some((item) => item.value === this.mode)) {
|
|
1020
|
-
this.mode = this.modeOptions[0].value;
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
createRadioItem(name) {
|
|
1024
|
-
return {
|
|
1025
|
-
label: this.capitalize(name),
|
|
1026
|
-
value: name
|
|
1027
|
-
};
|
|
1028
|
-
}
|
|
1029
|
-
capitalize(name) {
|
|
1030
|
-
return name.charAt(0).toUpperCase() + name.substr(1);
|
|
1031
|
-
}
|
|
1032
|
-
getThemeSettings() {
|
|
1033
|
-
return new SkyThemeSettings(this.getThemeByName(this.theme), this.getModeByName(this.mode));
|
|
1034
|
-
}
|
|
1035
|
-
getThemeByName(name) {
|
|
1036
|
-
const themePresets = SkyTheme.presets;
|
|
1037
|
-
return themePresets[name];
|
|
1038
|
-
}
|
|
1039
|
-
getModeByName(name) {
|
|
1040
|
-
const modePresets = SkyThemeMode.presets;
|
|
1041
|
-
return modePresets[name];
|
|
1042
|
-
}
|
|
1043
|
-
updateTheme() {
|
|
1044
|
-
this.themeSettingsChange.emit(this.getThemeSettings());
|
|
1045
|
-
}
|
|
1046
|
-
};
|
|
1047
|
-
SkyDocsDemoControlPanelThemeComponent.ctorParameters = () => [
|
|
1048
|
-
{ type: ChangeDetectorRef },
|
|
1049
|
-
{ type: SkyThemeService, decorators: [{ type: Optional }] }
|
|
1050
|
-
];
|
|
1051
|
-
__decorate([
|
|
1052
|
-
Output()
|
|
1053
|
-
], SkyDocsDemoControlPanelThemeComponent.prototype, "themeSettingsChange", void 0);
|
|
1054
|
-
SkyDocsDemoControlPanelThemeComponent = __decorate([
|
|
1055
|
-
Component({
|
|
1056
|
-
selector: 'sky-docs-demo-control-panel-theme',
|
|
1057
|
-
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",
|
|
1058
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1059
|
-
styles: ["ul{margin:0}"]
|
|
1060
|
-
}),
|
|
1061
|
-
__param(1, Optional())
|
|
1062
|
-
], SkyDocsDemoControlPanelThemeComponent);
|
|
1063
|
-
|
|
1064
|
-
let SkyDocsDemoModule = class SkyDocsDemoModule {
|
|
1065
|
-
};
|
|
1066
|
-
SkyDocsDemoModule = __decorate([
|
|
1067
|
-
NgModule({
|
|
1068
|
-
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: [[
|
|
1069
1016
|
CommonModule,
|
|
1070
1017
|
FormsModule,
|
|
1071
1018
|
SkyCheckboxModule,
|
|
1072
1019
|
SkyDocsToolsResourcesModule,
|
|
1073
1020
|
SkyIconModule,
|
|
1074
1021
|
SkyRadioModule,
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
],
|
|
1096
|
-
|
|
1097
|
-
|
|
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 {
|
|
1098
1054
|
constructor() {
|
|
1099
1055
|
this.headingLevel = '2';
|
|
1100
1056
|
}
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
], SkyDocsHeadingAnchorModule);
|
|
1134
|
-
|
|
1135
|
-
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 {
|
|
1136
1089
|
transform(markdown) {
|
|
1137
1090
|
if (!markdown) {
|
|
1138
1091
|
return '';
|
|
1139
1092
|
}
|
|
1140
1093
|
return marked(markdown);
|
|
1141
1094
|
}
|
|
1142
|
-
}
|
|
1143
|
-
SkyDocsMarkdownPipe =
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
};
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
]
|
|
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
|
+
}] });
|
|
1164
1118
|
|
|
1165
1119
|
class SkyDocsToolsOptions {
|
|
1166
1120
|
}
|
|
1167
1121
|
|
|
1168
|
-
|
|
1122
|
+
class SkyDocsModuleInfoComponent {
|
|
1169
1123
|
constructor(options) {
|
|
1170
1124
|
this.options = options;
|
|
1171
1125
|
}
|
|
@@ -1173,13 +1127,13 @@ let SkyDocsModuleInfoComponent = class SkyDocsModuleInfoComponent {
|
|
|
1173
1127
|
this._gitRepoUrl = value;
|
|
1174
1128
|
}
|
|
1175
1129
|
get gitRepoUrl() {
|
|
1176
|
-
return this._gitRepoUrl || this.options && this.options.gitRepoUrl;
|
|
1130
|
+
return this._gitRepoUrl || (this.options && this.options.gitRepoUrl);
|
|
1177
1131
|
}
|
|
1178
1132
|
set packageName(value) {
|
|
1179
1133
|
this._packageName = value;
|
|
1180
1134
|
}
|
|
1181
1135
|
get packageName() {
|
|
1182
|
-
return this._packageName || this.options && this.options.packageName;
|
|
1136
|
+
return this._packageName || (this.options && this.options.packageName);
|
|
1183
1137
|
}
|
|
1184
1138
|
set packageUrl(value) {
|
|
1185
1139
|
this._packageUrl = value;
|
|
@@ -1198,13 +1152,13 @@ let SkyDocsModuleInfoComponent = class SkyDocsModuleInfoComponent {
|
|
|
1198
1152
|
if (this.packageName) {
|
|
1199
1153
|
externalLinks.push({
|
|
1200
1154
|
url: this.packageUrl,
|
|
1201
|
-
label: 'View in NPM'
|
|
1155
|
+
label: 'View in NPM',
|
|
1202
1156
|
});
|
|
1203
1157
|
}
|
|
1204
1158
|
if (this.gitRepoUrl) {
|
|
1205
1159
|
externalLinks.push({
|
|
1206
1160
|
url: this.gitRepoUrl,
|
|
1207
|
-
label: 'View in GitHub'
|
|
1161
|
+
label: 'View in GitHub',
|
|
1208
1162
|
});
|
|
1209
1163
|
}
|
|
1210
1164
|
return externalLinks;
|
|
@@ -1215,201 +1169,108 @@ let SkyDocsModuleInfoComponent = class SkyDocsModuleInfoComponent {
|
|
|
1215
1169
|
}
|
|
1216
1170
|
return `npm install --save-exact ${this.packageName}`;
|
|
1217
1171
|
}
|
|
1218
|
-
}
|
|
1219
|
-
SkyDocsModuleInfoComponent
|
|
1220
|
-
{ type:
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
],
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
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: [[
|
|
1249
1205
|
CommonModule,
|
|
1250
1206
|
SkyCodeModule,
|
|
1251
1207
|
SkyClipboardModule,
|
|
1252
1208
|
SkyDefinitionListModule,
|
|
1253
1209
|
SkyHelpInlineModule,
|
|
1254
|
-
SkyPopoverModule
|
|
1255
|
-
]
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
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 {
|
|
1266
1229
|
constructor(domSanitizer) {
|
|
1267
1230
|
this.domSanitizer = domSanitizer;
|
|
1268
1231
|
}
|
|
1269
1232
|
getTrustedHtml(content) {
|
|
1270
1233
|
return this.domSanitizer.bypassSecurityTrustHtml(content);
|
|
1271
1234
|
}
|
|
1272
|
-
};
|
|
1273
|
-
SkyDocsSafeHtmlComponent.ctorParameters = () => [
|
|
1274
|
-
{ type: DomSanitizer }
|
|
1275
|
-
];
|
|
1276
|
-
__decorate([
|
|
1277
|
-
Input()
|
|
1278
|
-
], SkyDocsSafeHtmlComponent.prototype, "innerHtml", void 0);
|
|
1279
|
-
SkyDocsSafeHtmlComponent = __decorate([
|
|
1280
|
-
Component({
|
|
1281
|
-
selector: 'sky-docs-safe-html',
|
|
1282
|
-
template: "<div\n class=\"sky-docs-safe-html\"\n [innerHtml]=\"getTrustedHtml(innerHtml)\"\n></div>",
|
|
1283
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1284
|
-
})
|
|
1285
|
-
], SkyDocsSafeHtmlComponent);
|
|
1286
|
-
|
|
1287
|
-
let SkyDocsSafeHtmlModule = class SkyDocsSafeHtmlModule {
|
|
1288
|
-
};
|
|
1289
|
-
SkyDocsSafeHtmlModule = __decorate([
|
|
1290
|
-
NgModule({
|
|
1291
|
-
declarations: [
|
|
1292
|
-
SkyDocsSafeHtmlComponent
|
|
1293
|
-
],
|
|
1294
|
-
imports: [
|
|
1295
|
-
CommonModule
|
|
1296
|
-
],
|
|
1297
|
-
exports: [
|
|
1298
|
-
SkyDocsSafeHtmlComponent
|
|
1299
|
-
]
|
|
1300
|
-
})
|
|
1301
|
-
], SkyDocsSafeHtmlModule);
|
|
1302
|
-
|
|
1303
|
-
let SkyDocsTypeDefinitionsProvider = class SkyDocsTypeDefinitionsProvider {
|
|
1304
|
-
};
|
|
1305
|
-
SkyDocsTypeDefinitionsProvider = __decorate([
|
|
1306
|
-
Injectable()
|
|
1307
|
-
], SkyDocsTypeDefinitionsProvider);
|
|
1308
|
-
|
|
1309
|
-
/**
|
|
1310
|
-
* Finds any type name that is NOT surrounded by alpha-numeric (and '>', '<', '.') characters.
|
|
1311
|
-
* (This is to avoid matching types that share similar words, such as `Foo` and `FooUser`.)
|
|
1312
|
-
* Notes:
|
|
1313
|
-
* - If the type name is surrounded by angle brackets, then it has already been processed as a link.
|
|
1314
|
-
* - 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.
|
|
1315
|
-
* - If the type name ends with a period followed immediately by any word character, then it is a method or property (Foo.bar).
|
|
1316
|
-
* Only the type name should be processed as a link.
|
|
1317
|
-
*/
|
|
1318
|
-
function createRegex(keyword) {
|
|
1319
|
-
return new RegExp(`(^|[^a-zA-Z0-9>.[/])(${keyword})(\\.\\w+)?(?=[^a-zA-Z0-9<]+|$)`, 'g');
|
|
1320
1235
|
}
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
matches = regex.exec(content);
|
|
1348
|
-
if (matches) {
|
|
1349
|
-
const anchorId = this.anchorIds[typeName];
|
|
1350
|
-
const anchorHtml = '<a class="sky-docs-anchor-link" href="#' + anchorId + '">' + typeName + '</a>';
|
|
1351
|
-
// Group 3 of the regex pattern captures type properties like Foo.bar.
|
|
1352
|
-
// If these are found, they do not need hyperlinked, but add them to the encapsulating code tag.
|
|
1353
|
-
const typeProperty = (matches[3] ? matches[3] : '');
|
|
1354
|
-
let replacement;
|
|
1355
|
-
if (config.applyCodeFormatting) {
|
|
1356
|
-
replacement = '<code>' + anchorHtml + typeProperty + '</code>';
|
|
1357
|
-
}
|
|
1358
|
-
else {
|
|
1359
|
-
replacement = anchorHtml + typeProperty;
|
|
1360
|
-
}
|
|
1361
|
-
// Regex Positive lookbehinds aren't supported in IE11 and Safari, so we have to check if the match has a starting extra character
|
|
1362
|
-
// (usually whitespace " Foo"), and then modify the starting/ending indexes to account for the extra character.
|
|
1363
|
-
const isMatchExact = matches[0].substr(0, typeName.length) === typeName;
|
|
1364
|
-
const startIndex = isMatchExact ? matches.index : matches.index + 1;
|
|
1365
|
-
const endIndex = isMatchExact ? matches[0].length : matches[0].length - 1;
|
|
1366
|
-
let contentWithCodeTags = content.substr(0, startIndex) + replacement + content.substr(startIndex + endIndex);
|
|
1367
|
-
content = contentWithCodeTags;
|
|
1368
|
-
counter++;
|
|
1369
|
-
}
|
|
1370
|
-
} while (matches !== null && counter < max);
|
|
1371
|
-
});
|
|
1372
|
-
return content;
|
|
1373
|
-
}
|
|
1374
|
-
/**
|
|
1375
|
-
* For backwards compatibility, we need to remove any double brackets wrapped around types.
|
|
1376
|
-
* e.g., `[[SampleType]]`
|
|
1377
|
-
*/
|
|
1378
|
-
removeDoubleSquareBrackets(content) {
|
|
1379
|
-
const match = content.match(/\[\[.*\]\]/);
|
|
1380
|
-
if (match) {
|
|
1381
|
-
const typeName = match[0].replace(/\[\[/g, '').replace(/\]\]/g, '');
|
|
1382
|
-
content = content.replace(match[0], typeName);
|
|
1383
|
-
}
|
|
1384
|
-
return content;
|
|
1385
|
-
}
|
|
1386
|
-
/**
|
|
1387
|
-
* Removes backtick characters around known types to prevent
|
|
1388
|
-
* the markdown pipe from wrapping them with code elements.
|
|
1389
|
-
*/
|
|
1390
|
-
removeBackticks(typeName, content) {
|
|
1391
|
-
const regexp = new RegExp(`\`(${typeName})\``, 'g');
|
|
1392
|
-
return content.replace(regexp, typeName);
|
|
1393
|
-
}
|
|
1394
|
-
};
|
|
1395
|
-
SkyDocsAnchorLinkService.ctorParameters = () => [
|
|
1396
|
-
{ type: SkyDocsTypeDefinitionsProvider }
|
|
1397
|
-
];
|
|
1398
|
-
SkyDocsAnchorLinkService = __decorate([
|
|
1399
|
-
Injectable()
|
|
1400
|
-
], 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
|
+
}] });
|
|
1401
1262
|
|
|
1402
1263
|
/**
|
|
1403
1264
|
* Formats type definitions into HTML-compatible strings.
|
|
1404
1265
|
*/
|
|
1405
|
-
|
|
1266
|
+
class SkyDocsTypeDefinitionsFormatService {
|
|
1406
1267
|
/**
|
|
1407
1268
|
* Returns an HTML-formatted representation of the provided interface config.
|
|
1408
1269
|
*/
|
|
1409
1270
|
getInterfaceSourceCode(definition) {
|
|
1410
1271
|
const typeParameters = this.getFormattedTypeParameters(definition.typeParameters);
|
|
1411
1272
|
const config = {
|
|
1412
|
-
escapeSpecialCharacters: false
|
|
1273
|
+
escapeSpecialCharacters: false,
|
|
1413
1274
|
};
|
|
1414
1275
|
let signature = `interface ${definition.name}${typeParameters} {`;
|
|
1415
1276
|
signature += this.getFormattedInterfaceProperties(definition, config);
|
|
@@ -1421,7 +1282,7 @@ let SkyDocsTypeDefinitionsFormatService = class SkyDocsTypeDefinitionsFormatServ
|
|
|
1421
1282
|
*/
|
|
1422
1283
|
getMethodSourceCode(definition) {
|
|
1423
1284
|
const config = {
|
|
1424
|
-
escapeSpecialCharacters: false
|
|
1285
|
+
escapeSpecialCharacters: false,
|
|
1425
1286
|
};
|
|
1426
1287
|
const typeArguments = this.getFormattedTypeArguments(definition.type, config);
|
|
1427
1288
|
const callSignature = definition.type.callSignature;
|
|
@@ -1429,7 +1290,7 @@ let SkyDocsTypeDefinitionsFormatService = class SkyDocsTypeDefinitionsFormatServ
|
|
|
1429
1290
|
let params = '';
|
|
1430
1291
|
if (callSignature.parameters) {
|
|
1431
1292
|
params += callSignature.parameters
|
|
1432
|
-
.map(p => this.getFormattedParameterName(p, config))
|
|
1293
|
+
.map((p) => this.getFormattedParameterName(p, config))
|
|
1433
1294
|
.join(', ');
|
|
1434
1295
|
}
|
|
1435
1296
|
return `public ${definition.name}${typeArguments}(${params}): ${returnType}`;
|
|
@@ -1439,19 +1300,19 @@ let SkyDocsTypeDefinitionsFormatService = class SkyDocsTypeDefinitionsFormatServ
|
|
|
1439
1300
|
*/
|
|
1440
1301
|
getTypeAliasSourceCode(definition) {
|
|
1441
1302
|
const config = {
|
|
1442
|
-
escapeSpecialCharacters: false
|
|
1303
|
+
escapeSpecialCharacters: false,
|
|
1443
1304
|
};
|
|
1444
1305
|
const typeParameters = this.getFormattedTypeParameters(definition.typeParameters);
|
|
1445
1306
|
let signature = `type ${definition.name}${typeParameters} = `;
|
|
1446
1307
|
if (definition.type.callSignature) {
|
|
1447
1308
|
signature += this.getFormattedCallSignature(definition.type.callSignature, {
|
|
1448
|
-
escapeSpecialCharacters: false
|
|
1309
|
+
escapeSpecialCharacters: false,
|
|
1449
1310
|
});
|
|
1450
1311
|
}
|
|
1451
1312
|
else if (definition.type.indexSignature) {
|
|
1452
1313
|
const indexSignature = definition.type.indexSignature;
|
|
1453
1314
|
const type = this.getFormattedType(indexSignature.type, {
|
|
1454
|
-
escapeSpecialCharacters: false
|
|
1315
|
+
escapeSpecialCharacters: false,
|
|
1455
1316
|
});
|
|
1456
1317
|
signature += `{\n [${indexSignature.key.name}: string]: ${type};\n}`;
|
|
1457
1318
|
}
|
|
@@ -1467,9 +1328,9 @@ let SkyDocsTypeDefinitionsFormatService = class SkyDocsTypeDefinitionsFormatServ
|
|
|
1467
1328
|
* Returns a formatted string representing a parameter's name and value. For example: `'foo: string'`.
|
|
1468
1329
|
*/
|
|
1469
1330
|
getFormattedParameterName(parameter, config = {
|
|
1470
|
-
escapeSpecialCharacters: true
|
|
1331
|
+
escapeSpecialCharacters: true,
|
|
1471
1332
|
}) {
|
|
1472
|
-
const optionalMarker =
|
|
1333
|
+
const optionalMarker = parameter.isOptional ? '?' : '';
|
|
1473
1334
|
const parameterType = this.getFormattedType(parameter.type, config);
|
|
1474
1335
|
let signature = `${parameter.name}${optionalMarker}: ${parameterType}`;
|
|
1475
1336
|
if (config.escapeSpecialCharacters) {
|
|
@@ -1528,7 +1389,7 @@ let SkyDocsTypeDefinitionsFormatService = class SkyDocsTypeDefinitionsFormatServ
|
|
|
1528
1389
|
* Returns a formatted string representing the provided type.
|
|
1529
1390
|
*/
|
|
1530
1391
|
getFormattedType(type, config = {
|
|
1531
|
-
escapeSpecialCharacters: true
|
|
1392
|
+
escapeSpecialCharacters: true,
|
|
1532
1393
|
}) {
|
|
1533
1394
|
let formatted = 'any';
|
|
1534
1395
|
if (!type) {
|
|
@@ -1564,21 +1425,23 @@ let SkyDocsTypeDefinitionsFormatService = class SkyDocsTypeDefinitionsFormatServ
|
|
|
1564
1425
|
return value.replace(/</g, '<').replace(/>/g, '>');
|
|
1565
1426
|
}
|
|
1566
1427
|
getFormattedCallSignature(callSignature, config = {
|
|
1567
|
-
escapeSpecialCharacters: true
|
|
1428
|
+
escapeSpecialCharacters: true,
|
|
1568
1429
|
}) {
|
|
1569
1430
|
const returnType = this.getFormattedType(callSignature.returnType, config);
|
|
1570
1431
|
if (!callSignature.parameters) {
|
|
1571
1432
|
return `() => ${returnType}`;
|
|
1572
1433
|
}
|
|
1573
1434
|
const formattedParams = callSignature.parameters
|
|
1574
|
-
.map(p => this.getFormattedParameterName(p, config))
|
|
1435
|
+
.map((p) => this.getFormattedParameterName(p, config))
|
|
1575
1436
|
.join(', ');
|
|
1576
1437
|
return `(${formattedParams}) => ${returnType}`;
|
|
1577
1438
|
}
|
|
1578
1439
|
getFormattedUnion(typeConfig, config) {
|
|
1579
|
-
return typeConfig.unionTypes
|
|
1440
|
+
return typeConfig.unionTypes
|
|
1441
|
+
.map((t) => {
|
|
1580
1442
|
return this.getFormattedType(t, config);
|
|
1581
|
-
})
|
|
1443
|
+
})
|
|
1444
|
+
.join(' | ');
|
|
1582
1445
|
}
|
|
1583
1446
|
/**
|
|
1584
1447
|
* Parse any type arguments e.g. `<T, F>`.
|
|
@@ -1587,7 +1450,7 @@ let SkyDocsTypeDefinitionsFormatService = class SkyDocsTypeDefinitionsFormatServ
|
|
|
1587
1450
|
if (!typeConfig.typeArguments) {
|
|
1588
1451
|
return '';
|
|
1589
1452
|
}
|
|
1590
|
-
const typeArguments = typeConfig.typeArguments.map(typeArgument => {
|
|
1453
|
+
const typeArguments = typeConfig.typeArguments.map((typeArgument) => {
|
|
1591
1454
|
if (typeArgument.type === 'array') {
|
|
1592
1455
|
return `${typeArgument.name}[]`;
|
|
1593
1456
|
}
|
|
@@ -1602,7 +1465,7 @@ let SkyDocsTypeDefinitionsFormatService = class SkyDocsTypeDefinitionsFormatServ
|
|
|
1602
1465
|
if (!typeParameters) {
|
|
1603
1466
|
return '';
|
|
1604
1467
|
}
|
|
1605
|
-
const formatted = typeParameters.map(typeParameter => {
|
|
1468
|
+
const formatted = typeParameters.map((typeParameter) => {
|
|
1606
1469
|
let result = typeParameter.name;
|
|
1607
1470
|
if (typeParameter.type && typeParameter.type.type === 'reference') {
|
|
1608
1471
|
result += ` extends ${typeParameter.type.name}`;
|
|
@@ -1613,9 +1476,9 @@ let SkyDocsTypeDefinitionsFormatService = class SkyDocsTypeDefinitionsFormatServ
|
|
|
1613
1476
|
}
|
|
1614
1477
|
getFormattedInterfaceProperties(definition, config) {
|
|
1615
1478
|
let signature = '';
|
|
1616
|
-
definition.properties.forEach(property => {
|
|
1479
|
+
definition.properties.forEach((property) => {
|
|
1617
1480
|
const indexSignature = property.type.indexSignature;
|
|
1618
|
-
const optionalIndicator =
|
|
1481
|
+
const optionalIndicator = property.isOptional && !indexSignature ? '?' : '';
|
|
1619
1482
|
const propertyType = this.getFormattedType(property.type, config);
|
|
1620
1483
|
let name;
|
|
1621
1484
|
if (indexSignature) {
|
|
@@ -1628,21 +1491,161 @@ let SkyDocsTypeDefinitionsFormatService = class SkyDocsTypeDefinitionsFormatServ
|
|
|
1628
1491
|
});
|
|
1629
1492
|
return signature;
|
|
1630
1493
|
}
|
|
1631
|
-
}
|
|
1632
|
-
SkyDocsTypeDefinitionsFormatService =
|
|
1633
|
-
|
|
1634
|
-
|
|
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
|
+
}] });
|
|
1635
1511
|
|
|
1636
1512
|
/**
|
|
1637
|
-
*
|
|
1638
|
-
* This
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
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.
|
|
1520
|
+
*/
|
|
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;
|
|
1646
|
+
}
|
|
1647
|
+
set config(value) {
|
|
1648
|
+
this._config = value;
|
|
1646
1649
|
this.updateView();
|
|
1647
1650
|
}
|
|
1648
1651
|
get config() {
|
|
@@ -1650,61 +1653,122 @@ let SkyDocsCallSignatureDefinitionComponent = class SkyDocsCallSignatureDefiniti
|
|
|
1650
1653
|
}
|
|
1651
1654
|
updateView() {
|
|
1652
1655
|
var _a, _b, _c;
|
|
1653
|
-
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) => {
|
|
1654
1657
|
const vm = {
|
|
1655
1658
|
defaultValue: p.defaultValue,
|
|
1656
1659
|
description: p.description,
|
|
1657
1660
|
formattedName: this.formatService.getFormattedParameterName(p),
|
|
1658
|
-
isOptional: p.isOptional
|
|
1661
|
+
isOptional: p.isOptional,
|
|
1659
1662
|
};
|
|
1660
1663
|
return vm;
|
|
1661
1664
|
});
|
|
1662
1665
|
this.returnTypeFormatted = this.formatService.getFormattedType((_c = this.config) === null || _c === void 0 ? void 0 : _c.returnType);
|
|
1663
1666
|
}
|
|
1664
|
-
}
|
|
1665
|
-
SkyDocsCallSignatureDefinitionComponent
|
|
1666
|
-
{ type:
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
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
|
-
|
|
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 {
|
|
1708
1772
|
constructor(formatService) {
|
|
1709
1773
|
this.formatService = formatService;
|
|
1710
1774
|
}
|
|
@@ -1716,24 +1780,25 @@ let SkyDocsInterfaceDefinitionComponent = class SkyDocsInterfaceDefinitionCompon
|
|
|
1716
1780
|
return this._config;
|
|
1717
1781
|
}
|
|
1718
1782
|
updateView() {
|
|
1719
|
-
this.sourceCode =
|
|
1783
|
+
this.sourceCode = this.config
|
|
1784
|
+
? this.formatService.getInterfaceSourceCode(this.config)
|
|
1785
|
+
: undefined;
|
|
1720
1786
|
}
|
|
1721
|
-
}
|
|
1722
|
-
SkyDocsInterfaceDefinitionComponent
|
|
1723
|
-
{ type:
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
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 {
|
|
1737
1802
|
constructor(changeDetector, formatService, mediaQueryService) {
|
|
1738
1803
|
this.changeDetector = changeDetector;
|
|
1739
1804
|
this.formatService = formatService;
|
|
@@ -1750,13 +1815,13 @@ let SkyDocsMethodDefinitionsComponent = class SkyDocsMethodDefinitionsComponent
|
|
|
1750
1815
|
}
|
|
1751
1816
|
ngOnInit() {
|
|
1752
1817
|
this.mediaQueryService.subscribe((breakpoints) => {
|
|
1753
|
-
this.isMobile =
|
|
1818
|
+
this.isMobile = breakpoints <= SkyMediaBreakpoints.sm;
|
|
1754
1819
|
this.changeDetector.markForCheck();
|
|
1755
1820
|
});
|
|
1756
1821
|
}
|
|
1757
1822
|
updateView() {
|
|
1758
1823
|
var _a, _b;
|
|
1759
|
-
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) => {
|
|
1760
1825
|
const vm = {
|
|
1761
1826
|
callSignature: method.type.callSignature,
|
|
1762
1827
|
codeExample: method.codeExample,
|
|
@@ -1764,161 +1829,378 @@ let SkyDocsMethodDefinitionsComponent = class SkyDocsMethodDefinitionsComponent
|
|
|
1764
1829
|
deprecationWarning: method.deprecationWarning,
|
|
1765
1830
|
description: method.description,
|
|
1766
1831
|
formattedName: this.formatService.getFormattedMethodName(method),
|
|
1767
|
-
sourceCode: this.formatService.getMethodSourceCode(method)
|
|
1832
|
+
sourceCode: this.formatService.getMethodSourceCode(method),
|
|
1768
1833
|
};
|
|
1769
1834
|
return vm;
|
|
1770
1835
|
});
|
|
1771
1836
|
}
|
|
1772
|
-
}
|
|
1773
|
-
SkyDocsMethodDefinitionsComponent
|
|
1774
|
-
{ type:
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
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) {
|
|
1807
1886
|
this.formatService = formatService;
|
|
1808
|
-
this.mediaQueryService = mediaQueryService;
|
|
1809
|
-
this.propertyType = 'Property';
|
|
1810
|
-
this.showOptionalStatus = true;
|
|
1811
|
-
this.deprecationWarningPrefix = `<span class="sky-text-warning"></span>**Deprecated.** `;
|
|
1812
|
-
this.isMobile = true;
|
|
1813
|
-
this.properties = [];
|
|
1814
1887
|
}
|
|
1815
1888
|
set config(value) {
|
|
1816
1889
|
this._config = value;
|
|
1817
1890
|
this.updateView();
|
|
1818
1891
|
}
|
|
1819
1892
|
get config() {
|
|
1820
|
-
return this._config
|
|
1821
|
-
}
|
|
1822
|
-
ngOnInit() {
|
|
1823
|
-
this.mediaQueryService.subscribe((breakpoints) => {
|
|
1824
|
-
this.isMobile = (breakpoints <= SkyMediaBreakpoints.sm);
|
|
1825
|
-
this.changeDetector.markForCheck();
|
|
1826
|
-
});
|
|
1893
|
+
return this._config;
|
|
1827
1894
|
}
|
|
1828
1895
|
updateView() {
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
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
|
+
}
|
|
1841
2134
|
});
|
|
1842
2135
|
}
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
],
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
Component({
|
|
1860
|
-
selector: 'sky-docs-property-definitions',
|
|
1861
|
-
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",
|
|
1862
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1863
|
-
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}"]
|
|
1864
|
-
})
|
|
1865
|
-
], SkyDocsPropertyDefinitionsComponent);
|
|
1866
|
-
|
|
1867
|
-
let SkyDocsClassDefinitionComponent = class SkyDocsClassDefinitionComponent {
|
|
1868
|
-
};
|
|
1869
|
-
__decorate([
|
|
1870
|
-
Input()
|
|
1871
|
-
], SkyDocsClassDefinitionComponent.prototype, "config", void 0);
|
|
1872
|
-
SkyDocsClassDefinitionComponent = __decorate([
|
|
1873
|
-
Component({
|
|
1874
|
-
selector: 'sky-docs-class-definition',
|
|
1875
|
-
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",
|
|
1876
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1877
|
-
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}"]
|
|
1878
|
-
})
|
|
1879
|
-
], SkyDocsClassDefinitionComponent);
|
|
1880
|
-
|
|
1881
|
-
let SkyDocsTypeAliasDefinitionComponent = class SkyDocsTypeAliasDefinitionComponent {
|
|
1882
|
-
constructor(formatService) {
|
|
1883
|
-
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;
|
|
1884
2152
|
}
|
|
1885
|
-
|
|
1886
|
-
this.
|
|
1887
|
-
|
|
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());
|
|
1888
2157
|
}
|
|
1889
|
-
|
|
1890
|
-
|
|
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;
|
|
1891
2174
|
}
|
|
1892
|
-
|
|
1893
|
-
|
|
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);
|
|
1894
2182
|
}
|
|
1895
|
-
}
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
selector: 'sky-docs-type-alias-definition',
|
|
1905
|
-
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",
|
|
1906
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1907
|
-
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}"]
|
|
1908
|
-
})
|
|
1909
|
-
], 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 }]; } });
|
|
1910
2192
|
|
|
1911
2193
|
/**
|
|
1912
2194
|
* Converts TypeDoc types into SKY UX docs-tools types, to be supplied to the various definitions components.
|
|
1913
2195
|
*/
|
|
1914
|
-
|
|
2196
|
+
class SkyDocsTypeDocAdapterService {
|
|
1915
2197
|
constructor(typeDefinitionsProvider) {
|
|
1916
2198
|
this.typeDefinitionsProvider = typeDefinitionsProvider;
|
|
1917
2199
|
}
|
|
1918
2200
|
toClassDefinition(entry) {
|
|
1919
2201
|
const definition = {
|
|
1920
2202
|
anchorId: this.getAnchorId(entry),
|
|
1921
|
-
name: entry.name
|
|
2203
|
+
name: entry.name,
|
|
1922
2204
|
};
|
|
1923
2205
|
const tags = this.getCommentTags(entry.comment);
|
|
1924
2206
|
this.applyCommentTagValues(definition, tags);
|
|
@@ -1936,16 +2218,16 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
1936
2218
|
const definition = {
|
|
1937
2219
|
anchorId: this.getAnchorId(entry),
|
|
1938
2220
|
name: entry.name,
|
|
1939
|
-
selector: this.getSelector(entry)
|
|
2221
|
+
selector: this.getSelector(entry),
|
|
1940
2222
|
};
|
|
1941
2223
|
const tags = this.getCommentTags(entry.comment);
|
|
1942
2224
|
this.applyCommentTagValues(definition, tags);
|
|
1943
2225
|
const properties = this.getClassProperties(entry);
|
|
1944
|
-
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'; });
|
|
1945
2227
|
if (eventProperties.length) {
|
|
1946
2228
|
definition.eventProperties = eventProperties;
|
|
1947
2229
|
}
|
|
1948
|
-
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'; });
|
|
1949
2231
|
if (inputProperties.length) {
|
|
1950
2232
|
definition.inputProperties = inputProperties;
|
|
1951
2233
|
}
|
|
@@ -1956,7 +2238,7 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
1956
2238
|
const definition = {
|
|
1957
2239
|
anchorId: this.getAnchorId(entry),
|
|
1958
2240
|
members,
|
|
1959
|
-
name: entry.name
|
|
2241
|
+
name: entry.name,
|
|
1960
2242
|
};
|
|
1961
2243
|
const tags = this.getCommentTags(entry.comment);
|
|
1962
2244
|
this.applyCommentTagValues(definition, tags);
|
|
@@ -1967,7 +2249,7 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
1967
2249
|
const definition = {
|
|
1968
2250
|
anchorId: this.getAnchorId(entry),
|
|
1969
2251
|
name: entry.name,
|
|
1970
|
-
properties
|
|
2252
|
+
properties,
|
|
1971
2253
|
};
|
|
1972
2254
|
const tags = this.getCommentTags(entry.comment);
|
|
1973
2255
|
this.applyCommentTagValues(definition, tags);
|
|
@@ -1979,26 +2261,29 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
1979
2261
|
}
|
|
1980
2262
|
toPipeDefinition(entry) {
|
|
1981
2263
|
const methods = this.getClassMethods(entry);
|
|
1982
|
-
const transformMethod = methods.find(m => m.name === 'transform');
|
|
2264
|
+
const transformMethod = methods.find((m) => m.name === 'transform');
|
|
1983
2265
|
const definition = {
|
|
1984
2266
|
anchorId: this.getAnchorId(entry),
|
|
1985
2267
|
name: entry.name,
|
|
1986
|
-
transformMethod
|
|
2268
|
+
transformMethod,
|
|
1987
2269
|
};
|
|
1988
2270
|
const tags = this.getCommentTags(entry.comment);
|
|
1989
2271
|
this.applyCommentTagValues(definition, tags);
|
|
1990
2272
|
return definition;
|
|
1991
2273
|
}
|
|
1992
2274
|
toTypeAliasDefinition(entry) {
|
|
2275
|
+
var _a;
|
|
1993
2276
|
const definition = {
|
|
1994
2277
|
anchorId: this.getAnchorId(entry),
|
|
1995
2278
|
name: entry.name,
|
|
1996
2279
|
type: this.getTypeDefinition({
|
|
1997
2280
|
comment: entry.comment,
|
|
1998
|
-
type: entry.type
|
|
1999
|
-
})
|
|
2281
|
+
type: entry.type,
|
|
2282
|
+
}),
|
|
2000
2283
|
};
|
|
2001
|
-
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);
|
|
2002
2287
|
this.applyCommentTagValues(definition, tags);
|
|
2003
2288
|
const typeParameters = this.getTypeParameterDefinitions(entry.typeParameter);
|
|
2004
2289
|
if (typeParameters.length) {
|
|
@@ -2008,31 +2293,88 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
2008
2293
|
}
|
|
2009
2294
|
getSelector(entry) {
|
|
2010
2295
|
const decoratorSource = entry.decorators[0].arguments.obj;
|
|
2011
|
-
return
|
|
2012
|
-
? decoratorSource
|
|
2013
|
-
|
|
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];
|
|
2014
2302
|
}
|
|
2015
2303
|
getClassProperties(entry) {
|
|
2016
2304
|
if (!entry.children) {
|
|
2017
2305
|
return [];
|
|
2018
2306
|
}
|
|
2019
2307
|
const definitions = entry.children
|
|
2020
|
-
.filter(child => child.kindString === 'Property' || child.kindString === 'Accessor')
|
|
2021
|
-
.map(child => {
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
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,
|
|
2025
2313
|
name: this.getPropertyName(child),
|
|
2026
|
-
type: this.getTypeDefinition(child)
|
|
2314
|
+
type: this.getTypeDefinition(child),
|
|
2027
2315
|
};
|
|
2028
|
-
|
|
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);
|
|
2356
|
+
}
|
|
2357
|
+
if (defaultValue) {
|
|
2358
|
+
definition.defaultValue = defaultValue;
|
|
2359
|
+
}
|
|
2029
2360
|
const decorator = this.getDecorator(child);
|
|
2030
2361
|
if (decorator) {
|
|
2031
2362
|
definition.decorator = decorator;
|
|
2032
2363
|
}
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2364
|
+
if (!definition.description) {
|
|
2365
|
+
const constructor = entry.children.find((child) => child.kindString === 'Constructor');
|
|
2366
|
+
if (constructor) {
|
|
2367
|
+
const signature = constructor.signatures.find((signature) => signature.kindString === 'Constructor signature');
|
|
2368
|
+
/* Sanity check */
|
|
2369
|
+
/* istanbul ignore else */
|
|
2370
|
+
if (signature) {
|
|
2371
|
+
const matchingParam = signature.parameters.find((parameter) => parameter.name === child.name);
|
|
2372
|
+
if (matchingParam) {
|
|
2373
|
+
const matchingParamTags = this.getCommentTags(matchingParam.comment);
|
|
2374
|
+
this.applyCommentTagValues(definition, matchingParamTags);
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
}
|
|
2036
2378
|
}
|
|
2037
2379
|
return definition;
|
|
2038
2380
|
});
|
|
@@ -2043,11 +2385,11 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
2043
2385
|
return [];
|
|
2044
2386
|
}
|
|
2045
2387
|
const methods = entry.children
|
|
2046
|
-
.filter(child => child.kindString === 'Method' && /^ng/.test(child.name) === false)
|
|
2047
|
-
.map(child => {
|
|
2388
|
+
.filter((child) => child.kindString === 'Method' && /^ng/.test(child.name) === false)
|
|
2389
|
+
.map((child) => {
|
|
2048
2390
|
const definition = {
|
|
2049
2391
|
name: this.getPropertyName(child),
|
|
2050
|
-
type: this.getTypeDefinition(child)
|
|
2392
|
+
type: this.getTypeDefinition(child),
|
|
2051
2393
|
};
|
|
2052
2394
|
// Comments for methods are stored in a different location.
|
|
2053
2395
|
const comment = child.signatures[0].comment;
|
|
@@ -2066,13 +2408,19 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
2066
2408
|
if (!entry.children && !entry.indexSignature) {
|
|
2067
2409
|
return [];
|
|
2068
2410
|
}
|
|
2069
|
-
const definitions = ((_a = entry.children) === null || _a === void 0 ? void 0 : _a.map(child => {
|
|
2411
|
+
const definitions = ((_a = entry.children) === null || _a === void 0 ? void 0 : _a.map((child) => {
|
|
2070
2412
|
var _a;
|
|
2071
|
-
|
|
2413
|
+
let tags;
|
|
2414
|
+
if (child.kindString === 'Method' && child.signatures.length > 0) {
|
|
2415
|
+
tags = this.getCommentTags(child.signatures[0].comment);
|
|
2416
|
+
}
|
|
2417
|
+
else {
|
|
2418
|
+
tags = this.getCommentTags(child.comment);
|
|
2419
|
+
}
|
|
2072
2420
|
const definition = {
|
|
2073
|
-
isOptional:
|
|
2421
|
+
isOptional: tags.extras.required ? false : !!((_a = child.flags) === null || _a === void 0 ? void 0 : _a.isOptional),
|
|
2074
2422
|
name: this.getPropertyName(child),
|
|
2075
|
-
type: this.getTypeDefinition(child)
|
|
2423
|
+
type: this.getTypeDefinition(child),
|
|
2076
2424
|
};
|
|
2077
2425
|
this.applyCommentTagValues(definition, tags);
|
|
2078
2426
|
return definition;
|
|
@@ -2080,13 +2428,13 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
2080
2428
|
const sorted = orderBy(definitions, ['isOptional', 'name'], ['asc', 'asc']);
|
|
2081
2429
|
// Add any index signatures, e.g. `[_: string]: any`
|
|
2082
2430
|
if (entry.indexSignature) {
|
|
2083
|
-
const indexSignature = entry.indexSignature
|
|
2431
|
+
const indexSignature = entry.indexSignature;
|
|
2084
2432
|
const definition = {
|
|
2085
2433
|
isOptional: true,
|
|
2086
2434
|
name: indexSignature.name,
|
|
2087
2435
|
type: {
|
|
2088
|
-
indexSignature: this.getIndexSignatureDefinition(indexSignature)
|
|
2089
|
-
}
|
|
2436
|
+
indexSignature: this.getIndexSignatureDefinition(indexSignature),
|
|
2437
|
+
},
|
|
2090
2438
|
};
|
|
2091
2439
|
const tags = this.getCommentTags(indexSignature.comment);
|
|
2092
2440
|
this.applyCommentTagValues(definition, tags);
|
|
@@ -2098,9 +2446,9 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
2098
2446
|
if (!entry.children) {
|
|
2099
2447
|
return [];
|
|
2100
2448
|
}
|
|
2101
|
-
return entry.children.map(child => {
|
|
2449
|
+
return entry.children.map((child) => {
|
|
2102
2450
|
const definition = {
|
|
2103
|
-
name: child.name
|
|
2451
|
+
name: child.name,
|
|
2104
2452
|
};
|
|
2105
2453
|
const tags = this.getCommentTags(child.comment);
|
|
2106
2454
|
this.applyCommentTagValues(definition, tags);
|
|
@@ -2120,20 +2468,20 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
2120
2468
|
case 'Method':
|
|
2121
2469
|
definition = {
|
|
2122
2470
|
callSignature: this.getCallSignatureDefinition(child.signatures[0], this.getCommentTags(child.comment)),
|
|
2123
|
-
name: child.signatures[0].name
|
|
2471
|
+
name: child.signatures[0].name,
|
|
2124
2472
|
};
|
|
2125
2473
|
return definition;
|
|
2126
2474
|
default:
|
|
2127
2475
|
let name = child.type.name || ((_a = child.type.elementType) === null || _a === void 0 ? void 0 : _a.name) || child.type.value;
|
|
2128
2476
|
definition = {
|
|
2129
|
-
type: child.type.type
|
|
2477
|
+
type: child.type.type,
|
|
2130
2478
|
};
|
|
2131
2479
|
if (name) {
|
|
2132
2480
|
definition.name = name;
|
|
2133
2481
|
}
|
|
2134
2482
|
// Union?
|
|
2135
2483
|
if (child.type.types) {
|
|
2136
|
-
definition.unionTypes = child.type.types.map(t => this.getTypeDefinition({ type: t }));
|
|
2484
|
+
definition.unionTypes = child.type.types.map((t) => this.getTypeDefinition({ type: t }));
|
|
2137
2485
|
}
|
|
2138
2486
|
// Convert reflection types.
|
|
2139
2487
|
if (child.type.type === 'reflection') {
|
|
@@ -2144,14 +2492,15 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
2144
2492
|
definition.callSignature = this.getCallSignatureDefinition(declaration.signatures[0], this.getCommentTags(child.comment));
|
|
2145
2493
|
}
|
|
2146
2494
|
else if (declaration.indexSignature) {
|
|
2147
|
-
const indexSignature = declaration.indexSignature
|
|
2148
|
-
definition.indexSignature =
|
|
2149
|
-
|
|
2495
|
+
const indexSignature = declaration.indexSignature;
|
|
2496
|
+
definition.indexSignature =
|
|
2497
|
+
this.getIndexSignatureDefinition(indexSignature);
|
|
2498
|
+
} /* istanbul ignore else */
|
|
2150
2499
|
else if (declaration.children) {
|
|
2151
2500
|
definition.typeLiteral = {
|
|
2152
2501
|
properties: this.getInterfaceProperties({
|
|
2153
|
-
children: declaration.children
|
|
2154
|
-
})
|
|
2502
|
+
children: declaration.children,
|
|
2503
|
+
}),
|
|
2155
2504
|
};
|
|
2156
2505
|
}
|
|
2157
2506
|
}
|
|
@@ -2169,7 +2518,7 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
2169
2518
|
if (!callSignature.parameters) {
|
|
2170
2519
|
return [];
|
|
2171
2520
|
}
|
|
2172
|
-
const parameters = callSignature.parameters.map(p => {
|
|
2521
|
+
const parameters = callSignature.parameters.map((p) => {
|
|
2173
2522
|
var _a;
|
|
2174
2523
|
const tags = this.getParameterCommentTags(p, parentTags);
|
|
2175
2524
|
const defaultValue = this.getDefaultValue(p, tags);
|
|
@@ -2177,7 +2526,7 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
2177
2526
|
const parameter = {
|
|
2178
2527
|
isOptional: !!(defaultValue || !!((_a = p.flags) === null || _a === void 0 ? void 0 : _a.isOptional)),
|
|
2179
2528
|
name: p.name,
|
|
2180
|
-
type: this.getTypeDefinition(p)
|
|
2529
|
+
type: this.getTypeDefinition(p),
|
|
2181
2530
|
};
|
|
2182
2531
|
if (defaultValue !== undefined) {
|
|
2183
2532
|
parameter.defaultValue = defaultValue;
|
|
@@ -2202,7 +2551,7 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
2202
2551
|
}
|
|
2203
2552
|
getCallSignatureDefinition(callSignature, tags) {
|
|
2204
2553
|
const definition = {
|
|
2205
|
-
returnType: this.getTypeDefinition(callSignature)
|
|
2554
|
+
returnType: this.getTypeDefinition(callSignature),
|
|
2206
2555
|
};
|
|
2207
2556
|
const parameters = this.getParameterDefinitions(callSignature, tags);
|
|
2208
2557
|
if (parameters.length) {
|
|
@@ -2214,22 +2563,22 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
2214
2563
|
return {
|
|
2215
2564
|
key: {
|
|
2216
2565
|
name: signature.parameters[0].name,
|
|
2217
|
-
type: this.getTypeDefinition(signature.parameters[0])
|
|
2566
|
+
type: this.getTypeDefinition(signature.parameters[0]),
|
|
2218
2567
|
},
|
|
2219
|
-
type: this.getTypeDefinition(signature)
|
|
2568
|
+
type: this.getTypeDefinition(signature),
|
|
2220
2569
|
};
|
|
2221
2570
|
}
|
|
2222
2571
|
getTypeParameterDefinitions(typeParameters) {
|
|
2223
2572
|
if (!typeParameters) {
|
|
2224
2573
|
return [];
|
|
2225
2574
|
}
|
|
2226
|
-
return typeParameters.map(typeParam => {
|
|
2575
|
+
return typeParameters.map((typeParam) => {
|
|
2227
2576
|
const definition = {
|
|
2228
|
-
name: typeParam.name
|
|
2577
|
+
name: typeParam.name,
|
|
2229
2578
|
};
|
|
2230
2579
|
if (typeParam.type) {
|
|
2231
2580
|
definition.type = this.getTypeDefinition({
|
|
2232
|
-
type: typeParam.type
|
|
2581
|
+
type: typeParam.type,
|
|
2233
2582
|
});
|
|
2234
2583
|
}
|
|
2235
2584
|
return definition;
|
|
@@ -2245,7 +2594,7 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
2245
2594
|
const extras = {};
|
|
2246
2595
|
if (comment) {
|
|
2247
2596
|
if (comment.tags) {
|
|
2248
|
-
comment.tags.forEach(tag => {
|
|
2597
|
+
comment.tags.forEach((tag) => {
|
|
2249
2598
|
switch (tag.tag) {
|
|
2250
2599
|
case 'deprecated':
|
|
2251
2600
|
deprecationWarning = tag.text.trim();
|
|
@@ -2266,7 +2615,7 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
2266
2615
|
parameters = parameters || [];
|
|
2267
2616
|
parameters.push({
|
|
2268
2617
|
name: tag.param,
|
|
2269
|
-
description: tag.text.trim()
|
|
2618
|
+
description: tag.text.trim(),
|
|
2270
2619
|
});
|
|
2271
2620
|
break;
|
|
2272
2621
|
default:
|
|
@@ -2284,7 +2633,7 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
2284
2633
|
deprecationWarning,
|
|
2285
2634
|
description,
|
|
2286
2635
|
extras,
|
|
2287
|
-
parameters
|
|
2636
|
+
parameters,
|
|
2288
2637
|
};
|
|
2289
2638
|
}
|
|
2290
2639
|
/**
|
|
@@ -2293,12 +2642,14 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
2293
2642
|
getParameterCommentTags(parameter, parentTags) {
|
|
2294
2643
|
const tags = this.getCommentTags(parameter.comment);
|
|
2295
2644
|
const paramTags = parentTags.parameters;
|
|
2296
|
-
const tagParam =
|
|
2645
|
+
const tagParam = paramTags
|
|
2646
|
+
? paramTags.find((param) => param.name === parameter.name)
|
|
2647
|
+
: undefined;
|
|
2297
2648
|
if (!tagParam || !tagParam.description) {
|
|
2298
2649
|
return tags;
|
|
2299
2650
|
}
|
|
2300
2651
|
return Object.assign(Object.assign({}, tags), {
|
|
2301
|
-
description: tagParam.description
|
|
2652
|
+
description: tagParam.description,
|
|
2302
2653
|
});
|
|
2303
2654
|
}
|
|
2304
2655
|
/**
|
|
@@ -2345,21 +2696,26 @@ let SkyDocsTypeDocAdapterService = class SkyDocsTypeDocAdapterService {
|
|
|
2345
2696
|
}
|
|
2346
2697
|
getAnchorId(entry) {
|
|
2347
2698
|
var _a;
|
|
2348
|
-
return entry.anchorId ||
|
|
2699
|
+
return (entry.anchorId ||
|
|
2700
|
+
((_a = this.typeDefinitionsProvider) === null || _a === void 0 ? void 0 : _a.anchorIds[entry.name]) ||
|
|
2701
|
+
'');
|
|
2349
2702
|
}
|
|
2350
|
-
}
|
|
2351
|
-
SkyDocsTypeDocAdapterService
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
]
|
|
2703
|
+
}
|
|
2704
|
+
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 });
|
|
2705
|
+
SkyDocsTypeDocAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsTypeDocAdapterService, providedIn: 'any' });
|
|
2706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsTypeDocAdapterService, decorators: [{
|
|
2707
|
+
type: Injectable,
|
|
2708
|
+
args: [{
|
|
2709
|
+
providedIn: 'any',
|
|
2710
|
+
}]
|
|
2711
|
+
}], ctorParameters: function () { return [{ type: SkyDocsTypeDefinitionsProvider, decorators: [{
|
|
2712
|
+
type: Optional
|
|
2713
|
+
}] }]; } });
|
|
2358
2714
|
|
|
2359
2715
|
/**
|
|
2360
2716
|
* Handles all type definitions that have been converted from the third-party documentation generator.
|
|
2361
2717
|
*/
|
|
2362
|
-
|
|
2718
|
+
class SkyDocsTypeDefinitionsService {
|
|
2363
2719
|
constructor(typeDefinitionsProvider, adapter) {
|
|
2364
2720
|
this.typeDefinitionsProvider = typeDefinitionsProvider;
|
|
2365
2721
|
this.adapter = adapter;
|
|
@@ -2369,14 +2725,19 @@ let SkyDocsTypeDefinitionsService = class SkyDocsTypeDefinitionsService {
|
|
|
2369
2725
|
* @param sourceCodePath The directory of the source code you wish to pull type definitions from,
|
|
2370
2726
|
* relative to the application's root directory.
|
|
2371
2727
|
*/
|
|
2372
|
-
getTypeDefinitions(sourceCodePath) {
|
|
2373
|
-
if (sourceCodePath
|
|
2374
|
-
throw new Error('The
|
|
2375
|
-
}
|
|
2728
|
+
getTypeDefinitions(sourceCodePath, additionalSourceCodePaths) {
|
|
2729
|
+
if (!sourceCodePath) {
|
|
2730
|
+
throw new Error('The `sourceCodePath` parameter is required');
|
|
2731
|
+
}
|
|
2732
|
+
const sourceCodePaths = additionalSourceCodePaths && additionalSourceCodePaths.length > 0
|
|
2733
|
+
? [sourceCodePath].concat(additionalSourceCodePaths)
|
|
2734
|
+
: [sourceCodePath];
|
|
2735
|
+
sourceCodePaths.forEach((path) => {
|
|
2736
|
+
if (!path.endsWith('/') && !path.endsWith('.ts')) {
|
|
2737
|
+
throw new Error('Source code paths must end with a forward slash (`/`) or `.ts`.');
|
|
2738
|
+
}
|
|
2739
|
+
});
|
|
2376
2740
|
const allDefinitions = this.typeDefinitionsProvider.typeDefinitions;
|
|
2377
|
-
const requestedDir = sourceCodePath
|
|
2378
|
-
.replace(/src\/app\/public\//, '')
|
|
2379
|
-
.replace(/^\//, ''); // remove first slash.
|
|
2380
2741
|
const types = {
|
|
2381
2742
|
classes: [],
|
|
2382
2743
|
components: [],
|
|
@@ -2385,323 +2746,98 @@ let SkyDocsTypeDefinitionsService = class SkyDocsTypeDefinitionsService {
|
|
|
2385
2746
|
interfaces: [],
|
|
2386
2747
|
pipes: [],
|
|
2387
2748
|
services: [],
|
|
2388
|
-
typeAliases: []
|
|
2749
|
+
typeAliases: [],
|
|
2389
2750
|
};
|
|
2390
2751
|
if (!allDefinitions) {
|
|
2391
2752
|
console.warn(`No types were found for this project!`);
|
|
2392
2753
|
return types;
|
|
2393
2754
|
}
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
switch (decorator) {
|
|
2403
|
-
case 'Component':
|
|
2404
|
-
types.components.push(this.adapter.toDirectiveDefinition(item));
|
|
2405
|
-
break;
|
|
2406
|
-
case 'Directive':
|
|
2407
|
-
types.directives.push(this.adapter.toDirectiveDefinition(item));
|
|
2408
|
-
break;
|
|
2409
|
-
case 'Injectable':
|
|
2410
|
-
types.services.push(this.adapter.toClassDefinition(item));
|
|
2411
|
-
break;
|
|
2412
|
-
case 'NgModule':
|
|
2413
|
-
// Don't document modules.
|
|
2414
|
-
break;
|
|
2415
|
-
case 'Pipe':
|
|
2416
|
-
types.pipes.push(this.adapter.toPipeDefinition(item));
|
|
2417
|
-
break;
|
|
2418
|
-
default:
|
|
2419
|
-
/*tslint:disable-next-line:switch-default*/
|
|
2420
|
-
switch (kindString) {
|
|
2421
|
-
case 'Class':
|
|
2422
|
-
types.classes.push(this.adapter.toClassDefinition(item));
|
|
2423
|
-
break;
|
|
2424
|
-
case 'Interface':
|
|
2425
|
-
types.interfaces.push(this.adapter.toInterfaceDefinition(item));
|
|
2426
|
-
break;
|
|
2427
|
-
case 'Enumeration':
|
|
2428
|
-
types.enumerations.push(this.adapter.toEnumerationDefinition(item));
|
|
2429
|
-
break;
|
|
2430
|
-
case 'Type alias':
|
|
2431
|
-
types.typeAliases.push(this.adapter.toTypeAliasDefinition(item));
|
|
2432
|
-
break;
|
|
2433
|
-
}
|
|
2755
|
+
sourceCodePaths.forEach((path) => {
|
|
2756
|
+
const requestedDir = path
|
|
2757
|
+
.replace(/src\/app\/public\//, '')
|
|
2758
|
+
.replace(/^\//, ''); // remove first slash.
|
|
2759
|
+
// Only process types that match the requested source code location.
|
|
2760
|
+
const typeDefinitions = allDefinitions.filter((i) => i.sources && i.sources[0].fileName.match(requestedDir));
|
|
2761
|
+
if (typeDefinitions.length === 0) {
|
|
2762
|
+
console.warn(`Type definitions were not found for location: ${requestedDir}`);
|
|
2434
2763
|
}
|
|
2764
|
+
typeDefinitions.forEach((item) => {
|
|
2765
|
+
const decorator = item.decorators && item.decorators[0].name;
|
|
2766
|
+
const kindString = item.kindString;
|
|
2767
|
+
switch (decorator) {
|
|
2768
|
+
case 'Component':
|
|
2769
|
+
types.components.push(this.adapter.toDirectiveDefinition(item));
|
|
2770
|
+
break;
|
|
2771
|
+
case 'Directive':
|
|
2772
|
+
types.directives.push(this.adapter.toDirectiveDefinition(item));
|
|
2773
|
+
break;
|
|
2774
|
+
case 'Injectable':
|
|
2775
|
+
types.services.push(this.adapter.toClassDefinition(item));
|
|
2776
|
+
break;
|
|
2777
|
+
case 'NgModule':
|
|
2778
|
+
// Don't document modules.
|
|
2779
|
+
break;
|
|
2780
|
+
case 'Pipe':
|
|
2781
|
+
types.pipes.push(this.adapter.toPipeDefinition(item));
|
|
2782
|
+
break;
|
|
2783
|
+
default:
|
|
2784
|
+
/*tslint:disable-next-line:switch-default*/
|
|
2785
|
+
switch (kindString) {
|
|
2786
|
+
case 'Class':
|
|
2787
|
+
types.classes.push(this.adapter.toClassDefinition(item));
|
|
2788
|
+
break;
|
|
2789
|
+
case 'Interface':
|
|
2790
|
+
types.interfaces.push(this.adapter.toInterfaceDefinition(item));
|
|
2791
|
+
break;
|
|
2792
|
+
case 'Enumeration':
|
|
2793
|
+
types.enumerations.push(this.adapter.toEnumerationDefinition(item));
|
|
2794
|
+
break;
|
|
2795
|
+
case 'Type alias':
|
|
2796
|
+
types.typeAliases.push(this.adapter.toTypeAliasDefinition(item));
|
|
2797
|
+
break;
|
|
2798
|
+
}
|
|
2799
|
+
}
|
|
2800
|
+
});
|
|
2435
2801
|
});
|
|
2436
2802
|
return types;
|
|
2437
2803
|
}
|
|
2438
|
-
}
|
|
2439
|
-
SkyDocsTypeDefinitionsService
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
]
|
|
2446
|
-
|
|
2447
|
-
/**
|
|
2448
|
-
* Adds same-page anchor tags around known TypeScript types.
|
|
2449
|
-
*/
|
|
2450
|
-
let SkyDocsTypeAnchorLinksPipe = class SkyDocsTypeAnchorLinksPipe {
|
|
2451
|
-
constructor(anchorLinkService) {
|
|
2452
|
-
this.anchorLinkService = anchorLinkService;
|
|
2453
|
-
}
|
|
2454
|
-
transform(value, formatType) {
|
|
2455
|
-
const anchorLinkConfig = {
|
|
2456
|
-
applyCodeFormatting: (formatType !== 'no-code-tags')
|
|
2457
|
-
};
|
|
2458
|
-
return this.anchorLinkService.applyTypeAnchorLinks(value, anchorLinkConfig);
|
|
2459
|
-
}
|
|
2460
|
-
};
|
|
2461
|
-
SkyDocsTypeAnchorLinksPipe.ctorParameters = () => [
|
|
2462
|
-
{ type: SkyDocsAnchorLinkService }
|
|
2463
|
-
];
|
|
2464
|
-
SkyDocsTypeAnchorLinksPipe = __decorate([
|
|
2465
|
-
Pipe({
|
|
2466
|
-
name: 'skyDocsTypeAnchorLinks',
|
|
2467
|
-
pure: true
|
|
2468
|
-
})
|
|
2469
|
-
], SkyDocsTypeAnchorLinksPipe);
|
|
2470
|
-
|
|
2471
|
-
let SkyDocsTypeDefinitionsModule = class SkyDocsTypeDefinitionsModule {
|
|
2472
|
-
};
|
|
2473
|
-
SkyDocsTypeDefinitionsModule = __decorate([
|
|
2474
|
-
NgModule({
|
|
2475
|
-
imports: [
|
|
2476
|
-
CommonModule,
|
|
2477
|
-
RouterModule,
|
|
2478
|
-
SkyCodeBlockModule,
|
|
2479
|
-
SkyCodeModule,
|
|
2480
|
-
SkyDefinitionListModule,
|
|
2481
|
-
SkyDocsHeadingAnchorModule,
|
|
2482
|
-
SkyDocsMarkdownModule,
|
|
2483
|
-
SkyDocsSafeHtmlModule,
|
|
2484
|
-
SkyIconModule,
|
|
2485
|
-
SkyMediaQueryModule
|
|
2486
|
-
],
|
|
2487
|
-
declarations: [
|
|
2488
|
-
SkyDocsCallSignatureDefinitionComponent,
|
|
2489
|
-
SkyDocsClassDefinitionComponent,
|
|
2490
|
-
SkyDocsDirectiveDefinitionComponent,
|
|
2491
|
-
SkyDocsEnumerationDefinitionComponent,
|
|
2492
|
-
SkyDocsInterfaceDefinitionComponent,
|
|
2493
|
-
SkyDocsMethodDefinitionsComponent,
|
|
2494
|
-
SkyDocsPipeDefinitionComponent,
|
|
2495
|
-
SkyDocsPropertyDefinitionsComponent,
|
|
2496
|
-
SkyDocsTypeAliasDefinitionComponent,
|
|
2497
|
-
SkyDocsTypeAnchorLinksPipe
|
|
2498
|
-
],
|
|
2499
|
-
exports: [
|
|
2500
|
-
SkyDocsCallSignatureDefinitionComponent,
|
|
2501
|
-
SkyDocsClassDefinitionComponent,
|
|
2502
|
-
SkyDocsDirectiveDefinitionComponent,
|
|
2503
|
-
SkyDocsEnumerationDefinitionComponent,
|
|
2504
|
-
SkyDocsInterfaceDefinitionComponent,
|
|
2505
|
-
SkyDocsMethodDefinitionsComponent,
|
|
2506
|
-
SkyDocsPipeDefinitionComponent,
|
|
2507
|
-
SkyDocsPropertyDefinitionsComponent,
|
|
2508
|
-
SkyDocsTypeAliasDefinitionComponent,
|
|
2509
|
-
SkyDocsTypeAnchorLinksPipe
|
|
2510
|
-
],
|
|
2511
|
-
providers: [
|
|
2512
|
-
SkyDocsAnchorLinkService,
|
|
2513
|
-
SkyDocsTypeAnchorLinksPipe,
|
|
2514
|
-
SkyDocsTypeDefinitionsFormatService,
|
|
2515
|
-
SkyDocsTypeDefinitionsProvider,
|
|
2516
|
-
SkyDocsTypeDefinitionsService,
|
|
2517
|
-
SkyDocsTypeDocAdapterService
|
|
2518
|
-
]
|
|
2519
|
-
})
|
|
2520
|
-
], SkyDocsTypeDefinitionsModule);
|
|
2521
|
-
|
|
2522
|
-
/**
|
|
2523
|
-
* Specifies a section of page content.
|
|
2524
|
-
* @example
|
|
2525
|
-
* ```
|
|
2526
|
-
* <sky-docs-demo-page-section
|
|
2527
|
-
* heading="Section heading"
|
|
2528
|
-
* >
|
|
2529
|
-
* Section content here.
|
|
2530
|
-
* </sky-docs-demo-page-section>
|
|
2531
|
-
* ```
|
|
2532
|
-
*/
|
|
2533
|
-
let SkyDocsDemoPageSectionComponent = class SkyDocsDemoPageSectionComponent {
|
|
2534
|
-
get anchorId() {
|
|
2535
|
-
return `section-${this.getSanitizedName(this.heading)}`;
|
|
2536
|
-
}
|
|
2537
|
-
getSanitizedName(value) {
|
|
2538
|
-
if (!value) {
|
|
2539
|
-
return;
|
|
2540
|
-
}
|
|
2541
|
-
const sanitized = value.toLowerCase()
|
|
2542
|
-
// Remove special characters.
|
|
2543
|
-
.replace(/[\_\~\`\@\!\#\$\%\^\&\*\(\)\[\]\{\}\;\:\'\/\\\<\>\,\.\?\=\+\|"]/g, '')
|
|
2544
|
-
// Replace space characters with a dash.
|
|
2545
|
-
.replace(/\s/g, '-')
|
|
2546
|
-
// Remove any double-dashes.
|
|
2547
|
-
.replace(/--/g, '-');
|
|
2548
|
-
return sanitized;
|
|
2549
|
-
}
|
|
2550
|
-
};
|
|
2551
|
-
__decorate([
|
|
2552
|
-
Input()
|
|
2553
|
-
], SkyDocsDemoPageSectionComponent.prototype, "heading", void 0);
|
|
2554
|
-
SkyDocsDemoPageSectionComponent = __decorate([
|
|
2555
|
-
Component({
|
|
2556
|
-
selector: 'sky-docs-demo-page-section',
|
|
2557
|
-
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>",
|
|
2558
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2559
|
-
styles: [".sky-docs-demo-page-section{margin-bottom:50px}"]
|
|
2560
|
-
})
|
|
2561
|
-
], SkyDocsDemoPageSectionComponent);
|
|
2562
|
-
|
|
2563
|
-
/**
|
|
2564
|
-
* The page summary provides a section at the top of the page
|
|
2565
|
-
* to summarize what a user should expect to find or learn on the page.
|
|
2566
|
-
* @example
|
|
2567
|
-
* ```
|
|
2568
|
-
* <sky-docs-demo-page-summary>
|
|
2569
|
-
* Page summary here.
|
|
2570
|
-
* </sky-docs-demo-page-summary>
|
|
2571
|
-
* ```
|
|
2572
|
-
*/
|
|
2573
|
-
let SkyDocsDemoPageSummaryComponent = class SkyDocsDemoPageSummaryComponent {
|
|
2574
|
-
};
|
|
2575
|
-
SkyDocsDemoPageSummaryComponent = __decorate([
|
|
2576
|
-
Component({
|
|
2577
|
-
selector: 'sky-docs-demo-page-summary',
|
|
2578
|
-
template: "<div class=\"sky-docs-demo-page-summary\">\n <ng-content></ng-content>\n</div>\n",
|
|
2579
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2580
|
-
styles: [".sky-docs-demo-page-summary{margin-bottom:20px}"]
|
|
2581
|
-
})
|
|
2582
|
-
], SkyDocsDemoPageSummaryComponent);
|
|
2583
|
-
|
|
2584
|
-
/**
|
|
2585
|
-
* @internal
|
|
2586
|
-
*/
|
|
2587
|
-
let SkyDocsDemoPageTitleService = class SkyDocsDemoPageTitleService {
|
|
2588
|
-
constructor(title) {
|
|
2589
|
-
this.title = title;
|
|
2590
|
-
}
|
|
2591
|
-
setTitle(...parts) {
|
|
2592
|
-
let windowTitle = 'SKY UX';
|
|
2593
|
-
if (parts && parts.length > 0) {
|
|
2594
|
-
parts.push(windowTitle);
|
|
2595
|
-
windowTitle = parts.join(' - ');
|
|
2596
|
-
}
|
|
2597
|
-
this.title.setTitle(windowTitle);
|
|
2598
|
-
}
|
|
2599
|
-
};
|
|
2600
|
-
SkyDocsDemoPageTitleService.ctorParameters = () => [
|
|
2601
|
-
{ type: Title }
|
|
2602
|
-
];
|
|
2603
|
-
SkyDocsDemoPageTitleService = __decorate([
|
|
2604
|
-
Injectable()
|
|
2605
|
-
], SkyDocsDemoPageTitleService);
|
|
2606
|
-
|
|
2607
|
-
let SkyDocsDesignGuidelinesComponent = class SkyDocsDesignGuidelinesComponent {
|
|
2608
|
-
};
|
|
2609
|
-
SkyDocsDesignGuidelinesComponent = __decorate([
|
|
2610
|
-
Component({
|
|
2611
|
-
selector: 'sky-docs-design-guidelines',
|
|
2612
|
-
template: "<div class=\"sky-docs-design-guidelines\">\n <ng-content></ng-content>\n</div>\n",
|
|
2613
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2614
|
-
})
|
|
2615
|
-
], SkyDocsDesignGuidelinesComponent);
|
|
2616
|
-
|
|
2617
|
-
let SkyDocsSupportalService = class SkyDocsSupportalService {
|
|
2618
|
-
constructor(http) {
|
|
2619
|
-
this.http = http;
|
|
2620
|
-
}
|
|
2621
|
-
getComponentsInfo() {
|
|
2622
|
-
return this.http
|
|
2623
|
-
.get('https://sky-pusa01.app.blackbaud.net/skysp/v1/docs/components-info')
|
|
2624
|
-
.pipe(map((results) => results.components), share());
|
|
2625
|
-
}
|
|
2626
|
-
};
|
|
2627
|
-
SkyDocsSupportalService.ctorParameters = () => [
|
|
2628
|
-
{ type: HttpClient }
|
|
2629
|
-
];
|
|
2630
|
-
SkyDocsSupportalService = __decorate([
|
|
2631
|
-
Injectable()
|
|
2632
|
-
], SkyDocsSupportalService);
|
|
2804
|
+
}
|
|
2805
|
+
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 });
|
|
2806
|
+
SkyDocsTypeDefinitionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsTypeDefinitionsService, providedIn: 'any' });
|
|
2807
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsTypeDefinitionsService, decorators: [{
|
|
2808
|
+
type: Injectable,
|
|
2809
|
+
args: [{
|
|
2810
|
+
providedIn: 'any',
|
|
2811
|
+
}]
|
|
2812
|
+
}], ctorParameters: function () { return [{ type: SkyDocsTypeDefinitionsProvider }, { type: SkyDocsTypeDocAdapterService }]; } });
|
|
2633
2813
|
|
|
2634
2814
|
/**
|
|
2635
2815
|
* @internal
|
|
2636
2816
|
*/
|
|
2637
|
-
|
|
2638
|
-
constructor(
|
|
2639
|
-
this.
|
|
2640
|
-
this._anchorLinkClick = new Subject();
|
|
2641
|
-
this.eventListener = (e) => {
|
|
2642
|
-
e.preventDefault();
|
|
2643
|
-
this._anchorLinkClick.next({
|
|
2644
|
-
href: e.target.href
|
|
2645
|
-
});
|
|
2646
|
-
};
|
|
2647
|
-
}
|
|
2648
|
-
get anchorLinks() {
|
|
2649
|
-
return document.querySelectorAll('a.sky-docs-anchor-link');
|
|
2650
|
-
}
|
|
2651
|
-
get currentUrl() {
|
|
2652
|
-
return this.windowRef.nativeWindow.location.href.split('#')[0];
|
|
2653
|
-
}
|
|
2654
|
-
ngOnDestroy() {
|
|
2655
|
-
this.removeClickEventListeners();
|
|
2656
|
-
}
|
|
2657
|
-
setupAnchorLinks() {
|
|
2658
|
-
for (let index = 0; index < this.anchorLinks.length; index++) {
|
|
2659
|
-
const anchor = this.anchorLinks[index];
|
|
2660
|
-
const fragment = anchor.href.split('#')[1];
|
|
2661
|
-
const url = this.currentUrl;
|
|
2662
|
-
const href = `${url}#${fragment}`;
|
|
2663
|
-
anchor.href = href;
|
|
2664
|
-
}
|
|
2665
|
-
}
|
|
2666
|
-
get anchorLinkClick() {
|
|
2667
|
-
if (this._anchorLinkClick.observers.length === 0) {
|
|
2668
|
-
this.addClickEventListeners();
|
|
2669
|
-
}
|
|
2670
|
-
else {
|
|
2671
|
-
this.removeClickEventListeners();
|
|
2672
|
-
}
|
|
2673
|
-
return this._anchorLinkClick;
|
|
2674
|
-
}
|
|
2675
|
-
scrollToFragment(fragment) {
|
|
2676
|
-
this.windowRef.nativeWindow.setTimeout(() => {
|
|
2677
|
-
const element = document.getElementById(fragment);
|
|
2678
|
-
if (element) {
|
|
2679
|
-
this.windowRef.nativeWindow.scrollTo(0, element.offsetTop);
|
|
2680
|
-
}
|
|
2681
|
-
}, 250);
|
|
2682
|
-
}
|
|
2683
|
-
addClickEventListeners() {
|
|
2684
|
-
// Wait for a tick to allow all anchors to be written.
|
|
2685
|
-
this.windowRef.nativeWindow.setTimeout(() => {
|
|
2686
|
-
for (let index = 0; index < this.anchorLinks.length; index++) {
|
|
2687
|
-
const anchor = this.anchorLinks[index];
|
|
2688
|
-
anchor.addEventListener('click', this.eventListener);
|
|
2689
|
-
}
|
|
2690
|
-
});
|
|
2817
|
+
class SkyDocsDemoPageTypeDefinitionsComponent {
|
|
2818
|
+
constructor(typeDefinitionService) {
|
|
2819
|
+
this.typeDefinitionService = typeDefinitionService;
|
|
2691
2820
|
}
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
anchor.removeEventListener('click', this.eventListener);
|
|
2821
|
+
ngOnInit() {
|
|
2822
|
+
if (this.moduleSourceCodePath) {
|
|
2823
|
+
this.types = this.typeDefinitionService.getTypeDefinitions(this.moduleSourceCodePath, this.additionalSourceCodePaths);
|
|
2696
2824
|
}
|
|
2697
2825
|
}
|
|
2698
|
-
}
|
|
2699
|
-
|
|
2700
|
-
{ type:
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2826
|
+
}
|
|
2827
|
+
SkyDocsDemoPageTypeDefinitionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDemoPageTypeDefinitionsComponent, deps: [{ token: SkyDocsTypeDefinitionsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2828
|
+
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 });
|
|
2829
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDemoPageTypeDefinitionsComponent, decorators: [{
|
|
2830
|
+
type: Component,
|
|
2831
|
+
args: [{
|
|
2832
|
+
selector: 'sky-docs-demo-page-type-definitions',
|
|
2833
|
+
templateUrl: './demo-page-type-definitions.component.html',
|
|
2834
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2835
|
+
}]
|
|
2836
|
+
}], ctorParameters: function () { return [{ type: SkyDocsTypeDefinitionsService }]; }, propDecorators: { additionalSourceCodePaths: [{
|
|
2837
|
+
type: Input
|
|
2838
|
+
}], moduleSourceCodePath: [{
|
|
2839
|
+
type: Input
|
|
2840
|
+
}] } });
|
|
2705
2841
|
|
|
2706
2842
|
/**
|
|
2707
2843
|
* The demo page component wraps all documentation components and handles the configuration and layout of the page.
|
|
@@ -2714,7 +2850,7 @@ SkyDocsDemoPageDomAdapterService = __decorate([
|
|
|
2714
2850
|
* </sky-docs-demo-page>
|
|
2715
2851
|
* ```
|
|
2716
2852
|
*/
|
|
2717
|
-
|
|
2853
|
+
class SkyDocsDemoPageComponent {
|
|
2718
2854
|
constructor(activatedRoute, changeDetector, router, skyAppConfig, domAdapter, supportalService, titleService) {
|
|
2719
2855
|
this.activatedRoute = activatedRoute;
|
|
2720
2856
|
this.changeDetector = changeDetector;
|
|
@@ -2738,20 +2874,22 @@ let SkyDocsDemoPageComponent = class SkyDocsDemoPageComponent {
|
|
|
2738
2874
|
this.supportalService
|
|
2739
2875
|
.getComponentsInfo()
|
|
2740
2876
|
.subscribe((results) => {
|
|
2741
|
-
this.sidebarRoutes = [
|
|
2877
|
+
this.sidebarRoutes = [
|
|
2878
|
+
{
|
|
2742
2879
|
name: 'Components',
|
|
2743
2880
|
path: 'https://developer.blackbaud.com/skyux/components',
|
|
2744
2881
|
children: results.map((component) => ({
|
|
2745
2882
|
name: component.name,
|
|
2746
|
-
path: this.getPath(component.url, currentHostUrl)
|
|
2747
|
-
}))
|
|
2748
|
-
}
|
|
2883
|
+
path: this.getPath(component.url, currentHostUrl),
|
|
2884
|
+
})),
|
|
2885
|
+
},
|
|
2886
|
+
];
|
|
2749
2887
|
this.changeDetector.markForCheck();
|
|
2750
2888
|
});
|
|
2751
2889
|
}
|
|
2752
2890
|
ngAfterContentInit() {
|
|
2753
|
-
this.enableCodeExamples =
|
|
2754
|
-
this.enableTabLayout = !!
|
|
2891
|
+
this.enableCodeExamples = this.codeExampleComponents.length > 0;
|
|
2892
|
+
this.enableTabLayout = !!this.designGuidelinesComponent;
|
|
2755
2893
|
}
|
|
2756
2894
|
ngAfterViewInit() {
|
|
2757
2895
|
// Watch for route fragment to change and scroll to heading.
|
|
@@ -2768,7 +2906,7 @@ let SkyDocsDemoPageComponent = class SkyDocsDemoPageComponent {
|
|
|
2768
2906
|
const fragment = anchorLink.href.split('#')[1];
|
|
2769
2907
|
this.router.navigate([], {
|
|
2770
2908
|
fragment,
|
|
2771
|
-
queryParamsHandling: 'merge'
|
|
2909
|
+
queryParamsHandling: 'merge',
|
|
2772
2910
|
});
|
|
2773
2911
|
if (this.activatedRoute.snapshot.fragment === fragment) {
|
|
2774
2912
|
this.domAdapter.scrollToFragment(fragment);
|
|
@@ -2776,6 +2914,7 @@ let SkyDocsDemoPageComponent = class SkyDocsDemoPageComponent {
|
|
|
2776
2914
|
});
|
|
2777
2915
|
}
|
|
2778
2916
|
updateTitle() {
|
|
2917
|
+
/*istanbul ignore else*/
|
|
2779
2918
|
if (this.pageTitle) {
|
|
2780
2919
|
this.titleService.setTitle(this.pageTitle, 'Components');
|
|
2781
2920
|
}
|
|
@@ -2790,93 +2929,76 @@ let SkyDocsDemoPageComponent = class SkyDocsDemoPageComponent {
|
|
|
2790
2929
|
return url;
|
|
2791
2930
|
}
|
|
2792
2931
|
}
|
|
2793
|
-
}
|
|
2794
|
-
SkyDocsDemoPageComponent
|
|
2795
|
-
{ type:
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
]
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
],
|
|
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
|
-
SkyDocsDemoPageTypeDefinitionsComponent
|
|
2862
|
-
|
|
2863
|
-
];
|
|
2864
|
-
__decorate([
|
|
2865
|
-
Input()
|
|
2866
|
-
], SkyDocsDemoPageTypeDefinitionsComponent.prototype, "moduleSourceCodePath", void 0);
|
|
2867
|
-
SkyDocsDemoPageTypeDefinitionsComponent = __decorate([
|
|
2868
|
-
Component({
|
|
2869
|
-
selector: 'sky-docs-demo-page-type-definitions',
|
|
2870
|
-
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>",
|
|
2871
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2872
|
-
})
|
|
2873
|
-
], SkyDocsDemoPageTypeDefinitionsComponent);
|
|
2874
|
-
|
|
2875
|
-
let SkyDocsDemoPageModule = class SkyDocsDemoPageModule {
|
|
2876
|
-
};
|
|
2877
|
-
SkyDocsDemoPageModule = __decorate([
|
|
2878
|
-
NgModule({
|
|
2879
|
-
imports: [
|
|
2932
|
+
}
|
|
2933
|
+
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 });
|
|
2934
|
+
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 });
|
|
2935
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDemoPageComponent, decorators: [{
|
|
2936
|
+
type: Component,
|
|
2937
|
+
args: [{
|
|
2938
|
+
selector: 'sky-docs-demo-page',
|
|
2939
|
+
templateUrl: './demo-page.component.html',
|
|
2940
|
+
styleUrls: ['./demo-page.component.scss'],
|
|
2941
|
+
providers: [SkyDocsDemoPageDomAdapterService],
|
|
2942
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2943
|
+
}]
|
|
2944
|
+
}], 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: [{
|
|
2945
|
+
type: Input
|
|
2946
|
+
}], gitRepoUrl: [{
|
|
2947
|
+
type: Input
|
|
2948
|
+
}], moduleName: [{
|
|
2949
|
+
type: Input
|
|
2950
|
+
}], moduleSourceCodePath: [{
|
|
2951
|
+
type: Input
|
|
2952
|
+
}], packageName: [{
|
|
2953
|
+
type: Input
|
|
2954
|
+
}], packageUrl: [{
|
|
2955
|
+
type: Input
|
|
2956
|
+
}], pageTitle: [{
|
|
2957
|
+
type: Input
|
|
2958
|
+
}], designGuidelinesComponent: [{
|
|
2959
|
+
type: ContentChild,
|
|
2960
|
+
args: [SkyDocsDesignGuidelinesComponent]
|
|
2961
|
+
}], codeExampleComponents: [{
|
|
2962
|
+
type: ContentChildren,
|
|
2963
|
+
args: [SkyDocsCodeExamplesComponent]
|
|
2964
|
+
}] } });
|
|
2965
|
+
|
|
2966
|
+
class SkyDocsDemoPageModuleInfoComponent {
|
|
2967
|
+
}
|
|
2968
|
+
SkyDocsDemoPageModuleInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDemoPageModuleInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2969
|
+
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 });
|
|
2970
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDemoPageModuleInfoComponent, decorators: [{
|
|
2971
|
+
type: Component,
|
|
2972
|
+
args: [{
|
|
2973
|
+
selector: 'sky-docs-demo-page-module-info',
|
|
2974
|
+
template: '<ng-content></ng-content>',
|
|
2975
|
+
}]
|
|
2976
|
+
}] });
|
|
2977
|
+
|
|
2978
|
+
class SkyDocsDemoPageModule {
|
|
2979
|
+
}
|
|
2980
|
+
SkyDocsDemoPageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDemoPageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2981
|
+
SkyDocsDemoPageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDemoPageModule, declarations: [SkyDocsDemoPageComponent,
|
|
2982
|
+
SkyDocsDemoPageModuleInfoComponent,
|
|
2983
|
+
SkyDocsDemoPageSectionComponent,
|
|
2984
|
+
SkyDocsDemoPageSummaryComponent,
|
|
2985
|
+
SkyDocsDemoPageTypeDefinitionsComponent], imports: [CommonModule,
|
|
2986
|
+
RouterModule,
|
|
2987
|
+
SkyCodeBlockModule,
|
|
2988
|
+
SkyCodeModule,
|
|
2989
|
+
SkyDocsDemoModule,
|
|
2990
|
+
SkyDocsHeadingAnchorModule,
|
|
2991
|
+
SkyDocsMarkdownModule,
|
|
2992
|
+
SkyDocsModuleInfoModule,
|
|
2993
|
+
SkyDocsTypeDefinitionsModule,
|
|
2994
|
+
SkyTabsModule,
|
|
2995
|
+
StachePageSummaryModule,
|
|
2996
|
+
StacheWrapperModule], exports: [SkyDocsDemoPageComponent,
|
|
2997
|
+
SkyDocsDemoPageModuleInfoComponent,
|
|
2998
|
+
SkyDocsDemoPageSectionComponent,
|
|
2999
|
+
SkyDocsDemoPageSummaryComponent,
|
|
3000
|
+
SkyDocsDemoPageTypeDefinitionsComponent] });
|
|
3001
|
+
SkyDocsDemoPageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDemoPageModule, imports: [[
|
|
2880
3002
|
CommonModule,
|
|
2881
3003
|
RouterModule,
|
|
2882
3004
|
SkyCodeBlockModule,
|
|
@@ -2888,110 +3010,115 @@ SkyDocsDemoPageModule = __decorate([
|
|
|
2888
3010
|
SkyDocsTypeDefinitionsModule,
|
|
2889
3011
|
SkyTabsModule,
|
|
2890
3012
|
StachePageSummaryModule,
|
|
2891
|
-
StacheWrapperModule
|
|
2892
|
-
]
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
3013
|
+
StacheWrapperModule,
|
|
3014
|
+
]] });
|
|
3015
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDemoPageModule, decorators: [{
|
|
3016
|
+
type: NgModule,
|
|
3017
|
+
args: [{
|
|
3018
|
+
imports: [
|
|
3019
|
+
CommonModule,
|
|
3020
|
+
RouterModule,
|
|
3021
|
+
SkyCodeBlockModule,
|
|
3022
|
+
SkyCodeModule,
|
|
3023
|
+
SkyDocsDemoModule,
|
|
3024
|
+
SkyDocsHeadingAnchorModule,
|
|
3025
|
+
SkyDocsMarkdownModule,
|
|
3026
|
+
SkyDocsModuleInfoModule,
|
|
3027
|
+
SkyDocsTypeDefinitionsModule,
|
|
3028
|
+
SkyTabsModule,
|
|
3029
|
+
StachePageSummaryModule,
|
|
3030
|
+
StacheWrapperModule,
|
|
3031
|
+
],
|
|
3032
|
+
declarations: [
|
|
3033
|
+
SkyDocsDemoPageComponent,
|
|
3034
|
+
SkyDocsDemoPageModuleInfoComponent,
|
|
3035
|
+
SkyDocsDemoPageSectionComponent,
|
|
3036
|
+
SkyDocsDemoPageSummaryComponent,
|
|
3037
|
+
SkyDocsDemoPageTypeDefinitionsComponent,
|
|
3038
|
+
],
|
|
3039
|
+
exports: [
|
|
3040
|
+
SkyDocsDemoPageComponent,
|
|
3041
|
+
SkyDocsDemoPageModuleInfoComponent,
|
|
3042
|
+
SkyDocsDemoPageSectionComponent,
|
|
3043
|
+
SkyDocsDemoPageSummaryComponent,
|
|
3044
|
+
SkyDocsDemoPageTypeDefinitionsComponent,
|
|
3045
|
+
],
|
|
3046
|
+
}]
|
|
3047
|
+
}] });
|
|
3048
|
+
|
|
3049
|
+
class SkyDocsThumbnailComponent {
|
|
2914
3050
|
constructor() {
|
|
2915
3051
|
this.showBorder = false;
|
|
2916
3052
|
}
|
|
2917
|
-
}
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
],
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
};
|
|
2947
|
-
SkyDocsThumbnailModule
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
SkyDocsThumbnailComponent
|
|
2958
|
-
]
|
|
2959
|
-
})
|
|
2960
|
-
], SkyDocsThumbnailModule);
|
|
2961
|
-
|
|
2962
|
-
let SkyDocsDesignGuidelineThumbnailComponent = class SkyDocsDesignGuidelineThumbnailComponent {
|
|
3053
|
+
}
|
|
3054
|
+
SkyDocsThumbnailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsThumbnailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3055
|
+
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 });
|
|
3056
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsThumbnailComponent, decorators: [{
|
|
3057
|
+
type: Component,
|
|
3058
|
+
args: [{
|
|
3059
|
+
selector: 'sky-docs-thumbnail',
|
|
3060
|
+
templateUrl: './thumbnail.component.html',
|
|
3061
|
+
styleUrls: ['./thumbnail.component.scss'],
|
|
3062
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3063
|
+
}]
|
|
3064
|
+
}], propDecorators: { caption: [{
|
|
3065
|
+
type: Input
|
|
3066
|
+
}], captionType: [{
|
|
3067
|
+
type: Input
|
|
3068
|
+
}], imageAlt: [{
|
|
3069
|
+
type: Input
|
|
3070
|
+
}], imageSource: [{
|
|
3071
|
+
type: Input
|
|
3072
|
+
}], showBorder: [{
|
|
3073
|
+
type: Input
|
|
3074
|
+
}], videoSource: [{
|
|
3075
|
+
type: Input
|
|
3076
|
+
}] } });
|
|
3077
|
+
|
|
3078
|
+
class SkyDocsThumbnailModule {
|
|
3079
|
+
}
|
|
3080
|
+
SkyDocsThumbnailModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsThumbnailModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3081
|
+
SkyDocsThumbnailModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsThumbnailModule, declarations: [SkyDocsThumbnailComponent], imports: [CommonModule, SkyImageModule], exports: [SkyDocsThumbnailComponent] });
|
|
3082
|
+
SkyDocsThumbnailModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsThumbnailModule, imports: [[CommonModule, SkyImageModule]] });
|
|
3083
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsThumbnailModule, decorators: [{
|
|
3084
|
+
type: NgModule,
|
|
3085
|
+
args: [{
|
|
3086
|
+
imports: [CommonModule, SkyImageModule],
|
|
3087
|
+
exports: [SkyDocsThumbnailComponent],
|
|
3088
|
+
declarations: [SkyDocsThumbnailComponent],
|
|
3089
|
+
}]
|
|
3090
|
+
}] });
|
|
3091
|
+
|
|
3092
|
+
class SkyDocsDesignGuidelineThumbnailComponent {
|
|
2963
3093
|
constructor() {
|
|
2964
3094
|
this.showBorder = false;
|
|
2965
3095
|
}
|
|
2966
|
-
}
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
],
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
], SkyDocsDesignGuidelineThumbnailComponent);
|
|
2993
|
-
|
|
2994
|
-
let SkyDocsDesignGuidelineComponent = class SkyDocsDesignGuidelineComponent {
|
|
3096
|
+
}
|
|
3097
|
+
SkyDocsDesignGuidelineThumbnailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDesignGuidelineThumbnailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3098
|
+
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 });
|
|
3099
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDesignGuidelineThumbnailComponent, decorators: [{
|
|
3100
|
+
type: Component,
|
|
3101
|
+
args: [{
|
|
3102
|
+
selector: 'sky-docs-design-guideline-thumbnail',
|
|
3103
|
+
templateUrl: './design-guideline-thumbnail.component.html',
|
|
3104
|
+
styleUrls: ['./design-guideline-thumbnail.component.scss'],
|
|
3105
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3106
|
+
}]
|
|
3107
|
+
}], propDecorators: { caption: [{
|
|
3108
|
+
type: Input
|
|
3109
|
+
}], captionType: [{
|
|
3110
|
+
type: Input
|
|
3111
|
+
}], imageAlt: [{
|
|
3112
|
+
type: Input
|
|
3113
|
+
}], imageSource: [{
|
|
3114
|
+
type: Input
|
|
3115
|
+
}], videoSource: [{
|
|
3116
|
+
type: Input
|
|
3117
|
+
}], showBorder: [{
|
|
3118
|
+
type: Input
|
|
3119
|
+
}] } });
|
|
3120
|
+
|
|
3121
|
+
class SkyDocsDesignGuidelineComponent {
|
|
2995
3122
|
constructor() {
|
|
2996
3123
|
this.headingStyle = 'default';
|
|
2997
3124
|
this.hasThumbnails = false;
|
|
@@ -3004,71 +3131,87 @@ let SkyDocsDesignGuidelineComponent = class SkyDocsDesignGuidelineComponent {
|
|
|
3004
3131
|
ngAfterContentInit() {
|
|
3005
3132
|
this.hasThumbnails = !!this.thumbnails.length;
|
|
3006
3133
|
}
|
|
3007
|
-
}
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
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
|
-
|
|
3134
|
+
}
|
|
3135
|
+
SkyDocsDesignGuidelineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDesignGuidelineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3136
|
+
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 });
|
|
3137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDesignGuidelineComponent, decorators: [{
|
|
3138
|
+
type: Component,
|
|
3139
|
+
args: [{
|
|
3140
|
+
selector: 'sky-docs-design-guideline',
|
|
3141
|
+
templateUrl: './design-guideline.component.html',
|
|
3142
|
+
styleUrls: ['./design-guideline.component.scss'],
|
|
3143
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3144
|
+
}]
|
|
3145
|
+
}], propDecorators: { heading: [{
|
|
3146
|
+
type: Input
|
|
3147
|
+
}], headingStyle: [{
|
|
3148
|
+
type: Input
|
|
3149
|
+
}], thumbnails: [{
|
|
3150
|
+
type: ContentChildren,
|
|
3151
|
+
args: [SkyDocsDesignGuidelineThumbnailComponent]
|
|
3152
|
+
}] } });
|
|
3153
|
+
|
|
3154
|
+
class SkyDocsDesignGuidelinesModule {
|
|
3155
|
+
}
|
|
3156
|
+
SkyDocsDesignGuidelinesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDesignGuidelinesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3157
|
+
SkyDocsDesignGuidelinesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDesignGuidelinesModule, declarations: [SkyDocsDesignGuidelineComponent,
|
|
3158
|
+
SkyDocsDesignGuidelineThumbnailComponent,
|
|
3159
|
+
SkyDocsDesignGuidelinesComponent], imports: [CommonModule, SkyDocsThumbnailModule, SkyFluidGridModule], exports: [SkyDocsDesignGuidelineComponent,
|
|
3160
|
+
SkyDocsDesignGuidelineThumbnailComponent,
|
|
3161
|
+
SkyDocsDesignGuidelinesComponent] });
|
|
3162
|
+
SkyDocsDesignGuidelinesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDesignGuidelinesModule, imports: [[CommonModule, SkyDocsThumbnailModule, SkyFluidGridModule]] });
|
|
3163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsDesignGuidelinesModule, decorators: [{
|
|
3164
|
+
type: NgModule,
|
|
3165
|
+
args: [{
|
|
3166
|
+
imports: [CommonModule, SkyDocsThumbnailModule, SkyFluidGridModule],
|
|
3167
|
+
declarations: [
|
|
3168
|
+
SkyDocsDesignGuidelineComponent,
|
|
3169
|
+
SkyDocsDesignGuidelineThumbnailComponent,
|
|
3170
|
+
SkyDocsDesignGuidelinesComponent,
|
|
3171
|
+
],
|
|
3172
|
+
exports: [
|
|
3173
|
+
SkyDocsDesignGuidelineComponent,
|
|
3174
|
+
SkyDocsDesignGuidelineThumbnailComponent,
|
|
3175
|
+
SkyDocsDesignGuidelinesComponent,
|
|
3176
|
+
],
|
|
3177
|
+
}]
|
|
3178
|
+
}] });
|
|
3047
3179
|
|
|
3048
3180
|
/**
|
|
3049
3181
|
* This module conveniently exports the most commonly used modules.
|
|
3050
3182
|
*/
|
|
3051
|
-
|
|
3052
|
-
}
|
|
3053
|
-
SkyDocsToolsModule =
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
]
|
|
3066
|
-
|
|
3067
|
-
|
|
3183
|
+
class SkyDocsToolsModule {
|
|
3184
|
+
}
|
|
3185
|
+
SkyDocsToolsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsToolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3186
|
+
SkyDocsToolsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsToolsModule, exports: [SkyAuthHttpClientModule,
|
|
3187
|
+
SkyDocsAnatomyModule,
|
|
3188
|
+
SkyDocsCodeExamplesModule,
|
|
3189
|
+
SkyDocsDemoModule,
|
|
3190
|
+
SkyDocsDemoPageModule,
|
|
3191
|
+
SkyDocsDesignGuidelinesModule] });
|
|
3192
|
+
SkyDocsToolsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsToolsModule, imports: [SkyAuthHttpClientModule,
|
|
3193
|
+
SkyDocsAnatomyModule,
|
|
3194
|
+
SkyDocsCodeExamplesModule,
|
|
3195
|
+
SkyDocsDemoModule,
|
|
3196
|
+
SkyDocsDemoPageModule,
|
|
3197
|
+
SkyDocsDesignGuidelinesModule] });
|
|
3198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDocsToolsModule, decorators: [{
|
|
3199
|
+
type: NgModule,
|
|
3200
|
+
args: [{
|
|
3201
|
+
exports: [
|
|
3202
|
+
SkyAuthHttpClientModule,
|
|
3203
|
+
SkyDocsAnatomyModule,
|
|
3204
|
+
SkyDocsCodeExamplesModule,
|
|
3205
|
+
SkyDocsDemoModule,
|
|
3206
|
+
SkyDocsDemoPageModule,
|
|
3207
|
+
SkyDocsDesignGuidelinesModule,
|
|
3208
|
+
],
|
|
3209
|
+
}]
|
|
3210
|
+
}] });
|
|
3068
3211
|
|
|
3069
3212
|
/**
|
|
3070
3213
|
* Generated bundle index. Do not edit.
|
|
3071
3214
|
*/
|
|
3072
3215
|
|
|
3073
|
-
export { SkyDocsAnatomyModule, SkyDocsCodeExampleTheme, SkyDocsCodeExamplesModule, SkyDocsDemoModule, SkyDocsDemoPageModule, SkyDocsDesignGuidelinesModule, SkyDocsHeadingAnchorModule, SkyDocsMarkdownModule, SkyDocsMarkdownPipe, SkyDocsModuleInfoModule, SkyDocsSourceCodeProvider, SkyDocsSupportalService, SkyDocsThumbnailModule, SkyDocsToolsModule, SkyDocsToolsOptions, SkyDocsTypeDefinitionsModule, SkyDocsTypeDefinitionsProvider, SkyDocsTypeDefinitionsService,
|
|
3216
|
+
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 };
|
|
3074
3217
|
//# sourceMappingURL=skyux-docs-tools.js.map
|