@skyux/docs-tools 11.2.1 → 12.0.0-alpha.5
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/README.md +4 -132
- package/fesm2022/skyux-docs-tools.mjs +445 -3352
- package/fesm2022/skyux-docs-tools.mjs.map +1 -1
- package/index.d.ts +6 -5
- package/lib/modules/clipboard/clipboard.service.d.ts +11 -0
- package/lib/modules/code-example-viewer/code-example-viewer.component.d.ts +23 -0
- package/lib/modules/code-example-viewer/code-example-viewer.module.d.ts +10 -0
- package/lib/modules/code-example-viewer/stackblitz-launch-config.d.ts +10 -0
- package/lib/modules/code-example-viewer/stackblitz.service.d.ts +11 -0
- package/lib/modules/code-snippet/code-snippet-language.d.ts +12 -0
- package/lib/modules/code-snippet/code-snippet.component.d.ts +16 -0
- package/lib/modules/code-snippet/code-snippet.module.d.ts +10 -0
- package/{modules → lib/modules}/shared/sky-docs-tools-resources.module.d.ts +0 -4
- package/package.json +27 -23
- package/LICENSE +0 -21
- package/css/docs-tools.css +0 -70
- package/docs-tools.module.d.ts +0 -14
- package/esm2022/docs-tools.module.mjs +0 -36
- package/esm2022/modules/anatomy/anatomy-item.component.mjs +0 -17
- package/esm2022/modules/anatomy/anatomy-thumbnail.component.mjs +0 -27
- package/esm2022/modules/anatomy/anatomy.component.mjs +0 -25
- package/esm2022/modules/anatomy/anatomy.module.mjs +0 -46
- package/esm2022/modules/code-examples/code-example-module-dependencies.mjs +0 -2
- package/esm2022/modules/code-examples/code-example-theme.mjs +0 -6
- package/esm2022/modules/code-examples/code-example.component.mjs +0 -68
- package/esm2022/modules/code-examples/code-example.mjs +0 -2
- package/esm2022/modules/code-examples/code-examples-editor.service.mjs +0 -368
- package/esm2022/modules/code-examples/code-examples.component.mjs +0 -98
- package/esm2022/modules/code-examples/code-examples.module.mjs +0 -41
- package/esm2022/modules/demo/demo-content-alignment.mjs +0 -2
- package/esm2022/modules/demo/demo-control-panel-change.mjs +0 -2
- package/esm2022/modules/demo/demo-control-panel-checkbox.component.mjs +0 -84
- package/esm2022/modules/demo/demo-control-panel-radio-choice.mjs +0 -2
- package/esm2022/modules/demo/demo-control-panel-radio-group.component.mjs +0 -80
- package/esm2022/modules/demo/demo-control-panel-section.component.mjs +0 -22
- package/esm2022/modules/demo/demo-control-panel.component.mjs +0 -85
- package/esm2022/modules/demo/demo-custom-control-panel.component.mjs +0 -20
- package/esm2022/modules/demo/demo.component.mjs +0 -58
- package/esm2022/modules/demo/demo.module.mjs +0 -72
- package/esm2022/modules/demo-page/demo-page-dom-adapter.service.mjs +0 -75
- package/esm2022/modules/demo-page/demo-page-module-info.component.mjs +0 -14
- package/esm2022/modules/demo-page/demo-page-section.component.mjs +0 -43
- package/esm2022/modules/demo-page/demo-page-summary.component.mjs +0 -21
- package/esm2022/modules/demo-page/demo-page-title.service.mjs +0 -28
- package/esm2022/modules/demo-page/demo-page-type-definitions.component.mjs +0 -24
- package/esm2022/modules/demo-page/demo-page.component.mjs +0 -190
- package/esm2022/modules/demo-page/demo-page.module.mjs +0 -94
- package/esm2022/modules/design-guidelines/design-guideline-thumbnail.component.mjs +0 -27
- package/esm2022/modules/design-guidelines/design-guideline.component.mjs +0 -33
- package/esm2022/modules/design-guidelines/design-guidelines.component.mjs +0 -11
- package/esm2022/modules/design-guidelines/design-guidelines.module.mjs +0 -34
- package/esm2022/modules/heading-anchor/heading-anchor.component.mjs +0 -21
- package/esm2022/modules/heading-anchor/heading-anchor.module.mjs +0 -20
- package/esm2022/modules/markdown/markdown.module.mjs +0 -17
- package/esm2022/modules/markdown/markdown.pipe.mjs +0 -20
- package/esm2022/modules/module-info/module-info.component.mjs +0 -72
- package/esm2022/modules/module-info/module-info.module.mjs +0 -40
- package/esm2022/modules/safe-html/safe-html.component.mjs +0 -20
- package/esm2022/modules/safe-html/safe-html.module.mjs +0 -18
- package/esm2022/modules/shared/docs-tools-component-info.mjs +0 -2
- package/esm2022/modules/shared/docs-tools-options.mjs +0 -3
- package/esm2022/modules/shared/docs-tools-site-options.mjs +0 -3
- package/esm2022/modules/shared/docs-tools-supportal.service.mjs +0 -23
- package/esm2022/modules/shared/sky-docs-tools-resources.module.mjs +0 -55
- package/esm2022/modules/source-code/source-code-file.mjs +0 -2
- package/esm2022/modules/source-code/source-code-provider.mjs +0 -13
- package/esm2022/modules/source-code/source-code.service.mjs +0 -42
- package/esm2022/modules/thumbnail/thumbnail.component.mjs +0 -28
- package/esm2022/modules/thumbnail/thumbnail.module.mjs +0 -19
- package/esm2022/modules/type-definitions/anchor-link-service-config.mjs +0 -2
- package/esm2022/modules/type-definitions/anchor-link-service-format.mjs +0 -2
- package/esm2022/modules/type-definitions/anchor-link.mjs +0 -2
- package/esm2022/modules/type-definitions/anchor-link.service.mjs +0 -106
- package/esm2022/modules/type-definitions/call-signature-definition.component.mjs +0 -45
- package/esm2022/modules/type-definitions/call-signature-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/class-definition.component.mjs +0 -20
- package/esm2022/modules/type-definitions/class-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/comment-tags.mjs +0 -2
- package/esm2022/modules/type-definitions/directive-definition.component.mjs +0 -20
- package/esm2022/modules/type-definitions/directive-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/entry-child-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/entry-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/enumeration-definition.component.mjs +0 -19
- package/esm2022/modules/type-definitions/enumeration-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/enumeration-member-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/index-signature-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/interface-definition.component.mjs +0 -36
- package/esm2022/modules/type-definitions/interface-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/interface-property-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/method-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/method-definitions.component.mjs +0 -72
- package/esm2022/modules/type-definitions/parameter-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/pipe-definition.component.mjs +0 -20
- package/esm2022/modules/type-definitions/pipe-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/preview-feature-indicator.component.mjs +0 -13
- package/esm2022/modules/type-definitions/property-decorator.mjs +0 -2
- package/esm2022/modules/type-definitions/property-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/property-definitions.component.mjs +0 -66
- package/esm2022/modules/type-definitions/type-alias-definition.component.mjs +0 -37
- package/esm2022/modules/type-definitions/type-alias-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/type-anchor-links.pipe.mjs +0 -27
- package/esm2022/modules/type-definitions/type-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/type-definitions-format.service.mjs +0 -254
- package/esm2022/modules/type-definitions/type-definitions-provider.mjs +0 -10
- package/esm2022/modules/type-definitions/type-definitions.mjs +0 -2
- package/esm2022/modules/type-definitions/type-definitions.module.mjs +0 -108
- package/esm2022/modules/type-definitions/type-definitions.service.mjs +0 -122
- package/esm2022/modules/type-definitions/type-parameter-definition.mjs +0 -2
- package/esm2022/modules/type-definitions/typedoc-adapter.service.mjs +0 -614
- package/esm2022/modules/type-definitions/typedoc-types.mjs +0 -32
- package/esm2022/public-api.mjs +0 -69
- package/esm2022/skyux-docs-tools.mjs +0 -5
- package/modules/anatomy/anatomy-item.component.d.ts +0 -7
- package/modules/anatomy/anatomy-thumbnail.component.d.ts +0 -11
- package/modules/anatomy/anatomy.component.d.ts +0 -9
- package/modules/anatomy/anatomy.module.d.ts +0 -13
- package/modules/code-examples/code-example-module-dependencies.d.ts +0 -6
- package/modules/code-examples/code-example-theme.d.ts +0 -4
- package/modules/code-examples/code-example.component.d.ts +0 -39
- package/modules/code-examples/code-example.d.ts +0 -13
- package/modules/code-examples/code-examples-editor.service.d.ts +0 -18
- package/modules/code-examples/code-examples.component.d.ts +0 -45
- package/modules/code-examples/code-examples.module.d.ts +0 -14
- package/modules/demo/demo-content-alignment.d.ts +0 -1
- package/modules/demo/demo-control-panel-change.d.ts +0 -9
- package/modules/demo/demo-control-panel-checkbox.component.d.ts +0 -63
- package/modules/demo/demo-control-panel-radio-choice.d.ts +0 -13
- package/modules/demo/demo-control-panel-radio-group.component.d.ts +0 -64
- package/modules/demo/demo-control-panel-section.component.d.ts +0 -16
- package/modules/demo/demo-control-panel.component.d.ts +0 -34
- package/modules/demo/demo-custom-control-panel.component.d.ts +0 -9
- package/modules/demo/demo.component.d.ts +0 -32
- package/modules/demo/demo.module.d.ts +0 -18
- package/modules/demo-page/demo-page-dom-adapter.service.d.ts +0 -24
- package/modules/demo-page/demo-page-module-info.component.d.ts +0 -5
- package/modules/demo-page/demo-page-section.component.d.ts +0 -22
- package/modules/demo-page/demo-page-summary.component.d.ts +0 -15
- package/modules/demo-page/demo-page-title.service.d.ts +0 -12
- package/modules/demo-page/demo-page-type-definitions.component.d.ts +0 -10
- package/modules/demo-page/demo-page.component.d.ts +0 -112
- package/modules/demo-page/demo-page.module.d.ts +0 -23
- package/modules/design-guidelines/design-guideline-thumbnail.component.d.ts +0 -11
- package/modules/design-guidelines/design-guideline.component.d.ts +0 -12
- package/modules/design-guidelines/design-guidelines.component.d.ts +0 -5
- package/modules/design-guidelines/design-guidelines.module.d.ts +0 -12
- package/modules/heading-anchor/heading-anchor.component.d.ts +0 -7
- package/modules/heading-anchor/heading-anchor.module.d.ts +0 -10
- package/modules/markdown/markdown.module.d.ts +0 -7
- package/modules/markdown/markdown.pipe.d.ts +0 -7
- package/modules/module-info/module-info.component.d.ts +0 -21
- package/modules/module-info/module-info.module.d.ts +0 -13
- package/modules/safe-html/safe-html.component.d.ts +0 -10
- package/modules/safe-html/safe-html.module.d.ts +0 -8
- package/modules/shared/docs-tools-component-info.d.ts +0 -13
- package/modules/shared/docs-tools-options.d.ts +0 -4
- package/modules/shared/docs-tools-site-options.d.ts +0 -3
- package/modules/shared/docs-tools-supportal.service.d.ts +0 -11
- package/modules/source-code/source-code-file.d.ts +0 -5
- package/modules/source-code/source-code-provider.d.ts +0 -6
- package/modules/source-code/source-code.service.d.ts +0 -10
- package/modules/thumbnail/thumbnail.component.d.ts +0 -11
- package/modules/thumbnail/thumbnail.module.d.ts +0 -9
- package/modules/type-definitions/anchor-link-service-config.d.ts +0 -6
- package/modules/type-definitions/anchor-link-service-format.d.ts +0 -4
- package/modules/type-definitions/anchor-link.d.ts +0 -3
- package/modules/type-definitions/anchor-link.service.d.ts +0 -24
- package/modules/type-definitions/call-signature-definition.component.d.ts +0 -26
- package/modules/type-definitions/call-signature-definition.d.ts +0 -9
- package/modules/type-definitions/class-definition.component.d.ts +0 -7
- package/modules/type-definitions/class-definition.d.ts +0 -11
- package/modules/type-definitions/comment-tags.d.ts +0 -14
- package/modules/type-definitions/directive-definition.component.d.ts +0 -7
- package/modules/type-definitions/directive-definition.d.ts +0 -11
- package/modules/type-definitions/entry-child-definition.d.ts +0 -13
- package/modules/type-definitions/entry-definition.d.ts +0 -12
- package/modules/type-definitions/enumeration-definition.component.d.ts +0 -7
- package/modules/type-definitions/enumeration-definition.d.ts +0 -9
- package/modules/type-definitions/enumeration-member-definition.d.ts +0 -11
- package/modules/type-definitions/index-signature-definition.d.ts +0 -11
- package/modules/type-definitions/interface-definition.component.d.ts +0 -14
- package/modules/type-definitions/interface-definition.d.ts +0 -11
- package/modules/type-definitions/interface-property-definition.d.ts +0 -8
- package/modules/type-definitions/method-definition.d.ts +0 -11
- package/modules/type-definitions/method-definitions.component.d.ts +0 -36
- package/modules/type-definitions/parameter-definition.d.ts +0 -12
- package/modules/type-definitions/pipe-definition.component.d.ts +0 -7
- package/modules/type-definitions/pipe-definition.d.ts +0 -8
- package/modules/type-definitions/preview-feature-indicator.component.d.ts +0 -5
- package/modules/type-definitions/property-decorator.d.ts +0 -6
- package/modules/type-definitions/property-definition.d.ts +0 -11
- package/modules/type-definitions/property-definitions.component.d.ts +0 -39
- package/modules/type-definitions/type-alias-definition.component.d.ts +0 -14
- package/modules/type-definitions/type-alias-definition.d.ts +0 -11
- package/modules/type-definitions/type-anchor-links.pipe.d.ts +0 -14
- package/modules/type-definitions/type-definition.d.ts +0 -36
- package/modules/type-definitions/type-definitions-format.service.d.ts +0 -55
- package/modules/type-definitions/type-definitions-provider.d.ts +0 -10
- package/modules/type-definitions/type-definitions.d.ts +0 -20
- package/modules/type-definitions/type-definitions.module.d.ts +0 -26
- package/modules/type-definitions/type-definitions.service.d.ts +0 -20
- package/modules/type-definitions/type-parameter-definition.d.ts +0 -8
- package/modules/type-definitions/typedoc-adapter.service.d.ts +0 -49
- package/modules/type-definitions/typedoc-types.d.ts +0 -142
- package/public-api.d.ts +0 -66
|
@@ -1,182 +1,59 @@
|
|
|
1
|
-
import * as i1 from '@angular/common';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
1
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import * as i4 from '@blackbaud/skyux-lib-code-block';
|
|
10
|
-
import { SkyCodeBlockModule, SkyCodeModule } from '@blackbaud/skyux-lib-code-block';
|
|
11
|
-
import * as i5$1 from '@skyux/icon';
|
|
2
|
+
import { inject, Injectable, NgModule, input, viewChild, computed, Component, ChangeDetectionStrategy, ViewEncapsulation, booleanAttribute, signal } from '@angular/core';
|
|
3
|
+
import { KeyValuePipe, NgComponentOutlet } from '@angular/common';
|
|
4
|
+
import * as i5 from '@skyux/core';
|
|
5
|
+
import { SkyAppWindowRef, SkyIdModule } from '@skyux/core';
|
|
6
|
+
import * as i1 from '@skyux/icon';
|
|
12
7
|
import { SkyIconModule } from '@skyux/icon';
|
|
13
|
-
import * as
|
|
14
|
-
import {
|
|
15
|
-
import * as
|
|
16
|
-
import { SkyVerticalTabsetModule
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import { SkyCheckboxModule, SkyRadioModule } from '@skyux/forms';
|
|
31
|
-
import * as i12 from '@blackbaud/skyux-lib-stache';
|
|
32
|
-
import { StachePageSummaryModule, StacheWrapperModule } from '@blackbaud/skyux-lib-stache';
|
|
33
|
-
import * as i1$3 from '@angular/router';
|
|
34
|
-
import { RouterModule } from '@angular/router';
|
|
35
|
-
import { marked } from 'marked';
|
|
36
|
-
import * as i4$1 from '@blackbaud/skyux-lib-clipboard';
|
|
37
|
-
import { SkyClipboardModule } from '@blackbaud/skyux-lib-clipboard';
|
|
38
|
-
import * as i6$1 from '@skyux/help-inline';
|
|
39
|
-
import { SkyHelpInlineModule } from '@skyux/help-inline';
|
|
40
|
-
import * as i7$1 from '@skyux/popovers';
|
|
41
|
-
import { SkyPopoverModule } from '@skyux/popovers';
|
|
42
|
-
import * as i1$5 from '@skyux/indicators';
|
|
43
|
-
import { SkyStatusIndicatorModule, SkyAlertModule } from '@skyux/indicators';
|
|
44
|
-
import * as i1$4 from '@angular/platform-browser';
|
|
45
|
-
import * as i2$1 from '@skyux/config';
|
|
46
|
-
import * as i1$6 from '@angular/common/http';
|
|
47
|
-
import orderBy from 'lodash.orderby';
|
|
48
|
-
import * as i9 from '@skyux/router';
|
|
49
|
-
import { SkyAppLinkModule } from '@skyux/router';
|
|
8
|
+
import * as i1$1 from '@skyux/layout';
|
|
9
|
+
import { SkyBoxModule } from '@skyux/layout';
|
|
10
|
+
import * as i6 from '@skyux/tabs';
|
|
11
|
+
import { SkyVerticalTabsetModule } from '@skyux/tabs';
|
|
12
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
13
|
+
import highlight from 'highlight.js/lib/core';
|
|
14
|
+
import hlJavaScript from 'highlight.js/lib/languages/javascript';
|
|
15
|
+
import hlScss from 'highlight.js/lib/languages/scss';
|
|
16
|
+
import hlTypeScript from 'highlight.js/lib/languages/typescript';
|
|
17
|
+
import hlXml from 'highlight.js/lib/languages/xml';
|
|
18
|
+
import { SkyToastService } from '@skyux/toast';
|
|
19
|
+
import * as i2 from '@skyux/i18n';
|
|
20
|
+
import { SkyLibResourcesService, SkyI18nModule } from '@skyux/i18n';
|
|
21
|
+
import { HttpClient } from '@angular/common/http';
|
|
22
|
+
import { SkyAppAssetsService } from '@skyux/assets';
|
|
23
|
+
import stackblitz from '@stackblitz/sdk';
|
|
24
|
+
import { firstValueFrom } from 'rxjs';
|
|
50
25
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}], propDecorators: { isOptional: [{
|
|
62
|
-
type: Input
|
|
63
|
-
}] } });
|
|
64
|
-
|
|
65
|
-
class SkyDocsAnatomyComponent {
|
|
66
|
-
ngAfterContentInit() {
|
|
67
|
-
this.anatomyItems.forEach((item, i) => {
|
|
68
|
-
item.marker = (i + 1).toString();
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsAnatomyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
72
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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\n class=\"sky-docs-anatomy-items\"\n screenSmall=\"6\"\n screenMedium=\"5\"\n screenLarge=\"4\"\n >\n <ng-content select=\"sky-docs-anatomy-item\"></ng-content>\n </sky-column>\n <sky-column screenSmall=\"6\" screenMedium=\"7\" screenLarge=\"8\">\n <sky-image\n *ngIf=\"imagePath; else thumbnails\"\n [imageSource]=\"imagePath\"\n ></sky-image>\n </sky-column>\n </sky-row>\n</div>\n\n<ng-template #thumbnails>\n <ng-content select=\"sky-docs-anatomy-thumbnail\"></ng-content>\n</ng-template>\n", styles: [".sky-docs-anatomy-items{padding-bottom:20px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.λ23, selector: "sky-row", inputs: ["reverseColumnOrder"] }, { kind: "component", type: i5.λ24, selector: "sky-column", inputs: ["screenXSmall", "screenSmall", "screenMedium", "screenLarge"] }, { kind: "component", type: i3.λ4, selector: "sky-image", inputs: ["caption", "captionType", "imageAlt", "imageSource", "showBorder", "showCaptionPrefix"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
73
|
-
}
|
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsAnatomyComponent, decorators: [{
|
|
75
|
-
type: Component,
|
|
76
|
-
args: [{ selector: 'sky-docs-anatomy', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sky-docs-anatomy\">\n <sky-row>\n <sky-column\n class=\"sky-docs-anatomy-items\"\n screenSmall=\"6\"\n screenMedium=\"5\"\n screenLarge=\"4\"\n >\n <ng-content select=\"sky-docs-anatomy-item\"></ng-content>\n </sky-column>\n <sky-column screenSmall=\"6\" screenMedium=\"7\" screenLarge=\"8\">\n <sky-image\n *ngIf=\"imagePath; else thumbnails\"\n [imageSource]=\"imagePath\"\n ></sky-image>\n </sky-column>\n </sky-row>\n</div>\n\n<ng-template #thumbnails>\n <ng-content select=\"sky-docs-anatomy-thumbnail\"></ng-content>\n</ng-template>\n", styles: [".sky-docs-anatomy-items{padding-bottom:20px}\n"] }]
|
|
77
|
-
}], propDecorators: { imagePath: [{
|
|
78
|
-
type: Input
|
|
79
|
-
}], anatomyItems: [{
|
|
80
|
-
type: ContentChildren,
|
|
81
|
-
args: [SkyDocsAnatomyItemComponent]
|
|
82
|
-
}] } });
|
|
83
|
-
|
|
84
|
-
class SkyDocsThumbnailComponent {
|
|
85
|
-
constructor() {
|
|
86
|
-
this.showBorder = false;
|
|
87
|
-
}
|
|
88
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsThumbnailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
89
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.λ4, selector: "sky-image", inputs: ["caption", "captionType", "imageAlt", "imageSource", "showBorder", "showCaptionPrefix"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
90
|
-
}
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsThumbnailComponent, decorators: [{
|
|
92
|
-
type: Component,
|
|
93
|
-
args: [{ selector: 'sky-docs-thumbnail', changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
94
|
-
}], propDecorators: { caption: [{
|
|
95
|
-
type: Input
|
|
96
|
-
}], captionType: [{
|
|
97
|
-
type: Input
|
|
98
|
-
}], imageAlt: [{
|
|
99
|
-
type: Input
|
|
100
|
-
}], imageSource: [{
|
|
101
|
-
type: Input
|
|
102
|
-
}], showBorder: [{
|
|
103
|
-
type: Input
|
|
104
|
-
}], videoSource: [{
|
|
105
|
-
type: Input
|
|
106
|
-
}] } });
|
|
107
|
-
|
|
108
|
-
class SkyDocsThumbnailModule {
|
|
109
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsThumbnailModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
110
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsThumbnailModule, declarations: [SkyDocsThumbnailComponent], imports: [CommonModule, SkyImageModule], exports: [SkyDocsThumbnailComponent] }); }
|
|
111
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsThumbnailModule, imports: [CommonModule, SkyImageModule] }); }
|
|
112
|
-
}
|
|
113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsThumbnailModule, decorators: [{
|
|
114
|
-
type: NgModule,
|
|
115
|
-
args: [{
|
|
116
|
-
imports: [CommonModule, SkyImageModule],
|
|
117
|
-
exports: [SkyDocsThumbnailComponent],
|
|
118
|
-
declarations: [SkyDocsThumbnailComponent],
|
|
119
|
-
}]
|
|
120
|
-
}] });
|
|
121
|
-
|
|
122
|
-
class SkyDocsAnatomyThumbnailComponent {
|
|
123
|
-
constructor() {
|
|
124
|
-
this.showBorder = false;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
const SKY_CODE_SNIPPET_LANGUAGES = ['html', 'js', 'scss', 'ts'];
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
function assertCodeSnippetLanguage(value) {
|
|
34
|
+
if (!SKY_CODE_SNIPPET_LANGUAGES.includes(value)) {
|
|
35
|
+
throw new Error(`Value "${value}" is not a supported language type.`);
|
|
125
36
|
}
|
|
126
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsAnatomyThumbnailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
127
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: SkyDocsAnatomyThumbnailComponent, selector: "sky-docs-anatomy-thumbnail", inputs: { caption: "caption", captionType: "captionType", imageAlt: "imageAlt", imageSource: "imageSource", videoSource: "videoSource", showBorder: "showBorder" }, ngImport: i0, template: "<div class=\"sky-docs-anatomy-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-anatomy-thumbnail{margin-bottom:50px}\n"], dependencies: [{ kind: "component", type: SkyDocsThumbnailComponent, selector: "sky-docs-thumbnail", inputs: ["caption", "captionType", "imageAlt", "imageSource", "showBorder", "videoSource"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
128
37
|
}
|
|
129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsAnatomyThumbnailComponent, decorators: [{
|
|
130
|
-
type: Component,
|
|
131
|
-
args: [{ selector: 'sky-docs-anatomy-thumbnail', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sky-docs-anatomy-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-anatomy-thumbnail{margin-bottom:50px}\n"] }]
|
|
132
|
-
}], propDecorators: { caption: [{
|
|
133
|
-
type: Input
|
|
134
|
-
}], captionType: [{
|
|
135
|
-
type: Input
|
|
136
|
-
}], imageAlt: [{
|
|
137
|
-
type: Input
|
|
138
|
-
}], imageSource: [{
|
|
139
|
-
type: Input
|
|
140
|
-
}], videoSource: [{
|
|
141
|
-
type: Input
|
|
142
|
-
}], showBorder: [{
|
|
143
|
-
type: Input
|
|
144
|
-
}] } });
|
|
145
38
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
type: NgModule,
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
class SkyClipboardService {
|
|
43
|
+
#toastSvc = inject(SkyToastService);
|
|
44
|
+
#windowRef = inject(SkyAppWindowRef);
|
|
45
|
+
copyTextContent(el, successMessage) {
|
|
46
|
+
const text = el.nativeElement.textContent.trim();
|
|
47
|
+
this.#windowRef.nativeWindow.navigator.clipboard.writeText(text);
|
|
48
|
+
this.#toastSvc.openMessage(successMessage, { autoClose: true });
|
|
49
|
+
}
|
|
50
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyClipboardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
51
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyClipboardService, providedIn: 'root' }); }
|
|
52
|
+
}
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyClipboardService, decorators: [{
|
|
54
|
+
type: Injectable,
|
|
163
55
|
args: [{
|
|
164
|
-
|
|
165
|
-
CommonModule,
|
|
166
|
-
SkyDocsThumbnailModule,
|
|
167
|
-
SkyFluidGridModule,
|
|
168
|
-
SkyImageModule,
|
|
169
|
-
],
|
|
170
|
-
declarations: [
|
|
171
|
-
SkyDocsAnatomyComponent,
|
|
172
|
-
SkyDocsAnatomyItemComponent,
|
|
173
|
-
SkyDocsAnatomyThumbnailComponent,
|
|
174
|
-
],
|
|
175
|
-
exports: [
|
|
176
|
-
SkyDocsAnatomyComponent,
|
|
177
|
-
SkyDocsAnatomyItemComponent,
|
|
178
|
-
SkyDocsAnatomyThumbnailComponent,
|
|
179
|
-
],
|
|
56
|
+
providedIn: 'root',
|
|
180
57
|
}]
|
|
181
58
|
}] });
|
|
182
59
|
|
|
@@ -184,3266 +61,482 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
|
|
|
184
61
|
/**
|
|
185
62
|
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
186
63
|
* The contents of this file were automatically generated by
|
|
187
|
-
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-docs-tools' schematic.
|
|
64
|
+
* the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-docs-tools' schematic.
|
|
188
65
|
* To update this file, simply rerun the command.
|
|
189
66
|
*/
|
|
190
67
|
const RESOURCES = {
|
|
191
68
|
'EN-US': {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
'sky-docs-code-example-launch-button-label': {
|
|
196
|
-
message: 'Run in StackBlitz',
|
|
69
|
+
sky_code_snippet_copy_to_clipboard_button_label: { message: 'Copy' },
|
|
70
|
+
sky_code_snippet_copy_to_clipboard_success_message: {
|
|
71
|
+
message: 'Code copied',
|
|
197
72
|
},
|
|
198
|
-
|
|
73
|
+
sky_code_example_viewer_demo_hidden_message: {
|
|
74
|
+
message: 'Open this code example in StackBlitz to view the demo.',
|
|
75
|
+
},
|
|
76
|
+
sky_code_example_viewer_demo_stack_blitz_button: {
|
|
77
|
+
message: 'Edit in StackBlitz',
|
|
78
|
+
},
|
|
79
|
+
sky_code_example_viewer_hide_code_button_label: { message: 'Hide code' },
|
|
80
|
+
sky_code_example_viewer_show_code_button_label: { message: 'Show code' },
|
|
199
81
|
},
|
|
200
82
|
};
|
|
201
83
|
SkyLibResourcesService.addResources(RESOURCES);
|
|
202
|
-
class SkyDocsToolsResourcesProvider {
|
|
203
|
-
getString(localeInfo, name) {
|
|
204
|
-
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
84
|
/**
|
|
208
85
|
* Import into any component library module that needs to use resource strings.
|
|
209
86
|
*/
|
|
210
87
|
class SkyDocsToolsResourcesModule {
|
|
211
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
212
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
213
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
214
|
-
{
|
|
215
|
-
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
216
|
-
useClass: SkyDocsToolsResourcesProvider,
|
|
217
|
-
multi: true,
|
|
218
|
-
},
|
|
219
|
-
], imports: [SkyI18nModule] }); }
|
|
88
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsToolsResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
89
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsToolsResourcesModule, exports: [SkyI18nModule] }); }
|
|
90
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsToolsResourcesModule, imports: [SkyI18nModule] }); }
|
|
220
91
|
}
|
|
221
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsToolsResourcesModule, decorators: [{
|
|
222
93
|
type: NgModule,
|
|
223
94
|
args: [{
|
|
224
95
|
exports: [SkyI18nModule],
|
|
225
|
-
providers: [
|
|
226
|
-
{
|
|
227
|
-
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
228
|
-
useClass: SkyDocsToolsResourcesProvider,
|
|
229
|
-
multi: true,
|
|
230
|
-
},
|
|
231
|
-
],
|
|
232
96
|
}]
|
|
233
97
|
}] });
|
|
234
98
|
|
|
235
|
-
var SkyDocsCodeExampleTheme;
|
|
236
|
-
(function (SkyDocsCodeExampleTheme) {
|
|
237
|
-
SkyDocsCodeExampleTheme["Default"] = "default";
|
|
238
|
-
SkyDocsCodeExampleTheme["Modern"] = "modern";
|
|
239
|
-
})(SkyDocsCodeExampleTheme || (SkyDocsCodeExampleTheme = {}));
|
|
240
|
-
|
|
241
99
|
/**
|
|
242
|
-
*
|
|
243
|
-
* @example
|
|
244
|
-
* ```
|
|
245
|
-
* <sky-docs-code-example
|
|
246
|
-
* heading="My code example"
|
|
247
|
-
* sourceCodePath="src/app/public/plugin-resources/foobar"
|
|
248
|
-
* >
|
|
249
|
-
* </sky-docs-code-example>
|
|
250
|
-
* ```
|
|
100
|
+
* @internal
|
|
251
101
|
*/
|
|
252
|
-
class
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
this.
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
if (!this._theme && themeSvc) {
|
|
267
|
-
themeSvc.settingsChange
|
|
268
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
269
|
-
.subscribe((change) => {
|
|
270
|
-
if (change.currentSettings.theme.name === 'modern') {
|
|
271
|
-
this.theme = SkyDocsCodeExampleTheme.Modern;
|
|
272
|
-
}
|
|
273
|
-
else if (change.currentSettings.theme.name === 'default') {
|
|
274
|
-
this.theme = SkyDocsCodeExampleTheme.Default;
|
|
275
|
-
}
|
|
102
|
+
class SkyCodeSnippetComponent {
|
|
103
|
+
#clipboardSvc;
|
|
104
|
+
#sanitizer;
|
|
105
|
+
constructor() {
|
|
106
|
+
this.#clipboardSvc = inject(SkyClipboardService);
|
|
107
|
+
this.#sanitizer = inject(DomSanitizer);
|
|
108
|
+
this.code = input.required();
|
|
109
|
+
this.language = input.required();
|
|
110
|
+
this.codeRef = viewChild('codeRef');
|
|
111
|
+
this.formatted = computed(() => {
|
|
112
|
+
const code = this.code();
|
|
113
|
+
const language = this.language();
|
|
114
|
+
const formatted = highlight.highlight(code, {
|
|
115
|
+
language,
|
|
276
116
|
});
|
|
277
|
-
|
|
117
|
+
return this.#sanitizer.bypassSecurityTrustHtml(formatted.value);
|
|
118
|
+
});
|
|
119
|
+
highlight.registerLanguage('html', hlXml);
|
|
120
|
+
highlight.registerLanguage('js', hlJavaScript);
|
|
121
|
+
highlight.registerLanguage('scss', hlScss);
|
|
122
|
+
highlight.registerLanguage('ts', hlTypeScript);
|
|
278
123
|
}
|
|
279
|
-
|
|
280
|
-
this.
|
|
281
|
-
|
|
124
|
+
onClipboardButtonClick(copySuccessMessage) {
|
|
125
|
+
const el = this.codeRef();
|
|
126
|
+
if (el) {
|
|
127
|
+
this.#clipboardSvc.copyTextContent(el, copySuccessMessage);
|
|
128
|
+
}
|
|
282
129
|
}
|
|
283
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
284
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
130
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyCodeSnippetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
131
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.5", type: SkyCodeSnippetComponent, isStandalone: true, selector: "sky-code-snippet", inputs: { code: { classPropertyName: "code", publicName: "code", isSignal: true, isRequired: true, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "codeRef", first: true, predicate: ["codeRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"sky-margin-stacked-lg\">\n @let copySuccessMessage =\n 'sky_code_snippet_copy_to_clipboard_success_message' | skyLibResources;\n <button\n class=\"sky-btn sky-btn-default\"\n type=\"button\"\n (click)=\"onClipboardButtonClick(copySuccessMessage)\"\n >\n <sky-icon iconName=\"clipboard-multiple\" />\n {{ 'sky_code_snippet_copy_to_clipboard_button_label' | skyLibResources }}\n </button>\n</div>\n<pre\n #codeRef\n class=\"sky-code-snippet-pre\"\n><code [innerHTML]=\"formatted()\"></code></pre>\n", styles: ["sky-code-snippet{display:block}\n", "sky-code-snippet .sky-code-snippet-pre{font-family:Roboto Mono,serif;margin:0}sky-code-snippet .hljs-attribute,sky-code-snippet .hljs-doctag,sky-code-snippet .hljs-keyword,sky-code-snippet .hljs-literal,sky-code-snippet .hljs-name,sky-code-snippet .hljs-tag .hljs-string,sky-code-snippet .hljs-type,sky-code-snippet .hljs-variable{color:#00f}sky-code-snippet .hljs-string{color:#a31515}sky-code-snippet .hljs-comment{color:green}sky-code-snippet .hljs-tag .hljs-name{color:maroon}sky-code-snippet .hljs-tag .hljs-attr{color:#e50000}\n"], dependencies: [{ kind: "ngmodule", type: SkyIconModule }, { kind: "component", type: i1.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }, { kind: "ngmodule", type: SkyDocsToolsResourcesModule }, { kind: "pipe", type: i2.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
285
132
|
}
|
|
286
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyCodeSnippetComponent, decorators: [{
|
|
287
134
|
type: Component,
|
|
135
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [SkyIconModule, SkyDocsToolsResourcesModule], selector: 'sky-code-snippet', template: "<div class=\"sky-margin-stacked-lg\">\n @let copySuccessMessage =\n 'sky_code_snippet_copy_to_clipboard_success_message' | skyLibResources;\n <button\n class=\"sky-btn sky-btn-default\"\n type=\"button\"\n (click)=\"onClipboardButtonClick(copySuccessMessage)\"\n >\n <sky-icon iconName=\"clipboard-multiple\" />\n {{ 'sky_code_snippet_copy_to_clipboard_button_label' | skyLibResources }}\n </button>\n</div>\n<pre\n #codeRef\n class=\"sky-code-snippet-pre\"\n><code [innerHTML]=\"formatted()\"></code></pre>\n", styles: ["sky-code-snippet{display:block}\n", "sky-code-snippet .sky-code-snippet-pre{font-family:Roboto Mono,serif;margin:0}sky-code-snippet .hljs-attribute,sky-code-snippet .hljs-doctag,sky-code-snippet .hljs-keyword,sky-code-snippet .hljs-literal,sky-code-snippet .hljs-name,sky-code-snippet .hljs-tag .hljs-string,sky-code-snippet .hljs-type,sky-code-snippet .hljs-variable{color:#00f}sky-code-snippet .hljs-string{color:#a31515}sky-code-snippet .hljs-comment{color:green}sky-code-snippet .hljs-tag .hljs-name{color:maroon}sky-code-snippet .hljs-tag .hljs-attr{color:#e50000}\n"] }]
|
|
136
|
+
}], ctorParameters: () => [] });
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @internal
|
|
140
|
+
*/
|
|
141
|
+
class SkyCodeSnippetModule {
|
|
142
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyCodeSnippetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
143
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyCodeSnippetModule, imports: [SkyCodeSnippetComponent], exports: [SkyCodeSnippetComponent] }); }
|
|
144
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyCodeSnippetModule, imports: [SkyCodeSnippetComponent] }); }
|
|
145
|
+
}
|
|
146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyCodeSnippetModule, decorators: [{
|
|
147
|
+
type: NgModule,
|
|
288
148
|
args: [{
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
149
|
+
imports: [SkyCodeSnippetComponent],
|
|
150
|
+
exports: [SkyCodeSnippetComponent],
|
|
292
151
|
}]
|
|
293
|
-
}]
|
|
294
|
-
type: Optional
|
|
295
|
-
}] }], propDecorators: { heading: [{
|
|
296
|
-
type: Input
|
|
297
|
-
}], sourceCodePath: [{
|
|
298
|
-
type: Input
|
|
299
|
-
}], theme: [{
|
|
300
|
-
type: Input
|
|
301
|
-
}] } });
|
|
152
|
+
}] });
|
|
302
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Files to be read from the host SPA's "src/assets/stack-blitz" directory.
|
|
156
|
+
*/
|
|
157
|
+
const TEMPLATE_FILES = ['package.json', 'package-lock.json'];
|
|
303
158
|
/**
|
|
304
159
|
* @internal
|
|
305
160
|
*/
|
|
306
|
-
class
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
161
|
+
class SkyStackBlitzService {
|
|
162
|
+
#http = inject(HttpClient, { optional: true });
|
|
163
|
+
#assetsSvc = inject(SkyAppAssetsService, { optional: true });
|
|
164
|
+
async launch(config) {
|
|
165
|
+
const files = {};
|
|
166
|
+
for (const [file, contents] of Object.entries(config.files)) {
|
|
167
|
+
files[`src/example/${file}`] = contents;
|
|
312
168
|
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
openFile,
|
|
318
|
-
};
|
|
319
|
-
StackBlitzSDK.openProject(project, options);
|
|
320
|
-
}
|
|
321
|
-
#getPayload(codeExample, template) {
|
|
322
|
-
const angularVersion = `^${VERSION.major}`;
|
|
323
|
-
const skyuxVersion = `^${VERSION$1.full}`;
|
|
324
|
-
const defaultDependencies = {
|
|
325
|
-
'@angular-devkit/build-angular': angularVersion,
|
|
326
|
-
'@angular/animations': angularVersion,
|
|
327
|
-
'@angular/cdk': angularVersion,
|
|
328
|
-
'@angular/cli': angularVersion,
|
|
329
|
-
'@angular/common': angularVersion,
|
|
330
|
-
'@angular/compiler': angularVersion,
|
|
331
|
-
'@angular/compiler-cli': angularVersion,
|
|
332
|
-
'@angular/core': angularVersion,
|
|
333
|
-
'@angular/forms': angularVersion,
|
|
334
|
-
'@angular/platform-browser': angularVersion,
|
|
335
|
-
'@angular/platform-browser-dynamic': angularVersion,
|
|
336
|
-
'@angular/router': angularVersion,
|
|
337
|
-
'@skyux/animations': skyuxVersion,
|
|
338
|
-
'@skyux/assets': skyuxVersion,
|
|
339
|
-
'@skyux/config': skyuxVersion,
|
|
340
|
-
'@skyux/core': skyuxVersion,
|
|
341
|
-
'@skyux/errors': skyuxVersion,
|
|
342
|
-
'@skyux/forms': skyuxVersion,
|
|
343
|
-
'@skyux/help-inline': skyuxVersion,
|
|
344
|
-
'@skyux/i18n': skyuxVersion,
|
|
345
|
-
'@skyux/icon': skyuxVersion,
|
|
346
|
-
'@skyux/indicators': skyuxVersion,
|
|
347
|
-
'@skyux/layout': skyuxVersion,
|
|
348
|
-
'@skyux/modals': skyuxVersion,
|
|
349
|
-
'@skyux/packages': skyuxVersion,
|
|
350
|
-
'@skyux/popovers': skyuxVersion,
|
|
351
|
-
'@skyux/router': skyuxVersion,
|
|
352
|
-
'@skyux/theme': skyuxVersion,
|
|
353
|
-
'@types/jasmine': '~5.1.4',
|
|
354
|
-
'ng2-dragula': '5.1.0',
|
|
355
|
-
rxjs: '^7',
|
|
356
|
-
tslib: '^2.6.2',
|
|
357
|
-
typescript: '~5.5.3',
|
|
358
|
-
'zone.js': '~0.14.4',
|
|
359
|
-
};
|
|
360
|
-
const mergedDependencies = Object.assign({}, defaultDependencies, codeExample.packageDependencies);
|
|
361
|
-
// Ensure any @skyux dependencies list the correct version of SKY UX.
|
|
362
|
-
// e.g. `"@skyux/core": "*"` --> `"@skyux/core": "5.0.0"`
|
|
363
|
-
for (const packageName in mergedDependencies) {
|
|
364
|
-
/*istanbul ignore else*/
|
|
365
|
-
if (mergedDependencies.hasOwnProperty(packageName)) {
|
|
366
|
-
const version = mergedDependencies[packageName];
|
|
367
|
-
if (version === '*' &&
|
|
368
|
-
/^(@blackbaud\/skyux-lib-|@skyux)/.test(packageName)) {
|
|
369
|
-
mergedDependencies[packageName] = skyuxVersion;
|
|
370
|
-
}
|
|
169
|
+
for (const file of TEMPLATE_FILES) {
|
|
170
|
+
let contents = await this.#fetchTemplateFileContents(file);
|
|
171
|
+
if (contents === undefined && !file.endsWith('.template')) {
|
|
172
|
+
contents = await this.#fetchTemplateFileContents(`${file}.template`);
|
|
371
173
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
? {
|
|
375
|
-
'ng2-dragula@5.1.0': {
|
|
376
|
-
'@angular/animations': '>=16.0.0 <19.0.0',
|
|
377
|
-
'@angular/core': '>=16.0.0 <19.0.0',
|
|
378
|
-
'@angular/common': '>=16.0.0 <19.0.0',
|
|
379
|
-
},
|
|
174
|
+
if (contents === undefined) {
|
|
175
|
+
throw new Error(`Failed to read StackBlitz template file: ${file}`);
|
|
380
176
|
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
177
|
+
files[file.replace(/\.template$/, '')] = contents;
|
|
178
|
+
}
|
|
179
|
+
const bootstrapImportPath = `./example/${config.primaryFile.replace(/\.ts$/, '')}`;
|
|
180
|
+
files['.stackblitzrc'] = `{
|
|
181
|
+
"installDependencies": true,
|
|
182
|
+
"startCommand": "ng serve"
|
|
183
|
+
}
|
|
184
|
+
`;
|
|
185
|
+
files['angular.json'] = `{
|
|
186
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
187
|
+
"version": 1,
|
|
188
|
+
"cli": {
|
|
189
|
+
"analytics": false
|
|
190
|
+
},
|
|
191
|
+
"newProjectRoot": "projects",
|
|
192
|
+
"projects": {
|
|
193
|
+
"example-app": {
|
|
194
|
+
"projectType": "application",
|
|
195
|
+
"schematics": {
|
|
196
|
+
"@schematics/angular:component": {
|
|
197
|
+
"style": "scss"
|
|
198
|
+
},
|
|
199
|
+
"@schematics/angular:application": {
|
|
200
|
+
"strict": true
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"root": "",
|
|
204
|
+
"sourceRoot": "src",
|
|
205
|
+
"prefix": "app",
|
|
206
|
+
"architect": {
|
|
207
|
+
"build": {
|
|
208
|
+
"builder": "@angular-devkit/build-angular:browser",
|
|
209
|
+
"options": {
|
|
210
|
+
"outputPath": "dist/example-app",
|
|
211
|
+
"index": "src/index.html",
|
|
212
|
+
"main": "src/main.ts",
|
|
213
|
+
"polyfills": ["zone.js"],
|
|
214
|
+
"tsConfig": "tsconfig.app.json",
|
|
215
|
+
"inlineStyleLanguage": "scss",
|
|
216
|
+
"assets": ["src/assets"],
|
|
217
|
+
"styles": ["src/styles.scss"],
|
|
218
|
+
"stylePreprocessorOptions": {
|
|
219
|
+
"includePaths": ["node_modules/"]
|
|
395
220
|
},
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
`;
|
|
406
|
-
const moduleImportStatements = [
|
|
407
|
-
`import { FormsModule, ReactiveFormsModule } from '@angular/forms';`,
|
|
408
|
-
];
|
|
409
|
-
const moduleImports = ['FormsModule', 'ReactiveFormsModule'];
|
|
410
|
-
const files = {
|
|
411
|
-
'.stackblitzrc': JSON.stringify({
|
|
412
|
-
env: {
|
|
413
|
-
NG_BUILD_PARALLEL_TS: '0',
|
|
414
|
-
NODE_ENV: 'development',
|
|
221
|
+
"scripts": []
|
|
222
|
+
},
|
|
223
|
+
"configurations": {
|
|
224
|
+
"production": {
|
|
225
|
+
"budgets": [
|
|
226
|
+
{
|
|
227
|
+
"type": "initial",
|
|
228
|
+
"maximumWarning": "500kb",
|
|
229
|
+
"maximumError": "1mb"
|
|
415
230
|
},
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
231
|
+
{
|
|
232
|
+
"type": "anyComponentStyle",
|
|
233
|
+
"maximumWarning": "2kb",
|
|
234
|
+
"maximumError": "4kb"
|
|
235
|
+
}
|
|
236
|
+
],
|
|
237
|
+
"fileReplacements": [
|
|
238
|
+
{
|
|
239
|
+
"replace": "src/environments/environment.ts",
|
|
240
|
+
"with": "src/environments/environment.prod.ts"
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
"outputHashing": "all"
|
|
244
|
+
},
|
|
245
|
+
"development": {
|
|
246
|
+
"buildOptimizer": false,
|
|
247
|
+
"optimization": false,
|
|
248
|
+
"vendorChunk": true,
|
|
249
|
+
"extractLicenses": false,
|
|
250
|
+
"sourceMap": true,
|
|
251
|
+
"namedChunks": true
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"defaultConfiguration": "production"
|
|
255
|
+
},
|
|
256
|
+
"serve": {
|
|
257
|
+
"builder": "@angular-devkit/build-angular:dev-server",
|
|
258
|
+
"configurations": {
|
|
259
|
+
"production": {
|
|
260
|
+
"buildTarget": "example-app:build:production"
|
|
261
|
+
},
|
|
262
|
+
"development": {
|
|
263
|
+
"buildTarget": "example-app:build:development"
|
|
439
264
|
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
265
|
+
},
|
|
266
|
+
"defaultConfiguration": "development"
|
|
267
|
+
},
|
|
268
|
+
"extract-i18n": {
|
|
269
|
+
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
270
|
+
"options": {
|
|
271
|
+
"buildTarget": "example-app:build"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"test": {
|
|
275
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
276
|
+
"options": {
|
|
277
|
+
"main": "src/test.ts",
|
|
278
|
+
"polyfills": ["zone.js", "zone.js/testing"],
|
|
279
|
+
"tsConfig": "tsconfig.spec.json",
|
|
280
|
+
"karmaConfig": "karma.conf.js",
|
|
281
|
+
"inlineStyleLanguage": "scss",
|
|
282
|
+
"assets": ["src/assets"],
|
|
283
|
+
"stylePreprocessorOptions": {
|
|
284
|
+
"includePaths": ["node_modules/"]
|
|
285
|
+
},
|
|
286
|
+
"styles": ["src/styles.scss"],
|
|
287
|
+
"scripts": []
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
455
291
|
}
|
|
456
292
|
}
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
293
|
+
}
|
|
294
|
+
`;
|
|
295
|
+
files['karma.conf.js'] =
|
|
296
|
+
`// Karma configuration file, see link for more information
|
|
297
|
+
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
298
|
+
|
|
299
|
+
module.exports = function (config) {
|
|
300
|
+
config.set({
|
|
301
|
+
basePath: '',
|
|
302
|
+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
303
|
+
plugins: [
|
|
304
|
+
require('karma-jasmine'),
|
|
305
|
+
require('karma-chrome-launcher'),
|
|
306
|
+
require('karma-jasmine-html-reporter'),
|
|
307
|
+
require('karma-coverage'),
|
|
308
|
+
require('@angular-devkit/build-angular/plugins/karma'),
|
|
309
|
+
],
|
|
310
|
+
client: {
|
|
311
|
+
jasmine: {
|
|
312
|
+
// you can add configuration options for Jasmine here
|
|
313
|
+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
314
|
+
// for example, you can disable the random execution with \`random: false\`
|
|
315
|
+
// or set a specific seed with \`seed: 4321\`
|
|
316
|
+
},
|
|
317
|
+
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
318
|
+
},
|
|
319
|
+
jasmineHtmlReporter: {
|
|
320
|
+
suppressAll: true, // removes the duplicated traces
|
|
321
|
+
},
|
|
322
|
+
coverageReporter: {
|
|
323
|
+
dir: require('path').join(__dirname, './coverage/example-app'),
|
|
324
|
+
subdir: '.',
|
|
325
|
+
reporters: [{ type: 'html' }, { type: 'text-summary' }],
|
|
326
|
+
},
|
|
327
|
+
reporters: ['progress', 'kjhtml'],
|
|
328
|
+
port: 9876,
|
|
329
|
+
colors: true,
|
|
330
|
+
logLevel: config.LOG_INFO,
|
|
331
|
+
autoWatch: true,
|
|
332
|
+
browsers: ['Chrome'],
|
|
333
|
+
singleRun: false,
|
|
334
|
+
restartOnFileChange: true,
|
|
335
|
+
});
|
|
336
|
+
};
|
|
337
|
+
`;
|
|
338
|
+
files['tsconfig.app.json'] = `{
|
|
339
|
+
"extends": "./tsconfig.json",
|
|
340
|
+
"compilerOptions": {
|
|
341
|
+
"outDir": "./out-tsc/app",
|
|
342
|
+
"types": []
|
|
343
|
+
},
|
|
344
|
+
"files": ["src/main.ts"],
|
|
345
|
+
"include": ["src/**/*.d.ts"]
|
|
346
|
+
}
|
|
347
|
+
`;
|
|
348
|
+
files['tsconfig.json'] = `{
|
|
349
|
+
"compileOnSave": false,
|
|
350
|
+
"compilerOptions": {
|
|
351
|
+
"outDir": "./dist/out-tsc",
|
|
352
|
+
"strict": true,
|
|
353
|
+
"noImplicitOverride": true,
|
|
354
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
355
|
+
"noImplicitReturns": true,
|
|
356
|
+
"noFallthroughCasesInSwitch": true,
|
|
357
|
+
"skipLibCheck": true,
|
|
358
|
+
"isolatedModules": true,
|
|
359
|
+
"esModuleInterop": true,
|
|
360
|
+
"experimentalDecorators": true,
|
|
361
|
+
"moduleResolution": "bundler",
|
|
362
|
+
"importHelpers": true,
|
|
363
|
+
"target": "ES2022",
|
|
364
|
+
"module": "ES2022"
|
|
365
|
+
},
|
|
366
|
+
"angularCompilerOptions": {
|
|
367
|
+
"enableI18nLegacyMessageIdFormat": false,
|
|
368
|
+
"strictInjectionParameters": true,
|
|
369
|
+
"strictInputAccessModifiers": true,
|
|
370
|
+
"strictTemplates": true
|
|
466
371
|
}
|
|
467
372
|
}
|
|
468
|
-
|
|
469
|
-
@Component({
|
|
470
|
-
selector: 'sky-demo-app',
|
|
471
|
-
template: '${appComponentTemplate}',
|
|
472
|
-
standalone: true,
|
|
473
|
-
imports: [
|
|
474
|
-
${moduleImports.join(',\n ')},
|
|
475
|
-
],
|
|
476
|
-
providers: [
|
|
477
|
-
{provide: SkyHelpService, useClass: StackblitzOnlyCodeExamplesHelpService}
|
|
478
|
-
]
|
|
479
|
-
})
|
|
480
|
-
export class AppComponent {}
|
|
481
373
|
`;
|
|
482
|
-
files[
|
|
374
|
+
files['tsconfig.spec.json'] = `{
|
|
375
|
+
"extends": "./tsconfig.json",
|
|
376
|
+
"compilerOptions": {
|
|
377
|
+
"outDir": "./out-tsc/spec",
|
|
378
|
+
"types": ["jasmine"]
|
|
379
|
+
},
|
|
380
|
+
"files": ["src/test.ts"],
|
|
381
|
+
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
|
|
382
|
+
}
|
|
383
|
+
`;
|
|
384
|
+
files['src/index.html'] = `<!doctype html>
|
|
483
385
|
<html lang="en">
|
|
484
|
-
<head>
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
</head>
|
|
497
|
-
<body>
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
</sky-demo-app>
|
|
501
|
-
</body>
|
|
386
|
+
<head>
|
|
387
|
+
<meta charset="utf-8" />
|
|
388
|
+
<title>${config.title}</title>
|
|
389
|
+
<base href="/" />
|
|
390
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
391
|
+
<!--
|
|
392
|
+
The CSS links are needed for the StackBlitz demo only.
|
|
393
|
+
This is a workaround for a known bug that prevents external imports in CSS.
|
|
394
|
+
https://github.com/stackblitz/core/issues/133
|
|
395
|
+
-->
|
|
396
|
+
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" crossorigin="anonymous">
|
|
397
|
+
<link rel="stylesheet" type="text/css" href="https://sky.blackbaudcdn.net/static/skyux-icons/7.10.0/assets/css/skyux-icons.min.css" crossorigin="anonymous">
|
|
398
|
+
</head>
|
|
399
|
+
<body>
|
|
400
|
+
<${config.componentSelector}></${config.componentSelector}>
|
|
401
|
+
</body>
|
|
502
402
|
</html>
|
|
503
403
|
`;
|
|
504
|
-
files[
|
|
505
|
-
import '
|
|
506
|
-
import '@skyux/packages/polyfills';
|
|
507
|
-
|
|
404
|
+
files['src/main.ts'] =
|
|
405
|
+
`import { provideHttpClient } from '@angular/common/http';
|
|
508
406
|
import { bootstrapApplication } from '@angular/platform-browser';
|
|
509
407
|
import { provideAnimations } from '@angular/platform-browser/animations';
|
|
510
|
-
import { provideRouter } from '@angular/router';
|
|
511
408
|
import { provideInitialTheme } from '@skyux/theme';
|
|
409
|
+
import { ${config.componentName} } from '${bootstrapImportPath}';
|
|
512
410
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
void bootstrapApplication(AppComponent, {
|
|
411
|
+
bootstrapApplication(${config.componentName}, {
|
|
516
412
|
providers: [
|
|
517
413
|
provideAnimations(),
|
|
518
|
-
provideInitialTheme('
|
|
519
|
-
|
|
414
|
+
provideInitialTheme('modern'),
|
|
415
|
+
provideHttpClient()
|
|
520
416
|
],
|
|
521
|
-
})
|
|
522
|
-
.catch((err) => console.error(err));
|
|
417
|
+
}).catch((err) => console.error(err));
|
|
523
418
|
`;
|
|
524
|
-
files[
|
|
525
|
-
@import '@skyux/theme/css/themes/modern/styles';
|
|
419
|
+
files['src/styles.scss'] = `@import url('@skyux/theme/css/sky');
|
|
420
|
+
@import url('@skyux/theme/css/themes/modern/styles');
|
|
526
421
|
|
|
527
422
|
body {
|
|
528
423
|
background-color: #fff;
|
|
529
424
|
margin: 15px;
|
|
530
425
|
}
|
|
531
426
|
`;
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
},
|
|
560
|
-
defaultConfiguration: 'development',
|
|
561
|
-
},
|
|
562
|
-
serve: {
|
|
563
|
-
builder: '@angular-devkit/build-angular:dev-server',
|
|
564
|
-
configurations: {
|
|
565
|
-
development: {
|
|
566
|
-
buildTarget: 'demo:build:development',
|
|
567
|
-
},
|
|
568
|
-
},
|
|
569
|
-
defaultConfiguration: 'development',
|
|
570
|
-
},
|
|
571
|
-
},
|
|
572
|
-
},
|
|
573
|
-
},
|
|
574
|
-
}, undefined, 2);
|
|
575
|
-
files['package.json'] = JSON.stringify({
|
|
576
|
-
name: 'skyux-spa-demo',
|
|
577
|
-
version: '0.0.0',
|
|
578
|
-
dependencies,
|
|
579
|
-
scripts: {
|
|
580
|
-
start: 'ng serve',
|
|
581
|
-
build: 'ng build',
|
|
582
|
-
},
|
|
583
|
-
...(overrides ? { overrides } : {}),
|
|
584
|
-
}, undefined, 2);
|
|
585
|
-
files['tsconfig.app.json'] = JSON.stringify({
|
|
586
|
-
extends: './tsconfig.json',
|
|
587
|
-
compilerOptions: {
|
|
588
|
-
outDir: './out-tsc/app',
|
|
589
|
-
types: [],
|
|
590
|
-
},
|
|
591
|
-
files: ['src/main.ts'],
|
|
592
|
-
include: ['src/**/*.d.ts'],
|
|
593
|
-
}, undefined, 2);
|
|
594
|
-
files['tsconfig.json'] = JSON.stringify({
|
|
595
|
-
compileOnSave: false,
|
|
596
|
-
compilerOptions: {
|
|
597
|
-
strict: true,
|
|
598
|
-
forceConsistentCasingInFileNames: true,
|
|
599
|
-
noImplicitOverride: true,
|
|
600
|
-
noPropertyAccessFromIndexSignature: true,
|
|
601
|
-
noImplicitReturns: true,
|
|
602
|
-
noFallthroughCasesInSwitch: true,
|
|
603
|
-
sourceMap: true,
|
|
604
|
-
declaration: false,
|
|
605
|
-
downlevelIteration: true,
|
|
606
|
-
esModuleInterop: true,
|
|
607
|
-
experimentalDecorators: true,
|
|
608
|
-
moduleResolution: 'node',
|
|
609
|
-
importHelpers: true,
|
|
610
|
-
typeRoots: ['node_modules/@types'],
|
|
611
|
-
target: 'ES2015',
|
|
612
|
-
module: 'ES2022',
|
|
613
|
-
useDefineForClassFields: false,
|
|
614
|
-
lib: ['ES2022', 'dom'],
|
|
615
|
-
...compilerOptions,
|
|
616
|
-
},
|
|
617
|
-
angularCompilerOptions: {
|
|
618
|
-
fullTemplateTypeCheck: true,
|
|
619
|
-
enableI18nLegacyMessageIdFormat: false,
|
|
620
|
-
strictInjectionParameters: true,
|
|
621
|
-
strictInputAccessModifiers: true,
|
|
622
|
-
strictTemplates: true,
|
|
623
|
-
},
|
|
624
|
-
}, undefined, 2);
|
|
625
|
-
return files;
|
|
626
|
-
}
|
|
627
|
-
getModuleName(contents) {
|
|
628
|
-
return contents.split('export class ')[1].split(' {')[0];
|
|
629
|
-
}
|
|
630
|
-
getFilenameNoExtension(fileName) {
|
|
631
|
-
const extension = fileName.split('.').pop();
|
|
632
|
-
return fileName.replace(`.${extension}`, '');
|
|
427
|
+
files['src/test.ts'] =
|
|
428
|
+
`// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
429
|
+
|
|
430
|
+
import 'zone.js/testing';
|
|
431
|
+
import {getTestBed} from '@angular/core/testing';
|
|
432
|
+
import {
|
|
433
|
+
BrowserDynamicTestingModule,
|
|
434
|
+
platformBrowserDynamicTesting,
|
|
435
|
+
} from '@angular/platform-browser-dynamic/testing';
|
|
436
|
+
|
|
437
|
+
// First, initialize the Angular testing environment.
|
|
438
|
+
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
|
|
439
|
+
|
|
440
|
+
// Then we find all the tests.
|
|
441
|
+
const context = (import.meta as any).webpackContext('./', {
|
|
442
|
+
recursive: true,
|
|
443
|
+
regExp: /\\.spec\\.ts$/,
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
// And load the modules.
|
|
447
|
+
context.keys().map(context);
|
|
448
|
+
`;
|
|
449
|
+
stackblitz.openProject({
|
|
450
|
+
title: config.title,
|
|
451
|
+
files,
|
|
452
|
+
template: 'node',
|
|
453
|
+
}, { openFile: config.primaryFile });
|
|
633
454
|
}
|
|
634
|
-
|
|
635
|
-
const
|
|
636
|
-
|
|
637
|
-
if (!
|
|
638
|
-
|
|
455
|
+
async #fetchTemplateFileContents(file) {
|
|
456
|
+
const filePath = `assets/stack-blitz/${file}`;
|
|
457
|
+
const url = this.#assetsSvc?.getUrl(filePath) ?? filePath;
|
|
458
|
+
if (!this.#http) {
|
|
459
|
+
return undefined;
|
|
639
460
|
}
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
if (components.length > 1) {
|
|
643
|
-
throw ('You may only export a single component from the code example module' +
|
|
644
|
-
`(we found ${components.length}: ${components.join(', ')}).` +
|
|
645
|
-
'Is it possible to create a new code example with the extra components?');
|
|
646
|
-
}
|
|
647
|
-
return components[0];
|
|
648
|
-
}
|
|
649
|
-
getComponentSelector(componentClassName, sourceCode) {
|
|
650
|
-
const found = sourceCode.find((file) => {
|
|
651
|
-
return file.rawContents.indexOf(`class ${componentClassName}`) > -1;
|
|
461
|
+
return await firstValueFrom(this.#http.get(url, { responseType: 'text' })).catch(() => {
|
|
462
|
+
return undefined;
|
|
652
463
|
});
|
|
653
|
-
const trimmed = found.rawContents.replace(/\s/g, '');
|
|
654
|
-
return trimmed.split(`selector:'`)[1].split(`'`)[0];
|
|
655
464
|
}
|
|
656
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
657
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
465
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyStackBlitzService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
466
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyStackBlitzService, providedIn: 'root' }); }
|
|
658
467
|
}
|
|
659
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
468
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyStackBlitzService, decorators: [{
|
|
660
469
|
type: Injectable,
|
|
661
|
-
args: [{
|
|
662
|
-
providedIn: 'root',
|
|
663
|
-
}]
|
|
664
|
-
}] });
|
|
665
|
-
|
|
666
|
-
class SkyDocsSourceCodeProvider {
|
|
667
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsSourceCodeProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
668
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsSourceCodeProvider, providedIn: 'root' }); }
|
|
669
|
-
}
|
|
670
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsSourceCodeProvider, decorators: [{
|
|
671
|
-
type: Injectable,
|
|
672
|
-
args: [{
|
|
673
|
-
providedIn: 'root',
|
|
674
|
-
}]
|
|
470
|
+
args: [{ providedIn: 'root' }]
|
|
675
471
|
}] });
|
|
676
472
|
|
|
677
|
-
class SkyDocsSourceCodeService {
|
|
678
|
-
constructor(sourceCodeProvider) {
|
|
679
|
-
this.sourceCodeProvider = sourceCodeProvider;
|
|
680
|
-
}
|
|
681
|
-
getSourceCode(path) {
|
|
682
|
-
const sourceCode = this.sourceCodeProvider.sourceCode;
|
|
683
|
-
if (!sourceCode || !sourceCode.length) {
|
|
684
|
-
return [];
|
|
685
|
-
}
|
|
686
|
-
return sourceCode
|
|
687
|
-
.filter((file) => file.filePath.indexOf(path) === 0)
|
|
688
|
-
.map((file) => {
|
|
689
|
-
// TODO: Remove decoding after migrating to Angular CLI. Code examples will not be encoded for SKY UX 5 libraries.
|
|
690
|
-
// SKY UX 4 libraries will return rawContents encoded, while later libraries will
|
|
691
|
-
// return rawContents decoded. Check if the contents need decoded before returning them.
|
|
692
|
-
let decodedContents;
|
|
693
|
-
try {
|
|
694
|
-
decodedContents = decodeURIComponent(file.rawContents);
|
|
695
|
-
if (decodedContents !== file.rawContents) {
|
|
696
|
-
file.rawContents = decodedContents;
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
catch (error) {
|
|
700
|
-
// Pre-decoded contents may contain characters like '%' that would throw errors.
|
|
701
|
-
// In these cases, pass along the original rawContents.
|
|
702
|
-
}
|
|
703
|
-
return file;
|
|
704
|
-
});
|
|
705
|
-
}
|
|
706
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsSourceCodeService, deps: [{ token: SkyDocsSourceCodeProvider }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
707
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsSourceCodeService, providedIn: 'any' }); }
|
|
708
|
-
}
|
|
709
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsSourceCodeService, decorators: [{
|
|
710
|
-
type: Injectable,
|
|
711
|
-
args: [{
|
|
712
|
-
providedIn: 'any',
|
|
713
|
-
}]
|
|
714
|
-
}], ctorParameters: () => [{ type: SkyDocsSourceCodeProvider }] });
|
|
715
|
-
|
|
716
473
|
/**
|
|
717
|
-
*
|
|
718
|
-
* @example
|
|
719
|
-
* ```
|
|
720
|
-
* <sky-docs-code-examples
|
|
721
|
-
* [packageDependencies]="{
|
|
722
|
-
* "foobar": "*",
|
|
723
|
-
* "baz": "1.2.3"
|
|
724
|
-
* }"
|
|
725
|
-
* >
|
|
726
|
-
* <sky-docs-code-example>
|
|
727
|
-
* </sky-docs-code-example>
|
|
728
|
-
* </sky-docs-code-examples>
|
|
729
|
-
* ```
|
|
474
|
+
* @internal
|
|
730
475
|
*/
|
|
731
|
-
class
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
this.
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
* See: https://prismjs.com/#supported-languages
|
|
776
|
-
*/
|
|
777
|
-
parseCodeLanguageType(fileName) {
|
|
778
|
-
const extension = fileName.split('.').pop().toLowerCase();
|
|
779
|
-
switch (extension) {
|
|
780
|
-
case 'ts':
|
|
781
|
-
return 'typescript';
|
|
782
|
-
case 'html':
|
|
783
|
-
return 'markup';
|
|
784
|
-
default:
|
|
785
|
-
return extension;
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsCodeExamplesComponent, deps: [{ token: SkyDocsCodeExamplesEditorService }, { token: SkyDocsSourceCodeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
789
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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)\"\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-examples{margin-top:30px}.sky-docs-code-example-header{display:flex;align-items:baseline}.sky-docs-code-example-header-title{flex-grow:1}.sky-docs-code-example-header-controls{flex-grow:0}.sky-docs-code-example-header-controls .sky-btn{font-weight:400}.sky-docs-code-example-wrapper{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;margin-top:10px}.sky-docs-code-example-wrapper ::ng-deep .sky-vertical-tabset-content{margin:0}.sky-docs-code-example-wrapper ::ng-deep sky-code-block{margin:0!important}.sky-docs-code-example-wrapper ::ng-deep .sky-code-block-header{border:0}.sky-docs-code-example-wrapper ::ng-deep .sky-code-output{border-left:0;border-right:0;border-bottom:0}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.λ2, selector: "sky-code-block", inputs: ["code", "fileName", "languageType", "hideCopyToClipboard", "hideHeader"] }, { kind: "component", type: i5$1.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }, { kind: "component", type: i6.λ11, selector: "sky-repeater", inputs: ["activeIndex", "ariaLabel", "reorderable", "expandMode"], outputs: ["activeIndexChange", "orderChange"] }, { kind: "component", type: i6.λ10, selector: "sky-repeater-item", inputs: ["disabled", "itemName", "inlineFormConfig", "inlineFormTemplate", "isExpanded", "isSelected", "reorderable", "selectable", "showInlineForm", "tag"], outputs: ["collapse", "expand", "inlineFormClose", "isSelectedChange"] }, { kind: "component", type: i6.λ8, selector: "sky-repeater-item-content" }, { kind: "component", type: i6.λ12, selector: "sky-repeater-item-title" }, { kind: "component", type: i7.λ6, selector: "sky-vertical-tabset", inputs: ["showTabsText", "ariaLabel", "ariaLabelledBy", "ariaRole", "maintainTabContent"], outputs: ["activeChange"] }, { kind: "component", type: i7.λ4, selector: "sky-vertical-tab", inputs: ["active", "ariaControls", "ariaRole", "disabled", "errorIndicator", "tabHeaderCount", "tabHeading", "showTabRightArrow", "tabId"] }, { kind: "pipe", type: i8.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
790
|
-
}
|
|
791
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsCodeExamplesComponent, decorators: [{
|
|
792
|
-
type: Component,
|
|
793
|
-
args: [{ selector: 'sky-docs-code-examples', changeDetection: ChangeDetectionStrategy.OnPush, 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)\"\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-examples{margin-top:30px}.sky-docs-code-example-header{display:flex;align-items:baseline}.sky-docs-code-example-header-title{flex-grow:1}.sky-docs-code-example-header-controls{flex-grow:0}.sky-docs-code-example-header-controls .sky-btn{font-weight:400}.sky-docs-code-example-wrapper{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;margin-top:10px}.sky-docs-code-example-wrapper ::ng-deep .sky-vertical-tabset-content{margin:0}.sky-docs-code-example-wrapper ::ng-deep sky-code-block{margin:0!important}.sky-docs-code-example-wrapper ::ng-deep .sky-code-block-header{border:0}.sky-docs-code-example-wrapper ::ng-deep .sky-code-output{border-left:0;border-right:0;border-bottom:0}\n"] }]
|
|
794
|
-
}], ctorParameters: () => [{ type: SkyDocsCodeExamplesEditorService }, { type: SkyDocsSourceCodeService }], propDecorators: { packageDependencies: [{
|
|
795
|
-
type: Input
|
|
796
|
-
}], stylesheets: [{
|
|
797
|
-
type: Input
|
|
798
|
-
}], codeExampleComponents: [{
|
|
799
|
-
type: ContentChildren,
|
|
800
|
-
args: [SkyDocsCodeExampleComponent]
|
|
801
|
-
}] } });
|
|
802
|
-
|
|
803
|
-
class SkyDocsCodeExamplesModule {
|
|
804
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsCodeExamplesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
805
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsCodeExamplesModule, declarations: [SkyDocsCodeExampleComponent, SkyDocsCodeExamplesComponent], imports: [CommonModule,
|
|
806
|
-
SkyCodeBlockModule,
|
|
807
|
-
SkyDocsToolsResourcesModule,
|
|
808
|
-
SkyIconModule,
|
|
809
|
-
SkyRepeaterModule,
|
|
810
|
-
SkyVerticalTabsetModule], exports: [SkyDocsCodeExampleComponent, SkyDocsCodeExamplesComponent] }); }
|
|
811
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsCodeExamplesModule, imports: [CommonModule,
|
|
812
|
-
SkyCodeBlockModule,
|
|
813
|
-
SkyDocsToolsResourcesModule,
|
|
814
|
-
SkyIconModule,
|
|
815
|
-
SkyRepeaterModule,
|
|
816
|
-
SkyVerticalTabsetModule] }); }
|
|
817
|
-
}
|
|
818
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsCodeExamplesModule, decorators: [{
|
|
819
|
-
type: NgModule,
|
|
820
|
-
args: [{
|
|
821
|
-
imports: [
|
|
822
|
-
CommonModule,
|
|
823
|
-
SkyCodeBlockModule,
|
|
476
|
+
class SkyCodeExampleViewerComponent {
|
|
477
|
+
constructor() {
|
|
478
|
+
this.#stackblitzSvc = inject(SkyStackBlitzService);
|
|
479
|
+
this.componentName = input.required();
|
|
480
|
+
this.componentSelector = input.required();
|
|
481
|
+
this.componentType = input.required();
|
|
482
|
+
this.demoHidden = input(false);
|
|
483
|
+
this.files = input.required();
|
|
484
|
+
this.headingText = input.required();
|
|
485
|
+
this.primaryFile = input.required();
|
|
486
|
+
this.stacked = input(false, { transform: booleanAttribute });
|
|
487
|
+
this.isCodeVisible = signal(false);
|
|
488
|
+
}
|
|
489
|
+
#stackblitzSvc;
|
|
490
|
+
getCodeLanguage(fileName) {
|
|
491
|
+
const extension = fileName.split('.').pop();
|
|
492
|
+
assertCodeSnippetLanguage(extension);
|
|
493
|
+
return extension;
|
|
494
|
+
}
|
|
495
|
+
launchStackBlitz() {
|
|
496
|
+
void this.#stackblitzSvc.launch({
|
|
497
|
+
componentName: this.componentName(),
|
|
498
|
+
componentSelector: this.componentSelector(),
|
|
499
|
+
files: this.files(),
|
|
500
|
+
primaryFile: this.primaryFile(),
|
|
501
|
+
title: this.headingText(),
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
toggleCodeVisibility() {
|
|
505
|
+
const isCodeVisible = this.isCodeVisible();
|
|
506
|
+
this.isCodeVisible.set(!isCodeVisible);
|
|
507
|
+
}
|
|
508
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyCodeExampleViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
509
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SkyCodeExampleViewerComponent, isStandalone: true, selector: "sky-code-example-viewer", inputs: { componentName: { classPropertyName: "componentName", publicName: "componentName", isSignal: true, isRequired: true, transformFunction: null }, componentSelector: { classPropertyName: "componentSelector", publicName: "componentSelector", isSignal: true, isRequired: true, transformFunction: null }, componentType: { classPropertyName: "componentType", publicName: "componentType", isSignal: true, isRequired: true, transformFunction: null }, demoHidden: { classPropertyName: "demoHidden", publicName: "demoHidden", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: true, transformFunction: null }, headingText: { classPropertyName: "headingText", publicName: "headingText", isSignal: true, isRequired: true, transformFunction: null }, primaryFile: { classPropertyName: "primaryFile", publicName: "primaryFile", isSignal: true, isRequired: true, transformFunction: null }, stacked: { classPropertyName: "stacked", publicName: "stacked", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.sky-margin-stacked-xl": "stacked()" } }, ngImport: i0, template: "<sky-box headingLevel=\"3\" headingStyle=\"3\" [headingText]=\"headingText()\">\n <sky-box-controls>\n <button\n class=\"sky-btn sky-btn-default\"\n data-sky-id=\"stackblitz-btn\"\n type=\"button\"\n (click)=\"launchStackBlitz()\"\n >\n <sky-icon iconName=\"edit\" />\n {{ 'sky_code_example_viewer_demo_stack_blitz_button' | skyLibResources }}\n </button>\n </sky-box-controls>\n\n <sky-box-content>\n <div\n class=\"sky-code-example-viewer-demo sky-padding-even-md sky-margin-stacked-lg\"\n >\n @if (!demoHidden()) {\n <ng-template [ngComponentOutlet]=\"componentType()\" />\n } @else {\n {{ 'sky_code_example_viewer_demo_hidden_message' | skyLibResources }}\n }\n </div>\n\n <div class=\"sky-margin-stacked-sm\">\n <button\n class=\"sky-btn sky-btn-link\"\n data-sky-id=\"toggle-code-visibility-btn\"\n type=\"button\"\n [attr.aria-controls]=\"codeRef.id\"\n [attr.aria-expanded]=\"isCodeVisible()\"\n (click)=\"toggleCodeVisibility()\"\n >\n <sky-icon\n [iconName]=\"isCodeVisible() ? 'chevron-down' : 'chevron-right'\"\n />\n {{\n isCodeVisible()\n ? ('sky_code_example_viewer_hide_code_button_label'\n | skyLibResources)\n : ('sky_code_example_viewer_show_code_button_label'\n | skyLibResources)\n }}\n </button>\n </div>\n\n <sky-vertical-tabset #codeRef=\"skyId\" skyId [hidden]=\"!isCodeVisible()\">\n @for (obj of files() | keyvalue; track obj.key) {\n <sky-vertical-tab\n [active]=\"obj.key === primaryFile()\"\n [tabHeading]=\"obj.key\"\n >\n <sky-code-snippet\n [code]=\"obj.value\"\n [language]=\"getCodeLanguage(obj.key)\"\n />\n </sky-vertical-tab>\n }\n </sky-vertical-tabset>\n </sky-box-content>\n</sky-box>\n", styles: [":host{display:block}.sky-code-example-viewer-demo{border:1px solid var(--sky-border-color-neutral-medium)}\n"], dependencies: [{ kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "ngmodule", type: SkyBoxModule }, { kind: "component", type: i1$1.λ41, selector: "sky-box", inputs: ["headingText", "headingHidden", "headingLevel", "headingStyle", "helpPopoverContent", "helpPopoverTitle", "helpKey", "ariaLabel", "ariaLabelledBy", "ariaRole"] }, { kind: "component", type: i1$1.λ43, selector: "sky-box-content" }, { kind: "component", type: i1$1.λ44, selector: "sky-box-controls" }, { kind: "ngmodule", type: SkyCodeSnippetModule }, { kind: "component", type: SkyCodeSnippetComponent, selector: "sky-code-snippet", inputs: ["code", "language"] }, { kind: "ngmodule", type: SkyDocsToolsResourcesModule }, { kind: "pipe", type: i2.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "ngmodule", type: SkyIconModule }, { kind: "component", type: i1.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }, { kind: "ngmodule", type: SkyIdModule }, { kind: "directive", type: i5.λ2, selector: "[skyId]", exportAs: ["skyId"] }, { kind: "ngmodule", type: SkyVerticalTabsetModule }, { kind: "component", type: i6.λ6, selector: "sky-vertical-tabset", inputs: ["showTabsText", "ariaLabel", "ariaLabelledBy", "ariaRole", "maintainTabContent"], outputs: ["activeChange"] }, { kind: "component", type: i6.λ4, selector: "sky-vertical-tab", inputs: ["active", "ariaControls", "ariaRole", "disabled", "errorIndicator", "requiredIndicator", "tabHeaderCount", "tabHeading", "showTabRightArrow", "tabId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
510
|
+
}
|
|
511
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyCodeExampleViewerComponent, decorators: [{
|
|
512
|
+
type: Component,
|
|
513
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
514
|
+
'[class.sky-margin-stacked-xl]': 'stacked()',
|
|
515
|
+
}, imports: [
|
|
516
|
+
KeyValuePipe,
|
|
517
|
+
NgComponentOutlet,
|
|
518
|
+
SkyBoxModule,
|
|
519
|
+
SkyCodeSnippetModule,
|
|
824
520
|
SkyDocsToolsResourcesModule,
|
|
825
521
|
SkyIconModule,
|
|
826
|
-
|
|
522
|
+
SkyIdModule,
|
|
827
523
|
SkyVerticalTabsetModule,
|
|
828
|
-
],
|
|
829
|
-
declarations: [SkyDocsCodeExampleComponent, SkyDocsCodeExamplesComponent],
|
|
830
|
-
exports: [SkyDocsCodeExampleComponent, SkyDocsCodeExamplesComponent],
|
|
831
|
-
}]
|
|
524
|
+
], selector: 'sky-code-example-viewer', template: "<sky-box headingLevel=\"3\" headingStyle=\"3\" [headingText]=\"headingText()\">\n <sky-box-controls>\n <button\n class=\"sky-btn sky-btn-default\"\n data-sky-id=\"stackblitz-btn\"\n type=\"button\"\n (click)=\"launchStackBlitz()\"\n >\n <sky-icon iconName=\"edit\" />\n {{ 'sky_code_example_viewer_demo_stack_blitz_button' | skyLibResources }}\n </button>\n </sky-box-controls>\n\n <sky-box-content>\n <div\n class=\"sky-code-example-viewer-demo sky-padding-even-md sky-margin-stacked-lg\"\n >\n @if (!demoHidden()) {\n <ng-template [ngComponentOutlet]=\"componentType()\" />\n } @else {\n {{ 'sky_code_example_viewer_demo_hidden_message' | skyLibResources }}\n }\n </div>\n\n <div class=\"sky-margin-stacked-sm\">\n <button\n class=\"sky-btn sky-btn-link\"\n data-sky-id=\"toggle-code-visibility-btn\"\n type=\"button\"\n [attr.aria-controls]=\"codeRef.id\"\n [attr.aria-expanded]=\"isCodeVisible()\"\n (click)=\"toggleCodeVisibility()\"\n >\n <sky-icon\n [iconName]=\"isCodeVisible() ? 'chevron-down' : 'chevron-right'\"\n />\n {{\n isCodeVisible()\n ? ('sky_code_example_viewer_hide_code_button_label'\n | skyLibResources)\n : ('sky_code_example_viewer_show_code_button_label'\n | skyLibResources)\n }}\n </button>\n </div>\n\n <sky-vertical-tabset #codeRef=\"skyId\" skyId [hidden]=\"!isCodeVisible()\">\n @for (obj of files() | keyvalue; track obj.key) {\n <sky-vertical-tab\n [active]=\"obj.key === primaryFile()\"\n [tabHeading]=\"obj.key\"\n >\n <sky-code-snippet\n [code]=\"obj.value\"\n [language]=\"getCodeLanguage(obj.key)\"\n />\n </sky-vertical-tab>\n }\n </sky-vertical-tabset>\n </sky-box-content>\n</sky-box>\n", styles: [":host{display:block}.sky-code-example-viewer-demo{border:1px solid var(--sky-border-color-neutral-medium)}\n"] }]
|
|
832
525
|
}] });
|
|
833
526
|
|
|
834
|
-
/**
|
|
835
|
-
* Renders a checkbox control within the control panel.
|
|
836
|
-
* @example
|
|
837
|
-
* ```markup
|
|
838
|
-
* <sky-docs-demo-control-panel-checkbox
|
|
839
|
-
* label="Show title"
|
|
840
|
-
* [checked]="true"
|
|
841
|
-
* [propertyName]="showTitle"
|
|
842
|
-
* >
|
|
843
|
-
* </sky-docs-demo-control-panel-checkbox>
|
|
844
|
-
* ```
|
|
845
|
-
*/
|
|
846
|
-
class SkyDocsDemoControlPanelCheckboxComponent {
|
|
847
|
-
/**
|
|
848
|
-
* The checked status of the checkbox.
|
|
849
|
-
* @default false
|
|
850
|
-
*/
|
|
851
|
-
set checked(value) {
|
|
852
|
-
if (value !== undefined && this._checked === undefined) {
|
|
853
|
-
this.initialState.checked = value;
|
|
854
|
-
}
|
|
855
|
-
this._checked = value;
|
|
856
|
-
}
|
|
857
|
-
get checked() {
|
|
858
|
-
return this._checked || false;
|
|
859
|
-
}
|
|
860
|
-
constructor(changeDetector) {
|
|
861
|
-
this.changeDetector = changeDetector;
|
|
862
|
-
/**
|
|
863
|
-
* Indicates whether to disable the checkbox.
|
|
864
|
-
*/
|
|
865
|
-
this.disabled = false;
|
|
866
|
-
this.selectionChange = new ReplaySubject();
|
|
867
|
-
this.initialState = {};
|
|
868
|
-
}
|
|
869
|
-
ngOnInit() {
|
|
870
|
-
setTimeout(() => {
|
|
871
|
-
this.initialState.checked = this.checked;
|
|
872
|
-
this.notifyChange();
|
|
873
|
-
});
|
|
874
|
-
}
|
|
875
|
-
ngOnDestroy() {
|
|
876
|
-
this.selectionChange.complete();
|
|
877
|
-
}
|
|
878
|
-
onModelChange() {
|
|
879
|
-
this.notifyChange();
|
|
880
|
-
}
|
|
881
|
-
resetState() {
|
|
882
|
-
if (this.initialState.checked !== this.checked) {
|
|
883
|
-
this.checked = !!this.initialState.checked;
|
|
884
|
-
this.notifyChange();
|
|
885
|
-
this.changeDetector.markForCheck();
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
notifyChange() {
|
|
889
|
-
this.selectionChange.next({
|
|
890
|
-
[this.propertyName]: this.checked,
|
|
891
|
-
});
|
|
892
|
-
}
|
|
893
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoControlPanelCheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
894
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: SkyDocsDemoControlPanelCheckboxComponent, selector: "sky-docs-demo-control-panel-checkbox", inputs: { checked: "checked", disabled: "disabled", helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", label: "label", propertyName: "propertyName" }, ngImport: i0, template: "<sky-checkbox\n [disabled]=\"disabled\"\n [labelText]=\"label\"\n [helpPopoverContent]=\"helpPopoverContent\"\n [helpPopoverTitle]=\"helpPopoverTitle\"\n [name]=\"propertyName\"\n [(ngModel)]=\"checked\"\n (change)=\"onModelChange()\"\n/>\n", dependencies: [{ kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.λ3, selector: "sky-checkbox", inputs: ["label", "labelledBy", "id", "disabled", "tabindex", "name", "helpPopoverContent", "helpPopoverTitle", "icon", "checkboxType", "checked", "indeterminate", "required", "labelText", "labelHidden", "hintText", "stacked", "helpKey"], outputs: ["change", "checkedChange", "disabledChange", "indeterminateChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
895
|
-
}
|
|
896
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoControlPanelCheckboxComponent, decorators: [{
|
|
897
|
-
type: Component,
|
|
898
|
-
args: [{ selector: 'sky-docs-demo-control-panel-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sky-checkbox\n [disabled]=\"disabled\"\n [labelText]=\"label\"\n [helpPopoverContent]=\"helpPopoverContent\"\n [helpPopoverTitle]=\"helpPopoverTitle\"\n [name]=\"propertyName\"\n [(ngModel)]=\"checked\"\n (change)=\"onModelChange()\"\n/>\n" }]
|
|
899
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { checked: [{
|
|
900
|
-
type: Input
|
|
901
|
-
}], disabled: [{
|
|
902
|
-
type: Input
|
|
903
|
-
}], helpPopoverContent: [{
|
|
904
|
-
type: Input
|
|
905
|
-
}], helpPopoverTitle: [{
|
|
906
|
-
type: Input
|
|
907
|
-
}], label: [{
|
|
908
|
-
type: Input
|
|
909
|
-
}], propertyName: [{
|
|
910
|
-
type: Input
|
|
911
|
-
}] } });
|
|
912
|
-
|
|
913
|
-
/**
|
|
914
|
-
* Renders a radio control group.
|
|
915
|
-
* @example
|
|
916
|
-
* ```markup
|
|
917
|
-
* <sky-docs-demo-control-panel-radio-group
|
|
918
|
-
* [choices]="[
|
|
919
|
-
* { 'label': 'Red', value: '#f00' },
|
|
920
|
-
* { 'label': 'Green', value: '#0f0' },
|
|
921
|
-
* { 'label': 'Blue', value: '#00f' }
|
|
922
|
-
* ]"
|
|
923
|
-
* heading="Choose a color"
|
|
924
|
-
* initialValue="Red"
|
|
925
|
-
* propertyName="color"
|
|
926
|
-
* >
|
|
927
|
-
* </sky-docs-demo-control-panel-radio-group>
|
|
928
|
-
* ```
|
|
929
|
-
*/
|
|
930
|
-
class SkyDocsDemoControlPanelRadioGroupComponent {
|
|
931
|
-
constructor(changeDetector) {
|
|
932
|
-
this.changeDetector = changeDetector;
|
|
933
|
-
/**
|
|
934
|
-
* Indicates whether to disable the radio group.
|
|
935
|
-
*/
|
|
936
|
-
this.disabled = false;
|
|
937
|
-
/**
|
|
938
|
-
* @internal
|
|
939
|
-
*/
|
|
940
|
-
this.selectionChange = new ReplaySubject();
|
|
941
|
-
}
|
|
942
|
-
ngOnInit() {
|
|
943
|
-
this.value = this.cloneValue(this.initialValue);
|
|
944
|
-
this.#notifyChange();
|
|
945
|
-
}
|
|
946
|
-
ngOnDestroy() {
|
|
947
|
-
this.selectionChange.complete();
|
|
948
|
-
}
|
|
949
|
-
onModelChange(value) {
|
|
950
|
-
this.value = value;
|
|
951
|
-
this.#notifyChange();
|
|
952
|
-
}
|
|
953
|
-
resetValue() {
|
|
954
|
-
this.value = this.cloneValue(this.initialValue);
|
|
955
|
-
this.#notifyChange();
|
|
956
|
-
this.changeDetector.markForCheck();
|
|
957
|
-
}
|
|
958
|
-
cloneValue(value) {
|
|
959
|
-
if (typeof value === 'object') {
|
|
960
|
-
return JSON.parse(JSON.stringify(value));
|
|
961
|
-
}
|
|
962
|
-
return value;
|
|
963
|
-
}
|
|
964
|
-
#notifyChange() {
|
|
965
|
-
this.selectionChange.next({
|
|
966
|
-
[this.propertyName]: this.value,
|
|
967
|
-
});
|
|
968
|
-
}
|
|
969
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoControlPanelRadioGroupComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
970
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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 <sky-radio-group\n [disabled]=\"disabled\"\n [headingText]=\"heading\"\n [headingStyle]=\"4\"\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"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.λ13, selector: "sky-radio", inputs: ["checked", "disabled", "id", "label", "labelledBy", "name", "tabindex", "value", "helpPopoverContent", "helpPopoverTitle", "icon", "radioType", "labelText", "labelHidden", "hintText", "helpKey"], outputs: ["change", "checkedChange", "disabledChange"] }, { kind: "component", type: i3$1.λ11, selector: "sky-radio-group", inputs: ["ariaLabelledBy", "ariaLabel", "disabled", "headingLevel", "headingStyle", "name", "required", "stacked", "value", "tabIndex", "headingText", "headingHidden", "hintText", "helpPopoverContent", "helpPopoverTitle", "helpKey"] }, { kind: "component", type: i3$1.λ12, selector: "sky-radio-label" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
971
|
-
}
|
|
972
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoControlPanelRadioGroupComponent, decorators: [{
|
|
973
|
-
type: Component,
|
|
974
|
-
args: [{ selector: 'sky-docs-demo-control-panel-radio-group', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sky-demo-control-panel-radio-group\">\n <sky-radio-group\n [disabled]=\"disabled\"\n [headingText]=\"heading\"\n [headingStyle]=\"4\"\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"] }]
|
|
975
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { choices: [{
|
|
976
|
-
type: Input
|
|
977
|
-
}], disabled: [{
|
|
978
|
-
type: Input
|
|
979
|
-
}], heading: [{
|
|
980
|
-
type: Input
|
|
981
|
-
}], initialValue: [{
|
|
982
|
-
type: Input
|
|
983
|
-
}], propertyName: [{
|
|
984
|
-
type: Input
|
|
985
|
-
}] } });
|
|
986
|
-
|
|
987
|
-
/**
|
|
988
|
-
* Handles the appearance and configuration of the behavior demo control panel.
|
|
989
|
-
* @example
|
|
990
|
-
* ```markup
|
|
991
|
-
* <sky-docs-demo-control-panel
|
|
992
|
-
* (selectionChange)="onSelectionChange($event)"
|
|
993
|
-
* >
|
|
994
|
-
* Control panel content here.
|
|
995
|
-
* </sky-docs-demo-control-panel>
|
|
996
|
-
* ```
|
|
997
|
-
*/
|
|
998
|
-
class SkyDocsDemoControlPanelComponent {
|
|
999
|
-
constructor() {
|
|
1000
|
-
/**
|
|
1001
|
-
* Fires when the user clicks the reset button.
|
|
1002
|
-
*/
|
|
1003
|
-
this.reset = new EventEmitter();
|
|
1004
|
-
/**
|
|
1005
|
-
* Fires when a user makes a selection from one of the controls in the panel.
|
|
1006
|
-
*/
|
|
1007
|
-
this.selectionChange = new EventEmitter();
|
|
1008
|
-
this.ngUnsubscribe = new Subject();
|
|
1009
|
-
}
|
|
1010
|
-
ngAfterContentInit() {
|
|
1011
|
-
this.addEventListeners();
|
|
1012
|
-
merge(this.checkboxes.changes, this.radioGroups.changes)
|
|
1013
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1014
|
-
.subscribe(() => {
|
|
1015
|
-
this.addEventListeners();
|
|
1016
|
-
});
|
|
1017
|
-
}
|
|
1018
|
-
ngOnDestroy() {
|
|
1019
|
-
this.reset.complete();
|
|
1020
|
-
this.selectionChange.complete();
|
|
1021
|
-
this.ngUnsubscribe.next();
|
|
1022
|
-
this.ngUnsubscribe.complete();
|
|
1023
|
-
}
|
|
1024
|
-
onResetButtonClick() {
|
|
1025
|
-
this.radioGroups.forEach((radioGroup) => {
|
|
1026
|
-
radioGroup.resetValue();
|
|
1027
|
-
});
|
|
1028
|
-
this.checkboxes.forEach((checkbox) => {
|
|
1029
|
-
checkbox.resetState();
|
|
1030
|
-
});
|
|
1031
|
-
this.reset.emit();
|
|
1032
|
-
}
|
|
1033
|
-
addEventListeners() {
|
|
1034
|
-
if (this.eventListeners) {
|
|
1035
|
-
this.eventListeners.unsubscribe();
|
|
1036
|
-
}
|
|
1037
|
-
this.eventListeners = merge(...this.checkboxes.map((c) => c.selectionChange), ...this.radioGroups.map((c) => c.selectionChange))
|
|
1038
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1039
|
-
.subscribe((change) => {
|
|
1040
|
-
this.selectionChange.next(change);
|
|
1041
|
-
});
|
|
1042
|
-
}
|
|
1043
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoControlPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1044
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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=\"sky-docs-demo-control-panel-column sky-docs-demo-control-panel-sections-column\"\n >\n <ng-content select=\"sky-docs-demo-control-panel-section\"></ng-content>\n </div>\n\n <div\n class=\"sky-docs-demo-control-panel-column sky-docs-demo-control-panel-button-column\"\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"], dependencies: [{ kind: "pipe", type: i8.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1045
|
-
}
|
|
1046
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoControlPanelComponent, decorators: [{
|
|
1047
|
-
type: Component,
|
|
1048
|
-
args: [{ selector: 'sky-docs-demo-control-panel', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sky-docs-demo-control-panel\">\n <div class=\"sky-docs-demo-control-panel-row sky-rounded-corners\">\n <div\n class=\"sky-docs-demo-control-panel-column sky-docs-demo-control-panel-sections-column\"\n >\n <ng-content select=\"sky-docs-demo-control-panel-section\"></ng-content>\n </div>\n\n <div\n class=\"sky-docs-demo-control-panel-column sky-docs-demo-control-panel-button-column\"\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"] }]
|
|
1049
|
-
}], propDecorators: { reset: [{
|
|
1050
|
-
type: Output
|
|
1051
|
-
}], selectionChange: [{
|
|
1052
|
-
type: Output
|
|
1053
|
-
}], radioGroups: [{
|
|
1054
|
-
type: ContentChildren,
|
|
1055
|
-
args: [SkyDocsDemoControlPanelRadioGroupComponent, {
|
|
1056
|
-
descendants: true,
|
|
1057
|
-
}]
|
|
1058
|
-
}], checkboxes: [{
|
|
1059
|
-
type: ContentChildren,
|
|
1060
|
-
args: [SkyDocsDemoControlPanelCheckboxComponent, {
|
|
1061
|
-
descendants: true,
|
|
1062
|
-
}]
|
|
1063
|
-
}] } });
|
|
1064
|
-
|
|
1065
|
-
/**
|
|
1066
|
-
* Renders a custom control panel in the "Show options" dropdown above the demo.
|
|
1067
|
-
*/
|
|
1068
|
-
class SkyDocsDemoCustomControlPanelComponent {
|
|
1069
|
-
constructor() {
|
|
1070
|
-
this.classes = 'sky-rounded-corners';
|
|
1071
|
-
}
|
|
1072
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoCustomControlPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1073
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: SkyDocsDemoCustomControlPanelComponent, selector: "sky-docs-demo-custom-control-panel", host: { properties: { "class": "this.classes" } }, ngImport: i0, template: "<ng-content />\n", styles: [":host{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}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1074
|
-
}
|
|
1075
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoCustomControlPanelComponent, decorators: [{
|
|
1076
|
-
type: Component,
|
|
1077
|
-
args: [{ selector: 'sky-docs-demo-custom-control-panel', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content />\n", styles: [":host{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}\n"] }]
|
|
1078
|
-
}], propDecorators: { classes: [{
|
|
1079
|
-
type: HostBinding,
|
|
1080
|
-
args: ['class']
|
|
1081
|
-
}] } });
|
|
1082
|
-
|
|
1083
|
-
/**
|
|
1084
|
-
* Wraps all behavior demo components and handles the configuration and appearance of the behavior demo.
|
|
1085
|
-
* @example
|
|
1086
|
-
* ```markup
|
|
1087
|
-
* <sky-docs-demo>
|
|
1088
|
-
* Demo content here.
|
|
1089
|
-
* </sky-docs-demo>
|
|
1090
|
-
* ```
|
|
1091
|
-
*/
|
|
1092
|
-
class SkyDocsDemoComponent {
|
|
1093
|
-
constructor() {
|
|
1094
|
-
this.areOptionsVisible = false;
|
|
1095
|
-
}
|
|
1096
|
-
/**
|
|
1097
|
-
* Specifies the horizontal alignment of the demo contents.
|
|
1098
|
-
* @default 'left'
|
|
1099
|
-
*/
|
|
1100
|
-
set alignContents(value) {
|
|
1101
|
-
this._alignContents = value;
|
|
1102
|
-
}
|
|
1103
|
-
get alignContents() {
|
|
1104
|
-
return this._alignContents || 'left';
|
|
1105
|
-
}
|
|
1106
|
-
get hasOptions() {
|
|
1107
|
-
return ((this.controlPanels && this.controlPanels.length > 0) ||
|
|
1108
|
-
(this.customControlPanels && this.customControlPanels.length > 0));
|
|
1109
|
-
}
|
|
1110
|
-
get toggleOptionsButtonIcon() {
|
|
1111
|
-
return this.areOptionsVisible ? 'chevron-up' : 'chevron-down';
|
|
1112
|
-
}
|
|
1113
|
-
onToggleOptionsButtonClick() {
|
|
1114
|
-
this.areOptionsVisible = !this.areOptionsVisible;
|
|
1115
|
-
}
|
|
1116
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1117
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: SkyDocsDemoComponent, selector: "sky-docs-demo", inputs: { alignContents: "alignContents", heading: "heading" }, queries: [{ propertyName: "controlPanels", predicate: SkyDocsDemoControlPanelComponent, read: ElementRef }, { propertyName: "customControlPanels", predicate: SkyDocsDemoCustomControlPanelComponent, 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 *ngTemplateOutlet=\"customControlPanels\"></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\" />\n</ng-template>\n\n<ng-template #customControlPanels>\n <ng-content select=\"sky-docs-demo-custom-control-panel\" />\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"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5$1.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }, { kind: "pipe", type: i8.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1118
|
-
}
|
|
1119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoComponent, decorators: [{
|
|
1120
|
-
type: Component,
|
|
1121
|
-
args: [{ selector: 'sky-docs-demo', changeDetection: ChangeDetectionStrategy.OnPush, 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 *ngTemplateOutlet=\"customControlPanels\"></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\" />\n</ng-template>\n\n<ng-template #customControlPanels>\n <ng-content select=\"sky-docs-demo-custom-control-panel\" />\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"] }]
|
|
1122
|
-
}], propDecorators: { alignContents: [{
|
|
1123
|
-
type: Input
|
|
1124
|
-
}], heading: [{
|
|
1125
|
-
type: Input
|
|
1126
|
-
}], controlPanels: [{
|
|
1127
|
-
type: ContentChildren,
|
|
1128
|
-
args: [SkyDocsDemoControlPanelComponent, { read: ElementRef }]
|
|
1129
|
-
}], customControlPanels: [{
|
|
1130
|
-
type: ContentChildren,
|
|
1131
|
-
args: [SkyDocsDemoCustomControlPanelComponent, { read: ElementRef }]
|
|
1132
|
-
}] } });
|
|
1133
|
-
|
|
1134
|
-
/**
|
|
1135
|
-
* Renders a section within the control panel.
|
|
1136
|
-
* @example
|
|
1137
|
-
* ```markup
|
|
1138
|
-
* <sky-docs-demo-control-panel>
|
|
1139
|
-
* <sky-docs-demo-control-panel-section>
|
|
1140
|
-
* Section content here.
|
|
1141
|
-
* </sky-docs-demo-control-panel-section>
|
|
1142
|
-
* </sky-docs-demo-control-panel>
|
|
1143
|
-
* ```
|
|
1144
|
-
*/
|
|
1145
|
-
class SkyDocsDemoControlPanelSectionComponent {
|
|
1146
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoControlPanelSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1147
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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 }); }
|
|
1148
|
-
}
|
|
1149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoControlPanelSectionComponent, decorators: [{
|
|
1150
|
-
type: Component,
|
|
1151
|
-
args: [{ selector: 'sky-docs-demo-control-panel-section', changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
1152
|
-
}] });
|
|
1153
|
-
|
|
1154
|
-
class SkyDocsDemoModule {
|
|
1155
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1156
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoModule, declarations: [SkyDocsDemoComponent,
|
|
1157
|
-
SkyDocsDemoControlPanelCheckboxComponent,
|
|
1158
|
-
SkyDocsDemoControlPanelComponent,
|
|
1159
|
-
SkyDocsDemoControlPanelRadioGroupComponent,
|
|
1160
|
-
SkyDocsDemoControlPanelSectionComponent,
|
|
1161
|
-
SkyDocsDemoCustomControlPanelComponent], imports: [CommonModule,
|
|
1162
|
-
FormsModule,
|
|
1163
|
-
SkyCheckboxModule,
|
|
1164
|
-
SkyDocsToolsResourcesModule,
|
|
1165
|
-
SkyIconModule,
|
|
1166
|
-
SkyRadioModule,
|
|
1167
|
-
SkyThemeModule], exports: [SkyDocsDemoComponent,
|
|
1168
|
-
SkyDocsDemoControlPanelCheckboxComponent,
|
|
1169
|
-
SkyDocsDemoControlPanelComponent,
|
|
1170
|
-
SkyDocsDemoControlPanelRadioGroupComponent,
|
|
1171
|
-
SkyDocsDemoControlPanelSectionComponent,
|
|
1172
|
-
SkyDocsDemoCustomControlPanelComponent] }); }
|
|
1173
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoModule, imports: [CommonModule,
|
|
1174
|
-
FormsModule,
|
|
1175
|
-
SkyCheckboxModule,
|
|
1176
|
-
SkyDocsToolsResourcesModule,
|
|
1177
|
-
SkyIconModule,
|
|
1178
|
-
SkyRadioModule,
|
|
1179
|
-
SkyThemeModule] }); }
|
|
1180
|
-
}
|
|
1181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoModule, decorators: [{
|
|
1182
|
-
type: NgModule,
|
|
1183
|
-
args: [{
|
|
1184
|
-
imports: [
|
|
1185
|
-
CommonModule,
|
|
1186
|
-
FormsModule,
|
|
1187
|
-
SkyCheckboxModule,
|
|
1188
|
-
SkyDocsToolsResourcesModule,
|
|
1189
|
-
SkyIconModule,
|
|
1190
|
-
SkyRadioModule,
|
|
1191
|
-
SkyThemeModule,
|
|
1192
|
-
],
|
|
1193
|
-
declarations: [
|
|
1194
|
-
SkyDocsDemoComponent,
|
|
1195
|
-
SkyDocsDemoControlPanelCheckboxComponent,
|
|
1196
|
-
SkyDocsDemoControlPanelComponent,
|
|
1197
|
-
SkyDocsDemoControlPanelRadioGroupComponent,
|
|
1198
|
-
SkyDocsDemoControlPanelSectionComponent,
|
|
1199
|
-
SkyDocsDemoCustomControlPanelComponent,
|
|
1200
|
-
],
|
|
1201
|
-
exports: [
|
|
1202
|
-
SkyDocsDemoComponent,
|
|
1203
|
-
SkyDocsDemoControlPanelCheckboxComponent,
|
|
1204
|
-
SkyDocsDemoControlPanelComponent,
|
|
1205
|
-
SkyDocsDemoControlPanelRadioGroupComponent,
|
|
1206
|
-
SkyDocsDemoControlPanelSectionComponent,
|
|
1207
|
-
SkyDocsDemoCustomControlPanelComponent,
|
|
1208
|
-
],
|
|
1209
|
-
}]
|
|
1210
|
-
}] });
|
|
1211
|
-
|
|
1212
|
-
class SkyDocsHeadingAnchorComponent {
|
|
1213
|
-
constructor() {
|
|
1214
|
-
this.headingLevel = '2';
|
|
1215
|
-
}
|
|
1216
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsHeadingAnchorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1217
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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:400;font-size:18px}.sky-docs-tools-heading-anchor-h1,.sky-docs-tools-heading-anchor-h2,.sky-docs-tools-heading-anchor-h3,.sky-docs-tools-heading-anchor-h4,.sky-docs-tools-heading-anchor-h5,.sky-docs-tools-heading-anchor-h6{line-height:1.1;font-family: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"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i5$1.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1218
|
-
}
|
|
1219
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsHeadingAnchorComponent, decorators: [{
|
|
1220
|
-
type: Component,
|
|
1221
|
-
args: [{ selector: 'sky-docs-heading-anchor', changeDetection: ChangeDetectionStrategy.OnPush, 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:400;font-size:18px}.sky-docs-tools-heading-anchor-h1,.sky-docs-tools-heading-anchor-h2,.sky-docs-tools-heading-anchor-h3,.sky-docs-tools-heading-anchor-h4,.sky-docs-tools-heading-anchor-h5,.sky-docs-tools-heading-anchor-h6{line-height:1.1;font-family: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"] }]
|
|
1222
|
-
}], propDecorators: { anchorId: [{
|
|
1223
|
-
type: Input
|
|
1224
|
-
}], headingLevel: [{
|
|
1225
|
-
type: Input
|
|
1226
|
-
}] } });
|
|
1227
|
-
|
|
1228
|
-
class SkyDocsHeadingAnchorModule {
|
|
1229
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsHeadingAnchorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1230
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsHeadingAnchorModule, declarations: [SkyDocsHeadingAnchorComponent], imports: [CommonModule, RouterModule, SkyIconModule], exports: [SkyDocsHeadingAnchorComponent] }); }
|
|
1231
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsHeadingAnchorModule, imports: [CommonModule, RouterModule, SkyIconModule] }); }
|
|
1232
|
-
}
|
|
1233
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsHeadingAnchorModule, decorators: [{
|
|
1234
|
-
type: NgModule,
|
|
1235
|
-
args: [{
|
|
1236
|
-
declarations: [SkyDocsHeadingAnchorComponent],
|
|
1237
|
-
imports: [CommonModule, RouterModule, SkyIconModule],
|
|
1238
|
-
exports: [SkyDocsHeadingAnchorComponent],
|
|
1239
|
-
}]
|
|
1240
|
-
}] });
|
|
1241
|
-
|
|
1242
|
-
class SkyDocsMarkdownPipe {
|
|
1243
|
-
transform(markdown) {
|
|
1244
|
-
if (!markdown) {
|
|
1245
|
-
return '';
|
|
1246
|
-
}
|
|
1247
|
-
return marked(markdown);
|
|
1248
|
-
}
|
|
1249
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsMarkdownPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1250
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsMarkdownPipe, name: "skyDocsMarkdown" }); }
|
|
1251
|
-
}
|
|
1252
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsMarkdownPipe, decorators: [{
|
|
1253
|
-
type: Pipe,
|
|
1254
|
-
args: [{
|
|
1255
|
-
name: 'skyDocsMarkdown',
|
|
1256
|
-
}]
|
|
1257
|
-
}] });
|
|
1258
|
-
|
|
1259
|
-
class SkyDocsMarkdownModule {
|
|
1260
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsMarkdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1261
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsMarkdownModule, declarations: [SkyDocsMarkdownPipe], exports: [SkyDocsMarkdownPipe] }); }
|
|
1262
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsMarkdownModule, providers: [SkyDocsMarkdownPipe] }); }
|
|
1263
|
-
}
|
|
1264
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsMarkdownModule, decorators: [{
|
|
1265
|
-
type: NgModule,
|
|
1266
|
-
args: [{
|
|
1267
|
-
declarations: [SkyDocsMarkdownPipe],
|
|
1268
|
-
providers: [SkyDocsMarkdownPipe],
|
|
1269
|
-
exports: [SkyDocsMarkdownPipe],
|
|
1270
|
-
}]
|
|
1271
|
-
}] });
|
|
1272
|
-
|
|
1273
|
-
class SkyDocsToolsOptions {
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
class SkyDocsModuleInfoComponent {
|
|
1277
|
-
set gitRepoUrl(value) {
|
|
1278
|
-
this.gitRepoUrlOrDefault = value || this.#options?.gitRepoUrl;
|
|
1279
|
-
this.#updateExternalLinks();
|
|
1280
|
-
}
|
|
1281
|
-
set packageName(value) {
|
|
1282
|
-
this.packageNameOrDefault = value || this.#options?.packageName;
|
|
1283
|
-
this.#updateInstallationCommand();
|
|
1284
|
-
this.#updateExternalLinks();
|
|
1285
|
-
}
|
|
1286
|
-
set packageUrl(value) {
|
|
1287
|
-
this.#packageUrl = value;
|
|
1288
|
-
this.#updateExternalLinks();
|
|
1289
|
-
}
|
|
1290
|
-
#options;
|
|
1291
|
-
#packageUrl;
|
|
1292
|
-
constructor(options) {
|
|
1293
|
-
if (options) {
|
|
1294
|
-
this.#options = options;
|
|
1295
|
-
this.gitRepoUrl = options.gitRepoUrl;
|
|
1296
|
-
this.packageName = options.packageName;
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
#updateExternalLinks() {
|
|
1300
|
-
const externalLinks = [];
|
|
1301
|
-
if (this.packageNameOrDefault) {
|
|
1302
|
-
externalLinks.push({
|
|
1303
|
-
url: this.#packageUrl ||
|
|
1304
|
-
`https://npmjs.org/package/${this.packageNameOrDefault}`,
|
|
1305
|
-
label: 'View in NPM',
|
|
1306
|
-
});
|
|
1307
|
-
}
|
|
1308
|
-
if (this.gitRepoUrlOrDefault) {
|
|
1309
|
-
externalLinks.push({
|
|
1310
|
-
url: this.gitRepoUrlOrDefault,
|
|
1311
|
-
label: 'View in GitHub',
|
|
1312
|
-
});
|
|
1313
|
-
}
|
|
1314
|
-
this.externalLinks = externalLinks;
|
|
1315
|
-
}
|
|
1316
|
-
#updateInstallationCommand() {
|
|
1317
|
-
this.installationCommand = this.packageNameOrDefault
|
|
1318
|
-
? `npm install --save-exact ${this.packageNameOrDefault}`
|
|
1319
|
-
: '';
|
|
1320
|
-
}
|
|
1321
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsModuleInfoComponent, deps: [{ token: SkyDocsToolsOptions, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1322
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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-description-list class=\"sky-margin-stacked-lg\" mode=\"vertical\">\n <sky-description-list-content *ngIf=\"moduleName\">\n <sky-description-list-term> Defined in </sky-description-list-term>\n <sky-description-list-description>\n <sky-code class=\"sky-docs-module-info-module-name\">{{\n moduleName\n }}</sky-code>\n </sky-description-list-description>\n </sky-description-list-content>\n\n <sky-description-list-content *ngIf=\"packageNameOrDefault\">\n <sky-description-list-term>NPM package</sky-description-list-term>\n <sky-description-list-description>\n <span class=\"sky-docs-module-info-package-name\"\n ><sky-code>{{ packageNameOrDefault }}</sky-code></span\n >\n <ng-container *ngFor=\"let externalLink of externalLinks; let i = index\">\n <a\n class=\"sky-docs-module-info-external-link\"\n [href]=\"externalLink.url\"\n >{{ externalLink.label }}</a\n >\n <span *ngIf=\"i < externalLinks.length - 1\"> | </span>\n </ng-container>\n </sky-description-list-description>\n </sky-description-list-content>\n\n <sky-description-list-content *ngIf=\"installationCommand\">\n <sky-description-list-term>\n Installation\n <sky-help-inline\n *ngIf=\"moduleName\"\n class=\"sky-control-help\"\n [skyPopover]=\"installationCommandPopover\"\n skyPopoverPlacement=\"right\"\n >\n </sky-help-inline>\n </sky-description-list-term>\n <sky-description-list-description>\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-description-list-description>\n </sky-description-list-content>\n </sky-description-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,.sky-docs-module-info-package-name{margin-right:10px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.λ1, selector: "sky-code" }, { kind: "component", type: i4$1.λ1, selector: "sky-copy-to-clipboard", inputs: ["ariaLabel", "ariaLabelledBy", "copyTarget", "buttonText", "buttonClickedText", "title"] }, { kind: "component", type: i5.λ18, selector: "sky-description-list", inputs: ["defaultDescription", "listItemWidth", "mode"] }, { kind: "component", type: i5.λ21, selector: "sky-description-list-content", inputs: ["helpKey", "helpPopoverContent", "helpPopoverTitle"] }, { kind: "component", type: i5.λ19, selector: "sky-description-list-term" }, { kind: "component", type: i5.λ20, selector: "sky-description-list-description" }, { kind: "component", type: i6$1.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "component", type: i7$1.λ6, selector: "sky-popover", inputs: ["alignment", "placement", "popoverTitle", "popoverType"], outputs: ["popoverClosed", "popoverOpened"] }, { kind: "directive", type: i7$1.λ7, selector: "[skyPopover]", inputs: ["skyPopover", "skyPopoverAlignment", "skyPopoverMessageStream", "skyPopoverPlacement", "skyPopoverTrigger"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1323
|
-
}
|
|
1324
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsModuleInfoComponent, decorators: [{
|
|
1325
|
-
type: Component,
|
|
1326
|
-
args: [{ selector: 'sky-docs-module-info', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sky-docs-module-info\">\n <sky-description-list class=\"sky-margin-stacked-lg\" mode=\"vertical\">\n <sky-description-list-content *ngIf=\"moduleName\">\n <sky-description-list-term> Defined in </sky-description-list-term>\n <sky-description-list-description>\n <sky-code class=\"sky-docs-module-info-module-name\">{{\n moduleName\n }}</sky-code>\n </sky-description-list-description>\n </sky-description-list-content>\n\n <sky-description-list-content *ngIf=\"packageNameOrDefault\">\n <sky-description-list-term>NPM package</sky-description-list-term>\n <sky-description-list-description>\n <span class=\"sky-docs-module-info-package-name\"\n ><sky-code>{{ packageNameOrDefault }}</sky-code></span\n >\n <ng-container *ngFor=\"let externalLink of externalLinks; let i = index\">\n <a\n class=\"sky-docs-module-info-external-link\"\n [href]=\"externalLink.url\"\n >{{ externalLink.label }}</a\n >\n <span *ngIf=\"i < externalLinks.length - 1\"> | </span>\n </ng-container>\n </sky-description-list-description>\n </sky-description-list-content>\n\n <sky-description-list-content *ngIf=\"installationCommand\">\n <sky-description-list-term>\n Installation\n <sky-help-inline\n *ngIf=\"moduleName\"\n class=\"sky-control-help\"\n [skyPopover]=\"installationCommandPopover\"\n skyPopoverPlacement=\"right\"\n >\n </sky-help-inline>\n </sky-description-list-term>\n <sky-description-list-description>\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-description-list-description>\n </sky-description-list-content>\n </sky-description-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,.sky-docs-module-info-package-name{margin-right:10px}\n"] }]
|
|
1327
|
-
}], ctorParameters: () => [{ type: SkyDocsToolsOptions, decorators: [{
|
|
1328
|
-
type: Optional
|
|
1329
|
-
}] }], propDecorators: { gitRepoUrl: [{
|
|
1330
|
-
type: Input
|
|
1331
|
-
}], moduleName: [{
|
|
1332
|
-
type: Input
|
|
1333
|
-
}], packageName: [{
|
|
1334
|
-
type: Input
|
|
1335
|
-
}], packageUrl: [{
|
|
1336
|
-
type: Input
|
|
1337
|
-
}] } });
|
|
1338
|
-
|
|
1339
|
-
class SkyDocsModuleInfoModule {
|
|
1340
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsModuleInfoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1341
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsModuleInfoModule, declarations: [SkyDocsModuleInfoComponent], imports: [CommonModule,
|
|
1342
|
-
SkyCodeModule,
|
|
1343
|
-
SkyClipboardModule,
|
|
1344
|
-
SkyDescriptionListModule,
|
|
1345
|
-
SkyHelpInlineModule,
|
|
1346
|
-
SkyPopoverModule], exports: [SkyDocsModuleInfoComponent] }); }
|
|
1347
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsModuleInfoModule, imports: [CommonModule,
|
|
1348
|
-
SkyCodeModule,
|
|
1349
|
-
SkyClipboardModule,
|
|
1350
|
-
SkyDescriptionListModule,
|
|
1351
|
-
SkyHelpInlineModule,
|
|
1352
|
-
SkyPopoverModule] }); }
|
|
1353
|
-
}
|
|
1354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsModuleInfoModule, decorators: [{
|
|
1355
|
-
type: NgModule,
|
|
1356
|
-
args: [{
|
|
1357
|
-
imports: [
|
|
1358
|
-
CommonModule,
|
|
1359
|
-
SkyCodeModule,
|
|
1360
|
-
SkyClipboardModule,
|
|
1361
|
-
SkyDescriptionListModule,
|
|
1362
|
-
SkyHelpInlineModule,
|
|
1363
|
-
SkyPopoverModule,
|
|
1364
|
-
],
|
|
1365
|
-
declarations: [SkyDocsModuleInfoComponent],
|
|
1366
|
-
exports: [SkyDocsModuleInfoComponent],
|
|
1367
|
-
}]
|
|
1368
|
-
}] });
|
|
1369
|
-
|
|
1370
|
-
class SkyDocsSafeHtmlComponent {
|
|
1371
|
-
constructor(domSanitizer) {
|
|
1372
|
-
this.domSanitizer = domSanitizer;
|
|
1373
|
-
}
|
|
1374
|
-
getTrustedHtml(content) {
|
|
1375
|
-
return this.domSanitizer.bypassSecurityTrustHtml(content);
|
|
1376
|
-
}
|
|
1377
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsSafeHtmlComponent, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1378
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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 }); }
|
|
1379
|
-
}
|
|
1380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsSafeHtmlComponent, decorators: [{
|
|
1381
|
-
type: Component,
|
|
1382
|
-
args: [{ selector: 'sky-docs-safe-html', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sky-docs-safe-html\" [innerHtml]=\"getTrustedHtml(innerHtml)\"></div>\n" }]
|
|
1383
|
-
}], ctorParameters: () => [{ type: i1$4.DomSanitizer }], propDecorators: { innerHtml: [{
|
|
1384
|
-
type: Input
|
|
1385
|
-
}] } });
|
|
1386
|
-
|
|
1387
|
-
class SkyDocsSafeHtmlModule {
|
|
1388
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsSafeHtmlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1389
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsSafeHtmlModule, declarations: [SkyDocsSafeHtmlComponent], imports: [CommonModule], exports: [SkyDocsSafeHtmlComponent] }); }
|
|
1390
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsSafeHtmlModule, imports: [CommonModule] }); }
|
|
1391
|
-
}
|
|
1392
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsSafeHtmlModule, decorators: [{
|
|
1393
|
-
type: NgModule,
|
|
1394
|
-
args: [{
|
|
1395
|
-
declarations: [SkyDocsSafeHtmlComponent],
|
|
1396
|
-
imports: [CommonModule],
|
|
1397
|
-
exports: [SkyDocsSafeHtmlComponent],
|
|
1398
|
-
}]
|
|
1399
|
-
}] });
|
|
1400
|
-
|
|
1401
|
-
/**
|
|
1402
|
-
* Formats type definitions into HTML-compatible strings.
|
|
1403
|
-
*/
|
|
1404
|
-
class SkyDocsTypeDefinitionsFormatService {
|
|
1405
|
-
/**
|
|
1406
|
-
* Returns an HTML-formatted representation of the provided interface config.
|
|
1407
|
-
*/
|
|
1408
|
-
getInterfaceSourceCode(definition) {
|
|
1409
|
-
const typeParameters = this.getFormattedTypeParameters(definition.typeParameters);
|
|
1410
|
-
const config = {
|
|
1411
|
-
escapeSpecialCharacters: false,
|
|
1412
|
-
};
|
|
1413
|
-
let signature = `interface ${definition.name}${typeParameters} {`;
|
|
1414
|
-
signature += this.getFormattedInterfaceProperties(definition, config);
|
|
1415
|
-
signature += '\n}';
|
|
1416
|
-
return signature;
|
|
1417
|
-
}
|
|
1418
|
-
/**
|
|
1419
|
-
* Returns an HTML-formatted representation of the provided method config.
|
|
1420
|
-
*/
|
|
1421
|
-
getMethodSourceCode(definition) {
|
|
1422
|
-
const config = {
|
|
1423
|
-
escapeSpecialCharacters: false,
|
|
1424
|
-
};
|
|
1425
|
-
const typeArguments = this.getFormattedTypeArguments(definition.type, config);
|
|
1426
|
-
const callSignature = definition.type.callSignature;
|
|
1427
|
-
const returnType = this.getFormattedType(callSignature.returnType, config);
|
|
1428
|
-
let params = '';
|
|
1429
|
-
if (callSignature.parameters) {
|
|
1430
|
-
params += callSignature.parameters
|
|
1431
|
-
.map((p) => this.getFormattedParameterName(p, config))
|
|
1432
|
-
.join(', ');
|
|
1433
|
-
}
|
|
1434
|
-
return `public ${definition.isStatic ? 'static ' : ''}${definition.name}${typeArguments}(${params}): ${returnType}`;
|
|
1435
|
-
}
|
|
1436
|
-
/**
|
|
1437
|
-
* Returns an HTML-formatted representation of the provided type alias config.
|
|
1438
|
-
*/
|
|
1439
|
-
getTypeAliasSourceCode(definition) {
|
|
1440
|
-
const config = {
|
|
1441
|
-
escapeSpecialCharacters: false,
|
|
1442
|
-
};
|
|
1443
|
-
const typeParameters = this.getFormattedTypeParameters(definition.typeParameters);
|
|
1444
|
-
let signature = `type ${definition.name}${typeParameters} = `;
|
|
1445
|
-
if (definition.type.callSignature) {
|
|
1446
|
-
signature += this.getFormattedCallSignature(definition.type.callSignature, {
|
|
1447
|
-
escapeSpecialCharacters: false,
|
|
1448
|
-
});
|
|
1449
|
-
}
|
|
1450
|
-
else if (definition.type.indexSignature) {
|
|
1451
|
-
const indexSignature = definition.type.indexSignature;
|
|
1452
|
-
const type = this.getFormattedType(indexSignature.type, {
|
|
1453
|
-
escapeSpecialCharacters: false,
|
|
1454
|
-
});
|
|
1455
|
-
signature += `{\n [${indexSignature.key.name}: string]: ${type};\n}`;
|
|
1456
|
-
}
|
|
1457
|
-
else {
|
|
1458
|
-
/*istanbul ignore else */
|
|
1459
|
-
if (definition.type.type === 'union') {
|
|
1460
|
-
signature += this.getFormattedUnion(definition.type, config);
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
return signature;
|
|
1464
|
-
}
|
|
1465
|
-
/**
|
|
1466
|
-
* Returns a formatted string representing a parameter's name and value. For example: `'foo: string'`.
|
|
1467
|
-
*/
|
|
1468
|
-
getFormattedParameterName(parameter, config = {
|
|
1469
|
-
escapeSpecialCharacters: true,
|
|
1470
|
-
}) {
|
|
1471
|
-
const optionalMarker = parameter.isOptional ? '?' : '';
|
|
1472
|
-
const parameterType = this.getFormattedType(parameter.type, config);
|
|
1473
|
-
let signature = `${parameter.name}${optionalMarker}: ${parameterType}`;
|
|
1474
|
-
if (config.escapeSpecialCharacters) {
|
|
1475
|
-
signature = this.escapeSpecialCharacters(signature);
|
|
1476
|
-
}
|
|
1477
|
-
return signature;
|
|
1478
|
-
}
|
|
1479
|
-
/**
|
|
1480
|
-
* Returns a formatted string representing a property (or method's) name and value. For example: `'public foo: string'`.
|
|
1481
|
-
*/
|
|
1482
|
-
getFormattedPropertyName(property) {
|
|
1483
|
-
let signature = '';
|
|
1484
|
-
const indexSignature = property.type?.indexSignature;
|
|
1485
|
-
let name;
|
|
1486
|
-
if (indexSignature) {
|
|
1487
|
-
name = `[${indexSignature.key.name}: ${this.getFormattedType(indexSignature.key.type)}]`;
|
|
1488
|
-
}
|
|
1489
|
-
else {
|
|
1490
|
-
name = property.name;
|
|
1491
|
-
}
|
|
1492
|
-
if (property.deprecationWarning !== undefined) {
|
|
1493
|
-
signature += `<strike>${name}</strike>`;
|
|
1494
|
-
}
|
|
1495
|
-
else {
|
|
1496
|
-
signature += name;
|
|
1497
|
-
}
|
|
1498
|
-
if (property.decorator?.name !== 'Output' &&
|
|
1499
|
-
property.isOptional &&
|
|
1500
|
-
!indexSignature) {
|
|
1501
|
-
signature += '?';
|
|
1502
|
-
}
|
|
1503
|
-
if (indexSignature) {
|
|
1504
|
-
signature += `: ${this.getFormattedType(indexSignature.type)}`;
|
|
1505
|
-
}
|
|
1506
|
-
else if (property.type) {
|
|
1507
|
-
signature += `: ${this.getFormattedType(property.type)}`;
|
|
1508
|
-
}
|
|
1509
|
-
return signature;
|
|
1510
|
-
}
|
|
1511
|
-
/**
|
|
1512
|
-
* Returns an HTML-formatted method name to be used on the properties table.
|
|
1513
|
-
*/
|
|
1514
|
-
getFormattedMethodName(definition) {
|
|
1515
|
-
let formatted = '';
|
|
1516
|
-
if (definition.isStatic) {
|
|
1517
|
-
formatted += `${definition.parentName}.`;
|
|
1518
|
-
}
|
|
1519
|
-
if (definition.deprecationWarning !== undefined) {
|
|
1520
|
-
formatted = `<strike>${formatted}${definition.name}</strike>`;
|
|
1521
|
-
}
|
|
1522
|
-
else {
|
|
1523
|
-
formatted += definition.name;
|
|
1524
|
-
}
|
|
1525
|
-
return `${formatted}()`;
|
|
1526
|
-
}
|
|
1527
|
-
/**
|
|
1528
|
-
* Returns a formatted string representing the provided type.
|
|
1529
|
-
*/
|
|
1530
|
-
getFormattedType(type, config = {
|
|
1531
|
-
escapeSpecialCharacters: true,
|
|
1532
|
-
}) {
|
|
1533
|
-
let formatted = 'any';
|
|
1534
|
-
if (!type) {
|
|
1535
|
-
return formatted;
|
|
1536
|
-
}
|
|
1537
|
-
if (type.name === 'InputSignal' &&
|
|
1538
|
-
type.package === '@angular/core' &&
|
|
1539
|
-
type.typeArguments?.length) {
|
|
1540
|
-
type = type.typeArguments[0];
|
|
1541
|
-
}
|
|
1542
|
-
if (type.callSignature) {
|
|
1543
|
-
let formattedSignature = this.getFormattedCallSignature(type.callSignature, config);
|
|
1544
|
-
if (type.type === 'array') {
|
|
1545
|
-
formattedSignature = `(${formattedSignature})[]`;
|
|
1546
|
-
}
|
|
1547
|
-
return formattedSignature;
|
|
1548
|
-
}
|
|
1549
|
-
if (type.unionTypes) {
|
|
1550
|
-
return this.getFormattedUnion(type, config);
|
|
1551
|
-
}
|
|
1552
|
-
if (type.name !== null && type.name !== undefined) {
|
|
1553
|
-
formatted = `${type.name}`;
|
|
1554
|
-
}
|
|
1555
|
-
if (type.typeArguments) {
|
|
1556
|
-
formatted += this.getFormattedTypeArguments(type, config);
|
|
1557
|
-
}
|
|
1558
|
-
if (type.type === 'array') {
|
|
1559
|
-
formatted += '[]';
|
|
1560
|
-
}
|
|
1561
|
-
if (type.type === 'literal' && typeof type.name === 'string') {
|
|
1562
|
-
formatted = `'${formatted}'`;
|
|
1563
|
-
}
|
|
1564
|
-
if (type.typeLiteral) {
|
|
1565
|
-
const formattedTypeLiteral = this.getFormattedInterfaceProperties(type.typeLiteral, config)
|
|
1566
|
-
.replace(/\n/g, ' ')
|
|
1567
|
-
.replace(/\s\s+/g, ' ');
|
|
1568
|
-
formatted = `{${formattedTypeLiteral} }`;
|
|
1569
|
-
}
|
|
1570
|
-
if (config.escapeSpecialCharacters) {
|
|
1571
|
-
return this.escapeSpecialCharacters(formatted);
|
|
1572
|
-
}
|
|
1573
|
-
return formatted;
|
|
1574
|
-
}
|
|
1575
|
-
escapeSpecialCharacters(value) {
|
|
1576
|
-
return value.replace(/</g, '<').replace(/>/g, '>');
|
|
1577
|
-
}
|
|
1578
|
-
getFormattedCallSignature(callSignature, config) {
|
|
1579
|
-
const returnType = this.getFormattedType(callSignature.returnType, config);
|
|
1580
|
-
if (!callSignature.parameters) {
|
|
1581
|
-
return `() => ${returnType}`;
|
|
1582
|
-
}
|
|
1583
|
-
const formattedParams = callSignature.parameters
|
|
1584
|
-
.map((p) => this.getFormattedParameterName(p, config))
|
|
1585
|
-
.join(', ');
|
|
1586
|
-
return `(${formattedParams}) => ${returnType}`;
|
|
1587
|
-
}
|
|
1588
|
-
getFormattedUnion(typeConfig, config) {
|
|
1589
|
-
return typeConfig.unionTypes
|
|
1590
|
-
.map((t) => {
|
|
1591
|
-
return this.getFormattedType(t, config);
|
|
1592
|
-
})
|
|
1593
|
-
.join(' | ');
|
|
1594
|
-
}
|
|
1595
|
-
/**
|
|
1596
|
-
* Parse any type arguments e.g. `<T, F>`.
|
|
1597
|
-
*/
|
|
1598
|
-
getFormattedTypeArguments(typeConfig, config) {
|
|
1599
|
-
if (!typeConfig.typeArguments) {
|
|
1600
|
-
return '';
|
|
1601
|
-
}
|
|
1602
|
-
const typeArguments = typeConfig.typeArguments.map((typeArgument) => {
|
|
1603
|
-
if (typeArgument.type === 'array') {
|
|
1604
|
-
return `${typeArgument.name}[]`;
|
|
1605
|
-
}
|
|
1606
|
-
if (typeArgument.unionTypes) {
|
|
1607
|
-
return this.getFormattedUnion(typeArgument, config);
|
|
1608
|
-
}
|
|
1609
|
-
return typeArgument.name;
|
|
1610
|
-
});
|
|
1611
|
-
return `<${typeArguments.join(', ')}>`;
|
|
1612
|
-
}
|
|
1613
|
-
getFormattedTypeParameters(typeParameters) {
|
|
1614
|
-
if (!typeParameters) {
|
|
1615
|
-
return '';
|
|
1616
|
-
}
|
|
1617
|
-
const formatted = typeParameters.map((typeParameter) => {
|
|
1618
|
-
let result = typeParameter.name;
|
|
1619
|
-
if (typeParameter.type && typeParameter.type.type === 'reference') {
|
|
1620
|
-
result += ` extends ${typeParameter.type.name}`;
|
|
1621
|
-
}
|
|
1622
|
-
return result;
|
|
1623
|
-
});
|
|
1624
|
-
return `<${formatted.join(', ')}>`;
|
|
1625
|
-
}
|
|
1626
|
-
getFormattedInterfaceProperties(definition, config) {
|
|
1627
|
-
let signature = '';
|
|
1628
|
-
definition.properties.forEach((property) => {
|
|
1629
|
-
const indexSignature = property.type.indexSignature;
|
|
1630
|
-
const optionalIndicator = property.isOptional && !indexSignature ? '?' : '';
|
|
1631
|
-
const propertyType = this.getFormattedType(property.type, config);
|
|
1632
|
-
let name;
|
|
1633
|
-
if (indexSignature) {
|
|
1634
|
-
name = `[${indexSignature.key.name}: string]`;
|
|
1635
|
-
}
|
|
1636
|
-
else {
|
|
1637
|
-
name = property.name;
|
|
1638
|
-
}
|
|
1639
|
-
signature += `\n ${name}${optionalIndicator}: ${propertyType};`;
|
|
1640
|
-
});
|
|
1641
|
-
return signature;
|
|
1642
|
-
}
|
|
1643
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeDefinitionsFormatService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1644
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeDefinitionsFormatService, providedIn: 'root' }); }
|
|
1645
|
-
}
|
|
1646
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeDefinitionsFormatService, decorators: [{
|
|
1647
|
-
type: Injectable,
|
|
1648
|
-
args: [{
|
|
1649
|
-
providedIn: 'root',
|
|
1650
|
-
}]
|
|
1651
|
-
}] });
|
|
1652
|
-
|
|
1653
|
-
class SkyDocsTypeDefinitionsProvider {
|
|
1654
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeDefinitionsProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1655
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeDefinitionsProvider }); }
|
|
1656
|
-
}
|
|
1657
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeDefinitionsProvider, decorators: [{
|
|
1658
|
-
type: Injectable
|
|
1659
|
-
}] });
|
|
1660
|
-
|
|
1661
|
-
/**
|
|
1662
|
-
* Finds any type name that is NOT surrounded by alpha-numeric (and '>', '<', '.') characters.
|
|
1663
|
-
* (This is to avoid matching types that share similar words, such as `Foo` and `FooUser`.)
|
|
1664
|
-
* Notes:
|
|
1665
|
-
* - If the type name is surrounded by angle brackets, then it has already been processed as a link.
|
|
1666
|
-
* - 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.
|
|
1667
|
-
* - If the type name ends with a period followed immediately by any word character, then it is a method or property (Foo.bar).
|
|
1668
|
-
* Only the type name should be processed as a link.
|
|
1669
|
-
*/
|
|
1670
|
-
function createRegex(keyword) {
|
|
1671
|
-
return new RegExp(`(^|[^a-zA-Z0-9>.[/])(${keyword})(\\.\\w+)?(?=[^a-zA-Z0-9<]+|$)`, 'g');
|
|
1672
|
-
}
|
|
1673
|
-
class SkyDocsAnchorLinkService {
|
|
1674
|
-
constructor(typeDefinitionsProvider) {
|
|
1675
|
-
this.anchorIds = typeDefinitionsProvider.anchorIds;
|
|
1676
|
-
}
|
|
1677
|
-
/**
|
|
1678
|
-
* Formats known type names with `<code>` tags and wraps them with anchor tags, linking to the appropriate type.
|
|
1679
|
-
* If the content is already contained within a `<code>` tag, set `codeFormat = false` to prevent extra `<code>` tags from being added.
|
|
1680
|
-
*/
|
|
1681
|
-
applyTypeAnchorLinks(content, config) {
|
|
1682
|
-
if (!this.anchorIds || !content) {
|
|
1683
|
-
return content;
|
|
1684
|
-
}
|
|
1685
|
-
// Set default for code formatting.
|
|
1686
|
-
if (!config) {
|
|
1687
|
-
config = {
|
|
1688
|
-
applyCodeFormatting: true,
|
|
1689
|
-
};
|
|
1690
|
-
}
|
|
1691
|
-
content = this.removeDoubleSquareBrackets(content);
|
|
1692
|
-
Object.keys(this.anchorIds).forEach((typeName) => {
|
|
1693
|
-
content = this.removeBackticks(typeName, content);
|
|
1694
|
-
let matches;
|
|
1695
|
-
let counter = 0;
|
|
1696
|
-
const max = 100;
|
|
1697
|
-
const regex = createRegex(typeName);
|
|
1698
|
-
do {
|
|
1699
|
-
matches = regex.exec(content);
|
|
1700
|
-
if (matches) {
|
|
1701
|
-
const anchorId = this.anchorIds[typeName];
|
|
1702
|
-
const anchorHtml = '<a class="sky-docs-anchor-link" href="#' +
|
|
1703
|
-
anchorId +
|
|
1704
|
-
'">' +
|
|
1705
|
-
typeName +
|
|
1706
|
-
'</a>';
|
|
1707
|
-
// Group 3 of the regex pattern captures type properties like Foo.bar.
|
|
1708
|
-
// If these are found, they do not need hyperlinked, but add them to the encapsulating code tag.
|
|
1709
|
-
const typeProperty = matches[3] ? matches[3] : '';
|
|
1710
|
-
let replacement;
|
|
1711
|
-
if (config.applyCodeFormatting) {
|
|
1712
|
-
replacement = '<code>' + anchorHtml + typeProperty + '</code>';
|
|
1713
|
-
}
|
|
1714
|
-
else {
|
|
1715
|
-
replacement = anchorHtml + typeProperty;
|
|
1716
|
-
}
|
|
1717
|
-
// Regex Positive lookbehinds aren't supported in IE11 and Safari, so we have to check if the match has a starting extra character
|
|
1718
|
-
// (usually whitespace " Foo"), and then modify the starting/ending indexes to account for the extra character.
|
|
1719
|
-
const isMatchExact = matches[0].substr(0, typeName.length) === typeName;
|
|
1720
|
-
const startIndex = isMatchExact ? matches.index : matches.index + 1;
|
|
1721
|
-
const endIndex = isMatchExact
|
|
1722
|
-
? matches[0].length
|
|
1723
|
-
: matches[0].length - 1;
|
|
1724
|
-
let contentWithCodeTags = content.substr(0, startIndex) +
|
|
1725
|
-
replacement +
|
|
1726
|
-
content.substr(startIndex + endIndex);
|
|
1727
|
-
content = contentWithCodeTags;
|
|
1728
|
-
counter++;
|
|
1729
|
-
}
|
|
1730
|
-
} while (matches !== null && counter < max);
|
|
1731
|
-
});
|
|
1732
|
-
return content;
|
|
1733
|
-
}
|
|
1734
|
-
/**
|
|
1735
|
-
* For backwards compatibility, we need to remove any double brackets wrapped around types.
|
|
1736
|
-
* e.g., `[[SampleType]]`
|
|
1737
|
-
*/
|
|
1738
|
-
removeDoubleSquareBrackets(content) {
|
|
1739
|
-
const match = content.match(/\[\[.*\]\]/);
|
|
1740
|
-
if (match) {
|
|
1741
|
-
const typeName = match[0].replace(/\[\[/g, '').replace(/\]\]/g, '');
|
|
1742
|
-
content = content.replace(match[0], typeName);
|
|
1743
|
-
}
|
|
1744
|
-
return content;
|
|
1745
|
-
}
|
|
1746
|
-
/**
|
|
1747
|
-
* Removes backtick characters around known types to prevent
|
|
1748
|
-
* the markdown pipe from wrapping them with code elements.
|
|
1749
|
-
*/
|
|
1750
|
-
removeBackticks(typeName, content) {
|
|
1751
|
-
const regexp = new RegExp(`\`(${typeName})\``, 'g');
|
|
1752
|
-
return content.replace(regexp, typeName);
|
|
1753
|
-
}
|
|
1754
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsAnchorLinkService, deps: [{ token: SkyDocsTypeDefinitionsProvider }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1755
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsAnchorLinkService, providedIn: 'any' }); }
|
|
1756
|
-
}
|
|
1757
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsAnchorLinkService, decorators: [{
|
|
1758
|
-
type: Injectable,
|
|
1759
|
-
args: [{
|
|
1760
|
-
providedIn: 'any',
|
|
1761
|
-
}]
|
|
1762
|
-
}], ctorParameters: () => [{ type: SkyDocsTypeDefinitionsProvider }] });
|
|
1763
|
-
|
|
1764
|
-
/**
|
|
1765
|
-
* Adds same-page anchor tags around known TypeScript types.
|
|
1766
|
-
*/
|
|
1767
|
-
class SkyDocsTypeAnchorLinksPipe {
|
|
1768
|
-
constructor(anchorLinkService) {
|
|
1769
|
-
this.anchorLinkService = anchorLinkService;
|
|
1770
|
-
}
|
|
1771
|
-
transform(value, formatType) {
|
|
1772
|
-
const anchorLinkConfig = {
|
|
1773
|
-
applyCodeFormatting: formatType !== 'no-code-tags',
|
|
1774
|
-
};
|
|
1775
|
-
return this.anchorLinkService.applyTypeAnchorLinks(value, anchorLinkConfig);
|
|
1776
|
-
}
|
|
1777
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeAnchorLinksPipe, deps: [{ token: SkyDocsAnchorLinkService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1778
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeAnchorLinksPipe, name: "skyDocsTypeAnchorLinks" }); }
|
|
1779
|
-
}
|
|
1780
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeAnchorLinksPipe, decorators: [{
|
|
1781
|
-
type: Pipe,
|
|
1782
|
-
args: [{
|
|
1783
|
-
name: 'skyDocsTypeAnchorLinks',
|
|
1784
|
-
pure: true,
|
|
1785
|
-
}]
|
|
1786
|
-
}], ctorParameters: () => [{ type: SkyDocsAnchorLinkService }] });
|
|
1787
|
-
|
|
1788
|
-
/**
|
|
1789
|
-
* "Call signatures" include methods, functions, and inline arrow functions.
|
|
1790
|
-
* This component is used to document both the return type and parameters of a given call signature.
|
|
1791
|
-
*/
|
|
1792
|
-
class SkyDocsCallSignatureDefinitionComponent {
|
|
1793
|
-
set config(value) {
|
|
1794
|
-
this._config = value;
|
|
1795
|
-
this.updateView();
|
|
1796
|
-
}
|
|
1797
|
-
get config() {
|
|
1798
|
-
return this._config;
|
|
1799
|
-
}
|
|
1800
|
-
constructor(formatService) {
|
|
1801
|
-
this.formatService = formatService;
|
|
1802
|
-
}
|
|
1803
|
-
updateView() {
|
|
1804
|
-
this.parameters = this.config?.parameters?.map((p) => {
|
|
1805
|
-
const vm = {
|
|
1806
|
-
defaultValue: p.defaultValue,
|
|
1807
|
-
description: p.description,
|
|
1808
|
-
formattedName: this.formatService.getFormattedParameterName(p),
|
|
1809
|
-
isOptional: p.isOptional,
|
|
1810
|
-
};
|
|
1811
|
-
return vm;
|
|
1812
|
-
});
|
|
1813
|
-
this.returnTypeFormatted = this.formatService.getFormattedType(this.config?.returnType);
|
|
1814
|
-
}
|
|
1815
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsCallSignatureDefinitionComponent, deps: [{ token: SkyDocsTypeDefinitionsFormatService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1816
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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:400}.sky-docs-parameter-definition-label-optional{color:#686c73}.sky-docs-call-signature-definition-return-type{margin-left:15px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.λ1, selector: "sky-code" }, { kind: "component", type: SkyDocsSafeHtmlComponent, selector: "sky-docs-safe-html", inputs: ["innerHtml"] }, { kind: "pipe", type: SkyDocsMarkdownPipe, name: "skyDocsMarkdown" }, { kind: "pipe", type: SkyDocsTypeAnchorLinksPipe, name: "skyDocsTypeAnchorLinks" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1817
|
-
}
|
|
1818
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsCallSignatureDefinitionComponent, decorators: [{
|
|
1819
|
-
type: Component,
|
|
1820
|
-
args: [{ selector: 'sky-docs-call-signature-definition', changeDetection: ChangeDetectionStrategy.OnPush, 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:400}.sky-docs-parameter-definition-label-optional{color:#686c73}.sky-docs-call-signature-definition-return-type{margin-left:15px}\n"] }]
|
|
1821
|
-
}], ctorParameters: () => [{ type: SkyDocsTypeDefinitionsFormatService }], propDecorators: { config: [{
|
|
1822
|
-
type: Input
|
|
1823
|
-
}] } });
|
|
1824
|
-
|
|
1825
|
-
class SkyDocsPreviewIndicatorComponent {
|
|
1826
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsPreviewIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1827
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: SkyDocsPreviewIndicatorComponent, isStandalone: true, selector: "sky-docs-preview-feature-indicator", ngImport: i0, template: "<sky-status-indicator indicatorType=\"warning\" descriptionType=\"warning\"\n >Preview. This feature may not be fully represented in the design\n documentation, the demo, or code examples.</sky-status-indicator\n>\n", dependencies: [{ kind: "ngmodule", type: SkyStatusIndicatorModule }, { kind: "component", type: i1$5.λ10, selector: "sky-status-indicator", inputs: ["indicatorType", "descriptionType", "customDescription", "helpPopoverContent", "helpPopoverTitle", "helpKey"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1828
|
-
}
|
|
1829
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsPreviewIndicatorComponent, decorators: [{
|
|
1830
|
-
type: Component,
|
|
1831
|
-
args: [{ selector: 'sky-docs-preview-feature-indicator', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [SkyStatusIndicatorModule], template: "<sky-status-indicator indicatorType=\"warning\" descriptionType=\"warning\"\n >Preview. This feature may not be fully represented in the design\n documentation, the demo, or code examples.</sky-status-indicator\n>\n" }]
|
|
1832
|
-
}] });
|
|
1833
|
-
|
|
1834
|
-
class SkyDocsPropertyDefinitionsComponent {
|
|
1835
|
-
set config(value) {
|
|
1836
|
-
this._config = value;
|
|
1837
|
-
this.updateView();
|
|
1838
|
-
}
|
|
1839
|
-
get config() {
|
|
1840
|
-
return this._config || {};
|
|
1841
|
-
}
|
|
1842
|
-
constructor(changeDetector, formatService, mediaQueryService) {
|
|
1843
|
-
this.changeDetector = changeDetector;
|
|
1844
|
-
this.formatService = formatService;
|
|
1845
|
-
this.mediaQueryService = mediaQueryService;
|
|
1846
|
-
this.propertyType = 'Property';
|
|
1847
|
-
this.showOptionalStatus = true;
|
|
1848
|
-
this.deprecationWarningPrefix = `<span class="sky-text-warning"></span>**Deprecated.** `;
|
|
1849
|
-
this.isMobile = true;
|
|
1850
|
-
this.properties = [];
|
|
1851
|
-
}
|
|
1852
|
-
ngOnInit() {
|
|
1853
|
-
this.mediaQueryService.subscribe((breakpoints) => {
|
|
1854
|
-
this.isMobile = breakpoints <= SkyMediaBreakpoints.sm;
|
|
1855
|
-
this.changeDetector.markForCheck();
|
|
1856
|
-
});
|
|
1857
|
-
}
|
|
1858
|
-
updateView() {
|
|
1859
|
-
this.properties = this.config?.properties?.map((property) => {
|
|
1860
|
-
const vm = {
|
|
1861
|
-
callSignature: property.type?.callSignature,
|
|
1862
|
-
defaultValue: this.formatService.escapeSpecialCharacters(property.defaultValue || ''),
|
|
1863
|
-
deprecationWarning: property.deprecationWarning,
|
|
1864
|
-
description: property.description,
|
|
1865
|
-
formattedName: this.formatService.getFormattedPropertyName(property),
|
|
1866
|
-
isOutput: property.decorator?.name === 'Output',
|
|
1867
|
-
isOptional: property.isOptional,
|
|
1868
|
-
isPreview: property.isPreview,
|
|
1869
|
-
};
|
|
1870
|
-
return vm;
|
|
1871
|
-
});
|
|
1872
|
-
}
|
|
1873
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsPropertyDefinitionsComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkyDocsTypeDefinitionsFormatService }, { token: i2.SkyMediaQueryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1874
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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 <thead>\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=\"sky-docs-table-column-header sky-docs-table-column-header-description\"\n >\n Description\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let property of properties\" class=\"sky-docs-table-row\">\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 </tbody>\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.isOutput && !property.isOptional && showOptionalStatus\"\n class=\"sky-docs-property-definition-label\"\n >\n <sky-status-indicator indicatorType=\"danger\" descriptionType=\"danger\"\n >Required.</sky-status-indicator\n >\n </div>\n <div\n *ngIf=\"property.isPreview\"\n class=\"sky-docs-property-definition-preview-warning sky-docs-property-definition-label\"\n >\n <sky-docs-preview-feature-indicator></sky-docs-preview-feature-indicator>\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.isOutput && property.isOptional && showOptionalStatus\"\n class=\"sky-docs-property-definition-label sky-docs-property-definition-label-optional\"\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%}.sky-docs-property-definitions th{position:sticky;top:var(--sky-viewport-top, 0);z-index:1}.sky-docs-property-definitions-table-cell-description{word-break:break-word}.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"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.λ1, selector: "sky-code" }, { kind: "component", type: SkyDocsPreviewIndicatorComponent, selector: "sky-docs-preview-feature-indicator" }, { kind: "component", type: SkyDocsSafeHtmlComponent, selector: "sky-docs-safe-html", inputs: ["innerHtml"] }, { kind: "component", type: i1$5.λ10, selector: "sky-status-indicator", inputs: ["indicatorType", "descriptionType", "customDescription", "helpPopoverContent", "helpPopoverTitle", "helpKey"] }, { kind: "component", type: SkyDocsCallSignatureDefinitionComponent, selector: "sky-docs-call-signature-definition", inputs: ["config"] }, { kind: "pipe", type: SkyDocsMarkdownPipe, name: "skyDocsMarkdown" }, { kind: "pipe", type: SkyDocsTypeAnchorLinksPipe, name: "skyDocsTypeAnchorLinks" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1875
|
-
}
|
|
1876
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsPropertyDefinitionsComponent, decorators: [{
|
|
1877
|
-
type: Component,
|
|
1878
|
-
args: [{ selector: 'sky-docs-property-definitions', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"properties\" class=\"sky-docs-property-definitions\">\n <table *ngIf=\"!isMobile; else mobileTemplate\" class=\"sky-docs-table\">\n <thead>\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=\"sky-docs-table-column-header sky-docs-table-column-header-description\"\n >\n Description\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let property of properties\" class=\"sky-docs-table-row\">\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 </tbody>\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.isOutput && !property.isOptional && showOptionalStatus\"\n class=\"sky-docs-property-definition-label\"\n >\n <sky-status-indicator indicatorType=\"danger\" descriptionType=\"danger\"\n >Required.</sky-status-indicator\n >\n </div>\n <div\n *ngIf=\"property.isPreview\"\n class=\"sky-docs-property-definition-preview-warning sky-docs-property-definition-label\"\n >\n <sky-docs-preview-feature-indicator></sky-docs-preview-feature-indicator>\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.isOutput && property.isOptional && showOptionalStatus\"\n class=\"sky-docs-property-definition-label sky-docs-property-definition-label-optional\"\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%}.sky-docs-property-definitions th{position:sticky;top:var(--sky-viewport-top, 0);z-index:1}.sky-docs-property-definitions-table-cell-description{word-break:break-word}.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"] }]
|
|
1879
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: SkyDocsTypeDefinitionsFormatService }, { type: i2.SkyMediaQueryService }], propDecorators: { config: [{
|
|
1880
|
-
type: Input
|
|
1881
|
-
}], propertyType: [{
|
|
1882
|
-
type: Input
|
|
1883
|
-
}], showOptionalStatus: [{
|
|
1884
|
-
type: Input
|
|
1885
|
-
}] } });
|
|
1886
|
-
|
|
1887
|
-
class SkyDocsDirectiveDefinitionComponent {
|
|
1888
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDirectiveDefinitionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1889
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.λ2, selector: "sky-code-block", inputs: ["code", "fileName", "languageType", "hideCopyToClipboard", "hideHeader"] }, { kind: "component", type: i4.λ1, selector: "sky-code" }, { kind: "component", type: SkyDocsHeadingAnchorComponent, selector: "sky-docs-heading-anchor", inputs: ["anchorId", "headingLevel"] }, { kind: "component", type: SkyDocsSafeHtmlComponent, selector: "sky-docs-safe-html", inputs: ["innerHtml"] }, { kind: "component", type: SkyDocsPropertyDefinitionsComponent, selector: "sky-docs-property-definitions", inputs: ["config", "propertyType", "showOptionalStatus"] }, { kind: "pipe", type: SkyDocsMarkdownPipe, name: "skyDocsMarkdown" }, { kind: "pipe", type: SkyDocsTypeAnchorLinksPipe, name: "skyDocsTypeAnchorLinks" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1890
|
-
}
|
|
1891
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDirectiveDefinitionComponent, decorators: [{
|
|
1892
|
-
type: Component,
|
|
1893
|
-
args: [{ selector: 'sky-docs-directive-definition', changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
1894
|
-
}], propDecorators: { config: [{
|
|
1895
|
-
type: Input
|
|
1896
|
-
}] } });
|
|
1897
|
-
|
|
1898
|
-
class SkyDocsEnumerationDefinitionComponent {
|
|
1899
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsEnumerationDefinitionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1900
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SkyDocsHeadingAnchorComponent, selector: "sky-docs-heading-anchor", inputs: ["anchorId", "headingLevel"] }, { kind: "component", type: SkyDocsSafeHtmlComponent, selector: "sky-docs-safe-html", inputs: ["innerHtml"] }, { kind: "component", type: SkyDocsPropertyDefinitionsComponent, selector: "sky-docs-property-definitions", inputs: ["config", "propertyType", "showOptionalStatus"] }, { kind: "pipe", type: SkyDocsMarkdownPipe, name: "skyDocsMarkdown" }, { kind: "pipe", type: SkyDocsTypeAnchorLinksPipe, name: "skyDocsTypeAnchorLinks" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1901
|
-
}
|
|
1902
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsEnumerationDefinitionComponent, decorators: [{
|
|
1903
|
-
type: Component,
|
|
1904
|
-
args: [{ selector: 'sky-docs-enumeration-definition', changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
|
|
1905
|
-
}], propDecorators: { config: [{
|
|
1906
|
-
type: Input
|
|
1907
|
-
}] } });
|
|
1908
|
-
|
|
1909
|
-
class SkyDocsInterfaceDefinitionComponent {
|
|
1910
|
-
set config(value) {
|
|
1911
|
-
this._config = value;
|
|
1912
|
-
this.updateView();
|
|
1913
|
-
}
|
|
1914
|
-
get config() {
|
|
1915
|
-
return this._config;
|
|
1916
|
-
}
|
|
1917
|
-
constructor(formatService) {
|
|
1918
|
-
this.formatService = formatService;
|
|
1919
|
-
}
|
|
1920
|
-
updateView() {
|
|
1921
|
-
this.sourceCode = this.config
|
|
1922
|
-
? this.formatService.getInterfaceSourceCode(this.config)
|
|
1923
|
-
: undefined;
|
|
1924
|
-
}
|
|
1925
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsInterfaceDefinitionComponent, deps: [{ token: SkyDocsTypeDefinitionsFormatService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1926
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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?.length\"\n [config]=\"{ properties: config.properties }\"\n [showOptionalStatus]=\"false\"\n ></sky-docs-property-definitions>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.λ2, selector: "sky-code-block", inputs: ["code", "fileName", "languageType", "hideCopyToClipboard", "hideHeader"] }, { kind: "component", type: SkyDocsHeadingAnchorComponent, selector: "sky-docs-heading-anchor", inputs: ["anchorId", "headingLevel"] }, { kind: "component", type: SkyDocsSafeHtmlComponent, selector: "sky-docs-safe-html", inputs: ["innerHtml"] }, { kind: "component", type: SkyDocsPropertyDefinitionsComponent, selector: "sky-docs-property-definitions", inputs: ["config", "propertyType", "showOptionalStatus"] }, { kind: "pipe", type: SkyDocsMarkdownPipe, name: "skyDocsMarkdown" }, { kind: "pipe", type: SkyDocsTypeAnchorLinksPipe, name: "skyDocsTypeAnchorLinks" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1927
|
-
}
|
|
1928
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsInterfaceDefinitionComponent, decorators: [{
|
|
1929
|
-
type: Component,
|
|
1930
|
-
args: [{ selector: 'sky-docs-interface-definition', changeDetection: ChangeDetectionStrategy.OnPush, 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?.length\"\n [config]=\"{ properties: config.properties }\"\n [showOptionalStatus]=\"false\"\n ></sky-docs-property-definitions>\n</div>\n" }]
|
|
1931
|
-
}], ctorParameters: () => [{ type: SkyDocsTypeDefinitionsFormatService }], propDecorators: { config: [{
|
|
1932
|
-
type: Input
|
|
1933
|
-
}] } });
|
|
1934
|
-
|
|
1935
|
-
class SkyDocsMethodDefinitionsComponent {
|
|
1936
|
-
set config(value) {
|
|
1937
|
-
this.#_config = value;
|
|
1938
|
-
this.updateView();
|
|
1939
|
-
}
|
|
1940
|
-
get config() {
|
|
1941
|
-
return this.#_config || {};
|
|
1942
|
-
}
|
|
1943
|
-
#_config;
|
|
1944
|
-
#changeDetector;
|
|
1945
|
-
#formatService;
|
|
1946
|
-
#mediaQueryService;
|
|
1947
|
-
constructor(changeDetector, formatService, mediaQueryService) {
|
|
1948
|
-
this.deprecationWarningPrefix = `<span class="sky-text-warning"></span>**Deprecated.** `;
|
|
1949
|
-
this.isMobile = true;
|
|
1950
|
-
this.#changeDetector = changeDetector;
|
|
1951
|
-
this.#formatService = formatService;
|
|
1952
|
-
this.#mediaQueryService = mediaQueryService;
|
|
1953
|
-
}
|
|
1954
|
-
ngOnInit() {
|
|
1955
|
-
this.#mediaQueryService.subscribe((breakpoints) => {
|
|
1956
|
-
this.isMobile = breakpoints <= SkyMediaBreakpoints.sm;
|
|
1957
|
-
this.#changeDetector.markForCheck();
|
|
1958
|
-
});
|
|
1959
|
-
}
|
|
1960
|
-
updateView() {
|
|
1961
|
-
if (this.config.methods?.length > 0) {
|
|
1962
|
-
this.methods = [];
|
|
1963
|
-
this.staticMethods = [];
|
|
1964
|
-
for (let method of this.config.methods) {
|
|
1965
|
-
const vm = {
|
|
1966
|
-
callSignature: method.type.callSignature,
|
|
1967
|
-
codeExample: method.codeExample,
|
|
1968
|
-
codeExampleLanguage: method.codeExampleLanguage,
|
|
1969
|
-
deprecationWarning: method.deprecationWarning,
|
|
1970
|
-
description: method.description,
|
|
1971
|
-
formattedName: this.#formatService.getFormattedMethodName(method),
|
|
1972
|
-
sourceCode: this.#formatService.getMethodSourceCode(method),
|
|
1973
|
-
isStatic: method.isStatic,
|
|
1974
|
-
isPreview: method.isPreview,
|
|
1975
|
-
};
|
|
1976
|
-
if (vm.isStatic) {
|
|
1977
|
-
this.staticMethods.push(vm);
|
|
1978
|
-
}
|
|
1979
|
-
else {
|
|
1980
|
-
this.methods.push(vm);
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
|
-
}
|
|
1984
|
-
}
|
|
1985
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsMethodDefinitionsComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkyDocsTypeDefinitionsFormatService }, { token: i2.SkyMediaQueryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1986
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: SkyDocsMethodDefinitionsComponent, selector: "sky-docs-method-definitions", inputs: { config: "config" }, ngImport: i0, template: "<div\n *ngIf=\"methods?.length > 0 || staticMethods?.length > 0\"\n class=\"sky-docs-method-definitions\"\n>\n <ng-container *ngIf=\"!isMobile; else mobileTemplate\">\n <table\n class=\"sky-docs-table sky-docs-static-method-definitions\"\n *ngIf=\"staticMethods?.length > 0\"\n >\n <tr class=\"sky-docs-table-row\">\n <th\n class=\"sky-docs-table-column-header sky-docs-table-column-header-name\"\n >\n Static methods\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 method of staticMethods\" 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=\"sky-docs-table-cell sky-docs-method-definitions-table-cell-description\"\n >\n <ng-template\n [ngTemplateOutlet]=\"descriptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: method }\"\n ></ng-template>\n </td>\n </tr>\n </table>\n <table\n class=\"sky-docs-table sky-docs-standard-method-definitions\"\n *ngIf=\"methods?.length > 0\"\n >\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=\"sky-docs-table-column-header sky-docs-table-column-header-description\"\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=\"sky-docs-table-cell sky-docs-method-definitions-table-cell-description\"\n >\n <ng-template\n [ngTemplateOutlet]=\"descriptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: method }\"\n ></ng-template>\n </td>\n </tr>\n </table>\n </ng-container>\n\n <ng-template #mobileTemplate>\n <dl\n class=\"sky-docs-method-definition-list sky-docs-static-method-definitions\"\n *ngIf=\"staticMethods?.length > 0\"\n >\n <div\n *ngFor=\"let method of staticMethods\"\n class=\"sky-docs-method-definition-list-item\"\n >\n <dt class=\"sky-field-label\">Static 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 <dl\n class=\"sky-docs-method-definition-list sky-docs-standard-method-definitions\"\n *ngIf=\"methods?.length > 0\"\n >\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 <div\n *ngIf=\"method.isPreview\"\n class=\"sky-docs-method-definition-preview-warning sky-docs-property-definition-label\"\n >\n <sky-docs-preview-feature-indicator></sky-docs-preview-feature-indicator>\n </div>\n\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"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.λ2, selector: "sky-code-block", inputs: ["code", "fileName", "languageType", "hideCopyToClipboard", "hideHeader"] }, { kind: "component", type: i4.λ1, selector: "sky-code" }, { kind: "component", type: SkyDocsPreviewIndicatorComponent, selector: "sky-docs-preview-feature-indicator" }, { kind: "component", type: SkyDocsSafeHtmlComponent, selector: "sky-docs-safe-html", inputs: ["innerHtml"] }, { kind: "component", type: SkyDocsCallSignatureDefinitionComponent, selector: "sky-docs-call-signature-definition", inputs: ["config"] }, { kind: "pipe", type: SkyDocsMarkdownPipe, name: "skyDocsMarkdown" }, { kind: "pipe", type: SkyDocsTypeAnchorLinksPipe, name: "skyDocsTypeAnchorLinks" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1987
|
-
}
|
|
1988
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsMethodDefinitionsComponent, decorators: [{
|
|
1989
|
-
type: Component,
|
|
1990
|
-
args: [{ selector: 'sky-docs-method-definitions', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n *ngIf=\"methods?.length > 0 || staticMethods?.length > 0\"\n class=\"sky-docs-method-definitions\"\n>\n <ng-container *ngIf=\"!isMobile; else mobileTemplate\">\n <table\n class=\"sky-docs-table sky-docs-static-method-definitions\"\n *ngIf=\"staticMethods?.length > 0\"\n >\n <tr class=\"sky-docs-table-row\">\n <th\n class=\"sky-docs-table-column-header sky-docs-table-column-header-name\"\n >\n Static methods\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 method of staticMethods\" 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=\"sky-docs-table-cell sky-docs-method-definitions-table-cell-description\"\n >\n <ng-template\n [ngTemplateOutlet]=\"descriptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: method }\"\n ></ng-template>\n </td>\n </tr>\n </table>\n <table\n class=\"sky-docs-table sky-docs-standard-method-definitions\"\n *ngIf=\"methods?.length > 0\"\n >\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=\"sky-docs-table-column-header sky-docs-table-column-header-description\"\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=\"sky-docs-table-cell sky-docs-method-definitions-table-cell-description\"\n >\n <ng-template\n [ngTemplateOutlet]=\"descriptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: method }\"\n ></ng-template>\n </td>\n </tr>\n </table>\n </ng-container>\n\n <ng-template #mobileTemplate>\n <dl\n class=\"sky-docs-method-definition-list sky-docs-static-method-definitions\"\n *ngIf=\"staticMethods?.length > 0\"\n >\n <div\n *ngFor=\"let method of staticMethods\"\n class=\"sky-docs-method-definition-list-item\"\n >\n <dt class=\"sky-field-label\">Static 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 <dl\n class=\"sky-docs-method-definition-list sky-docs-standard-method-definitions\"\n *ngIf=\"methods?.length > 0\"\n >\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 <div\n *ngIf=\"method.isPreview\"\n class=\"sky-docs-method-definition-preview-warning sky-docs-property-definition-label\"\n >\n <sky-docs-preview-feature-indicator></sky-docs-preview-feature-indicator>\n </div>\n\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"] }]
|
|
1991
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: SkyDocsTypeDefinitionsFormatService }, { type: i2.SkyMediaQueryService }], propDecorators: { config: [{
|
|
1992
|
-
type: Input
|
|
1993
|
-
}] } });
|
|
1994
|
-
|
|
1995
|
-
class SkyDocsPipeDefinitionComponent {
|
|
1996
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsPipeDefinitionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1997
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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 *ngIf=\"config.transformMethod\"\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"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.λ2, selector: "sky-code-block", inputs: ["code", "fileName", "languageType", "hideCopyToClipboard", "hideHeader"] }, { kind: "component", type: SkyDocsHeadingAnchorComponent, selector: "sky-docs-heading-anchor", inputs: ["anchorId", "headingLevel"] }, { kind: "component", type: SkyDocsSafeHtmlComponent, selector: "sky-docs-safe-html", inputs: ["innerHtml"] }, { kind: "component", type: SkyDocsMethodDefinitionsComponent, selector: "sky-docs-method-definitions", inputs: ["config"] }, { kind: "pipe", type: SkyDocsMarkdownPipe, name: "skyDocsMarkdown" }, { kind: "pipe", type: SkyDocsTypeAnchorLinksPipe, name: "skyDocsTypeAnchorLinks" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1998
|
-
}
|
|
1999
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsPipeDefinitionComponent, decorators: [{
|
|
2000
|
-
type: Component,
|
|
2001
|
-
args: [{ selector: 'sky-docs-pipe-definition', changeDetection: ChangeDetectionStrategy.OnPush, 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 *ngIf=\"config.transformMethod\"\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"] }]
|
|
2002
|
-
}], propDecorators: { config: [{
|
|
2003
|
-
type: Input
|
|
2004
|
-
}] } });
|
|
2005
|
-
|
|
2006
|
-
class SkyDocsClassDefinitionComponent {
|
|
2007
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsClassDefinitionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2008
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SkyDocsHeadingAnchorComponent, selector: "sky-docs-heading-anchor", inputs: ["anchorId", "headingLevel"] }, { kind: "component", type: SkyDocsSafeHtmlComponent, selector: "sky-docs-safe-html", inputs: ["innerHtml"] }, { kind: "component", type: SkyDocsMethodDefinitionsComponent, selector: "sky-docs-method-definitions", inputs: ["config"] }, { kind: "component", type: SkyDocsPropertyDefinitionsComponent, selector: "sky-docs-property-definitions", inputs: ["config", "propertyType", "showOptionalStatus"] }, { kind: "pipe", type: SkyDocsMarkdownPipe, name: "skyDocsMarkdown" }, { kind: "pipe", type: SkyDocsTypeAnchorLinksPipe, name: "skyDocsTypeAnchorLinks" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2009
|
-
}
|
|
2010
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsClassDefinitionComponent, decorators: [{
|
|
2011
|
-
type: Component,
|
|
2012
|
-
args: [{ selector: 'sky-docs-class-definition', changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
2013
|
-
}], propDecorators: { config: [{
|
|
2014
|
-
type: Input
|
|
2015
|
-
}] } });
|
|
2016
|
-
|
|
2017
|
-
class SkyDocsTypeAliasDefinitionComponent {
|
|
2018
|
-
set config(value) {
|
|
2019
|
-
this._config = value;
|
|
2020
|
-
this.updateView();
|
|
2021
|
-
}
|
|
2022
|
-
get config() {
|
|
2023
|
-
return this._config;
|
|
2024
|
-
}
|
|
2025
|
-
constructor(formatService) {
|
|
2026
|
-
this.formatService = formatService;
|
|
2027
|
-
}
|
|
2028
|
-
updateView() {
|
|
2029
|
-
this.sourceCode = this.config
|
|
2030
|
-
? this.formatService.getTypeAliasSourceCode(this.config)
|
|
2031
|
-
: undefined;
|
|
2032
|
-
}
|
|
2033
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeAliasDefinitionComponent, deps: [{ token: SkyDocsTypeDefinitionsFormatService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2034
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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 <div\n *ngIf=\"config.isPreview\"\n class=\"sky-docs-type-alias-preview-warning sky-docs-property-definition-label\"\n >\n <sky-docs-preview-feature-indicator></sky-docs-preview-feature-indicator>\n </div>\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"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.λ2, selector: "sky-code-block", inputs: ["code", "fileName", "languageType", "hideCopyToClipboard", "hideHeader"] }, { kind: "component", type: SkyDocsHeadingAnchorComponent, selector: "sky-docs-heading-anchor", inputs: ["anchorId", "headingLevel"] }, { kind: "component", type: SkyDocsPreviewIndicatorComponent, selector: "sky-docs-preview-feature-indicator" }, { kind: "component", type: SkyDocsSafeHtmlComponent, selector: "sky-docs-safe-html", inputs: ["innerHtml"] }, { kind: "component", type: SkyDocsCallSignatureDefinitionComponent, selector: "sky-docs-call-signature-definition", inputs: ["config"] }, { kind: "pipe", type: SkyDocsMarkdownPipe, name: "skyDocsMarkdown" }, { kind: "pipe", type: SkyDocsTypeAnchorLinksPipe, name: "skyDocsTypeAnchorLinks" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2035
|
-
}
|
|
2036
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeAliasDefinitionComponent, decorators: [{
|
|
2037
|
-
type: Component,
|
|
2038
|
-
args: [{ selector: 'sky-docs-type-alias-definition', changeDetection: ChangeDetectionStrategy.OnPush, 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 <div\n *ngIf=\"config.isPreview\"\n class=\"sky-docs-type-alias-preview-warning sky-docs-property-definition-label\"\n >\n <sky-docs-preview-feature-indicator></sky-docs-preview-feature-indicator>\n </div>\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"] }]
|
|
2039
|
-
}], ctorParameters: () => [{ type: SkyDocsTypeDefinitionsFormatService }], propDecorators: { config: [{
|
|
2040
|
-
type: Input
|
|
2041
|
-
}] } });
|
|
2042
|
-
|
|
2043
|
-
class SkyDocsTypeDefinitionsModule {
|
|
2044
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeDefinitionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2045
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeDefinitionsModule, declarations: [SkyDocsCallSignatureDefinitionComponent,
|
|
2046
|
-
SkyDocsClassDefinitionComponent,
|
|
2047
|
-
SkyDocsDirectiveDefinitionComponent,
|
|
2048
|
-
SkyDocsEnumerationDefinitionComponent,
|
|
2049
|
-
SkyDocsInterfaceDefinitionComponent,
|
|
2050
|
-
SkyDocsMethodDefinitionsComponent,
|
|
2051
|
-
SkyDocsPipeDefinitionComponent,
|
|
2052
|
-
SkyDocsPropertyDefinitionsComponent,
|
|
2053
|
-
SkyDocsTypeAliasDefinitionComponent,
|
|
2054
|
-
SkyDocsTypeAnchorLinksPipe], imports: [CommonModule,
|
|
2055
|
-
RouterModule,
|
|
2056
|
-
SkyCodeBlockModule,
|
|
2057
|
-
SkyCodeModule,
|
|
2058
|
-
SkyDefinitionListModule,
|
|
2059
|
-
SkyDocsHeadingAnchorModule,
|
|
2060
|
-
SkyDocsMarkdownModule,
|
|
2061
|
-
SkyDocsPreviewIndicatorComponent,
|
|
2062
|
-
SkyDocsSafeHtmlModule,
|
|
2063
|
-
SkyIconModule,
|
|
2064
|
-
SkyStatusIndicatorModule], exports: [SkyDocsCallSignatureDefinitionComponent,
|
|
2065
|
-
SkyDocsClassDefinitionComponent,
|
|
2066
|
-
SkyDocsDirectiveDefinitionComponent,
|
|
2067
|
-
SkyDocsEnumerationDefinitionComponent,
|
|
2068
|
-
SkyDocsInterfaceDefinitionComponent,
|
|
2069
|
-
SkyDocsMethodDefinitionsComponent,
|
|
2070
|
-
SkyDocsPipeDefinitionComponent,
|
|
2071
|
-
SkyDocsPropertyDefinitionsComponent,
|
|
2072
|
-
SkyDocsTypeAliasDefinitionComponent,
|
|
2073
|
-
SkyDocsTypeAnchorLinksPipe] }); }
|
|
2074
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeDefinitionsModule, imports: [CommonModule,
|
|
2075
|
-
RouterModule,
|
|
2076
|
-
SkyCodeBlockModule,
|
|
2077
|
-
SkyCodeModule,
|
|
2078
|
-
SkyDefinitionListModule,
|
|
2079
|
-
SkyDocsHeadingAnchorModule,
|
|
2080
|
-
SkyDocsMarkdownModule,
|
|
2081
|
-
SkyDocsPreviewIndicatorComponent,
|
|
2082
|
-
SkyDocsSafeHtmlModule,
|
|
2083
|
-
SkyIconModule,
|
|
2084
|
-
SkyStatusIndicatorModule] }); }
|
|
2085
|
-
}
|
|
2086
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeDefinitionsModule, decorators: [{
|
|
2087
|
-
type: NgModule,
|
|
2088
|
-
args: [{
|
|
2089
|
-
imports: [
|
|
2090
|
-
CommonModule,
|
|
2091
|
-
RouterModule,
|
|
2092
|
-
SkyCodeBlockModule,
|
|
2093
|
-
SkyCodeModule,
|
|
2094
|
-
SkyDefinitionListModule,
|
|
2095
|
-
SkyDocsHeadingAnchorModule,
|
|
2096
|
-
SkyDocsMarkdownModule,
|
|
2097
|
-
SkyDocsPreviewIndicatorComponent,
|
|
2098
|
-
SkyDocsSafeHtmlModule,
|
|
2099
|
-
SkyIconModule,
|
|
2100
|
-
SkyStatusIndicatorModule,
|
|
2101
|
-
],
|
|
2102
|
-
declarations: [
|
|
2103
|
-
SkyDocsCallSignatureDefinitionComponent,
|
|
2104
|
-
SkyDocsClassDefinitionComponent,
|
|
2105
|
-
SkyDocsDirectiveDefinitionComponent,
|
|
2106
|
-
SkyDocsEnumerationDefinitionComponent,
|
|
2107
|
-
SkyDocsInterfaceDefinitionComponent,
|
|
2108
|
-
SkyDocsMethodDefinitionsComponent,
|
|
2109
|
-
SkyDocsPipeDefinitionComponent,
|
|
2110
|
-
SkyDocsPropertyDefinitionsComponent,
|
|
2111
|
-
SkyDocsTypeAliasDefinitionComponent,
|
|
2112
|
-
SkyDocsTypeAnchorLinksPipe,
|
|
2113
|
-
],
|
|
2114
|
-
exports: [
|
|
2115
|
-
SkyDocsCallSignatureDefinitionComponent,
|
|
2116
|
-
SkyDocsClassDefinitionComponent,
|
|
2117
|
-
SkyDocsDirectiveDefinitionComponent,
|
|
2118
|
-
SkyDocsEnumerationDefinitionComponent,
|
|
2119
|
-
SkyDocsInterfaceDefinitionComponent,
|
|
2120
|
-
SkyDocsMethodDefinitionsComponent,
|
|
2121
|
-
SkyDocsPipeDefinitionComponent,
|
|
2122
|
-
SkyDocsPropertyDefinitionsComponent,
|
|
2123
|
-
SkyDocsTypeAliasDefinitionComponent,
|
|
2124
|
-
SkyDocsTypeAnchorLinksPipe,
|
|
2125
|
-
],
|
|
2126
|
-
}]
|
|
2127
|
-
}] });
|
|
2128
|
-
|
|
2129
|
-
/**
|
|
2130
|
-
* Specifies a section of page content.
|
|
2131
|
-
* @example
|
|
2132
|
-
* ```
|
|
2133
|
-
* <sky-docs-demo-page-section
|
|
2134
|
-
* heading="Section heading"
|
|
2135
|
-
* >
|
|
2136
|
-
* Section content here.
|
|
2137
|
-
* </sky-docs-demo-page-section>
|
|
2138
|
-
* ```
|
|
2139
|
-
*/
|
|
2140
|
-
class SkyDocsDemoPageSectionComponent {
|
|
2141
|
-
get anchorId() {
|
|
2142
|
-
return `section-${this.getSanitizedName(this.heading)}`;
|
|
2143
|
-
}
|
|
2144
|
-
getSanitizedName(value) {
|
|
2145
|
-
if (!value) {
|
|
2146
|
-
return;
|
|
2147
|
-
}
|
|
2148
|
-
const sanitized = value
|
|
2149
|
-
.toLowerCase()
|
|
2150
|
-
// Remove special characters.
|
|
2151
|
-
.replace(/[\_\~\`\@\!\#\$\%\^\&\*\(\)\[\]\{\}\;\:\'\/\\\<\>\,\.\?\=\+\|"]/g, '')
|
|
2152
|
-
// Replace space characters with a dash.
|
|
2153
|
-
.replace(/\s/g, '-')
|
|
2154
|
-
// Remove any double-dashes.
|
|
2155
|
-
.replace(/--/g, '-');
|
|
2156
|
-
return sanitized;
|
|
2157
|
-
}
|
|
2158
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2159
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SkyDocsHeadingAnchorComponent, selector: "sky-docs-heading-anchor", inputs: ["anchorId", "headingLevel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2160
|
-
}
|
|
2161
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageSectionComponent, decorators: [{
|
|
2162
|
-
type: Component,
|
|
2163
|
-
args: [{ selector: 'sky-docs-demo-page-section', changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
2164
|
-
}], propDecorators: { heading: [{
|
|
2165
|
-
type: Input
|
|
2166
|
-
}] } });
|
|
2167
|
-
|
|
2168
|
-
/**
|
|
2169
|
-
* The page summary provides a section at the top of the page
|
|
2170
|
-
* to summarize what a user should expect to find or learn on the page.
|
|
2171
|
-
* @example
|
|
2172
|
-
* ```
|
|
2173
|
-
* <sky-docs-demo-page-summary>
|
|
2174
|
-
* Page summary here.
|
|
2175
|
-
* </sky-docs-demo-page-summary>
|
|
2176
|
-
* ```
|
|
2177
|
-
*/
|
|
2178
|
-
class SkyDocsDemoPageSummaryComponent {
|
|
2179
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageSummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2180
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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 }); }
|
|
2181
|
-
}
|
|
2182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageSummaryComponent, decorators: [{
|
|
2183
|
-
type: Component,
|
|
2184
|
-
args: [{ selector: 'sky-docs-demo-page-summary', changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
2185
|
-
}] });
|
|
2186
|
-
|
|
2187
|
-
class SkyDocsDesignGuidelinesComponent {
|
|
2188
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDesignGuidelinesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2189
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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 }); }
|
|
2190
|
-
}
|
|
2191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDesignGuidelinesComponent, decorators: [{
|
|
2192
|
-
type: Component,
|
|
2193
|
-
args: [{ selector: 'sky-docs-design-guidelines', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sky-docs-design-guidelines\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
2194
|
-
}] });
|
|
2195
|
-
|
|
2196
|
-
/**
|
|
2197
|
-
* @internal
|
|
2198
|
-
*/
|
|
2199
|
-
class SkyDocsDemoPageDomAdapterService {
|
|
2200
|
-
get anchorLinks() {
|
|
2201
|
-
return document.querySelectorAll('a.sky-docs-anchor-link');
|
|
2202
|
-
}
|
|
2203
|
-
get currentUrl() {
|
|
2204
|
-
return this.windowRef.nativeWindow.location.href.split('#')[0];
|
|
2205
|
-
}
|
|
2206
|
-
constructor(windowRef) {
|
|
2207
|
-
this.windowRef = windowRef;
|
|
2208
|
-
this._anchorLinkClick = new Subject();
|
|
2209
|
-
this.eventListener = (e) => {
|
|
2210
|
-
e.preventDefault();
|
|
2211
|
-
this._anchorLinkClick.next({
|
|
2212
|
-
href: e.target.href,
|
|
2213
|
-
});
|
|
2214
|
-
};
|
|
2215
|
-
}
|
|
2216
|
-
ngOnDestroy() {
|
|
2217
|
-
this.removeClickEventListeners();
|
|
2218
|
-
}
|
|
2219
|
-
setupAnchorLinks() {
|
|
2220
|
-
for (let index = 0; index < this.anchorLinks.length; index++) {
|
|
2221
|
-
const anchor = this.anchorLinks[index];
|
|
2222
|
-
const fragment = anchor.href.split('#')[1];
|
|
2223
|
-
const url = this.currentUrl;
|
|
2224
|
-
const href = `${url}#${fragment}`;
|
|
2225
|
-
anchor.href = href;
|
|
2226
|
-
}
|
|
2227
|
-
}
|
|
2228
|
-
get anchorLinkClick() {
|
|
2229
|
-
if (this._anchorLinkClick.observers.length === 0) {
|
|
2230
|
-
this.addClickEventListeners();
|
|
2231
|
-
}
|
|
2232
|
-
else {
|
|
2233
|
-
this.removeClickEventListeners();
|
|
2234
|
-
}
|
|
2235
|
-
return this._anchorLinkClick;
|
|
2236
|
-
}
|
|
2237
|
-
scrollToFragment(fragment) {
|
|
2238
|
-
this.windowRef.nativeWindow.setTimeout(() => {
|
|
2239
|
-
const element = document.getElementById(fragment);
|
|
2240
|
-
if (element) {
|
|
2241
|
-
this.windowRef.nativeWindow.scrollTo(0, element.offsetTop);
|
|
2242
|
-
}
|
|
2243
|
-
}, 250);
|
|
2244
|
-
}
|
|
2245
|
-
addClickEventListeners() {
|
|
2246
|
-
// Wait for a tick to allow all anchors to be written.
|
|
2247
|
-
this.windowRef.nativeWindow.setTimeout(() => {
|
|
2248
|
-
for (let index = 0; index < this.anchorLinks.length; index++) {
|
|
2249
|
-
const anchor = this.anchorLinks[index];
|
|
2250
|
-
anchor.addEventListener('click', this.eventListener);
|
|
2251
|
-
}
|
|
2252
|
-
});
|
|
2253
|
-
}
|
|
2254
|
-
removeClickEventListeners() {
|
|
2255
|
-
for (let index = 0; index < this.anchorLinks.length; index++) {
|
|
2256
|
-
const anchor = this.anchorLinks[index];
|
|
2257
|
-
anchor.removeEventListener('click', this.eventListener);
|
|
2258
|
-
}
|
|
2259
|
-
}
|
|
2260
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageDomAdapterService, deps: [{ token: i2.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2261
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageDomAdapterService }); }
|
|
2262
|
-
}
|
|
2263
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageDomAdapterService, decorators: [{
|
|
2264
|
-
type: Injectable
|
|
2265
|
-
}], ctorParameters: () => [{ type: i2.SkyAppWindowRef }] });
|
|
2266
|
-
|
|
2267
|
-
class SkyDocsToolsSiteOptions {
|
|
2268
|
-
}
|
|
2269
|
-
|
|
2270
|
-
class SkyDocsSupportalService {
|
|
2271
|
-
constructor(http) {
|
|
2272
|
-
this.http = http;
|
|
2273
|
-
}
|
|
2274
|
-
getComponentsInfo() {
|
|
2275
|
-
return this.http
|
|
2276
|
-
.get('https://sky-pusa01.app.blackbaud.net/skysp/v1/docs/components-info')
|
|
2277
|
-
.pipe(map((results) => results.components), share());
|
|
2278
|
-
}
|
|
2279
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsSupportalService, deps: [{ token: i1$6.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2280
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsSupportalService, providedIn: 'root' }); }
|
|
2281
|
-
}
|
|
2282
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsSupportalService, decorators: [{
|
|
2283
|
-
type: Injectable,
|
|
2284
|
-
args: [{
|
|
2285
|
-
providedIn: 'root',
|
|
2286
|
-
}]
|
|
2287
|
-
}], ctorParameters: () => [{ type: i1$6.HttpClient }] });
|
|
2288
|
-
|
|
2289
527
|
/**
|
|
2290
528
|
* @internal
|
|
2291
529
|
*/
|
|
2292
|
-
class
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
}
|
|
2296
|
-
setTitle(...parts) {
|
|
2297
|
-
let windowTitle = 'SKY UX';
|
|
2298
|
-
if (parts && parts.length > 0) {
|
|
2299
|
-
parts.push(windowTitle);
|
|
2300
|
-
windowTitle = parts.join(' - ');
|
|
2301
|
-
}
|
|
2302
|
-
this.title.setTitle(windowTitle);
|
|
2303
|
-
}
|
|
2304
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageTitleService, deps: [{ token: i1$4.Title }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2305
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageTitleService, providedIn: 'root' }); }
|
|
2306
|
-
}
|
|
2307
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageTitleService, decorators: [{
|
|
2308
|
-
type: Injectable,
|
|
2309
|
-
args: [{
|
|
2310
|
-
providedIn: 'root',
|
|
2311
|
-
}]
|
|
2312
|
-
}], ctorParameters: () => [{ type: i1$4.Title }] });
|
|
2313
|
-
|
|
2314
|
-
/**
|
|
2315
|
-
* This enum comes from:
|
|
2316
|
-
* https://github.com/TypeStrong/typedoc/blob/v0.25.13/src/lib/models/reflections/kind.ts
|
|
2317
|
-
* The enum is up to date as of version `0.25.13`.
|
|
2318
|
-
*/
|
|
2319
|
-
var TypeDocKind;
|
|
2320
|
-
(function (TypeDocKind) {
|
|
2321
|
-
TypeDocKind[TypeDocKind["Project"] = 1] = "Project";
|
|
2322
|
-
TypeDocKind[TypeDocKind["Module"] = 2] = "Module";
|
|
2323
|
-
TypeDocKind[TypeDocKind["Namespace"] = 4] = "Namespace";
|
|
2324
|
-
TypeDocKind[TypeDocKind["Enum"] = 8] = "Enum";
|
|
2325
|
-
TypeDocKind[TypeDocKind["EnumMember"] = 16] = "EnumMember";
|
|
2326
|
-
TypeDocKind[TypeDocKind["Variable"] = 32] = "Variable";
|
|
2327
|
-
TypeDocKind[TypeDocKind["Function"] = 64] = "Function";
|
|
2328
|
-
TypeDocKind[TypeDocKind["Class"] = 128] = "Class";
|
|
2329
|
-
TypeDocKind[TypeDocKind["Interface"] = 256] = "Interface";
|
|
2330
|
-
TypeDocKind[TypeDocKind["Constructor"] = 512] = "Constructor";
|
|
2331
|
-
TypeDocKind[TypeDocKind["Property"] = 1024] = "Property";
|
|
2332
|
-
TypeDocKind[TypeDocKind["Method"] = 2048] = "Method";
|
|
2333
|
-
TypeDocKind[TypeDocKind["CallSignature"] = 4096] = "CallSignature";
|
|
2334
|
-
TypeDocKind[TypeDocKind["IndexSignature"] = 8192] = "IndexSignature";
|
|
2335
|
-
TypeDocKind[TypeDocKind["ConstructorSignature"] = 16384] = "ConstructorSignature";
|
|
2336
|
-
TypeDocKind[TypeDocKind["Parameter"] = 32768] = "Parameter";
|
|
2337
|
-
TypeDocKind[TypeDocKind["TypeLiteral"] = 65536] = "TypeLiteral";
|
|
2338
|
-
TypeDocKind[TypeDocKind["TypeParameter"] = 131072] = "TypeParameter";
|
|
2339
|
-
TypeDocKind[TypeDocKind["Accessor"] = 262144] = "Accessor";
|
|
2340
|
-
TypeDocKind[TypeDocKind["GetSignature"] = 524288] = "GetSignature";
|
|
2341
|
-
TypeDocKind[TypeDocKind["SetSignature"] = 1048576] = "SetSignature";
|
|
2342
|
-
TypeDocKind[TypeDocKind["TypeAlias"] = 2097152] = "TypeAlias";
|
|
2343
|
-
TypeDocKind[TypeDocKind["Reference"] = 4194304] = "Reference";
|
|
2344
|
-
})(TypeDocKind || (TypeDocKind = {}));
|
|
2345
|
-
|
|
2346
|
-
/**
|
|
2347
|
-
* Converts TypeDoc types into SKY UX docs-tools types, to be supplied to the various definitions components.
|
|
2348
|
-
*/
|
|
2349
|
-
class SkyDocsTypeDocAdapterService {
|
|
2350
|
-
constructor(typeDefinitionsProvider) {
|
|
2351
|
-
this.typeDefinitionsProvider = typeDefinitionsProvider;
|
|
2352
|
-
}
|
|
2353
|
-
toClassDefinition(entry) {
|
|
2354
|
-
const definition = {
|
|
2355
|
-
anchorId: this.getAnchorId(entry),
|
|
2356
|
-
name: entry.name,
|
|
2357
|
-
hasPreviewFeatures: false,
|
|
2358
|
-
};
|
|
2359
|
-
const tags = this.getCommentTags(entry.comment);
|
|
2360
|
-
this.applyCommentTagValues(definition, tags);
|
|
2361
|
-
const methods = this.getClassMethods(entry);
|
|
2362
|
-
if (methods.length) {
|
|
2363
|
-
definition.methods = methods;
|
|
2364
|
-
}
|
|
2365
|
-
const properties = this.getClassProperties(entry);
|
|
2366
|
-
if (properties.length) {
|
|
2367
|
-
definition.properties = properties;
|
|
2368
|
-
}
|
|
2369
|
-
definition.hasPreviewFeatures =
|
|
2370
|
-
!!definition.methods?.some((method) => method.isPreview) ||
|
|
2371
|
-
!!definition.properties?.some((property) => property.isPreview);
|
|
2372
|
-
return definition;
|
|
2373
|
-
}
|
|
2374
|
-
toDirectiveDefinition(entry) {
|
|
2375
|
-
const definition = {
|
|
2376
|
-
anchorId: this.getAnchorId(entry),
|
|
2377
|
-
name: entry.name,
|
|
2378
|
-
selector: this.getSelector(entry),
|
|
2379
|
-
hasPreviewFeatures: false,
|
|
2380
|
-
};
|
|
2381
|
-
const tags = this.getCommentTags(entry.comment);
|
|
2382
|
-
this.applyCommentTagValues(definition, tags);
|
|
2383
|
-
const properties = this.getClassProperties(entry);
|
|
2384
|
-
const eventProperties = properties.filter((p) => p.decorator?.name === 'Output');
|
|
2385
|
-
if (eventProperties.length) {
|
|
2386
|
-
definition.eventProperties = eventProperties;
|
|
2387
|
-
}
|
|
2388
|
-
const inputProperties = properties.filter((p) => this.#isInputProperty(p));
|
|
2389
|
-
if (inputProperties.length) {
|
|
2390
|
-
definition.inputProperties = inputProperties;
|
|
2391
|
-
}
|
|
2392
|
-
definition.hasPreviewFeatures =
|
|
2393
|
-
!!definition.inputProperties?.some((property) => property.isPreview) ||
|
|
2394
|
-
!!definition.eventProperties?.some((property) => property.isPreview);
|
|
2395
|
-
return definition;
|
|
2396
|
-
}
|
|
2397
|
-
toEnumerationDefinition(entry) {
|
|
2398
|
-
const members = this.getEnumerationMembers(entry);
|
|
2399
|
-
const definition = {
|
|
2400
|
-
anchorId: this.getAnchorId(entry),
|
|
2401
|
-
members,
|
|
2402
|
-
name: entry.name,
|
|
2403
|
-
hasPreviewFeatures: !!members.find((member) => member.isPreview),
|
|
2404
|
-
};
|
|
2405
|
-
const tags = this.getCommentTags(entry.comment);
|
|
2406
|
-
this.applyCommentTagValues(definition, tags);
|
|
2407
|
-
return definition;
|
|
2408
|
-
}
|
|
2409
|
-
toInterfaceDefinition(entry) {
|
|
2410
|
-
const properties = this.getInterfaceProperties(entry);
|
|
2411
|
-
const definition = {
|
|
2412
|
-
anchorId: this.getAnchorId(entry),
|
|
2413
|
-
name: entry.name,
|
|
2414
|
-
hasPreviewFeatures: !!properties.find((member) => member.isPreview),
|
|
2415
|
-
properties,
|
|
2416
|
-
};
|
|
2417
|
-
const tags = this.getCommentTags(entry.comment);
|
|
2418
|
-
this.applyCommentTagValues(definition, tags);
|
|
2419
|
-
const typeParameters = this.getTypeParameterDefinitions(entry.typeParameters);
|
|
2420
|
-
if (typeParameters.length) {
|
|
2421
|
-
definition.typeParameters = typeParameters;
|
|
2422
|
-
}
|
|
2423
|
-
return definition;
|
|
2424
|
-
}
|
|
2425
|
-
toPipeDefinition(entry) {
|
|
2426
|
-
const methods = this.getClassMethods(entry);
|
|
2427
|
-
const transformMethod = methods.find((m) => m.name === 'transform');
|
|
2428
|
-
const definition = {
|
|
2429
|
-
anchorId: this.getAnchorId(entry),
|
|
2430
|
-
name: entry.name,
|
|
2431
|
-
transformMethod,
|
|
2432
|
-
};
|
|
2433
|
-
const tags = this.getCommentTags(entry.comment);
|
|
2434
|
-
this.applyCommentTagValues(definition, tags);
|
|
2435
|
-
return definition;
|
|
2436
|
-
}
|
|
2437
|
-
toTypeAliasDefinition(entry) {
|
|
2438
|
-
const definition = {
|
|
2439
|
-
anchorId: this.getAnchorId(entry),
|
|
2440
|
-
name: entry.name,
|
|
2441
|
-
isPreview: false,
|
|
2442
|
-
type: this.getTypeDefinition({
|
|
2443
|
-
comment: entry.comment,
|
|
2444
|
-
type: entry.type,
|
|
2445
|
-
}),
|
|
2446
|
-
};
|
|
2447
|
-
const tags = this.getCommentTags(entry.type.declaration?.signatures
|
|
2448
|
-
? entry.type.declaration.signatures[0].comment
|
|
2449
|
-
: entry.comment);
|
|
2450
|
-
this.applyCommentTagValues(definition, tags);
|
|
2451
|
-
const typeParameters = this.getTypeParameterDefinitions(entry.typeParameters);
|
|
2452
|
-
if (typeParameters.length) {
|
|
2453
|
-
definition.typeParameters = typeParameters;
|
|
2454
|
-
}
|
|
2455
|
-
return definition;
|
|
2456
|
-
}
|
|
2457
|
-
getSelector(entry) {
|
|
2458
|
-
const decoratorSource = entry.decorators[0].arguments.obj;
|
|
2459
|
-
return decoratorSource.indexOf('selector: `') > -1
|
|
2460
|
-
? decoratorSource
|
|
2461
|
-
.split('selector: `')[1]
|
|
2462
|
-
.split('`')[0]
|
|
2463
|
-
.replace(/\s\s+/g, ' ')
|
|
2464
|
-
: decoratorSource.split("selector: '")[1].split("'")[0];
|
|
2465
|
-
}
|
|
2466
|
-
getClassProperties(entry) {
|
|
2467
|
-
if (!entry.children) {
|
|
2468
|
-
return [];
|
|
2469
|
-
}
|
|
2470
|
-
const definitions = entry.children
|
|
2471
|
-
.filter((child) =>
|
|
2472
|
-
// We only want properties (both with or without a getter/setter)
|
|
2473
|
-
child.kind === TypeDocKind.Property ||
|
|
2474
|
-
child.kind === TypeDocKind.Accessor)
|
|
2475
|
-
.filter((child) =>
|
|
2476
|
-
// We only want accessors that don't have a setter if they are not inputs
|
|
2477
|
-
child.kind !== TypeDocKind.Accessor ||
|
|
2478
|
-
child.setSignature ||
|
|
2479
|
-
this.getDecorator(child)?.name !== 'Input')
|
|
2480
|
-
.map((child) => {
|
|
2481
|
-
let definition = {
|
|
2482
|
-
isOptional: true,
|
|
2483
|
-
isPreview: false,
|
|
2484
|
-
name: this.getPropertyName(child),
|
|
2485
|
-
type: this.getTypeDefinition(child),
|
|
2486
|
-
};
|
|
2487
|
-
let defaultValue;
|
|
2488
|
-
/* Ensure we are properly capturing definitions which use a getter/setter. Final check is a sanity check */
|
|
2489
|
-
if (child.kind === TypeDocKind.Accessor &&
|
|
2490
|
-
!child.comment?.summary
|
|
2491
|
-
?.map((item) => item.text)
|
|
2492
|
-
.join('')
|
|
2493
|
-
.trim() &&
|
|
2494
|
-
(child.setSignature || child.getSignature)) {
|
|
2495
|
-
const mainTags = this.getCommentTags(child.comment);
|
|
2496
|
-
this.applyCommentTagValues(definition, mainTags);
|
|
2497
|
-
if (child.getSignature) {
|
|
2498
|
-
const getTags = this.getCommentTags(child.getSignature.comment);
|
|
2499
|
-
definition.isOptional = !getTags.extras.required;
|
|
2500
|
-
this.applyCommentTagValues(definition, getTags);
|
|
2501
|
-
defaultValue = this.getDefaultValue(child, getTags);
|
|
2502
|
-
}
|
|
2503
|
-
if (child.setSignature) {
|
|
2504
|
-
const setTags = this.getCommentTags(child.setSignature.comment);
|
|
2505
|
-
this.applyCommentTagValues(definition, setTags);
|
|
2506
|
-
definition.isOptional =
|
|
2507
|
-
definition.isOptional && !setTags.extras.required;
|
|
2508
|
-
defaultValue = defaultValue || this.getDefaultValue(child, setTags);
|
|
2509
|
-
}
|
|
2510
|
-
else {
|
|
2511
|
-
definition.isOptional = !mainTags.extras.required;
|
|
2512
|
-
defaultValue = this.getDefaultValue(child, mainTags);
|
|
2513
|
-
}
|
|
2514
|
-
}
|
|
2515
|
-
else {
|
|
2516
|
-
let tags;
|
|
2517
|
-
if (child.kind === TypeDocKind.Property &&
|
|
2518
|
-
!child.comment?.summary
|
|
2519
|
-
?.map((item) => item.text)
|
|
2520
|
-
.join('')
|
|
2521
|
-
.trim() &&
|
|
2522
|
-
child.type.declaration?.signatures?.length > 0 &&
|
|
2523
|
-
child.type.declaration.signatures[0].comment) {
|
|
2524
|
-
tags = this.getCommentTags(child.type.declaration.signatures[0].comment);
|
|
2525
|
-
definition.isOptional = !tags.extras.required;
|
|
2526
|
-
this.applyCommentTagValues(definition, tags);
|
|
2527
|
-
}
|
|
2528
|
-
tags = this.getCommentTags(child.comment);
|
|
2529
|
-
definition.isOptional =
|
|
2530
|
-
definition.isOptional && !tags.extras.required;
|
|
2531
|
-
this.applyCommentTagValues(definition, tags);
|
|
2532
|
-
defaultValue = this.getDefaultValue(child, tags);
|
|
2533
|
-
}
|
|
2534
|
-
if (defaultValue) {
|
|
2535
|
-
definition.defaultValue = defaultValue;
|
|
2536
|
-
}
|
|
2537
|
-
const decorator = this.getDecorator(child);
|
|
2538
|
-
if (decorator) {
|
|
2539
|
-
definition.decorator = decorator;
|
|
2540
|
-
}
|
|
2541
|
-
if (!definition.description) {
|
|
2542
|
-
const constructor = entry.children.find((child) => child.kind === TypeDocKind.Constructor);
|
|
2543
|
-
if (constructor) {
|
|
2544
|
-
const signature = constructor.signatures.find((signature) => signature.kind === TypeDocKind.ConstructorSignature);
|
|
2545
|
-
/* Sanity check */
|
|
2546
|
-
/* istanbul ignore else */
|
|
2547
|
-
if (signature) {
|
|
2548
|
-
const matchingParam = signature.parameters?.find((parameter) => parameter.name === child.name);
|
|
2549
|
-
if (matchingParam) {
|
|
2550
|
-
const matchingParamTags = this.getCommentTags(matchingParam.comment);
|
|
2551
|
-
this.applyCommentTagValues(definition, matchingParamTags);
|
|
2552
|
-
}
|
|
2553
|
-
}
|
|
2554
|
-
}
|
|
2555
|
-
}
|
|
2556
|
-
return definition;
|
|
2557
|
-
});
|
|
2558
|
-
return orderBy(definitions, ['isOptional', 'name'], ['asc', 'asc']);
|
|
2559
|
-
}
|
|
2560
|
-
getClassMethods(entry) {
|
|
2561
|
-
if (!entry.children) {
|
|
2562
|
-
return [];
|
|
2563
|
-
}
|
|
2564
|
-
const methods = entry.children
|
|
2565
|
-
.filter((child) => child.kind === TypeDocKind.Method && /^ng/.test(child.name) === false)
|
|
2566
|
-
.map((child) => {
|
|
2567
|
-
const definition = {
|
|
2568
|
-
name: this.getPropertyName(child),
|
|
2569
|
-
type: this.getTypeDefinition(child),
|
|
2570
|
-
isStatic: !!child.flags?.isStatic,
|
|
2571
|
-
isPreview: false,
|
|
2572
|
-
parentName: entry.name,
|
|
2573
|
-
};
|
|
2574
|
-
// Comments for methods are stored in a different location.
|
|
2575
|
-
const comment = child.signatures[0].comment;
|
|
2576
|
-
const tags = this.getCommentTags(comment);
|
|
2577
|
-
this.applyCommentTagValues(definition, tags);
|
|
2578
|
-
const typeParameters = this.getTypeParameterDefinitions(child.signatures[0].typeParameters);
|
|
2579
|
-
if (typeParameters.length) {
|
|
2580
|
-
definition.typeParameters = typeParameters;
|
|
2581
|
-
}
|
|
2582
|
-
return definition;
|
|
2583
|
-
});
|
|
2584
|
-
return orderBy(methods, ['name'], ['asc']);
|
|
2585
|
-
}
|
|
2586
|
-
getInterfaceProperties(entry) {
|
|
2587
|
-
if (!entry.children && !entry.indexSignature) {
|
|
2588
|
-
return [];
|
|
2589
|
-
}
|
|
2590
|
-
const definitions = entry.children?.map((child) => {
|
|
2591
|
-
let tags;
|
|
2592
|
-
if (child.kind === TypeDocKind.Method && child.signatures.length > 0) {
|
|
2593
|
-
tags = this.getCommentTags(child.signatures[0].comment);
|
|
2594
|
-
}
|
|
2595
|
-
else if (child.type.type === 'reflection' &&
|
|
2596
|
-
child.type?.declaration?.signatures?.length > 0) {
|
|
2597
|
-
tags = this.getCommentTags(child.type.declaration.signatures[0].comment);
|
|
2598
|
-
}
|
|
2599
|
-
else {
|
|
2600
|
-
tags = this.getCommentTags(child.comment);
|
|
2601
|
-
}
|
|
2602
|
-
const definition = {
|
|
2603
|
-
isOptional: tags.extras.required ? false : !!child.flags?.isOptional,
|
|
2604
|
-
isPreview: false,
|
|
2605
|
-
name: this.getPropertyName(child),
|
|
2606
|
-
type: this.getTypeDefinition(child),
|
|
2607
|
-
};
|
|
2608
|
-
this.applyCommentTagValues(definition, tags);
|
|
2609
|
-
return definition;
|
|
2610
|
-
}) || [];
|
|
2611
|
-
const sorted = orderBy(definitions, ['isOptional', 'name'], ['asc', 'asc']);
|
|
2612
|
-
// Add any index signatures, e.g. `[_: string]: any`
|
|
2613
|
-
if (entry.indexSignature) {
|
|
2614
|
-
const indexSignature = entry.indexSignature;
|
|
2615
|
-
const definition = {
|
|
2616
|
-
isOptional: true,
|
|
2617
|
-
isPreview: false,
|
|
2618
|
-
name: indexSignature.name,
|
|
2619
|
-
type: {
|
|
2620
|
-
indexSignature: this.getIndexSignatureDefinition(indexSignature),
|
|
2621
|
-
},
|
|
2622
|
-
};
|
|
2623
|
-
// New versions of typedoc do not seem to add the comment for index signatures - the else statement is a default based on the only index signature we had in September 2023 (SkySelectField).
|
|
2624
|
-
if (indexSignature.comment) {
|
|
2625
|
-
const tags = this.getCommentTags(indexSignature.comment);
|
|
2626
|
-
this.applyCommentTagValues(definition, tags);
|
|
2627
|
-
}
|
|
2628
|
-
else {
|
|
2629
|
-
definition.description = 'All other properties for an item.';
|
|
2630
|
-
}
|
|
2631
|
-
sorted.push(definition);
|
|
2632
|
-
}
|
|
2633
|
-
return sorted;
|
|
2634
|
-
}
|
|
2635
|
-
getEnumerationMembers(entry) {
|
|
2636
|
-
if (!entry.children) {
|
|
2637
|
-
return [];
|
|
2638
|
-
}
|
|
2639
|
-
return entry.children.map((child) => {
|
|
2640
|
-
const definition = {
|
|
2641
|
-
name: child.name,
|
|
2642
|
-
isPreview: false,
|
|
2643
|
-
};
|
|
2644
|
-
const tags = this.getCommentTags(child.comment);
|
|
2645
|
-
this.applyCommentTagValues(definition, tags);
|
|
2646
|
-
return definition;
|
|
2647
|
-
});
|
|
2648
|
-
}
|
|
2649
|
-
getTypeDefinition(child) {
|
|
2650
|
-
let definition;
|
|
2651
|
-
const kind = child.kind;
|
|
2652
|
-
switch (kind) {
|
|
2653
|
-
case TypeDocKind.Accessor:
|
|
2654
|
-
if (child.setSignature) {
|
|
2655
|
-
return this.getTypeDefinition(child.setSignature.parameters[0]);
|
|
2656
|
-
}
|
|
2657
|
-
return this.getTypeDefinition(child.getSignature);
|
|
2658
|
-
case TypeDocKind.Method:
|
|
2659
|
-
definition = {
|
|
2660
|
-
callSignature: this.getCallSignatureDefinition(child.signatures[0], this.getCommentTags(child.comment)),
|
|
2661
|
-
name: child.signatures[0].name,
|
|
2662
|
-
};
|
|
2663
|
-
return definition;
|
|
2664
|
-
default:
|
|
2665
|
-
let name = child.type.name || child.type.elementType?.name || child.type.value;
|
|
2666
|
-
definition = {
|
|
2667
|
-
type: child.type.type,
|
|
2668
|
-
};
|
|
2669
|
-
if (name) {
|
|
2670
|
-
definition.name = name;
|
|
2671
|
-
}
|
|
2672
|
-
// Union?
|
|
2673
|
-
if (child.type.types) {
|
|
2674
|
-
definition.unionTypes = child.type.types.map((t) => this.getTypeDefinition({ type: t }));
|
|
2675
|
-
}
|
|
2676
|
-
// Convert reflection types.
|
|
2677
|
-
if (child.type.type === 'reflection' ||
|
|
2678
|
-
child.type.elementType?.type === 'reflection') {
|
|
2679
|
-
const declaration = child.type.elementType?.type === 'reflection'
|
|
2680
|
-
? child.type.elementType.declaration
|
|
2681
|
-
: child.type.declaration;
|
|
2682
|
-
/*istanbul ignore else */
|
|
2683
|
-
if (declaration) {
|
|
2684
|
-
if (declaration.signatures) {
|
|
2685
|
-
definition.callSignature = this.getCallSignatureDefinition(declaration.signatures[0], this.getCommentTags(child.comment));
|
|
2686
|
-
}
|
|
2687
|
-
else if (declaration.indexSignature) {
|
|
2688
|
-
const indexSignature = declaration.indexSignature;
|
|
2689
|
-
definition.indexSignature =
|
|
2690
|
-
this.getIndexSignatureDefinition(indexSignature);
|
|
2691
|
-
} /* istanbul ignore else */
|
|
2692
|
-
else if (declaration.children) {
|
|
2693
|
-
definition.typeLiteral = {
|
|
2694
|
-
properties: this.getInterfaceProperties({
|
|
2695
|
-
children: declaration.children,
|
|
2696
|
-
}),
|
|
2697
|
-
};
|
|
2698
|
-
}
|
|
2699
|
-
}
|
|
2700
|
-
}
|
|
2701
|
-
if (child.type.type === 'typeOperator') {
|
|
2702
|
-
definition.name = `${child.type.operator} ${child.type.target.name}`;
|
|
2703
|
-
}
|
|
2704
|
-
if (child.type.typeArguments) {
|
|
2705
|
-
definition.typeArguments = this.getTypeArgumentDefinitions(child.type);
|
|
2706
|
-
}
|
|
2707
|
-
if (child.type.package) {
|
|
2708
|
-
definition.package = child.type.package;
|
|
2709
|
-
}
|
|
2710
|
-
return definition;
|
|
2711
|
-
}
|
|
2712
|
-
}
|
|
2713
|
-
getParameterDefinitions(callSignature, parentTags) {
|
|
2714
|
-
if (!callSignature.parameters) {
|
|
2715
|
-
return [];
|
|
2716
|
-
}
|
|
2717
|
-
const parameters = callSignature.parameters.map((p) => {
|
|
2718
|
-
const tags = this.getParameterCommentTags(p, parentTags);
|
|
2719
|
-
const defaultValue = this.getDefaultValue(p, tags);
|
|
2720
|
-
const typeArguments = this.getTypeArgumentDefinitions(p.type);
|
|
2721
|
-
const parameter = {
|
|
2722
|
-
isOptional: !!(defaultValue || !!p.flags?.isOptional),
|
|
2723
|
-
name: p.name,
|
|
2724
|
-
type: this.getTypeDefinition(p),
|
|
2725
|
-
};
|
|
2726
|
-
if (defaultValue !== undefined) {
|
|
2727
|
-
parameter.defaultValue = defaultValue;
|
|
2728
|
-
}
|
|
2729
|
-
if (tags.description) {
|
|
2730
|
-
parameter.description = tags.description;
|
|
2731
|
-
}
|
|
2732
|
-
if (typeArguments.length) {
|
|
2733
|
-
parameter.typeArguments = typeArguments;
|
|
2734
|
-
}
|
|
2735
|
-
return parameter;
|
|
2736
|
-
});
|
|
2737
|
-
return parameters;
|
|
2738
|
-
}
|
|
2739
|
-
getTypeArgumentDefinitions(typeConfig) {
|
|
2740
|
-
if (!typeConfig || !typeConfig.typeArguments) {
|
|
2741
|
-
return [];
|
|
2742
|
-
}
|
|
2743
|
-
return typeConfig.typeArguments.map((typeArgument) => {
|
|
2744
|
-
return this.getTypeDefinition({ type: typeArgument });
|
|
2745
|
-
});
|
|
2746
|
-
}
|
|
2747
|
-
getCallSignatureDefinition(callSignature, tags) {
|
|
2748
|
-
const definition = {
|
|
2749
|
-
returnType: this.getTypeDefinition(callSignature),
|
|
2750
|
-
};
|
|
2751
|
-
const parameters = this.getParameterDefinitions(callSignature, tags);
|
|
2752
|
-
if (parameters.length) {
|
|
2753
|
-
definition.parameters = parameters;
|
|
2754
|
-
}
|
|
2755
|
-
return definition;
|
|
2756
|
-
}
|
|
2757
|
-
getIndexSignatureDefinition(signature) {
|
|
2758
|
-
return {
|
|
2759
|
-
key: {
|
|
2760
|
-
name: signature.parameters[0].name,
|
|
2761
|
-
type: this.getTypeDefinition(signature.parameters[0]),
|
|
2762
|
-
},
|
|
2763
|
-
type: this.getTypeDefinition(signature),
|
|
2764
|
-
};
|
|
2765
|
-
}
|
|
2766
|
-
getTypeParameterDefinitions(typeParameters) {
|
|
2767
|
-
if (!typeParameters) {
|
|
2768
|
-
return [];
|
|
2769
|
-
}
|
|
2770
|
-
return typeParameters.map((typeParam) => {
|
|
2771
|
-
const definition = {
|
|
2772
|
-
name: typeParam.name,
|
|
2773
|
-
};
|
|
2774
|
-
if (typeParam.type) {
|
|
2775
|
-
definition.type = this.getTypeDefinition({
|
|
2776
|
-
type: typeParam.type,
|
|
2777
|
-
});
|
|
2778
|
-
}
|
|
2779
|
-
return definition;
|
|
2780
|
-
});
|
|
2781
|
-
}
|
|
2782
|
-
getCommentTags(comment) {
|
|
2783
|
-
let codeExample;
|
|
2784
|
-
let codeExampleLanguage = 'markup';
|
|
2785
|
-
let deprecationWarning;
|
|
2786
|
-
let defaultValue;
|
|
2787
|
-
let description = '';
|
|
2788
|
-
let parameters;
|
|
2789
|
-
const extras = {};
|
|
2790
|
-
if (comment) {
|
|
2791
|
-
if (comment.blockTags) {
|
|
2792
|
-
comment.blockTags.forEach((tag) => {
|
|
2793
|
-
switch (tag.tag) {
|
|
2794
|
-
case '@deprecated':
|
|
2795
|
-
deprecationWarning = tag.content
|
|
2796
|
-
.map((item) => item.text)
|
|
2797
|
-
.join('')
|
|
2798
|
-
.trim();
|
|
2799
|
-
break;
|
|
2800
|
-
case '@default':
|
|
2801
|
-
case '@defaultValue':
|
|
2802
|
-
defaultValue = tag.content
|
|
2803
|
-
.map((item) => item.text)
|
|
2804
|
-
.join('')
|
|
2805
|
-
.trim();
|
|
2806
|
-
if (tag.content[0].kind === 'code') {
|
|
2807
|
-
defaultValue = defaultValue.split('```')[1].trim();
|
|
2808
|
-
const defaultLanguage = defaultValue.split('\n')[0];
|
|
2809
|
-
if (defaultLanguage === 'markup' ||
|
|
2810
|
-
defaultLanguage === 'typescript' ||
|
|
2811
|
-
defaultLanguage === 'ts') {
|
|
2812
|
-
defaultValue = defaultValue
|
|
2813
|
-
.slice(defaultLanguage.length)
|
|
2814
|
-
.trim();
|
|
2815
|
-
}
|
|
2816
|
-
}
|
|
2817
|
-
break;
|
|
2818
|
-
case '@example':
|
|
2819
|
-
codeExample = tag.content
|
|
2820
|
-
.map((item) => item.text)
|
|
2821
|
-
.join('')
|
|
2822
|
-
.trim()
|
|
2823
|
-
.split('```')[1]
|
|
2824
|
-
.trim();
|
|
2825
|
-
const exampleLanguage = codeExample.split('\n')[0];
|
|
2826
|
-
if (exampleLanguage === 'markup' ||
|
|
2827
|
-
exampleLanguage === 'typescript' ||
|
|
2828
|
-
exampleLanguage === 'ts') {
|
|
2829
|
-
codeExample = codeExample.slice(exampleLanguage.length).trim();
|
|
2830
|
-
codeExampleLanguage = exampleLanguage;
|
|
2831
|
-
}
|
|
2832
|
-
break;
|
|
2833
|
-
case '@param':
|
|
2834
|
-
parameters = parameters || [];
|
|
2835
|
-
parameters.push({
|
|
2836
|
-
name: tag.param,
|
|
2837
|
-
description: tag.content
|
|
2838
|
-
.map((item) => item.text)
|
|
2839
|
-
.join('')
|
|
2840
|
-
.trim(),
|
|
2841
|
-
});
|
|
2842
|
-
break;
|
|
2843
|
-
case '@preview':
|
|
2844
|
-
extras['preview'] = true;
|
|
2845
|
-
break;
|
|
2846
|
-
case '@required':
|
|
2847
|
-
extras['required'] = true;
|
|
2848
|
-
break;
|
|
2849
|
-
/* istanbul ignore next */
|
|
2850
|
-
default:
|
|
2851
|
-
break;
|
|
2852
|
-
}
|
|
2853
|
-
});
|
|
2854
|
-
}
|
|
2855
|
-
description = comment.summary
|
|
2856
|
-
?.map((item) => item.text)
|
|
2857
|
-
.join('')
|
|
2858
|
-
.trim();
|
|
2859
|
-
}
|
|
2860
|
-
return {
|
|
2861
|
-
codeExample,
|
|
2862
|
-
codeExampleLanguage,
|
|
2863
|
-
defaultValue,
|
|
2864
|
-
deprecationWarning,
|
|
2865
|
-
description,
|
|
2866
|
-
extras,
|
|
2867
|
-
parameters,
|
|
2868
|
-
};
|
|
2869
|
-
}
|
|
2870
|
-
/**
|
|
2871
|
-
* Parameter descriptions are derived from the parent's (function/method) comment.
|
|
2872
|
-
*/
|
|
2873
|
-
getParameterCommentTags(parameter, parentTags) {
|
|
2874
|
-
const tags = this.getCommentTags(parameter.comment);
|
|
2875
|
-
const paramTags = parentTags.parameters;
|
|
2876
|
-
const tagParam = paramTags
|
|
2877
|
-
? paramTags.find((param) => param.name === parameter.name)
|
|
2878
|
-
: undefined;
|
|
2879
|
-
if (!tagParam || !tagParam.description) {
|
|
2880
|
-
return tags;
|
|
2881
|
-
}
|
|
2882
|
-
return {
|
|
2883
|
-
...tags,
|
|
2884
|
-
...{
|
|
2885
|
-
description: tagParam.description,
|
|
2886
|
-
},
|
|
2887
|
-
};
|
|
2888
|
-
}
|
|
2889
|
-
/**
|
|
2890
|
-
* Applies comment tag (e.g. `@param`) values to the provided definition, if the value is defined.
|
|
2891
|
-
*/
|
|
2892
|
-
applyCommentTagValues(definition, tags) {
|
|
2893
|
-
if (tags.codeExample) {
|
|
2894
|
-
definition.codeExample = tags.codeExample;
|
|
2895
|
-
definition.codeExampleLanguage = tags.codeExampleLanguage;
|
|
2896
|
-
}
|
|
2897
|
-
if (tags.deprecationWarning !== undefined) {
|
|
2898
|
-
definition.deprecationWarning = tags.deprecationWarning;
|
|
2899
|
-
}
|
|
2900
|
-
if (tags.description) {
|
|
2901
|
-
definition.description = tags.description;
|
|
2902
|
-
}
|
|
2903
|
-
if (tags.extras?.preview) {
|
|
2904
|
-
definition.isPreview = tags.extras?.preview;
|
|
2905
|
-
}
|
|
2906
|
-
}
|
|
2907
|
-
getDecorator(child) {
|
|
2908
|
-
const name = child.decorators && child.decorators[0] && child.decorators[0].name;
|
|
2909
|
-
if (name) {
|
|
2910
|
-
return { name };
|
|
2911
|
-
}
|
|
2912
|
-
}
|
|
2913
|
-
getPropertyName(property) {
|
|
2914
|
-
const decorators = property.decorators && property.decorators[0];
|
|
2915
|
-
// Use the Input's bound property name, if found.
|
|
2916
|
-
// e.g. @Input('foobar')
|
|
2917
|
-
return decorators?.arguments?.bindingPropertyName
|
|
2918
|
-
? decorators.arguments.bindingPropertyName.replace(/(\'|\")/g, '')
|
|
2919
|
-
: property.name;
|
|
2920
|
-
}
|
|
2921
|
-
getDefaultValue(child, tags) {
|
|
2922
|
-
if (tags.defaultValue) {
|
|
2923
|
-
return tags.defaultValue;
|
|
2924
|
-
}
|
|
2925
|
-
// TypeDoc version 0.20.x stopped auto-generating initializers for the default value
|
|
2926
|
-
// (and replaced them with "...") due to the complicated logic it required.
|
|
2927
|
-
// See: https://github.com/TypeStrong/typedoc/issues/1552
|
|
2928
|
-
if (child.defaultValue === '...') {
|
|
2929
|
-
return;
|
|
2930
|
-
}
|
|
2931
|
-
return child.defaultValue;
|
|
2932
|
-
}
|
|
2933
|
-
getAnchorId(entry) {
|
|
2934
|
-
return (entry.anchorId ||
|
|
2935
|
-
this.typeDefinitionsProvider?.anchorIds[entry.name] ||
|
|
2936
|
-
'');
|
|
2937
|
-
}
|
|
2938
|
-
#isInputProperty(property) {
|
|
2939
|
-
return (property.decorator?.name === 'Input' ||
|
|
2940
|
-
(property.type.name === 'InputSignal' &&
|
|
2941
|
-
property.type.package === '@angular/core'));
|
|
2942
|
-
}
|
|
2943
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeDocAdapterService, deps: [{ token: SkyDocsTypeDefinitionsProvider, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2944
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeDocAdapterService, providedIn: 'any' }); }
|
|
2945
|
-
}
|
|
2946
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeDocAdapterService, decorators: [{
|
|
2947
|
-
type: Injectable,
|
|
2948
|
-
args: [{
|
|
2949
|
-
providedIn: 'any',
|
|
2950
|
-
}]
|
|
2951
|
-
}], ctorParameters: () => [{ type: SkyDocsTypeDefinitionsProvider, decorators: [{
|
|
2952
|
-
type: Optional
|
|
2953
|
-
}] }] });
|
|
2954
|
-
|
|
2955
|
-
/**
|
|
2956
|
-
* Handles all type definitions that have been converted from the third-party documentation generator.
|
|
2957
|
-
*/
|
|
2958
|
-
class SkyDocsTypeDefinitionsService {
|
|
2959
|
-
constructor(typeDefinitionsProvider, adapter) {
|
|
2960
|
-
this.typeDefinitionsProvider = typeDefinitionsProvider;
|
|
2961
|
-
this.adapter = adapter;
|
|
2962
|
-
}
|
|
2963
|
-
/**
|
|
2964
|
-
* Returns type definitions from a specific source code location.
|
|
2965
|
-
* @param sourceCodePath The directory of the source code you wish to pull type definitions from,
|
|
2966
|
-
* relative to the application's root directory.
|
|
2967
|
-
*/
|
|
2968
|
-
getTypeDefinitions(sourceCodePath, additionalSourceCodePaths) {
|
|
2969
|
-
if (!sourceCodePath) {
|
|
2970
|
-
throw new Error('The `sourceCodePath` parameter is required');
|
|
2971
|
-
}
|
|
2972
|
-
const sourceCodePaths = additionalSourceCodePaths && additionalSourceCodePaths.length > 0
|
|
2973
|
-
? [sourceCodePath].concat(additionalSourceCodePaths)
|
|
2974
|
-
: [sourceCodePath];
|
|
2975
|
-
sourceCodePaths.forEach((path) => {
|
|
2976
|
-
if (!path.endsWith('/') && !path.endsWith('.ts')) {
|
|
2977
|
-
throw new Error('Source code paths must end with a forward slash (`/`) or `.ts`.');
|
|
2978
|
-
}
|
|
2979
|
-
});
|
|
2980
|
-
const allDefinitions = this.typeDefinitionsProvider.typeDefinitions;
|
|
2981
|
-
const types = {
|
|
2982
|
-
classes: [],
|
|
2983
|
-
components: [],
|
|
2984
|
-
directives: [],
|
|
2985
|
-
enumerations: [],
|
|
2986
|
-
interfaces: [],
|
|
2987
|
-
pipes: [],
|
|
2988
|
-
services: [],
|
|
2989
|
-
typeAliases: [],
|
|
2990
|
-
hasPreviewFeatures: false,
|
|
2991
|
-
};
|
|
2992
|
-
if (!allDefinitions) {
|
|
2993
|
-
console.warn(`No types were found for this project!`);
|
|
2994
|
-
return types;
|
|
2995
|
-
}
|
|
2996
|
-
sourceCodePaths.forEach((path) => {
|
|
2997
|
-
const requestedDir = path
|
|
2998
|
-
.replace(/src\/app\/public\//, '')
|
|
2999
|
-
.replace(/^\//, ''); // remove first slash.
|
|
3000
|
-
// Only process types that match the requested source code location.
|
|
3001
|
-
const typeDefinitions = allDefinitions.filter((i) => i.sources && i.sources[0].fileName.match(requestedDir));
|
|
3002
|
-
if (typeDefinitions.length === 0) {
|
|
3003
|
-
console.warn(`Type definitions were not found for location: ${requestedDir}`);
|
|
3004
|
-
}
|
|
3005
|
-
typeDefinitions.forEach((item) => {
|
|
3006
|
-
const decorator = item.decorators && item.decorators[0]?.name;
|
|
3007
|
-
const kind = item.kind;
|
|
3008
|
-
switch (decorator) {
|
|
3009
|
-
case 'Component':
|
|
3010
|
-
const componentType = this.adapter.toDirectiveDefinition(item);
|
|
3011
|
-
types.components.push(componentType);
|
|
3012
|
-
types.hasPreviewFeatures ||= componentType.hasPreviewFeatures;
|
|
3013
|
-
break;
|
|
3014
|
-
case 'Directive':
|
|
3015
|
-
const directiveType = this.adapter.toDirectiveDefinition(item);
|
|
3016
|
-
types.directives.push(directiveType);
|
|
3017
|
-
types.hasPreviewFeatures ||= directiveType.hasPreviewFeatures;
|
|
3018
|
-
break;
|
|
3019
|
-
case 'Injectable':
|
|
3020
|
-
const serviceType = this.adapter.toClassDefinition(item);
|
|
3021
|
-
types.services.push(serviceType);
|
|
3022
|
-
types.hasPreviewFeatures ||= serviceType.hasPreviewFeatures;
|
|
3023
|
-
break;
|
|
3024
|
-
case 'NgModule':
|
|
3025
|
-
// Don't document modules.
|
|
3026
|
-
break;
|
|
3027
|
-
case 'Pipe':
|
|
3028
|
-
const pipeType = this.adapter.toPipeDefinition(item);
|
|
3029
|
-
types.pipes.push(pipeType);
|
|
3030
|
-
types.hasPreviewFeatures ||= pipeType.transformMethod.isPreview;
|
|
3031
|
-
break;
|
|
3032
|
-
default:
|
|
3033
|
-
/*tslint:disable-next-line:switch-default*/
|
|
3034
|
-
switch (kind) {
|
|
3035
|
-
case TypeDocKind.Class:
|
|
3036
|
-
const classType = this.adapter.toClassDefinition(item);
|
|
3037
|
-
types.classes.push(classType);
|
|
3038
|
-
types.hasPreviewFeatures ||= classType.hasPreviewFeatures;
|
|
3039
|
-
break;
|
|
3040
|
-
case TypeDocKind.Interface:
|
|
3041
|
-
const interfaceType = this.adapter.toInterfaceDefinition(item);
|
|
3042
|
-
types.interfaces.push(interfaceType);
|
|
3043
|
-
types.hasPreviewFeatures ||= interfaceType.hasPreviewFeatures;
|
|
3044
|
-
break;
|
|
3045
|
-
case TypeDocKind.Enum:
|
|
3046
|
-
const enumType = this.adapter.toEnumerationDefinition(item);
|
|
3047
|
-
types.enumerations.push(enumType);
|
|
3048
|
-
types.hasPreviewFeatures ||= enumType.hasPreviewFeatures;
|
|
3049
|
-
break;
|
|
3050
|
-
case TypeDocKind.Reference:
|
|
3051
|
-
case TypeDocKind.TypeAlias:
|
|
3052
|
-
const typeAliasType = this.adapter.toTypeAliasDefinition(item);
|
|
3053
|
-
types.typeAliases.push(typeAliasType);
|
|
3054
|
-
types.hasPreviewFeatures ||= !!typeAliasType.isPreview;
|
|
3055
|
-
break;
|
|
3056
|
-
}
|
|
3057
|
-
}
|
|
3058
|
-
});
|
|
3059
|
-
});
|
|
3060
|
-
return types;
|
|
3061
|
-
}
|
|
3062
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeDefinitionsService, deps: [{ token: SkyDocsTypeDefinitionsProvider }, { token: SkyDocsTypeDocAdapterService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3063
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeDefinitionsService, providedIn: 'any' }); }
|
|
3064
|
-
}
|
|
3065
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsTypeDefinitionsService, decorators: [{
|
|
3066
|
-
type: Injectable,
|
|
3067
|
-
args: [{
|
|
3068
|
-
providedIn: 'any',
|
|
3069
|
-
}]
|
|
3070
|
-
}], ctorParameters: () => [{ type: SkyDocsTypeDefinitionsProvider }, { type: SkyDocsTypeDocAdapterService }] });
|
|
3071
|
-
|
|
3072
|
-
/**
|
|
3073
|
-
* @internal
|
|
3074
|
-
*/
|
|
3075
|
-
class SkyDocsDemoPageTypeDefinitionsComponent {
|
|
3076
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageTypeDefinitionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3077
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: SkyDocsDemoPageTypeDefinitionsComponent, selector: "sky-docs-demo-page-type-definitions", inputs: { types: "types" }, 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", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SkyDocsClassDefinitionComponent, selector: "sky-docs-class-definition", inputs: ["config"] }, { kind: "component", type: SkyDocsDirectiveDefinitionComponent, selector: "sky-docs-directive-definition", inputs: ["config"] }, { kind: "component", type: SkyDocsEnumerationDefinitionComponent, selector: "sky-docs-enumeration-definition", inputs: ["config"] }, { kind: "component", type: SkyDocsInterfaceDefinitionComponent, selector: "sky-docs-interface-definition", inputs: ["config"] }, { kind: "component", type: SkyDocsPipeDefinitionComponent, selector: "sky-docs-pipe-definition", inputs: ["config"] }, { kind: "component", type: SkyDocsTypeAliasDefinitionComponent, selector: "sky-docs-type-alias-definition", inputs: ["config"] }, { kind: "component", type: SkyDocsDemoPageSectionComponent, selector: "sky-docs-demo-page-section", inputs: ["heading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3078
|
-
}
|
|
3079
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageTypeDefinitionsComponent, decorators: [{
|
|
3080
|
-
type: Component,
|
|
3081
|
-
args: [{ selector: 'sky-docs-demo-page-type-definitions', changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
|
|
3082
|
-
}], propDecorators: { types: [{
|
|
3083
|
-
type: Input
|
|
3084
|
-
}] } });
|
|
3085
|
-
|
|
3086
|
-
/**
|
|
3087
|
-
* The demo page component wraps all documentation components and handles the configuration and layout of the page.
|
|
3088
|
-
* @example
|
|
3089
|
-
* ```
|
|
3090
|
-
* <sky-docs-demo-page
|
|
3091
|
-
* pageTitle="My demo page"
|
|
3092
|
-
* >
|
|
3093
|
-
* Content here.
|
|
3094
|
-
* </sky-docs-demo-page>
|
|
3095
|
-
* ```
|
|
3096
|
-
*/
|
|
3097
|
-
class SkyDocsDemoPageComponent {
|
|
3098
|
-
/**
|
|
3099
|
-
* Specifies the local path to any other relevant source code. The values are relative to the root directory.
|
|
3100
|
-
*/
|
|
3101
|
-
set additionalSourceCodePaths(paths) {
|
|
3102
|
-
this.#_additionalSourceCodePaths = paths;
|
|
3103
|
-
this.#updateTypes();
|
|
3104
|
-
}
|
|
3105
|
-
get additionalSourceCodePaths() {
|
|
3106
|
-
return this.#_additionalSourceCodePaths;
|
|
3107
|
-
}
|
|
3108
|
-
/**
|
|
3109
|
-
* Specifies the local path to any other relevant testing source code. The values are relative to the root directory.
|
|
3110
|
-
*/
|
|
3111
|
-
set additionalTestingSourceCodePaths(paths) {
|
|
3112
|
-
this.#_additionalTestingSourceCodePaths = paths;
|
|
3113
|
-
this.#updateTestingTypes();
|
|
3114
|
-
}
|
|
3115
|
-
get additionalTestingSourceCodePaths() {
|
|
3116
|
-
return this.#_additionalTestingSourceCodePaths;
|
|
3117
|
-
}
|
|
3118
|
-
/**
|
|
3119
|
-
* Specifies the local path to the module's source code. The value is relative to the root directory.
|
|
3120
|
-
*/
|
|
3121
|
-
set moduleSourceCodePath(path) {
|
|
3122
|
-
this.#_moduleSourceCodePath = path;
|
|
3123
|
-
this.testingSourceCodePath = path.replace('/modules/', '/testing/');
|
|
3124
|
-
this.#updateTypes();
|
|
3125
|
-
this.#updateTestingTypes();
|
|
3126
|
-
}
|
|
3127
|
-
get moduleSourceCodePath() {
|
|
3128
|
-
return this.#_moduleSourceCodePath;
|
|
3129
|
-
}
|
|
3130
|
-
#_additionalSourceCodePaths;
|
|
3131
|
-
#_additionalTestingSourceCodePaths;
|
|
3132
|
-
#_moduleSourceCodePath;
|
|
3133
|
-
constructor(activatedRoute, changeDetector, router, skyAppConfig, domAdapter, supportalService, titleService, typeDefinitionService) {
|
|
3134
|
-
this.activatedRoute = activatedRoute;
|
|
3135
|
-
this.changeDetector = changeDetector;
|
|
3136
|
-
this.router = router;
|
|
3137
|
-
this.skyAppConfig = skyAppConfig;
|
|
3138
|
-
this.domAdapter = domAdapter;
|
|
3139
|
-
this.supportalService = supportalService;
|
|
3140
|
-
this.titleService = titleService;
|
|
3141
|
-
this.typeDefinitionService = typeDefinitionService;
|
|
3142
|
-
/**
|
|
3143
|
-
* @internal
|
|
3144
|
-
*/
|
|
3145
|
-
this.enableCodeExamples = false;
|
|
3146
|
-
/**
|
|
3147
|
-
* @internal
|
|
3148
|
-
*/
|
|
3149
|
-
this.enableTestingTab = false;
|
|
3150
|
-
/**
|
|
3151
|
-
* @internal
|
|
3152
|
-
*/
|
|
3153
|
-
this.enableTabLayout = false;
|
|
3154
|
-
this.hasPreviewFeatures = false;
|
|
3155
|
-
this.siteOptions = inject(SkyDocsToolsSiteOptions, { optional: true });
|
|
3156
|
-
}
|
|
3157
|
-
ngOnInit() {
|
|
3158
|
-
const currentHostUrl = this.skyAppConfig.skyux.host.url + '/' + this.skyAppConfig.skyux.name;
|
|
3159
|
-
this.updateTitle();
|
|
3160
|
-
this.supportalService
|
|
3161
|
-
.getComponentsInfo()
|
|
3162
|
-
.subscribe((results) => {
|
|
3163
|
-
this.sidebarRoutes = [
|
|
3164
|
-
{
|
|
3165
|
-
name: 'Components',
|
|
3166
|
-
path: 'https://developer.blackbaud.com/skyux/components',
|
|
3167
|
-
children: results.map((component) => ({
|
|
3168
|
-
name: component.name,
|
|
3169
|
-
path: this.getPath(component.url, currentHostUrl),
|
|
3170
|
-
})),
|
|
3171
|
-
},
|
|
3172
|
-
];
|
|
3173
|
-
this.changeDetector.markForCheck();
|
|
3174
|
-
});
|
|
3175
|
-
}
|
|
3176
|
-
ngAfterContentInit() {
|
|
3177
|
-
this.enableCodeExamples = this.codeExampleComponents.length > 0;
|
|
3178
|
-
this.enableTabLayout =
|
|
3179
|
-
!!this.designGuidelinesComponent || this.enableCodeExamples;
|
|
3180
|
-
}
|
|
3181
|
-
ngAfterViewInit() {
|
|
3182
|
-
// Watch for route fragment to change and scroll to heading.
|
|
3183
|
-
this.activatedRoute.fragment.subscribe((fragment) => {
|
|
3184
|
-
this.domAdapter.scrollToFragment(fragment);
|
|
3185
|
-
});
|
|
3186
|
-
// Change the HREF attribute for all dynamic links when the query params change.
|
|
3187
|
-
// This will also generate the appropriate HREF if the user wants to open the link in a new window.
|
|
3188
|
-
this.activatedRoute.queryParams.subscribe(() => {
|
|
3189
|
-
this.domAdapter.setupAnchorLinks();
|
|
3190
|
-
});
|
|
3191
|
-
// When a dynamic link is clicked, use Angular's router so that everything works correctly.
|
|
3192
|
-
this.domAdapter.anchorLinkClick.subscribe((anchorLink) => {
|
|
3193
|
-
const fragment = anchorLink.href.split('#')[1];
|
|
3194
|
-
this.router.navigate([], {
|
|
3195
|
-
fragment,
|
|
3196
|
-
queryParamsHandling: 'merge',
|
|
3197
|
-
});
|
|
3198
|
-
if (this.activatedRoute.snapshot.fragment === fragment) {
|
|
3199
|
-
this.domAdapter.scrollToFragment(fragment);
|
|
3200
|
-
}
|
|
3201
|
-
});
|
|
3202
|
-
}
|
|
3203
|
-
updateTitle() {
|
|
3204
|
-
/*istanbul ignore else*/
|
|
3205
|
-
if (this.pageTitle) {
|
|
3206
|
-
this.titleService.setTitle(this.pageTitle, 'Components');
|
|
3207
|
-
}
|
|
3208
|
-
}
|
|
3209
|
-
getPath(url, currentHostUrl) {
|
|
3210
|
-
// Replace host + SPA so Stache will mark active.
|
|
3211
|
-
// Strip URL params is url is local, as those will be preserved by stacheRouterLink.
|
|
3212
|
-
if (url.indexOf(currentHostUrl) > -1) {
|
|
3213
|
-
return url.replace(currentHostUrl, '').split('?')[0];
|
|
3214
|
-
}
|
|
3215
|
-
else {
|
|
3216
|
-
return url;
|
|
3217
|
-
}
|
|
3218
|
-
}
|
|
3219
|
-
#updateTypes() {
|
|
3220
|
-
this.moduleTypeDefinitions = this.typeDefinitionService.getTypeDefinitions(this.moduleSourceCodePath, this.additionalSourceCodePaths);
|
|
3221
|
-
}
|
|
3222
|
-
#updateTestingTypes() {
|
|
3223
|
-
this.testingTypeDefinitions = this.typeDefinitionService.getTypeDefinitions(this.testingSourceCodePath, this.additionalTestingSourceCodePaths);
|
|
3224
|
-
this.enableTestingTab = Object.values(this.testingTypeDefinitions).some((value) => value && value.length > 0);
|
|
3225
|
-
}
|
|
3226
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageComponent, deps: [{ token: i1$3.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token: i1$3.Router }, { token: i2$1.SkyAppConfig }, { token: SkyDocsDemoPageDomAdapterService }, { token: SkyDocsSupportalService }, { token: SkyDocsDemoPageTitleService }, { token: SkyDocsTypeDefinitionsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3227
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: SkyDocsDemoPageComponent, selector: "sky-docs-demo-page", inputs: { additionalSourceCodePaths: "additionalSourceCodePaths", additionalTestingSourceCodePaths: "additionalTestingSourceCodePaths", 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 <sky-alert\n *ngIf=\"\n moduleTypeDefinitions?.hasPreviewFeatures ||\n testingTypeDefinitions?.hasPreviewFeatures\n \"\n class=\"sky-docs-demo-page-preview-alert sky-margin-stacked-lg\"\n >This component currently has preview features available that may not be\n fully represented in the design documentation, the demo, or code examples.\n <ng-container *ngIf=\"siteOptions?.previewFeaturesUrl\"\n >Learn more about this work\n <a [skyAppLink]=\"siteOptions?.previewFeaturesUrl\"\n >here.</a\n ></ng-container\n ></sky-alert\n >\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\" *ngIf=\"!!designGuidelinesComponent\">\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\n <sky-tab tabHeading=\"Testing\" *ngIf=\"enableTestingTab\">\n <sky-docs-demo-page-section heading=\"Test harnesses\">\n <p>\n SKY UX test harnesses are built upon Angular CDK component\n harnesses. For more information see the\n <a href=\"https://material.angular.io/cdk/test-harnesses/overview\"\n >Angular CDK component harness documentation</a\n >.\n </p>\n </sky-docs-demo-page-section>\n <sky-docs-demo-page-type-definitions [types]=\"testingTypeDefinitions\">\n </sky-docs-demo-page-type-definitions>\n </sky-tab>\n\n <sky-tab tabHeading=\"Code examples\" *ngIf=\"enableCodeExamples\">\n <ng-content select=\"sky-docs-code-examples\"></ng-content>\n </sky-tab>\n </sky-tabset>\n </div>\n </stache>\n</div>\n\n<ng-template #content>\n <sky-docs-demo-page-section\n *ngIf=\"moduleName || packageName\"\n heading=\"Installation\"\n >\n <sky-docs-module-info\n [gitRepoUrl]=\"gitRepoUrl\"\n [moduleName]=\"moduleName\"\n [packageName]=\"packageName\"\n [packageUrl]=\"packageUrl\"\n >\n <ng-content 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 [types]=\"moduleTypeDefinitions\">\n </sky-docs-demo-page-type-definitions>\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"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1$5.λ1, selector: "sky-alert", inputs: ["alertType", "closeable", "closed", "descriptionType", "customDescription"], outputs: ["closedChange"] }, { kind: "directive", type: i9.λ3, selector: "[skyAppLink]", inputs: ["skyAppLink"] }, { kind: "component", type: SkyDocsModuleInfoComponent, selector: "sky-docs-module-info", inputs: ["gitRepoUrl", "moduleName", "packageName", "packageUrl"] }, { kind: "component", type: i7.λ1, selector: "sky-tab", inputs: ["active", "disabled", "permalinkValue", "tabHeaderCount", "tabHeading", "tabIndexValue", "layout"], outputs: ["close"] }, { kind: "component", type: i7.λ2, selector: "sky-tabset", inputs: ["active", "ariaLabel", "ariaLabelledBy", "permalinkId", "tabStyle"], outputs: ["activeChange", "newTab", "openTab", "tabIndexesChange"] }, { kind: "component", type: i12.λ30, selector: "stache", inputs: ["pageTitle", "windowTitle", "navTitle", "layout", "sidebarRoutes", "breadcrumbsRoutes", "showBreadcrumbs", "showEditButton", "showFooter", "showTableOfContents", "showBackToTop", "showInNav", "inPageRoutes"] }, { kind: "component", type: SkyDocsDemoPageSectionComponent, selector: "sky-docs-demo-page-section", inputs: ["heading"] }, { kind: "component", type: SkyDocsDemoPageTypeDefinitionsComponent, selector: "sky-docs-demo-page-type-definitions", inputs: ["types"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3228
|
-
}
|
|
3229
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageComponent, decorators: [{
|
|
3230
|
-
type: Component,
|
|
3231
|
-
args: [{ selector: 'sky-docs-demo-page', providers: [SkyDocsDemoPageDomAdapterService], changeDetection: ChangeDetectionStrategy.OnPush, 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 <sky-alert\n *ngIf=\"\n moduleTypeDefinitions?.hasPreviewFeatures ||\n testingTypeDefinitions?.hasPreviewFeatures\n \"\n class=\"sky-docs-demo-page-preview-alert sky-margin-stacked-lg\"\n >This component currently has preview features available that may not be\n fully represented in the design documentation, the demo, or code examples.\n <ng-container *ngIf=\"siteOptions?.previewFeaturesUrl\"\n >Learn more about this work\n <a [skyAppLink]=\"siteOptions?.previewFeaturesUrl\"\n >here.</a\n ></ng-container\n ></sky-alert\n >\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\" *ngIf=\"!!designGuidelinesComponent\">\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\n <sky-tab tabHeading=\"Testing\" *ngIf=\"enableTestingTab\">\n <sky-docs-demo-page-section heading=\"Test harnesses\">\n <p>\n SKY UX test harnesses are built upon Angular CDK component\n harnesses. For more information see the\n <a href=\"https://material.angular.io/cdk/test-harnesses/overview\"\n >Angular CDK component harness documentation</a\n >.\n </p>\n </sky-docs-demo-page-section>\n <sky-docs-demo-page-type-definitions [types]=\"testingTypeDefinitions\">\n </sky-docs-demo-page-type-definitions>\n </sky-tab>\n\n <sky-tab tabHeading=\"Code examples\" *ngIf=\"enableCodeExamples\">\n <ng-content select=\"sky-docs-code-examples\"></ng-content>\n </sky-tab>\n </sky-tabset>\n </div>\n </stache>\n</div>\n\n<ng-template #content>\n <sky-docs-demo-page-section\n *ngIf=\"moduleName || packageName\"\n heading=\"Installation\"\n >\n <sky-docs-module-info\n [gitRepoUrl]=\"gitRepoUrl\"\n [moduleName]=\"moduleName\"\n [packageName]=\"packageName\"\n [packageUrl]=\"packageUrl\"\n >\n <ng-content 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 [types]=\"moduleTypeDefinitions\">\n </sky-docs-demo-page-type-definitions>\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"] }]
|
|
3232
|
-
}], ctorParameters: () => [{ type: i1$3.ActivatedRoute }, { type: i0.ChangeDetectorRef }, { type: i1$3.Router }, { type: i2$1.SkyAppConfig }, { type: SkyDocsDemoPageDomAdapterService }, { type: SkyDocsSupportalService }, { type: SkyDocsDemoPageTitleService }, { type: SkyDocsTypeDefinitionsService }], propDecorators: { additionalSourceCodePaths: [{
|
|
3233
|
-
type: Input
|
|
3234
|
-
}], additionalTestingSourceCodePaths: [{
|
|
3235
|
-
type: Input
|
|
3236
|
-
}], gitRepoUrl: [{
|
|
3237
|
-
type: Input
|
|
3238
|
-
}], moduleName: [{
|
|
3239
|
-
type: Input
|
|
3240
|
-
}], moduleSourceCodePath: [{
|
|
3241
|
-
type: Input
|
|
3242
|
-
}], packageName: [{
|
|
3243
|
-
type: Input
|
|
3244
|
-
}], packageUrl: [{
|
|
3245
|
-
type: Input
|
|
3246
|
-
}], pageTitle: [{
|
|
3247
|
-
type: Input
|
|
3248
|
-
}], designGuidelinesComponent: [{
|
|
3249
|
-
type: ContentChild,
|
|
3250
|
-
args: [SkyDocsDesignGuidelinesComponent]
|
|
3251
|
-
}], codeExampleComponents: [{
|
|
3252
|
-
type: ContentChildren,
|
|
3253
|
-
args: [SkyDocsCodeExamplesComponent]
|
|
3254
|
-
}] } });
|
|
3255
|
-
|
|
3256
|
-
class SkyDocsDemoPageModuleInfoComponent {
|
|
3257
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageModuleInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3258
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: SkyDocsDemoPageModuleInfoComponent, selector: "sky-docs-demo-page-module-info", ngImport: i0, template: '<ng-content></ng-content>', isInline: true }); }
|
|
3259
|
-
}
|
|
3260
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageModuleInfoComponent, decorators: [{
|
|
3261
|
-
type: Component,
|
|
3262
|
-
args: [{
|
|
3263
|
-
selector: 'sky-docs-demo-page-module-info',
|
|
3264
|
-
template: '<ng-content></ng-content>',
|
|
3265
|
-
}]
|
|
3266
|
-
}] });
|
|
3267
|
-
|
|
3268
|
-
class SkyDocsDemoPageModule {
|
|
3269
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3270
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageModule, declarations: [SkyDocsDemoPageComponent,
|
|
3271
|
-
SkyDocsDemoPageModuleInfoComponent,
|
|
3272
|
-
SkyDocsDemoPageSectionComponent,
|
|
3273
|
-
SkyDocsDemoPageSummaryComponent,
|
|
3274
|
-
SkyDocsDemoPageTypeDefinitionsComponent], imports: [CommonModule,
|
|
3275
|
-
RouterModule,
|
|
3276
|
-
SkyAlertModule,
|
|
3277
|
-
SkyAppLinkModule,
|
|
3278
|
-
SkyCodeBlockModule,
|
|
3279
|
-
SkyCodeModule,
|
|
3280
|
-
SkyDocsDemoModule,
|
|
3281
|
-
SkyDocsHeadingAnchorModule,
|
|
3282
|
-
SkyDocsMarkdownModule,
|
|
3283
|
-
SkyDocsModuleInfoModule,
|
|
3284
|
-
SkyDocsTypeDefinitionsModule,
|
|
3285
|
-
SkyTabsModule,
|
|
3286
|
-
StachePageSummaryModule,
|
|
3287
|
-
StacheWrapperModule], exports: [SkyDocsDemoPageComponent,
|
|
3288
|
-
SkyDocsDemoPageModuleInfoComponent,
|
|
3289
|
-
SkyDocsDemoPageSectionComponent,
|
|
3290
|
-
SkyDocsDemoPageSummaryComponent,
|
|
3291
|
-
SkyDocsDemoPageTypeDefinitionsComponent] }); }
|
|
3292
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageModule, imports: [CommonModule,
|
|
3293
|
-
RouterModule,
|
|
3294
|
-
SkyAlertModule,
|
|
3295
|
-
SkyAppLinkModule,
|
|
3296
|
-
SkyCodeBlockModule,
|
|
3297
|
-
SkyCodeModule,
|
|
3298
|
-
SkyDocsDemoModule,
|
|
3299
|
-
SkyDocsHeadingAnchorModule,
|
|
3300
|
-
SkyDocsMarkdownModule,
|
|
3301
|
-
SkyDocsModuleInfoModule,
|
|
3302
|
-
SkyDocsTypeDefinitionsModule,
|
|
3303
|
-
SkyTabsModule,
|
|
3304
|
-
StachePageSummaryModule,
|
|
3305
|
-
StacheWrapperModule] }); }
|
|
3306
|
-
}
|
|
3307
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDemoPageModule, decorators: [{
|
|
3308
|
-
type: NgModule,
|
|
3309
|
-
args: [{
|
|
3310
|
-
imports: [
|
|
3311
|
-
CommonModule,
|
|
3312
|
-
RouterModule,
|
|
3313
|
-
SkyAlertModule,
|
|
3314
|
-
SkyAppLinkModule,
|
|
3315
|
-
SkyCodeBlockModule,
|
|
3316
|
-
SkyCodeModule,
|
|
3317
|
-
SkyDocsDemoModule,
|
|
3318
|
-
SkyDocsHeadingAnchorModule,
|
|
3319
|
-
SkyDocsMarkdownModule,
|
|
3320
|
-
SkyDocsModuleInfoModule,
|
|
3321
|
-
SkyDocsTypeDefinitionsModule,
|
|
3322
|
-
SkyTabsModule,
|
|
3323
|
-
StachePageSummaryModule,
|
|
3324
|
-
StacheWrapperModule,
|
|
3325
|
-
],
|
|
3326
|
-
declarations: [
|
|
3327
|
-
SkyDocsDemoPageComponent,
|
|
3328
|
-
SkyDocsDemoPageModuleInfoComponent,
|
|
3329
|
-
SkyDocsDemoPageSectionComponent,
|
|
3330
|
-
SkyDocsDemoPageSummaryComponent,
|
|
3331
|
-
SkyDocsDemoPageTypeDefinitionsComponent,
|
|
3332
|
-
],
|
|
3333
|
-
exports: [
|
|
3334
|
-
SkyDocsDemoPageComponent,
|
|
3335
|
-
SkyDocsDemoPageModuleInfoComponent,
|
|
3336
|
-
SkyDocsDemoPageSectionComponent,
|
|
3337
|
-
SkyDocsDemoPageSummaryComponent,
|
|
3338
|
-
SkyDocsDemoPageTypeDefinitionsComponent,
|
|
3339
|
-
],
|
|
3340
|
-
}]
|
|
3341
|
-
}] });
|
|
3342
|
-
|
|
3343
|
-
class SkyDocsDesignGuidelineThumbnailComponent {
|
|
3344
|
-
constructor() {
|
|
3345
|
-
this.showBorder = false;
|
|
3346
|
-
}
|
|
3347
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDesignGuidelineThumbnailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3348
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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"], dependencies: [{ kind: "component", type: SkyDocsThumbnailComponent, selector: "sky-docs-thumbnail", inputs: ["caption", "captionType", "imageAlt", "imageSource", "showBorder", "videoSource"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3349
|
-
}
|
|
3350
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDesignGuidelineThumbnailComponent, decorators: [{
|
|
3351
|
-
type: Component,
|
|
3352
|
-
args: [{ selector: 'sky-docs-design-guideline-thumbnail', changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
3353
|
-
}], propDecorators: { caption: [{
|
|
3354
|
-
type: Input
|
|
3355
|
-
}], captionType: [{
|
|
3356
|
-
type: Input
|
|
3357
|
-
}], imageAlt: [{
|
|
3358
|
-
type: Input
|
|
3359
|
-
}], imageSource: [{
|
|
3360
|
-
type: Input
|
|
3361
|
-
}], videoSource: [{
|
|
3362
|
-
type: Input
|
|
3363
|
-
}], showBorder: [{
|
|
3364
|
-
type: Input
|
|
3365
|
-
}] } });
|
|
3366
|
-
|
|
3367
|
-
class SkyDocsDesignGuidelineComponent {
|
|
3368
|
-
constructor() {
|
|
3369
|
-
this.headingStyle = 'default';
|
|
3370
|
-
this.hasThumbnails = false;
|
|
3371
|
-
}
|
|
3372
|
-
get classNames() {
|
|
3373
|
-
const classNames = [];
|
|
3374
|
-
classNames.push(`sky-text-${this.headingStyle}`);
|
|
3375
|
-
return classNames.join(' ');
|
|
3376
|
-
}
|
|
3377
|
-
ngAfterContentInit() {
|
|
3378
|
-
this.hasThumbnails = !!this.thumbnails.length;
|
|
3379
|
-
}
|
|
3380
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDesignGuidelineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3381
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.λ23, selector: "sky-row", inputs: ["reverseColumnOrder"] }, { kind: "component", type: i5.λ24, selector: "sky-column", inputs: ["screenXSmall", "screenSmall", "screenMedium", "screenLarge"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3382
|
-
}
|
|
3383
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDesignGuidelineComponent, decorators: [{
|
|
3384
|
-
type: Component,
|
|
3385
|
-
args: [{ selector: 'sky-docs-design-guideline', changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
3386
|
-
}], propDecorators: { heading: [{
|
|
3387
|
-
type: Input
|
|
3388
|
-
}], headingStyle: [{
|
|
3389
|
-
type: Input
|
|
3390
|
-
}], thumbnails: [{
|
|
3391
|
-
type: ContentChildren,
|
|
3392
|
-
args: [SkyDocsDesignGuidelineThumbnailComponent]
|
|
3393
|
-
}] } });
|
|
3394
|
-
|
|
3395
|
-
class SkyDocsDesignGuidelinesModule {
|
|
3396
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDesignGuidelinesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3397
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDesignGuidelinesModule, declarations: [SkyDocsDesignGuidelineComponent,
|
|
3398
|
-
SkyDocsDesignGuidelineThumbnailComponent,
|
|
3399
|
-
SkyDocsDesignGuidelinesComponent], imports: [CommonModule, SkyDocsThumbnailModule, SkyFluidGridModule], exports: [SkyDocsDesignGuidelineComponent,
|
|
3400
|
-
SkyDocsDesignGuidelineThumbnailComponent,
|
|
3401
|
-
SkyDocsDesignGuidelinesComponent] }); }
|
|
3402
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDesignGuidelinesModule, imports: [CommonModule, SkyDocsThumbnailModule, SkyFluidGridModule] }); }
|
|
3403
|
-
}
|
|
3404
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsDesignGuidelinesModule, decorators: [{
|
|
3405
|
-
type: NgModule,
|
|
3406
|
-
args: [{
|
|
3407
|
-
imports: [CommonModule, SkyDocsThumbnailModule, SkyFluidGridModule],
|
|
3408
|
-
declarations: [
|
|
3409
|
-
SkyDocsDesignGuidelineComponent,
|
|
3410
|
-
SkyDocsDesignGuidelineThumbnailComponent,
|
|
3411
|
-
SkyDocsDesignGuidelinesComponent,
|
|
3412
|
-
],
|
|
3413
|
-
exports: [
|
|
3414
|
-
SkyDocsDesignGuidelineComponent,
|
|
3415
|
-
SkyDocsDesignGuidelineThumbnailComponent,
|
|
3416
|
-
SkyDocsDesignGuidelinesComponent,
|
|
3417
|
-
],
|
|
3418
|
-
}]
|
|
3419
|
-
}] });
|
|
3420
|
-
|
|
3421
|
-
/**
|
|
3422
|
-
* This module conveniently exports the most commonly used modules.
|
|
3423
|
-
*/
|
|
3424
|
-
class SkyDocsToolsModule {
|
|
3425
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsToolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3426
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsToolsModule, exports: [SkyDocsAnatomyModule,
|
|
3427
|
-
SkyDocsCodeExamplesModule,
|
|
3428
|
-
SkyDocsDemoModule,
|
|
3429
|
-
SkyDocsDemoPageModule,
|
|
3430
|
-
SkyDocsDesignGuidelinesModule] }); }
|
|
3431
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SkyDocsToolsModule, imports: [SkyDocsAnatomyModule,
|
|
3432
|
-
SkyDocsCodeExamplesModule,
|
|
3433
|
-
SkyDocsDemoModule,
|
|
3434
|
-
SkyDocsDemoPageModule,
|
|
3435
|
-
SkyDocsDesignGuidelinesModule] }); }
|
|
530
|
+
class SkyCodeExampleViewerModule {
|
|
531
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyCodeExampleViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
532
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyCodeExampleViewerModule, imports: [SkyCodeExampleViewerComponent], exports: [SkyCodeExampleViewerComponent] }); }
|
|
533
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyCodeExampleViewerModule, imports: [SkyCodeExampleViewerComponent] }); }
|
|
3436
534
|
}
|
|
3437
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyCodeExampleViewerModule, decorators: [{
|
|
3438
536
|
type: NgModule,
|
|
3439
537
|
args: [{
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
SkyDocsCodeExamplesModule,
|
|
3443
|
-
SkyDocsDemoModule,
|
|
3444
|
-
SkyDocsDemoPageModule,
|
|
3445
|
-
SkyDocsDesignGuidelinesModule,
|
|
3446
|
-
],
|
|
538
|
+
imports: [SkyCodeExampleViewerComponent],
|
|
539
|
+
exports: [SkyCodeExampleViewerComponent],
|
|
3447
540
|
}]
|
|
3448
541
|
}] });
|
|
3449
542
|
|
|
@@ -3451,5 +544,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
|
|
|
3451
544
|
* Generated bundle index. Do not edit.
|
|
3452
545
|
*/
|
|
3453
546
|
|
|
3454
|
-
export {
|
|
547
|
+
export { SKY_CODE_SNIPPET_LANGUAGES, SkyCodeExampleViewerModule, SkyCodeSnippetModule, SkyCodeSnippetComponent as λ1, SkyCodeExampleViewerComponent as λ2 };
|
|
3455
548
|
//# sourceMappingURL=skyux-docs-tools.mjs.map
|