@koobiq/components 19.5.0 → 19.7.0
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/accordion/accordion-content.directive.d.ts +4 -0
- package/accordion/accordion-trigger.directive.d.ts +4 -0
- package/actions-panel/actions-panel-container.scss +6 -0
- package/actions-panel/actions-panel-tokens.scss +4 -1
- package/autocomplete/autocomplete.component.d.ts +6 -1
- package/autocomplete/autocomplete.module.d.ts +1 -1
- package/autocomplete/autocomplete.scss +14 -3
- package/badge/badge-tokens.scss +3 -3
- package/breadcrumbs/breadcrumbs.scss +0 -4
- package/button/button-group.d.ts +45 -0
- package/button/button-group.scss +17 -0
- package/button/button.component.d.ts +3 -0
- package/button/button.module.d.ts +2 -1
- package/button/public-api.d.ts +1 -0
- package/button-toggle/button-toggle-tokens.scss +1 -1
- package/checkbox/checkbox.d.ts +5 -4
- package/code-block/code-block-highlight.d.ts +1 -0
- package/code-block/code-block-tokens.scss +35 -16
- package/code-block/code-block.d.ts +8 -3
- package/core/error/error-state-matcher.d.ts +10 -0
- package/core/forms/_forms.scss +10 -3
- package/core/option/_option-action-theme.scss +1 -0
- package/core/option/action-container.scss +4 -6
- package/core/option/option.d.ts +8 -0
- package/core/option/option.scss +5 -0
- package/core/pop-up/pop-up-trigger.d.ts +1 -1
- package/core/select/common.d.ts +4 -4
- package/core/styles/common/_groups-mixins.scss +79 -0
- package/core/styles/common/_groups.scss +4 -34
- package/core/styles/common/_overlay.scss +4 -0
- package/core/styles/common/_select.scss +4 -0
- package/core/styles/theming/scrollbar-tokens.scss +6 -6
- package/core/styles/visual/_layout.scss +0 -2
- package/core/utils/utils.d.ts +2 -0
- package/core/validation/validation.d.ts +1 -1
- package/datepicker/datepicker-input.directive.d.ts +1 -0
- package/dropdown/dropdown-trigger.directive.d.ts +5 -0
- package/ellipsis-center/ellipsis-center.directive.d.ts +0 -1
- package/fesm2022/koobiq-components-accordion.mjs +52 -30
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +12 -12
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +16 -16
- package/fesm2022/koobiq-components-app-switcher.mjs +25 -25
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +39 -23
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +14 -14
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +26 -26
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +12 -12
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +146 -24
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +17 -19
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +13 -13
- package/fesm2022/koobiq-components-code-block.mjs +43 -27
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +28 -28
- package/fesm2022/koobiq-components-core.mjs +290 -250
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +40 -64
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +7 -7
- package/fesm2022/koobiq-components-dl.mjs +13 -13
- package/fesm2022/koobiq-components-dropdown.mjs +38 -21
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +13 -13
- package/fesm2022/koobiq-components-ellipsis-center.mjs +8 -9
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-empty-state.mjs +19 -19
- package/fesm2022/koobiq-components-file-upload.mjs +39 -39
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +109 -97
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +67 -60
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +31 -27
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +108 -68
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +22 -22
- package/fesm2022/koobiq-components-link.mjs +17 -17
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +19 -19
- package/fesm2022/koobiq-components-loader-overlay.mjs +28 -19
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +54 -22
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +40 -32
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar-ic.mjs +34 -34
- package/fesm2022/koobiq-components-navbar.mjs +45 -45
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +16 -16
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +16 -16
- package/fesm2022/koobiq-components-popover.mjs +52 -23
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +13 -13
- package/fesm2022/koobiq-components-progress-spinner.mjs +14 -14
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +10 -10
- package/fesm2022/koobiq-components-resizer.mjs +10 -10
- package/fesm2022/koobiq-components-risk-level.mjs +7 -7
- package/fesm2022/koobiq-components-scrollbar.mjs +12 -12
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +17 -8
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +368 -63
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +13 -13
- package/fesm2022/koobiq-components-sidepanel.mjs +27 -27
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-skeleton.mjs +51 -18
- package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
- package/fesm2022/koobiq-components-split-button.mjs +9 -9
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +16 -16
- package/fesm2022/koobiq-components-table.mjs +10 -10
- package/fesm2022/koobiq-components-tabs.mjs +52 -52
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +79 -64
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +7 -7
- package/fesm2022/koobiq-components-time-range.mjs +24 -24
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +10 -10
- package/fesm2022/koobiq-components-timezone.mjs +26 -26
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +8 -9
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +16 -16
- package/fesm2022/koobiq-components-toggle.mjs +12 -9
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +84 -51
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +15 -15
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +12 -10
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +41 -42
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +28 -28
- package/fesm2022/koobiq-components-username.mjs.map +1 -1
- package/filter-bar/filter-search.d.ts +10 -1
- package/filter-bar/pipes/pipe-date.scss +2 -1
- package/form-field/_form-field-theme.scss +10 -2
- package/form-field/form-field-tokens.scss +1 -0
- package/form-field/form-field.d.ts +19 -1
- package/form-field/form-field.scss +41 -2
- package/icon/icon-button.component.d.ts +3 -0
- package/inline-edit/inline-edit-tokens.scss +3 -3
- package/inline-edit/inline-edit.d.ts +30 -11
- package/inline-edit/inline-edit.scss +28 -30
- package/link/_link-theme.scss +3 -1
- package/link/link-tokens.scss +7 -6
- package/link/link.component.d.ts +5 -4
- package/loader-overlay/_loader-overlay-theme.scss +12 -0
- package/loader-overlay/loader-overlay-tokens.scss +1 -0
- package/loader-overlay/loader-overlay.component.d.ts +7 -1
- package/markdown/_markdown-theme.scss +3 -31
- package/markdown/markdown-tokens.scss +0 -11
- package/markdown/markdown.component.d.ts +11 -6
- package/markdown/markdown.scss +0 -11
- package/navbar/navbar.scss +3 -0
- package/package.json +4 -5
- package/popover/popover.component.d.ts +15 -2
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/progress-spinner/progress-spinner.scss +1 -0
- package/schematics/ng-add/index.js +4 -5
- package/scrollbar/scrollbar-tokens.scss +7 -7
- package/search-expandable/search-expandable.d.ts +6 -2
- package/select/public-api.d.ts +1 -0
- package/select/select-common.d.ts +30 -0
- package/select/select-tokens.scss +2 -2
- package/select/select.component.d.ts +201 -29
- package/select/select.module.d.ts +3 -2
- package/sidepanel/sidepanel-config.d.ts +6 -1
- package/skeleton/skeleton.d.ts +8 -4
- package/skeleton/skeleton.scss +19 -5
- package/split-button/_split-button-theme.scss +2 -1
- package/tags/tag-list.component.d.ts +15 -11
- package/tags/tag-tokens.scss +4 -4
- package/tags/tag.component.d.ts +5 -2
- package/timezone/timezone-option-tokens.scss +0 -10
- package/title/title.directive.d.ts +0 -1
- package/toggle/toggle.component.d.ts +4 -3
- package/tooltip/_tooltip-theme.scss +5 -1
- package/tooltip/tooltip-tokens.scss +4 -4
- package/tooltip/tooltip.component.d.ts +20 -2
- package/top-bar/top-bar.scss +3 -0
- package/tree/tree-option.scss +7 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, InjectionToken, afterNextRender, Input, ViewChild, Optional, Inject, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
3
|
+
import { Injectable, InjectionToken, signal, inject, afterNextRender, effect, Input, ViewChild, Optional, Inject, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
3
4
|
import * as i2 from '@angular/platform-browser';
|
|
4
5
|
import { marked } from 'marked';
|
|
5
6
|
|
|
@@ -56,17 +57,22 @@ class KbqMarkdownService {
|
|
|
56
57
|
transform(htmlContent) {
|
|
57
58
|
let transformed = htmlContent;
|
|
58
59
|
MARKDOWN_TAGS_TO_CLASS_ALIAS.forEach((tag) => {
|
|
59
|
-
transformed = transformed.replace(new RegExp(`<${tag}`, 'g'), (_match) =>
|
|
60
|
+
transformed = transformed.replace(new RegExp(`<${tag}`, 'g'), (_match) => {
|
|
61
|
+
if (tag === 'a') {
|
|
62
|
+
return `<${tag} class="${CLASS_PREFIX}__${tag} kbq-link kbq-text-only kbq-link_use-visited"`;
|
|
63
|
+
}
|
|
64
|
+
return `<${tag} class="${CLASS_PREFIX}__${tag}"`;
|
|
65
|
+
});
|
|
60
66
|
});
|
|
61
67
|
MARKDOWN_WHOLE_TAGS_TO_CLASS_ALIAS.forEach((tag) => {
|
|
62
68
|
transformed = transformed.replace(new RegExp(`<${tag}\s*>`, 'g'), (_match) => `<${tag} class="${CLASS_PREFIX}__${tag}">`);
|
|
63
69
|
});
|
|
64
70
|
return transformed;
|
|
65
71
|
}
|
|
66
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
67
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
72
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqMarkdownService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
73
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqMarkdownService }); }
|
|
68
74
|
}
|
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqMarkdownService, decorators: [{
|
|
70
76
|
type: Injectable
|
|
71
77
|
}] });
|
|
72
78
|
|
|
@@ -85,41 +91,64 @@ class KbqMarkdown {
|
|
|
85
91
|
}
|
|
86
92
|
set markdownText(value) {
|
|
87
93
|
if (value && this.markdownText !== value) {
|
|
88
|
-
this.resultHtml
|
|
94
|
+
this.resultHtml.set(this.getResultHTML(value));
|
|
89
95
|
}
|
|
90
96
|
this._markdownText = value;
|
|
91
97
|
}
|
|
92
|
-
constructor(markdownService,
|
|
98
|
+
constructor(markdownService, sanitizer, markedOptions) {
|
|
93
99
|
this.markdownService = markdownService;
|
|
94
|
-
this.cdr = cdr;
|
|
95
100
|
this.sanitizer = sanitizer;
|
|
96
101
|
this.markedOptions = markedOptions;
|
|
102
|
+
this.resultHtml = signal(null);
|
|
97
103
|
this._markdownText = null;
|
|
104
|
+
this.focusMonitor = inject(FocusMonitor);
|
|
105
|
+
this.links = [];
|
|
98
106
|
afterNextRender(() => {
|
|
99
107
|
if (!this.markdownText && this.contentWrapper?.nativeElement.textContent) {
|
|
100
|
-
this.resultHtml
|
|
101
|
-
this.cdr.detectChanges();
|
|
108
|
+
this.resultHtml.set(this.getResultHTML(this.contentWrapper?.nativeElement.textContent));
|
|
102
109
|
}
|
|
103
110
|
});
|
|
111
|
+
effect(() => {
|
|
112
|
+
if (this.resultHtml()) {
|
|
113
|
+
Promise.resolve().then(() => this.startMonitoringLinks());
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
this.stopMonitoringLinks();
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
ngOnDestroy() {
|
|
121
|
+
this.stopMonitoringLinks();
|
|
104
122
|
}
|
|
105
123
|
getResultHTML(markdown) {
|
|
106
124
|
return this.sanitizer.bypassSecurityTrustHtml(this.markdownService.parseToHtml(markdown, this.markedOptions));
|
|
107
125
|
}
|
|
108
|
-
|
|
109
|
-
|
|
126
|
+
startMonitoringLinks() {
|
|
127
|
+
this.stopMonitoringLinks();
|
|
128
|
+
this.outputWrapper.nativeElement.querySelectorAll('.kbq-markdown__a').forEach((link) => {
|
|
129
|
+
this.links.push(link);
|
|
130
|
+
this.focusMonitor.monitor(link, true);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
stopMonitoringLinks() {
|
|
134
|
+
this.links.forEach((link) => this.focusMonitor.stopMonitoring(link));
|
|
135
|
+
this.links.length = 0;
|
|
136
|
+
}
|
|
137
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqMarkdown, deps: [{ token: KbqMarkdownService }, { token: i2.DomSanitizer }, { token: KBQ_MARKDOWN_MARKED_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
138
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: KbqMarkdown, isStandalone: true, selector: "kbq-markdown", inputs: { markdownText: "markdownText" }, host: { classAttribute: "kbq-markdown" }, viewQueries: [{ propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true, static: true }, { propertyName: "outputWrapper", first: true, predicate: ["outputWrapper"], descendants: true, static: true }], ngImport: i0, template: `
|
|
110
139
|
<pre #contentWrapper class="kbq-markdown__input" ngPreserveWhitespaces><ng-content /></pre>
|
|
111
|
-
<div class="kbq-markdown__output" [innerHtml]="resultHtml"></div>
|
|
112
|
-
`, isInline: true, styles: ["@charset \"UTF-8\";.kbq-markdown{display:block}.kbq-markdown .kbq-markdown__input{display:none}.kbq-markdown .kbq-markdown__output{flex:1}.kbq-markdown .kbq-markdown__output>:first-child{margin-top:0}.kbq-markdown .kbq-markdown__output>:last-child{margin-bottom:0}.kbq-markdown .kbq-markdown__h1{margin-top:var(--kbq-markdown-h1-size-margin-top);margin-bottom:var(--kbq-markdown-h1-size-margin-bottom)}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h2{margin-top:var(--kbq-markdown-h2-size-margin-top);margin-bottom:var(--kbq-markdown-h2-size-margin-bottom)}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h3{margin-top:var(--kbq-markdown-h3-size-margin-top);margin-bottom:var(--kbq-markdown-h3-size-margin-bottom)}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h4{margin-top:var(--kbq-markdown-h4-size-margin-top);margin-bottom:var(--kbq-markdown-h4-size-margin-bottom)}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h5{margin-top:var(--kbq-markdown-h5-size-margin-top);margin-bottom:var(--kbq-markdown-h5-size-margin-bottom)}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h6{margin-top:var(--kbq-markdown-h6-size-margin-top);margin-bottom:var(--kbq-markdown-h6-size-margin-bottom)}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__a{display:inline;text-decoration:none;cursor:pointer;border-bottom-style:solid;border-bottom-width:1px;transition:color ease-out .3s}.kbq-markdown .kbq-markdown__p{margin-top:var(--kbq-markdown-p-size-margin-top);margin-bottom:var(--kbq-markdown-p-size-margin-bottom)}.kbq-markdown .kbq-markdown__ul,.kbq-markdown .kbq-markdown__ol{margin-top:var(--kbq-markdown-list-size-margin-top);margin-bottom:var(--kbq-markdown-list-size-margin-bottom)}.kbq-markdown .kbq-markdown__ul>li,.kbq-markdown .kbq-markdown__ol>li{margin-bottom:var(--kbq-markdown-list-size-item-margin-bottom)}.kbq-markdown .kbq-markdown__ul{position:relative;list-style:none;padding:var(--kbq-markdown-list-size-ul-padding)}.kbq-markdown .kbq-markdown__ul>li:before{content:\"\\2014\";display:block;position:absolute;width:24px;text-align:left;left:0}.kbq-markdown .kbq-markdown__ol{list-style:none;padding:0;counter-reset:li}.kbq-markdown .kbq-markdown__ol>li:before{content:counter(li) \".\";counter-increment:li;padding-right:var(--kbq-markdown-list-size-ol-number-padding-right)}.kbq-markdown .kbq-markdown__ol>li>*{display:inline-block}.kbq-markdown .kbq-markdown__p+.kbq-markdown__ul,.kbq-markdown .kbq-markdown__p+.kbq-markdown__ol{margin-top:var(--kbq-markdown-list-size-margin-top-after-paragraph)}.kbq-markdown .kbq-markdown__blockquote{margin-top:var(--kbq-markdown-blockquote-size-margin-top);margin-left:0;margin-bottom:var(--kbq-markdown-blockquote-size-margin-bottom);margin-right:0;border-left-width:var(--kbq-markdown-blockquote-size-line-width);border-left-style:solid;padding:var(--kbq-markdown-blockquote-size-padding)}.kbq-markdown .kbq-markdown__blockquote>.kbq-markdown__p{margin-top:0;margin-bottom:0}.kbq-markdown .kbq-markdown__pre{position:relative;overflow-x:auto;margin-top:var(--kbq-markdown-code-size-multiline-margin-top);margin-bottom:var(--kbq-markdown-code-size-multiline-margin-bottom);padding:var(--kbq-markdown-code-size-multiline-padding)}.kbq-markdown .kbq-markdown__pre,.kbq-markdown .kbq-markdown__code{border-radius:var(--kbq-markdown-code-size-border-radius)}.kbq-markdown .kbq-markdown__code:not(.kbq-markdown__pre>.kbq-markdown__code){white-space:nowrap;padding:var(--kbq-markdown-code-size-inline-padding)}.kbq-markdown .kbq-markdown__img{max-width:100%;margin-top:var(--kbq-markdown-image-size-margin-top);margin-bottom:var(--kbq-markdown-image-size-margin-bottom)}.kbq-markdown .kbq-markdown__img+em{display:block;margin-top:var(--kbq-markdown-image-size-caption-margin-top);margin-bottom:var(--kbq-markdown-image-size-caption-margin-bottom)}.kbq-markdown .kbq-markdown__hr{border-top:none;border-left:none;border-right:none;border-bottom-style:solid;border-bottom-width:var(--kbq-markdown-hr-size-width);margin:var(--kbq-markdown-hr-size-margin-vertical) 0}.kbq-markdown .kbq-markdown__table{max-width:100%;overflow-x:auto;display:table;border-collapse:collapse;margin-bottom:var(--kbq-markdown-table-size-margin-bottom)}.kbq-markdown .kbq-markdown__table td{vertical-align:top}.kbq-markdown .kbq-markdown__table th,.kbq-markdown .kbq-markdown__table td{padding:var(--kbq-markdown-table-size-padding);font-weight:400}.kbq-markdown .kbq-markdown__table>.kbq-markdown__thead{border-bottom-style:solid;border-bottom-width:var(--kbq-markdown-table-size-border-width);text-align:left}.kbq-markdown .kbq-markdown__table>.kbq-markdown__thead th:first-child{padding-left:0}.kbq-markdown .kbq-markdown__table>.kbq-markdown__thead th:last-child{padding-right:0}.kbq-markdown .kbq-markdown__table>.kbq-markdown__tbody td:first-child{padding-left:0}.kbq-markdown .kbq-markdown__table>.kbq-markdown__tbody td:last-child{padding-right:0}\n", ".kbq-markdown{--kbq-markdown-bg: transparent;--kbq-markdown-h1-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h1-size-margin-top: 0;--kbq-markdown-h1-size-margin-bottom: var(--kbq-size-l);--kbq-markdown-h2-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h2-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h2-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-h3-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h3-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h3-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-h4-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h4-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h4-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-h5-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h5-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h5-size-margin-bottom: var(--kbq-size-s);--kbq-markdown-h6-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h6-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h6-size-margin-bottom: var(--kbq-size-s);--kbq-markdown-p-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-p-size-margin-top: var(--kbq-size-m);--kbq-markdown-p-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-list-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-list-size-margin-top: var(--kbq-size-m);--kbq-markdown-list-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-list-size-margin-top-after-paragraph: calc(-1 * var(--kbq-size-s));--kbq-markdown-list-size-ol-number-padding-right: var(--kbq-size-xxs);--kbq-markdown-list-size-ul-padding: 0 0 0 var(--kbq-size-xxl);--kbq-markdown-list-size-item-margin-bottom: var(--kbq-size-xxs);--kbq-markdown-blockquote-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-blockquote-size-margin-top: var(--kbq-size-m);--kbq-markdown-blockquote-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-blockquote-size-padding: var(--kbq-size-3xs) var(--kbq-size-m);--kbq-markdown-blockquote-size-line-width: var(--kbq-size-xxs);--kbq-markdown-blockquote-size-border-radius: 0;--kbq-markdown-blockquote-size-border-width: 0;--kbq-markdown-code-size-multiline-margin-top: var(--kbq-size-m);--kbq-markdown-code-size-multiline-margin-bottom: var(--kbq-size-xxl);--kbq-markdown-code-size-inline-padding: var(--kbq-size-3xs) var(--kbq-size-xs);--kbq-markdown-code-size-multiline-padding: var(--kbq-size-m) var(--kbq-size-l);--kbq-markdown-code-size-border-radius: var(--kbq-size-border-radius);--kbq-markdown-code-size-border-width: var(--kbq-size-border-width);--kbq-markdown-link-size-icon-margin: var(--kbq-link-size-normal-content-padding, var(--kbq-size-xxs));--kbq-markdown-link-size-state-focused-outline-offset: var(--kbq-link-size-state-focused-outline-offset);--kbq-markdown-link-size-state-focused-outline-width: var(--kbq-link-size-state-focused-outline-width);--kbq-markdown-image-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-image-size-margin-top: var(--kbq-size-m);--kbq-markdown-image-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-image-size-caption-margin-top: calc(-1 * var(--kbq-size-s));--kbq-markdown-image-size-caption-margin-bottom: var(--kbq-size-xxl);--kbq-markdown-hr-size-width: 1px;--kbq-markdown-hr-size-margin-vertical: var(--kbq-size-xxl);--kbq-markdown-table-size-border-width: var(--kbq-size-border-width);--kbq-markdown-table-size-padding: var(--kbq-size-s);--kbq-markdown-table-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-size-max-width: 650px;--kbq-markdown-h1-color: var(--kbq-foreground-contrast);--kbq-markdown-h2-color: var(--kbq-foreground-contrast);--kbq-markdown-h3-color: var(--kbq-foreground-contrast);--kbq-markdown-h4-color: var(--kbq-foreground-contrast);--kbq-markdown-h5-color: var(--kbq-foreground-contrast);--kbq-markdown-h6-color: var(--kbq-foreground-contrast);--kbq-markdown-p-color: var(--kbq-foreground-contrast);--kbq-markdown-list-color: var(--kbq-foreground-contrast);--kbq-markdown-blockquote-text: var(--kbq-foreground-contrast);--kbq-markdown-blockquote-line: var(--kbq-line-contrast-less);--kbq-markdown-blockquote-background: var(--kbq-background-contrast-fade);--kbq-markdown-blockquote-border: transparent;--kbq-markdown-code-text: var(--kbq-foreground-contrast);--kbq-markdown-code-background: var(--kbq-background-contrast-fade);--kbq-markdown-code-border: var(--kbq-line-contrast-less);--kbq-markdown-link-text: var(--kbq-link-text);--kbq-markdown-link-border-bottom: var(--kbq-link-border-bottom);--kbq-markdown-link-state-visited-text: var(--kbq-link-state-visited-text);--kbq-markdown-link-state-visited-border-bottom: var(--kbq-link-state-visited-border-bottom);--kbq-markdown-link-state-hover-text: var(--kbq-link-state-hover-text);--kbq-markdown-link-state-hover-border-bottom: var(--kbq-link-state-hover-border-bottom);--kbq-markdown-link-state-active: var(--kbq-link-state-active-text);--kbq-markdown-link-state-focused-outline: var(--kbq-link-state-focused-outline);--kbq-markdown-image-caption-text: var(--kbq-foreground-contrast-secondary);--kbq-markdown-hr-color: var(--kbq-line-contrast-less);--kbq-markdown-table-header: var(--kbq-foreground-contrast-secondary);--kbq-markdown-table-body: var(--kbq-foreground-contrast);--kbq-markdown-table-border: var(--kbq-line-contrast-less)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
140
|
+
<div #outputWrapper class="kbq-markdown__output" [innerHtml]="resultHtml()"></div>
|
|
141
|
+
`, isInline: true, styles: ["@charset \"UTF-8\";.kbq-markdown{display:block}.kbq-markdown .kbq-markdown__input{display:none}.kbq-markdown .kbq-markdown__output{flex:1}.kbq-markdown .kbq-markdown__output>:first-child{margin-top:0}.kbq-markdown .kbq-markdown__output>:last-child{margin-bottom:0}.kbq-markdown .kbq-markdown__h1{margin-top:var(--kbq-markdown-h1-size-margin-top);margin-bottom:var(--kbq-markdown-h1-size-margin-bottom)}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h2{margin-top:var(--kbq-markdown-h2-size-margin-top);margin-bottom:var(--kbq-markdown-h2-size-margin-bottom)}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h3{margin-top:var(--kbq-markdown-h3-size-margin-top);margin-bottom:var(--kbq-markdown-h3-size-margin-bottom)}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h4{margin-top:var(--kbq-markdown-h4-size-margin-top);margin-bottom:var(--kbq-markdown-h4-size-margin-bottom)}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h5{margin-top:var(--kbq-markdown-h5-size-margin-top);margin-bottom:var(--kbq-markdown-h5-size-margin-bottom)}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h6{margin-top:var(--kbq-markdown-h6-size-margin-top);margin-bottom:var(--kbq-markdown-h6-size-margin-bottom)}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__p{margin-top:var(--kbq-markdown-p-size-margin-top);margin-bottom:var(--kbq-markdown-p-size-margin-bottom)}.kbq-markdown .kbq-markdown__ul,.kbq-markdown .kbq-markdown__ol{margin-top:var(--kbq-markdown-list-size-margin-top);margin-bottom:var(--kbq-markdown-list-size-margin-bottom)}.kbq-markdown .kbq-markdown__ul>li,.kbq-markdown .kbq-markdown__ol>li{margin-bottom:var(--kbq-markdown-list-size-item-margin-bottom)}.kbq-markdown .kbq-markdown__ul{position:relative;list-style:none;padding:var(--kbq-markdown-list-size-ul-padding)}.kbq-markdown .kbq-markdown__ul>li:before{content:\"\\2014\";display:block;position:absolute;width:24px;text-align:left;left:0}.kbq-markdown .kbq-markdown__ol{list-style:none;padding:0;counter-reset:li}.kbq-markdown .kbq-markdown__ol>li:before{content:counter(li) \".\";counter-increment:li;padding-right:var(--kbq-markdown-list-size-ol-number-padding-right)}.kbq-markdown .kbq-markdown__ol>li>*{display:inline-block}.kbq-markdown .kbq-markdown__p+.kbq-markdown__ul,.kbq-markdown .kbq-markdown__p+.kbq-markdown__ol{margin-top:var(--kbq-markdown-list-size-margin-top-after-paragraph)}.kbq-markdown .kbq-markdown__blockquote{margin-top:var(--kbq-markdown-blockquote-size-margin-top);margin-left:0;margin-bottom:var(--kbq-markdown-blockquote-size-margin-bottom);margin-right:0;border-left-width:var(--kbq-markdown-blockquote-size-line-width);border-left-style:solid;padding:var(--kbq-markdown-blockquote-size-padding)}.kbq-markdown .kbq-markdown__blockquote>.kbq-markdown__p{margin-top:0;margin-bottom:0}.kbq-markdown .kbq-markdown__pre{position:relative;overflow-x:auto;margin-top:var(--kbq-markdown-code-size-multiline-margin-top);margin-bottom:var(--kbq-markdown-code-size-multiline-margin-bottom);padding:var(--kbq-markdown-code-size-multiline-padding)}.kbq-markdown .kbq-markdown__pre,.kbq-markdown .kbq-markdown__code{border-radius:var(--kbq-markdown-code-size-border-radius)}.kbq-markdown .kbq-markdown__code:not(.kbq-markdown__pre>.kbq-markdown__code){white-space:nowrap;padding:var(--kbq-markdown-code-size-inline-padding)}.kbq-markdown .kbq-markdown__img{max-width:100%;margin-top:var(--kbq-markdown-image-size-margin-top);margin-bottom:var(--kbq-markdown-image-size-margin-bottom)}.kbq-markdown .kbq-markdown__img+em{display:block;margin-top:var(--kbq-markdown-image-size-caption-margin-top);margin-bottom:var(--kbq-markdown-image-size-caption-margin-bottom)}.kbq-markdown .kbq-markdown__hr{border-top:none;border-left:none;border-right:none;border-bottom-style:solid;border-bottom-width:var(--kbq-markdown-hr-size-width);margin:var(--kbq-markdown-hr-size-margin-vertical) 0}.kbq-markdown .kbq-markdown__table{max-width:100%;overflow-x:auto;display:table;border-collapse:collapse;margin-bottom:var(--kbq-markdown-table-size-margin-bottom)}.kbq-markdown .kbq-markdown__table td{vertical-align:top}.kbq-markdown .kbq-markdown__table th,.kbq-markdown .kbq-markdown__table td{padding:var(--kbq-markdown-table-size-padding);font-weight:400}.kbq-markdown .kbq-markdown__table>.kbq-markdown__thead{border-bottom-style:solid;border-bottom-width:var(--kbq-markdown-table-size-border-width);text-align:left}.kbq-markdown .kbq-markdown__table>.kbq-markdown__thead th:first-child{padding-left:0}.kbq-markdown .kbq-markdown__table>.kbq-markdown__thead th:last-child{padding-right:0}.kbq-markdown .kbq-markdown__table>.kbq-markdown__tbody td:first-child{padding-left:0}.kbq-markdown .kbq-markdown__table>.kbq-markdown__tbody td:last-child{padding-right:0}\n", ".kbq-markdown{--kbq-markdown-bg: transparent;--kbq-markdown-h1-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h1-size-margin-top: 0;--kbq-markdown-h1-size-margin-bottom: var(--kbq-size-l);--kbq-markdown-h2-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h2-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h2-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-h3-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h3-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h3-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-h4-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h4-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h4-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-h5-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h5-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h5-size-margin-bottom: var(--kbq-size-s);--kbq-markdown-h6-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h6-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h6-size-margin-bottom: var(--kbq-size-s);--kbq-markdown-p-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-p-size-margin-top: var(--kbq-size-m);--kbq-markdown-p-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-list-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-list-size-margin-top: var(--kbq-size-m);--kbq-markdown-list-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-list-size-margin-top-after-paragraph: calc(-1 * var(--kbq-size-s));--kbq-markdown-list-size-ol-number-padding-right: var(--kbq-size-xxs);--kbq-markdown-list-size-ul-padding: 0 0 0 var(--kbq-size-xxl);--kbq-markdown-list-size-item-margin-bottom: var(--kbq-size-xxs);--kbq-markdown-blockquote-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-blockquote-size-margin-top: var(--kbq-size-m);--kbq-markdown-blockquote-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-blockquote-size-padding: var(--kbq-size-3xs) var(--kbq-size-m);--kbq-markdown-blockquote-size-line-width: var(--kbq-size-xxs);--kbq-markdown-blockquote-size-border-radius: 0;--kbq-markdown-blockquote-size-border-width: 0;--kbq-markdown-code-size-multiline-margin-top: var(--kbq-size-m);--kbq-markdown-code-size-multiline-margin-bottom: var(--kbq-size-xxl);--kbq-markdown-code-size-inline-padding: var(--kbq-size-3xs) var(--kbq-size-xs);--kbq-markdown-code-size-multiline-padding: var(--kbq-size-m) var(--kbq-size-l);--kbq-markdown-code-size-border-radius: var(--kbq-size-border-radius);--kbq-markdown-code-size-border-width: var(--kbq-size-border-width);--kbq-markdown-image-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-image-size-margin-top: var(--kbq-size-m);--kbq-markdown-image-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-image-size-caption-margin-top: calc(-1 * var(--kbq-size-s));--kbq-markdown-image-size-caption-margin-bottom: var(--kbq-size-xxl);--kbq-markdown-hr-size-width: 1px;--kbq-markdown-hr-size-margin-vertical: var(--kbq-size-xxl);--kbq-markdown-table-size-border-width: var(--kbq-size-border-width);--kbq-markdown-table-size-padding: var(--kbq-size-s);--kbq-markdown-table-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-size-max-width: 650px;--kbq-markdown-h1-color: var(--kbq-foreground-contrast);--kbq-markdown-h2-color: var(--kbq-foreground-contrast);--kbq-markdown-h3-color: var(--kbq-foreground-contrast);--kbq-markdown-h4-color: var(--kbq-foreground-contrast);--kbq-markdown-h5-color: var(--kbq-foreground-contrast);--kbq-markdown-h6-color: var(--kbq-foreground-contrast);--kbq-markdown-p-color: var(--kbq-foreground-contrast);--kbq-markdown-list-color: var(--kbq-foreground-contrast);--kbq-markdown-blockquote-text: var(--kbq-foreground-contrast);--kbq-markdown-blockquote-line: var(--kbq-line-contrast-less);--kbq-markdown-blockquote-background: var(--kbq-background-contrast-fade);--kbq-markdown-blockquote-border: transparent;--kbq-markdown-code-text: var(--kbq-foreground-contrast);--kbq-markdown-code-background: var(--kbq-background-contrast-fade);--kbq-markdown-code-border: var(--kbq-line-contrast-less);--kbq-markdown-image-caption-text: var(--kbq-foreground-contrast-secondary);--kbq-markdown-hr-color: var(--kbq-line-contrast-less);--kbq-markdown-table-header: var(--kbq-foreground-contrast-secondary);--kbq-markdown-table-body: var(--kbq-foreground-contrast);--kbq-markdown-table-border: var(--kbq-line-contrast-less)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
113
142
|
}
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqMarkdown, decorators: [{
|
|
115
144
|
type: Component,
|
|
116
145
|
args: [{ selector: 'kbq-markdown', template: `
|
|
117
146
|
<pre #contentWrapper class="kbq-markdown__input" ngPreserveWhitespaces><ng-content /></pre>
|
|
118
|
-
<div class="kbq-markdown__output" [innerHtml]="resultHtml"></div>
|
|
147
|
+
<div #outputWrapper class="kbq-markdown__output" [innerHtml]="resultHtml()"></div>
|
|
119
148
|
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
120
149
|
class: 'kbq-markdown'
|
|
121
|
-
}, styles: ["@charset \"UTF-8\";.kbq-markdown{display:block}.kbq-markdown .kbq-markdown__input{display:none}.kbq-markdown .kbq-markdown__output{flex:1}.kbq-markdown .kbq-markdown__output>:first-child{margin-top:0}.kbq-markdown .kbq-markdown__output>:last-child{margin-bottom:0}.kbq-markdown .kbq-markdown__h1{margin-top:var(--kbq-markdown-h1-size-margin-top);margin-bottom:var(--kbq-markdown-h1-size-margin-bottom)}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h2{margin-top:var(--kbq-markdown-h2-size-margin-top);margin-bottom:var(--kbq-markdown-h2-size-margin-bottom)}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h3{margin-top:var(--kbq-markdown-h3-size-margin-top);margin-bottom:var(--kbq-markdown-h3-size-margin-bottom)}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h4{margin-top:var(--kbq-markdown-h4-size-margin-top);margin-bottom:var(--kbq-markdown-h4-size-margin-bottom)}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h5{margin-top:var(--kbq-markdown-h5-size-margin-top);margin-bottom:var(--kbq-markdown-h5-size-margin-bottom)}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h6{margin-top:var(--kbq-markdown-h6-size-margin-top);margin-bottom:var(--kbq-markdown-h6-size-margin-bottom)}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__a{display:inline;text-decoration:none;cursor:pointer;border-bottom-style:solid;border-bottom-width:1px;transition:color ease-out .3s}.kbq-markdown .kbq-markdown__p{margin-top:var(--kbq-markdown-p-size-margin-top);margin-bottom:var(--kbq-markdown-p-size-margin-bottom)}.kbq-markdown .kbq-markdown__ul,.kbq-markdown .kbq-markdown__ol{margin-top:var(--kbq-markdown-list-size-margin-top);margin-bottom:var(--kbq-markdown-list-size-margin-bottom)}.kbq-markdown .kbq-markdown__ul>li,.kbq-markdown .kbq-markdown__ol>li{margin-bottom:var(--kbq-markdown-list-size-item-margin-bottom)}.kbq-markdown .kbq-markdown__ul{position:relative;list-style:none;padding:var(--kbq-markdown-list-size-ul-padding)}.kbq-markdown .kbq-markdown__ul>li:before{content:\"\\2014\";display:block;position:absolute;width:24px;text-align:left;left:0}.kbq-markdown .kbq-markdown__ol{list-style:none;padding:0;counter-reset:li}.kbq-markdown .kbq-markdown__ol>li:before{content:counter(li) \".\";counter-increment:li;padding-right:var(--kbq-markdown-list-size-ol-number-padding-right)}.kbq-markdown .kbq-markdown__ol>li>*{display:inline-block}.kbq-markdown .kbq-markdown__p+.kbq-markdown__ul,.kbq-markdown .kbq-markdown__p+.kbq-markdown__ol{margin-top:var(--kbq-markdown-list-size-margin-top-after-paragraph)}.kbq-markdown .kbq-markdown__blockquote{margin-top:var(--kbq-markdown-blockquote-size-margin-top);margin-left:0;margin-bottom:var(--kbq-markdown-blockquote-size-margin-bottom);margin-right:0;border-left-width:var(--kbq-markdown-blockquote-size-line-width);border-left-style:solid;padding:var(--kbq-markdown-blockquote-size-padding)}.kbq-markdown .kbq-markdown__blockquote>.kbq-markdown__p{margin-top:0;margin-bottom:0}.kbq-markdown .kbq-markdown__pre{position:relative;overflow-x:auto;margin-top:var(--kbq-markdown-code-size-multiline-margin-top);margin-bottom:var(--kbq-markdown-code-size-multiline-margin-bottom);padding:var(--kbq-markdown-code-size-multiline-padding)}.kbq-markdown .kbq-markdown__pre,.kbq-markdown .kbq-markdown__code{border-radius:var(--kbq-markdown-code-size-border-radius)}.kbq-markdown .kbq-markdown__code:not(.kbq-markdown__pre>.kbq-markdown__code){white-space:nowrap;padding:var(--kbq-markdown-code-size-inline-padding)}.kbq-markdown .kbq-markdown__img{max-width:100%;margin-top:var(--kbq-markdown-image-size-margin-top);margin-bottom:var(--kbq-markdown-image-size-margin-bottom)}.kbq-markdown .kbq-markdown__img+em{display:block;margin-top:var(--kbq-markdown-image-size-caption-margin-top);margin-bottom:var(--kbq-markdown-image-size-caption-margin-bottom)}.kbq-markdown .kbq-markdown__hr{border-top:none;border-left:none;border-right:none;border-bottom-style:solid;border-bottom-width:var(--kbq-markdown-hr-size-width);margin:var(--kbq-markdown-hr-size-margin-vertical) 0}.kbq-markdown .kbq-markdown__table{max-width:100%;overflow-x:auto;display:table;border-collapse:collapse;margin-bottom:var(--kbq-markdown-table-size-margin-bottom)}.kbq-markdown .kbq-markdown__table td{vertical-align:top}.kbq-markdown .kbq-markdown__table th,.kbq-markdown .kbq-markdown__table td{padding:var(--kbq-markdown-table-size-padding);font-weight:400}.kbq-markdown .kbq-markdown__table>.kbq-markdown__thead{border-bottom-style:solid;border-bottom-width:var(--kbq-markdown-table-size-border-width);text-align:left}.kbq-markdown .kbq-markdown__table>.kbq-markdown__thead th:first-child{padding-left:0}.kbq-markdown .kbq-markdown__table>.kbq-markdown__thead th:last-child{padding-right:0}.kbq-markdown .kbq-markdown__table>.kbq-markdown__tbody td:first-child{padding-left:0}.kbq-markdown .kbq-markdown__table>.kbq-markdown__tbody td:last-child{padding-right:0}\n", ".kbq-markdown{--kbq-markdown-bg: transparent;--kbq-markdown-h1-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h1-size-margin-top: 0;--kbq-markdown-h1-size-margin-bottom: var(--kbq-size-l);--kbq-markdown-h2-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h2-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h2-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-h3-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h3-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h3-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-h4-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h4-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h4-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-h5-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h5-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h5-size-margin-bottom: var(--kbq-size-s);--kbq-markdown-h6-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h6-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h6-size-margin-bottom: var(--kbq-size-s);--kbq-markdown-p-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-p-size-margin-top: var(--kbq-size-m);--kbq-markdown-p-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-list-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-list-size-margin-top: var(--kbq-size-m);--kbq-markdown-list-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-list-size-margin-top-after-paragraph: calc(-1 * var(--kbq-size-s));--kbq-markdown-list-size-ol-number-padding-right: var(--kbq-size-xxs);--kbq-markdown-list-size-ul-padding: 0 0 0 var(--kbq-size-xxl);--kbq-markdown-list-size-item-margin-bottom: var(--kbq-size-xxs);--kbq-markdown-blockquote-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-blockquote-size-margin-top: var(--kbq-size-m);--kbq-markdown-blockquote-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-blockquote-size-padding: var(--kbq-size-3xs) var(--kbq-size-m);--kbq-markdown-blockquote-size-line-width: var(--kbq-size-xxs);--kbq-markdown-blockquote-size-border-radius: 0;--kbq-markdown-blockquote-size-border-width: 0;--kbq-markdown-code-size-multiline-margin-top: var(--kbq-size-m);--kbq-markdown-code-size-multiline-margin-bottom: var(--kbq-size-xxl);--kbq-markdown-code-size-inline-padding: var(--kbq-size-3xs) var(--kbq-size-xs);--kbq-markdown-code-size-multiline-padding: var(--kbq-size-m) var(--kbq-size-l);--kbq-markdown-code-size-border-radius: var(--kbq-size-border-radius);--kbq-markdown-code-size-border-width: var(--kbq-size-border-width);--kbq-markdown-link-size-icon-margin: var(--kbq-link-size-normal-content-padding, var(--kbq-size-xxs));--kbq-markdown-link-size-state-focused-outline-offset: var(--kbq-link-size-state-focused-outline-offset);--kbq-markdown-link-size-state-focused-outline-width: var(--kbq-link-size-state-focused-outline-width);--kbq-markdown-image-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-image-size-margin-top: var(--kbq-size-m);--kbq-markdown-image-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-image-size-caption-margin-top: calc(-1 * var(--kbq-size-s));--kbq-markdown-image-size-caption-margin-bottom: var(--kbq-size-xxl);--kbq-markdown-hr-size-width: 1px;--kbq-markdown-hr-size-margin-vertical: var(--kbq-size-xxl);--kbq-markdown-table-size-border-width: var(--kbq-size-border-width);--kbq-markdown-table-size-padding: var(--kbq-size-s);--kbq-markdown-table-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-size-max-width: 650px;--kbq-markdown-h1-color: var(--kbq-foreground-contrast);--kbq-markdown-h2-color: var(--kbq-foreground-contrast);--kbq-markdown-h3-color: var(--kbq-foreground-contrast);--kbq-markdown-h4-color: var(--kbq-foreground-contrast);--kbq-markdown-h5-color: var(--kbq-foreground-contrast);--kbq-markdown-h6-color: var(--kbq-foreground-contrast);--kbq-markdown-p-color: var(--kbq-foreground-contrast);--kbq-markdown-list-color: var(--kbq-foreground-contrast);--kbq-markdown-blockquote-text: var(--kbq-foreground-contrast);--kbq-markdown-blockquote-line: var(--kbq-line-contrast-less);--kbq-markdown-blockquote-background: var(--kbq-background-contrast-fade);--kbq-markdown-blockquote-border: transparent;--kbq-markdown-code-text: var(--kbq-foreground-contrast);--kbq-markdown-code-background: var(--kbq-background-contrast-fade);--kbq-markdown-code-border: var(--kbq-line-contrast-less);--kbq-markdown-link-text: var(--kbq-link-text);--kbq-markdown-link-border-bottom: var(--kbq-link-border-bottom);--kbq-markdown-link-state-visited-text: var(--kbq-link-state-visited-text);--kbq-markdown-link-state-visited-border-bottom: var(--kbq-link-state-visited-border-bottom);--kbq-markdown-link-state-hover-text: var(--kbq-link-state-hover-text);--kbq-markdown-link-state-hover-border-bottom: var(--kbq-link-state-hover-border-bottom);--kbq-markdown-link-state-active: var(--kbq-link-state-active-text);--kbq-markdown-link-state-focused-outline: var(--kbq-link-state-focused-outline);--kbq-markdown-image-caption-text: var(--kbq-foreground-contrast-secondary);--kbq-markdown-hr-color: var(--kbq-line-contrast-less);--kbq-markdown-table-header: var(--kbq-foreground-contrast-secondary);--kbq-markdown-table-body: var(--kbq-foreground-contrast);--kbq-markdown-table-border: var(--kbq-line-contrast-less)}\n"] }]
|
|
122
|
-
}], ctorParameters: () => [{ type: KbqMarkdownService }, { type:
|
|
150
|
+
}, styles: ["@charset \"UTF-8\";.kbq-markdown{display:block}.kbq-markdown .kbq-markdown__input{display:none}.kbq-markdown .kbq-markdown__output{flex:1}.kbq-markdown .kbq-markdown__output>:first-child{margin-top:0}.kbq-markdown .kbq-markdown__output>:last-child{margin-bottom:0}.kbq-markdown .kbq-markdown__h1{margin-top:var(--kbq-markdown-h1-size-margin-top);margin-bottom:var(--kbq-markdown-h1-size-margin-bottom)}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h2{margin-top:var(--kbq-markdown-h2-size-margin-top);margin-bottom:var(--kbq-markdown-h2-size-margin-bottom)}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h3{margin-top:var(--kbq-markdown-h3-size-margin-top);margin-bottom:var(--kbq-markdown-h3-size-margin-bottom)}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h4{margin-top:var(--kbq-markdown-h4-size-margin-top);margin-bottom:var(--kbq-markdown-h4-size-margin-bottom)}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h5{margin-top:var(--kbq-markdown-h5-size-margin-top);margin-bottom:var(--kbq-markdown-h5-size-margin-bottom)}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h6{margin-top:var(--kbq-markdown-h6-size-margin-top);margin-bottom:var(--kbq-markdown-h6-size-margin-bottom)}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__p{margin-top:var(--kbq-markdown-p-size-margin-top);margin-bottom:var(--kbq-markdown-p-size-margin-bottom)}.kbq-markdown .kbq-markdown__ul,.kbq-markdown .kbq-markdown__ol{margin-top:var(--kbq-markdown-list-size-margin-top);margin-bottom:var(--kbq-markdown-list-size-margin-bottom)}.kbq-markdown .kbq-markdown__ul>li,.kbq-markdown .kbq-markdown__ol>li{margin-bottom:var(--kbq-markdown-list-size-item-margin-bottom)}.kbq-markdown .kbq-markdown__ul{position:relative;list-style:none;padding:var(--kbq-markdown-list-size-ul-padding)}.kbq-markdown .kbq-markdown__ul>li:before{content:\"\\2014\";display:block;position:absolute;width:24px;text-align:left;left:0}.kbq-markdown .kbq-markdown__ol{list-style:none;padding:0;counter-reset:li}.kbq-markdown .kbq-markdown__ol>li:before{content:counter(li) \".\";counter-increment:li;padding-right:var(--kbq-markdown-list-size-ol-number-padding-right)}.kbq-markdown .kbq-markdown__ol>li>*{display:inline-block}.kbq-markdown .kbq-markdown__p+.kbq-markdown__ul,.kbq-markdown .kbq-markdown__p+.kbq-markdown__ol{margin-top:var(--kbq-markdown-list-size-margin-top-after-paragraph)}.kbq-markdown .kbq-markdown__blockquote{margin-top:var(--kbq-markdown-blockquote-size-margin-top);margin-left:0;margin-bottom:var(--kbq-markdown-blockquote-size-margin-bottom);margin-right:0;border-left-width:var(--kbq-markdown-blockquote-size-line-width);border-left-style:solid;padding:var(--kbq-markdown-blockquote-size-padding)}.kbq-markdown .kbq-markdown__blockquote>.kbq-markdown__p{margin-top:0;margin-bottom:0}.kbq-markdown .kbq-markdown__pre{position:relative;overflow-x:auto;margin-top:var(--kbq-markdown-code-size-multiline-margin-top);margin-bottom:var(--kbq-markdown-code-size-multiline-margin-bottom);padding:var(--kbq-markdown-code-size-multiline-padding)}.kbq-markdown .kbq-markdown__pre,.kbq-markdown .kbq-markdown__code{border-radius:var(--kbq-markdown-code-size-border-radius)}.kbq-markdown .kbq-markdown__code:not(.kbq-markdown__pre>.kbq-markdown__code){white-space:nowrap;padding:var(--kbq-markdown-code-size-inline-padding)}.kbq-markdown .kbq-markdown__img{max-width:100%;margin-top:var(--kbq-markdown-image-size-margin-top);margin-bottom:var(--kbq-markdown-image-size-margin-bottom)}.kbq-markdown .kbq-markdown__img+em{display:block;margin-top:var(--kbq-markdown-image-size-caption-margin-top);margin-bottom:var(--kbq-markdown-image-size-caption-margin-bottom)}.kbq-markdown .kbq-markdown__hr{border-top:none;border-left:none;border-right:none;border-bottom-style:solid;border-bottom-width:var(--kbq-markdown-hr-size-width);margin:var(--kbq-markdown-hr-size-margin-vertical) 0}.kbq-markdown .kbq-markdown__table{max-width:100%;overflow-x:auto;display:table;border-collapse:collapse;margin-bottom:var(--kbq-markdown-table-size-margin-bottom)}.kbq-markdown .kbq-markdown__table td{vertical-align:top}.kbq-markdown .kbq-markdown__table th,.kbq-markdown .kbq-markdown__table td{padding:var(--kbq-markdown-table-size-padding);font-weight:400}.kbq-markdown .kbq-markdown__table>.kbq-markdown__thead{border-bottom-style:solid;border-bottom-width:var(--kbq-markdown-table-size-border-width);text-align:left}.kbq-markdown .kbq-markdown__table>.kbq-markdown__thead th:first-child{padding-left:0}.kbq-markdown .kbq-markdown__table>.kbq-markdown__thead th:last-child{padding-right:0}.kbq-markdown .kbq-markdown__table>.kbq-markdown__tbody td:first-child{padding-left:0}.kbq-markdown .kbq-markdown__table>.kbq-markdown__tbody td:last-child{padding-right:0}\n", ".kbq-markdown{--kbq-markdown-bg: transparent;--kbq-markdown-h1-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h1-size-margin-top: 0;--kbq-markdown-h1-size-margin-bottom: var(--kbq-size-l);--kbq-markdown-h2-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h2-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h2-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-h3-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h3-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h3-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-h4-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h4-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h4-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-h5-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h5-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h5-size-margin-bottom: var(--kbq-size-s);--kbq-markdown-h6-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h6-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h6-size-margin-bottom: var(--kbq-size-s);--kbq-markdown-p-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-p-size-margin-top: var(--kbq-size-m);--kbq-markdown-p-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-list-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-list-size-margin-top: var(--kbq-size-m);--kbq-markdown-list-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-list-size-margin-top-after-paragraph: calc(-1 * var(--kbq-size-s));--kbq-markdown-list-size-ol-number-padding-right: var(--kbq-size-xxs);--kbq-markdown-list-size-ul-padding: 0 0 0 var(--kbq-size-xxl);--kbq-markdown-list-size-item-margin-bottom: var(--kbq-size-xxs);--kbq-markdown-blockquote-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-blockquote-size-margin-top: var(--kbq-size-m);--kbq-markdown-blockquote-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-blockquote-size-padding: var(--kbq-size-3xs) var(--kbq-size-m);--kbq-markdown-blockquote-size-line-width: var(--kbq-size-xxs);--kbq-markdown-blockquote-size-border-radius: 0;--kbq-markdown-blockquote-size-border-width: 0;--kbq-markdown-code-size-multiline-margin-top: var(--kbq-size-m);--kbq-markdown-code-size-multiline-margin-bottom: var(--kbq-size-xxl);--kbq-markdown-code-size-inline-padding: var(--kbq-size-3xs) var(--kbq-size-xs);--kbq-markdown-code-size-multiline-padding: var(--kbq-size-m) var(--kbq-size-l);--kbq-markdown-code-size-border-radius: var(--kbq-size-border-radius);--kbq-markdown-code-size-border-width: var(--kbq-size-border-width);--kbq-markdown-image-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-image-size-margin-top: var(--kbq-size-m);--kbq-markdown-image-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-image-size-caption-margin-top: calc(-1 * var(--kbq-size-s));--kbq-markdown-image-size-caption-margin-bottom: var(--kbq-size-xxl);--kbq-markdown-hr-size-width: 1px;--kbq-markdown-hr-size-margin-vertical: var(--kbq-size-xxl);--kbq-markdown-table-size-border-width: var(--kbq-size-border-width);--kbq-markdown-table-size-padding: var(--kbq-size-s);--kbq-markdown-table-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-size-max-width: 650px;--kbq-markdown-h1-color: var(--kbq-foreground-contrast);--kbq-markdown-h2-color: var(--kbq-foreground-contrast);--kbq-markdown-h3-color: var(--kbq-foreground-contrast);--kbq-markdown-h4-color: var(--kbq-foreground-contrast);--kbq-markdown-h5-color: var(--kbq-foreground-contrast);--kbq-markdown-h6-color: var(--kbq-foreground-contrast);--kbq-markdown-p-color: var(--kbq-foreground-contrast);--kbq-markdown-list-color: var(--kbq-foreground-contrast);--kbq-markdown-blockquote-text: var(--kbq-foreground-contrast);--kbq-markdown-blockquote-line: var(--kbq-line-contrast-less);--kbq-markdown-blockquote-background: var(--kbq-background-contrast-fade);--kbq-markdown-blockquote-border: transparent;--kbq-markdown-code-text: var(--kbq-foreground-contrast);--kbq-markdown-code-background: var(--kbq-background-contrast-fade);--kbq-markdown-code-border: var(--kbq-line-contrast-less);--kbq-markdown-image-caption-text: var(--kbq-foreground-contrast-secondary);--kbq-markdown-hr-color: var(--kbq-line-contrast-less);--kbq-markdown-table-header: var(--kbq-foreground-contrast-secondary);--kbq-markdown-table-body: var(--kbq-foreground-contrast);--kbq-markdown-table-border: var(--kbq-line-contrast-less)}\n"] }]
|
|
151
|
+
}], ctorParameters: () => [{ type: KbqMarkdownService }, { type: i2.DomSanitizer }, { type: undefined, decorators: [{
|
|
123
152
|
type: Optional
|
|
124
153
|
}, {
|
|
125
154
|
type: Inject,
|
|
@@ -127,6 +156,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
127
156
|
}] }], propDecorators: { contentWrapper: [{
|
|
128
157
|
type: ViewChild,
|
|
129
158
|
args: ['contentWrapper', { static: true }]
|
|
159
|
+
}], outputWrapper: [{
|
|
160
|
+
type: ViewChild,
|
|
161
|
+
args: ['outputWrapper', { static: true }]
|
|
130
162
|
}], markdownText: [{
|
|
131
163
|
type: Input
|
|
132
164
|
}] } });
|
|
@@ -135,11 +167,11 @@ const COMPONENTS = [
|
|
|
135
167
|
KbqMarkdown
|
|
136
168
|
];
|
|
137
169
|
class KbqMarkdownModule {
|
|
138
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
139
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
140
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
170
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqMarkdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
171
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: KbqMarkdownModule, imports: [KbqMarkdown], exports: [KbqMarkdown] }); }
|
|
172
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqMarkdownModule, providers: [KbqMarkdownService] }); }
|
|
141
173
|
}
|
|
142
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqMarkdownModule, decorators: [{
|
|
143
175
|
type: NgModule,
|
|
144
176
|
args: [{
|
|
145
177
|
imports: COMPONENTS,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koobiq-components-markdown.mjs","sources":["../../../packages/components/markdown/markdown.values.ts","../../../packages/components/markdown/markdown.service.ts","../../../packages/components/markdown/markdown.component.ts","../../../packages/components/markdown/markdown.module.ts","../../../packages/components/markdown/koobiq-components-markdown.ts"],"sourcesContent":["/** @docs-private */\nexport const MARKDOWN_TAGS_TO_CLASS_ALIAS = [\n 'a',\n 'blockquote',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'hr',\n 'li',\n 'ol',\n 'table',\n 'tbody',\n 'thead',\n 'td',\n 'tr',\n 'ul',\n 'pre',\n 'code',\n 'img'\n];\n\n/**\n * separating `th` and `p` to prevent it's conflict with `thead` and `pre`\n *\n * @docs-private\n */\nexport const MARKDOWN_WHOLE_TAGS_TO_CLASS_ALIAS = [\n 'th',\n 'p'\n];\n\n/** @docs-private */\nexport const CLASS_PREFIX: string = 'kbq-markdown';\n","import { Injectable } from '@angular/core';\nimport { marked, MarkedOptions } from 'marked';\nimport { CLASS_PREFIX, MARKDOWN_TAGS_TO_CLASS_ALIAS, MARKDOWN_WHOLE_TAGS_TO_CLASS_ALIAS } from './markdown.values';\n\n/**\n * Service for converting Markdown into HTML.\n */\n@Injectable()\nexport class KbqMarkdownService {\n /**\n * Converts a given Markdown string into HTML.\n * NOTE! Method does not sanitize the output HTML string.\n *\n * @param markdown - The Markdown string to be converted.\n * @param options - Optional MarkedOptions to customize the parsing behavior.\n * @returns The transformed HTML string.\n */\n parseToHtml(markdown: string, options?: MarkedOptions): string {\n return this.transform(<string>marked.parse(markdown, options));\n }\n\n private transform(htmlContent: string): string {\n let transformed = htmlContent;\n\n MARKDOWN_TAGS_TO_CLASS_ALIAS.forEach((tag) => {\n transformed = transformed.replace(\n new RegExp(`<${tag}`, 'g'),\n (_match: string) => `<${tag} class=\"${CLASS_PREFIX}__${tag}\"`\n );\n });\n\n MARKDOWN_WHOLE_TAGS_TO_CLASS_ALIAS.forEach((tag) => {\n transformed = transformed.replace(\n new RegExp(`<${tag}\\s*>`, 'g'),\n (_match: string) => `<${tag} class=\"${CLASS_PREFIX}__${tag}\">`\n );\n });\n\n return transformed;\n }\n}\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Inject,\n InjectionToken,\n Input,\n Optional,\n Provider,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { MarkedOptions } from 'marked';\nimport { KbqMarkdownService } from './markdown.service';\n\n/** List of options for `marked` library. */\nexport const KBQ_MARKDOWN_MARKED_OPTIONS = new InjectionToken<MarkedOptions>('KBQ_MARKDOWN_MARKED_OPTIONS');\n\n/** Utility provider for `KBQ_MARKDOWN_MARKED_OPTIONS`. */\nexport const kbqMarkdownMarkedOptionsProvider = (options: MarkedOptions): Provider => ({\n provide: KBQ_MARKDOWN_MARKED_OPTIONS,\n useValue: options\n});\n\n/** Component which allows to convert `Markdown` into `HTML` */\n@Component({\n selector: 'kbq-markdown',\n // no need format line with ng-content it's broke textContent for markdownService.parseToHtml()\n template: `\n <pre #contentWrapper class=\"kbq-markdown__input\" ngPreserveWhitespaces><ng-content /></pre>\n <div class=\"kbq-markdown__output\" [innerHtml]=\"resultHtml\"></div>\n `,\n styleUrls: ['./markdown.scss', 'markdown-tokens.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'kbq-markdown'\n }\n})\nexport class KbqMarkdown {\n @ViewChild('contentWrapper', { static: true }) private readonly contentWrapper: ElementRef;\n\n /** `Markdown` text. */\n @Input()\n get markdownText(): string | null {\n return this._markdownText;\n }\n\n set markdownText(value: string | null) {\n if (value && this.markdownText !== value) {\n this.resultHtml = this.getResultHTML(value);\n }\n\n this._markdownText = value;\n }\n\n private _markdownText: string | null = null;\n\n protected resultHtml: SafeHtml;\n\n constructor(\n private readonly markdownService: KbqMarkdownService,\n private readonly cdr: ChangeDetectorRef,\n private sanitizer: DomSanitizer,\n @Optional() @Inject(KBQ_MARKDOWN_MARKED_OPTIONS) private readonly markedOptions?: MarkedOptions | undefined\n ) {\n afterNextRender(() => {\n if (!this.markdownText && this.contentWrapper?.nativeElement.textContent) {\n this.resultHtml = this.getResultHTML(this.contentWrapper?.nativeElement.textContent);\n this.cdr.detectChanges();\n }\n });\n }\n\n private getResultHTML(markdown: string): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(this.markdownService.parseToHtml(markdown, this.markedOptions));\n }\n}\n","import { NgModule } from '@angular/core';\nimport { KbqMarkdown } from './markdown.component';\nimport { KbqMarkdownService } from './markdown.service';\n\nconst COMPONENTS = [\n KbqMarkdown\n];\n\n@NgModule({\n imports: COMPONENTS,\n exports: COMPONENTS,\n providers: [KbqMarkdownService]\n})\nexport class KbqMarkdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"koobiq-components-markdown.mjs","sources":["../../../packages/components/markdown/markdown.values.ts","../../../packages/components/markdown/markdown.service.ts","../../../packages/components/markdown/markdown.component.ts","../../../packages/components/markdown/markdown.module.ts","../../../packages/components/markdown/koobiq-components-markdown.ts"],"sourcesContent":["/** @docs-private */\nexport const MARKDOWN_TAGS_TO_CLASS_ALIAS = [\n 'a',\n 'blockquote',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'hr',\n 'li',\n 'ol',\n 'table',\n 'tbody',\n 'thead',\n 'td',\n 'tr',\n 'ul',\n 'pre',\n 'code',\n 'img'\n];\n\n/**\n * separating `th` and `p` to prevent it's conflict with `thead` and `pre`\n *\n * @docs-private\n */\nexport const MARKDOWN_WHOLE_TAGS_TO_CLASS_ALIAS = [\n 'th',\n 'p'\n];\n\n/** @docs-private */\nexport const CLASS_PREFIX: string = 'kbq-markdown';\n","import { Injectable } from '@angular/core';\nimport { marked, MarkedOptions } from 'marked';\nimport { CLASS_PREFIX, MARKDOWN_TAGS_TO_CLASS_ALIAS, MARKDOWN_WHOLE_TAGS_TO_CLASS_ALIAS } from './markdown.values';\n\n/**\n * Service for converting Markdown into HTML.\n */\n@Injectable()\nexport class KbqMarkdownService {\n /**\n * Converts a given Markdown string into HTML.\n * NOTE! Method does not sanitize the output HTML string.\n *\n * @param markdown - The Markdown string to be converted.\n * @param options - Optional MarkedOptions to customize the parsing behavior.\n * @returns The transformed HTML string.\n */\n parseToHtml(markdown: string, options?: MarkedOptions): string {\n return this.transform(<string>marked.parse(markdown, options));\n }\n\n private transform(htmlContent: string): string {\n let transformed = htmlContent;\n\n MARKDOWN_TAGS_TO_CLASS_ALIAS.forEach((tag) => {\n transformed = transformed.replace(new RegExp(`<${tag}`, 'g'), (_match: string) => {\n if (tag === 'a') {\n return `<${tag} class=\"${CLASS_PREFIX}__${tag} kbq-link kbq-text-only kbq-link_use-visited\"`;\n }\n\n return `<${tag} class=\"${CLASS_PREFIX}__${tag}\"`;\n });\n });\n\n MARKDOWN_WHOLE_TAGS_TO_CLASS_ALIAS.forEach((tag) => {\n transformed = transformed.replace(\n new RegExp(`<${tag}\\s*>`, 'g'),\n (_match: string) => `<${tag} class=\"${CLASS_PREFIX}__${tag}\">`\n );\n });\n\n return transformed;\n }\n}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n inject,\n Inject,\n InjectionToken,\n Input,\n OnDestroy,\n Optional,\n Provider,\n signal,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { MarkedOptions } from 'marked';\nimport { KbqMarkdownService } from './markdown.service';\n\n/** List of options for `marked` library. */\nexport const KBQ_MARKDOWN_MARKED_OPTIONS = new InjectionToken<MarkedOptions>('KBQ_MARKDOWN_MARKED_OPTIONS');\n\n/** Utility provider for `KBQ_MARKDOWN_MARKED_OPTIONS`. */\nexport const kbqMarkdownMarkedOptionsProvider = (options: MarkedOptions): Provider => ({\n provide: KBQ_MARKDOWN_MARKED_OPTIONS,\n useValue: options\n});\n\n/** Component which allows to convert `Markdown` into `HTML` */\n@Component({\n selector: 'kbq-markdown',\n // no need format line with ng-content it's broke textContent for markdownService.parseToHtml()\n template: `\n <pre #contentWrapper class=\"kbq-markdown__input\" ngPreserveWhitespaces><ng-content /></pre>\n <div #outputWrapper class=\"kbq-markdown__output\" [innerHtml]=\"resultHtml()\"></div>\n `,\n styleUrls: ['./markdown.scss', 'markdown-tokens.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'kbq-markdown'\n }\n})\nexport class KbqMarkdown implements OnDestroy {\n @ViewChild('contentWrapper', { static: true }) private readonly contentWrapper: ElementRef<HTMLPreElement>;\n @ViewChild('outputWrapper', { static: true }) private readonly outputWrapper: ElementRef<HTMLDivElement>;\n\n protected resultHtml = signal<SafeHtml | null>(null);\n\n /** `Markdown` text. */\n @Input()\n get markdownText(): string | null {\n return this._markdownText;\n }\n\n set markdownText(value: string | null) {\n if (value && this.markdownText !== value) {\n this.resultHtml.set(this.getResultHTML(value));\n }\n\n this._markdownText = value;\n }\n\n private _markdownText: string | null = null;\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly links: HTMLAnchorElement[] = [];\n\n constructor(\n private readonly markdownService: KbqMarkdownService,\n private sanitizer: DomSanitizer,\n @Optional() @Inject(KBQ_MARKDOWN_MARKED_OPTIONS) private readonly markedOptions?: MarkedOptions | undefined\n ) {\n afterNextRender(() => {\n if (!this.markdownText && this.contentWrapper?.nativeElement.textContent) {\n this.resultHtml.set(this.getResultHTML(this.contentWrapper?.nativeElement.textContent));\n }\n });\n\n effect(() => {\n if (this.resultHtml()) {\n Promise.resolve().then(() => this.startMonitoringLinks());\n } else {\n this.stopMonitoringLinks();\n }\n });\n }\n\n ngOnDestroy(): void {\n this.stopMonitoringLinks();\n }\n\n private getResultHTML(markdown: string): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(this.markdownService.parseToHtml(markdown, this.markedOptions));\n }\n\n private startMonitoringLinks(): void {\n this.stopMonitoringLinks();\n this.outputWrapper.nativeElement.querySelectorAll<HTMLAnchorElement>('.kbq-markdown__a').forEach((link) => {\n this.links.push(link);\n this.focusMonitor.monitor(link, true);\n });\n }\n\n private stopMonitoringLinks(): void {\n this.links.forEach((link) => this.focusMonitor.stopMonitoring(link));\n this.links.length = 0;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { KbqMarkdown } from './markdown.component';\nimport { KbqMarkdownService } from './markdown.service';\n\nconst COMPONENTS = [\n KbqMarkdown\n];\n\n@NgModule({\n imports: COMPONENTS,\n exports: COMPONENTS,\n providers: [KbqMarkdownService]\n})\nexport class KbqMarkdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;AACO,MAAM,4BAA4B,GAAG;IACxC,GAAG;IACH,YAAY;IACZ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,MAAM;IACN;;AAGJ;;;;AAIG;AACI,MAAM,kCAAkC,GAAG;IAC9C,IAAI;IACJ;;AAGJ;AACO,MAAM,YAAY,GAAW;;AC/BpC;;AAEG;MAEU,kBAAkB,CAAA;AAC3B;;;;;;;AAOG;IACH,WAAW,CAAC,QAAgB,EAAE,OAAuB,EAAA;AACjD,QAAA,OAAO,IAAI,CAAC,SAAS,CAAS,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAClE;AAEQ,IAAA,SAAS,CAAC,WAAmB,EAAA;QACjC,IAAI,WAAW,GAAG,WAAW;AAE7B,QAAA,4BAA4B,CAAC,OAAO,CAAC,CAAC,GAAG,KAAI;AACzC,YAAA,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,CAAA,CAAA,EAAI,GAAG,CAAA,CAAE,EAAE,GAAG,CAAC,EAAE,CAAC,MAAc,KAAI;AAC7E,gBAAA,IAAI,GAAG,KAAK,GAAG,EAAE;AACb,oBAAA,OAAO,IAAI,GAAG,CAAA,QAAA,EAAW,YAAY,CAAA,EAAA,EAAK,GAAG,+CAA+C;gBAChG;AAEA,gBAAA,OAAO,IAAI,GAAG,CAAA,QAAA,EAAW,YAAY,CAAA,EAAA,EAAK,GAAG,GAAG;AACpD,YAAA,CAAC,CAAC;AACN,QAAA,CAAC,CAAC;AAEF,QAAA,kCAAkC,CAAC,OAAO,CAAC,CAAC,GAAG,KAAI;AAC/C,YAAA,WAAW,GAAG,WAAW,CAAC,OAAO,CAC7B,IAAI,MAAM,CAAC,CAAA,CAAA,EAAI,GAAG,CAAA,IAAA,CAAM,EAAE,GAAG,CAAC,EAC9B,CAAC,MAAc,KAAK,CAAA,CAAA,EAAI,GAAG,CAAA,QAAA,EAAW,YAAY,CAAA,EAAA,EAAK,GAAG,CAAA,EAAA,CAAI,CACjE;AACL,QAAA,CAAC,CAAC;AAEF,QAAA,OAAO,WAAW;IACtB;kIAlCS,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;sIAAlB,kBAAkB,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B;;;ACeD;MACa,2BAA2B,GAAG,IAAI,cAAc,CAAgB,6BAA6B;AAE1G;MACa,gCAAgC,GAAG,CAAC,OAAsB,MAAgB;AACnF,IAAA,OAAO,EAAE,2BAA2B;AACpC,IAAA,QAAQ,EAAE;AACb,CAAA;AAED;MAea,WAAW,CAAA;;AAOpB,IAAA,IACI,YAAY,GAAA;QACZ,OAAO,IAAI,CAAC,aAAa;IAC7B;IAEA,IAAI,YAAY,CAAC,KAAoB,EAAA;QACjC,IAAI,KAAK,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,EAAE;AACtC,YAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAClD;AAEA,QAAA,IAAI,CAAC,aAAa,GAAG,KAAK;IAC9B;AAMA,IAAA,WAAA,CACqB,eAAmC,EAC5C,SAAuB,EACmC,aAAyC,EAAA;QAF1F,IAAA,CAAA,eAAe,GAAf,eAAe;QACxB,IAAA,CAAA,SAAS,GAAT,SAAS;QACiD,IAAA,CAAA,aAAa,GAAb,aAAa;AAvBzE,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAkB,IAAI,CAAC;QAgB5C,IAAA,CAAA,aAAa,GAAkB,IAAI;AAC1B,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;QACnC,IAAA,CAAA,KAAK,GAAwB,EAAE;QAO5C,eAAe,CAAC,MAAK;AACjB,YAAA,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,cAAc,EAAE,aAAa,CAAC,WAAW,EAAE;AACtE,gBAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,cAAc,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;YAC3F;AACJ,QAAA,CAAC,CAAC;QAEF,MAAM,CAAC,MAAK;AACR,YAAA,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;AACnB,gBAAA,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC7D;iBAAO;gBACH,IAAI,CAAC,mBAAmB,EAAE;YAC9B;AACJ,QAAA,CAAC,CAAC;IACN;IAEA,WAAW,GAAA;QACP,IAAI,CAAC,mBAAmB,EAAE;IAC9B;AAEQ,IAAA,aAAa,CAAC,QAAgB,EAAA;AAClC,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACjH;IAEQ,oBAAoB,GAAA;QACxB,IAAI,CAAC,mBAAmB,EAAE;AAC1B,QAAA,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,gBAAgB,CAAoB,kBAAkB,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAI;AACtG,YAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;YACrB,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC;AACzC,QAAA,CAAC,CAAC;IACN;IAEQ,mBAAmB,GAAA;AACvB,QAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AACpE,QAAA,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;IACzB;AA/DS,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,6EA2BI,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AA3B1C,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,cAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,gBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,EAAA,YAAA,EAAA,eAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,eAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAXV;;;AAGT,IAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,stNAAA,EAAA,22IAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAQQ,WAAW,EAAA,UAAA,EAAA,CAAA;kBAdvB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,EAAA,QAAA,EAEd;;;AAGT,IAAA,CAAA,EAAA,aAAA,EAEc,iBAAiB,CAAC,IAAI,mBACpB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACF,wBAAA,KAAK,EAAE;AACV,qBAAA,EAAA,MAAA,EAAA,CAAA,stNAAA,EAAA,22IAAA,CAAA,EAAA;;0BA6BI;;0BAAY,MAAM;2BAAC,2BAA2B;yCA1Ba,cAAc,EAAA,CAAA;sBAA7E,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,gBAAgB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;gBACkB,aAAa,EAAA,CAAA;sBAA3E,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,eAAe,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;gBAMxC,YAAY,EAAA,CAAA;sBADf;;;ACjDL,MAAM,UAAU,GAAG;IACf;CACH;MAOY,iBAAiB,CAAA;kIAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;mIAAjB,iBAAiB,EAAA,OAAA,EAAA,CAR1B,WAAW,CAAA,EAAA,OAAA,EAAA,CAAX,WAAW,CAAA,EAAA,CAAA,CAAA;mIAQF,iBAAiB,EAAA,SAAA,EAFf,CAAC,kBAAkB,CAAC,EAAA,CAAA,CAAA;;4FAEtB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,UAAU;AACnB,oBAAA,OAAO,EAAE,UAAU;oBACnB,SAAS,EAAE,CAAC,kBAAkB;AACjC,iBAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -5,7 +5,7 @@ import { OverlayRef, OverlayModule } from '@angular/cdk/overlay';
|
|
|
5
5
|
import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
6
6
|
import { DOCUMENT, NgStyle, NgClass, NgTemplateOutlet } from '@angular/common';
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { Pipe, Optional, SkipSelf, Injectable, inject, EventEmitter, TemplateRef, Type, Injector, ViewContainerRef, ElementRef, Input, ViewChild, ViewChildren, Output, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive, InjectionToken, NgModule } from '@angular/core';
|
|
8
|
+
import { Pipe, Optional, SkipSelf, Injectable, inject, EventEmitter, TemplateRef, Type, Injector, ViewContainerRef, ElementRef, Input, ViewChild, ViewChildren, Output, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive, InjectionToken, isDevMode, NgModule } from '@angular/core';
|
|
9
9
|
import { ESCAPE, ENTER } from '@koobiq/cdk/keycodes';
|
|
10
10
|
import * as i4 from '@koobiq/components/button';
|
|
11
11
|
import { KbqButtonModule } from '@koobiq/components/button';
|
|
@@ -29,10 +29,10 @@ class CssUnitPipe {
|
|
|
29
29
|
const formatted = +value;
|
|
30
30
|
return isNaN(formatted) ? `${value}` : `${formatted}${defaultUnit}`;
|
|
31
31
|
}
|
|
32
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
33
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
32
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CssUnitPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
33
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: CssUnitPipe, isStandalone: true, name: "toCssUnit" }); }
|
|
34
34
|
}
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CssUnitPipe, decorators: [{
|
|
36
36
|
type: Pipe,
|
|
37
37
|
args: [{
|
|
38
38
|
name: 'toCssUnit'
|
|
@@ -99,6 +99,12 @@ class KbqModalControlService {
|
|
|
99
99
|
const index = this.openModals.indexOf(modalRef);
|
|
100
100
|
if (index > -1) {
|
|
101
101
|
this.openModals.splice(index, 1);
|
|
102
|
+
if (this.hasRegistered(modalRef)) {
|
|
103
|
+
const { afterOpenSubscription, afterCloseSubscription } = this.registeredMetaMap.get(modalRef);
|
|
104
|
+
afterOpenSubscription.unsubscribe();
|
|
105
|
+
afterCloseSubscription.unsubscribe();
|
|
106
|
+
this.registeredMetaMap.delete(modalRef);
|
|
107
|
+
}
|
|
102
108
|
if (!this.openModals.length) {
|
|
103
109
|
this.afterAllClose.next();
|
|
104
110
|
}
|
|
@@ -137,11 +143,12 @@ class KbqModalControlService {
|
|
|
137
143
|
});
|
|
138
144
|
}
|
|
139
145
|
}
|
|
140
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
141
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
146
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalControlService, deps: [{ token: KbqModalControlService, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
147
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalControlService, providedIn: 'root' }); }
|
|
142
148
|
}
|
|
143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
144
|
-
type: Injectable
|
|
149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalControlService, decorators: [{
|
|
150
|
+
type: Injectable,
|
|
151
|
+
args: [{ providedIn: 'root' }]
|
|
145
152
|
}], ctorParameters: () => [{ type: KbqModalControlService, decorators: [{
|
|
146
153
|
type: Optional
|
|
147
154
|
}, {
|
|
@@ -607,10 +614,10 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
607
614
|
this.renderer.removeStyle(this.document.body, 'overflow');
|
|
608
615
|
}
|
|
609
616
|
}
|
|
610
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
611
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: KbqModalComponent, isStandalone: true, selector: "kbq-modal", inputs: { kbqModalType: "kbqModalType", kbqComponent: "kbqComponent", kbqContent: "kbqContent", kbqComponentParams: "kbqComponentParams", kbqFooter: "kbqFooter", kbqVisible: "kbqVisible", kbqWidth: "kbqWidth", kbqSize: "kbqSize", kbqWrapClassName: "kbqWrapClassName", kbqClassName: "kbqClassName", kbqStyle: "kbqStyle", kbqTitle: "kbqTitle", kbqCloseByESC: "kbqCloseByESC", kbqClosable: "kbqClosable", kbqMask: "kbqMask", kbqMaskClosable: "kbqMaskClosable", kbqMaskStyle: "kbqMaskStyle", kbqBodyStyle: "kbqBodyStyle", kbqOkText: "kbqOkText", kbqOkType: "kbqOkType", kbqRestoreFocus: "kbqRestoreFocus", kbqOkLoading: "kbqOkLoading", kbqOnOk: "kbqOnOk", kbqCancelText: "kbqCancelText", kbqCancelLoading: "kbqCancelLoading", kbqOnCancel: "kbqOnCancel", kbqGetContainer: "kbqGetContainer" }, outputs: { kbqVisibleChange: "kbqVisibleChange", kbqAfterOpen: "kbqAfterOpen", kbqAfterClose: "kbqAfterClose", kbqBeforeClose: "kbqBeforeClose", kbqOnOk: "kbqOnOk", kbqOnCancel: "kbqOnCancel" }, host: { listeners: { "keydown": "onKeyDown($event)" }, classAttribute: "kbq-modal" }, viewQueries: [{ propertyName: "modalContainer", first: true, predicate: ["modalContainer"], descendants: true, static: true }, { propertyName: "bodyContainer", first: true, predicate: ["bodyContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "modalBody", first: true, predicate: ["modalBody"], descendants: true }, { propertyName: "autoFocusedButtons", predicate: ["autoFocusedButton"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content />\n</ng-template>\n\n<div>\n @if (kbqMask) {\n <div\n class=\"kbq-modal-mask\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngClass]=\"maskAnimationClassMap\"\n [ngStyle]=\"kbqMaskStyle\"\n ></div>\n }\n\n <div\n class=\"kbq-modal-wrap {{ kbqWrapClassName }}\"\n tabindex=\"-1\"\n [style.display]=\"hidden ? 'none' : ''\"\n (mousedown)=\"onClickMask($event)\"\n >\n <div\n #modalContainer\n class=\"kbq-modal-container {{ kbqClassName }} kbq-modal_{{ kbqSize }}\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"kbqStyle\"\n [style.transform-origin]=\"transformOrigin\"\n [style.width]=\"kbqWidth | toCssUnit\"\n >\n <div cdkTrapFocus class=\"kbq-modal-content\">\n @switch (true) {\n @case (isModalType('default')) {\n <ng-container [ngTemplateOutlet]=\"tplContentDefault\" />\n }\n @case (isModalType('confirm')) {\n <ng-container [ngTemplateOutlet]=\"tplContentConfirm\" />\n }\n @case (isModalType('custom')) {\n <ng-container [ngTemplateOutlet]=\"tplContentCustom\" />\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer />\n</ng-template>\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n @if (kbqTitle) {\n <div kbq-title class=\"kbq-modal-header\" [class.kbq-modal-body_top-overflow]=\"isTopOverflow\">\n <div class=\"kbq-modal-title\">\n @switch (true) {\n @case (isTemplateRef(kbqTitle)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqTitle)\" />\n }\n @case (isNonEmptyString(kbqTitle)) {\n <div [innerHTML]=\"kbqTitle\"></div>\n }\n }\n </div>\n @if (kbqClosable) {\n <button\n kbq-button\n type=\"button\"\n class=\"kbq-modal-close kbq-button_transparent\"\n [color]=\"'contrast'\"\n (click)=\"onClickCloseBtn()\"\n >\n <i kbq-icon=\"kbq-xmark_16\" [color]=\"componentColors.Contrast\"></i>\n </button>\n }\n </div>\n }\n <div #modalBody class=\"kbq-modal-body kbq-scrollbar\" [ngStyle]=\"kbqBodyStyle\" (scroll)=\"checkOverflow()\">\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqFooter || kbqOkText || kbqCancelText) {\n <div class=\"kbq-modal-footer\" [class.kbq-modal-body_bottom-overflow]=\"isBottomOverflow\">\n @switch (true) {\n @case (isTemplateRef(kbqFooter)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqFooter)\" />\n }\n @case (isNonEmptyString(kbqFooter)) {\n <div [innerHTML]=\"kbqFooter\"></div>\n }\n @case (isModalButtons(kbqFooter)) {\n @for (button of $any(kbqFooter); track button) {\n @if (getButtonCallableProp(button, 'show')) {\n <button\n kbq-button\n [attr.autofocus]=\"button.autoFocus\"\n [attr.kbq-modal-main-action]=\"button.kbqModalMainAction\"\n [class.kbq-progress]=\"getButtonCallableProp(button, 'loading')\"\n [color]=\"button.type\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n (click)=\"onButtonClick(button)\"\n >\n {{ button.label }}\n </button>\n }\n }\n }\n @default {\n @if (kbqOkText) {\n <button\n kbq-button\n [attr.autofocus]=\"true\"\n [color]=\"componentColors.Contrast\"\n (click)=\"onClickOkCancel('ok')\"\n >\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n }\n }\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Default Modal Content -->\n\n<!-- [Predefined] Confirm Modal Content -->\n<ng-template #tplContentConfirm>\n <div class=\"kbq-modal-body\" [ngStyle]=\"kbqBodyStyle\">\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqOkText || kbqCancelText) {\n <div class=\"kbq-confirm-footer\">\n @if (kbqOkText) {\n <button kbq-button [attr.autofocus]=\"true\" [color]=\"kbqOkType\" (click)=\"onClickOkCancel('ok')\">\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".kbq-confirm .kbq-modal-close{display:none}.kbq-confirm .kbq-confirm-footer{display:flex;gap:var(--kbq-modal-size-footer-content-gap-horizontal)}@keyframes mcFadeIn{0%{opacity:0}to{opacity:1}}@keyframes mcFadeOut{0%{opacity:1}to{opacity:0}}@keyframes mcZoomIn{0%{opacity:0;transform:translateY(-25%)}to{opacity:1;transform:scale(1)}}@keyframes mcZoomOut{0%{transform:scale(1)}to{opacity:0;transform:translateY(-30%)}}.fade-enter,.fade-appear,.fade-leave{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.fade-enter.fade-enter-active,.fade-appear.fade-appear-active{animation-name:mcFadeIn;animation-play-state:running}.fade-leave.fade-leave-active{animation-name:mcFadeOut;animation-play-state:running;pointer-events:none}.className-enter,.className-appear{opacity:0;animation-timing-function:ease-out}.className-leave{animation-timing-function:ease-out}.zoom-enter,.zoom-appear,.zoom-leave{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.zoom-enter.zoom-enter-active,.zoom-appear.zoom-appear-active{animation-name:mcZoomIn;animation-play-state:running}.zoom-leave.zoom-leave-active{animation-name:mcZoomOut;animation-play-state:running;pointer-events:none}.className-enter,.className-appear{transform:translateY(-25%);animation-timing-function:cubic-bezier(.075,.82,.165,1)}.className-leave{transform:translate(0);animation-timing-function:cubic-bezier(.785,.135,.15,.86)}.kbq-modal-container{box-sizing:border-box;position:relative;top:var(--kbq-size-5xl);border-radius:var(--kbq-modal-size-border-radius);width:auto;margin:0 auto;list-style:none}.kbq-modal-container.zoom-enter,.kbq-modal-container.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.kbq-modal-container.kbq-modal_small{width:var(--kbq-modal-size-small-width)}.kbq-modal-container.kbq-modal_medium{width:var(--kbq-modal-size-medium-width)}.kbq-modal-container.kbq-modal_large{width:var(--kbq-modal-size-large-width)}.kbq-modal-container .kbq-modal-close{position:absolute;top:var(--kbq-size-l);right:var(--kbq-size-l)}.kbq-modal-wrap{position:fixed;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.kbq-modal-content{position:relative;border-radius:var(--kbq-modal-size-border-radius);background-clip:padding-box}.kbq-modal-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-right) var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-left)}.kbq-modal-header+.kbq-modal-body{padding-top:var(--kbq-modal-size-content-padding-top)}.kbq-modal-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;padding-top:var(--kbq-size-3xs);padding-bottom:var(--kbq-size-3xs)}.kbq-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);padding:var(--kbq-modal-size-content-padding-top-without-header) var(--kbq-modal-size-content-padding-horizontal) var(--kbq-modal-size-content-padding-bottom) var(--kbq-modal-size-content-padding-horizontal);overflow-wrap:break-word}.kbq-modal-body>*{position:relative}.kbq-modal-footer,.kbq-confirm-footer{display:flex;align-items:center;padding:var(--kbq-modal-size-footer-padding-vertical) var(--kbq-modal-size-footer-padding-horizontal);gap:var(--kbq-modal-size-footer-content-gap-horizontal)}.kbq-modal-mask{position:fixed;inset:0;height:100%}.kbq-modal-mask.kbq-modal-mask-hidden{display:none}.kbq-modal-open{overflow:hidden}.kbq-modal-container{background:var(--kbq-modal-container-background);box-shadow:var(--kbq-modal-container-shadow)}.kbq-modal-container .kbq-modal-header .kbq-modal-title{color:var(--kbq-modal-header-text-color)}.kbq-modal-container .kbq-modal-header .kbq-modal-close{color:var(--kbq-modal-close-button-color)}.kbq-modal-container .kbq-modal-content{color:var(--kbq-modal-content-text-color)}.kbq-modal-container .kbq-modal-header.kbq-modal-body_top-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-modal-container .kbq-modal-footer.kbq-modal-body_bottom-overflow{box-shadow:var(--kbq-shadow-overflow-normal-top)}.kbq-modal-mask{background-color:var(--kbq-modal-overlay-background)}.kbq-modal-title{font-size:var(--kbq-typography-title-font-size);font-style:var(--kbq-typography-title-font-style);font-weight:var(--kbq-typography-title-font-weight);line-height:var(--kbq-typography-title-line-height);font-family:var(--kbq-typography-title-font-family);text-transform:var(--kbq-typography-title-text-transform);font-feature-settings:var(--kbq-typography-title-font-feature-settings);letter-spacing:var(--kbq-typography-title-letter-spacing)}.kbq-modal-body{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-modal{--kbq-modal-size-small-width: 400px;--kbq-modal-size-medium-width: 640px;--kbq-modal-size-large-width: 960px;--kbq-modal-size-border-radius: var(--kbq-size-s);--kbq-modal-size-header-padding-vertical: var(--kbq-size-l);--kbq-modal-size-header-padding-left: var(--kbq-size-xxl);--kbq-modal-size-header-padding-right: var(--kbq-size-6xl);--kbq-modal-size-close-button-margin-left: var(--kbq-size-s);--kbq-modal-size-content-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-content-padding-top: 1px;--kbq-modal-size-content-padding-bottom: var(--kbq-size-s);--kbq-modal-size-content-padding-top-without-header: var(--kbq-size-xxl);--kbq-modal-size-content-padding-bottom-without-footer: var(--kbq-size-4xl);--kbq-modal-size-footer-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-footer-padding-vertical: var(--kbq-size-xl);--kbq-modal-size-footer-content-gap-horizontal: var(--kbq-size-l);--kbq-modal-overlay-background: var(--kbq-background-overlay);--kbq-modal-container-background: var(--kbq-background-card);--kbq-modal-container-shadow: var(--kbq-shadow-overlay);--kbq-modal-close-button-color: var(--kbq-icon-contrast);--kbq-modal-header-text-color: var(--kbq-foreground-contrast);--kbq-modal-content-text-color: var(--kbq-foreground-contrast)}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i4.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i4.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i5.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "pipe", type: CssUnitPipe, name: "toCssUnit" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
617
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalComponent, deps: [{ token: i1.Overlay }, { token: i0.Renderer2 }, { token: i0.ComponentFactoryResolver }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: KbqModalControlService }, { token: i0.ChangeDetectorRef }, { token: i3.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
618
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: KbqModalComponent, isStandalone: true, selector: "kbq-modal", inputs: { kbqModalType: "kbqModalType", kbqComponent: "kbqComponent", kbqContent: "kbqContent", kbqComponentParams: "kbqComponentParams", kbqFooter: "kbqFooter", kbqVisible: "kbqVisible", kbqWidth: "kbqWidth", kbqSize: "kbqSize", kbqWrapClassName: "kbqWrapClassName", kbqClassName: "kbqClassName", kbqStyle: "kbqStyle", kbqTitle: "kbqTitle", kbqCloseByESC: "kbqCloseByESC", kbqClosable: "kbqClosable", kbqMask: "kbqMask", kbqMaskClosable: "kbqMaskClosable", kbqMaskStyle: "kbqMaskStyle", kbqBodyStyle: "kbqBodyStyle", kbqOkText: "kbqOkText", kbqOkType: "kbqOkType", kbqRestoreFocus: "kbqRestoreFocus", kbqOkLoading: "kbqOkLoading", kbqOnOk: "kbqOnOk", kbqCancelText: "kbqCancelText", kbqCancelLoading: "kbqCancelLoading", kbqOnCancel: "kbqOnCancel", kbqGetContainer: "kbqGetContainer" }, outputs: { kbqVisibleChange: "kbqVisibleChange", kbqAfterOpen: "kbqAfterOpen", kbqAfterClose: "kbqAfterClose", kbqBeforeClose: "kbqBeforeClose", kbqOnOk: "kbqOnOk", kbqOnCancel: "kbqOnCancel" }, host: { listeners: { "keydown": "onKeyDown($event)" }, classAttribute: "kbq-modal" }, viewQueries: [{ propertyName: "modalContainer", first: true, predicate: ["modalContainer"], descendants: true, static: true }, { propertyName: "bodyContainer", first: true, predicate: ["bodyContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "modalBody", first: true, predicate: ["modalBody"], descendants: true }, { propertyName: "autoFocusedButtons", predicate: ["autoFocusedButton"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content />\n</ng-template>\n\n<div>\n @if (kbqMask) {\n <div\n class=\"kbq-modal-mask\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngClass]=\"maskAnimationClassMap\"\n [ngStyle]=\"kbqMaskStyle\"\n ></div>\n }\n\n <div\n class=\"kbq-modal-wrap {{ kbqWrapClassName }}\"\n tabindex=\"-1\"\n [style.display]=\"hidden ? 'none' : ''\"\n (mousedown)=\"onClickMask($event)\"\n >\n <div\n #modalContainer\n class=\"kbq-modal-container {{ kbqClassName }} kbq-modal_{{ kbqSize }}\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"kbqStyle\"\n [style.transform-origin]=\"transformOrigin\"\n [style.width]=\"kbqWidth | toCssUnit\"\n >\n <div cdkTrapFocus class=\"kbq-modal-content\">\n @switch (true) {\n @case (isModalType('default')) {\n <ng-container [ngTemplateOutlet]=\"tplContentDefault\" />\n }\n @case (isModalType('confirm')) {\n <ng-container [ngTemplateOutlet]=\"tplContentConfirm\" />\n }\n @case (isModalType('custom')) {\n <ng-container [ngTemplateOutlet]=\"tplContentCustom\" />\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer />\n</ng-template>\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n @if (kbqTitle) {\n <div kbq-title class=\"kbq-modal-header\" [class.kbq-modal-body_top-overflow]=\"isTopOverflow\">\n <div class=\"kbq-modal-title\">\n @switch (true) {\n @case (isTemplateRef(kbqTitle)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqTitle)\" />\n }\n @case (isNonEmptyString(kbqTitle)) {\n <div [innerHTML]=\"kbqTitle\"></div>\n }\n }\n </div>\n @if (kbqClosable) {\n <button\n kbq-button\n type=\"button\"\n class=\"kbq-modal-close kbq-button_transparent\"\n [color]=\"'contrast'\"\n (click)=\"onClickCloseBtn()\"\n >\n <i kbq-icon=\"kbq-xmark_16\" [color]=\"componentColors.Contrast\"></i>\n </button>\n }\n </div>\n }\n <div #modalBody class=\"kbq-modal-body kbq-scrollbar\" [ngStyle]=\"kbqBodyStyle\" (scroll)=\"checkOverflow()\">\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqFooter || kbqOkText || kbqCancelText) {\n <div class=\"kbq-modal-footer\" [class.kbq-modal-body_bottom-overflow]=\"isBottomOverflow\">\n @switch (true) {\n @case (isTemplateRef(kbqFooter)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqFooter)\" />\n }\n @case (isNonEmptyString(kbqFooter)) {\n <div [innerHTML]=\"kbqFooter\"></div>\n }\n @case (isModalButtons(kbqFooter)) {\n @for (button of $any(kbqFooter); track button) {\n @if (getButtonCallableProp(button, 'show')) {\n <button\n kbq-button\n [attr.autofocus]=\"button.autoFocus\"\n [attr.kbq-modal-main-action]=\"button.kbqModalMainAction\"\n [class.kbq-progress]=\"getButtonCallableProp(button, 'loading')\"\n [color]=\"button.type\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n (click)=\"onButtonClick(button)\"\n >\n {{ button.label }}\n </button>\n }\n }\n }\n @default {\n @if (kbqOkText) {\n <button\n kbq-button\n [attr.autofocus]=\"true\"\n [color]=\"componentColors.Contrast\"\n (click)=\"onClickOkCancel('ok')\"\n >\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n }\n }\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Default Modal Content -->\n\n<!-- [Predefined] Confirm Modal Content -->\n<ng-template #tplContentConfirm>\n <div class=\"kbq-modal-body\" [ngStyle]=\"kbqBodyStyle\">\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqOkText || kbqCancelText) {\n <div class=\"kbq-confirm-footer\">\n @if (kbqOkText) {\n <button kbq-button [attr.autofocus]=\"true\" [color]=\"kbqOkType\" (click)=\"onClickOkCancel('ok')\">\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".kbq-confirm .kbq-modal-close{display:none}.kbq-confirm .kbq-confirm-footer{display:flex;gap:var(--kbq-modal-size-footer-content-gap-horizontal)}@keyframes mcFadeIn{0%{opacity:0}to{opacity:1}}@keyframes mcFadeOut{0%{opacity:1}to{opacity:0}}@keyframes mcZoomIn{0%{opacity:0;transform:translateY(-25%)}to{opacity:1;transform:scale(1)}}@keyframes mcZoomOut{0%{transform:scale(1)}to{opacity:0;transform:translateY(-30%)}}.fade-enter,.fade-appear,.fade-leave{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.fade-enter.fade-enter-active,.fade-appear.fade-appear-active{animation-name:mcFadeIn;animation-play-state:running}.fade-leave.fade-leave-active{animation-name:mcFadeOut;animation-play-state:running;pointer-events:none}.className-enter,.className-appear{opacity:0;animation-timing-function:ease-out}.className-leave{animation-timing-function:ease-out}.zoom-enter,.zoom-appear,.zoom-leave{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.zoom-enter.zoom-enter-active,.zoom-appear.zoom-appear-active{animation-name:mcZoomIn;animation-play-state:running}.zoom-leave.zoom-leave-active{animation-name:mcZoomOut;animation-play-state:running;pointer-events:none}.className-enter,.className-appear{transform:translateY(-25%);animation-timing-function:cubic-bezier(.075,.82,.165,1)}.className-leave{transform:translate(0);animation-timing-function:cubic-bezier(.785,.135,.15,.86)}.kbq-modal-container{box-sizing:border-box;position:relative;top:var(--kbq-size-5xl);border-radius:var(--kbq-modal-size-border-radius);width:auto;margin:0 auto;list-style:none}.kbq-modal-container.zoom-enter,.kbq-modal-container.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.kbq-modal-container.kbq-modal_small{width:var(--kbq-modal-size-small-width)}.kbq-modal-container.kbq-modal_medium{width:var(--kbq-modal-size-medium-width)}.kbq-modal-container.kbq-modal_large{width:var(--kbq-modal-size-large-width)}.kbq-modal-container .kbq-modal-close{position:absolute;top:var(--kbq-size-l);right:var(--kbq-size-l)}.kbq-modal-wrap{position:fixed;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.kbq-modal-content{position:relative;border-radius:var(--kbq-modal-size-border-radius);background-clip:padding-box}.kbq-modal-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-right) var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-left)}.kbq-modal-header+.kbq-modal-body{padding-top:var(--kbq-modal-size-content-padding-top)}.kbq-modal-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;padding-top:var(--kbq-size-3xs);padding-bottom:var(--kbq-size-3xs)}.kbq-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);padding:var(--kbq-modal-size-content-padding-top-without-header) var(--kbq-modal-size-content-padding-horizontal) var(--kbq-modal-size-content-padding-bottom) var(--kbq-modal-size-content-padding-horizontal);overflow-wrap:break-word}.kbq-modal-body>*{position:relative}.kbq-modal-footer,.kbq-confirm-footer{display:flex;align-items:center;padding:var(--kbq-modal-size-footer-padding-vertical) var(--kbq-modal-size-footer-padding-horizontal);gap:var(--kbq-modal-size-footer-content-gap-horizontal)}.kbq-modal-mask{position:fixed;inset:0;height:100%}.kbq-modal-mask.kbq-modal-mask-hidden{display:none}.kbq-modal-open{overflow:hidden}.kbq-modal-container{background:var(--kbq-modal-container-background);box-shadow:var(--kbq-modal-container-shadow)}.kbq-modal-container .kbq-modal-header .kbq-modal-title{color:var(--kbq-modal-header-text-color)}.kbq-modal-container .kbq-modal-header .kbq-modal-close{color:var(--kbq-modal-close-button-color)}.kbq-modal-container .kbq-modal-content{color:var(--kbq-modal-content-text-color)}.kbq-modal-container .kbq-modal-header.kbq-modal-body_top-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-modal-container .kbq-modal-footer.kbq-modal-body_bottom-overflow{box-shadow:var(--kbq-shadow-overflow-normal-top)}.kbq-modal-mask{background-color:var(--kbq-modal-overlay-background)}.kbq-modal-title{font-size:var(--kbq-typography-title-font-size);font-style:var(--kbq-typography-title-font-style);font-weight:var(--kbq-typography-title-font-weight);line-height:var(--kbq-typography-title-line-height);font-family:var(--kbq-typography-title-font-family);text-transform:var(--kbq-typography-title-text-transform);font-feature-settings:var(--kbq-typography-title-font-feature-settings);letter-spacing:var(--kbq-typography-title-letter-spacing)}.kbq-modal-body{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-modal{--kbq-modal-size-small-width: 400px;--kbq-modal-size-medium-width: 640px;--kbq-modal-size-large-width: 960px;--kbq-modal-size-border-radius: var(--kbq-size-s);--kbq-modal-size-header-padding-vertical: var(--kbq-size-l);--kbq-modal-size-header-padding-left: var(--kbq-size-xxl);--kbq-modal-size-header-padding-right: var(--kbq-size-6xl);--kbq-modal-size-close-button-margin-left: var(--kbq-size-s);--kbq-modal-size-content-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-content-padding-top: 1px;--kbq-modal-size-content-padding-bottom: var(--kbq-size-s);--kbq-modal-size-content-padding-top-without-header: var(--kbq-size-xxl);--kbq-modal-size-content-padding-bottom-without-footer: var(--kbq-size-4xl);--kbq-modal-size-footer-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-footer-padding-vertical: var(--kbq-size-xl);--kbq-modal-size-footer-content-gap-horizontal: var(--kbq-size-l);--kbq-modal-overlay-background: var(--kbq-background-overlay);--kbq-modal-container-background: var(--kbq-background-card);--kbq-modal-container-shadow: var(--kbq-shadow-overlay);--kbq-modal-close-button-color: var(--kbq-icon-contrast);--kbq-modal-header-text-color: var(--kbq-foreground-contrast);--kbq-modal-content-text-color: var(--kbq-foreground-contrast)}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i4.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i4.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i5.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "pipe", type: CssUnitPipe, name: "toCssUnit" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
612
619
|
}
|
|
613
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
620
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalComponent, decorators: [{
|
|
614
621
|
type: Component,
|
|
615
622
|
args: [{ selector: 'kbq-modal', imports: [
|
|
616
623
|
CdkTrapFocus,
|
|
@@ -714,8 +721,8 @@ class KbqModalTitle {
|
|
|
714
721
|
constructor(modal) {
|
|
715
722
|
this.modal = modal;
|
|
716
723
|
}
|
|
717
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
718
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
724
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalTitle, deps: [{ token: KbqModalComponent }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
725
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: KbqModalTitle, isStandalone: true, selector: "[kbq-modal-title], kbq-modal-title, [kbqModalTitle]", host: { properties: { "class.kbq-modal-header_closable": "modal.kbqClosable" }, classAttribute: "kbq-modal-header" }, ngImport: i0, template: `
|
|
719
726
|
<div class="kbq-modal-title" kbq-title>
|
|
720
727
|
<ng-content />
|
|
721
728
|
</div>
|
|
@@ -733,7 +740,7 @@ class KbqModalTitle {
|
|
|
733
740
|
}
|
|
734
741
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i5.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i4.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i4.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "directive", type: KbqTitleDirective, selector: "[kbq-title]", exportAs: ["kbqTitle"] }] }); }
|
|
735
742
|
}
|
|
736
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
743
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalTitle, decorators: [{
|
|
737
744
|
type: Component,
|
|
738
745
|
args: [{
|
|
739
746
|
selector: `[kbq-modal-title], kbq-modal-title, [kbqModalTitle]`,
|
|
@@ -766,10 +773,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
766
773
|
}]
|
|
767
774
|
}], ctorParameters: () => [{ type: KbqModalComponent }] });
|
|
768
775
|
class KbqModalBody {
|
|
769
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
770
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
776
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalBody, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
777
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: KbqModalBody, isStandalone: true, selector: "[kbq-modal-body], kbq-modal-body, [kbqModalBody]", host: { classAttribute: "kbq-modal-body" }, ngImport: i0 }); }
|
|
771
778
|
}
|
|
772
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
779
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalBody, decorators: [{
|
|
773
780
|
type: Directive,
|
|
774
781
|
args: [{
|
|
775
782
|
selector: `[kbq-modal-body], kbq-modal-body, [kbqModalBody]`,
|
|
@@ -779,10 +786,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
779
786
|
}]
|
|
780
787
|
}] });
|
|
781
788
|
class KbqModalFooter {
|
|
782
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
783
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
789
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
790
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: KbqModalFooter, isStandalone: true, selector: "[kbq-modal-footer], kbq-modal-footer, [kbqModalFooter]", host: { classAttribute: "kbq-modal-footer" }, ngImport: i0 }); }
|
|
784
791
|
}
|
|
785
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
792
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalFooter, decorators: [{
|
|
786
793
|
type: Directive,
|
|
787
794
|
args: [{
|
|
788
795
|
selector: `[kbq-modal-footer], kbq-modal-footer, [kbqModalFooter]`,
|
|
@@ -792,10 +799,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
792
799
|
}]
|
|
793
800
|
}] });
|
|
794
801
|
class KbqModalMainAction {
|
|
795
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
796
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
802
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalMainAction, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
803
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: KbqModalMainAction, isStandalone: true, selector: "[kbq-modal-main-action]", ngImport: i0 }); }
|
|
797
804
|
}
|
|
798
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalMainAction, decorators: [{
|
|
799
806
|
type: Directive,
|
|
800
807
|
args: [{
|
|
801
808
|
selector: `[kbq-modal-main-action]`
|
|
@@ -895,7 +902,7 @@ class KbqModalService {
|
|
|
895
902
|
return new ModalBuilderForService(this.overlay, options, injector).getInstance();
|
|
896
903
|
}
|
|
897
904
|
confirm(options = {}, confirmType = 'confirm') {
|
|
898
|
-
if ('kbqFooter' in options) {
|
|
905
|
+
if ('kbqFooter' in options && isDevMode()) {
|
|
899
906
|
// eslint-disable-next-line no-console
|
|
900
907
|
console.warn(`The Confirm-Modal doesn't support "kbqFooter", this property will be ignored.`);
|
|
901
908
|
}
|
|
@@ -918,16 +925,17 @@ class KbqModalService {
|
|
|
918
925
|
delete(options = {}) {
|
|
919
926
|
return this.confirm(options, 'warn');
|
|
920
927
|
}
|
|
921
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
922
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
928
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalService, deps: [{ token: i1.Overlay }, { token: KbqModalControlService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
929
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalService, providedIn: 'root' }); }
|
|
923
930
|
}
|
|
924
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
925
|
-
type: Injectable
|
|
931
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalService, decorators: [{
|
|
932
|
+
type: Injectable,
|
|
933
|
+
args: [{ providedIn: 'root' }]
|
|
926
934
|
}], ctorParameters: () => [{ type: i1.Overlay }, { type: KbqModalControlService }, { type: i0.Injector }] });
|
|
927
935
|
|
|
928
936
|
class KbqModalModule {
|
|
929
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
930
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
937
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
938
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: KbqModalModule, imports: [OverlayModule,
|
|
931
939
|
A11yModule,
|
|
932
940
|
KbqButtonModule,
|
|
933
941
|
KbqIconModule,
|
|
@@ -945,7 +953,7 @@ class KbqModalModule {
|
|
|
945
953
|
KbqModalBody,
|
|
946
954
|
KbqModalFooter,
|
|
947
955
|
KbqModalMainAction] }); }
|
|
948
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
956
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalModule, providers: [
|
|
949
957
|
KbqModalControlService,
|
|
950
958
|
KbqModalService,
|
|
951
959
|
{ provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory }
|
|
@@ -957,7 +965,7 @@ class KbqModalModule {
|
|
|
957
965
|
KbqModalComponent,
|
|
958
966
|
KbqModalTitle] }); }
|
|
959
967
|
}
|
|
960
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
968
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqModalModule, decorators: [{
|
|
961
969
|
type: NgModule,
|
|
962
970
|
args: [{
|
|
963
971
|
imports: [
|