@skyux/docs-tools 12.0.0-alpha.7 → 12.0.0-alpha.8
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/css/styles.css +35 -0
- package/fesm2022/skyux-docs-tools.mjs +1399 -79
- package/fesm2022/skyux-docs-tools.mjs.map +1 -1
- package/index.d.ts +32 -6
- package/lib/modules/category-tag/category-color.d.ts +6 -0
- package/lib/modules/category-tag/category-tag.component.d.ts +10 -0
- package/lib/modules/category-tag/category-tag.module.d.ts +10 -0
- package/lib/modules/clipboard/clipboard-button.directive.d.ts +12 -0
- package/lib/modules/clipboard/clipboard.module.d.ts +10 -0
- package/lib/modules/clipboard/clipboard.service.d.ts +9 -5
- package/lib/modules/code-example-viewer/code-example-viewer.component.d.ts +6 -6
- package/lib/modules/code-example-viewer/code-example-viewer.module.d.ts +4 -4
- package/lib/modules/code-example-viewer/stackblitz-launch-config.d.ts +1 -1
- package/lib/modules/code-example-viewer/stackblitz.service.d.ts +5 -5
- package/lib/modules/code-highlight/code-highlight-language.d.ts +12 -0
- package/lib/modules/code-highlight/code-highlight.pipe.d.ts +12 -0
- package/lib/modules/code-highlight/code-highlight.service.d.ts +11 -0
- package/lib/modules/code-snippet/code-snippet-toolbar.component.d.ts +9 -0
- package/lib/modules/code-snippet/code-snippet-wrapper.component.d.ts +12 -0
- package/lib/modules/code-snippet/code-snippet.component.d.ts +9 -9
- package/lib/modules/code-snippet/code-snippet.module.d.ts +5 -4
- package/lib/modules/heading-anchor/heading-anchor-heading-level.d.ts +4 -0
- package/lib/modules/heading-anchor/heading-anchor-heading-text-format.d.ts +4 -0
- package/lib/modules/heading-anchor/heading-anchor-link.d.ts +12 -0
- package/lib/modules/heading-anchor/heading-anchor.component.d.ts +24 -0
- package/lib/modules/heading-anchor/heading-anchor.module.d.ts +10 -0
- package/lib/modules/heading-anchor/heading-anchor.service.d.ts +16 -0
- package/lib/modules/showcase/code-example-types/code-example-types-token.d.ts +9 -0
- package/lib/modules/showcase/code-example-types/code-example-types.pipe.d.ts +11 -0
- package/lib/modules/showcase/code-example-types/provide-code-example-types.d.ts +14 -0
- package/lib/modules/showcase/showcase-area-development.component.d.ts +11 -0
- package/lib/modules/showcase/showcase-area-examples.component.d.ts +11 -0
- package/lib/modules/showcase/showcase-area-overview.component.d.ts +9 -0
- package/lib/modules/showcase/showcase-area-testing.component.d.ts +11 -0
- package/lib/modules/showcase/showcase-host.service.d.ts +15 -0
- package/lib/modules/showcase/showcase.component.d.ts +19 -0
- package/lib/modules/showcase/showcase.module.d.ts +14 -0
- package/lib/modules/table-of-contents/table-of-contents-links.d.ts +7 -0
- package/lib/modules/table-of-contents/table-of-contents-page.component.d.ts +15 -0
- package/lib/modules/table-of-contents/table-of-contents.component.d.ts +11 -0
- package/lib/modules/table-of-contents/table-of-contents.module.d.ts +11 -0
- package/lib/modules/type-definition/box.component.d.ts +12 -0
- package/lib/modules/type-definition/deprecation-reason.component.d.ts +9 -0
- package/lib/modules/type-definition/description.component.d.ts +10 -0
- package/lib/modules/type-definition/pipes/default-value.pipe.d.ts +11 -0
- package/lib/modules/type-definition/pipes/enum-signature.pipe.d.ts +11 -0
- package/lib/modules/type-definition/pipes/escape-html.pipe.d.ts +10 -0
- package/lib/modules/type-definition/pipes/function-signature.pipe.d.ts +12 -0
- package/lib/modules/type-definition/pipes/interface-signature.pipe.d.ts +11 -0
- package/lib/modules/type-definition/pipes/markdown.pipe.d.ts +10 -0
- package/lib/modules/type-definition/pipes/method-name.pipe.d.ts +12 -0
- package/lib/modules/type-definition/pipes/parameter-name.pipe.d.ts +11 -0
- package/lib/modules/type-definition/pipes/property-name.pipe.d.ts +12 -0
- package/lib/modules/type-definition/pipes/type-alias-signature.pipe.d.ts +11 -0
- package/lib/modules/type-definition/pipes/type-anchor-links.pipe.d.ts +14 -0
- package/lib/modules/type-definition/pipes/type-definition-kind-to-category-color.pipe.d.ts +12 -0
- package/lib/modules/type-definition/pipes/type-definition-kind-to-label.pipe.d.ts +11 -0
- package/lib/modules/type-definition/property-definition.d.ts +5 -0
- package/lib/modules/type-definition/type-anchor-ids.service.d.ts +14 -0
- package/lib/modules/type-definition/type-definition.component.d.ts +19 -0
- package/lib/modules/type-definition/type-definition.module.d.ts +10 -0
- package/package.json +24 -17
- package/lib/modules/code-snippet/code-snippet-language.d.ts +0 -12
|
@@ -1,62 +1,162 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable,
|
|
3
|
-
import { KeyValuePipe, NgComponentOutlet } from '@angular/common';
|
|
2
|
+
import { input, Component, ChangeDetectionStrategy, NgModule, inject, Injectable, Directive, booleanAttribute, ViewEncapsulation, computed, signal, Pipe, ElementRef, numberAttribute, InjectionToken, makeEnvironmentProviders, DestroyRef, ChangeDetectorRef, contentChild, effect } from '@angular/core';
|
|
4
3
|
import * as i5 from '@skyux/core';
|
|
5
|
-
import { SkyAppWindowRef, SkyIdModule } from '@skyux/core';
|
|
6
|
-
import
|
|
4
|
+
import { SkyAppWindowRef, SkyIdModule, SkyTrimModule, SkyScrollableHostService, SkyMediaQueryService } from '@skyux/core';
|
|
5
|
+
import { SkyToastService } from '@skyux/toast';
|
|
6
|
+
import { KeyValuePipe, NgComponentOutlet, NgTemplateOutlet } from '@angular/common';
|
|
7
|
+
import * as i2 from '@skyux/icon';
|
|
7
8
|
import { SkyIconModule } from '@skyux/icon';
|
|
8
|
-
import * as i1
|
|
9
|
-
import { SkyBoxModule } from '@skyux/layout';
|
|
9
|
+
import * as i1 from '@skyux/layout';
|
|
10
|
+
import { SkyBoxModule, SkyDescriptionListModule } from '@skyux/layout';
|
|
10
11
|
import * as i6 from '@skyux/tabs';
|
|
11
|
-
import { SkyVerticalTabsetModule } from '@skyux/tabs';
|
|
12
|
+
import { SkyVerticalTabsetModule, SkyTabsModule } from '@skyux/tabs';
|
|
13
|
+
import * as i3 from '@skyux/i18n';
|
|
14
|
+
import { SkyLibResourcesService, SkyI18nModule } from '@skyux/i18n';
|
|
12
15
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
13
16
|
import highlight from 'highlight.js/lib/core';
|
|
17
|
+
import hlCss from 'highlight.js/lib/languages/css';
|
|
14
18
|
import hlJavaScript from 'highlight.js/lib/languages/javascript';
|
|
15
19
|
import hlScss from 'highlight.js/lib/languages/scss';
|
|
16
20
|
import hlTypeScript from 'highlight.js/lib/languages/typescript';
|
|
17
21
|
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
22
|
import { HttpClient } from '@angular/common/http';
|
|
22
23
|
import { SkyAppAssetsService } from '@skyux/assets';
|
|
23
24
|
import stackblitz from '@stackblitz/sdk';
|
|
24
|
-
import { firstValueFrom } from 'rxjs';
|
|
25
|
+
import { firstValueFrom, BehaviorSubject, fromEvent, debounceTime, map, distinctUntilChanged } from 'rxjs';
|
|
26
|
+
import { RouterLink, ActivatedRoute } from '@angular/router';
|
|
27
|
+
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
28
|
+
import { isFunctionDefinition, isPipeDefinition, isDirectiveDefinition, getDocumentationGroup } from '@skyux/manifest';
|
|
29
|
+
import * as i1$1 from '@skyux/indicators';
|
|
30
|
+
import { SkyStatusIndicatorModule } from '@skyux/indicators';
|
|
31
|
+
import { marked } from 'marked';
|
|
25
32
|
|
|
26
33
|
/**
|
|
27
34
|
* @internal
|
|
28
35
|
*/
|
|
29
|
-
|
|
36
|
+
class SkyDocsCategoryTagComponent {
|
|
37
|
+
constructor() {
|
|
38
|
+
this.color = input.required();
|
|
39
|
+
}
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCategoryTagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
41
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.5", type: SkyDocsCategoryTagComponent, isStandalone: true, selector: "sky-docs-category-tag", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class": "\"sky-docs-category-tag-color-\" + color()" }, classAttribute: "sky-rounded-corners" }, ngImport: i0, template: '<ng-content />', isInline: true, styles: [":host{display:inline-flex;padding:.2em .6em;background-color:var(--sky-docs-category-tag-background-color);color:var(--sky-text-color-default);color:color-mix(in srgb,var(--sky-docs-category-tag-background-color) 20%,var(--sky-text-color-default))}:host(.sky-docs-category-tag-color-blue){--sky-docs-category-tag-background-color: var(--sky-category-color-blue)}:host(.sky-docs-category-tag-color-light-blue){--sky-docs-category-tag-background-color: var( --sky-category-color-light-blue )}:host(.sky-docs-category-tag-color-orange){--sky-docs-category-tag-background-color: var(--sky-category-color-orange)}:host(.sky-docs-category-tag-color-purple){--sky-docs-category-tag-background-color: var(--sky-category-color-purple)}:host(.sky-docs-category-tag-color-red){--sky-docs-category-tag-background-color: var(--sky-category-color-red)}:host(.sky-docs-category-tag-color-teal){--sky-docs-category-tag-background-color: var(--sky-category-color-teal)}:host(.sky-docs-category-tag-color-yellow){--sky-docs-category-tag-background-color: var(--sky-category-color-yellow)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
42
|
+
}
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCategoryTagComponent, decorators: [{
|
|
44
|
+
type: Component,
|
|
45
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
46
|
+
class: 'sky-rounded-corners',
|
|
47
|
+
'[class]': '"sky-docs-category-tag-color-" + color()',
|
|
48
|
+
}, selector: 'sky-docs-category-tag', template: '<ng-content />', styles: [":host{display:inline-flex;padding:.2em .6em;background-color:var(--sky-docs-category-tag-background-color);color:var(--sky-text-color-default);color:color-mix(in srgb,var(--sky-docs-category-tag-background-color) 20%,var(--sky-text-color-default))}:host(.sky-docs-category-tag-color-blue){--sky-docs-category-tag-background-color: var(--sky-category-color-blue)}:host(.sky-docs-category-tag-color-light-blue){--sky-docs-category-tag-background-color: var( --sky-category-color-light-blue )}:host(.sky-docs-category-tag-color-orange){--sky-docs-category-tag-background-color: var(--sky-category-color-orange)}:host(.sky-docs-category-tag-color-purple){--sky-docs-category-tag-background-color: var(--sky-category-color-purple)}:host(.sky-docs-category-tag-color-red){--sky-docs-category-tag-background-color: var(--sky-category-color-red)}:host(.sky-docs-category-tag-color-teal){--sky-docs-category-tag-background-color: var(--sky-category-color-teal)}:host(.sky-docs-category-tag-color-yellow){--sky-docs-category-tag-background-color: var(--sky-category-color-yellow)}\n"] }]
|
|
49
|
+
}] });
|
|
50
|
+
|
|
30
51
|
/**
|
|
31
52
|
* @internal
|
|
32
53
|
*/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
54
|
+
class SkyDocsCategoryTagModule {
|
|
55
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCategoryTagModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
56
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCategoryTagModule, imports: [SkyDocsCategoryTagComponent], exports: [SkyDocsCategoryTagComponent] }); }
|
|
57
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCategoryTagModule }); }
|
|
37
58
|
}
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCategoryTagModule, decorators: [{
|
|
60
|
+
type: NgModule,
|
|
61
|
+
args: [{
|
|
62
|
+
imports: [SkyDocsCategoryTagComponent],
|
|
63
|
+
exports: [SkyDocsCategoryTagComponent],
|
|
64
|
+
}]
|
|
65
|
+
}] });
|
|
38
66
|
|
|
39
67
|
/**
|
|
40
68
|
* @internal
|
|
41
69
|
*/
|
|
42
|
-
class
|
|
70
|
+
class SkyDocsClipboardService {
|
|
43
71
|
#toastSvc = inject(SkyToastService);
|
|
44
72
|
#windowRef = inject(SkyAppWindowRef);
|
|
73
|
+
/**
|
|
74
|
+
* Saves an element's text content to the system clipboard.
|
|
75
|
+
* @param el The element whose text should be copied.
|
|
76
|
+
* @param successMessage The message to display after the action is successful.
|
|
77
|
+
*/
|
|
45
78
|
copyTextContent(el, successMessage) {
|
|
46
|
-
const text = el.
|
|
79
|
+
const text = el.textContent?.trim() ?? '';
|
|
47
80
|
this.#windowRef.nativeWindow.navigator.clipboard.writeText(text);
|
|
48
81
|
this.#toastSvc.openMessage(successMessage, { autoClose: true });
|
|
49
82
|
}
|
|
50
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type:
|
|
51
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type:
|
|
83
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsClipboardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
84
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsClipboardService, providedIn: 'root' }); }
|
|
52
85
|
}
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type:
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsClipboardService, decorators: [{
|
|
54
87
|
type: Injectable,
|
|
55
88
|
args: [{
|
|
56
89
|
providedIn: 'root',
|
|
57
90
|
}]
|
|
58
91
|
}] });
|
|
59
92
|
|
|
93
|
+
/**
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
96
|
+
class SkyDocsClipboardButtonDirective {
|
|
97
|
+
constructor() {
|
|
98
|
+
this.#clipboardSvc = inject(SkyDocsClipboardService);
|
|
99
|
+
this.clipboardTarget = input.required();
|
|
100
|
+
this.copySuccessMessage = input.required();
|
|
101
|
+
}
|
|
102
|
+
#clipboardSvc;
|
|
103
|
+
onClick() {
|
|
104
|
+
const el = this.clipboardTarget();
|
|
105
|
+
if (el) {
|
|
106
|
+
this.#clipboardSvc.copyTextContent(el, this.copySuccessMessage());
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsClipboardButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
110
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.5", type: SkyDocsClipboardButtonDirective, isStandalone: true, selector: "[skyDocsClipboardButton]", inputs: { clipboardTarget: { classPropertyName: "clipboardTarget", publicName: "clipboardTarget", isSignal: true, isRequired: true, transformFunction: null }, copySuccessMessage: { classPropertyName: "copySuccessMessage", publicName: "copySuccessMessage", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
|
|
111
|
+
}
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsClipboardButtonDirective, decorators: [{
|
|
113
|
+
type: Directive,
|
|
114
|
+
args: [{
|
|
115
|
+
host: {
|
|
116
|
+
'(click)': 'onClick()',
|
|
117
|
+
},
|
|
118
|
+
selector: '[skyDocsClipboardButton]',
|
|
119
|
+
}]
|
|
120
|
+
}] });
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @internal
|
|
124
|
+
*/
|
|
125
|
+
class SkyDocsClipboardModule {
|
|
126
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsClipboardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
127
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsClipboardModule, imports: [SkyDocsClipboardButtonDirective], exports: [SkyDocsClipboardButtonDirective] }); }
|
|
128
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsClipboardModule }); }
|
|
129
|
+
}
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsClipboardModule, decorators: [{
|
|
131
|
+
type: NgModule,
|
|
132
|
+
args: [{
|
|
133
|
+
imports: [SkyDocsClipboardButtonDirective],
|
|
134
|
+
exports: [SkyDocsClipboardButtonDirective],
|
|
135
|
+
}]
|
|
136
|
+
}] });
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @internal
|
|
140
|
+
*/
|
|
141
|
+
const SKY_DOCS_CODE_HIGHLIGHT_LANGUAGES = [
|
|
142
|
+
'html',
|
|
143
|
+
'markup',
|
|
144
|
+
'javascript',
|
|
145
|
+
'js',
|
|
146
|
+
'css',
|
|
147
|
+
'scss',
|
|
148
|
+
'typescript',
|
|
149
|
+
'ts',
|
|
150
|
+
];
|
|
151
|
+
/**
|
|
152
|
+
* @internal
|
|
153
|
+
*/
|
|
154
|
+
function assertCodeHighlightLanguage(value) {
|
|
155
|
+
if (!SKY_DOCS_CODE_HIGHLIGHT_LANGUAGES.includes(value)) {
|
|
156
|
+
throw new Error(`Value "${value}" is not a supported language type.`);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
60
160
|
/* istanbul ignore file */
|
|
61
161
|
/**
|
|
62
162
|
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
@@ -66,18 +166,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
66
166
|
*/
|
|
67
167
|
const RESOURCES = {
|
|
68
168
|
'EN-US': {
|
|
69
|
-
|
|
70
|
-
|
|
169
|
+
sky_docs_code_snippet_copy_to_clipboard_button_label: { message: 'Copy' },
|
|
170
|
+
sky_docs_code_snippet_copy_to_clipboard_success_message: {
|
|
71
171
|
message: 'Code copied',
|
|
72
172
|
},
|
|
73
|
-
|
|
173
|
+
sky_docs_code_example_viewer_demo_hidden_message: {
|
|
74
174
|
message: 'Open this code example in StackBlitz to view the demo.',
|
|
75
175
|
},
|
|
76
|
-
|
|
176
|
+
sky_docs_code_example_viewer_demo_stack_blitz_button: {
|
|
77
177
|
message: 'Edit in StackBlitz',
|
|
78
178
|
},
|
|
79
|
-
|
|
80
|
-
|
|
179
|
+
sky_docs_code_example_viewer_hide_code_button_label: {
|
|
180
|
+
message: 'Hide code',
|
|
181
|
+
},
|
|
182
|
+
sky_docs_code_example_viewer_show_code_button_label: {
|
|
183
|
+
message: 'Show code',
|
|
184
|
+
},
|
|
81
185
|
},
|
|
82
186
|
};
|
|
83
187
|
SkyLibResourcesService.addResources(RESOURCES);
|
|
@@ -99,55 +203,171 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
99
203
|
/**
|
|
100
204
|
* @internal
|
|
101
205
|
*/
|
|
102
|
-
class
|
|
103
|
-
#clipboardSvc;
|
|
104
|
-
#sanitizer;
|
|
206
|
+
class SkyDocsCodeSnippetToolbarComponent {
|
|
105
207
|
constructor() {
|
|
106
|
-
this
|
|
208
|
+
this.codeRef = input.required();
|
|
209
|
+
}
|
|
210
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeSnippetToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
211
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.5", type: SkyDocsCodeSnippetToolbarComponent, isStandalone: true, selector: "sky-docs-code-snippet-toolbar", inputs: { codeRef: { classPropertyName: "codeRef", publicName: "codeRef", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "sky-margin-stacked-lg" }, ngImport: i0, template: `
|
|
212
|
+
<button
|
|
213
|
+
class="sky-btn sky-btn-default"
|
|
214
|
+
type="button"
|
|
215
|
+
skyDocsClipboardButton
|
|
216
|
+
[clipboardTarget]="codeRef()"
|
|
217
|
+
[copySuccessMessage]="
|
|
218
|
+
'sky_docs_code_snippet_copy_to_clipboard_success_message'
|
|
219
|
+
| skyLibResources
|
|
220
|
+
"
|
|
221
|
+
>
|
|
222
|
+
<sky-icon iconName="clipboard-multiple" />
|
|
223
|
+
{{
|
|
224
|
+
'sky_docs_code_snippet_copy_to_clipboard_button_label' | skyLibResources
|
|
225
|
+
}}
|
|
226
|
+
</button>
|
|
227
|
+
`, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: SkyDocsClipboardModule }, { kind: "directive", type: SkyDocsClipboardButtonDirective, selector: "[skyDocsClipboardButton]", inputs: ["clipboardTarget", "copySuccessMessage"] }, { kind: "ngmodule", type: SkyIconModule }, { kind: "component", type: i2.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }, { kind: "ngmodule", type: SkyDocsToolsResourcesModule }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
228
|
+
}
|
|
229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeSnippetToolbarComponent, decorators: [{
|
|
230
|
+
type: Component,
|
|
231
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
232
|
+
class: 'sky-margin-stacked-lg',
|
|
233
|
+
}, imports: [SkyDocsClipboardModule, SkyIconModule, SkyDocsToolsResourcesModule], selector: 'sky-docs-code-snippet-toolbar', template: `
|
|
234
|
+
<button
|
|
235
|
+
class="sky-btn sky-btn-default"
|
|
236
|
+
type="button"
|
|
237
|
+
skyDocsClipboardButton
|
|
238
|
+
[clipboardTarget]="codeRef()"
|
|
239
|
+
[copySuccessMessage]="
|
|
240
|
+
'sky_docs_code_snippet_copy_to_clipboard_success_message'
|
|
241
|
+
| skyLibResources
|
|
242
|
+
"
|
|
243
|
+
>
|
|
244
|
+
<sky-icon iconName="clipboard-multiple" />
|
|
245
|
+
{{
|
|
246
|
+
'sky_docs_code_snippet_copy_to_clipboard_button_label' | skyLibResources
|
|
247
|
+
}}
|
|
248
|
+
</button>
|
|
249
|
+
`, styles: [":host{display:block}\n"] }]
|
|
250
|
+
}] });
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Used to wrap a content child `code` element.
|
|
254
|
+
* @internal
|
|
255
|
+
*/
|
|
256
|
+
class SkyDocsCodeSnippetWrapperComponent {
|
|
257
|
+
constructor() {
|
|
258
|
+
this.bordered = input(false, { transform: booleanAttribute });
|
|
259
|
+
this.hideToolbar = input(false, { transform: booleanAttribute });
|
|
260
|
+
this.stacked = input(false, { transform: booleanAttribute });
|
|
261
|
+
}
|
|
262
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeSnippetWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
263
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SkyDocsCodeSnippetWrapperComponent, isStandalone: true, selector: "sky-docs-code-snippet:not([code])", inputs: { bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, hideToolbar: { classPropertyName: "hideToolbar", publicName: "hideToolbar", isSignal: true, isRequired: false, transformFunction: null }, stacked: { classPropertyName: "stacked", publicName: "stacked", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.sky-margin-stacked-lg": "stacked()", "class.sky-elevation-0-bordered": "bordered()", "class.sky-padding-even-xl": "bordered()", "class.sky-rounded-corners": "bordered()" } }, ngImport: i0, template: `
|
|
264
|
+
@if (!hideToolbar()) {
|
|
265
|
+
<sky-docs-code-snippet-toolbar [codeRef]="codeRef" />
|
|
266
|
+
}
|
|
267
|
+
<pre #codeRef><ng-content select="code" /></pre>
|
|
268
|
+
`, isInline: true, styles: ["sky-docs-code-snippet{overflow-x:auto;display:flex;flex-direction:column;align-items:start;font-size:14px;line-height:1.5}sky-docs-code-snippet pre{margin:0}sky-docs-code-snippet::-webkit-scrollbar{-webkit-appearance:none;height:8px}sky-docs-code-snippet::-webkit-scrollbar-track{background-color:color-mix(in srgb,var(--sky-border-color-neutral-medium-dark) 5%,transparent);border-radius:var(--sky-border-radius-s)}sky-docs-code-snippet::-webkit-scrollbar-thumb{background-color:color-mix(in srgb,var(--sky-border-color-neutral-medium-dark) 20%,transparent);border-radius:var(--sky-border-radius-s)}\n", "sky-docs-code-snippet .hljs-keyword,sky-docs-code-snippet .hljs-doctag,sky-docs-code-snippet .hljs-variable.language_,sky-docs-code-snippet .hljs-literal,sky-docs-code-snippet .hljs-function{color:#00f}sky-docs-code-snippet .hljs-meta,sky-docs-code-snippet .hljs-title.class_,sky-docs-code-snippet .hljs-built_in,sky-docs-code-snippet .hljs-params{color:#267f99}sky-docs-code-snippet .hljs-attribute,sky-docs-code-snippet .hljs-title.function_{color:#795e26}sky-docs-code-snippet .hljs-attr{color:#001080}sky-docs-code-snippet .hljs-string{color:#a31515}sky-docs-code-snippet .hljs-comment{color:green}sky-docs-code-snippet .hljs-attr,sky-docs-code-snippet .hljs-property,sky-docs-code-snippet .hljs-variable.constant_{color:#0070c1}sky-docs-code-snippet .hljs-number{color:#098658}sky-docs-code-snippet .hljs-tag .hljs-name{color:maroon}sky-docs-code-snippet .hljs-tag .hljs-attr{color:#e50000}sky-docs-code-snippet .hljs-tag .hljs-string{color:#00f}\n"], dependencies: [{ kind: "component", type: SkyDocsCodeSnippetToolbarComponent, selector: "sky-docs-code-snippet-toolbar", inputs: ["codeRef"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
269
|
+
}
|
|
270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeSnippetWrapperComponent, decorators: [{
|
|
271
|
+
type: Component,
|
|
272
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
273
|
+
'[class.sky-margin-stacked-lg]': 'stacked()',
|
|
274
|
+
'[class.sky-elevation-0-bordered]': 'bordered()',
|
|
275
|
+
'[class.sky-padding-even-xl]': 'bordered()',
|
|
276
|
+
'[class.sky-rounded-corners]': 'bordered()',
|
|
277
|
+
}, imports: [SkyDocsCodeSnippetToolbarComponent], selector: 'sky-docs-code-snippet:not([code])', template: `
|
|
278
|
+
@if (!hideToolbar()) {
|
|
279
|
+
<sky-docs-code-snippet-toolbar [codeRef]="codeRef" />
|
|
280
|
+
}
|
|
281
|
+
<pre #codeRef><ng-content select="code" /></pre>
|
|
282
|
+
`, styles: ["sky-docs-code-snippet{overflow-x:auto;display:flex;flex-direction:column;align-items:start;font-size:14px;line-height:1.5}sky-docs-code-snippet pre{margin:0}sky-docs-code-snippet::-webkit-scrollbar{-webkit-appearance:none;height:8px}sky-docs-code-snippet::-webkit-scrollbar-track{background-color:color-mix(in srgb,var(--sky-border-color-neutral-medium-dark) 5%,transparent);border-radius:var(--sky-border-radius-s)}sky-docs-code-snippet::-webkit-scrollbar-thumb{background-color:color-mix(in srgb,var(--sky-border-color-neutral-medium-dark) 20%,transparent);border-radius:var(--sky-border-radius-s)}\n", "sky-docs-code-snippet .hljs-keyword,sky-docs-code-snippet .hljs-doctag,sky-docs-code-snippet .hljs-variable.language_,sky-docs-code-snippet .hljs-literal,sky-docs-code-snippet .hljs-function{color:#00f}sky-docs-code-snippet .hljs-meta,sky-docs-code-snippet .hljs-title.class_,sky-docs-code-snippet .hljs-built_in,sky-docs-code-snippet .hljs-params{color:#267f99}sky-docs-code-snippet .hljs-attribute,sky-docs-code-snippet .hljs-title.function_{color:#795e26}sky-docs-code-snippet .hljs-attr{color:#001080}sky-docs-code-snippet .hljs-string{color:#a31515}sky-docs-code-snippet .hljs-comment{color:green}sky-docs-code-snippet .hljs-attr,sky-docs-code-snippet .hljs-property,sky-docs-code-snippet .hljs-variable.constant_{color:#0070c1}sky-docs-code-snippet .hljs-number{color:#098658}sky-docs-code-snippet .hljs-tag .hljs-name{color:maroon}sky-docs-code-snippet .hljs-tag .hljs-attr{color:#e50000}sky-docs-code-snippet .hljs-tag .hljs-string{color:#00f}\n"] }]
|
|
283
|
+
}] });
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* @internal
|
|
287
|
+
*/
|
|
288
|
+
class SkyDocsCodeHighlightService {
|
|
289
|
+
constructor() {
|
|
290
|
+
highlight.registerLanguage('html', hlXml);
|
|
291
|
+
highlight.registerLanguage('markup', hlXml);
|
|
292
|
+
highlight.registerLanguage('js', hlJavaScript);
|
|
293
|
+
highlight.registerLanguage('javascript', hlJavaScript);
|
|
294
|
+
highlight.registerLanguage('css', hlCss);
|
|
295
|
+
highlight.registerLanguage('scss', hlScss);
|
|
296
|
+
highlight.registerLanguage('ts', hlTypeScript);
|
|
297
|
+
highlight.registerLanguage('typescript', hlTypeScript);
|
|
298
|
+
}
|
|
299
|
+
highlight(code, language) {
|
|
300
|
+
const highlighted = highlight.highlight(code, {
|
|
301
|
+
language,
|
|
302
|
+
});
|
|
303
|
+
return highlighted.value;
|
|
304
|
+
}
|
|
305
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeHighlightService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
306
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeHighlightService, providedIn: 'root' }); }
|
|
307
|
+
}
|
|
308
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeHighlightService, decorators: [{
|
|
309
|
+
type: Injectable,
|
|
310
|
+
args: [{ providedIn: 'root' }]
|
|
311
|
+
}], ctorParameters: () => [] });
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Highlights the provided code.
|
|
315
|
+
* @internal
|
|
316
|
+
*/
|
|
317
|
+
class SkyDocsCodeSnippetComponent {
|
|
318
|
+
constructor() {
|
|
319
|
+
this.#highlightSvc = inject(SkyDocsCodeHighlightService);
|
|
107
320
|
this.#sanitizer = inject(DomSanitizer);
|
|
108
321
|
this.code = input.required();
|
|
109
322
|
this.language = input.required();
|
|
110
|
-
this.
|
|
111
|
-
this.
|
|
323
|
+
this.bordered = input(false, { transform: booleanAttribute });
|
|
324
|
+
this.hideToolbar = input(false, { transform: booleanAttribute });
|
|
325
|
+
this.stacked = input(false, { transform: booleanAttribute });
|
|
326
|
+
this.highlighted = computed(() => {
|
|
112
327
|
const code = this.code();
|
|
113
328
|
const language = this.language();
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
});
|
|
117
|
-
return this.#sanitizer.bypassSecurityTrustHtml(formatted.value);
|
|
329
|
+
const highlighted = this.#highlightSvc.highlight(code, language);
|
|
330
|
+
return this.#sanitizer.bypassSecurityTrustHtml(highlighted);
|
|
118
331
|
});
|
|
119
|
-
highlight.registerLanguage('html', hlXml);
|
|
120
|
-
highlight.registerLanguage('js', hlJavaScript);
|
|
121
|
-
highlight.registerLanguage('scss', hlScss);
|
|
122
|
-
highlight.registerLanguage('ts', hlTypeScript);
|
|
123
332
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
333
|
+
#highlightSvc;
|
|
334
|
+
#sanitizer;
|
|
335
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeSnippetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
336
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SkyDocsCodeSnippetComponent, isStandalone: true, selector: "sky-docs-code-snippet[code]", inputs: { code: { classPropertyName: "code", publicName: "code", isSignal: true, isRequired: true, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: true, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, hideToolbar: { classPropertyName: "hideToolbar", publicName: "hideToolbar", isSignal: true, isRequired: false, transformFunction: null }, stacked: { classPropertyName: "stacked", publicName: "stacked", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.sky-margin-stacked-lg": "stacked()", "class.sky-elevation-0-bordered": "bordered()", "class.sky-padding-even-xl": "bordered()", "class.sky-rounded-corners": "bordered()" } }, ngImport: i0, template: `
|
|
337
|
+
@if (!hideToolbar()) {
|
|
338
|
+
<sky-docs-code-snippet-toolbar [codeRef]="codeRef" />
|
|
129
339
|
}
|
|
130
|
-
|
|
131
|
-
|
|
340
|
+
<pre #codeRef><code [innerHTML]="highlighted()"></code></pre>
|
|
341
|
+
`, isInline: true, styles: ["sky-docs-code-snippet{overflow-x:auto;display:flex;flex-direction:column;align-items:start;font-size:14px;line-height:1.5}sky-docs-code-snippet pre{margin:0}sky-docs-code-snippet::-webkit-scrollbar{-webkit-appearance:none;height:8px}sky-docs-code-snippet::-webkit-scrollbar-track{background-color:color-mix(in srgb,var(--sky-border-color-neutral-medium-dark) 5%,transparent);border-radius:var(--sky-border-radius-s)}sky-docs-code-snippet::-webkit-scrollbar-thumb{background-color:color-mix(in srgb,var(--sky-border-color-neutral-medium-dark) 20%,transparent);border-radius:var(--sky-border-radius-s)}\n", "sky-docs-code-snippet .hljs-keyword,sky-docs-code-snippet .hljs-doctag,sky-docs-code-snippet .hljs-variable.language_,sky-docs-code-snippet .hljs-literal,sky-docs-code-snippet .hljs-function{color:#00f}sky-docs-code-snippet .hljs-meta,sky-docs-code-snippet .hljs-title.class_,sky-docs-code-snippet .hljs-built_in,sky-docs-code-snippet .hljs-params{color:#267f99}sky-docs-code-snippet .hljs-attribute,sky-docs-code-snippet .hljs-title.function_{color:#795e26}sky-docs-code-snippet .hljs-attr{color:#001080}sky-docs-code-snippet .hljs-string{color:#a31515}sky-docs-code-snippet .hljs-comment{color:green}sky-docs-code-snippet .hljs-attr,sky-docs-code-snippet .hljs-property,sky-docs-code-snippet .hljs-variable.constant_{color:#0070c1}sky-docs-code-snippet .hljs-number{color:#098658}sky-docs-code-snippet .hljs-tag .hljs-name{color:maroon}sky-docs-code-snippet .hljs-tag .hljs-attr{color:#e50000}sky-docs-code-snippet .hljs-tag .hljs-string{color:#00f}\n"], dependencies: [{ kind: "component", type: SkyDocsCodeSnippetToolbarComponent, selector: "sky-docs-code-snippet-toolbar", inputs: ["codeRef"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
132
342
|
}
|
|
133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type:
|
|
343
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeSnippetComponent, decorators: [{
|
|
134
344
|
type: Component,
|
|
135
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None,
|
|
136
|
-
|
|
345
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
346
|
+
'[class.sky-margin-stacked-lg]': 'stacked()',
|
|
347
|
+
'[class.sky-elevation-0-bordered]': 'bordered()',
|
|
348
|
+
'[class.sky-padding-even-xl]': 'bordered()',
|
|
349
|
+
'[class.sky-rounded-corners]': 'bordered()',
|
|
350
|
+
}, imports: [SkyDocsCodeSnippetToolbarComponent], selector: 'sky-docs-code-snippet[code]', template: `
|
|
351
|
+
@if (!hideToolbar()) {
|
|
352
|
+
<sky-docs-code-snippet-toolbar [codeRef]="codeRef" />
|
|
353
|
+
}
|
|
354
|
+
<pre #codeRef><code [innerHTML]="highlighted()"></code></pre>
|
|
355
|
+
`, styles: ["sky-docs-code-snippet{overflow-x:auto;display:flex;flex-direction:column;align-items:start;font-size:14px;line-height:1.5}sky-docs-code-snippet pre{margin:0}sky-docs-code-snippet::-webkit-scrollbar{-webkit-appearance:none;height:8px}sky-docs-code-snippet::-webkit-scrollbar-track{background-color:color-mix(in srgb,var(--sky-border-color-neutral-medium-dark) 5%,transparent);border-radius:var(--sky-border-radius-s)}sky-docs-code-snippet::-webkit-scrollbar-thumb{background-color:color-mix(in srgb,var(--sky-border-color-neutral-medium-dark) 20%,transparent);border-radius:var(--sky-border-radius-s)}\n", "sky-docs-code-snippet .hljs-keyword,sky-docs-code-snippet .hljs-doctag,sky-docs-code-snippet .hljs-variable.language_,sky-docs-code-snippet .hljs-literal,sky-docs-code-snippet .hljs-function{color:#00f}sky-docs-code-snippet .hljs-meta,sky-docs-code-snippet .hljs-title.class_,sky-docs-code-snippet .hljs-built_in,sky-docs-code-snippet .hljs-params{color:#267f99}sky-docs-code-snippet .hljs-attribute,sky-docs-code-snippet .hljs-title.function_{color:#795e26}sky-docs-code-snippet .hljs-attr{color:#001080}sky-docs-code-snippet .hljs-string{color:#a31515}sky-docs-code-snippet .hljs-comment{color:green}sky-docs-code-snippet .hljs-attr,sky-docs-code-snippet .hljs-property,sky-docs-code-snippet .hljs-variable.constant_{color:#0070c1}sky-docs-code-snippet .hljs-number{color:#098658}sky-docs-code-snippet .hljs-tag .hljs-name{color:maroon}sky-docs-code-snippet .hljs-tag .hljs-attr{color:#e50000}sky-docs-code-snippet .hljs-tag .hljs-string{color:#00f}\n"] }]
|
|
356
|
+
}] });
|
|
137
357
|
|
|
138
358
|
/**
|
|
139
359
|
* @internal
|
|
140
360
|
*/
|
|
141
|
-
class
|
|
142
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type:
|
|
143
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type:
|
|
144
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type:
|
|
361
|
+
class SkyDocsCodeSnippetModule {
|
|
362
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeSnippetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
363
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeSnippetModule, imports: [SkyDocsCodeSnippetComponent, SkyDocsCodeSnippetWrapperComponent], exports: [SkyDocsCodeSnippetComponent, SkyDocsCodeSnippetWrapperComponent] }); }
|
|
364
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeSnippetModule, imports: [SkyDocsCodeSnippetComponent, SkyDocsCodeSnippetWrapperComponent] }); }
|
|
145
365
|
}
|
|
146
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type:
|
|
366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeSnippetModule, decorators: [{
|
|
147
367
|
type: NgModule,
|
|
148
368
|
args: [{
|
|
149
|
-
imports: [
|
|
150
|
-
exports: [
|
|
369
|
+
imports: [SkyDocsCodeSnippetComponent, SkyDocsCodeSnippetWrapperComponent],
|
|
370
|
+
exports: [SkyDocsCodeSnippetComponent, SkyDocsCodeSnippetWrapperComponent],
|
|
151
371
|
}]
|
|
152
372
|
}] });
|
|
153
373
|
|
|
@@ -158,7 +378,7 @@ const TEMPLATE_FILES = ['package.json', 'package-lock.json'];
|
|
|
158
378
|
/**
|
|
159
379
|
* @internal
|
|
160
380
|
*/
|
|
161
|
-
class
|
|
381
|
+
class SkyDocsStackBlitzService {
|
|
162
382
|
#http = inject(HttpClient, { optional: true });
|
|
163
383
|
#assetsSvc = inject(SkyAppAssetsService, { optional: true });
|
|
164
384
|
async launch(config) {
|
|
@@ -462,10 +682,10 @@ context.keys().map(context);
|
|
|
462
682
|
return undefined;
|
|
463
683
|
});
|
|
464
684
|
}
|
|
465
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type:
|
|
466
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type:
|
|
685
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsStackBlitzService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
686
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsStackBlitzService, providedIn: 'root' }); }
|
|
467
687
|
}
|
|
468
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type:
|
|
688
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsStackBlitzService, decorators: [{
|
|
469
689
|
type: Injectable,
|
|
470
690
|
args: [{ providedIn: 'root' }]
|
|
471
691
|
}] });
|
|
@@ -473,23 +693,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
473
693
|
/**
|
|
474
694
|
* @internal
|
|
475
695
|
*/
|
|
476
|
-
class
|
|
696
|
+
class SkyDocsCodeExampleViewerComponent {
|
|
477
697
|
constructor() {
|
|
478
|
-
this.#stackblitzSvc = inject(
|
|
698
|
+
this.#stackblitzSvc = inject(SkyDocsStackBlitzService);
|
|
479
699
|
this.componentName = input.required();
|
|
480
700
|
this.componentSelector = input.required();
|
|
481
701
|
this.componentType = input.required();
|
|
482
|
-
this.demoHidden = input(false);
|
|
483
702
|
this.files = input.required();
|
|
484
703
|
this.headingText = input.required();
|
|
485
704
|
this.primaryFile = input.required();
|
|
705
|
+
this.demoHidden = input(false, { transform: booleanAttribute });
|
|
486
706
|
this.stacked = input(false, { transform: booleanAttribute });
|
|
487
707
|
this.isCodeVisible = signal(false);
|
|
488
708
|
}
|
|
489
709
|
#stackblitzSvc;
|
|
490
710
|
getCodeLanguage(fileName) {
|
|
491
711
|
const extension = fileName.split('.').pop();
|
|
492
|
-
|
|
712
|
+
assertCodeHighlightLanguage(extension);
|
|
493
713
|
return extension;
|
|
494
714
|
}
|
|
495
715
|
launchStackBlitz() {
|
|
@@ -505,10 +725,10 @@ class SkyCodeExampleViewerComponent {
|
|
|
505
725
|
const isCodeVisible = this.isCodeVisible();
|
|
506
726
|
this.isCodeVisible.set(!isCodeVisible);
|
|
507
727
|
}
|
|
508
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type:
|
|
509
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type:
|
|
728
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeExampleViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
729
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SkyDocsCodeExampleViewerComponent, isStandalone: true, selector: "sky-docs-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 }, 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 }, demoHidden: { classPropertyName: "demoHidden", publicName: "demoHidden", isSignal: true, isRequired: false, 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 {{\n 'sky_docs_code_example_viewer_demo_stack_blitz_button' | skyLibResources\n }}\n </button>\n </sky-box-controls>\n\n <sky-box-content>\n <div\n class=\"sky-docs-code-example-viewer-demo sky-padding-even-md sky-margin-stacked-lg\"\n >\n @if (!demoHidden()) {\n <ng-template [ngComponentOutlet]=\"componentType()\" />\n } @else {\n {{\n 'sky_docs_code_example_viewer_demo_hidden_message' | skyLibResources\n }}\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_docs_code_example_viewer_hide_code_button_label'\n | skyLibResources)\n : ('sky_docs_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-docs-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-docs-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.λ41, selector: "sky-box", inputs: ["headingText", "headingHidden", "headingLevel", "headingStyle", "helpPopoverContent", "helpPopoverTitle", "helpKey", "ariaLabel", "ariaLabelledBy", "ariaRole"] }, { kind: "component", type: i1.λ43, selector: "sky-box-content" }, { kind: "component", type: i1.λ44, selector: "sky-box-controls" }, { kind: "ngmodule", type: SkyDocsCodeSnippetModule }, { kind: "component", type: SkyDocsCodeSnippetComponent, selector: "sky-docs-code-snippet[code]", inputs: ["code", "language", "bordered", "hideToolbar", "stacked"] }, { kind: "ngmodule", type: SkyDocsToolsResourcesModule }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "ngmodule", type: SkyIconModule }, { kind: "component", type: i2.λ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
730
|
}
|
|
511
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type:
|
|
731
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeExampleViewerComponent, decorators: [{
|
|
512
732
|
type: Component,
|
|
513
733
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
514
734
|
'[class.sky-margin-stacked-xl]': 'stacked()',
|
|
@@ -516,27 +736,1127 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
516
736
|
KeyValuePipe,
|
|
517
737
|
NgComponentOutlet,
|
|
518
738
|
SkyBoxModule,
|
|
519
|
-
|
|
739
|
+
SkyDocsCodeSnippetModule,
|
|
520
740
|
SkyDocsToolsResourcesModule,
|
|
521
741
|
SkyIconModule,
|
|
522
742
|
SkyIdModule,
|
|
523
743
|
SkyVerticalTabsetModule,
|
|
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 {{
|
|
744
|
+
], selector: 'sky-docs-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 {{\n 'sky_docs_code_example_viewer_demo_stack_blitz_button' | skyLibResources\n }}\n </button>\n </sky-box-controls>\n\n <sky-box-content>\n <div\n class=\"sky-docs-code-example-viewer-demo sky-padding-even-md sky-margin-stacked-lg\"\n >\n @if (!demoHidden()) {\n <ng-template [ngComponentOutlet]=\"componentType()\" />\n } @else {\n {{\n 'sky_docs_code_example_viewer_demo_hidden_message' | skyLibResources\n }}\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_docs_code_example_viewer_hide_code_button_label'\n | skyLibResources)\n : ('sky_docs_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-docs-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-docs-code-example-viewer-demo{border:1px solid var(--sky-border-color-neutral-medium)}\n"] }]
|
|
745
|
+
}] });
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* @internal
|
|
749
|
+
*/
|
|
750
|
+
class SkyDocsCodeExampleViewerModule {
|
|
751
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeExampleViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
752
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeExampleViewerModule, imports: [SkyDocsCodeExampleViewerComponent], exports: [SkyDocsCodeExampleViewerComponent] }); }
|
|
753
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeExampleViewerModule, imports: [SkyDocsCodeExampleViewerComponent] }); }
|
|
754
|
+
}
|
|
755
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeExampleViewerModule, decorators: [{
|
|
756
|
+
type: NgModule,
|
|
757
|
+
args: [{
|
|
758
|
+
imports: [SkyDocsCodeExampleViewerComponent],
|
|
759
|
+
exports: [SkyDocsCodeExampleViewerComponent],
|
|
760
|
+
}]
|
|
761
|
+
}] });
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* @internal
|
|
765
|
+
*/
|
|
766
|
+
class SkyDocsCodeHighlightPipe {
|
|
767
|
+
#highlightSvc = inject(SkyDocsCodeHighlightService);
|
|
768
|
+
transform(value, language) {
|
|
769
|
+
return this.#highlightSvc.highlight(value, language);
|
|
770
|
+
}
|
|
771
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeHighlightPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
772
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeHighlightPipe, isStandalone: true, name: "skyDocsCodeHighlight" }); }
|
|
773
|
+
}
|
|
774
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeHighlightPipe, decorators: [{
|
|
775
|
+
type: Pipe,
|
|
776
|
+
args: [{
|
|
777
|
+
name: 'skyDocsCodeHighlight',
|
|
778
|
+
}]
|
|
779
|
+
}] });
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* @internal
|
|
783
|
+
*/
|
|
784
|
+
class SkyDocsHeadingAnchorService {
|
|
785
|
+
constructor() {
|
|
786
|
+
this.#anchors = [];
|
|
787
|
+
this.#anchorsChange = new BehaviorSubject([]);
|
|
788
|
+
this.anchorsChange = this.#anchorsChange.asObservable();
|
|
789
|
+
}
|
|
790
|
+
#anchors;
|
|
791
|
+
#anchorsChange;
|
|
792
|
+
ngOnDestroy() {
|
|
793
|
+
this.#anchors = [];
|
|
794
|
+
this.#anchorsChange.complete();
|
|
795
|
+
}
|
|
796
|
+
register(anchor) {
|
|
797
|
+
if (!this.#anchors.includes(anchor)) {
|
|
798
|
+
this.#anchors.push(anchor);
|
|
799
|
+
this.#anchorsChange.next(this.#getLinks());
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
unregister(anchor) {
|
|
803
|
+
if (this.#anchors.includes(anchor)) {
|
|
804
|
+
this.#anchors.splice(this.#anchors.indexOf(anchor));
|
|
805
|
+
this.#anchorsChange.next(this.#getLinks());
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
#getLinks() {
|
|
809
|
+
const els = document.querySelectorAll('sky-docs-heading-anchor');
|
|
810
|
+
const anchorsSorted = [];
|
|
811
|
+
// Since heading anchors can be registered at any point in the lifecycle
|
|
812
|
+
// of the app, we need to sort the links by their location in the DOM,
|
|
813
|
+
// rather than the order at which they were registered.
|
|
814
|
+
for (const el of els) {
|
|
815
|
+
this.#anchors.forEach((anchor) => {
|
|
816
|
+
if (anchor.equals(el)) {
|
|
817
|
+
anchorsSorted.push(anchor);
|
|
818
|
+
}
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
return anchorsSorted.map((a) => {
|
|
822
|
+
return {
|
|
823
|
+
anchorId: a.anchorId(),
|
|
824
|
+
categoryColor: a.categoryColor(),
|
|
825
|
+
categoryTemplate: a.categoryTemplate(),
|
|
826
|
+
categoryText: a.categoryText(),
|
|
827
|
+
text: a.headingText(),
|
|
828
|
+
};
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsHeadingAnchorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
832
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsHeadingAnchorService }); }
|
|
833
|
+
}
|
|
834
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsHeadingAnchorService, decorators: [{
|
|
835
|
+
type: Injectable
|
|
836
|
+
}] });
|
|
837
|
+
|
|
838
|
+
const DEFAULT_HEADING_LEVEL = 2;
|
|
839
|
+
/**
|
|
840
|
+
* @internal
|
|
841
|
+
*/
|
|
842
|
+
class SkyDocsHeadingAnchorComponent {
|
|
843
|
+
constructor() {
|
|
844
|
+
this.#elementRef = inject(ElementRef);
|
|
845
|
+
this.#anchorSvc = inject(SkyDocsHeadingAnchorService, { optional: true });
|
|
846
|
+
this.anchorId = input.required();
|
|
847
|
+
this.headingText = input.required();
|
|
848
|
+
this.headingTextFormat = input('normal');
|
|
849
|
+
this.categoryColor = input();
|
|
850
|
+
this.categoryTemplate = input();
|
|
851
|
+
this.categoryText = input();
|
|
852
|
+
this.headingLevel = input(DEFAULT_HEADING_LEVEL, {
|
|
853
|
+
transform: (value) => {
|
|
854
|
+
const numValue = numberAttribute(value);
|
|
855
|
+
if (numValue > 0 && numValue < 7) {
|
|
856
|
+
return numValue;
|
|
857
|
+
}
|
|
858
|
+
return DEFAULT_HEADING_LEVEL;
|
|
859
|
+
},
|
|
860
|
+
});
|
|
861
|
+
this.strikethrough = input(false, { transform: booleanAttribute });
|
|
862
|
+
}
|
|
863
|
+
#elementRef;
|
|
864
|
+
#anchorSvc;
|
|
865
|
+
equals(el) {
|
|
866
|
+
return this.#elementRef.nativeElement === el;
|
|
867
|
+
}
|
|
868
|
+
ngAfterViewInit() {
|
|
869
|
+
this.#anchorSvc?.register(this);
|
|
870
|
+
}
|
|
871
|
+
ngOnDestroy() {
|
|
872
|
+
this.#anchorSvc?.unregister(this);
|
|
873
|
+
}
|
|
874
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsHeadingAnchorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
875
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SkyDocsHeadingAnchorComponent, isStandalone: true, selector: "sky-docs-heading-anchor", inputs: { anchorId: { classPropertyName: "anchorId", publicName: "anchorId", isSignal: true, isRequired: true, transformFunction: null }, headingText: { classPropertyName: "headingText", publicName: "headingText", isSignal: true, isRequired: true, transformFunction: null }, headingTextFormat: { classPropertyName: "headingTextFormat", publicName: "headingTextFormat", isSignal: true, isRequired: false, transformFunction: null }, categoryColor: { classPropertyName: "categoryColor", publicName: "categoryColor", isSignal: true, isRequired: false, transformFunction: null }, categoryTemplate: { classPropertyName: "categoryTemplate", publicName: "categoryTemplate", isSignal: true, isRequired: false, transformFunction: null }, categoryText: { classPropertyName: "categoryText", publicName: "categoryText", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, strikethrough: { classPropertyName: "strikethrough", publicName: "strikethrough", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "anchorId()" } }, ngImport: i0, template: "@switch (headingLevel()) {\n @case (1) {\n <h1 class=\"sky-docs-heading-anchor-heading\">\n <ng-container [ngTemplateOutlet]=\"headingTextRef\" />\n </h1>\n }\n @case (2) {\n <h2 class=\"sky-docs-heading-anchor-heading\">\n <ng-container [ngTemplateOutlet]=\"headingTextRef\" />\n </h2>\n }\n @case (3) {\n <h3 class=\"sky-docs-heading-anchor-heading\">\n <ng-container [ngTemplateOutlet]=\"headingTextRef\" />\n </h3>\n }\n @case (4) {\n <h4 class=\"sky-docs-heading-anchor-heading\">\n <ng-container [ngTemplateOutlet]=\"headingTextRef\" />\n </h4>\n }\n @case (5) {\n <h5 class=\"sky-docs-heading-anchor-heading\">\n <ng-container [ngTemplateOutlet]=\"headingTextRef\" />\n </h5>\n }\n @case (6) {\n <h6 class=\"sky-docs-heading-anchor-heading\">\n <ng-container [ngTemplateOutlet]=\"headingTextRef\" />\n </h6>\n }\n}\n\n@if (categoryColor(); as categoryColor) {\n <sky-docs-category-tag [color]=\"categoryColor\">\n @if (categoryTemplate(); as categoryTemplate) {\n <ng-container [ngTemplateOutlet]=\"categoryTemplate\" />\n } @else {\n {{ categoryText() }}\n }\n </sky-docs-category-tag>\n}\n\n<ng-content />\n\n<ng-template #headingTextRef>\n <a\n class=\"sky-docs-heading-anchor-link\"\n queryParamsHandling=\"merge\"\n [fragment]=\"anchorId()\"\n [routerLink]=\"[]\"\n >\n <sky-icon iconName=\"link\" />\n <span class=\"sky-screen-reader-only\"\n >Link for section titled {{ headingText() }}</span\n >\n </a>\n <span skyTrim [class.sky-docs-text-strikethrough]=\"strikethrough()\">\n @if (headingTextFormat() === 'code') {\n <code>{{ headingText() }}</code>\n } @else {\n {{ headingText() }}\n }\n </span>\n</ng-template>\n", styles: [":host{display:flex;flex-wrap:wrap;align-items:center;gap:10px}:host([id]){padding-top:15px;margin-top:-15px}.sky-docs-heading-anchor-heading{word-break:break-all;position:relative;margin:0}.sky-docs-heading-anchor-heading:hover .sky-docs-heading-anchor-link{opacity:1}.sky-docs-heading-anchor-link{opacity:0;position:absolute;transition:opacity .25s;display:inline-block;left:calc(-1em - 1px);top:-2px}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: SkyDocsCategoryTagModule }, { kind: "component", type: SkyDocsCategoryTagComponent, selector: "sky-docs-category-tag", inputs: ["color"] }, { kind: "ngmodule", type: SkyIconModule }, { kind: "component", type: i2.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }, { kind: "ngmodule", type: SkyTrimModule }, { kind: "directive", type: i5.λ4, selector: "[skyTrim]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
876
|
+
}
|
|
877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsHeadingAnchorComponent, decorators: [{
|
|
878
|
+
type: Component,
|
|
879
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
880
|
+
'[attr.id]': 'anchorId()',
|
|
881
|
+
}, imports: [
|
|
882
|
+
NgTemplateOutlet,
|
|
883
|
+
RouterLink,
|
|
884
|
+
SkyDocsCategoryTagModule,
|
|
885
|
+
SkyIconModule,
|
|
886
|
+
SkyTrimModule,
|
|
887
|
+
], selector: 'sky-docs-heading-anchor', template: "@switch (headingLevel()) {\n @case (1) {\n <h1 class=\"sky-docs-heading-anchor-heading\">\n <ng-container [ngTemplateOutlet]=\"headingTextRef\" />\n </h1>\n }\n @case (2) {\n <h2 class=\"sky-docs-heading-anchor-heading\">\n <ng-container [ngTemplateOutlet]=\"headingTextRef\" />\n </h2>\n }\n @case (3) {\n <h3 class=\"sky-docs-heading-anchor-heading\">\n <ng-container [ngTemplateOutlet]=\"headingTextRef\" />\n </h3>\n }\n @case (4) {\n <h4 class=\"sky-docs-heading-anchor-heading\">\n <ng-container [ngTemplateOutlet]=\"headingTextRef\" />\n </h4>\n }\n @case (5) {\n <h5 class=\"sky-docs-heading-anchor-heading\">\n <ng-container [ngTemplateOutlet]=\"headingTextRef\" />\n </h5>\n }\n @case (6) {\n <h6 class=\"sky-docs-heading-anchor-heading\">\n <ng-container [ngTemplateOutlet]=\"headingTextRef\" />\n </h6>\n }\n}\n\n@if (categoryColor(); as categoryColor) {\n <sky-docs-category-tag [color]=\"categoryColor\">\n @if (categoryTemplate(); as categoryTemplate) {\n <ng-container [ngTemplateOutlet]=\"categoryTemplate\" />\n } @else {\n {{ categoryText() }}\n }\n </sky-docs-category-tag>\n}\n\n<ng-content />\n\n<ng-template #headingTextRef>\n <a\n class=\"sky-docs-heading-anchor-link\"\n queryParamsHandling=\"merge\"\n [fragment]=\"anchorId()\"\n [routerLink]=\"[]\"\n >\n <sky-icon iconName=\"link\" />\n <span class=\"sky-screen-reader-only\"\n >Link for section titled {{ headingText() }}</span\n >\n </a>\n <span skyTrim [class.sky-docs-text-strikethrough]=\"strikethrough()\">\n @if (headingTextFormat() === 'code') {\n <code>{{ headingText() }}</code>\n } @else {\n {{ headingText() }}\n }\n </span>\n</ng-template>\n", styles: [":host{display:flex;flex-wrap:wrap;align-items:center;gap:10px}:host([id]){padding-top:15px;margin-top:-15px}.sky-docs-heading-anchor-heading{word-break:break-all;position:relative;margin:0}.sky-docs-heading-anchor-heading:hover .sky-docs-heading-anchor-link{opacity:1}.sky-docs-heading-anchor-link{opacity:0;position:absolute;transition:opacity .25s;display:inline-block;left:calc(-1em - 1px);top:-2px}\n"] }]
|
|
888
|
+
}] });
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* @internal
|
|
892
|
+
*/
|
|
893
|
+
class SkyDocsHeadingAnchorModule {
|
|
894
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsHeadingAnchorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
895
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsHeadingAnchorModule, imports: [SkyDocsHeadingAnchorComponent], exports: [SkyDocsHeadingAnchorComponent] }); }
|
|
896
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsHeadingAnchorModule, imports: [SkyDocsHeadingAnchorComponent] }); }
|
|
897
|
+
}
|
|
898
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsHeadingAnchorModule, decorators: [{
|
|
899
|
+
type: NgModule,
|
|
900
|
+
args: [{
|
|
901
|
+
imports: [SkyDocsHeadingAnchorComponent],
|
|
902
|
+
exports: [SkyDocsHeadingAnchorComponent],
|
|
903
|
+
}]
|
|
525
904
|
}] });
|
|
526
905
|
|
|
527
906
|
/**
|
|
528
907
|
* @internal
|
|
529
908
|
*/
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
909
|
+
const SKY_DOCS_CODE_EXAMPLE_COMPONENT_TYPES = new InjectionToken('SKY_DOCS_CODE_EXAMPLE_COMPONENT_TYPES');
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* Provides code example declarations (e.g., Type<unknown>) to be used by the
|
|
913
|
+
* code example viewer to dynamically create each code example component.
|
|
914
|
+
* @example
|
|
915
|
+
* ```
|
|
916
|
+
* import * as examples from '@skyux/code-examples';
|
|
917
|
+
*
|
|
918
|
+
* provideSkyDocsCodeExampleTypes(examples);
|
|
919
|
+
* ```
|
|
920
|
+
* @internal
|
|
921
|
+
*/
|
|
922
|
+
function provideSkyDocsCodeExampleTypes(examples) {
|
|
923
|
+
return makeEnvironmentProviders([
|
|
924
|
+
{
|
|
925
|
+
provide: SKY_DOCS_CODE_EXAMPLE_COMPONENT_TYPES,
|
|
926
|
+
useValue: examples,
|
|
927
|
+
},
|
|
928
|
+
]);
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
/**
|
|
932
|
+
* @internal
|
|
933
|
+
*/
|
|
934
|
+
class SkyDocsTableOfContentsComponent {
|
|
935
|
+
constructor() {
|
|
936
|
+
this.headingText = input.required();
|
|
937
|
+
this.links = input.required();
|
|
938
|
+
}
|
|
939
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTableOfContentsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
940
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SkyDocsTableOfContentsComponent, isStandalone: true, selector: "sky-docs-toc", inputs: { headingText: { classPropertyName: "headingText", publicName: "headingText", isSignal: true, isRequired: true, transformFunction: null }, links: { classPropertyName: "links", publicName: "links", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<h3 class=\"sky-docs-toc-heading\">{{ headingText() }}</h3>\n<nav [attr.aria-label]=\"'Table of contents for ' + headingText()\">\n @for (link of links(); track link.anchorId) {\n <a\n class=\"sky-docs-toc-link sky-margin-stacked-sm\"\n queryParamsHandling=\"merge\"\n [class.sky-docs-toc-link-active]=\"link.active\"\n [fragment]=\"link.anchorId\"\n [routerLink]=\"[]\"\n >\n <span class=\"sky-docs-toc-link-text\">{{ link.text }}</span>\n @if (link.categoryColor) {\n <sky-docs-category-tag\n class=\"sky-docs-toc-link-category sky-font-body-sm\"\n [color]=\"link.categoryColor\"\n >\n @if (link.categoryTemplate) {\n <ng-container [ngTemplateOutlet]=\"link.categoryTemplate\" />\n } @else {\n {{ link.categoryText }}\n }\n </sky-docs-category-tag>\n }\n </a>\n }\n</nav>\n", styles: [":host{--sky-docs-toc-active-border-size: 4px;display:block}.sky-docs-toc-heading{padding:0 0 0 var(--sky-padding-even-md)}a.sky-docs-toc-link{display:flex;align-items:center;gap:var(--sky-margin-inline-xs);height:22px;padding:0 0 0 calc(var(--sky-padding-even-md) - var(--sky-docs-toc-active-border-size));border-left:var(--sky-docs-toc-active-border-size) solid transparent}a.sky-docs-toc-link:focus-visible,a.sky-docs-toc-link.sky-docs-toc-link-active{border-color:var(--sky-text-color-action-primary)}a.sky-docs-toc-link:hover{text-decoration:none}a.sky-docs-toc-link:hover .sky-docs-toc-link-text{text-decoration:underline}a.sky-docs-toc-link .sky-docs-toc-link-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}a.sky-docs-toc-link .sky-docs-toc-link-category{flex-shrink:1;white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: SkyDocsCategoryTagModule }, { kind: "component", type: SkyDocsCategoryTagComponent, selector: "sky-docs-category-tag", inputs: ["color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
941
|
+
}
|
|
942
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTableOfContentsComponent, decorators: [{
|
|
943
|
+
type: Component,
|
|
944
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, RouterLink, SkyDocsCategoryTagModule], selector: 'sky-docs-toc', template: "<h3 class=\"sky-docs-toc-heading\">{{ headingText() }}</h3>\n<nav [attr.aria-label]=\"'Table of contents for ' + headingText()\">\n @for (link of links(); track link.anchorId) {\n <a\n class=\"sky-docs-toc-link sky-margin-stacked-sm\"\n queryParamsHandling=\"merge\"\n [class.sky-docs-toc-link-active]=\"link.active\"\n [fragment]=\"link.anchorId\"\n [routerLink]=\"[]\"\n >\n <span class=\"sky-docs-toc-link-text\">{{ link.text }}</span>\n @if (link.categoryColor) {\n <sky-docs-category-tag\n class=\"sky-docs-toc-link-category sky-font-body-sm\"\n [color]=\"link.categoryColor\"\n >\n @if (link.categoryTemplate) {\n <ng-container [ngTemplateOutlet]=\"link.categoryTemplate\" />\n } @else {\n {{ link.categoryText }}\n }\n </sky-docs-category-tag>\n }\n </a>\n }\n</nav>\n", styles: [":host{--sky-docs-toc-active-border-size: 4px;display:block}.sky-docs-toc-heading{padding:0 0 0 var(--sky-padding-even-md)}a.sky-docs-toc-link{display:flex;align-items:center;gap:var(--sky-margin-inline-xs);height:22px;padding:0 0 0 calc(var(--sky-padding-even-md) - var(--sky-docs-toc-active-border-size));border-left:var(--sky-docs-toc-active-border-size) solid transparent}a.sky-docs-toc-link:focus-visible,a.sky-docs-toc-link.sky-docs-toc-link-active{border-color:var(--sky-text-color-action-primary)}a.sky-docs-toc-link:hover{text-decoration:none}a.sky-docs-toc-link:hover .sky-docs-toc-link-text{text-decoration:underline}a.sky-docs-toc-link .sky-docs-toc-link-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}a.sky-docs-toc-link .sky-docs-toc-link-category{flex-shrink:1;white-space:nowrap}\n"] }]
|
|
945
|
+
}] });
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* @internal
|
|
949
|
+
*/
|
|
950
|
+
class SkyDocsTableOfContentsPageComponent {
|
|
951
|
+
constructor() {
|
|
952
|
+
this.#anchors = toSignal(inject(SkyDocsHeadingAnchorService).anchorsChange);
|
|
953
|
+
this.#destroyRef = inject(DestroyRef);
|
|
954
|
+
this.#elementRef = inject(ElementRef);
|
|
955
|
+
this.#scrollableHostSvc = inject(SkyScrollableHostService);
|
|
956
|
+
this.menuHeadingText = input.required();
|
|
957
|
+
this.#activeAnchorIdOnScroll = signal(undefined);
|
|
958
|
+
this.#scrollOffset = 0;
|
|
959
|
+
this.breakpoint = toSignal(inject(SkyMediaQueryService).breakpointChange);
|
|
960
|
+
this.links = computed(() => {
|
|
961
|
+
if (this.breakpoint() === 'xs') {
|
|
962
|
+
return [];
|
|
963
|
+
}
|
|
964
|
+
const anchors = this.#anchors();
|
|
965
|
+
const activeAnchorId = this.#activeAnchorIdOnScroll();
|
|
966
|
+
return (anchors?.map((anchor) => {
|
|
967
|
+
const link = anchor;
|
|
968
|
+
link.active = link.anchorId === activeAnchorId;
|
|
969
|
+
return link;
|
|
970
|
+
}) ?? []);
|
|
971
|
+
});
|
|
972
|
+
}
|
|
973
|
+
#anchors;
|
|
974
|
+
#destroyRef;
|
|
975
|
+
#elementRef;
|
|
976
|
+
#scrollableHostSvc;
|
|
977
|
+
#activeAnchorIdOnScroll;
|
|
978
|
+
#scrollOffset;
|
|
979
|
+
ngAfterViewInit() {
|
|
980
|
+
const scrollEl = this.#scrollableHostSvc.getScrollableHost(this.#elementRef);
|
|
981
|
+
this.#scrollOffset = this.#getScrollOffset(scrollEl);
|
|
982
|
+
fromEvent(scrollEl, 'scroll')
|
|
983
|
+
.pipe(debounceTime(10), map(() => this.#getActiveLink()), distinctUntilChanged(), takeUntilDestroyed(this.#destroyRef))
|
|
984
|
+
.subscribe((activeLink) => {
|
|
985
|
+
this.#activeAnchorIdOnScroll.set(activeLink);
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
/**
|
|
989
|
+
* A link is considered active if the page is scrolled past the anchor without
|
|
990
|
+
* also being scrolled passed the next link.
|
|
991
|
+
*/
|
|
992
|
+
#getActiveLink() {
|
|
993
|
+
const anchors = this.#anchors();
|
|
994
|
+
if (anchors) {
|
|
995
|
+
for (let i = 0; i < anchors.length; i++) {
|
|
996
|
+
const anchor = anchors[i];
|
|
997
|
+
const nextAnchor = anchors[i + 1];
|
|
998
|
+
const rect = document
|
|
999
|
+
.getElementById(anchor.anchorId)
|
|
1000
|
+
?.getBoundingClientRect();
|
|
1001
|
+
const nextRect = document
|
|
1002
|
+
.getElementById(nextAnchor?.anchorId)
|
|
1003
|
+
?.getBoundingClientRect();
|
|
1004
|
+
if (rect &&
|
|
1005
|
+
Math.round(rect.top - this.#scrollOffset) <= 0 &&
|
|
1006
|
+
(nextRect === undefined ||
|
|
1007
|
+
Math.round(nextRect.top - this.#scrollOffset) > 0)) {
|
|
1008
|
+
return anchor.anchorId;
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
return undefined;
|
|
1013
|
+
}
|
|
1014
|
+
#getScrollOffset(scrollEl) {
|
|
1015
|
+
return scrollEl instanceof HTMLElement
|
|
1016
|
+
? scrollEl.getBoundingClientRect().top
|
|
1017
|
+
: 0;
|
|
1018
|
+
}
|
|
1019
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTableOfContentsPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1020
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SkyDocsTableOfContentsPageComponent, isStandalone: true, selector: "sky-docs-toc-page", inputs: { menuHeadingText: { classPropertyName: "menuHeadingText", publicName: "menuHeadingText", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.sky-docs-toc-page-with-links": "links().length > 0" } }, ngImport: i0, template: "@if (links().length > 0) {\n <div class=\"sky-docs-toc-menu\">\n <sky-docs-toc [headingText]=\"menuHeadingText()\" [links]=\"links()\" />\n </div>\n}\n<div class=\"sky-docs-toc-body\">\n <ng-content />\n</div>\n", styles: [":host{display:flex;align-items:flex-start;flex-direction:row-reverse;gap:40px}:host(:not(.sky-docs-toc-page-with-links)) .sky-docs-toc-body{width:100%}:host(.sky-docs-toc-page-with-links) .sky-docs-toc-body{min-width:50%;flex:1}:host(.sky-docs-toc-page-with-links) .sky-docs-toc-menu{position:sticky;top:0;flex-shrink:1;max-width:40%;min-width:20%}\n"], dependencies: [{ kind: "component", type: SkyDocsTableOfContentsComponent, selector: "sky-docs-toc", inputs: ["headingText", "links"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1021
|
+
}
|
|
1022
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTableOfContentsPageComponent, decorators: [{
|
|
1023
|
+
type: Component,
|
|
1024
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1025
|
+
'[class.sky-docs-toc-page-with-links]': 'links().length > 0',
|
|
1026
|
+
}, imports: [SkyDocsTableOfContentsComponent], selector: 'sky-docs-toc-page', template: "@if (links().length > 0) {\n <div class=\"sky-docs-toc-menu\">\n <sky-docs-toc [headingText]=\"menuHeadingText()\" [links]=\"links()\" />\n </div>\n}\n<div class=\"sky-docs-toc-body\">\n <ng-content />\n</div>\n", styles: [":host{display:flex;align-items:flex-start;flex-direction:row-reverse;gap:40px}:host(:not(.sky-docs-toc-page-with-links)) .sky-docs-toc-body{width:100%}:host(.sky-docs-toc-page-with-links) .sky-docs-toc-body{min-width:50%;flex:1}:host(.sky-docs-toc-page-with-links) .sky-docs-toc-menu{position:sticky;top:0;flex-shrink:1;max-width:40%;min-width:20%}\n"] }]
|
|
1027
|
+
}] });
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* @internal
|
|
1031
|
+
*/
|
|
1032
|
+
class SkyDocsTableOfContentsModule {
|
|
1033
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTableOfContentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1034
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTableOfContentsModule, imports: [SkyDocsTableOfContentsComponent,
|
|
1035
|
+
SkyDocsTableOfContentsPageComponent], exports: [SkyDocsTableOfContentsPageComponent] }); }
|
|
1036
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTableOfContentsModule }); }
|
|
1037
|
+
}
|
|
1038
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTableOfContentsModule, decorators: [{
|
|
1039
|
+
type: NgModule,
|
|
1040
|
+
args: [{
|
|
1041
|
+
imports: [
|
|
1042
|
+
SkyDocsTableOfContentsComponent,
|
|
1043
|
+
SkyDocsTableOfContentsPageComponent,
|
|
1044
|
+
],
|
|
1045
|
+
exports: [SkyDocsTableOfContentsPageComponent],
|
|
1046
|
+
}]
|
|
1047
|
+
}] });
|
|
1048
|
+
|
|
1049
|
+
/**
|
|
1050
|
+
* @internal
|
|
1051
|
+
*/
|
|
1052
|
+
class SkyDocsTypeDefinitionBoxComponent {
|
|
1053
|
+
constructor() {
|
|
1054
|
+
this.headingText = input.required();
|
|
1055
|
+
this.deprecated = input(false, { transform: booleanAttribute });
|
|
1056
|
+
this.required = input(false, { transform: booleanAttribute });
|
|
1057
|
+
this.stacked = input(false, { transform: booleanAttribute });
|
|
1058
|
+
}
|
|
1059
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1060
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SkyDocsTypeDefinitionBoxComponent, isStandalone: true, selector: "sky-docs-type-definition-box", inputs: { headingText: { classPropertyName: "headingText", publicName: "headingText", isSignal: true, isRequired: true, transformFunction: null }, deprecated: { classPropertyName: "deprecated", publicName: "deprecated", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, stacked: { classPropertyName: "stacked", publicName: "stacked", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.sky-margin-stacked-xl": "stacked()" }, classAttribute: "sky-elevation-0-bordered sky-rounded-corners" }, ngImport: i0, template: `
|
|
1061
|
+
<div
|
|
1062
|
+
class="sky-docs-type-definition-box-header sky-border-bottom-dark sky-padding-even-xl"
|
|
1063
|
+
>
|
|
1064
|
+
<h4 class="sky-docs-type-definition-box-heading">
|
|
1065
|
+
<code
|
|
1066
|
+
[class.sky-docs-text-strikethrough]="deprecated()"
|
|
1067
|
+
[innerHTML]="headingText()"
|
|
1068
|
+
></code>
|
|
1069
|
+
</h4>
|
|
1070
|
+
@if (required()) {
|
|
1071
|
+
<sky-docs-category-tag color="red">Required</sky-docs-category-tag>
|
|
1072
|
+
}
|
|
1073
|
+
</div>
|
|
1074
|
+
<div class="sky-docs-type-definition-box-body sky-padding-even-xl">
|
|
1075
|
+
<ng-content />
|
|
1076
|
+
</div>
|
|
1077
|
+
`, isInline: true, styles: [":host{display:block;overflow:hidden}.sky-docs-type-definition-box-header{background-color:var(--sky-background-color-info-light);display:flex;align-items:center;gap:10px}.sky-docs-type-definition-box-heading{margin:0;font-weight:400;word-break:break-all}\n"], dependencies: [{ kind: "ngmodule", type: SkyDocsCategoryTagModule }, { kind: "component", type: SkyDocsCategoryTagComponent, selector: "sky-docs-category-tag", inputs: ["color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1078
|
+
}
|
|
1079
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionBoxComponent, decorators: [{
|
|
1080
|
+
type: Component,
|
|
1081
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1082
|
+
class: 'sky-elevation-0-bordered sky-rounded-corners',
|
|
1083
|
+
'[class.sky-margin-stacked-xl]': 'stacked()',
|
|
1084
|
+
}, imports: [SkyDocsCategoryTagModule], selector: 'sky-docs-type-definition-box', template: `
|
|
1085
|
+
<div
|
|
1086
|
+
class="sky-docs-type-definition-box-header sky-border-bottom-dark sky-padding-even-xl"
|
|
1087
|
+
>
|
|
1088
|
+
<h4 class="sky-docs-type-definition-box-heading">
|
|
1089
|
+
<code
|
|
1090
|
+
[class.sky-docs-text-strikethrough]="deprecated()"
|
|
1091
|
+
[innerHTML]="headingText()"
|
|
1092
|
+
></code>
|
|
1093
|
+
</h4>
|
|
1094
|
+
@if (required()) {
|
|
1095
|
+
<sky-docs-category-tag color="red">Required</sky-docs-category-tag>
|
|
1096
|
+
}
|
|
1097
|
+
</div>
|
|
1098
|
+
<div class="sky-docs-type-definition-box-body sky-padding-even-xl">
|
|
1099
|
+
<ng-content />
|
|
1100
|
+
</div>
|
|
1101
|
+
`, styles: [":host{display:block;overflow:hidden}.sky-docs-type-definition-box-header{background-color:var(--sky-background-color-info-light);display:flex;align-items:center;gap:10px}.sky-docs-type-definition-box-heading{margin:0;font-weight:400;word-break:break-all}\n"] }]
|
|
1102
|
+
}] });
|
|
1103
|
+
|
|
1104
|
+
const renderer = {
|
|
1105
|
+
codespan(token) {
|
|
1106
|
+
return `<code class="sky-docs-codespan">${token.text}</code>`;
|
|
1107
|
+
},
|
|
1108
|
+
};
|
|
1109
|
+
marked.use({
|
|
1110
|
+
renderer,
|
|
1111
|
+
});
|
|
1112
|
+
/**
|
|
1113
|
+
* @internal
|
|
1114
|
+
*/
|
|
1115
|
+
class SkyDocsMarkdownPipe {
|
|
1116
|
+
transform(value, parserStyle = 'inline') {
|
|
1117
|
+
return parserStyle === 'inline'
|
|
1118
|
+
? marked.parseInline(value)
|
|
1119
|
+
: marked.parse(value);
|
|
1120
|
+
}
|
|
1121
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsMarkdownPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1122
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsMarkdownPipe, isStandalone: true, name: "skyDocsMarkdown" }); }
|
|
1123
|
+
}
|
|
1124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsMarkdownPipe, decorators: [{
|
|
1125
|
+
type: Pipe,
|
|
1126
|
+
args: [{
|
|
1127
|
+
name: 'skyDocsMarkdown',
|
|
1128
|
+
}]
|
|
1129
|
+
}] });
|
|
1130
|
+
|
|
1131
|
+
/**
|
|
1132
|
+
* Registers known type symbols with their corresponding anchor IDs.
|
|
1133
|
+
* @internal
|
|
1134
|
+
*/
|
|
1135
|
+
class SkyDocsTypeDefinitionAnchorIdsService {
|
|
1136
|
+
#anchorIds = new Map();
|
|
1137
|
+
updateAnchorIds(anchorIds) {
|
|
1138
|
+
this.#anchorIds = new Map(Object.entries(anchorIds));
|
|
1139
|
+
}
|
|
1140
|
+
getAnchorId(typeName) {
|
|
1141
|
+
return this.#anchorIds.get(typeName);
|
|
1142
|
+
}
|
|
1143
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionAnchorIdsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1144
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionAnchorIdsService }); }
|
|
1145
|
+
}
|
|
1146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionAnchorIdsService, decorators: [{
|
|
1147
|
+
type: Injectable
|
|
1148
|
+
}] });
|
|
1149
|
+
|
|
1150
|
+
const NOT_WORD_REGEXP = /\w+/g;
|
|
1151
|
+
/**
|
|
1152
|
+
* For the given string, finds known tokens and wraps them in an anchor linking to the respective element ID.
|
|
1153
|
+
* @internal
|
|
1154
|
+
*/
|
|
1155
|
+
class SkyTypeAnchorLinksPipe {
|
|
1156
|
+
#activatedRoute = inject(ActivatedRoute);
|
|
1157
|
+
#anchorSvc = inject(SkyDocsTypeDefinitionAnchorIdsService);
|
|
1158
|
+
#changeDetector = inject(ChangeDetectorRef);
|
|
1159
|
+
#destroyRef = inject(DestroyRef);
|
|
1160
|
+
#cache = {};
|
|
1161
|
+
#currentRoute = this.#activatedRoute.snapshot.url.toString();
|
|
1162
|
+
transform(value, options) {
|
|
1163
|
+
const typeWrappedWithAnchor = value?.replace(NOT_WORD_REGEXP, (maybeType) => {
|
|
1164
|
+
if (options?.ignore.includes(maybeType)) {
|
|
1165
|
+
return maybeType;
|
|
1166
|
+
}
|
|
1167
|
+
const anchorId = this.#anchorSvc.getAnchorId(maybeType);
|
|
1168
|
+
if (anchorId) {
|
|
1169
|
+
if (!(value in this.#cache)) {
|
|
1170
|
+
this.#activatedRoute.queryParams
|
|
1171
|
+
.pipe(takeUntilDestroyed(this.#destroyRef))
|
|
1172
|
+
.subscribe((queryParams) => {
|
|
1173
|
+
const href = this.#getHref(anchorId, queryParams);
|
|
1174
|
+
this.#cache[value] =
|
|
1175
|
+
`<a class="sky-docs-codespan-anchor" href="${href}">${maybeType}</a>`;
|
|
1176
|
+
this.#changeDetector.markForCheck();
|
|
1177
|
+
});
|
|
1178
|
+
}
|
|
1179
|
+
return this.#cache[value];
|
|
1180
|
+
}
|
|
1181
|
+
return maybeType;
|
|
1182
|
+
});
|
|
1183
|
+
if (typeWrappedWithAnchor !== value) {
|
|
1184
|
+
return typeWrappedWithAnchor;
|
|
1185
|
+
}
|
|
1186
|
+
return value;
|
|
1187
|
+
}
|
|
1188
|
+
#getHref(anchorId, queryParams) {
|
|
1189
|
+
const params = Object.entries(queryParams)
|
|
1190
|
+
.map(([k, v]) => `${k}=${v}`)
|
|
1191
|
+
.join('&');
|
|
1192
|
+
return `${this.#currentRoute}${params.length > 0 ? `?${params}` : ''}#${anchorId}`;
|
|
1193
|
+
}
|
|
1194
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyTypeAnchorLinksPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1195
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyTypeAnchorLinksPipe, isStandalone: true, name: "skyTypeAnchorLinks", pure: false }); }
|
|
1196
|
+
}
|
|
1197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyTypeAnchorLinksPipe, decorators: [{
|
|
1198
|
+
type: Pipe,
|
|
1199
|
+
args: [{
|
|
1200
|
+
name: 'skyTypeAnchorLinks',
|
|
1201
|
+
pure: false,
|
|
1202
|
+
}]
|
|
1203
|
+
}] });
|
|
1204
|
+
|
|
1205
|
+
/**
|
|
1206
|
+
* @internal
|
|
1207
|
+
*/
|
|
1208
|
+
class SkyDocsDeprecationReasonComponent {
|
|
1209
|
+
constructor() {
|
|
1210
|
+
this.message = input.required();
|
|
1211
|
+
}
|
|
1212
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsDeprecationReasonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1213
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.5", type: SkyDocsDeprecationReasonComponent, isStandalone: true, selector: "sky-docs-deprecation-reason", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
1214
|
+
<p>
|
|
1215
|
+
<sky-status-indicator descriptionType="warning" indicatorType="warning">
|
|
1216
|
+
<strong class="sky-font-emphasized">Deprecated. </strong
|
|
1217
|
+
><span
|
|
1218
|
+
[innerHTML]="message() | skyDocsMarkdown | skyTypeAnchorLinks"
|
|
1219
|
+
></span>
|
|
1220
|
+
</sky-status-indicator>
|
|
1221
|
+
</p>
|
|
1222
|
+
`, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "pipe", type: SkyDocsMarkdownPipe, name: "skyDocsMarkdown" }, { kind: "ngmodule", type: SkyStatusIndicatorModule }, { kind: "component", type: i1$1.λ10, selector: "sky-status-indicator", inputs: ["indicatorType", "descriptionType", "customDescription", "helpPopoverContent", "helpPopoverTitle", "helpKey"] }, { kind: "pipe", type: SkyTypeAnchorLinksPipe, name: "skyTypeAnchorLinks" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1223
|
+
}
|
|
1224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsDeprecationReasonComponent, decorators: [{
|
|
1225
|
+
type: Component,
|
|
1226
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1227
|
+
SkyDocsMarkdownPipe,
|
|
1228
|
+
SkyStatusIndicatorModule,
|
|
1229
|
+
SkyTypeAnchorLinksPipe,
|
|
1230
|
+
], selector: 'sky-docs-deprecation-reason', template: `
|
|
1231
|
+
<p>
|
|
1232
|
+
<sky-status-indicator descriptionType="warning" indicatorType="warning">
|
|
1233
|
+
<strong class="sky-font-emphasized">Deprecated. </strong
|
|
1234
|
+
><span
|
|
1235
|
+
[innerHTML]="message() | skyDocsMarkdown | skyTypeAnchorLinks"
|
|
1236
|
+
></span>
|
|
1237
|
+
</sky-status-indicator>
|
|
1238
|
+
</p>
|
|
1239
|
+
`, styles: [":host{display:block}\n"] }]
|
|
1240
|
+
}] });
|
|
1241
|
+
|
|
1242
|
+
/**
|
|
1243
|
+
* @internal
|
|
1244
|
+
*/
|
|
1245
|
+
class SkyDocsEscapeHtmlPipe {
|
|
1246
|
+
transform(value) {
|
|
1247
|
+
return value.replaceAll('<', '<').replaceAll('>', '>');
|
|
1248
|
+
}
|
|
1249
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsEscapeHtmlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1250
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsEscapeHtmlPipe, isStandalone: true, name: "skyDocsEscapeHtml" }); }
|
|
1251
|
+
}
|
|
1252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsEscapeHtmlPipe, decorators: [{
|
|
1253
|
+
type: Pipe,
|
|
1254
|
+
args: [{
|
|
1255
|
+
name: 'skyDocsEscapeHtml',
|
|
1256
|
+
}]
|
|
1257
|
+
}] });
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
* @internal
|
|
1261
|
+
*/
|
|
1262
|
+
class SkyDocsTypeDefinitionDescriptionComponent {
|
|
1263
|
+
constructor() {
|
|
1264
|
+
this.definitionName = input.required();
|
|
1265
|
+
this.description = input.required();
|
|
1266
|
+
}
|
|
1267
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1268
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.5", type: SkyDocsTypeDefinitionDescriptionComponent, isStandalone: true, selector: "sky-docs-type-definition-description", inputs: { definitionName: { classPropertyName: "definitionName", publicName: "definitionName", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
1269
|
+
<div
|
|
1270
|
+
[innerHTML]="
|
|
1271
|
+
description()
|
|
1272
|
+
| skyDocsEscapeHtml
|
|
1273
|
+
| skyDocsMarkdown: 'block'
|
|
1274
|
+
| skyTypeAnchorLinks: { ignore: [definitionName()] }
|
|
1275
|
+
"
|
|
1276
|
+
></div>
|
|
1277
|
+
`, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "pipe", type: SkyDocsEscapeHtmlPipe, name: "skyDocsEscapeHtml" }, { kind: "pipe", type: SkyDocsMarkdownPipe, name: "skyDocsMarkdown" }, { kind: "ngmodule", type: SkyStatusIndicatorModule }, { kind: "pipe", type: SkyTypeAnchorLinksPipe, name: "skyTypeAnchorLinks" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1278
|
+
}
|
|
1279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionDescriptionComponent, decorators: [{
|
|
1280
|
+
type: Component,
|
|
1281
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1282
|
+
SkyDocsEscapeHtmlPipe,
|
|
1283
|
+
SkyDocsMarkdownPipe,
|
|
1284
|
+
SkyStatusIndicatorModule,
|
|
1285
|
+
SkyTypeAnchorLinksPipe,
|
|
1286
|
+
], selector: 'sky-docs-type-definition-description', template: `
|
|
1287
|
+
<div
|
|
1288
|
+
[innerHTML]="
|
|
1289
|
+
description()
|
|
1290
|
+
| skyDocsEscapeHtml
|
|
1291
|
+
| skyDocsMarkdown: 'block'
|
|
1292
|
+
| skyTypeAnchorLinks: { ignore: [definitionName()] }
|
|
1293
|
+
"
|
|
1294
|
+
></div>
|
|
1295
|
+
`, styles: [":host{display:block}\n"] }]
|
|
1296
|
+
}] });
|
|
1297
|
+
|
|
1298
|
+
/**
|
|
1299
|
+
* @internal
|
|
1300
|
+
*/
|
|
1301
|
+
class SkyDocsPropertyTypeDefinitionDefaultValuePipe {
|
|
1302
|
+
transform(prop) {
|
|
1303
|
+
return prop?.defaultValue;
|
|
1304
|
+
}
|
|
1305
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsPropertyTypeDefinitionDefaultValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1306
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsPropertyTypeDefinitionDefaultValuePipe, isStandalone: true, name: "skyDocsPropertyDefaultValue" }); }
|
|
1307
|
+
}
|
|
1308
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsPropertyTypeDefinitionDefaultValuePipe, decorators: [{
|
|
1309
|
+
type: Pipe,
|
|
1310
|
+
args: [{
|
|
1311
|
+
name: 'skyDocsPropertyDefaultValue',
|
|
1312
|
+
}]
|
|
1313
|
+
}] });
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* @internal
|
|
1317
|
+
*/
|
|
1318
|
+
class SkyDocsEnumerationSignaturePipe {
|
|
1319
|
+
transform(definition) {
|
|
1320
|
+
const def = definition;
|
|
1321
|
+
return `enum ${def.name} {
|
|
1322
|
+
${def.children?.map((c) => `${c.name} = ${c.type},`).join('\n ')}
|
|
1323
|
+
}`;
|
|
1324
|
+
}
|
|
1325
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsEnumerationSignaturePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1326
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsEnumerationSignaturePipe, isStandalone: true, name: "skyDocsEnumerationSignature" }); }
|
|
1327
|
+
}
|
|
1328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsEnumerationSignaturePipe, decorators: [{
|
|
1329
|
+
type: Pipe,
|
|
1330
|
+
args: [{
|
|
1331
|
+
name: 'skyDocsEnumerationSignature',
|
|
1332
|
+
}]
|
|
1333
|
+
}] });
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* @internal
|
|
1337
|
+
*/
|
|
1338
|
+
class SkyDocsParameterNamePipe {
|
|
1339
|
+
transform(parameter) {
|
|
1340
|
+
return `${parameter.name}${parameter.defaultValue ? ` = ${parameter.defaultValue}` : `${parameter.isOptional ? '?' : ''}: ${parameter.type}`}`;
|
|
1341
|
+
}
|
|
1342
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsParameterNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1343
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsParameterNamePipe, isStandalone: true, name: "skyDocsParameterName" }); }
|
|
1344
|
+
}
|
|
1345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsParameterNamePipe, decorators: [{
|
|
1346
|
+
type: Pipe,
|
|
1347
|
+
args: [{
|
|
1348
|
+
name: 'skyDocsParameterName',
|
|
1349
|
+
}]
|
|
1350
|
+
}] });
|
|
1351
|
+
|
|
1352
|
+
/**
|
|
1353
|
+
* @internal
|
|
1354
|
+
*/
|
|
1355
|
+
class SkyDocsFunctionSignaturePipe {
|
|
1356
|
+
#paramPipe = inject(SkyDocsParameterNamePipe);
|
|
1357
|
+
transform(definition) {
|
|
1358
|
+
const def = definition;
|
|
1359
|
+
return (`${def.type.startsWith('Promise') ? 'async ' : ''}function ${def.name}(` +
|
|
1360
|
+
(def.parameters?.map((p) => this.#paramPipe.transform(p)).join(', ') ??
|
|
1361
|
+
'') +
|
|
1362
|
+
`): ${def.type}`);
|
|
1363
|
+
}
|
|
1364
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsFunctionSignaturePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1365
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsFunctionSignaturePipe, isStandalone: true, name: "skyDocsFunctionSignature" }); }
|
|
1366
|
+
}
|
|
1367
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsFunctionSignaturePipe, decorators: [{
|
|
1368
|
+
type: Pipe,
|
|
1369
|
+
args: [{
|
|
1370
|
+
name: 'skyDocsFunctionSignature',
|
|
1371
|
+
}]
|
|
1372
|
+
}] });
|
|
1373
|
+
|
|
1374
|
+
/**
|
|
1375
|
+
* @internal
|
|
1376
|
+
*/
|
|
1377
|
+
class SkyDocsInterfaceSignaturePipe {
|
|
1378
|
+
transform(definition) {
|
|
1379
|
+
const def = definition;
|
|
1380
|
+
if (def.children) {
|
|
1381
|
+
return `interface ${def.name} {
|
|
1382
|
+
${def.children
|
|
1383
|
+
?.map((c) => {
|
|
1384
|
+
return `${c.name}${c.isOptional ? '?' : ''}: ${c.type};`;
|
|
1385
|
+
})
|
|
1386
|
+
.join('\n ')}
|
|
1387
|
+
}`;
|
|
1388
|
+
}
|
|
1389
|
+
return `interface ${def.name} {}`;
|
|
1390
|
+
}
|
|
1391
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsInterfaceSignaturePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1392
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsInterfaceSignaturePipe, isStandalone: true, name: "skyDocsInterfaceSignature" }); }
|
|
1393
|
+
}
|
|
1394
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsInterfaceSignaturePipe, decorators: [{
|
|
1395
|
+
type: Pipe,
|
|
1396
|
+
args: [{
|
|
1397
|
+
name: 'skyDocsInterfaceSignature',
|
|
1398
|
+
}]
|
|
1399
|
+
}] });
|
|
1400
|
+
|
|
1401
|
+
/**
|
|
1402
|
+
* @internal
|
|
1403
|
+
*/
|
|
1404
|
+
class SkyDocsMethodNamePipe {
|
|
1405
|
+
#paramPipe = inject(SkyDocsParameterNamePipe);
|
|
1406
|
+
transform(method, parent) {
|
|
1407
|
+
let name = '';
|
|
1408
|
+
if (method.isStatic) {
|
|
1409
|
+
name = `${parent.name}.${method.name}`;
|
|
1410
|
+
}
|
|
1411
|
+
else {
|
|
1412
|
+
name = `${method.name}`;
|
|
1413
|
+
}
|
|
1414
|
+
return (name +
|
|
1415
|
+
'(' +
|
|
1416
|
+
(method.parameters?.map((p) => this.#paramPipe.transform(p)).join(', ') ??
|
|
1417
|
+
'') +
|
|
1418
|
+
`): ${method.type}`);
|
|
1419
|
+
}
|
|
1420
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsMethodNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1421
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsMethodNamePipe, isStandalone: true, name: "skyDocsMethodName" }); }
|
|
1422
|
+
}
|
|
1423
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsMethodNamePipe, decorators: [{
|
|
1424
|
+
type: Pipe,
|
|
1425
|
+
args: [{
|
|
1426
|
+
name: 'skyDocsMethodName',
|
|
1427
|
+
}]
|
|
1428
|
+
}] });
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* @internal
|
|
1432
|
+
*/
|
|
1433
|
+
class SkyDocsPropertyNamePipe {
|
|
1434
|
+
transform(property, parent) {
|
|
1435
|
+
switch (property.kind) {
|
|
1436
|
+
case 'enum-member': {
|
|
1437
|
+
return `${parent.name}.${property.name}`;
|
|
1438
|
+
}
|
|
1439
|
+
case 'interface-property': {
|
|
1440
|
+
return `${property.name}?: ${property.type}`;
|
|
1441
|
+
}
|
|
1442
|
+
default: {
|
|
1443
|
+
return `${property.name}: ${property.type}`;
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsPropertyNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1448
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsPropertyNamePipe, isStandalone: true, name: "skyDocsPropertyName" }); }
|
|
1449
|
+
}
|
|
1450
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsPropertyNamePipe, decorators: [{
|
|
1451
|
+
type: Pipe,
|
|
1452
|
+
args: [{
|
|
1453
|
+
name: 'skyDocsPropertyName',
|
|
1454
|
+
}]
|
|
1455
|
+
}] });
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* @internal
|
|
1459
|
+
*/
|
|
1460
|
+
class SkyDocsTypeAliasSignaturePipe {
|
|
1461
|
+
transform(definition) {
|
|
1462
|
+
const def = definition;
|
|
1463
|
+
return `type ${def.name} = ${def.type}`;
|
|
1464
|
+
}
|
|
1465
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeAliasSignaturePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1466
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeAliasSignaturePipe, isStandalone: true, name: "skyDocsTypeAliasSignature" }); }
|
|
1467
|
+
}
|
|
1468
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeAliasSignaturePipe, decorators: [{
|
|
1469
|
+
type: Pipe,
|
|
1470
|
+
args: [{
|
|
1471
|
+
name: 'skyDocsTypeAliasSignature',
|
|
1472
|
+
}]
|
|
1473
|
+
}] });
|
|
1474
|
+
|
|
1475
|
+
/**
|
|
1476
|
+
* @internal
|
|
1477
|
+
*/
|
|
1478
|
+
class SkyDocsTypeDefinitionKindToCategoryColorPipe {
|
|
1479
|
+
transform(value) {
|
|
1480
|
+
switch (value) {
|
|
1481
|
+
case 'module':
|
|
1482
|
+
return 'purple';
|
|
1483
|
+
case 'component':
|
|
1484
|
+
return 'orange';
|
|
1485
|
+
case 'directive':
|
|
1486
|
+
return 'yellow';
|
|
1487
|
+
case 'service':
|
|
1488
|
+
return 'teal';
|
|
1489
|
+
case 'pipe':
|
|
1490
|
+
case 'class':
|
|
1491
|
+
case 'function':
|
|
1492
|
+
return 'blue';
|
|
1493
|
+
default:
|
|
1494
|
+
return 'light-blue';
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionKindToCategoryColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1498
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionKindToCategoryColorPipe, isStandalone: true, name: "skyDocsDefinitionKindToCategoryColor" }); }
|
|
1499
|
+
}
|
|
1500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionKindToCategoryColorPipe, decorators: [{
|
|
1501
|
+
type: Pipe,
|
|
1502
|
+
args: [{
|
|
1503
|
+
name: 'skyDocsDefinitionKindToCategoryColor',
|
|
1504
|
+
}]
|
|
1505
|
+
}] });
|
|
1506
|
+
|
|
1507
|
+
/**
|
|
1508
|
+
* @internal
|
|
1509
|
+
*/
|
|
1510
|
+
class SkyDocsTypeDefinitionKindToLabelPipe {
|
|
1511
|
+
transform(kind) {
|
|
1512
|
+
switch (kind) {
|
|
1513
|
+
case 'type-alias':
|
|
1514
|
+
return 'Type alias';
|
|
1515
|
+
default:
|
|
1516
|
+
return kind.charAt(0).toLocaleUpperCase() + kind.slice(1);
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionKindToLabelPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1520
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionKindToLabelPipe, isStandalone: true, name: "skyTypeDefinitionKindToLabel" }); }
|
|
1521
|
+
}
|
|
1522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionKindToLabelPipe, decorators: [{
|
|
1523
|
+
type: Pipe,
|
|
1524
|
+
args: [{
|
|
1525
|
+
name: 'skyTypeDefinitionKindToLabel',
|
|
1526
|
+
}]
|
|
1527
|
+
}] });
|
|
1528
|
+
|
|
1529
|
+
/**
|
|
1530
|
+
* @internal
|
|
1531
|
+
*/
|
|
1532
|
+
class SkyDocsTypeDefinitionComponent {
|
|
1533
|
+
constructor() {
|
|
1534
|
+
this.definition = input.required();
|
|
1535
|
+
this.stacked = input(false, { transform: booleanAttribute });
|
|
1536
|
+
this.inputs = computed(() => {
|
|
1537
|
+
const def = this.definition();
|
|
1538
|
+
const inputs = def.children?.filter((c) => c.kind === 'directive-input');
|
|
1539
|
+
return inputs && inputs.length > 0
|
|
1540
|
+
? inputs
|
|
1541
|
+
// Sort alphabetically by name.
|
|
1542
|
+
.sort((a, b) => {
|
|
1543
|
+
if (a.name < b.name) {
|
|
1544
|
+
return -1;
|
|
1545
|
+
}
|
|
1546
|
+
if (a.name > b.name) {
|
|
1547
|
+
return 1;
|
|
1548
|
+
}
|
|
1549
|
+
return 0;
|
|
1550
|
+
})
|
|
1551
|
+
// List "required" inputs first.
|
|
1552
|
+
.sort((a, b) => {
|
|
1553
|
+
if (a.isRequired && !b.isRequired) {
|
|
1554
|
+
return -1;
|
|
1555
|
+
}
|
|
1556
|
+
if (!a.isRequired && b.isRequired) {
|
|
1557
|
+
return 1;
|
|
1558
|
+
}
|
|
1559
|
+
return 0;
|
|
1560
|
+
})
|
|
1561
|
+
: undefined;
|
|
1562
|
+
});
|
|
1563
|
+
this.methods = computed(() => {
|
|
1564
|
+
const def = this.definition();
|
|
1565
|
+
return def.children?.filter((c) => c.kind === 'class-method');
|
|
1566
|
+
});
|
|
1567
|
+
this.outputs = computed(() => {
|
|
1568
|
+
const def = this.definition();
|
|
1569
|
+
const outputs = def.children?.filter((c) => c.kind === 'directive-output');
|
|
1570
|
+
return outputs && outputs.length > 0 ? outputs : undefined;
|
|
1571
|
+
});
|
|
1572
|
+
this.parameters = computed(() => {
|
|
1573
|
+
const def = this.definition();
|
|
1574
|
+
return isFunctionDefinition(def) ? def.parameters : undefined;
|
|
1575
|
+
});
|
|
1576
|
+
this.pipeName = computed(() => {
|
|
1577
|
+
const def = this.definition();
|
|
1578
|
+
return isPipeDefinition(def) ? def.templateBindingName : undefined;
|
|
1579
|
+
});
|
|
1580
|
+
this.properties = computed(() => {
|
|
1581
|
+
const def = this.definition();
|
|
1582
|
+
const ignore = [
|
|
1583
|
+
'class-method',
|
|
1584
|
+
'directive-input',
|
|
1585
|
+
'directive-output',
|
|
1586
|
+
];
|
|
1587
|
+
const properties = def.children?.filter((c) => !ignore.includes(c.kind));
|
|
1588
|
+
return properties && properties.length > 0 ? properties : undefined;
|
|
1589
|
+
});
|
|
1590
|
+
this.selector = computed(() => {
|
|
1591
|
+
const def = this.definition();
|
|
1592
|
+
return isDirectiveDefinition(def) ? def.selector : undefined;
|
|
1593
|
+
});
|
|
1594
|
+
}
|
|
1595
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1596
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SkyDocsTypeDefinitionComponent, isStandalone: true, selector: "sky-docs-type-definition", inputs: { definition: { classPropertyName: "definition", publicName: "definition", isSignal: true, isRequired: true, transformFunction: null }, stacked: { classPropertyName: "stacked", publicName: "stacked", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.sky-margin-stacked-xxl": "stacked()" } }, providers: [SkyDocsParameterNamePipe], ngImport: i0, template: "@if (definition(); as def) {\n <sky-docs-heading-anchor\n class=\"sky-margin-stacked-lg\"\n headingLevel=\"2\"\n [anchorId]=\"def.anchorId\"\n [categoryColor]=\"def.kind | skyDocsDefinitionKindToCategoryColor\"\n [categoryTemplate]=\"categoryTemplate\"\n [headingText]=\"def.name\"\n [strikethrough]=\"def.isDeprecated\"\n >\n <ng-template #categoryTemplate>\n <span class=\"sky-screen-reader-only\">Type: </span>\n {{ def.kind | skyTypeDefinitionKindToLabel }}\n </ng-template>\n @if (def.isPreview) {\n <sky-docs-category-tag color=\"teal\"> Preview </sky-docs-category-tag>\n }\n </sky-docs-heading-anchor>\n @if (def.kind === 'module' || def.name.endsWith('Harness')) {\n <p>\n <code class=\"sky-docs-codespan\"\n >import {{ '{' }} {{ def.name }} {{ '}' }} from '{{\n def.packageName\n }}';</code\n >\n </p>\n }\n @if (selector(); as selector) {\n <p>\n Selector: <code class=\"sky-docs-codespan\">{{ selector }}</code>\n </p>\n }\n @if (pipeName(); as pipeName) {\n <p>\n Pipe name: <code class=\"sky-docs-codespan\">{{ pipeName }}</code>\n </p>\n }\n @if (def.deprecationReason) {\n <sky-docs-deprecation-reason [message]=\"def.deprecationReason\" />\n }\n @if (def.description) {\n <sky-docs-type-definition-description\n [definitionName]=\"def.name\"\n [description]=\"def.description\"\n />\n }\n @if (def.codeExample) {\n <h3>Example</h3>\n <sky-docs-code-snippet\n bordered\n class=\"sky-margin-stacked-lg\"\n hideToolbar\n [code]=\"def.codeExample\"\n [language]=\"def.codeExampleLanguage ?? 'html'\"\n />\n }\n @switch (def.kind) {\n @case ('function') {\n <sky-docs-code-snippet\n bordered\n class=\"sky-margin-stacked-lg\"\n hideToolbar\n language=\"ts\"\n [code]=\"\n def\n | skyDocsFunctionSignature\n | skyTypeAnchorLinks: { ignore: [def.name] }\n \"\n />\n @let parametersValue = parameters();\n @if (parametersValue && parametersValue.length > 0) {\n <h3>Parameters</h3>\n @for (parameter of parametersValue; track parameter.name) {\n <h4 class=\"sky-font-body-default\">\n <code\n class=\"sky-docs-codespan\"\n [innerHTML]=\"\n parameter\n | skyDocsParameterName\n | skyDocsEscapeHtml\n | skyTypeAnchorLinks\n \"\n ></code>\n </h4>\n @if (parameter.description) {\n <sky-docs-type-definition-description\n [definitionName]=\"parameter.name\"\n [description]=\"parameter.description\"\n />\n }\n }\n }\n }\n @case ('type-alias') {\n <sky-docs-code-snippet bordered hideToolbar stacked>\n <code\n [innerHTML]=\"\n def\n | skyDocsTypeAliasSignature\n | skyDocsCodeHighlight: 'typescript'\n | skyTypeAnchorLinks: { ignore: [def.name] }\n \"\n ></code>\n </sky-docs-code-snippet>\n }\n @default {\n @if (def.kind === 'interface') {\n <sky-docs-code-snippet\n bordered\n hideToolbar\n language=\"ts\"\n stacked\n [code]=\"def | skyDocsInterfaceSignature\"\n />\n }\n @if (def.kind === 'enumeration') {\n <sky-docs-code-snippet\n bordered\n hideToolbar\n language=\"ts\"\n stacked\n [code]=\"def | skyDocsEnumerationSignature\"\n />\n }\n @if (inputs(); as inputs) {\n <h3>Inputs</h3>\n @for (input of inputs; track input.name; let last = $last) {\n <sky-docs-type-definition-box\n [stacked]=\"!last\"\n [deprecated]=\"input.isDeprecated\"\n [required]=\"input.isRequired\"\n [headingText]=\"\n input\n | skyDocsPropertyName: def\n | skyDocsEscapeHtml\n | skyTypeAnchorLinks: { ignore: [def.name] }\n \"\n >\n @if (input.deprecationReason) {\n <sky-docs-deprecation-reason\n class=\"sky-margin-stacked-sm\"\n [message]=\"input.deprecationReason\"\n />\n }\n @if (input.description) {\n <sky-docs-type-definition-description\n [definitionName]=\"input.name\"\n [description]=\"input.description\"\n />\n }\n @let defaultValue = input | skyDocsPropertyDefaultValue;\n @if (defaultValue) {\n <p>\n Default:\n <code\n class=\"sky-docs-codespan\"\n [innerHTML]=\"\n defaultValue | skyDocsEscapeHtml | skyTypeAnchorLinks\n \"\n ></code>\n </p>\n }\n </sky-docs-type-definition-box>\n }\n }\n @if (outputs(); as outputs) {\n <h3>Outputs</h3>\n @for (output of outputs; track output.name; let last = $last) {\n <sky-docs-type-definition-box\n [stacked]=\"!last\"\n [deprecated]=\"output.isDeprecated\"\n [headingText]=\"\n output\n | skyDocsPropertyName: def\n | skyDocsEscapeHtml\n | skyTypeAnchorLinks: { ignore: [def.name] }\n \"\n >\n @if (output.deprecationReason) {\n <sky-docs-deprecation-reason\n class=\"sky-margin-stacked-sm\"\n [message]=\"output.deprecationReason\"\n />\n }\n @if (output.description) {\n <sky-docs-type-definition-description\n [definitionName]=\"output.name\"\n [description]=\"output.description\"\n />\n }\n </sky-docs-type-definition-box>\n }\n }\n @if (properties(); as properties) {\n <h3>Properties</h3>\n @for (property of properties; track property.name; let last = $last) {\n <sky-docs-type-definition-box\n [stacked]=\"!last\"\n [deprecated]=\"property.isDeprecated\"\n [headingText]=\"\n property\n | skyDocsPropertyName: def\n | skyDocsEscapeHtml\n | skyTypeAnchorLinks: { ignore: [def.name] }\n \"\n >\n @if (property.deprecationReason) {\n <sky-docs-deprecation-reason\n class=\"sky-margin-stacked-sm\"\n [message]=\"property.deprecationReason\"\n />\n }\n @if (property.description) {\n <sky-docs-type-definition-description\n [definitionName]=\"property.name\"\n [description]=\"property.description\"\n />\n }\n @let defaultValue = property | skyDocsPropertyDefaultValue;\n @if (defaultValue) {\n <p>\n Default:\n <code\n class=\"sky-docs-codespan\"\n [innerHTML]=\"\n defaultValue | skyDocsEscapeHtml | skyTypeAnchorLinks\n \"\n ></code>\n </p>\n }\n </sky-docs-type-definition-box>\n }\n }\n @let methodsValue = methods();\n @if (methodsValue && methodsValue.length > 0) {\n <h3>Methods</h3>\n @for (method of methodsValue; track method.name; let last = $last) {\n <sky-docs-type-definition-box\n [stacked]=\"!last\"\n [deprecated]=\"method.isDeprecated\"\n [headingText]=\"\n method\n | skyDocsMethodName: def\n | skyDocsEscapeHtml\n | skyTypeAnchorLinks: { ignore: [def.name] }\n \"\n >\n @if (method.deprecationReason) {\n <sky-docs-deprecation-reason\n class=\"sky-margin-stacked-sm\"\n [message]=\"method.deprecationReason\"\n />\n }\n @if (method.description) {\n <sky-docs-type-definition-description\n [definitionName]=\"method.name\"\n [description]=\"method.description\"\n />\n }\n @if (method.parameters) {\n <h4>Parameters</h4>\n @for (param of method.parameters; track param.name) {\n <h5 class=\"sky-font-body-default\">\n <code\n class=\"sky-docs-codespan\"\n [innerHTML]=\"\n param\n | skyDocsParameterName\n | skyDocsEscapeHtml\n | skyTypeAnchorLinks\n \"\n ></code>\n </h5>\n @if (param.description) {\n <sky-docs-type-definition-description\n [definitionName]=\"param.name\"\n [description]=\"param.description\"\n />\n }\n }\n }\n <h4>Returns</h4>\n <p>\n <code\n class=\"sky-docs-codespan\"\n [innerHTML]=\"\n method.type | skyDocsEscapeHtml | skyTypeAnchorLinks\n \"\n ></code>\n </p>\n </sky-docs-type-definition-box>\n }\n }\n }\n }\n}\n", styles: ["sky-docs-type-definition{display:block}sky-docs-type-definition .sky-docs-type-definition-box-body :first-child{margin-top:0}sky-docs-type-definition .sky-docs-type-definition-box-body :last-child{margin-bottom:0}\n"], dependencies: [{ kind: "ngmodule", type: SkyDocsCategoryTagModule }, { kind: "component", type: SkyDocsCategoryTagComponent, selector: "sky-docs-category-tag", inputs: ["color"] }, { kind: "pipe", type: SkyDocsCodeHighlightPipe, name: "skyDocsCodeHighlight" }, { kind: "ngmodule", type: SkyDocsCodeSnippetModule }, { kind: "component", type: SkyDocsCodeSnippetComponent, selector: "sky-docs-code-snippet[code]", inputs: ["code", "language", "bordered", "hideToolbar", "stacked"] }, { kind: "component", type: SkyDocsCodeSnippetWrapperComponent, selector: "sky-docs-code-snippet:not([code])", inputs: ["bordered", "hideToolbar", "stacked"] }, { kind: "component", type: SkyDocsDeprecationReasonComponent, selector: "sky-docs-deprecation-reason", inputs: ["message"] }, { kind: "pipe", type: SkyDocsEnumerationSignaturePipe, name: "skyDocsEnumerationSignature" }, { kind: "ngmodule", type: SkyDocsHeadingAnchorModule }, { kind: "component", type: SkyDocsHeadingAnchorComponent, selector: "sky-docs-heading-anchor", inputs: ["anchorId", "headingText", "headingTextFormat", "categoryColor", "categoryTemplate", "categoryText", "headingLevel", "strikethrough"] }, { kind: "pipe", type: SkyDocsFunctionSignaturePipe, name: "skyDocsFunctionSignature" }, { kind: "pipe", type: SkyDocsInterfaceSignaturePipe, name: "skyDocsInterfaceSignature" }, { kind: "pipe", type: SkyDocsMethodNamePipe, name: "skyDocsMethodName" }, { kind: "pipe", type: SkyDocsParameterNamePipe, name: "skyDocsParameterName" }, { kind: "pipe", type: SkyDocsPropertyNamePipe, name: "skyDocsPropertyName" }, { kind: "pipe", type: SkyDocsPropertyTypeDefinitionDefaultValuePipe, name: "skyDocsPropertyDefaultValue" }, { kind: "pipe", type: SkyDocsTypeAliasSignaturePipe, name: "skyDocsTypeAliasSignature" }, { kind: "component", type: SkyDocsTypeDefinitionBoxComponent, selector: "sky-docs-type-definition-box", inputs: ["headingText", "deprecated", "required", "stacked"] }, { kind: "component", type: SkyDocsTypeDefinitionDescriptionComponent, selector: "sky-docs-type-definition-description", inputs: ["definitionName", "description"] }, { kind: "pipe", type: SkyDocsTypeDefinitionKindToCategoryColorPipe, name: "skyDocsDefinitionKindToCategoryColor" }, { kind: "pipe", type: SkyDocsTypeDefinitionKindToLabelPipe, name: "skyTypeDefinitionKindToLabel" }, { kind: "pipe", type: SkyDocsEscapeHtmlPipe, name: "skyDocsEscapeHtml" }, { kind: "pipe", type: SkyTypeAnchorLinksPipe, name: "skyTypeAnchorLinks" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1597
|
+
}
|
|
1598
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionComponent, decorators: [{
|
|
1599
|
+
type: Component,
|
|
1600
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
1601
|
+
'[class.sky-margin-stacked-xxl]': 'stacked()',
|
|
1602
|
+
}, imports: [
|
|
1603
|
+
SkyDocsCategoryTagModule,
|
|
1604
|
+
SkyDocsCodeHighlightPipe,
|
|
1605
|
+
SkyDocsCodeSnippetModule,
|
|
1606
|
+
SkyDocsDeprecationReasonComponent,
|
|
1607
|
+
SkyDocsEnumerationSignaturePipe,
|
|
1608
|
+
SkyDocsHeadingAnchorModule,
|
|
1609
|
+
SkyDocsFunctionSignaturePipe,
|
|
1610
|
+
SkyDocsInterfaceSignaturePipe,
|
|
1611
|
+
SkyDocsMethodNamePipe,
|
|
1612
|
+
SkyDocsParameterNamePipe,
|
|
1613
|
+
SkyDocsPropertyNamePipe,
|
|
1614
|
+
SkyDocsPropertyTypeDefinitionDefaultValuePipe,
|
|
1615
|
+
SkyDocsTypeAliasSignaturePipe,
|
|
1616
|
+
SkyDocsTypeDefinitionBoxComponent,
|
|
1617
|
+
SkyDocsTypeDefinitionDescriptionComponent,
|
|
1618
|
+
SkyDocsTypeDefinitionKindToCategoryColorPipe,
|
|
1619
|
+
SkyDocsTypeDefinitionKindToLabelPipe,
|
|
1620
|
+
SkyDocsEscapeHtmlPipe,
|
|
1621
|
+
SkyTypeAnchorLinksPipe,
|
|
1622
|
+
], providers: [SkyDocsParameterNamePipe], selector: 'sky-docs-type-definition', template: "@if (definition(); as def) {\n <sky-docs-heading-anchor\n class=\"sky-margin-stacked-lg\"\n headingLevel=\"2\"\n [anchorId]=\"def.anchorId\"\n [categoryColor]=\"def.kind | skyDocsDefinitionKindToCategoryColor\"\n [categoryTemplate]=\"categoryTemplate\"\n [headingText]=\"def.name\"\n [strikethrough]=\"def.isDeprecated\"\n >\n <ng-template #categoryTemplate>\n <span class=\"sky-screen-reader-only\">Type: </span>\n {{ def.kind | skyTypeDefinitionKindToLabel }}\n </ng-template>\n @if (def.isPreview) {\n <sky-docs-category-tag color=\"teal\"> Preview </sky-docs-category-tag>\n }\n </sky-docs-heading-anchor>\n @if (def.kind === 'module' || def.name.endsWith('Harness')) {\n <p>\n <code class=\"sky-docs-codespan\"\n >import {{ '{' }} {{ def.name }} {{ '}' }} from '{{\n def.packageName\n }}';</code\n >\n </p>\n }\n @if (selector(); as selector) {\n <p>\n Selector: <code class=\"sky-docs-codespan\">{{ selector }}</code>\n </p>\n }\n @if (pipeName(); as pipeName) {\n <p>\n Pipe name: <code class=\"sky-docs-codespan\">{{ pipeName }}</code>\n </p>\n }\n @if (def.deprecationReason) {\n <sky-docs-deprecation-reason [message]=\"def.deprecationReason\" />\n }\n @if (def.description) {\n <sky-docs-type-definition-description\n [definitionName]=\"def.name\"\n [description]=\"def.description\"\n />\n }\n @if (def.codeExample) {\n <h3>Example</h3>\n <sky-docs-code-snippet\n bordered\n class=\"sky-margin-stacked-lg\"\n hideToolbar\n [code]=\"def.codeExample\"\n [language]=\"def.codeExampleLanguage ?? 'html'\"\n />\n }\n @switch (def.kind) {\n @case ('function') {\n <sky-docs-code-snippet\n bordered\n class=\"sky-margin-stacked-lg\"\n hideToolbar\n language=\"ts\"\n [code]=\"\n def\n | skyDocsFunctionSignature\n | skyTypeAnchorLinks: { ignore: [def.name] }\n \"\n />\n @let parametersValue = parameters();\n @if (parametersValue && parametersValue.length > 0) {\n <h3>Parameters</h3>\n @for (parameter of parametersValue; track parameter.name) {\n <h4 class=\"sky-font-body-default\">\n <code\n class=\"sky-docs-codespan\"\n [innerHTML]=\"\n parameter\n | skyDocsParameterName\n | skyDocsEscapeHtml\n | skyTypeAnchorLinks\n \"\n ></code>\n </h4>\n @if (parameter.description) {\n <sky-docs-type-definition-description\n [definitionName]=\"parameter.name\"\n [description]=\"parameter.description\"\n />\n }\n }\n }\n }\n @case ('type-alias') {\n <sky-docs-code-snippet bordered hideToolbar stacked>\n <code\n [innerHTML]=\"\n def\n | skyDocsTypeAliasSignature\n | skyDocsCodeHighlight: 'typescript'\n | skyTypeAnchorLinks: { ignore: [def.name] }\n \"\n ></code>\n </sky-docs-code-snippet>\n }\n @default {\n @if (def.kind === 'interface') {\n <sky-docs-code-snippet\n bordered\n hideToolbar\n language=\"ts\"\n stacked\n [code]=\"def | skyDocsInterfaceSignature\"\n />\n }\n @if (def.kind === 'enumeration') {\n <sky-docs-code-snippet\n bordered\n hideToolbar\n language=\"ts\"\n stacked\n [code]=\"def | skyDocsEnumerationSignature\"\n />\n }\n @if (inputs(); as inputs) {\n <h3>Inputs</h3>\n @for (input of inputs; track input.name; let last = $last) {\n <sky-docs-type-definition-box\n [stacked]=\"!last\"\n [deprecated]=\"input.isDeprecated\"\n [required]=\"input.isRequired\"\n [headingText]=\"\n input\n | skyDocsPropertyName: def\n | skyDocsEscapeHtml\n | skyTypeAnchorLinks: { ignore: [def.name] }\n \"\n >\n @if (input.deprecationReason) {\n <sky-docs-deprecation-reason\n class=\"sky-margin-stacked-sm\"\n [message]=\"input.deprecationReason\"\n />\n }\n @if (input.description) {\n <sky-docs-type-definition-description\n [definitionName]=\"input.name\"\n [description]=\"input.description\"\n />\n }\n @let defaultValue = input | skyDocsPropertyDefaultValue;\n @if (defaultValue) {\n <p>\n Default:\n <code\n class=\"sky-docs-codespan\"\n [innerHTML]=\"\n defaultValue | skyDocsEscapeHtml | skyTypeAnchorLinks\n \"\n ></code>\n </p>\n }\n </sky-docs-type-definition-box>\n }\n }\n @if (outputs(); as outputs) {\n <h3>Outputs</h3>\n @for (output of outputs; track output.name; let last = $last) {\n <sky-docs-type-definition-box\n [stacked]=\"!last\"\n [deprecated]=\"output.isDeprecated\"\n [headingText]=\"\n output\n | skyDocsPropertyName: def\n | skyDocsEscapeHtml\n | skyTypeAnchorLinks: { ignore: [def.name] }\n \"\n >\n @if (output.deprecationReason) {\n <sky-docs-deprecation-reason\n class=\"sky-margin-stacked-sm\"\n [message]=\"output.deprecationReason\"\n />\n }\n @if (output.description) {\n <sky-docs-type-definition-description\n [definitionName]=\"output.name\"\n [description]=\"output.description\"\n />\n }\n </sky-docs-type-definition-box>\n }\n }\n @if (properties(); as properties) {\n <h3>Properties</h3>\n @for (property of properties; track property.name; let last = $last) {\n <sky-docs-type-definition-box\n [stacked]=\"!last\"\n [deprecated]=\"property.isDeprecated\"\n [headingText]=\"\n property\n | skyDocsPropertyName: def\n | skyDocsEscapeHtml\n | skyTypeAnchorLinks: { ignore: [def.name] }\n \"\n >\n @if (property.deprecationReason) {\n <sky-docs-deprecation-reason\n class=\"sky-margin-stacked-sm\"\n [message]=\"property.deprecationReason\"\n />\n }\n @if (property.description) {\n <sky-docs-type-definition-description\n [definitionName]=\"property.name\"\n [description]=\"property.description\"\n />\n }\n @let defaultValue = property | skyDocsPropertyDefaultValue;\n @if (defaultValue) {\n <p>\n Default:\n <code\n class=\"sky-docs-codespan\"\n [innerHTML]=\"\n defaultValue | skyDocsEscapeHtml | skyTypeAnchorLinks\n \"\n ></code>\n </p>\n }\n </sky-docs-type-definition-box>\n }\n }\n @let methodsValue = methods();\n @if (methodsValue && methodsValue.length > 0) {\n <h3>Methods</h3>\n @for (method of methodsValue; track method.name; let last = $last) {\n <sky-docs-type-definition-box\n [stacked]=\"!last\"\n [deprecated]=\"method.isDeprecated\"\n [headingText]=\"\n method\n | skyDocsMethodName: def\n | skyDocsEscapeHtml\n | skyTypeAnchorLinks: { ignore: [def.name] }\n \"\n >\n @if (method.deprecationReason) {\n <sky-docs-deprecation-reason\n class=\"sky-margin-stacked-sm\"\n [message]=\"method.deprecationReason\"\n />\n }\n @if (method.description) {\n <sky-docs-type-definition-description\n [definitionName]=\"method.name\"\n [description]=\"method.description\"\n />\n }\n @if (method.parameters) {\n <h4>Parameters</h4>\n @for (param of method.parameters; track param.name) {\n <h5 class=\"sky-font-body-default\">\n <code\n class=\"sky-docs-codespan\"\n [innerHTML]=\"\n param\n | skyDocsParameterName\n | skyDocsEscapeHtml\n | skyTypeAnchorLinks\n \"\n ></code>\n </h5>\n @if (param.description) {\n <sky-docs-type-definition-description\n [definitionName]=\"param.name\"\n [description]=\"param.description\"\n />\n }\n }\n }\n <h4>Returns</h4>\n <p>\n <code\n class=\"sky-docs-codespan\"\n [innerHTML]=\"\n method.type | skyDocsEscapeHtml | skyTypeAnchorLinks\n \"\n ></code>\n </p>\n </sky-docs-type-definition-box>\n }\n }\n }\n }\n}\n", styles: ["sky-docs-type-definition{display:block}sky-docs-type-definition .sky-docs-type-definition-box-body :first-child{margin-top:0}sky-docs-type-definition .sky-docs-type-definition-box-body :last-child{margin-bottom:0}\n"] }]
|
|
1623
|
+
}] });
|
|
1624
|
+
|
|
1625
|
+
/**
|
|
1626
|
+
* @internal
|
|
1627
|
+
*/
|
|
1628
|
+
class SkyDocsTypeDefinitionModule {
|
|
1629
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1630
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionModule, imports: [SkyDocsTypeDefinitionComponent], exports: [SkyDocsTypeDefinitionComponent] }); }
|
|
1631
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionModule, imports: [SkyDocsTypeDefinitionComponent] }); }
|
|
1632
|
+
}
|
|
1633
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsTypeDefinitionModule, decorators: [{
|
|
1634
|
+
type: NgModule,
|
|
1635
|
+
args: [{
|
|
1636
|
+
imports: [SkyDocsTypeDefinitionComponent],
|
|
1637
|
+
exports: [SkyDocsTypeDefinitionComponent],
|
|
1638
|
+
}]
|
|
1639
|
+
}] });
|
|
1640
|
+
|
|
1641
|
+
/**
|
|
1642
|
+
* @internal
|
|
1643
|
+
*/
|
|
1644
|
+
class SkyDocsShowcaseHostService {
|
|
1645
|
+
get documentationGroup() {
|
|
1646
|
+
return this.#documentationGroupObs;
|
|
1647
|
+
}
|
|
1648
|
+
#documentationGroup = new BehaviorSubject(undefined);
|
|
1649
|
+
#documentationGroupObs = this.#documentationGroup.asObservable();
|
|
1650
|
+
ngOnDestroy() {
|
|
1651
|
+
this.#documentationGroup.complete();
|
|
1652
|
+
}
|
|
1653
|
+
updateGroup(group) {
|
|
1654
|
+
this.#documentationGroup.next(group);
|
|
1655
|
+
}
|
|
1656
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseHostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1657
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseHostService }); }
|
|
1658
|
+
}
|
|
1659
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseHostService, decorators: [{
|
|
1660
|
+
type: Injectable
|
|
1661
|
+
}] });
|
|
1662
|
+
|
|
1663
|
+
/**
|
|
1664
|
+
* Content for the "Development" tab.
|
|
1665
|
+
* @internal
|
|
1666
|
+
*/
|
|
1667
|
+
class SkyDocsShowcaseAreaDevelopmentComponent {
|
|
1668
|
+
constructor() {
|
|
1669
|
+
this.#hostSvc = inject(SkyDocsShowcaseHostService);
|
|
1670
|
+
this.documentationGroup = toSignal(this.#hostSvc.documentationGroup);
|
|
1671
|
+
}
|
|
1672
|
+
#hostSvc;
|
|
1673
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseAreaDevelopmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1674
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SkyDocsShowcaseAreaDevelopmentComponent, isStandalone: true, selector: "sky-docs-showcase-area-development", host: { classAttribute: "sky-padding-even-xl" }, providers: [SkyDocsHeadingAnchorService], ngImport: i0, template: "<sky-docs-toc-page menuHeadingText=\"Development\">\n @if (documentationGroup()?.packageInfo; as packageInfo) {\n <div\n class=\"sky-docs-showcase-section sky-margin-stacked-xxl sky-border-bottom-row\"\n >\n <sky-docs-heading-anchor\n anchorId=\"installation\"\n class=\"sky-margin-stacked-lg\"\n headingText=\"Installation\"\n />\n <sky-description-list>\n <sky-description-list-content>\n <sky-description-list-term> NPM package </sky-description-list-term>\n <sky-description-list-description>\n <code class=\"sky-docs-codespan sky-margin-inline-sm\">{{\n packageInfo.packageName\n }}</code>\n <a [attr.href]=\"packageInfo.registryUrl\">View in NPM</a\n ><span> | </span\n ><a [attr.href]=\"packageInfo.repoUrl\">View in GitHub</a>\n </sky-description-list-description>\n </sky-description-list-content>\n <sky-description-list-content\n helpPopoverContent=\"To use this module, you must install peer dependencies along with its package. Also, after you install the package, you must add the module as an export in your SPA's main module to make exports available to your SPA.\"\n >\n <sky-description-list-term>\n Install with NPM\n </sky-description-list-term>\n <sky-description-list-description>\n <code\n #installationRef\n class=\"sky-docs-codespan sky-margin-inline-sm sky-margin-stacked-sm\"\n >\n npm install --save-exact {{ packageInfo.packageName }}\n </code>\n <button\n class=\"sky-btn sky-btn-default\"\n type=\"button\"\n skyDocsClipboardButton\n copySuccessMessage=\"Command copied\"\n [clipboardTarget]=\"installationRef\"\n >\n <sky-icon iconName=\"clipboard-multiple\" />\n Copy\n </button>\n </sky-description-list-description>\n </sky-description-list-content>\n </sky-description-list>\n </div>\n }\n <div\n class=\"sky-docs-showcase-section sky-margin-stacked-xxl sky-border-bottom-row\"\n >\n <ng-content />\n </div>\n @if (documentationGroup()?.publicApi; as definitions) {\n @for (\n definition of definitions;\n track definition.docsId;\n let last = $last\n ) {\n <sky-docs-type-definition [definition]=\"definition\" [stacked]=\"!last\" />\n }\n }\n</sky-docs-toc-page>\n", styles: [":host{display:block}.sky-docs-showcase-section{padding-bottom:var(--sky-padding-even-xl)}.sky-docs-showcase-section:empty{display:none}\n"], dependencies: [{ kind: "ngmodule", type: SkyDescriptionListModule }, { kind: "component", type: i1.λ18, selector: "sky-description-list", inputs: ["defaultDescription", "listItemWidth", "mode"] }, { kind: "component", type: i1.λ21, selector: "sky-description-list-content", inputs: ["helpKey", "helpPopoverContent", "helpPopoverTitle"] }, { kind: "component", type: i1.λ19, selector: "sky-description-list-term" }, { kind: "component", type: i1.λ20, selector: "sky-description-list-description" }, { kind: "ngmodule", type: SkyDocsClipboardModule }, { kind: "directive", type: SkyDocsClipboardButtonDirective, selector: "[skyDocsClipboardButton]", inputs: ["clipboardTarget", "copySuccessMessage"] }, { kind: "ngmodule", type: SkyDocsHeadingAnchorModule }, { kind: "component", type: SkyDocsHeadingAnchorComponent, selector: "sky-docs-heading-anchor", inputs: ["anchorId", "headingText", "headingTextFormat", "categoryColor", "categoryTemplate", "categoryText", "headingLevel", "strikethrough"] }, { kind: "ngmodule", type: SkyDocsTableOfContentsModule }, { kind: "component", type: SkyDocsTableOfContentsPageComponent, selector: "sky-docs-toc-page", inputs: ["menuHeadingText"] }, { kind: "ngmodule", type: SkyDocsTypeDefinitionModule }, { kind: "component", type: SkyDocsTypeDefinitionComponent, selector: "sky-docs-type-definition", inputs: ["definition", "stacked"] }, { kind: "ngmodule", type: SkyIconModule }, { kind: "component", type: i2.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1675
|
+
}
|
|
1676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseAreaDevelopmentComponent, decorators: [{
|
|
1677
|
+
type: Component,
|
|
1678
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1679
|
+
class: 'sky-padding-even-xl',
|
|
1680
|
+
}, imports: [
|
|
1681
|
+
SkyDescriptionListModule,
|
|
1682
|
+
SkyDocsClipboardModule,
|
|
1683
|
+
SkyDocsHeadingAnchorModule,
|
|
1684
|
+
SkyDocsTableOfContentsModule,
|
|
1685
|
+
SkyDocsTypeDefinitionModule,
|
|
1686
|
+
SkyIconModule,
|
|
1687
|
+
], providers: [SkyDocsHeadingAnchorService], selector: 'sky-docs-showcase-area-development', template: "<sky-docs-toc-page menuHeadingText=\"Development\">\n @if (documentationGroup()?.packageInfo; as packageInfo) {\n <div\n class=\"sky-docs-showcase-section sky-margin-stacked-xxl sky-border-bottom-row\"\n >\n <sky-docs-heading-anchor\n anchorId=\"installation\"\n class=\"sky-margin-stacked-lg\"\n headingText=\"Installation\"\n />\n <sky-description-list>\n <sky-description-list-content>\n <sky-description-list-term> NPM package </sky-description-list-term>\n <sky-description-list-description>\n <code class=\"sky-docs-codespan sky-margin-inline-sm\">{{\n packageInfo.packageName\n }}</code>\n <a [attr.href]=\"packageInfo.registryUrl\">View in NPM</a\n ><span> | </span\n ><a [attr.href]=\"packageInfo.repoUrl\">View in GitHub</a>\n </sky-description-list-description>\n </sky-description-list-content>\n <sky-description-list-content\n helpPopoverContent=\"To use this module, you must install peer dependencies along with its package. Also, after you install the package, you must add the module as an export in your SPA's main module to make exports available to your SPA.\"\n >\n <sky-description-list-term>\n Install with NPM\n </sky-description-list-term>\n <sky-description-list-description>\n <code\n #installationRef\n class=\"sky-docs-codespan sky-margin-inline-sm sky-margin-stacked-sm\"\n >\n npm install --save-exact {{ packageInfo.packageName }}\n </code>\n <button\n class=\"sky-btn sky-btn-default\"\n type=\"button\"\n skyDocsClipboardButton\n copySuccessMessage=\"Command copied\"\n [clipboardTarget]=\"installationRef\"\n >\n <sky-icon iconName=\"clipboard-multiple\" />\n Copy\n </button>\n </sky-description-list-description>\n </sky-description-list-content>\n </sky-description-list>\n </div>\n }\n <div\n class=\"sky-docs-showcase-section sky-margin-stacked-xxl sky-border-bottom-row\"\n >\n <ng-content />\n </div>\n @if (documentationGroup()?.publicApi; as definitions) {\n @for (\n definition of definitions;\n track definition.docsId;\n let last = $last\n ) {\n <sky-docs-type-definition [definition]=\"definition\" [stacked]=\"!last\" />\n }\n }\n</sky-docs-toc-page>\n", styles: [":host{display:block}.sky-docs-showcase-section{padding-bottom:var(--sky-padding-even-xl)}.sky-docs-showcase-section:empty{display:none}\n"] }]
|
|
1688
|
+
}] });
|
|
1689
|
+
|
|
1690
|
+
/**
|
|
1691
|
+
* @internal
|
|
1692
|
+
*/
|
|
1693
|
+
class SkyDocsCodeExampleNameToComponentTypePipe {
|
|
1694
|
+
#examples = inject(SKY_DOCS_CODE_EXAMPLE_COMPONENT_TYPES);
|
|
1695
|
+
transform(componentName) {
|
|
1696
|
+
return this.#examples[componentName];
|
|
1697
|
+
}
|
|
1698
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeExampleNameToComponentTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1699
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeExampleNameToComponentTypePipe, isStandalone: true, name: "skyDocsCodeExampleNameToComponentType" }); }
|
|
1700
|
+
}
|
|
1701
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsCodeExampleNameToComponentTypePipe, decorators: [{
|
|
1702
|
+
type: Pipe,
|
|
1703
|
+
args: [{
|
|
1704
|
+
name: 'skyDocsCodeExampleNameToComponentType',
|
|
1705
|
+
}]
|
|
1706
|
+
}] });
|
|
1707
|
+
|
|
1708
|
+
/**
|
|
1709
|
+
* Content for the "Examples" tab.
|
|
1710
|
+
* @internal
|
|
1711
|
+
*/
|
|
1712
|
+
class SkyDocsShowcaseAreaExamplesComponent {
|
|
1713
|
+
constructor() {
|
|
1714
|
+
this.#hostSvc = inject(SkyDocsShowcaseHostService);
|
|
1715
|
+
this.documentationGroup = toSignal(this.#hostSvc.documentationGroup);
|
|
1716
|
+
}
|
|
1717
|
+
#hostSvc;
|
|
1718
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseAreaExamplesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1719
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SkyDocsShowcaseAreaExamplesComponent, isStandalone: true, selector: "sky-docs-showcase-area-examples", host: { classAttribute: "sky-padding-even-xl" }, providers: [SkyDocsHeadingAnchorService], ngImport: i0, template: "@if (documentationGroup()?.codeExamples; as codeExamples) {\n @for (\n example of codeExamples;\n track example.componentName;\n let last = $last\n ) {\n <sky-docs-code-example-viewer\n [componentName]=\"example.componentName\"\n [componentSelector]=\"example.selector\"\n [componentType]=\"\n example.componentName | skyDocsCodeExampleNameToComponentType\n \"\n [demoHidden]=\"!!example.demoHidden\"\n [files]=\"example.files\"\n [headingText]=\"example.title || 'Example'\"\n [primaryFile]=\"example.primaryFile\"\n [stacked]=\"!last\"\n />\n }\n}\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "pipe", type: SkyDocsCodeExampleNameToComponentTypePipe, name: "skyDocsCodeExampleNameToComponentType" }, { kind: "ngmodule", type: SkyDocsCodeExampleViewerModule }, { kind: "component", type: SkyDocsCodeExampleViewerComponent, selector: "sky-docs-code-example-viewer", inputs: ["componentName", "componentSelector", "componentType", "files", "headingText", "primaryFile", "demoHidden", "stacked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1720
|
+
}
|
|
1721
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseAreaExamplesComponent, decorators: [{
|
|
1722
|
+
type: Component,
|
|
1723
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1724
|
+
class: 'sky-padding-even-xl',
|
|
1725
|
+
}, imports: [
|
|
1726
|
+
SkyDocsCodeExampleNameToComponentTypePipe,
|
|
1727
|
+
SkyDocsCodeExampleViewerModule,
|
|
1728
|
+
], providers: [SkyDocsHeadingAnchorService], selector: 'sky-docs-showcase-area-examples', template: "@if (documentationGroup()?.codeExamples; as codeExamples) {\n @for (\n example of codeExamples;\n track example.componentName;\n let last = $last\n ) {\n <sky-docs-code-example-viewer\n [componentName]=\"example.componentName\"\n [componentSelector]=\"example.selector\"\n [componentType]=\"\n example.componentName | skyDocsCodeExampleNameToComponentType\n \"\n [demoHidden]=\"!!example.demoHidden\"\n [files]=\"example.files\"\n [headingText]=\"example.title || 'Example'\"\n [primaryFile]=\"example.primaryFile\"\n [stacked]=\"!last\"\n />\n }\n}\n", styles: [":host{display:block}\n"] }]
|
|
1729
|
+
}] });
|
|
1730
|
+
|
|
1731
|
+
/**
|
|
1732
|
+
* Content for the "Overview" tab.
|
|
1733
|
+
* @internal
|
|
1734
|
+
*/
|
|
1735
|
+
class SkyDocsShowcaseAreaOverviewComponent {
|
|
1736
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseAreaOverviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1737
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SkyDocsShowcaseAreaOverviewComponent, isStandalone: true, selector: "sky-docs-showcase-area-overview", host: { classAttribute: "sky-padding-even-xl" }, providers: [SkyDocsHeadingAnchorService], ngImport: i0, template: `
|
|
1738
|
+
<sky-docs-toc-page menuHeadingText="Overview">
|
|
1739
|
+
<ng-content />
|
|
1740
|
+
</sky-docs-toc-page>
|
|
1741
|
+
`, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: SkyDocsTableOfContentsModule }, { kind: "component", type: SkyDocsTableOfContentsPageComponent, selector: "sky-docs-toc-page", inputs: ["menuHeadingText"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1742
|
+
}
|
|
1743
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseAreaOverviewComponent, decorators: [{
|
|
1744
|
+
type: Component,
|
|
1745
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1746
|
+
class: 'sky-padding-even-xl',
|
|
1747
|
+
}, imports: [SkyDocsTableOfContentsModule], providers: [SkyDocsHeadingAnchorService], selector: 'sky-docs-showcase-area-overview', template: `
|
|
1748
|
+
<sky-docs-toc-page menuHeadingText="Overview">
|
|
1749
|
+
<ng-content />
|
|
1750
|
+
</sky-docs-toc-page>
|
|
1751
|
+
`, styles: [":host{display:block}\n"] }]
|
|
1752
|
+
}] });
|
|
1753
|
+
|
|
1754
|
+
/**
|
|
1755
|
+
* Content for the "Testing" tab.
|
|
1756
|
+
* @internal
|
|
1757
|
+
*/
|
|
1758
|
+
class SkyDocsShowcaseAreaTestingComponent {
|
|
1759
|
+
constructor() {
|
|
1760
|
+
this.#hostSvc = inject(SkyDocsShowcaseHostService);
|
|
1761
|
+
this.documentationGroup = toSignal(this.#hostSvc.documentationGroup);
|
|
1762
|
+
}
|
|
1763
|
+
#hostSvc;
|
|
1764
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseAreaTestingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1765
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SkyDocsShowcaseAreaTestingComponent, isStandalone: true, selector: "sky-docs-showcase-area-testing", host: { classAttribute: "sky-padding-even-xl" }, providers: [SkyDocsHeadingAnchorService], ngImport: i0, template: "<sky-docs-toc-page menuHeadingText=\"Testing\">\n <div\n class=\"sky-docs-showcase-section sky-margin-stacked-xxl sky-border-bottom-row\"\n >\n <ng-content />\n </div>\n @if (documentationGroup()?.testing; as definitions) {\n @for (\n definition of definitions;\n track definition.docsId;\n let last = $last\n ) {\n <sky-docs-type-definition [definition]=\"definition\" [stacked]=\"!last\" />\n }\n }\n</sky-docs-toc-page>\n", styles: [":host{display:block}.sky-docs-showcase-section{padding-bottom:var(--sky-padding-even-xl)}.sky-docs-showcase-section:empty{display:none}\n"], dependencies: [{ kind: "ngmodule", type: SkyDocsTableOfContentsModule }, { kind: "component", type: SkyDocsTableOfContentsPageComponent, selector: "sky-docs-toc-page", inputs: ["menuHeadingText"] }, { kind: "ngmodule", type: SkyDocsTypeDefinitionModule }, { kind: "component", type: SkyDocsTypeDefinitionComponent, selector: "sky-docs-type-definition", inputs: ["definition", "stacked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1766
|
+
}
|
|
1767
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseAreaTestingComponent, decorators: [{
|
|
1768
|
+
type: Component,
|
|
1769
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1770
|
+
class: 'sky-padding-even-xl',
|
|
1771
|
+
}, imports: [SkyDocsTableOfContentsModule, SkyDocsTypeDefinitionModule], providers: [SkyDocsHeadingAnchorService], selector: 'sky-docs-showcase-area-testing', template: "<sky-docs-toc-page menuHeadingText=\"Testing\">\n <div\n class=\"sky-docs-showcase-section sky-margin-stacked-xxl sky-border-bottom-row\"\n >\n <ng-content />\n </div>\n @if (documentationGroup()?.testing; as definitions) {\n @for (\n definition of definitions;\n track definition.docsId;\n let last = $last\n ) {\n <sky-docs-type-definition [definition]=\"definition\" [stacked]=\"!last\" />\n }\n }\n</sky-docs-toc-page>\n", styles: [":host{display:block}.sky-docs-showcase-section{padding-bottom:var(--sky-padding-even-xl)}.sky-docs-showcase-section:empty{display:none}\n"] }]
|
|
1772
|
+
}] });
|
|
1773
|
+
|
|
1774
|
+
/**
|
|
1775
|
+
* @internal
|
|
1776
|
+
*/
|
|
1777
|
+
class SkyDocsShowcaseComponent {
|
|
1778
|
+
#anchorIdsSvc;
|
|
1779
|
+
#showcaseHostSvc;
|
|
1780
|
+
constructor() {
|
|
1781
|
+
this.#anchorIdsSvc = inject(SkyDocsTypeDefinitionAnchorIdsService);
|
|
1782
|
+
this.#showcaseHostSvc = inject(SkyDocsShowcaseHostService);
|
|
1783
|
+
this.groupName = input.required();
|
|
1784
|
+
this.packageName = input.required();
|
|
1785
|
+
this.docsGroup = computed(() => {
|
|
1786
|
+
const groupName = this.groupName();
|
|
1787
|
+
const packageName = this.packageName();
|
|
1788
|
+
return getDocumentationGroup(packageName, groupName);
|
|
1789
|
+
});
|
|
1790
|
+
this.developmentContent = contentChild(SkyDocsShowcaseAreaDevelopmentComponent);
|
|
1791
|
+
this.overviewContent = contentChild(SkyDocsShowcaseAreaOverviewComponent);
|
|
1792
|
+
this.testingContent = contentChild(SkyDocsShowcaseAreaTestingComponent);
|
|
1793
|
+
effect(() => {
|
|
1794
|
+
const docsGroup = this.docsGroup();
|
|
1795
|
+
const anchorIds = {};
|
|
1796
|
+
docsGroup.publicApi.forEach((def) => {
|
|
1797
|
+
anchorIds[def.name] = def.anchorId;
|
|
1798
|
+
});
|
|
1799
|
+
docsGroup.testing.forEach((def) => {
|
|
1800
|
+
anchorIds[def.name] = def.anchorId;
|
|
1801
|
+
});
|
|
1802
|
+
this.#anchorIdsSvc.updateAnchorIds(anchorIds);
|
|
1803
|
+
this.#showcaseHostSvc.updateGroup(docsGroup);
|
|
1804
|
+
});
|
|
1805
|
+
}
|
|
1806
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1807
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SkyDocsShowcaseComponent, isStandalone: true, selector: "sky-docs-showcase", inputs: { groupName: { classPropertyName: "groupName", publicName: "groupName", isSignal: true, isRequired: true, transformFunction: null }, packageName: { classPropertyName: "packageName", publicName: "packageName", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
1808
|
+
SkyDocsTypeDefinitionAnchorIdsService,
|
|
1809
|
+
SkyDocsShowcaseHostService,
|
|
1810
|
+
], queries: [{ propertyName: "developmentContent", first: true, predicate: SkyDocsShowcaseAreaDevelopmentComponent, descendants: true, isSignal: true }, { propertyName: "overviewContent", first: true, predicate: SkyDocsShowcaseAreaOverviewComponent, descendants: true, isSignal: true }, { propertyName: "testingContent", first: true, predicate: SkyDocsShowcaseAreaTestingComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<sky-tabset permalinkId=\"docs\">\n @if (overviewContent()) {\n <sky-tab tabHeading=\"Design\">\n <ng-container [ngTemplateOutlet]=\"overviewContentRef\" />\n </sky-tab>\n }\n @if (docsGroup().publicApi.length > 0 || developmentContent()) {\n <sky-tab tabHeading=\"Development\">\n @if (developmentContent()) {\n <ng-container [ngTemplateOutlet]=\"developmentContentRef\" />\n } @else {\n <sky-docs-showcase-area-development />\n }\n </sky-tab>\n }\n @if (docsGroup().testing.length > 0 || testingContent()) {\n <sky-tab tabHeading=\"Testing\">\n @if (testingContent()) {\n <ng-container [ngTemplateOutlet]=\"testingContentRef\" />\n } @else {\n <sky-docs-showcase-area-testing />\n }\n </sky-tab>\n }\n @if (docsGroup().codeExamples.length > 0) {\n <sky-tab tabHeading=\"Examples\">\n <sky-docs-showcase-area-examples />\n </sky-tab>\n }\n</sky-tabset>\n<ng-template #overviewContentRef>\n <ng-content select=\"sky-docs-showcase-area-overview\" />\n</ng-template>\n<ng-template #developmentContentRef>\n <ng-content select=\"sky-docs-showcase-area-development\" />\n</ng-template>\n<ng-template #testingContentRef>\n <ng-content select=\"sky-docs-showcase-area-testing\" />\n</ng-template>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SkyDocsShowcaseAreaDevelopmentComponent, selector: "sky-docs-showcase-area-development" }, { kind: "component", type: SkyDocsShowcaseAreaExamplesComponent, selector: "sky-docs-showcase-area-examples" }, { kind: "component", type: SkyDocsShowcaseAreaTestingComponent, selector: "sky-docs-showcase-area-testing" }, { kind: "ngmodule", type: SkyTabsModule }, { kind: "component", type: i6.λ1, selector: "sky-tab", inputs: ["active", "disabled", "permalinkValue", "tabHeaderCount", "tabHeading", "tabIndexValue", "layout"], outputs: ["close"] }, { kind: "component", type: i6.λ2, selector: "sky-tabset", inputs: ["active", "ariaLabel", "ariaLabelledBy", "permalinkId", "tabStyle"], outputs: ["activeChange", "newTab", "openTab", "tabIndexesChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1811
|
+
}
|
|
1812
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseComponent, decorators: [{
|
|
1813
|
+
type: Component,
|
|
1814
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1815
|
+
NgTemplateOutlet,
|
|
1816
|
+
SkyDocsShowcaseAreaDevelopmentComponent,
|
|
1817
|
+
SkyDocsShowcaseAreaExamplesComponent,
|
|
1818
|
+
SkyDocsShowcaseAreaTestingComponent,
|
|
1819
|
+
SkyTabsModule,
|
|
1820
|
+
], providers: [
|
|
1821
|
+
SkyDocsTypeDefinitionAnchorIdsService,
|
|
1822
|
+
SkyDocsShowcaseHostService,
|
|
1823
|
+
], selector: 'sky-docs-showcase', template: "<sky-tabset permalinkId=\"docs\">\n @if (overviewContent()) {\n <sky-tab tabHeading=\"Design\">\n <ng-container [ngTemplateOutlet]=\"overviewContentRef\" />\n </sky-tab>\n }\n @if (docsGroup().publicApi.length > 0 || developmentContent()) {\n <sky-tab tabHeading=\"Development\">\n @if (developmentContent()) {\n <ng-container [ngTemplateOutlet]=\"developmentContentRef\" />\n } @else {\n <sky-docs-showcase-area-development />\n }\n </sky-tab>\n }\n @if (docsGroup().testing.length > 0 || testingContent()) {\n <sky-tab tabHeading=\"Testing\">\n @if (testingContent()) {\n <ng-container [ngTemplateOutlet]=\"testingContentRef\" />\n } @else {\n <sky-docs-showcase-area-testing />\n }\n </sky-tab>\n }\n @if (docsGroup().codeExamples.length > 0) {\n <sky-tab tabHeading=\"Examples\">\n <sky-docs-showcase-area-examples />\n </sky-tab>\n }\n</sky-tabset>\n<ng-template #overviewContentRef>\n <ng-content select=\"sky-docs-showcase-area-overview\" />\n</ng-template>\n<ng-template #developmentContentRef>\n <ng-content select=\"sky-docs-showcase-area-development\" />\n</ng-template>\n<ng-template #testingContentRef>\n <ng-content select=\"sky-docs-showcase-area-testing\" />\n</ng-template>\n", styles: [":host{display:block}\n"] }]
|
|
1824
|
+
}], ctorParameters: () => [] });
|
|
1825
|
+
|
|
1826
|
+
/**
|
|
1827
|
+
* @internal
|
|
1828
|
+
*/
|
|
1829
|
+
class SkyDocsShowcaseModule {
|
|
1830
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1831
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseModule, imports: [SkyDocsShowcaseComponent,
|
|
1832
|
+
SkyDocsShowcaseAreaDevelopmentComponent,
|
|
1833
|
+
SkyDocsShowcaseAreaExamplesComponent,
|
|
1834
|
+
SkyDocsShowcaseAreaOverviewComponent,
|
|
1835
|
+
SkyDocsShowcaseAreaTestingComponent], exports: [SkyDocsShowcaseComponent,
|
|
1836
|
+
SkyDocsShowcaseAreaDevelopmentComponent,
|
|
1837
|
+
SkyDocsShowcaseAreaOverviewComponent,
|
|
1838
|
+
SkyDocsShowcaseAreaTestingComponent] }); }
|
|
1839
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseModule, imports: [SkyDocsShowcaseComponent,
|
|
1840
|
+
SkyDocsShowcaseAreaDevelopmentComponent,
|
|
1841
|
+
SkyDocsShowcaseAreaExamplesComponent,
|
|
1842
|
+
SkyDocsShowcaseAreaTestingComponent] }); }
|
|
534
1843
|
}
|
|
535
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type:
|
|
1844
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDocsShowcaseModule, decorators: [{
|
|
536
1845
|
type: NgModule,
|
|
537
1846
|
args: [{
|
|
538
|
-
imports: [
|
|
539
|
-
|
|
1847
|
+
imports: [
|
|
1848
|
+
SkyDocsShowcaseComponent,
|
|
1849
|
+
SkyDocsShowcaseAreaDevelopmentComponent,
|
|
1850
|
+
SkyDocsShowcaseAreaExamplesComponent,
|
|
1851
|
+
SkyDocsShowcaseAreaOverviewComponent,
|
|
1852
|
+
SkyDocsShowcaseAreaTestingComponent,
|
|
1853
|
+
],
|
|
1854
|
+
exports: [
|
|
1855
|
+
SkyDocsShowcaseComponent,
|
|
1856
|
+
SkyDocsShowcaseAreaDevelopmentComponent,
|
|
1857
|
+
SkyDocsShowcaseAreaOverviewComponent,
|
|
1858
|
+
SkyDocsShowcaseAreaTestingComponent,
|
|
1859
|
+
],
|
|
540
1860
|
}]
|
|
541
1861
|
}] });
|
|
542
1862
|
|
|
@@ -544,5 +1864,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
544
1864
|
* Generated bundle index. Do not edit.
|
|
545
1865
|
*/
|
|
546
1866
|
|
|
547
|
-
export {
|
|
1867
|
+
export { SKY_DOCS_CODE_HIGHLIGHT_LANGUAGES, SkyDocsCategoryTagModule, SkyDocsClipboardModule, SkyDocsClipboardService, SkyDocsCodeExampleViewerModule, SkyDocsCodeHighlightPipe, SkyDocsCodeHighlightService, SkyDocsCodeSnippetModule, SkyDocsHeadingAnchorModule, SkyDocsHeadingAnchorService, SkyDocsShowcaseModule, SkyDocsTableOfContentsModule, SkyDocsTypeDefinitionAnchorIdsService, SkyDocsTypeDefinitionModule, provideSkyDocsCodeExampleTypes, SkyDocsCodeSnippetComponent as λ1, SkyDocsShowcaseAreaOverviewComponent as λ10, SkyDocsShowcaseAreaTestingComponent as λ11, SkyDocsShowcaseComponent as λ12, SkyDocsCodeExampleViewerComponent as λ2, SkyDocsClipboardButtonDirective as λ3, SkyDocsCategoryTagComponent as λ4, SkyDocsHeadingAnchorComponent as λ5, SkyDocsTableOfContentsPageComponent as λ6, SkyDocsCodeSnippetWrapperComponent as λ7, SkyDocsTypeDefinitionComponent as λ8, SkyDocsShowcaseAreaDevelopmentComponent as λ9 };
|
|
548
1868
|
//# sourceMappingURL=skyux-docs-tools.mjs.map
|