@koobiq/components 18.10.0 → 18.12.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/autocomplete/autocomplete-trigger.directive.d.ts +0 -1
- package/autocomplete/autocomplete.scss +2 -10
- package/button/button-tokens.scss +1 -1
- package/code-block/_code-block-theme.scss +35 -54
- package/code-block/code-block-highlight.d.ts +44 -0
- package/code-block/code-block-tokens.scss +7 -11
- package/code-block/code-block.d.ts +187 -0
- package/code-block/code-block.module.d.ts +2 -8
- package/code-block/code-block.scss +103 -127
- package/code-block/public-api.d.ts +3 -2
- package/code-block/types.d.ts +27 -0
- package/core/common-behaviors/error-state.d.ts +3 -3
- package/core/error/error-state-matcher.d.ts +3 -0
- package/core/locales/index.d.ts +1 -0
- package/core/locales/types.d.ts +11 -0
- package/core/pop-up/constants.d.ts +9 -0
- package/core/select/constants.d.ts +16 -4
- package/core/styles/theming/_scrollbar-theme.scss +2 -1
- package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +7 -8
- package/esm2022/autocomplete/autocomplete.component.mjs +2 -2
- package/esm2022/button/button.component.mjs +2 -2
- package/esm2022/code-block/code-block-highlight.mjs +416 -0
- package/esm2022/code-block/code-block.mjs +395 -0
- package/esm2022/code-block/code-block.module.mjs +9 -30
- package/esm2022/code-block/public-api.mjs +4 -3
- package/esm2022/code-block/types.mjs +2 -0
- package/esm2022/core/common-behaviors/error-state.mjs +1 -1
- package/esm2022/core/error/error-state-matcher.mjs +15 -2
- package/esm2022/core/locales/en-US.mjs +1 -1
- package/esm2022/core/locales/es-LA.mjs +1 -1
- package/esm2022/core/locales/fa-IR.mjs +1 -1
- package/esm2022/core/locales/index.mjs +2 -1
- package/esm2022/core/locales/pt-BR.mjs +1 -1
- package/esm2022/core/locales/ru-RU.mjs +1 -1
- package/esm2022/core/locales/types.mjs +2 -0
- package/esm2022/core/locales/zh-CN.mjs +1 -1
- package/esm2022/core/pop-up/constants.mjs +6 -1
- package/esm2022/core/select/constants.mjs +17 -5
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-header.component.mjs +1 -1
- package/esm2022/file-upload/file-upload.mjs +40 -2
- package/esm2022/file-upload/multiple-file-upload.component.mjs +43 -47
- package/esm2022/file-upload/single-file-upload.component.mjs +41 -45
- package/esm2022/form-field/form-field.mjs +6 -6
- package/esm2022/form-field/hint.mjs +2 -2
- package/esm2022/form-field/password-hint.mjs +2 -2
- package/esm2022/loader-overlay/loader-overlay.component.mjs +6 -4
- package/esm2022/modal/modal.component.mjs +5 -3
- package/esm2022/modal/modal.service.mjs +6 -3
- package/esm2022/modal/modal.type.mjs +1 -1
- package/esm2022/modal/public-api.mjs +5 -5
- package/esm2022/scrollbar/scrollbar.directive.mjs +6 -3
- package/esm2022/select/select.component.mjs +22 -12
- package/esm2022/sidepanel/sidepanel-config.mjs +1 -1
- package/esm2022/sidepanel/sidepanel-container.component.mjs +6 -3
- package/esm2022/timezone/timezone-select.component.mjs +3 -1
- package/esm2022/toast/toast-container.component.mjs +3 -3
- package/esm2022/toast/toast.component.mjs +18 -9
- package/esm2022/toast/toast.module.mjs +14 -50
- package/esm2022/toast/toast.service.mjs +5 -2
- package/esm2022/tooltip/tooltip.component.mjs +5 -2
- package/esm2022/tree-select/tree-select.component.mjs +15 -40
- package/fesm2022/koobiq-components-autocomplete.mjs +9 -10
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +2 -2
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +378 -341
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +36 -7
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +107 -76
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +9 -9
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +5 -3
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +10 -5
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar.mjs +5 -2
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +21 -11
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +5 -2
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +2 -0
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +138 -161
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +4 -1
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +14 -39
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +16 -2
- package/file-upload/file-upload.d.ts +29 -2
- package/file-upload/multiple-file-upload.component.d.ts +18 -18
- package/file-upload/single-file-upload.component.d.ts +17 -16
- package/form-field/_hint-theme.scss +1 -1
- package/form-field/form-field.d.ts +1 -1
- package/form-field/form-field.scss +0 -1
- package/loader-overlay/loader-overlay.component.d.ts +1 -0
- package/modal/modal.component.d.ts +4 -0
- package/modal/modal.service.d.ts +4 -0
- package/modal/modal.type.d.ts +6 -1
- package/modal/public-api.d.ts +4 -4
- package/package.json +4 -4
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/schematics/ng-add/index.js +3 -4
- package/scrollbar/scrollbar.directive.d.ts +2 -1
- package/select/select.component.d.ts +15 -3
- package/sidepanel/sidepanel-config.d.ts +2 -0
- package/sidepanel/sidepanel-container.component.d.ts +1 -0
- package/timezone/timezone-select.component.d.ts +3 -1
- package/toast/toast-container.component.d.ts +1 -1
- package/toast/toast.component.d.ts +2 -2
- package/toast/toast.module.d.ts +1 -7
- package/toast/toast.service.d.ts +1 -1
- package/tooltip/tooltip.component.d.ts +2 -1
- package/tree-select/_tree-select-theme.scss +4 -0
- package/tree-select/tree-select.component.d.ts +1 -12
- package/accordion/README.md +0 -0
- package/alert/README.md +0 -0
- package/autocomplete/README.md +0 -0
- package/badge/README.md +0 -0
- package/button/README.md +0 -0
- package/button-toggle/README.md +0 -0
- package/checkbox/README.md +0 -1
- package/code-block/README.md +0 -36
- package/code-block/actionbar.component.d.ts +0 -32
- package/code-block/actionbar.component.scss +0 -43
- package/code-block/code-block-content.d.ts +0 -28
- package/code-block/code-block.component.d.ts +0 -98
- package/code-block/code-block.types.d.ts +0 -36
- package/datepicker/README.md +0 -0
- package/divider/README.md +0 -0
- package/dl/README.md +0 -0
- package/empty-state/README.md +0 -0
- package/esm2022/code-block/actionbar.component.mjs +0 -90
- package/esm2022/code-block/code-block-content.mjs +0 -393
- package/esm2022/code-block/code-block.component.mjs +0 -283
- package/esm2022/code-block/code-block.types.mjs +0 -5
- package/file-upload/README.md +0 -0
- package/form-field/README.md +0 -0
- package/icon/README.md +0 -0
- package/link/README.md +0 -0
- package/list/README.md +0 -0
- package/loader-overlay/README.md +0 -0
- package/modal/README.md +0 -35
- package/navbar/README.md +0 -42
- package/popover/README.md +0 -36
- package/progress-bar/README.md +0 -0
- package/progress-spinner/README.md +0 -0
- package/risk-level/README.md +0 -0
- package/table/README.md +0 -0
- package/tags/README.md +0 -0
- package/textarea/README.md +0 -0
- package/timepicker/README.md +0 -0
- package/timezone/README.md +0 -0
- package/tree-select/README.md +0 -0
|
@@ -1,39 +1,58 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as i3 from '@angular/cdk/a11y';
|
|
2
|
+
import { FocusMonitor, A11yModule } from '@angular/cdk/a11y';
|
|
3
|
+
import { Clipboard } from '@angular/cdk/clipboard';
|
|
4
|
+
import { Platform } from '@angular/cdk/platform';
|
|
5
|
+
import * as i4 from '@angular/cdk/scrolling';
|
|
6
|
+
import { CdkScrollable, CdkScrollableModule } from '@angular/cdk/scrolling';
|
|
3
7
|
import { DOCUMENT } from '@angular/common';
|
|
4
8
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { InjectionToken, SecurityContext, inject, ElementRef, Renderer2, numberAttribute, booleanAttribute, Directive, Input, EventEmitter,
|
|
9
|
+
import { InjectionToken, SecurityContext, inject, ElementRef, Renderer2, numberAttribute, booleanAttribute, Directive, Input, EventEmitter, ChangeDetectorRef, DestroyRef, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, Output, NgModule } from '@angular/core';
|
|
6
10
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
|
-
import * as i4 from '@koobiq/components/core';
|
|
8
|
-
import { ruRULocaleData, KBQ_LOCALE_SERVICE } from '@koobiq/components/core';
|
|
9
|
-
import * as i5 from '@koobiq/components/tabs';
|
|
10
|
-
import { KbqTabGroup, KbqTabsModule } from '@koobiq/components/tabs';
|
|
11
|
-
import { Subject, Subscription, pairwise, merge, fromEvent } from 'rxjs';
|
|
12
|
-
import { filter, debounceTime, startWith, switchMap, map } from 'rxjs/operators';
|
|
13
|
-
import * as i1 from '@koobiq/components/button';
|
|
14
|
-
import { KbqButtonModule } from '@koobiq/components/button';
|
|
15
|
-
import * as i3 from '@koobiq/components/icon';
|
|
16
|
-
import { KbqIconModule } from '@koobiq/components/icon';
|
|
17
11
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
18
|
-
import
|
|
19
|
-
import
|
|
12
|
+
import * as i2 from '@koobiq/components/button';
|
|
13
|
+
import { KbqButtonStyles, KbqButtonModule } from '@koobiq/components/button';
|
|
14
|
+
import { ruRULocaleData, KbqComponentColors, KBQ_LOCALE_SERVICE } from '@koobiq/components/core';
|
|
15
|
+
import * as i6 from '@koobiq/components/icon';
|
|
16
|
+
import { KbqIconModule } from '@koobiq/components/icon';
|
|
17
|
+
import * as i1 from '@koobiq/components/tabs';
|
|
18
|
+
import { KbqTabsModule } from '@koobiq/components/tabs';
|
|
19
|
+
import * as i5 from '@koobiq/components/tooltip';
|
|
20
20
|
import { KbqToolTipModule } from '@koobiq/components/tooltip';
|
|
21
|
+
import { merge, fromEvent, debounceTime } from 'rxjs';
|
|
22
|
+
import hljs from 'highlight.js';
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Fallback language for code block if language is not supported/specified.
|
|
26
|
+
*
|
|
27
|
+
* List of supported languages:
|
|
28
|
+
* @link https://highlightjs.readthedocs.io/en/stable/supported-languages.html
|
|
29
|
+
*/
|
|
30
|
+
const KBQ_CODE_BLOCK_FALLBACK_FILE_LANGUAGE = new InjectionToken('KBQ_CODE_BLOCK_FALLBACK_FILE_LANGUAGE', { factory: () => 'plaintext' });
|
|
31
|
+
/** Utility provider for `KBQ_CODE_BLOCK_FALLBACK_FILE_LANGUAGE`. */
|
|
32
|
+
const kbqCodeBlockFallbackFileLanguageProvider = (language) => ({
|
|
33
|
+
provide: KBQ_CODE_BLOCK_FALLBACK_FILE_LANGUAGE,
|
|
34
|
+
useValue: language
|
|
35
|
+
});
|
|
36
|
+
/** Directive which applies syntax highlighting to the code block content. */
|
|
37
|
+
class KbqCodeBlockHighlight {
|
|
27
38
|
/** The code file. */
|
|
28
39
|
set file({ language, content }) {
|
|
29
40
|
const window = this.getWindow();
|
|
30
41
|
if (!window)
|
|
31
42
|
return;
|
|
32
|
-
if (!hljs.getLanguage(language)) {
|
|
33
|
-
console.warn(`[
|
|
34
|
-
language =
|
|
43
|
+
if (!language || !hljs.getLanguage(language)) {
|
|
44
|
+
console.warn(`[KbqCodeBlock] Unknown language: "${language}". Setting to "${this.fallbackFileLanguage}".`);
|
|
45
|
+
language = this.fallbackFileLanguage;
|
|
46
|
+
}
|
|
47
|
+
const { value: highlightedHTML, language: highlightedLanguage, illegal, relevance } = hljs.highlight(content, {
|
|
48
|
+
language: language
|
|
49
|
+
});
|
|
50
|
+
if (illegal) {
|
|
51
|
+
console.warn('[KbqCodeBlock] Content contains illegal characters.');
|
|
52
|
+
}
|
|
53
|
+
if (relevance === 0) {
|
|
54
|
+
console.warn('[KbqCodeBlock] Content does not match the specified programming language.');
|
|
35
55
|
}
|
|
36
|
-
const { value: highlightedHTML, language: highlightedLanguage } = hljs.highlight(content, { language });
|
|
37
56
|
const safeHTML = this.domSanitizer.sanitize(SecurityContext.HTML, highlightedHTML);
|
|
38
57
|
const highlightedHTMLWithLineNumbers = window['hljs'].lineNumbersValue(safeHTML, {
|
|
39
58
|
startFrom: this.startFrom,
|
|
@@ -43,10 +62,11 @@ class KbqCodeBlockContent {
|
|
|
43
62
|
this.renderer.setProperty(this.nativeElement, 'innerHTML', highlightedHTMLWithLineNumbers);
|
|
44
63
|
}
|
|
45
64
|
constructor() {
|
|
46
|
-
this.document = inject(DOCUMENT);
|
|
47
65
|
this.nativeElement = inject(ElementRef).nativeElement;
|
|
66
|
+
this.document = inject(DOCUMENT);
|
|
48
67
|
this.renderer = inject(Renderer2);
|
|
49
68
|
this.domSanitizer = inject(DomSanitizer);
|
|
69
|
+
this.fallbackFileLanguage = inject(KBQ_CODE_BLOCK_FALLBACK_FILE_LANGUAGE);
|
|
50
70
|
/** The starting line number. */
|
|
51
71
|
this.startFrom = 1;
|
|
52
72
|
/** Whether to display line numbers for single line code block. */
|
|
@@ -57,22 +77,24 @@ class KbqCodeBlockContent {
|
|
|
57
77
|
getWindow() {
|
|
58
78
|
return this.document?.defaultView || window;
|
|
59
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Initialize the HighlightJS line numbers plugin. This method is called once when
|
|
82
|
+
* the component is constructed.
|
|
83
|
+
*/
|
|
60
84
|
initLineNumbersPlugin() {
|
|
61
85
|
const window = this.getWindow();
|
|
62
86
|
if (!window)
|
|
63
87
|
return;
|
|
64
88
|
window['hljs'] = hljs;
|
|
65
|
-
this.highlightJSLineNumbersPlugin();
|
|
89
|
+
this.highlightJSLineNumbersPlugin(this.document, window);
|
|
66
90
|
}
|
|
67
91
|
/**
|
|
68
92
|
* This method is not intended for editing.
|
|
69
93
|
* Changes may lead to unpredictable behavior.
|
|
70
94
|
* Source code: https://github.com/wcoder/highlightjs-line-numbers.js/blob/v2.9.0/src/highlightjs-line-numbers.js
|
|
71
95
|
*/
|
|
72
|
-
highlightJSLineNumbersPlugin() {
|
|
96
|
+
highlightJSLineNumbersPlugin(d, w) {
|
|
73
97
|
'use strict';
|
|
74
|
-
const d = this.document;
|
|
75
|
-
const w = this.getWindow();
|
|
76
98
|
if (!w)
|
|
77
99
|
return;
|
|
78
100
|
const TABLE_NAME = 'hljs-ln', LINE_NAME = 'hljs-ln-line', CODE_BLOCK_NAME = 'hljs-ln-code', NUMBERS_BLOCK_NAME = 'hljs-ln-numbers', NUMBER_LINE_NAME = 'hljs-ln-n', DATA_ATTR_NAME = 'data-line-number', BREAK_LINE_REGEXP = /\r\n|\r|\n/g;
|
|
@@ -387,14 +409,14 @@ class KbqCodeBlockContent {
|
|
|
387
409
|
return isFinite(number) ? number : fallback;
|
|
388
410
|
}
|
|
389
411
|
}
|
|
390
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type:
|
|
391
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.6", type:
|
|
412
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqCodeBlockHighlight, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
413
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.6", type: KbqCodeBlockHighlight, isStandalone: true, selector: "code[kbqCodeBlockHighlight]", inputs: { file: "file", startFrom: ["startFrom", "startFrom", numberAttribute], singleLine: ["singleLine", "singleLine", booleanAttribute] }, host: { classAttribute: "hljs" }, ngImport: i0 }); }
|
|
392
414
|
}
|
|
393
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type:
|
|
415
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqCodeBlockHighlight, decorators: [{
|
|
394
416
|
type: Directive,
|
|
395
417
|
args: [{
|
|
396
418
|
standalone: true,
|
|
397
|
-
selector: '[
|
|
419
|
+
selector: 'code[kbqCodeBlockHighlight]',
|
|
398
420
|
host: {
|
|
399
421
|
class: 'hljs'
|
|
400
422
|
}
|
|
@@ -410,377 +432,392 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
410
432
|
args: [{ transform: booleanAttribute }]
|
|
411
433
|
}] } });
|
|
412
434
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
435
|
+
/** Localization configuration provider. */
|
|
436
|
+
const KBQ_CODE_BLOCK_LOCALE_CONFIGURATION = new InjectionToken('KBQ_CODE_BLOCK_LOCALE_CONFIGURATION', { factory: () => ruRULocaleData.codeBlock });
|
|
437
|
+
/** Utility provider for `KBQ_CODE_BLOCK_LOCALE_CONFIGURATION`. */
|
|
438
|
+
const kbqCodeBlockLocaleConfigurationProvider = (configuration) => ({
|
|
439
|
+
provide: KBQ_CODE_BLOCK_LOCALE_CONFIGURATION,
|
|
440
|
+
useValue: configuration
|
|
441
|
+
});
|
|
442
|
+
/** Fallback file name for code block if file name is not specified. */
|
|
443
|
+
const KBQ_CODE_BLOCK_FALLBACK_FILE_NAME = new InjectionToken('KBQ_CODE_BLOCK_FALLBACK_FILE_NAME', {
|
|
444
|
+
factory: () => 'code'
|
|
445
|
+
});
|
|
446
|
+
/** Utility provider for `KBQ_CODE_BLOCK_FALLBACK_FILE_NAME`. */
|
|
447
|
+
const kbqCodeBlockFallbackFileNameProvider = (fileName) => ({
|
|
448
|
+
provide: KBQ_CODE_BLOCK_FALLBACK_FILE_NAME,
|
|
449
|
+
useValue: fileName
|
|
450
|
+
});
|
|
451
|
+
/**
|
|
452
|
+
* Component which highlights blocks of code.
|
|
453
|
+
*/
|
|
454
|
+
class KbqCodeBlock {
|
|
455
|
+
get calculatedMaxHeight() {
|
|
456
|
+
return this.maxHeight > 0 && !this.viewAll ? this.maxHeight : null;
|
|
432
457
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
this.
|
|
436
|
-
if (this.copyTooltipText === this.config.copiedTooltip) {
|
|
437
|
-
this.copyTooltipText = this.config.copyTooltip;
|
|
438
|
-
}
|
|
439
|
-
});
|
|
458
|
+
/** @deprecated Will be removed in next major release, use `canDownload` instead. */
|
|
459
|
+
set canLoad(value) {
|
|
460
|
+
this.canDownload = value;
|
|
440
461
|
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
this.copyTooltipText = this.config.copiedTooltip;
|
|
445
|
-
this.copyTooltip.show();
|
|
446
|
-
});
|
|
462
|
+
/** @deprecated Will be removed in next major release, use `files` instead. */
|
|
463
|
+
set codeFiles(files) {
|
|
464
|
+
this.files = files;
|
|
447
465
|
}
|
|
448
|
-
|
|
449
|
-
|
|
466
|
+
/**
|
|
467
|
+
* @TODO Mark as `required`, after removing `codeFiles`
|
|
468
|
+
*
|
|
469
|
+
* Files to display.
|
|
470
|
+
*/
|
|
471
|
+
set files(files) {
|
|
472
|
+
this._files = files;
|
|
473
|
+
if (this._files.length < this.activeFileIndex) {
|
|
474
|
+
this.onSelectedTabChange(0);
|
|
475
|
+
}
|
|
476
|
+
if (this._files.length === 1 && !this._files[0].filename) {
|
|
477
|
+
this.hideTabs = true;
|
|
478
|
+
}
|
|
450
479
|
}
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
}
|
|
454
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqActionBarComponent, decorators: [{
|
|
455
|
-
type: Component,
|
|
456
|
-
args: [{ selector: 'kbq-actionbar-block', host: {
|
|
457
|
-
class: 'kbq-code-block-actionbar'
|
|
458
|
-
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kbq-code-block__fade-gradient\"></div>\n\n<div class=\"kbq-actionbar-block__button-stack layout-row\">\n @if (multiLine) {\n <button\n kbq-button\n [color]=\"'contrast'\"\n [kbqStyle]=\"'transparent'\"\n [kbqTooltip]=\"softWrap ? config.softWrapOffTooltip : config.softWrapOnTooltip\"\n (click)=\"toggleSoftWrap.emit()\"\n >\n @if (!softWrap) {\n <i kbq-icon=\"kbq-wrap-text_16\"></i>\n }\n @if (softWrap) {\n <i kbq-icon=\"kbq-wrap-text-slash_16\"></i>\n }\n </button>\n }\n\n @if (canLoad) {\n <button\n kbq-button\n [color]=\"'contrast'\"\n [kbqStyle]=\"'transparent'\"\n [kbqTooltip]=\"config.downloadTooltip\"\n (click)=\"downloadCode.emit()\"\n >\n <i kbq-icon=\"kbq-arrow-down-to-line_16\"></i>\n </button>\n }\n\n <button\n #copyTooltip=\"kbqTooltip\"\n kbq-button\n [color]=\"'contrast'\"\n [kbqStyle]=\"'transparent'\"\n [kbqTooltip]=\"copyTooltipText\"\n (click)=\"onCopy()\"\n >\n <i kbq-icon=\"kbq-file-multiple-o_16\"></i>\n </button>\n\n @if (codeFiles[selectedTabIndex].link) {\n <button\n kbq-button\n [color]=\"'contrast'\"\n [kbqStyle]=\"'transparent'\"\n [kbqTooltip]=\"config.openExternalSystemTooltip\"\n (click)=\"openExternalSystem.emit()\"\n >\n <i kbq-icon=\"kbq-arrow-up-right-from-square_16\"></i>\n </button>\n }\n</div>\n", styles: [".kbq-code-block-actionbar{display:flex;justify-content:right;align-items:center;position:absolute;top:-48px;right:0;margin:var(--kbq-code-block-size-actionbar-padding-vertical) var(--kbq-code-block-size-actionbar-padding-horizontal)}.kbq-code-block-actionbar .kbq-actionbar-block__button-stack{gap:var(--kbq-code-block-size-actionbar-content-gap-horizontal)}.kbq-code-block-actionbar .kbq-code-block__fade-gradient{display:none;width:var(--kbq-code-block-size-actionbar-fade-gradient-width)}.kbq-code-block-actionbar.kbq-actionbar-block_floating{top:0;margin:unset;background:transparent!important}.kbq-code-block-actionbar.kbq-actionbar-block_floating .kbq-code-block__fade-gradient{display:block;align-self:stretch}.kbq-code-block-actionbar.kbq-actionbar-block_floating .kbq-actionbar-block__button-stack{padding:var(--kbq-code-block-size-actionbar-padding-vertical) var(--kbq-code-block-size-actionbar-padding-horizontal)}\n"] }]
|
|
459
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
460
|
-
type: Optional
|
|
461
|
-
}, {
|
|
462
|
-
type: Inject,
|
|
463
|
-
args: [KBQ_CODE_BLOCK_CONFIGURATION]
|
|
464
|
-
}] }, { type: i4.KbqLocaleService, decorators: [{
|
|
465
|
-
type: Optional
|
|
466
|
-
}, {
|
|
467
|
-
type: Inject,
|
|
468
|
-
args: [KBQ_LOCALE_SERVICE]
|
|
469
|
-
}] }], propDecorators: { copyTooltip: [{
|
|
470
|
-
type: ViewChild,
|
|
471
|
-
args: ['copyTooltip']
|
|
472
|
-
}], codeFiles: [{
|
|
473
|
-
type: Input
|
|
474
|
-
}], selectedTabIndex: [{
|
|
475
|
-
type: Input
|
|
476
|
-
}], multiLine: [{
|
|
477
|
-
type: Input
|
|
478
|
-
}], softWrap: [{
|
|
479
|
-
type: Input
|
|
480
|
-
}], canLoad: [{
|
|
481
|
-
type: Input
|
|
482
|
-
}], toggleSoftWrap: [{
|
|
483
|
-
type: Output
|
|
484
|
-
}], downloadCode: [{
|
|
485
|
-
type: Output
|
|
486
|
-
}], copyCode: [{
|
|
487
|
-
type: Output
|
|
488
|
-
}], openExternalSystem: [{
|
|
489
|
-
type: Output
|
|
490
|
-
}] } });
|
|
491
|
-
|
|
492
|
-
const COPIED_MESSAGE_TOOLTIP_TIMEOUT = 100;
|
|
493
|
-
const DEFAULT_EXTENSION = 'txt';
|
|
494
|
-
const LANGUAGES_EXTENSIONS = {
|
|
495
|
-
html: 'html',
|
|
496
|
-
css: 'css',
|
|
497
|
-
php: 'php',
|
|
498
|
-
java: 'java',
|
|
499
|
-
bash: 'sh',
|
|
500
|
-
javascript: 'js',
|
|
501
|
-
typescript: 'ts',
|
|
502
|
-
python: 'py',
|
|
503
|
-
ruby: 'rb',
|
|
504
|
-
c: 'c',
|
|
505
|
-
'c++': 'cpp',
|
|
506
|
-
'c#': 'cs',
|
|
507
|
-
csharp: 'cs',
|
|
508
|
-
lua: 'lua',
|
|
509
|
-
xml: 'xml',
|
|
510
|
-
json: 'json'
|
|
511
|
-
};
|
|
512
|
-
const actionBarBlockLeftMargin = 24;
|
|
513
|
-
const hasScroll = (element) => {
|
|
514
|
-
const { scrollHeight, scrollWidth, clientHeight, clientWidth } = element;
|
|
515
|
-
return scrollHeight > clientHeight || scrollWidth > clientWidth;
|
|
516
|
-
};
|
|
517
|
-
class KbqCodeBlockComponent {
|
|
518
|
-
get codeFiles() {
|
|
519
|
-
return this._codeFiles;
|
|
480
|
+
get files() {
|
|
481
|
+
return this._files;
|
|
520
482
|
}
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
483
|
+
/**
|
|
484
|
+
* Whether to hide header tabs.
|
|
485
|
+
* Always `true` if there is only one file without filename.
|
|
486
|
+
* Makes actionbar floating if tabs are hidden.
|
|
487
|
+
*/
|
|
488
|
+
set hideTabs(value) {
|
|
489
|
+
this._hideTabs = value;
|
|
490
|
+
this.setupActionbarDisplay();
|
|
525
491
|
}
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
return this.codeFiles.length === 1 && !this.codeFiles[0].filename;
|
|
492
|
+
get hideTabs() {
|
|
493
|
+
return this._hideTabs;
|
|
529
494
|
}
|
|
530
|
-
|
|
531
|
-
|
|
495
|
+
/** Component locale configuration. */
|
|
496
|
+
get localeConfiguration() {
|
|
497
|
+
return this._localeConfiguration;
|
|
532
498
|
}
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
this.
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
499
|
+
/** Code content tab index. */
|
|
500
|
+
get codeContentTabIndex() {
|
|
501
|
+
return this.canCodeContentBeFocused ? 0 : -1;
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Determines whether the code content can be focused.
|
|
505
|
+
*
|
|
506
|
+
* This checks if the scrollable code content element is present,
|
|
507
|
+
* has a scroll, and the calculated maximum height is not set.
|
|
508
|
+
*/
|
|
509
|
+
get canCodeContentBeFocused() {
|
|
510
|
+
const element = this.scrollableCodeContent?.getElementRef().nativeElement;
|
|
511
|
+
return element && this.hasScroll(element) && !this.calculatedMaxHeight;
|
|
512
|
+
}
|
|
513
|
+
constructor() {
|
|
514
|
+
/** Whether to display line numbers. */
|
|
515
|
+
this.lineNumbers = false;
|
|
516
|
+
/** Whether the code block should be filled. */
|
|
517
|
+
this.filled = false;
|
|
518
|
+
/** Added soft wrap toggle button. */
|
|
519
|
+
this.canToggleSoftWrap = false;
|
|
520
|
+
/** Whether sequences of whitespace should be preserved. */
|
|
543
521
|
this.softWrap = false;
|
|
544
|
-
|
|
545
|
-
this.
|
|
546
|
-
|
|
522
|
+
/** Event emitted when `softWrap` is changed. */
|
|
523
|
+
this.softWrapChange = new EventEmitter();
|
|
524
|
+
/**
|
|
525
|
+
* Allows to view all the code, otherwise it will be hidden.
|
|
526
|
+
* Works only with `maxHeight` property.
|
|
527
|
+
*/
|
|
547
528
|
this.viewAll = false;
|
|
548
|
-
|
|
549
|
-
this.
|
|
550
|
-
|
|
551
|
-
this.
|
|
552
|
-
|
|
553
|
-
this.
|
|
554
|
-
this.
|
|
555
|
-
|
|
556
|
-
this.
|
|
557
|
-
this.
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
529
|
+
/** Event emitted when `viewAll` is changed. */
|
|
530
|
+
this.viewAllChange = new EventEmitter();
|
|
531
|
+
/** Added download code button. */
|
|
532
|
+
this.canDownload = false;
|
|
533
|
+
/** Added copy code button. */
|
|
534
|
+
this.canCopy = true;
|
|
535
|
+
this._files = [];
|
|
536
|
+
/** Defines which file (index) is active. */
|
|
537
|
+
this.activeFileIndex = 0;
|
|
538
|
+
this.activeFileIndexChange = new EventEmitter();
|
|
539
|
+
/** Whether to hide border. */
|
|
540
|
+
this.noBorder = false;
|
|
541
|
+
this._hideTabs = false;
|
|
542
|
+
this._localeConfiguration = inject(KBQ_CODE_BLOCK_LOCALE_CONFIGURATION);
|
|
543
|
+
this.componentColor = KbqComponentColors;
|
|
544
|
+
this.buttonStyle = KbqButtonStyles;
|
|
545
|
+
this.elementRef = inject(ElementRef);
|
|
546
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
547
|
+
this.localeService = inject(KBQ_LOCALE_SERVICE, { optional: true });
|
|
548
|
+
this.destroyRef = inject(DestroyRef);
|
|
549
|
+
this.renderer = inject(Renderer2);
|
|
550
|
+
this.platform = inject(Platform);
|
|
551
|
+
this.focusMonitor = inject(FocusMonitor);
|
|
552
|
+
this.clipboard = inject(Clipboard);
|
|
553
|
+
this.domSanitizer = inject(DomSanitizer);
|
|
554
|
+
this.document = inject(DOCUMENT);
|
|
555
|
+
this.fallbackFileName = inject(KBQ_CODE_BLOCK_FALLBACK_FILE_NAME);
|
|
562
556
|
this.updateLocaleParams = () => {
|
|
563
|
-
this.
|
|
564
|
-
this.changeDetectorRef.markForCheck();
|
|
565
|
-
};
|
|
566
|
-
this.updateMultiline = () => {
|
|
567
|
-
this.multiLine = this.elementRef.nativeElement.querySelectorAll('.hljs-ln-numbers').length > 1;
|
|
568
|
-
this.updateHeader();
|
|
557
|
+
this._localeConfiguration = this.localeService?.getParams('codeBlock');
|
|
569
558
|
this.changeDetectorRef.markForCheck();
|
|
570
559
|
};
|
|
571
560
|
this.localeService?.changes.pipe(takeUntilDestroyed()).subscribe(this.updateLocaleParams);
|
|
572
|
-
if (!this.localeService) {
|
|
573
|
-
this.initDefaultParams();
|
|
574
|
-
}
|
|
575
|
-
this.resizeSubscription = this.resizeStream
|
|
576
|
-
.pipe(debounceTime(this.resizeDebounceInterval))
|
|
577
|
-
.subscribe(this.updateHeader);
|
|
578
561
|
}
|
|
579
562
|
ngAfterViewInit() {
|
|
580
|
-
|
|
581
|
-
this.
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
563
|
+
this.handleScroll();
|
|
564
|
+
this.handleHover();
|
|
565
|
+
// Setup initial actionbar display state
|
|
566
|
+
this.setupActionbarDisplay();
|
|
567
|
+
this.copyButtonTooltip?.visibleChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((isVisible) => {
|
|
568
|
+
if (isVisible) {
|
|
569
|
+
this.copyButtonTooltip.content = this.localeConfiguration.copyTooltip;
|
|
585
570
|
}
|
|
586
|
-
return this.focusMonitor.monitor(current);
|
|
587
|
-
}), filter((origin) => origin === 'keyboard'))
|
|
588
|
-
.subscribe(() => {
|
|
589
|
-
this.hasKeyboardFocus = true;
|
|
590
|
-
this.changeDetectorRef.markForCheck();
|
|
591
571
|
});
|
|
592
|
-
this.hideActionBarIfNoHeader();
|
|
593
|
-
this.subscribeToHover();
|
|
594
|
-
this.currentCodeBlock.next(this.elementRef.nativeElement.querySelector('code'));
|
|
595
|
-
}
|
|
596
|
-
ngOnDestroy() {
|
|
597
|
-
this.resizeSubscription.unsubscribe();
|
|
598
|
-
this.codeBlockSubscription.unsubscribe();
|
|
599
|
-
}
|
|
600
|
-
toggleSoftWrap() {
|
|
601
|
-
this.softWrap = !this.softWrap;
|
|
602
572
|
}
|
|
573
|
+
/**
|
|
574
|
+
* Toggles the `viewAll` property.
|
|
575
|
+
*
|
|
576
|
+
* When `viewAll` is set to `true`, the content of the code block will be
|
|
577
|
+
* displayed in its entirety. When set to `false`, the content will be
|
|
578
|
+
* limited to the `maxHeight` property. If the content exceeds the
|
|
579
|
+
* `maxHeight`, it will be scrolled to the top and the `viewAll` button
|
|
580
|
+
* will be displayed.
|
|
581
|
+
*/
|
|
603
582
|
toggleViewAll() {
|
|
604
583
|
this.viewAll = !this.viewAll;
|
|
584
|
+
if (!this.viewAll) {
|
|
585
|
+
this.scrollableCodeContent.scrollTo({ top: 0, behavior: 'instant' });
|
|
586
|
+
}
|
|
587
|
+
this.viewAllChange.emit(this.viewAll);
|
|
605
588
|
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
this.clipboard.copy(this.codeFiles[this.selectedTabIndex].content);
|
|
617
|
-
this.copied = true;
|
|
618
|
-
}
|
|
619
|
-
openExternalSystem() {
|
|
620
|
-
const externalLink = this.codeFiles[this.selectedTabIndex].link;
|
|
621
|
-
this.getWindow()?.open(externalLink, '_blank');
|
|
622
|
-
}
|
|
623
|
-
onHighlighted() {
|
|
624
|
-
setTimeout(this.updateMultiline, 1);
|
|
589
|
+
/**
|
|
590
|
+
* Toggles `softWrap` property.
|
|
591
|
+
*
|
|
592
|
+
* When `softWrap` is set to `true`, the content of the code block will be
|
|
593
|
+
* wrapped if it exceeds the height of the component. When set to `false`
|
|
594
|
+
* the content will not be wrapped.
|
|
595
|
+
*/
|
|
596
|
+
toggleSoftWrap() {
|
|
597
|
+
this.softWrap = !this.softWrap;
|
|
598
|
+
this.softWrapChange.emit(this.softWrap);
|
|
625
599
|
}
|
|
626
|
-
|
|
627
|
-
|
|
600
|
+
/**
|
|
601
|
+
* Handles the change of the selected tab by updating the active file index
|
|
602
|
+
* and scrolling to the top of the scrollable content.
|
|
603
|
+
*
|
|
604
|
+
* @param index - The index of the newly selected tab.
|
|
605
|
+
*/
|
|
606
|
+
onSelectedTabChange(index) {
|
|
607
|
+
if (this.activeFileIndex !== index) {
|
|
608
|
+
this.activeFileIndex = index;
|
|
609
|
+
this.activeFileIndexChange.emit(this.activeFileIndex);
|
|
610
|
+
this.scrollableCodeContent.scrollTo({ top: 0, behavior: 'instant' });
|
|
611
|
+
}
|
|
628
612
|
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
613
|
+
/**
|
|
614
|
+
* Handles the hover event on the code block element and updates the actionbar display accordingly.
|
|
615
|
+
*/
|
|
616
|
+
handleHover() {
|
|
617
|
+
merge(fromEvent(this.elementRef.nativeElement, 'mouseenter'), fromEvent(this.elementRef.nativeElement, 'mouseleave'))
|
|
618
|
+
.pipe(debounceTime(100), takeUntilDestroyed(this.destroyRef))
|
|
619
|
+
.subscribe((event) => {
|
|
620
|
+
this.setupActionbarDisplay(event?.type === 'mouseenter');
|
|
621
|
+
});
|
|
635
622
|
}
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
this.
|
|
623
|
+
/**
|
|
624
|
+
* Handles the scroll event on the scrollable code content element and updates the header shadow accordingly.
|
|
625
|
+
*/
|
|
626
|
+
handleScroll() {
|
|
627
|
+
this.scrollableCodeContent
|
|
628
|
+
.elementScrolled()
|
|
629
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
630
|
+
.subscribe(() => {
|
|
631
|
+
this.setupHeaderShadow(this.scrollableCodeContent.measureScrollOffset('top') > 0);
|
|
632
|
+
});
|
|
641
633
|
}
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
634
|
+
/**
|
|
635
|
+
* Adds or removes the shadow class from the code block based on the specified condition.
|
|
636
|
+
*
|
|
637
|
+
* @param shouldShowShadow - A boolean indicating whether to add or remove the shadow class.
|
|
638
|
+
*/
|
|
639
|
+
setupHeaderShadow(shouldShowShadow) {
|
|
640
|
+
const className = 'kbq-code-block_header-with-shadow';
|
|
641
|
+
if (shouldShowShadow) {
|
|
642
|
+
this.renderer.addClass(this.elementRef.nativeElement, className);
|
|
646
643
|
}
|
|
647
644
|
else {
|
|
648
|
-
|
|
649
|
-
currentCodeContentElement?.scroll({ top: 0, behavior: 'instant' });
|
|
645
|
+
this.renderer.removeClass(this.elementRef.nativeElement, className);
|
|
650
646
|
}
|
|
651
647
|
}
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
}
|
|
666
|
-
/** @docs-private */
|
|
667
|
-
showActionBarIfNecessary() {
|
|
668
|
-
if (!this.actionbarHidden)
|
|
648
|
+
/**
|
|
649
|
+
* Adds or removes the actionbar display class from the code block based on the specified condition.
|
|
650
|
+
*
|
|
651
|
+
* The actionbar is always visible on mobile devices and when the tabs are visible.
|
|
652
|
+
* Otherwise, the actionbar is only visible when the mouse is hovered over the code block.
|
|
653
|
+
*
|
|
654
|
+
* @param shouldShowActionbar - A boolean indicating whether the actionbar should be visible.
|
|
655
|
+
*/
|
|
656
|
+
setupActionbarDisplay(shouldShowActionbar) {
|
|
657
|
+
const className = 'kbq-code-block_show-actionbar';
|
|
658
|
+
// Should always show actionbar on Mobile devices
|
|
659
|
+
if (this.platform.IOS || this.platform.ANDROID) {
|
|
660
|
+
this.renderer.addClass(this.elementRef.nativeElement, className);
|
|
669
661
|
return;
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
if (!this.noHeader)
|
|
662
|
+
}
|
|
663
|
+
// Should always show actionbar when tabs are visible
|
|
664
|
+
if (!this.hideTabs) {
|
|
665
|
+
this.renderer.addClass(this.elementRef.nativeElement, className);
|
|
675
666
|
return;
|
|
676
|
-
|
|
677
|
-
|
|
667
|
+
}
|
|
668
|
+
if (typeof shouldShowActionbar === 'undefined') {
|
|
678
669
|
return;
|
|
679
670
|
}
|
|
680
|
-
|
|
671
|
+
if (shouldShowActionbar) {
|
|
672
|
+
this.renderer.addClass(this.elementRef.nativeElement, className);
|
|
673
|
+
}
|
|
674
|
+
else {
|
|
675
|
+
this.renderer.removeClass(this.elementRef.nativeElement, className);
|
|
676
|
+
}
|
|
681
677
|
}
|
|
682
|
-
|
|
683
|
-
|
|
678
|
+
/** Whether the element has scroll. */
|
|
679
|
+
hasScroll({ scrollHeight, scrollWidth, clientHeight, clientWidth }) {
|
|
680
|
+
return scrollHeight > clientHeight || scrollWidth > clientWidth;
|
|
684
681
|
}
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
682
|
+
/** Handles the enter keydown event on `viewAll` button. */
|
|
683
|
+
onViewAllEnterKeydown() {
|
|
684
|
+
this.toggleViewAll();
|
|
685
|
+
if (this.canCodeContentBeFocused) {
|
|
686
|
+
this.focusMonitor.focusVia(this.scrollableCodeContent.getElementRef().nativeElement, 'keyboard');
|
|
687
|
+
}
|
|
689
688
|
}
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
689
|
+
/**
|
|
690
|
+
* Copies the file code to the clipboard.
|
|
691
|
+
*
|
|
692
|
+
* If the copy was successful, the copy button tooltip content is updated
|
|
693
|
+
* to show the "copied" message.
|
|
694
|
+
*/
|
|
695
|
+
copyCode() {
|
|
696
|
+
const file = this.files[this.activeFileIndex];
|
|
697
|
+
if (this.clipboard.copy(file.content) && this.copyButtonTooltip) {
|
|
698
|
+
this.copyButtonTooltip.content = this.localeConfiguration.copiedTooltip;
|
|
695
699
|
}
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
const
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
700
|
+
}
|
|
701
|
+
/**
|
|
702
|
+
* Opens the file link in a new window.
|
|
703
|
+
*/
|
|
704
|
+
openLink() {
|
|
705
|
+
const window = this.getWindow();
|
|
706
|
+
const file = this.files[this.activeFileIndex];
|
|
707
|
+
const safeURL = this.domSanitizer.sanitize(SecurityContext.URL, file.link);
|
|
708
|
+
if (safeURL) {
|
|
709
|
+
window?.open(safeURL.toString(), '_blank');
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* Downloads the file as a blob.
|
|
714
|
+
*
|
|
715
|
+
* Creates a link with a blob as href and the file name as download attribute.
|
|
716
|
+
* Then simulates a click event on the link to initiate the download.
|
|
717
|
+
*/
|
|
718
|
+
downloadCode() {
|
|
719
|
+
const file = this.files[this.activeFileIndex];
|
|
720
|
+
const blob = new Blob([file.content], { type: 'text/plain' });
|
|
721
|
+
const url = URL.createObjectURL(blob);
|
|
722
|
+
const link = this.document.createElement('a');
|
|
723
|
+
link.setAttribute('href', url);
|
|
724
|
+
link.setAttribute('download', file.filename || this.fallbackFileName);
|
|
725
|
+
link.click();
|
|
709
726
|
}
|
|
710
727
|
/** Use defaultView of injected document if available or fallback to global window reference */
|
|
711
728
|
getWindow() {
|
|
712
729
|
return this.document?.defaultView || window;
|
|
713
730
|
}
|
|
714
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type:
|
|
715
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: KbqCodeBlockComponent, selector: "kbq-code-block", inputs: { lineNumbers: "lineNumbers", filled: "filled", maxHeight: "maxHeight", softWrap: "softWrap", canLoad: "canLoad", codeFiles: "codeFiles" }, host: { listeners: { "window:resize": "resizeStream.next($event)" }, properties: { "class.kbq-code-block_filled": "filled", "class.kbq-code-block_outline": "!filled", "class.kbq-code-block_hide-line-numbers": "!lineNumbers", "class.kbq-code-block_single-file": "singleFile", "class.kbq-code-block_no-header": "noHeader", "class.kbq-code-block_header-with-shadow": "isTopOverflow" }, classAttribute: "kbq-code-block" }, viewQueries: [{ propertyName: "tabGroup", first: true, predicate: KbqTabGroup, descendants: true }], exportAs: ["kbqCodeBlock"], ngImport: i0, template: "<kbq-tab-group [class.kbq-focused]=\"hasKeyboardFocus\" (selectedTabChange)=\"onSelectTab($event)\">\n @for (codeFile of codeFiles; track codeFile; let i = $index) {\n <kbq-tab [disabled]=\"singleFile\">\n <ng-template kbq-tab-label>{{ codeFile.filename }}</ng-template>\n <pre\n #codeContent\n class=\"kbq-code-block__code kbq-scrollbar\"\n [class.kbq-code-block__code_soft-wrap]=\"softWrap\"\n [class.kbq-code-block__code_view-all]=\"viewAll\"\n [style.max-height]=\"getMaxHeight()\"\n (scroll)=\"checkOverflow(codeContent)\"\n ><kbq-actionbar-block\n [canLoad]=\"canLoad\"\n [class.kbq-actionbar-block_floating]=\"noHeader\"\n [codeFiles]=\"codeFiles\"\n [multiLine]=\"multiLine\"\n [selectedTabIndex]=\"selectedTabIndex\"\n [softWrap]=\"softWrap\"\n [style.opacity]=\"actionbarHidden ? 0 : null\"\n (copyCode)=\"copyCode()\"\n (downloadCode)=\"downloadCode()\"\n (openExternalSystem)=\"openExternalSystem()\"\n (toggleSoftWrap)=\"toggleSoftWrap()\"\n /><code\n kbqCodeBlockContent\n [file]=\"codeFiles[selectedTabIndex]\"\n [tabIndex]=\"canShowFocus(codeContent) ? 0 : -1\"\n (blur)=\"hasKeyboardFocus = false\"\n ></code></pre>\n @if (maxHeight) {\n <div\n class=\"kbq-code-block__show-more\"\n [class.kbq-code-block__show-more_collapsed]=\"!viewAll\"\n [class.kbq-code-block__show-more_expanded]=\"viewAll\"\n >\n <span class=\"bg-wrapper\">\n <button\n kbq-button\n [color]=\"'theme'\"\n [kbqStyle]=\"'transparent'\"\n (click)=\"onShowMoreClick(codeContent)\"\n (keydown.enter)=\"onEnter(codeContent)\"\n >\n @if (!viewAll) {\n <i kbq-icon=\"kbq-chevron-down_16\"></i>\n }\n @if (viewAll) {\n <i kbq-icon=\"kbq-chevron-up_16\"></i>\n }\n {{ viewAll ? config.viewLessText : config.viewAllText }}\n </button>\n </span>\n </div>\n }\n </kbq-tab>\n }\n</kbq-tab-group>\n", styles: [".kbq-code-block{display:block;position:relative;overflow:hidden;box-sizing:border-box;hyphens:none;-ms-hyphens:none;-moz-hyphens:none;-webkit-hyphens:none;border-radius:var(--kbq-code-block-size-container-border-radius);border-width:0}.kbq-code-block .kbq-tab-header{padding:calc(var(--kbq-code-block-size-header-padding-vertical) - var(--kbq-code-block-size-container-border-width)) calc(var(--kbq-code-block-size-header-padding-right) + 152px) var(--kbq-code-block-size-header-padding-vertical) var(--kbq-code-block-size-header-padding-left);border-width:var(--kbq-code-block-size-container-border-width) var(--kbq-code-block-size-container-border-width) 0 var(--kbq-code-block-size-container-border-width);border-style:solid;border-radius:var(--kbq-code-block-size-container-border-radius) var(--kbq-code-block-size-container-border-radius) 0 0}.kbq-code-block:has(.kbq-code-block__show-more) .kbq-code-block__code>code{padding-bottom:var(--kbq-size-3xl)!important;overflow-x:scroll}.kbq-code-block:has(.kbq-code-block__show-more):has(.kbq-code-block__show-more_collapsed) .kbq-code-block__code>code{overflow-x:hidden}.kbq-code-block .kbq-code-block__code>code{padding:var(--kbq-code-block-size-with-header-content-padding-top) var(--kbq-code-block-size-with-header-content-padding-horizontal) var(--kbq-code-block-size-with-header-content-padding-bottom) var(--kbq-code-block-size-with-header-content-padding-horizontal);border-radius:var(--kbq-code-block-size-container-border-radius)}.kbq-code-block .kbq-code-block__code>code:focus-visible{outline:none}.kbq-code-block .kbq-code-block__code .hljs-ln-numbers{padding-right:var(--kbq-code-block-size-with-header-content-content-gap-horizontal)}.kbq-code-block.kbq-code-block_hide-line-numbers .hljs-ln-line.hljs-ln-numbers{display:none}.kbq-code-block.kbq-code-block_single-file .kbq-tab-label:before{content:none}.kbq-code-block.kbq-code-block_single-file .kbq-tab-label:hover{background:transparent!important}.kbq-code-block:not(.kbq-code-block_no-header) .kbq-tab-body__wrapper{border-top-width:0;overflow:visible}.kbq-code-block.kbq-code-block_no-header .kbq-tab-header{display:none}.kbq-code-block.kbq-code-block_no-header .kbq-tab-body__wrapper{border-width:var(--kbq-code-block-size-container-border-width);border-radius:var(--kbq-code-block-size-container-border-radius)}.kbq-code-block.kbq-code-block_no-header .kbq-code-block__code{position:relative}.kbq-code-block.kbq-code-block_no-header .kbq-code-block__code>code{padding:var(--kbq-code-block-size-no-header-content-padding-vertical) var(--kbq-code-block-size-no-header-content-padding-horizontal)}.kbq-code-block.kbq-code-block_no-header .kbq-code-block__code .hljs-ln-numbers{padding-right:var(--kbq-code-block-size-no-header-content-content-gap-horizontal)}.kbq-code-block:not(:has(.kbq-code-block__show-more)) .kbq-code-block__code{overflow-y:auto}.kbq-code-block pre{margin:0}.kbq-code-block .kbq-tab-body__wrapper{flex-direction:column;border-width:var(--kbq-code-block-size-container-border-width);border-style:solid;border-radius:0 0 var(--kbq-code-block-size-container-border-radius) var(--kbq-code-block-size-container-border-radius)}.kbq-code-block .kbq-tab-body.kbq-tab-body__active{position:unset}.kbq-code-block__code{overflow-y:hidden}.kbq-code-block__code.kbq-code-block__code_view-all{max-height:unset;overflow-y:auto}.kbq-code-block__code.kbq-code-block__code_soft-wrap{white-space:pre-wrap}.kbq-code-block__code .hljs-ln{border-collapse:unset}.kbq-code-block__code .hljs-ln .hljs{padding:0}.kbq-code-block__code .hljs-ln-numbers{vertical-align:baseline;text-align:right}.kbq-code-block__code .hljs-ln-n:before{white-space:nowrap}.kbq-code-block__show-more{display:flex;justify-content:center;width:100%;position:absolute;bottom:0;border-radius:var(--kbq-code-block-size-container-border-radius)}.kbq-code-block__show-more.kbq-code-block__show-more_collapsed{padding-top:var(--kbq-code-block-size-collapse-collapsed-padding-top);padding-bottom:var(--kbq-code-block-size-collapse-collapsed-padding-bottom)}.kbq-code-block__show-more.kbq-code-block__show-more_expanded{padding-top:var(--kbq-code-block-size-collapse-expanded-padding-top);margin-bottom:var(--kbq-code-block-size-collapse-expanded-padding-bottom)}.kbq-code-block__show-more .bg-wrapper{border-radius:var(--kbq-size-border-radius)}.kbq-code-block .hljs{display:block;overflow-x:auto}.kbq-code-block .hljs-addition{background-color:var(--kbq-code-block-hljs-addition-background);color:var(--kbq-code-block-hljs-addition-color)}.kbq-code-block .hljs-attr{background-color:var(--kbq-code-block-hljs-attr-background);color:var(--kbq-code-block-hljs-attr-color)}.kbq-code-block .hljs-attribute{background-color:var(--kbq-code-block-hljs-attribute-background);color:var(--kbq-code-block-hljs-attribute-color)}.kbq-code-block .hljs-built_in{background-color:var(--kbq-code-block-hljs-built_in-background);color:var(--kbq-code-block-hljs-built_in-color)}.kbq-code-block .hljs-bullet{background-color:var(--kbq-code-block-hljs-bullet-background);color:var(--kbq-code-block-hljs-bullet-color)}.kbq-code-block .hljs-char-escape{background-color:var(--kbq-code-block-hljs-char-escape-background);color:var(--kbq-code-block-hljs-char-escape-color)}.kbq-code-block .hljs-class{background-color:var(--kbq-code-block-hljs-class-background);color:var(--kbq-code-block-hljs-class-color)}.kbq-code-block .hljs-code{background-color:var(--kbq-code-block-hljs-code-background);color:var(--kbq-code-block-hljs-code-color)}.kbq-code-block .hljs-comment{background-color:var(--kbq-code-block-hljs-comment-background);color:var(--kbq-code-block-hljs-comment-color)}.kbq-code-block .hljs-deletion{background-color:var(--kbq-code-block-hljs-deletion-background);color:var(--kbq-code-block-hljs-deletion-color)}.kbq-code-block .hljs-doctag{background-color:var(--kbq-code-block-hljs-doctag-background);color:var(--kbq-code-block-hljs-doctag-color)}.kbq-code-block .hljs-emphasis{background-color:var(--kbq-code-block-hljs-emphasis-background);color:var(--kbq-code-block-hljs-emphasis-color)}.kbq-code-block .hljs-formula{background-color:var(--kbq-code-block-hljs-formula-background);color:var(--kbq-code-block-hljs-formula-color)}.kbq-code-block .hljs-function{background-color:var(--kbq-code-block-hljs-function-background);color:var(--kbq-code-block-hljs-function-color)}.kbq-code-block .hljs-keyword{background-color:var(--kbq-code-block-hljs-keyword-background);color:var(--kbq-code-block-hljs-keyword-color)}.kbq-code-block .hljs-link{background-color:var(--kbq-code-block-hljs-link-background);color:var(--kbq-code-block-hljs-link-color)}.kbq-code-block .hljs-literal{background-color:var(--kbq-code-block-hljs-literal-background);color:var(--kbq-code-block-hljs-literal-color)}.kbq-code-block .hljs-meta{background-color:var(--kbq-code-block-hljs-meta-background);color:var(--kbq-code-block-hljs-meta-color)}.kbq-code-block .hljs-meta-keyword{background-color:var(--kbq-code-block-hljs-meta-keyword-background);color:var(--kbq-code-block-hljs-meta-keyword-color)}.kbq-code-block .hljs-meta-string{background-color:var(--kbq-code-block-hljs-meta-string-background);color:var(--kbq-code-block-hljs-meta-string-color)}.kbq-code-block .hljs-meta-prompt{background-color:var(--kbq-code-block-hljs-meta-prompt-background);color:var(--kbq-code-block-hljs-meta-prompt-color)}.kbq-code-block .hljs-name{background-color:var(--kbq-code-block-hljs-name-background);color:var(--kbq-code-block-hljs-name-color)}.kbq-code-block .hljs-number{background-color:var(--kbq-code-block-hljs-number-background);color:var(--kbq-code-block-hljs-number-color)}.kbq-code-block .hljs-operator{background-color:var(--kbq-code-block-hljs-operator-background);color:var(--kbq-code-block-hljs-operator-color)}.kbq-code-block .hljs-params{background-color:var(--kbq-code-block-hljs-params-background);color:var(--kbq-code-block-hljs-params-color)}.kbq-code-block .hljs-property{background-color:var(--kbq-code-block-hljs-property-background);color:var(--kbq-code-block-hljs-property-color)}.kbq-code-block .hljs-punctuation{background-color:var(--kbq-code-block-hljs-punctuation-background);color:var(--kbq-code-block-hljs-punctuation-color)}.kbq-code-block .hljs-quote{background-color:var(--kbq-code-block-hljs-quote-background);color:var(--kbq-code-block-hljs-quote-color)}.kbq-code-block .hljs-regexp{background-color:var(--kbq-code-block-hljs-regexp-background);color:var(--kbq-code-block-hljs-regexp-color)}.kbq-code-block .hljs-section{background-color:var(--kbq-code-block-hljs-section-background);color:var(--kbq-code-block-hljs-section-color)}.kbq-code-block .hljs-selector-attr{background-color:var(--kbq-code-block-hljs-selector-attr-background);color:var(--kbq-code-block-hljs-selector-attr-color)}.kbq-code-block .hljs-selector-class{background-color:var(--kbq-code-block-hljs-selector-class-background);color:var(--kbq-code-block-hljs-selector-class-color)}.kbq-code-block .hljs-selector-id{background-color:var(--kbq-code-block-hljs-selector-id-background);color:var(--kbq-code-block-hljs-selector-id-color)}.kbq-code-block .hljs-selector-pseudo{background-color:var(--kbq-code-block-hljs-selector-pseudo-background);color:var(--kbq-code-block-hljs-selector-pseudo-color)}.kbq-code-block .hljs-selector-tag{background-color:var(--kbq-code-block-hljs-selector-tag-background);color:var(--kbq-code-block-hljs-selector-tag-color)}.kbq-code-block .hljs-string{background-color:var(--kbq-code-block-hljs-string-background);color:var(--kbq-code-block-hljs-string-color)}.kbq-code-block .hljs-strong{background-color:var(--kbq-code-block-hljs-strong-background);color:var(--kbq-code-block-hljs-strong-color)}.kbq-code-block .hljs-subst{background-color:var(--kbq-code-block-hljs-subst-background);color:var(--kbq-code-block-hljs-subst-color)}.kbq-code-block .hljs-symbol{background-color:var(--kbq-code-block-hljs-symbol-background);color:var(--kbq-code-block-hljs-symbol-color)}.kbq-code-block .hljs-tag{background-color:var(--kbq-code-block-hljs-tag-background);color:var(--kbq-code-block-hljs-tag-color)}.kbq-code-block .hljs-template-tag{background-color:var(--kbq-code-block-hljs-template-tag-background);color:var(--kbq-code-block-hljs-template-tag-color)}.kbq-code-block .hljs-template-variable{background-color:var(--kbq-code-block-hljs-template-variable-background);color:var(--kbq-code-block-hljs-template-variable-color)}.kbq-code-block .hljs-title{background-color:var(--kbq-code-block-hljs-title-background);color:var(--kbq-code-block-hljs-title-color)}.kbq-code-block .hljs-title-class{background-color:var(--kbq-code-block-hljs-title-class-background);color:var(--kbq-code-block-hljs-title-class-color)}.kbq-code-block .hljs-title-class-inherited{background-color:var(--kbq-code-block-hljs-title-class-inherited-background);color:var(--kbq-code-block-hljs-title-class-inherited-color)}.kbq-code-block .hljs-title-function{background-color:var(--kbq-code-block-hljs-title-function-background);color:var(--kbq-code-block-hljs-title-function-color)}.kbq-code-block .hljs-title-function-invoke{background-color:var(--kbq-code-block-hljs-title-function-invoke-background);color:var(--kbq-code-block-hljs-title-function-invoke-color)}.kbq-code-block .hljs-type{background-color:var(--kbq-code-block-hljs-type-background);color:var(--kbq-code-block-hljs-type-color)}.kbq-code-block .hljs-variable{background-color:var(--kbq-code-block-hljs-variable-background);color:var(--kbq-code-block-hljs-variable-color)}.kbq-code-block .hljs-variable-constant{background-color:var(--kbq-code-block-hljs-variable-constant-background);color:var(--kbq-code-block-hljs-variable-constant-color)}.kbq-code-block .hljs-variable-language{background-color:var(--kbq-code-block-hljs-variable-language-background);color:var(--kbq-code-block-hljs-variable-language-color)}.kbq-code-block .hljs-ln-n{color:var(--kbq-code-block-hljs-line-numbers-color)}.kbq-code-block.kbq-code-block_outline{background:var(--kbq-code-block-outline-container-background)}.kbq-code-block.kbq-code-block_outline .kbq-tab-header{background:var(--kbq-code-block-outline-header-background)!important;border-color:var(--kbq-code-block-outline-container-border-color)}.kbq-code-block.kbq-code-block_outline .kbq-tab-body__wrapper{border-color:var(--kbq-code-block-outline-container-border-color)}.kbq-code-block.kbq-code-block_outline:not(.kbq-code-block_no-header) .kbq-tab-body__wrapper{border-top-color:transparent}.kbq-code-block.kbq-code-block_outline .kbq-code-block-actionbar,.kbq-code-block.kbq-code-block_outline .kbq-code-block-actionbar.kbq-actionbar-block_floating .kbq-actionbar-block__button-stack{background:var(--kbq-code-block-outline-actionbar-background)}.kbq-code-block.kbq-code-block_outline.kbq-code-block_header-with-shadow .kbq-tab-header{box-shadow:var(--kbq-code-block-outline-header-scroll-shadow)}.kbq-code-block.kbq-code-block_outline.kbq-code-block_no-header .kbq-code-block__fade-gradient{background:var(--kbq-code-block-outline-actionbar-fade-gradient)}.kbq-code-block.kbq-code-block_outline .kbq-code-block__show-more .bg-wrapper{background:var(--kbq-code-block-outline-collapse-button-expand-background);opacity:90%}.kbq-code-block.kbq-code-block_outline .kbq-code-block__show-more_expanded{background:var(--kbq-code-block-outline-collapse-expanded-background)}.kbq-code-block.kbq-code-block_outline .kbq-code-block__show-more_collapsed{background:var(--kbq-code-block-outline-collapse-collapsed-background)}.kbq-code-block.kbq-code-block_filled{background:var(--kbq-code-block-filled-container-background)}.kbq-code-block.kbq-code-block_filled .kbq-tab-header{background:var(--kbq-code-block-filled-header-background)!important;border-color:var(--kbq-code-block-filled-container-border-color)}.kbq-code-block.kbq-code-block_filled .kbq-tab-body__wrapper{border-color:var(--kbq-code-block-filled-container-border-color)}.kbq-code-block.kbq-code-block_filled:not(.kbq-code-block_no-header) .kbq-tab-body__wrapper{border-top-color:transparent}.kbq-code-block.kbq-code-block_filled .kbq-code-block-actionbar,.kbq-code-block.kbq-code-block_filled .kbq-code-block-actionbar.kbq-actionbar-block_floating .kbq-actionbar-block__button-stack{background:var(--kbq-code-block-filled-actionbar-background)}.kbq-code-block.kbq-code-block_filled.kbq-code-block_header-with-shadow .kbq-tab-header{box-shadow:var(--kbq-code-block-filled-header-scroll-shadow)}.kbq-code-block.kbq-code-block_filled.kbq-code-block_no-header .kbq-code-block__fade-gradient{background:var(--kbq-code-block-filled-actionbar-fade-gradient)}.kbq-code-block.kbq-code-block_filled .kbq-code-block__show-more .bg-wrapper{background:var(--kbq-code-block-filled-collapse-button-expand-background);opacity:90%}.kbq-code-block.kbq-code-block_filled .kbq-code-block__show-more_expanded{background:var(--kbq-code-block-filled-collapse-expanded-background)}.kbq-code-block.kbq-code-block_filled .kbq-code-block__show-more_collapsed{background:var(--kbq-code-block-filled-collapse-collapsed-background)}.kbq-code-block .kbq-tab-header .kbq-tab-label.kbq-tab-label_horizontal,.kbq-code-block .kbq-tab-header .kbq-tab-header__pagination{border-bottom-color:transparent}.kbq-code-block .kbq-tab-group.kbq-focused .kbq-tab-header{box-shadow:0 2px 0 -1px var(--kbq-states-line-focus-theme)}.kbq-code-block .kbq-tab-group.kbq-focused .kbq-tab-body__wrapper{border-color:var(--kbq-states-line-focus-theme);box-shadow:inset 0 0 .1 1px var(--kbq-states-line-focus-theme)}.kbq-code-block{font-size:var(--kbq-typography-mono-codeblock-font-size);font-weight:var(--kbq-typography-mono-codeblock-font-weight);line-height:var(--kbq-typography-mono-codeblock-line-height);font-family:var(--kbq-typography-mono-codeblock-font-family);text-transform:var(--kbq-typography-mono-codeblock-text-transform);font-feature-settings:var(--kbq-typography-mono-codeblock-font-feature-settings);letter-spacing:var(--kbq-typography-mono-codeblock-letter-spacing)}.kbq-code-block .kbq-code-block__code{font:inherit}.kbq-code-block .kbq-code-block__code>code{font:inherit}\n", ".kbq-code-block{--kbq-code-block-size-container-border-width: 1px;--kbq-code-block-size-container-border-radius: var(--kbq-size-m);--kbq-code-block-size-with-header-content-padding-top: var(--kbq-size-xxs);--kbq-code-block-size-with-header-content-padding-bottom: var(--kbq-size-l);--kbq-code-block-size-with-header-content-padding-horizontal: var(--kbq-size-xl);--kbq-code-block-size-with-header-content-content-gap-horizontal: var(--kbq-size-m);--kbq-code-block-size-no-header-content-padding-vertical: 14px;--kbq-code-block-size-no-header-content-padding-horizontal: 20px;--kbq-code-block-size-no-header-content-content-gap-horizontal: var(--kbq-size-m);--kbq-code-block-size-header-padding-vertical: var(--kbq-size-s);--kbq-code-block-size-header-padding-left: var(--kbq-size-m);--kbq-code-block-size-header-padding-right: var(--kbq-size-s);--kbq-code-block-size-header-content-gap-horizontal: var(--kbq-size-l);--kbq-code-block-size-actionbar-content-gap-horizontal: var(--kbq-size-3xs);--kbq-code-block-size-actionbar-padding-vertical: var(--kbq-size-s);--kbq-code-block-size-actionbar-padding-horizontal: var(--kbq-size-m);--kbq-code-block-size-actionbar-fade-gradient-width: var(--kbq-size-3xl);--kbq-code-block-size-collapse-expanded-padding-top: 0;--kbq-code-block-size-collapse-expanded-padding-bottom: var(--kbq-size-l);--kbq-code-block-size-collapse-collapsed-padding-top: var(--kbq-size-3xl);--kbq-code-block-size-collapse-collapsed-padding-bottom: var(--kbq-size-l);--kbq-code-block-font-hljs-addition-font-style: null;--kbq-code-block-font-hljs-addition-font-weight: null;--kbq-code-block-font-hljs-attr-font-style: null;--kbq-code-block-font-hljs-attr-font-weight: null;--kbq-code-block-font-hljs-attribute-font-style: null;--kbq-code-block-font-hljs-attribute-font-weight: null;--kbq-code-block-font-hljs-built-in-font-style: null;--kbq-code-block-font-hljs-built-in-font-weight: null;--kbq-code-block-font-hljs-bullet-font-style: null;--kbq-code-block-font-hljs-bullet-font-weight: null;--kbq-code-block-font-hljs-char-escape-font-style: null;--kbq-code-block-font-hljs-char-escape-font-weight: null;--kbq-code-block-font-hljs-class-font-style: null;--kbq-code-block-font-hljs-class-font-weight: null;--kbq-code-block-font-hljs-code-font-style: null;--kbq-code-block-font-hljs-code-font-weight: null;--kbq-code-block-font-hljs-comment-font-style: null;--kbq-code-block-font-hljs-comment-font-weight: null;--kbq-code-block-font-hljs-deletion-font-style: null;--kbq-code-block-font-hljs-deletion-font-weight: null;--kbq-code-block-font-hljs-doctag-font-style: null;--kbq-code-block-font-hljs-doctag-font-weight: null;--kbq-code-block-font-hljs-emphasis-font-style: null;--kbq-code-block-font-hljs-emphasis-font-weight: null;--kbq-code-block-font-hljs-formula-font-style: null;--kbq-code-block-font-hljs-formula-font-weight: null;--kbq-code-block-font-hljs-function-font-style: null;--kbq-code-block-font-hljs-function-font-weight: null;--kbq-code-block-font-hljs-keyword-font-style: null;--kbq-code-block-font-hljs-keyword-font-weight: null;--kbq-code-block-font-hljs-link-font-style: null;--kbq-code-block-font-hljs-link-font-weight: null;--kbq-code-block-font-hljs-literal-font-style: null;--kbq-code-block-font-hljs-literal-font-weight: null;--kbq-code-block-font-hljs-meta-font-style: null;--kbq-code-block-font-hljs-meta-font-weight: null;--kbq-code-block-font-hljs-meta-keyword-font-style: null;--kbq-code-block-font-hljs-meta-keyword-font-weight: null;--kbq-code-block-font-hljs-meta-string-font-style: null;--kbq-code-block-font-hljs-meta-string-font-weight: null;--kbq-code-block-font-hljs-meta-prompt-font-style: null;--kbq-code-block-font-hljs-meta-prompt-font-weight: null;--kbq-code-block-font-hljs-name-font-style: null;--kbq-code-block-font-hljs-name-font-weight: null;--kbq-code-block-font-hljs-number-font-style: null;--kbq-code-block-font-hljs-number-font-weight: null;--kbq-code-block-font-hljs-operator-font-style: null;--kbq-code-block-font-hljs-operator-font-weight: null;--kbq-code-block-font-hljs-params-font-style: null;--kbq-code-block-font-hljs-params-font-weight: null;--kbq-code-block-font-hljs-property-font-style: null;--kbq-code-block-font-hljs-property-font-weight: null;--kbq-code-block-font-hljs-punctuation-font-style: null;--kbq-code-block-font-hljs-punctuation-font-weight: null;--kbq-code-block-font-hljs-quote-font-style: null;--kbq-code-block-font-hljs-quote-font-weight: null;--kbq-code-block-font-hljs-regexp-font-style: null;--kbq-code-block-font-hljs-regexp-font-weight: null;--kbq-code-block-font-hljs-section-font-style: null;--kbq-code-block-font-hljs-section-font-weight: null;--kbq-code-block-font-hljs-selector-attr-font-style: null;--kbq-code-block-font-hljs-selector-attr-font-weight: null;--kbq-code-block-font-hljs-selector-class-font-style: null;--kbq-code-block-font-hljs-selector-class-font-weight: null;--kbq-code-block-font-hljs-selector-id-font-style: null;--kbq-code-block-font-hljs-selector-id-font-weight: null;--kbq-code-block-font-hljs-selector-pseudo-font-style: null;--kbq-code-block-font-hljs-selector-pseudo-font-weight: null;--kbq-code-block-font-hljs-selector-tag-font-style: null;--kbq-code-block-font-hljs-selector-tag-font-weight: null;--kbq-code-block-font-hljs-string-font-style: null;--kbq-code-block-font-hljs-string-font-weight: null;--kbq-code-block-font-hljs-strong-font-style: null;--kbq-code-block-font-hljs-strong-font-weight: null;--kbq-code-block-font-hljs-subst-font-style: null;--kbq-code-block-font-hljs-subst-font-weight: null;--kbq-code-block-font-hljs-symbol-font-style: null;--kbq-code-block-font-hljs-symbol-font-weight: null;--kbq-code-block-font-hljs-tag-font-style: null;--kbq-code-block-font-hljs-tag-font-weight: null;--kbq-code-block-font-hljs-template-tag-font-style: null;--kbq-code-block-font-hljs-template-tag-font-weight: null;--kbq-code-block-font-hljs-template-variable-font-style: null;--kbq-code-block-font-hljs-template-variable-font-weight: null;--kbq-code-block-font-hljs-title-font-style: null;--kbq-code-block-font-hljs-title-font-weight: null;--kbq-code-block-font-hljs-title-class-font-style: normal;--kbq-code-block-font-hljs-title-class-font-weight: 500;--kbq-code-block-font-hljs-title-class-inherited-font-style: null;--kbq-code-block-font-hljs-title-class-inherited-font-weight: null;--kbq-code-block-font-hljs-title-function-font-style: null;--kbq-code-block-font-hljs-title-function-font-weight: null;--kbq-code-block-font-hljs-title-function-invoke-font-style: null;--kbq-code-block-font-hljs-title-function-invoke-font-weight: null;--kbq-code-block-font-hljs-type-font-style: null;--kbq-code-block-font-hljs-type-font-weight: null;--kbq-code-block-font-hljs-variable-font-style: null;--kbq-code-block-font-hljs-variable-font-weight: null;--kbq-code-block-font-hljs-variable-constant-font-style: null;--kbq-code-block-font-hljs-variable-constant-font-weight: null;--kbq-code-block-font-hljs-variable-language-font-style: null;--kbq-code-block-font-hljs-variable-language-font-weight: null;--kbq-code-block-filled-container-background: var(--kbq-background-bg-secondary);--kbq-code-block-filled-container-border-color: transparent;--kbq-code-block-filled-header-background: var(--kbq-background-bg-secondary);--kbq-code-block-filled-header-scroll-shadow: var(--kbq-shadow-overflow-normal-bottom);--kbq-code-block-filled-actionbar-fade-gradient: linear-gradient( 90deg, transparent, var(--kbq-background-bg-secondary) );--kbq-code-block-filled-actionbar-background: var(--kbq-background-bg-secondary);--kbq-code-block-filled-collapse-expanded-background: transparent;--kbq-code-block-filled-collapse-collapsed-background: linear-gradient( 180deg, hsla(225, 15%, 95%, 0%) 0%, hsla(225, 15%, 95%, 100%) 100% );--kbq-code-block-filled-collapse-button-expand-background: var(--kbq-background-bg-secondary);--kbq-code-block-outline-container-background: var(--kbq-background-card);--kbq-code-block-outline-container-border-color: var(--kbq-divider-color, var(--kbq-line-contrast-less));--kbq-code-block-outline-header-background: var(--kbq-background-card);--kbq-code-block-outline-header-scroll-shadow: var(--kbq-shadow-overflow-normal-bottom);--kbq-code-block-outline-actionbar-fade-gradient: linear-gradient(90deg, transparent, var(--kbq-background-card));--kbq-code-block-outline-actionbar-background: var(--kbq-background-card);--kbq-code-block-outline-collapse-expanded-background: transparent;--kbq-code-block-outline-collapse-collapsed-background: linear-gradient( 180deg, hsla(0, 0%, 100%, 0%) 0%, hsla(0, 0%, 100%, 100%) 100% );--kbq-code-block-outline-collapse-button-expand-background: var(--kbq-background-card);--kbq-code-block-hljs-addition-background: var(--kbq-palette-green-95);--kbq-code-block-hljs-addition-color: var(--kbq-palette-green-25);--kbq-code-block-hljs-attr-background: null;--kbq-code-block-hljs-attr-color: null;--kbq-code-block-hljs-attribute-background: null;--kbq-code-block-hljs-attribute-color: null;--kbq-code-block-hljs-built-in-background: null;--kbq-code-block-hljs-built-in-color: null;--kbq-code-block-hljs-bullet-background: null;--kbq-code-block-hljs-bullet-color: null;--kbq-code-block-hljs-char-escape-background: null;--kbq-code-block-hljs-char-escape-color: null;--kbq-code-block-hljs-class-background: null;--kbq-code-block-hljs-class-color: null;--kbq-code-block-hljs-code-background: null;--kbq-code-block-hljs-code-color: null;--kbq-code-block-hljs-comment-background: null;--kbq-code-block-hljs-comment-color: var(--kbq-palette-grey-60);--kbq-code-block-hljs-deletion-background: var(--kbq-palette-red-95);--kbq-code-block-hljs-deletion-color: var(--kbq-palette-red-35);--kbq-code-block-hljs-doctag-background: null;--kbq-code-block-hljs-doctag-color: null;--kbq-code-block-hljs-emphasis-background: null;--kbq-code-block-hljs-emphasis-color: null;--kbq-code-block-hljs-formula-background: null;--kbq-code-block-hljs-formula-color: null;--kbq-code-block-hljs-function-background: null;--kbq-code-block-hljs-function-color: null;--kbq-code-block-hljs-keyword-background: null;--kbq-code-block-hljs-keyword-color: null;--kbq-code-block-hljs-line-numbers-color: var(--kbq-foreground-contrast-secondary);--kbq-code-block-hljs-link-background: null;--kbq-code-block-hljs-link-color: null;--kbq-code-block-hljs-literal-background: null;--kbq-code-block-hljs-literal-color: var(--kbq-palette-purple-30);--kbq-code-block-hljs-meta-background: null;--kbq-code-block-hljs-meta-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-meta-keyword-background: null;--kbq-code-block-hljs-meta-keyword-color: null;--kbq-code-block-hljs-meta-string-background: null;--kbq-code-block-hljs-meta-string-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-meta-prompt-background: null;--kbq-code-block-hljs-meta-prompt-color: null;--kbq-code-block-hljs-name-background: null;--kbq-code-block-hljs-name-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-number-background: null;--kbq-code-block-hljs-number-color: var(--kbq-palette-purple-30);--kbq-code-block-hljs-operator-background: null;--kbq-code-block-hljs-operator-color: null;--kbq-code-block-hljs-params-background: null;--kbq-code-block-hljs-params-color: null;--kbq-code-block-hljs-property-background: null;--kbq-code-block-hljs-property-color: null;--kbq-code-block-hljs-punctuation-background: null;--kbq-code-block-hljs-punctuation-color: null;--kbq-code-block-hljs-quote-background: null;--kbq-code-block-hljs-quote-color: null;--kbq-code-block-hljs-regexp-background: null;--kbq-code-block-hljs-regexp-color: var(--kbq-palette-green-25);--kbq-code-block-hljs-section-background: null;--kbq-code-block-hljs-section-color: null;--kbq-code-block-hljs-selector-attr-background: null;--kbq-code-block-hljs-selector-attr-color: null;--kbq-code-block-hljs-selector-class-background: null;--kbq-code-block-hljs-selector-class-color: null;--kbq-code-block-hljs-selector-id-background: null;--kbq-code-block-hljs-selector-id-color: null;--kbq-code-block-hljs-selector-pseudo-background: null;--kbq-code-block-hljs-selector-pseudo-color: null;--kbq-code-block-hljs-selector-tag-background: null;--kbq-code-block-hljs-selector-tag-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-string-background: null;--kbq-code-block-hljs-string-color: var(--kbq-palette-green-25);--kbq-code-block-hljs-strong-background: null;--kbq-code-block-hljs-strong-color: null;--kbq-code-block-hljs-subst-background: null;--kbq-code-block-hljs-subst-color: null;--kbq-code-block-hljs-symbol-background: null;--kbq-code-block-hljs-symbol-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-tag-background: null;--kbq-code-block-hljs-tag-color: null;--kbq-code-block-hljs-template-tag-background: null;--kbq-code-block-hljs-template-tag-color: null;--kbq-code-block-hljs-template-variable-background: null;--kbq-code-block-hljs-template-variable-color: null;--kbq-code-block-hljs-title-background: null;--kbq-code-block-hljs-title-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-title-class-background: null;--kbq-code-block-hljs-title-class-color: null;--kbq-code-block-hljs-title-class-inherited-background: null;--kbq-code-block-hljs-title-class-inherited-color: null;--kbq-code-block-hljs-title-function-background: null;--kbq-code-block-hljs-title-function-color: null;--kbq-code-block-hljs-title-function-invoke-background: null;--kbq-code-block-hljs-title-function-invoke-color: null;--kbq-code-block-hljs-type-background: null;--kbq-code-block-hljs-type-color: null;--kbq-code-block-hljs-variable-background: null;--kbq-code-block-hljs-variable-color: null;--kbq-code-block-hljs-variable-constant-background: null;--kbq-code-block-hljs-variable-constant-color: null;--kbq-code-block-hljs-variable-language-background: null;--kbq-code-block-hljs-variable-language-color: null}\n"], dependencies: [{ kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["color", "tabIndex", "kbqStyle", "disabled"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "component", type: i3.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "component", type: i5.KbqTabGroup, selector: "kbq-tab-group", inputs: ["disabled", "transparent", "onSurface", "underlined", "vertical", "dynamicHeight", "selectedIndex", "activeTab", "headerPosition", "animationDuration"], outputs: ["selectedIndexChange", "activeTabChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["kbqTabGroup"] }, { kind: "directive", type: i5.KbqTabLabel, selector: "[kbq-tab-label], [kbqTabLabel]" }, { kind: "component", type: i5.KbqTab, selector: "kbq-tab", inputs: ["disabled", "tooltipTitle", "tooltipPlacement", "label", "empty", "tabId"], exportAs: ["kbqTab"] }, { kind: "directive", type: KbqCodeBlockContent, selector: "[kbqCodeBlockContent]", inputs: ["file", "startFrom", "singleLine"] }, { kind: "component", type: KbqActionBarComponent, selector: "kbq-actionbar-block", inputs: ["codeFiles", "selectedTabIndex", "multiLine", "softWrap", "canLoad"], outputs: ["toggleSoftWrap", "downloadCode", "copyCode", "openExternalSystem"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
731
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqCodeBlock, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
732
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: KbqCodeBlock, isStandalone: true, selector: "kbq-code-block", inputs: { lineNumbers: ["lineNumbers", "lineNumbers", booleanAttribute], filled: ["filled", "filled", booleanAttribute], canToggleSoftWrap: ["canToggleSoftWrap", "canToggleSoftWrap", booleanAttribute], softWrap: ["softWrap", "softWrap", booleanAttribute], viewAll: ["viewAll", "viewAll", booleanAttribute], maxHeight: ["maxHeight", "maxHeight", numberAttribute], canLoad: ["canLoad", "canLoad", booleanAttribute], canDownload: ["canDownload", "canDownload", booleanAttribute], canCopy: ["canCopy", "canCopy", booleanAttribute], codeFiles: "codeFiles", files: "files", activeFileIndex: ["activeFileIndex", "activeFileIndex", numberAttribute], noBorder: ["noBorder", "noBorder", booleanAttribute], hideTabs: ["hideTabs", "hideTabs", booleanAttribute] }, outputs: { softWrapChange: "softWrapChange", viewAllChange: "viewAllChange", activeFileIndexChange: "activeFileIndexChange" }, host: { properties: { "class.kbq-code-block_filled": "filled", "class.kbq-code-block_outline": "!filled", "class.kbq-code-block_hide-line-numbers": "!lineNumbers", "class.kbq-code-block_hide-tabs": "hideTabs", "class.kbq-code-block_no-border": "noBorder || filled", "class.kbq-code-block_soft-wrap": "softWrap", "class.kbq-code-block_view-all": "viewAll" }, classAttribute: "kbq-code-block" }, viewQueries: [{ propertyName: "copyButtonTooltip", first: true, predicate: ["copyButtonTooltip"], descendants: true }, { propertyName: "scrollableCodeContent", first: true, predicate: CdkScrollable, descendants: true }], exportAs: ["kbqCodeBlock"], ngImport: i0, template: "@let file = files[activeFileIndex];\n\n<div class=\"kbq-code-block__header\">\n @if (!hideTabs) {\n <div class=\"kbq-code-block__header-tabs\">\n <div kbqTabNavBar transparent [tabNavPanel]=\"tabPanel\">\n @for (file of files; track file; let index = $index) {\n <div\n kbqTabLink\n [active]=\"activeFileIndex === index\"\n [disabled]=\"files.length === 1\"\n (click)=\"onSelectedTabChange(index)\"\n >\n {{ file.filename || fallbackFileName }}\n </div>\n }\n </div>\n </div>\n }\n\n <div class=\"kbq-code-block__actionbar\">\n @if (hideTabs) {\n <div class=\"kbq-code-block__actionbar__fade-gradient\"></div>\n }\n\n <div class=\"kbq-code-block__actionbar__button-stack\">\n @if (canToggleSoftWrap) {\n <button\n kbq-button\n class=\"kbq-code-block__actionbar__soft-wrap-button\"\n [color]=\"componentColor.Contrast\"\n [kbqStyle]=\"buttonStyle.Transparent\"\n [kbqTooltip]=\"\n softWrap ? localeConfiguration.softWrapOffTooltip : localeConfiguration.softWrapOnTooltip\n \"\n (click)=\"toggleSoftWrap()\"\n >\n @if (softWrap) {\n <i kbq-icon=\"kbq-wrap-text-slash_16\"></i>\n } @else {\n <i kbq-icon=\"kbq-wrap-text_16\"></i>\n }\n </button>\n }\n\n @if (canDownload) {\n <button\n kbq-button\n class=\"kbq-code-block__actionbar__download-button\"\n [color]=\"componentColor.Contrast\"\n [kbqStyle]=\"buttonStyle.Transparent\"\n [kbqTooltip]=\"localeConfiguration.downloadTooltip\"\n (click)=\"downloadCode()\"\n >\n <i kbq-icon=\"kbq-arrow-down-to-line_16\"></i>\n </button>\n }\n\n @if (canCopy) {\n <div #copyButtonTooltip=\"kbqTooltip\" [kbqTooltip]=\"localeConfiguration.copyTooltip\">\n <button\n kbq-button\n class=\"kbq-code-block__actionbar__copy-button\"\n [color]=\"componentColor.Contrast\"\n [kbqStyle]=\"buttonStyle.Transparent\"\n (click)=\"copyCode()\"\n >\n <i kbq-icon=\"kbq-file-multiple-o_16\"></i>\n </button>\n </div>\n }\n\n @if (file.link) {\n <button\n kbq-button\n class=\"kbq-code-block__actionbar__link-button\"\n [color]=\"componentColor.Contrast\"\n [kbqStyle]=\"buttonStyle.Transparent\"\n [kbqTooltip]=\"localeConfiguration.openExternalSystemTooltip\"\n (click)=\"openLink()\"\n >\n <i kbq-icon=\"kbq-arrow-up-right-from-square_16\"></i>\n </button>\n }\n </div>\n </div>\n</div>\n\n<pre\n #tabPanel=\"kbqTabNavPanel\"\n cdkMonitorElementFocus\n cdkScrollable\n kbqTabNavPanel\n class=\"kbq-code-block__content kbq-scrollbar\"\n [style.max-height.px]=\"calculatedMaxHeight\"\n [tabIndex]=\"codeContentTabIndex\"\n><code kbqCodeBlockHighlight class=\"kbq-code-block__code\" [file]=\"file\"></code></pre>\n\n@if (maxHeight) {\n <div\n class=\"kbq-code-block__view-all\"\n [class.kbq-code-block__view-all_collapsed]=\"!viewAll\"\n [class.kbq-code-block__view-all_expanded]=\"viewAll\"\n >\n <div class=\"kbq-code-block__view-all__wrapper\">\n <button\n kbq-button\n class=\"kbq-code-block__view-all__button\"\n [color]=\"componentColor.Theme\"\n [kbqStyle]=\"buttonStyle.Transparent\"\n (click)=\"toggleViewAll()\"\n (keydown.enter)=\"onViewAllEnterKeydown()\"\n >\n @if (viewAll) {\n <i kbq-icon=\"kbq-chevron-up_16\"></i>\n {{ localeConfiguration.viewLessText }}\n } @else {\n <i kbq-icon=\"kbq-chevron-down_16\"></i>\n {{ localeConfiguration.viewAllText }}\n }\n </button>\n </div>\n </div>\n}\n", styles: [".kbq-code-block{display:flex;flex-direction:column;position:relative;overflow:hidden;border-width:var(--kbq-code-block-size-container-border-width);border-style:solid;border-radius:var(--kbq-code-block-size-container-border-radius);box-sizing:border-box;hyphens:none;-ms-hyphens:none;-moz-hyphens:none;-webkit-hyphens:none}.kbq-code-block .kbq-code-block__header{display:flex;align-items:center;padding:var(--kbq-size-s) var(--kbq-size-m)}.kbq-code-block .kbq-code-block__header .kbq-code-block__header-tabs{overflow:hidden;flex-grow:1}.kbq-code-block .kbq-code-block__actionbar{display:flex;justify-content:right;align-items:center;z-index:1}.kbq-code-block .kbq-code-block__actionbar .kbq-code-block__actionbar__button-stack{display:flex;gap:var(--kbq-code-block-size-actionbar-content-gap-horizontal)}.kbq-code-block .kbq-code-block__actionbar .kbq-code-block__actionbar__fade-gradient{align-self:stretch;width:var(--kbq-code-block-size-actionbar-fade-gradient-width)}.kbq-code-block:has(.kbq-code-block__view-all) .kbq-code-block__content .kbq-code-block__code{padding-bottom:var(--kbq-size-3xl)!important}.kbq-code-block .kbq-code-block__content{flex-grow:1;margin:0;flex-direction:column;border-width:var(--kbq-code-block-size-container-border-width);border-style:solid;border-radius:var(--kbq-code-block-size-container-border-radius)}.kbq-code-block .kbq-code-block__content .kbq-code-block__code{tab-size:var(--kbq-code-block-tab-size);padding:var(--kbq-code-block-size-with-header-content-padding-top) var(--kbq-code-block-size-with-header-content-padding-horizontal) var(--kbq-code-block-size-with-header-content-padding-bottom) var(--kbq-code-block-size-with-header-content-padding-horizontal)}.kbq-code-block .kbq-code-block__content .kbq-code-block__code:focus-visible{outline:none}.kbq-code-block .kbq-code-block__content .hljs{display:block}.kbq-code-block .kbq-code-block__content .hljs-ln-numbers{padding-right:var(--kbq-code-block-size-with-header-content-content-gap-horizontal);vertical-align:baseline;text-align:right}.kbq-code-block .kbq-code-block__content .hljs-ln{border-collapse:unset}.kbq-code-block .kbq-code-block__content .hljs-ln .hljs{padding:0}.kbq-code-block .kbq-code-block__content .hljs-ln-n:before{white-space:nowrap}.kbq-code-block.kbq-code-block_hide-line-numbers .hljs-ln-line.hljs-ln-numbers{display:none}.kbq-code-block.kbq-code-block_soft-wrap .kbq-code-block__code{white-space:pre-wrap}.kbq-code-block.kbq-code-block_view-all .kbq-code-block__content{max-height:unset;overflow:auto}.kbq-code-block.kbq-code-block_hide-tabs .kbq-code-block__header{padding:0}.kbq-code-block.kbq-code-block_hide-tabs .kbq-code-block__actionbar{display:none;position:absolute;top:0;right:0;padding:var(--kbq-size-s) var(--kbq-size-m)}.kbq-code-block.kbq-code-block_hide-tabs .kbq-code-block__content{position:relative}.kbq-code-block.kbq-code-block_hide-tabs .kbq-code-block__content .kbq-code-block__code{padding:var(--kbq-code-block-size-no-header-content-padding-vertical) var(--kbq-code-block-size-no-header-content-padding-horizontal)}.kbq-code-block.kbq-code-block_hide-tabs .kbq-code-block__content .hljs-ln-numbers{padding-right:var(--kbq-code-block-size-no-header-content-content-gap-horizontal)}.kbq-code-block.kbq-code-block_show-actionbar .kbq-code-block__actionbar{display:flex}.kbq-code-block:not(:has(.kbq-code-block__view-all)) .kbq-code-block__content{overflow:auto}.kbq-code-block .kbq-code-block__view-all{display:flex;justify-content:center;width:100%;position:absolute;bottom:0;border-radius:var(--kbq-code-block-size-container-border-radius)}.kbq-code-block .kbq-code-block__view-all .kbq-code-block__view-all__wrapper{border-radius:var(--kbq-size-border-radius)}.kbq-code-block .kbq-code-block__view-all.kbq-code-block__view-all_collapsed{padding-top:var(--kbq-code-block-size-collapse-collapsed-padding-top);padding-bottom:var(--kbq-code-block-size-collapse-collapsed-padding-bottom)}.kbq-code-block .kbq-code-block__view-all.kbq-code-block__view-all_expanded{padding-top:var(--kbq-code-block-size-collapse-expanded-padding-top);margin-bottom:var(--kbq-code-block-size-collapse-expanded-padding-bottom)}.kbq-code-block.kbq-code-block_no-border{border-color:transparent!important}.kbq-code-block .hljs-addition{background-color:var(--kbq-code-block-hljs-addition-background);color:var(--kbq-code-block-hljs-addition-color)}.kbq-code-block .hljs-attr{background-color:var(--kbq-code-block-hljs-attr-background);color:var(--kbq-code-block-hljs-attr-color)}.kbq-code-block .hljs-attribute{background-color:var(--kbq-code-block-hljs-attribute-background);color:var(--kbq-code-block-hljs-attribute-color)}.kbq-code-block .hljs-built_in{background-color:var(--kbq-code-block-hljs-built-in-background);color:var(--kbq-code-block-hljs-built-in-color)}.kbq-code-block .hljs-bullet{background-color:var(--kbq-code-block-hljs-bullet-background);color:var(--kbq-code-block-hljs-bullet-color)}.kbq-code-block .hljs-char-escape{background-color:var(--kbq-code-block-hljs-char-escape-background);color:var(--kbq-code-block-hljs-char-escape-color)}.kbq-code-block .hljs-class{background-color:var(--kbq-code-block-hljs-class-background);color:var(--kbq-code-block-hljs-class-color)}.kbq-code-block .hljs-code{background-color:var(--kbq-code-block-hljs-code-background);color:var(--kbq-code-block-hljs-code-color)}.kbq-code-block .hljs-comment{background-color:var(--kbq-code-block-hljs-comment-background);color:var(--kbq-code-block-hljs-comment-color)}.kbq-code-block .hljs-deletion{background-color:var(--kbq-code-block-hljs-deletion-background);color:var(--kbq-code-block-hljs-deletion-color)}.kbq-code-block .hljs-doctag{background-color:var(--kbq-code-block-hljs-doctag-background);color:var(--kbq-code-block-hljs-doctag-color)}.kbq-code-block .hljs-emphasis{background-color:var(--kbq-code-block-hljs-emphasis-background);color:var(--kbq-code-block-hljs-emphasis-color)}.kbq-code-block .hljs-formula{background-color:var(--kbq-code-block-hljs-formula-background);color:var(--kbq-code-block-hljs-formula-color)}.kbq-code-block .hljs-function{background-color:var(--kbq-code-block-hljs-function-background);color:var(--kbq-code-block-hljs-function-color)}.kbq-code-block .hljs-keyword{background-color:var(--kbq-code-block-hljs-keyword-background);color:var(--kbq-code-block-hljs-keyword-color)}.kbq-code-block .hljs-link{background-color:var(--kbq-code-block-hljs-link-background);color:var(--kbq-code-block-hljs-link-color)}.kbq-code-block .hljs-literal{background-color:var(--kbq-code-block-hljs-literal-background);color:var(--kbq-code-block-hljs-literal-color)}.kbq-code-block .hljs-meta{background-color:var(--kbq-code-block-hljs-meta-background);color:var(--kbq-code-block-hljs-meta-color)}.kbq-code-block .hljs-meta-keyword{background-color:var(--kbq-code-block-hljs-meta-keyword-background);color:var(--kbq-code-block-hljs-meta-keyword-color)}.kbq-code-block .hljs-meta-string{background-color:var(--kbq-code-block-hljs-meta-string-background);color:var(--kbq-code-block-hljs-meta-string-color)}.kbq-code-block .hljs-meta-prompt{background-color:var(--kbq-code-block-hljs-meta-prompt-background);color:var(--kbq-code-block-hljs-meta-prompt-color)}.kbq-code-block .hljs-name{background-color:var(--kbq-code-block-hljs-name-background);color:var(--kbq-code-block-hljs-name-color)}.kbq-code-block .hljs-number{background-color:var(--kbq-code-block-hljs-number-background);color:var(--kbq-code-block-hljs-number-color)}.kbq-code-block .hljs-operator{background-color:var(--kbq-code-block-hljs-operator-background);color:var(--kbq-code-block-hljs-operator-color)}.kbq-code-block .hljs-params{background-color:var(--kbq-code-block-hljs-params-background);color:var(--kbq-code-block-hljs-params-color)}.kbq-code-block .hljs-property{background-color:var(--kbq-code-block-hljs-property-background);color:var(--kbq-code-block-hljs-property-color)}.kbq-code-block .hljs-punctuation{background-color:var(--kbq-code-block-hljs-punctuation-background);color:var(--kbq-code-block-hljs-punctuation-color)}.kbq-code-block .hljs-quote{background-color:var(--kbq-code-block-hljs-quote-background);color:var(--kbq-code-block-hljs-quote-color)}.kbq-code-block .hljs-regexp{background-color:var(--kbq-code-block-hljs-regexp-background);color:var(--kbq-code-block-hljs-regexp-color)}.kbq-code-block .hljs-section{background-color:var(--kbq-code-block-hljs-section-background);color:var(--kbq-code-block-hljs-section-color)}.kbq-code-block .hljs-selector-attr{background-color:var(--kbq-code-block-hljs-selector-attr-background);color:var(--kbq-code-block-hljs-selector-attr-color)}.kbq-code-block .hljs-selector-class{background-color:var(--kbq-code-block-hljs-selector-class-background);color:var(--kbq-code-block-hljs-selector-class-color)}.kbq-code-block .hljs-selector-id{background-color:var(--kbq-code-block-hljs-selector-id-background);color:var(--kbq-code-block-hljs-selector-id-color)}.kbq-code-block .hljs-selector-pseudo{background-color:var(--kbq-code-block-hljs-selector-pseudo-background);color:var(--kbq-code-block-hljs-selector-pseudo-color)}.kbq-code-block .hljs-selector-tag{background-color:var(--kbq-code-block-hljs-selector-tag-background);color:var(--kbq-code-block-hljs-selector-tag-color)}.kbq-code-block .hljs-string{background-color:var(--kbq-code-block-hljs-string-background);color:var(--kbq-code-block-hljs-string-color)}.kbq-code-block .hljs-strong{background-color:var(--kbq-code-block-hljs-strong-background);color:var(--kbq-code-block-hljs-strong-color)}.kbq-code-block .hljs-subst{background-color:var(--kbq-code-block-hljs-subst-background);color:var(--kbq-code-block-hljs-subst-color)}.kbq-code-block .hljs-symbol{background-color:var(--kbq-code-block-hljs-symbol-background);color:var(--kbq-code-block-hljs-symbol-color)}.kbq-code-block .hljs-tag{background-color:var(--kbq-code-block-hljs-tag-background);color:var(--kbq-code-block-hljs-tag-color)}.kbq-code-block .hljs-template-tag{background-color:var(--kbq-code-block-hljs-template-tag-background);color:var(--kbq-code-block-hljs-template-tag-color)}.kbq-code-block .hljs-template-variable{background-color:var(--kbq-code-block-hljs-template-variable-background);color:var(--kbq-code-block-hljs-template-variable-color)}.kbq-code-block .hljs-title{background-color:var(--kbq-code-block-hljs-title-background);color:var(--kbq-code-block-hljs-title-color)}.kbq-code-block .hljs-title-class{background-color:var(--kbq-code-block-hljs-title-class-background);color:var(--kbq-code-block-hljs-title-class-color)}.kbq-code-block .hljs-title-class-inherited{background-color:var(--kbq-code-block-hljs-title-class-inherited-background);color:var(--kbq-code-block-hljs-title-class-inherited-color)}.kbq-code-block .hljs-title-function{background-color:var(--kbq-code-block-hljs-title-function-background);color:var(--kbq-code-block-hljs-title-function-color)}.kbq-code-block .hljs-title-function-invoke{background-color:var(--kbq-code-block-hljs-title-function-invoke-background);color:var(--kbq-code-block-hljs-title-function-invoke-color)}.kbq-code-block .hljs-type{background-color:var(--kbq-code-block-hljs-type-background);color:var(--kbq-code-block-hljs-type-color)}.kbq-code-block .hljs-variable{background-color:var(--kbq-code-block-hljs-variable-background);color:var(--kbq-code-block-hljs-variable-color)}.kbq-code-block .hljs-variable-constant{background-color:var(--kbq-code-block-hljs-variable-constant-background);color:var(--kbq-code-block-hljs-variable-constant-color)}.kbq-code-block .hljs-variable-language{background-color:var(--kbq-code-block-hljs-variable-language-background);color:var(--kbq-code-block-hljs-variable-language-color)}.kbq-code-block .hljs-ln-n{color:var(--kbq-code-block-hljs-line-numbers-color)}.kbq-code-block.kbq-code-block_outline{background:var(--kbq-code-block-outline-container-background);border-color:var(--kbq-code-block-outline-container-border-color)}.kbq-code-block.kbq-code-block_outline .kbq-code-block__header{background:var(--kbq-code-block-outline-header-background)}.kbq-code-block.kbq-code-block_outline .kbq-code-block__actionbar{background:var(--kbq-code-block-outline-actionbar-background)}.kbq-code-block.kbq-code-block_outline.kbq-code-block_header-with-shadow .kbq-code-block__header{box-shadow:var(--kbq-code-block-outline-header-scroll-shadow)}.kbq-code-block.kbq-code-block_outline.kbq-code-block_hide-tabs .kbq-code-block__actionbar{background:transparent}.kbq-code-block.kbq-code-block_outline.kbq-code-block_hide-tabs .kbq-code-block__actionbar .kbq-code-block__actionbar__fade-gradient{background:var(--kbq-code-block-outline-actionbar-fade-gradient)}.kbq-code-block.kbq-code-block_outline.kbq-code-block_hide-tabs .kbq-code-block__actionbar .kbq-code-block__actionbar__button-stack{background:var(--kbq-code-block-outline-actionbar-background)}.kbq-code-block.kbq-code-block_outline .kbq-code-block__view-all .kbq-code-block__view-all__wrapper{background:var(--kbq-code-block-outline-collapse-button-expand-background);opacity:90%}.kbq-code-block.kbq-code-block_outline .kbq-code-block__view-all.kbq-code-block__view-all_expanded{background:var(--kbq-code-block-outline-collapse-expanded-background)}.kbq-code-block.kbq-code-block_outline .kbq-code-block__view-all.kbq-code-block__view-all_collapsed{background:var(--kbq-code-block-outline-collapse-collapsed-background)}.kbq-code-block.kbq-code-block_filled{background:var(--kbq-code-block-filled-container-background);border-color:var(--kbq-code-block-filled-container-border-color)}.kbq-code-block.kbq-code-block_filled .kbq-code-block__header{background:var(--kbq-code-block-filled-header-background)}.kbq-code-block.kbq-code-block_filled .kbq-code-block__actionbar{background:var(--kbq-code-block-filled-actionbar-background)}.kbq-code-block.kbq-code-block_filled.kbq-code-block_header-with-shadow .kbq-code-block__header{box-shadow:var(--kbq-code-block-filled-header-scroll-shadow)}.kbq-code-block.kbq-code-block_filled.kbq-code-block_hide-tabs .kbq-code-block__actionbar{background:transparent}.kbq-code-block.kbq-code-block_filled.kbq-code-block_hide-tabs .kbq-code-block__actionbar .kbq-code-block__actionbar__fade-gradient{background:var(--kbq-code-block-filled-actionbar-fade-gradient)}.kbq-code-block.kbq-code-block_filled.kbq-code-block_hide-tabs .kbq-code-block__actionbar .kbq-code-block__actionbar__button-stack{background:var(--kbq-code-block-filled-actionbar-background)}.kbq-code-block.kbq-code-block_filled .kbq-code-block__view-all .kbq-code-block__view-all__wrapper{background:var(--kbq-code-block-filled-collapse-button-expand-background);opacity:90%}.kbq-code-block.kbq-code-block_filled .kbq-code-block__view-all.kbq-code-block__view-all_expanded{background:var(--kbq-code-block-filled-collapse-expanded-background)}.kbq-code-block.kbq-code-block_filled .kbq-code-block__view-all.kbq-code-block__view-all_collapsed{background:var(--kbq-code-block-filled-collapse-collapsed-background)}.kbq-code-block .kbq-code-block__content{border-color:transparent}.kbq-code-block .kbq-code-block__content.cdk-keyboard-focused{outline:none;border-color:var(--kbq-states-line-focus-theme)}.kbq-code-block{font-size:var(--kbq-typography-mono-codeblock-font-size);font-weight:var(--kbq-typography-mono-codeblock-font-weight);line-height:var(--kbq-typography-mono-codeblock-line-height);font-family:var(--kbq-typography-mono-codeblock-font-family);text-transform:var(--kbq-typography-mono-codeblock-text-transform);font-feature-settings:var(--kbq-typography-mono-codeblock-font-feature-settings);letter-spacing:var(--kbq-typography-mono-codeblock-letter-spacing)}.kbq-code-block .kbq-code-block__content,.kbq-code-block .kbq-code-block__content .kbq-code-block__code{font:inherit}\n", ".kbq-code-block{--kbq-code-block-size-container-border-width: 1px;--kbq-code-block-size-container-border-radius: var(--kbq-size-m);--kbq-code-block-size-with-header-content-padding-top: var(--kbq-size-xxs);--kbq-code-block-size-with-header-content-padding-bottom: var(--kbq-size-l);--kbq-code-block-size-with-header-content-padding-horizontal: var(--kbq-size-xl);--kbq-code-block-size-with-header-content-content-gap-horizontal: var(--kbq-size-m);--kbq-code-block-size-no-header-content-padding-vertical: 14px;--kbq-code-block-size-no-header-content-padding-horizontal: var(--kbq-size-xl);--kbq-code-block-size-no-header-content-content-gap-horizontal: var(--kbq-size-m);--kbq-code-block-size-header-content-gap-horizontal: var(--kbq-size-l);--kbq-code-block-size-actionbar-content-gap-horizontal: var(--kbq-size-3xs);--kbq-code-block-size-actionbar-fade-gradient-width: var(--kbq-size-3xl);--kbq-code-block-size-collapse-expanded-padding-top: 0;--kbq-code-block-size-collapse-expanded-padding-bottom: var(--kbq-size-l);--kbq-code-block-size-collapse-collapsed-padding-top: var(--kbq-size-3xl);--kbq-code-block-size-collapse-collapsed-padding-bottom: var(--kbq-size-l);--kbq-code-block-font-hljs-addition-font-style: null;--kbq-code-block-font-hljs-addition-font-weight: null;--kbq-code-block-font-hljs-attr-font-style: null;--kbq-code-block-font-hljs-attr-font-weight: null;--kbq-code-block-font-hljs-attribute-font-style: null;--kbq-code-block-font-hljs-attribute-font-weight: null;--kbq-code-block-font-hljs-built-in-font-style: null;--kbq-code-block-font-hljs-built-in-font-weight: null;--kbq-code-block-font-hljs-bullet-font-style: null;--kbq-code-block-font-hljs-bullet-font-weight: null;--kbq-code-block-font-hljs-char-escape-font-style: null;--kbq-code-block-font-hljs-char-escape-font-weight: null;--kbq-code-block-font-hljs-class-font-style: null;--kbq-code-block-font-hljs-class-font-weight: null;--kbq-code-block-font-hljs-code-font-style: null;--kbq-code-block-font-hljs-code-font-weight: null;--kbq-code-block-font-hljs-comment-font-style: null;--kbq-code-block-font-hljs-comment-font-weight: null;--kbq-code-block-font-hljs-deletion-font-style: null;--kbq-code-block-font-hljs-deletion-font-weight: null;--kbq-code-block-font-hljs-doctag-font-style: null;--kbq-code-block-font-hljs-doctag-font-weight: null;--kbq-code-block-font-hljs-emphasis-font-style: null;--kbq-code-block-font-hljs-emphasis-font-weight: null;--kbq-code-block-font-hljs-formula-font-style: null;--kbq-code-block-font-hljs-formula-font-weight: null;--kbq-code-block-font-hljs-function-font-style: null;--kbq-code-block-font-hljs-function-font-weight: null;--kbq-code-block-font-hljs-keyword-font-style: null;--kbq-code-block-font-hljs-keyword-font-weight: null;--kbq-code-block-font-hljs-link-font-style: null;--kbq-code-block-font-hljs-link-font-weight: null;--kbq-code-block-font-hljs-literal-font-style: null;--kbq-code-block-font-hljs-literal-font-weight: null;--kbq-code-block-font-hljs-meta-font-style: null;--kbq-code-block-font-hljs-meta-font-weight: null;--kbq-code-block-font-hljs-meta-keyword-font-style: null;--kbq-code-block-font-hljs-meta-keyword-font-weight: null;--kbq-code-block-font-hljs-meta-string-font-style: null;--kbq-code-block-font-hljs-meta-string-font-weight: null;--kbq-code-block-font-hljs-meta-prompt-font-style: null;--kbq-code-block-font-hljs-meta-prompt-font-weight: null;--kbq-code-block-font-hljs-name-font-style: null;--kbq-code-block-font-hljs-name-font-weight: null;--kbq-code-block-font-hljs-number-font-style: null;--kbq-code-block-font-hljs-number-font-weight: null;--kbq-code-block-font-hljs-operator-font-style: null;--kbq-code-block-font-hljs-operator-font-weight: null;--kbq-code-block-font-hljs-params-font-style: null;--kbq-code-block-font-hljs-params-font-weight: null;--kbq-code-block-font-hljs-property-font-style: null;--kbq-code-block-font-hljs-property-font-weight: null;--kbq-code-block-font-hljs-punctuation-font-style: null;--kbq-code-block-font-hljs-punctuation-font-weight: null;--kbq-code-block-font-hljs-quote-font-style: null;--kbq-code-block-font-hljs-quote-font-weight: null;--kbq-code-block-font-hljs-regexp-font-style: null;--kbq-code-block-font-hljs-regexp-font-weight: null;--kbq-code-block-font-hljs-section-font-style: null;--kbq-code-block-font-hljs-section-font-weight: null;--kbq-code-block-font-hljs-selector-attr-font-style: null;--kbq-code-block-font-hljs-selector-attr-font-weight: null;--kbq-code-block-font-hljs-selector-class-font-style: null;--kbq-code-block-font-hljs-selector-class-font-weight: null;--kbq-code-block-font-hljs-selector-id-font-style: null;--kbq-code-block-font-hljs-selector-id-font-weight: null;--kbq-code-block-font-hljs-selector-pseudo-font-style: null;--kbq-code-block-font-hljs-selector-pseudo-font-weight: null;--kbq-code-block-font-hljs-selector-tag-font-style: null;--kbq-code-block-font-hljs-selector-tag-font-weight: null;--kbq-code-block-font-hljs-string-font-style: null;--kbq-code-block-font-hljs-string-font-weight: null;--kbq-code-block-font-hljs-strong-font-style: null;--kbq-code-block-font-hljs-strong-font-weight: null;--kbq-code-block-font-hljs-subst-font-style: null;--kbq-code-block-font-hljs-subst-font-weight: null;--kbq-code-block-font-hljs-symbol-font-style: null;--kbq-code-block-font-hljs-symbol-font-weight: null;--kbq-code-block-font-hljs-tag-font-style: null;--kbq-code-block-font-hljs-tag-font-weight: null;--kbq-code-block-font-hljs-template-tag-font-style: null;--kbq-code-block-font-hljs-template-tag-font-weight: null;--kbq-code-block-font-hljs-template-variable-font-style: null;--kbq-code-block-font-hljs-template-variable-font-weight: null;--kbq-code-block-font-hljs-title-font-style: null;--kbq-code-block-font-hljs-title-font-weight: null;--kbq-code-block-font-hljs-title-class-font-style: normal;--kbq-code-block-font-hljs-title-class-font-weight: 500;--kbq-code-block-font-hljs-title-class-inherited-font-style: null;--kbq-code-block-font-hljs-title-class-inherited-font-weight: null;--kbq-code-block-font-hljs-title-function-font-style: null;--kbq-code-block-font-hljs-title-function-font-weight: null;--kbq-code-block-font-hljs-title-function-invoke-font-style: null;--kbq-code-block-font-hljs-title-function-invoke-font-weight: null;--kbq-code-block-font-hljs-type-font-style: null;--kbq-code-block-font-hljs-type-font-weight: null;--kbq-code-block-font-hljs-variable-font-style: null;--kbq-code-block-font-hljs-variable-font-weight: null;--kbq-code-block-font-hljs-variable-constant-font-style: null;--kbq-code-block-font-hljs-variable-constant-font-weight: null;--kbq-code-block-font-hljs-variable-language-font-style: null;--kbq-code-block-font-hljs-variable-language-font-weight: null;--kbq-code-block-filled-container-background: var(--kbq-background-bg-secondary);--kbq-code-block-filled-container-border-color: transparent;--kbq-code-block-filled-header-background: var(--kbq-background-bg-secondary);--kbq-code-block-filled-header-scroll-shadow: var(--kbq-shadow-overflow-normal-bottom);--kbq-code-block-filled-actionbar-fade-gradient: linear-gradient( 90deg, transparent, var(--kbq-background-bg-secondary) );--kbq-code-block-filled-actionbar-background: var(--kbq-background-bg-secondary);--kbq-code-block-filled-collapse-expanded-background: transparent;--kbq-code-block-filled-collapse-collapsed-background: linear-gradient( 180deg, transparent, var(--kbq-background-bg-secondary) 100% );--kbq-code-block-filled-collapse-button-expand-background: var(--kbq-background-bg-secondary);--kbq-code-block-outline-container-background: var(--kbq-background-card);--kbq-code-block-outline-container-border-color: var(--kbq-divider-color, var(--kbq-line-contrast-less));--kbq-code-block-outline-header-background: var(--kbq-background-card);--kbq-code-block-outline-header-scroll-shadow: var(--kbq-shadow-overflow-normal-bottom);--kbq-code-block-outline-actionbar-fade-gradient: linear-gradient(90deg, transparent, var(--kbq-background-card));--kbq-code-block-outline-actionbar-background: var(--kbq-background-card);--kbq-code-block-outline-collapse-expanded-background: transparent;--kbq-code-block-outline-collapse-collapsed-background: linear-gradient( 180deg, transparent, var(--kbq-background-bg) 100% );--kbq-code-block-outline-collapse-button-expand-background: var(--kbq-background-card);--kbq-code-block-hljs-addition-background: var(--kbq-palette-green-95);--kbq-code-block-hljs-addition-color: var(--kbq-palette-green-25);--kbq-code-block-hljs-attr-background: null;--kbq-code-block-hljs-attr-color: null;--kbq-code-block-hljs-attribute-background: null;--kbq-code-block-hljs-attribute-color: null;--kbq-code-block-hljs-built-in-background: null;--kbq-code-block-hljs-built-in-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-bullet-background: null;--kbq-code-block-hljs-bullet-color: null;--kbq-code-block-hljs-char-escape-background: null;--kbq-code-block-hljs-char-escape-color: null;--kbq-code-block-hljs-class-background: null;--kbq-code-block-hljs-class-color: null;--kbq-code-block-hljs-code-background: null;--kbq-code-block-hljs-code-color: null;--kbq-code-block-hljs-comment-background: null;--kbq-code-block-hljs-comment-color: var(--kbq-palette-grey-60);--kbq-code-block-hljs-deletion-background: var(--kbq-palette-red-95);--kbq-code-block-hljs-deletion-color: var(--kbq-palette-red-35);--kbq-code-block-hljs-doctag-background: null;--kbq-code-block-hljs-doctag-color: null;--kbq-code-block-hljs-emphasis-background: null;--kbq-code-block-hljs-emphasis-color: null;--kbq-code-block-hljs-formula-background: null;--kbq-code-block-hljs-formula-color: null;--kbq-code-block-hljs-function-background: null;--kbq-code-block-hljs-function-color: null;--kbq-code-block-hljs-keyword-background: null;--kbq-code-block-hljs-keyword-color: null;--kbq-code-block-hljs-line-numbers-color: var(--kbq-foreground-contrast-secondary);--kbq-code-block-hljs-link-background: null;--kbq-code-block-hljs-link-color: null;--kbq-code-block-hljs-literal-background: null;--kbq-code-block-hljs-literal-color: var(--kbq-palette-purple-30);--kbq-code-block-hljs-meta-background: null;--kbq-code-block-hljs-meta-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-meta-keyword-background: null;--kbq-code-block-hljs-meta-keyword-color: null;--kbq-code-block-hljs-meta-string-background: null;--kbq-code-block-hljs-meta-string-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-meta-prompt-background: null;--kbq-code-block-hljs-meta-prompt-color: null;--kbq-code-block-hljs-name-background: null;--kbq-code-block-hljs-name-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-number-background: null;--kbq-code-block-hljs-number-color: var(--kbq-palette-purple-30);--kbq-code-block-hljs-operator-background: null;--kbq-code-block-hljs-operator-color: null;--kbq-code-block-hljs-params-background: null;--kbq-code-block-hljs-params-color: null;--kbq-code-block-hljs-property-background: null;--kbq-code-block-hljs-property-color: null;--kbq-code-block-hljs-punctuation-background: null;--kbq-code-block-hljs-punctuation-color: null;--kbq-code-block-hljs-quote-background: null;--kbq-code-block-hljs-quote-color: null;--kbq-code-block-hljs-regexp-background: null;--kbq-code-block-hljs-regexp-color: var(--kbq-palette-green-25);--kbq-code-block-hljs-section-background: null;--kbq-code-block-hljs-section-color: null;--kbq-code-block-hljs-selector-attr-background: null;--kbq-code-block-hljs-selector-attr-color: null;--kbq-code-block-hljs-selector-class-background: null;--kbq-code-block-hljs-selector-class-color: null;--kbq-code-block-hljs-selector-id-background: null;--kbq-code-block-hljs-selector-id-color: null;--kbq-code-block-hljs-selector-pseudo-background: null;--kbq-code-block-hljs-selector-pseudo-color: null;--kbq-code-block-hljs-selector-tag-background: null;--kbq-code-block-hljs-selector-tag-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-string-background: null;--kbq-code-block-hljs-string-color: var(--kbq-palette-green-25);--kbq-code-block-hljs-strong-background: null;--kbq-code-block-hljs-strong-color: null;--kbq-code-block-hljs-subst-background: null;--kbq-code-block-hljs-subst-color: null;--kbq-code-block-hljs-symbol-background: null;--kbq-code-block-hljs-symbol-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-tag-background: null;--kbq-code-block-hljs-tag-color: null;--kbq-code-block-hljs-template-tag-background: null;--kbq-code-block-hljs-template-tag-color: null;--kbq-code-block-hljs-template-variable-background: null;--kbq-code-block-hljs-template-variable-color: null;--kbq-code-block-hljs-title-background: null;--kbq-code-block-hljs-title-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-title-class-background: null;--kbq-code-block-hljs-title-class-color: null;--kbq-code-block-hljs-title-class-inherited-background: null;--kbq-code-block-hljs-title-class-inherited-color: null;--kbq-code-block-hljs-title-function-background: null;--kbq-code-block-hljs-title-function-color: null;--kbq-code-block-hljs-title-function-invoke-background: null;--kbq-code-block-hljs-title-function-invoke-color: null;--kbq-code-block-hljs-type-background: null;--kbq-code-block-hljs-type-color: null;--kbq-code-block-hljs-variable-background: null;--kbq-code-block-hljs-variable-color: null;--kbq-code-block-hljs-variable-constant-background: null;--kbq-code-block-hljs-variable-constant-color: null;--kbq-code-block-hljs-variable-language-background: null;--kbq-code-block-hljs-variable-language-color: null;--kbq-code-block-tab-size: 4}\n"], dependencies: [{ kind: "ngmodule", type: KbqTabsModule }, { kind: "component", type: i1.KbqTabNavBar, selector: "[kbqTabNavBar], [kbq-tab-nav-bar]", inputs: ["transparent", "onSurface", "underlined", "tabNavPanel"], exportAs: ["kbqTabNavBar"] }, { kind: "directive", type: i1.KbqTabLink, selector: "[kbqTabLink], [kbq-tab-link]", inputs: ["id", "active", "disabled", "tabIndex"], exportAs: ["kbqTabLink"] }, { kind: "directive", type: i1.KbqTabNavPanel, selector: "[kbqTabNavPanel]", inputs: ["id"], exportAs: ["kbqTabNavPanel"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i2.KbqButton, selector: "[kbq-button]", inputs: ["color", "tabIndex", "kbqStyle", "disabled"] }, { kind: "directive", type: i2.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "directive", type: KbqCodeBlockHighlight, selector: "code[kbqCodeBlockHighlight]", inputs: ["file", "startFrom", "singleLine"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i3.CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "ngmodule", type: CdkScrollableModule }, { kind: "directive", type: i4.CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "ngmodule", type: KbqToolTipModule }, { kind: "directive", type: i5.KbqTooltipTrigger, selector: "[kbqTooltip]", inputs: ["kbqVisible", "kbqPlacement", "kbqRelativeToPointer", "kbqPlacementPriority", "kbqTooltip", "kbqTooltipDisabled", "kbqEnterDelay", "kbqLeaveDelay", "kbqTrigger", "kbqTooltipClass", "kbqTooltipContext", "kbqTooltipColor", "kbqTooltipArrow", "kbqTooltipOffset"], outputs: ["kbqPlacementChange", "kbqVisibleChange"], exportAs: ["kbqTooltip"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i6.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
716
733
|
}
|
|
717
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type:
|
|
734
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqCodeBlock, decorators: [{
|
|
718
735
|
type: Component,
|
|
719
|
-
args: [{
|
|
736
|
+
args: [{ standalone: true, imports: [
|
|
737
|
+
KbqTabsModule,
|
|
738
|
+
KbqButtonModule,
|
|
739
|
+
KbqCodeBlockHighlight,
|
|
740
|
+
A11yModule,
|
|
741
|
+
CdkScrollableModule,
|
|
742
|
+
KbqToolTipModule,
|
|
743
|
+
KbqIconModule
|
|
744
|
+
], selector: 'kbq-code-block', exportAs: 'kbqCodeBlock', host: {
|
|
720
745
|
class: 'kbq-code-block',
|
|
721
746
|
'[class.kbq-code-block_filled]': 'filled',
|
|
722
747
|
'[class.kbq-code-block_outline]': '!filled',
|
|
723
748
|
'[class.kbq-code-block_hide-line-numbers]': '!lineNumbers',
|
|
724
|
-
'[class.kbq-code-
|
|
725
|
-
'[class.kbq-code-block_no-
|
|
726
|
-
'[class.kbq-code-
|
|
727
|
-
'
|
|
728
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<kbq-tab-group [class.kbq-focused]=\"hasKeyboardFocus\" (selectedTabChange)=\"onSelectTab($event)\">\n @for (codeFile of codeFiles; track codeFile; let i = $index) {\n <kbq-tab [disabled]=\"singleFile\">\n <ng-template kbq-tab-label>{{ codeFile.filename }}</ng-template>\n <pre\n #codeContent\n class=\"kbq-code-block__code kbq-scrollbar\"\n [class.kbq-code-block__code_soft-wrap]=\"softWrap\"\n [class.kbq-code-block__code_view-all]=\"viewAll\"\n [style.max-height]=\"getMaxHeight()\"\n (scroll)=\"checkOverflow(codeContent)\"\n ><kbq-actionbar-block\n [canLoad]=\"canLoad\"\n [class.kbq-actionbar-block_floating]=\"noHeader\"\n [codeFiles]=\"codeFiles\"\n [multiLine]=\"multiLine\"\n [selectedTabIndex]=\"selectedTabIndex\"\n [softWrap]=\"softWrap\"\n [style.opacity]=\"actionbarHidden ? 0 : null\"\n (copyCode)=\"copyCode()\"\n (downloadCode)=\"downloadCode()\"\n (openExternalSystem)=\"openExternalSystem()\"\n (toggleSoftWrap)=\"toggleSoftWrap()\"\n /><code\n kbqCodeBlockContent\n [file]=\"codeFiles[selectedTabIndex]\"\n [tabIndex]=\"canShowFocus(codeContent) ? 0 : -1\"\n (blur)=\"hasKeyboardFocus = false\"\n ></code></pre>\n @if (maxHeight) {\n <div\n class=\"kbq-code-block__show-more\"\n [class.kbq-code-block__show-more_collapsed]=\"!viewAll\"\n [class.kbq-code-block__show-more_expanded]=\"viewAll\"\n >\n <span class=\"bg-wrapper\">\n <button\n kbq-button\n [color]=\"'theme'\"\n [kbqStyle]=\"'transparent'\"\n (click)=\"onShowMoreClick(codeContent)\"\n (keydown.enter)=\"onEnter(codeContent)\"\n >\n @if (!viewAll) {\n <i kbq-icon=\"kbq-chevron-down_16\"></i>\n }\n @if (viewAll) {\n <i kbq-icon=\"kbq-chevron-up_16\"></i>\n }\n {{ viewAll ? config.viewLessText : config.viewAllText }}\n </button>\n </span>\n </div>\n }\n </kbq-tab>\n }\n</kbq-tab-group>\n", styles: [".kbq-code-block{display:block;position:relative;overflow:hidden;box-sizing:border-box;hyphens:none;-ms-hyphens:none;-moz-hyphens:none;-webkit-hyphens:none;border-radius:var(--kbq-code-block-size-container-border-radius);border-width:0}.kbq-code-block .kbq-tab-header{padding:calc(var(--kbq-code-block-size-header-padding-vertical) - var(--kbq-code-block-size-container-border-width)) calc(var(--kbq-code-block-size-header-padding-right) + 152px) var(--kbq-code-block-size-header-padding-vertical) var(--kbq-code-block-size-header-padding-left);border-width:var(--kbq-code-block-size-container-border-width) var(--kbq-code-block-size-container-border-width) 0 var(--kbq-code-block-size-container-border-width);border-style:solid;border-radius:var(--kbq-code-block-size-container-border-radius) var(--kbq-code-block-size-container-border-radius) 0 0}.kbq-code-block:has(.kbq-code-block__show-more) .kbq-code-block__code>code{padding-bottom:var(--kbq-size-3xl)!important;overflow-x:scroll}.kbq-code-block:has(.kbq-code-block__show-more):has(.kbq-code-block__show-more_collapsed) .kbq-code-block__code>code{overflow-x:hidden}.kbq-code-block .kbq-code-block__code>code{padding:var(--kbq-code-block-size-with-header-content-padding-top) var(--kbq-code-block-size-with-header-content-padding-horizontal) var(--kbq-code-block-size-with-header-content-padding-bottom) var(--kbq-code-block-size-with-header-content-padding-horizontal);border-radius:var(--kbq-code-block-size-container-border-radius)}.kbq-code-block .kbq-code-block__code>code:focus-visible{outline:none}.kbq-code-block .kbq-code-block__code .hljs-ln-numbers{padding-right:var(--kbq-code-block-size-with-header-content-content-gap-horizontal)}.kbq-code-block.kbq-code-block_hide-line-numbers .hljs-ln-line.hljs-ln-numbers{display:none}.kbq-code-block.kbq-code-block_single-file .kbq-tab-label:before{content:none}.kbq-code-block.kbq-code-block_single-file .kbq-tab-label:hover{background:transparent!important}.kbq-code-block:not(.kbq-code-block_no-header) .kbq-tab-body__wrapper{border-top-width:0;overflow:visible}.kbq-code-block.kbq-code-block_no-header .kbq-tab-header{display:none}.kbq-code-block.kbq-code-block_no-header .kbq-tab-body__wrapper{border-width:var(--kbq-code-block-size-container-border-width);border-radius:var(--kbq-code-block-size-container-border-radius)}.kbq-code-block.kbq-code-block_no-header .kbq-code-block__code{position:relative}.kbq-code-block.kbq-code-block_no-header .kbq-code-block__code>code{padding:var(--kbq-code-block-size-no-header-content-padding-vertical) var(--kbq-code-block-size-no-header-content-padding-horizontal)}.kbq-code-block.kbq-code-block_no-header .kbq-code-block__code .hljs-ln-numbers{padding-right:var(--kbq-code-block-size-no-header-content-content-gap-horizontal)}.kbq-code-block:not(:has(.kbq-code-block__show-more)) .kbq-code-block__code{overflow-y:auto}.kbq-code-block pre{margin:0}.kbq-code-block .kbq-tab-body__wrapper{flex-direction:column;border-width:var(--kbq-code-block-size-container-border-width);border-style:solid;border-radius:0 0 var(--kbq-code-block-size-container-border-radius) var(--kbq-code-block-size-container-border-radius)}.kbq-code-block .kbq-tab-body.kbq-tab-body__active{position:unset}.kbq-code-block__code{overflow-y:hidden}.kbq-code-block__code.kbq-code-block__code_view-all{max-height:unset;overflow-y:auto}.kbq-code-block__code.kbq-code-block__code_soft-wrap{white-space:pre-wrap}.kbq-code-block__code .hljs-ln{border-collapse:unset}.kbq-code-block__code .hljs-ln .hljs{padding:0}.kbq-code-block__code .hljs-ln-numbers{vertical-align:baseline;text-align:right}.kbq-code-block__code .hljs-ln-n:before{white-space:nowrap}.kbq-code-block__show-more{display:flex;justify-content:center;width:100%;position:absolute;bottom:0;border-radius:var(--kbq-code-block-size-container-border-radius)}.kbq-code-block__show-more.kbq-code-block__show-more_collapsed{padding-top:var(--kbq-code-block-size-collapse-collapsed-padding-top);padding-bottom:var(--kbq-code-block-size-collapse-collapsed-padding-bottom)}.kbq-code-block__show-more.kbq-code-block__show-more_expanded{padding-top:var(--kbq-code-block-size-collapse-expanded-padding-top);margin-bottom:var(--kbq-code-block-size-collapse-expanded-padding-bottom)}.kbq-code-block__show-more .bg-wrapper{border-radius:var(--kbq-size-border-radius)}.kbq-code-block .hljs{display:block;overflow-x:auto}.kbq-code-block .hljs-addition{background-color:var(--kbq-code-block-hljs-addition-background);color:var(--kbq-code-block-hljs-addition-color)}.kbq-code-block .hljs-attr{background-color:var(--kbq-code-block-hljs-attr-background);color:var(--kbq-code-block-hljs-attr-color)}.kbq-code-block .hljs-attribute{background-color:var(--kbq-code-block-hljs-attribute-background);color:var(--kbq-code-block-hljs-attribute-color)}.kbq-code-block .hljs-built_in{background-color:var(--kbq-code-block-hljs-built_in-background);color:var(--kbq-code-block-hljs-built_in-color)}.kbq-code-block .hljs-bullet{background-color:var(--kbq-code-block-hljs-bullet-background);color:var(--kbq-code-block-hljs-bullet-color)}.kbq-code-block .hljs-char-escape{background-color:var(--kbq-code-block-hljs-char-escape-background);color:var(--kbq-code-block-hljs-char-escape-color)}.kbq-code-block .hljs-class{background-color:var(--kbq-code-block-hljs-class-background);color:var(--kbq-code-block-hljs-class-color)}.kbq-code-block .hljs-code{background-color:var(--kbq-code-block-hljs-code-background);color:var(--kbq-code-block-hljs-code-color)}.kbq-code-block .hljs-comment{background-color:var(--kbq-code-block-hljs-comment-background);color:var(--kbq-code-block-hljs-comment-color)}.kbq-code-block .hljs-deletion{background-color:var(--kbq-code-block-hljs-deletion-background);color:var(--kbq-code-block-hljs-deletion-color)}.kbq-code-block .hljs-doctag{background-color:var(--kbq-code-block-hljs-doctag-background);color:var(--kbq-code-block-hljs-doctag-color)}.kbq-code-block .hljs-emphasis{background-color:var(--kbq-code-block-hljs-emphasis-background);color:var(--kbq-code-block-hljs-emphasis-color)}.kbq-code-block .hljs-formula{background-color:var(--kbq-code-block-hljs-formula-background);color:var(--kbq-code-block-hljs-formula-color)}.kbq-code-block .hljs-function{background-color:var(--kbq-code-block-hljs-function-background);color:var(--kbq-code-block-hljs-function-color)}.kbq-code-block .hljs-keyword{background-color:var(--kbq-code-block-hljs-keyword-background);color:var(--kbq-code-block-hljs-keyword-color)}.kbq-code-block .hljs-link{background-color:var(--kbq-code-block-hljs-link-background);color:var(--kbq-code-block-hljs-link-color)}.kbq-code-block .hljs-literal{background-color:var(--kbq-code-block-hljs-literal-background);color:var(--kbq-code-block-hljs-literal-color)}.kbq-code-block .hljs-meta{background-color:var(--kbq-code-block-hljs-meta-background);color:var(--kbq-code-block-hljs-meta-color)}.kbq-code-block .hljs-meta-keyword{background-color:var(--kbq-code-block-hljs-meta-keyword-background);color:var(--kbq-code-block-hljs-meta-keyword-color)}.kbq-code-block .hljs-meta-string{background-color:var(--kbq-code-block-hljs-meta-string-background);color:var(--kbq-code-block-hljs-meta-string-color)}.kbq-code-block .hljs-meta-prompt{background-color:var(--kbq-code-block-hljs-meta-prompt-background);color:var(--kbq-code-block-hljs-meta-prompt-color)}.kbq-code-block .hljs-name{background-color:var(--kbq-code-block-hljs-name-background);color:var(--kbq-code-block-hljs-name-color)}.kbq-code-block .hljs-number{background-color:var(--kbq-code-block-hljs-number-background);color:var(--kbq-code-block-hljs-number-color)}.kbq-code-block .hljs-operator{background-color:var(--kbq-code-block-hljs-operator-background);color:var(--kbq-code-block-hljs-operator-color)}.kbq-code-block .hljs-params{background-color:var(--kbq-code-block-hljs-params-background);color:var(--kbq-code-block-hljs-params-color)}.kbq-code-block .hljs-property{background-color:var(--kbq-code-block-hljs-property-background);color:var(--kbq-code-block-hljs-property-color)}.kbq-code-block .hljs-punctuation{background-color:var(--kbq-code-block-hljs-punctuation-background);color:var(--kbq-code-block-hljs-punctuation-color)}.kbq-code-block .hljs-quote{background-color:var(--kbq-code-block-hljs-quote-background);color:var(--kbq-code-block-hljs-quote-color)}.kbq-code-block .hljs-regexp{background-color:var(--kbq-code-block-hljs-regexp-background);color:var(--kbq-code-block-hljs-regexp-color)}.kbq-code-block .hljs-section{background-color:var(--kbq-code-block-hljs-section-background);color:var(--kbq-code-block-hljs-section-color)}.kbq-code-block .hljs-selector-attr{background-color:var(--kbq-code-block-hljs-selector-attr-background);color:var(--kbq-code-block-hljs-selector-attr-color)}.kbq-code-block .hljs-selector-class{background-color:var(--kbq-code-block-hljs-selector-class-background);color:var(--kbq-code-block-hljs-selector-class-color)}.kbq-code-block .hljs-selector-id{background-color:var(--kbq-code-block-hljs-selector-id-background);color:var(--kbq-code-block-hljs-selector-id-color)}.kbq-code-block .hljs-selector-pseudo{background-color:var(--kbq-code-block-hljs-selector-pseudo-background);color:var(--kbq-code-block-hljs-selector-pseudo-color)}.kbq-code-block .hljs-selector-tag{background-color:var(--kbq-code-block-hljs-selector-tag-background);color:var(--kbq-code-block-hljs-selector-tag-color)}.kbq-code-block .hljs-string{background-color:var(--kbq-code-block-hljs-string-background);color:var(--kbq-code-block-hljs-string-color)}.kbq-code-block .hljs-strong{background-color:var(--kbq-code-block-hljs-strong-background);color:var(--kbq-code-block-hljs-strong-color)}.kbq-code-block .hljs-subst{background-color:var(--kbq-code-block-hljs-subst-background);color:var(--kbq-code-block-hljs-subst-color)}.kbq-code-block .hljs-symbol{background-color:var(--kbq-code-block-hljs-symbol-background);color:var(--kbq-code-block-hljs-symbol-color)}.kbq-code-block .hljs-tag{background-color:var(--kbq-code-block-hljs-tag-background);color:var(--kbq-code-block-hljs-tag-color)}.kbq-code-block .hljs-template-tag{background-color:var(--kbq-code-block-hljs-template-tag-background);color:var(--kbq-code-block-hljs-template-tag-color)}.kbq-code-block .hljs-template-variable{background-color:var(--kbq-code-block-hljs-template-variable-background);color:var(--kbq-code-block-hljs-template-variable-color)}.kbq-code-block .hljs-title{background-color:var(--kbq-code-block-hljs-title-background);color:var(--kbq-code-block-hljs-title-color)}.kbq-code-block .hljs-title-class{background-color:var(--kbq-code-block-hljs-title-class-background);color:var(--kbq-code-block-hljs-title-class-color)}.kbq-code-block .hljs-title-class-inherited{background-color:var(--kbq-code-block-hljs-title-class-inherited-background);color:var(--kbq-code-block-hljs-title-class-inherited-color)}.kbq-code-block .hljs-title-function{background-color:var(--kbq-code-block-hljs-title-function-background);color:var(--kbq-code-block-hljs-title-function-color)}.kbq-code-block .hljs-title-function-invoke{background-color:var(--kbq-code-block-hljs-title-function-invoke-background);color:var(--kbq-code-block-hljs-title-function-invoke-color)}.kbq-code-block .hljs-type{background-color:var(--kbq-code-block-hljs-type-background);color:var(--kbq-code-block-hljs-type-color)}.kbq-code-block .hljs-variable{background-color:var(--kbq-code-block-hljs-variable-background);color:var(--kbq-code-block-hljs-variable-color)}.kbq-code-block .hljs-variable-constant{background-color:var(--kbq-code-block-hljs-variable-constant-background);color:var(--kbq-code-block-hljs-variable-constant-color)}.kbq-code-block .hljs-variable-language{background-color:var(--kbq-code-block-hljs-variable-language-background);color:var(--kbq-code-block-hljs-variable-language-color)}.kbq-code-block .hljs-ln-n{color:var(--kbq-code-block-hljs-line-numbers-color)}.kbq-code-block.kbq-code-block_outline{background:var(--kbq-code-block-outline-container-background)}.kbq-code-block.kbq-code-block_outline .kbq-tab-header{background:var(--kbq-code-block-outline-header-background)!important;border-color:var(--kbq-code-block-outline-container-border-color)}.kbq-code-block.kbq-code-block_outline .kbq-tab-body__wrapper{border-color:var(--kbq-code-block-outline-container-border-color)}.kbq-code-block.kbq-code-block_outline:not(.kbq-code-block_no-header) .kbq-tab-body__wrapper{border-top-color:transparent}.kbq-code-block.kbq-code-block_outline .kbq-code-block-actionbar,.kbq-code-block.kbq-code-block_outline .kbq-code-block-actionbar.kbq-actionbar-block_floating .kbq-actionbar-block__button-stack{background:var(--kbq-code-block-outline-actionbar-background)}.kbq-code-block.kbq-code-block_outline.kbq-code-block_header-with-shadow .kbq-tab-header{box-shadow:var(--kbq-code-block-outline-header-scroll-shadow)}.kbq-code-block.kbq-code-block_outline.kbq-code-block_no-header .kbq-code-block__fade-gradient{background:var(--kbq-code-block-outline-actionbar-fade-gradient)}.kbq-code-block.kbq-code-block_outline .kbq-code-block__show-more .bg-wrapper{background:var(--kbq-code-block-outline-collapse-button-expand-background);opacity:90%}.kbq-code-block.kbq-code-block_outline .kbq-code-block__show-more_expanded{background:var(--kbq-code-block-outline-collapse-expanded-background)}.kbq-code-block.kbq-code-block_outline .kbq-code-block__show-more_collapsed{background:var(--kbq-code-block-outline-collapse-collapsed-background)}.kbq-code-block.kbq-code-block_filled{background:var(--kbq-code-block-filled-container-background)}.kbq-code-block.kbq-code-block_filled .kbq-tab-header{background:var(--kbq-code-block-filled-header-background)!important;border-color:var(--kbq-code-block-filled-container-border-color)}.kbq-code-block.kbq-code-block_filled .kbq-tab-body__wrapper{border-color:var(--kbq-code-block-filled-container-border-color)}.kbq-code-block.kbq-code-block_filled:not(.kbq-code-block_no-header) .kbq-tab-body__wrapper{border-top-color:transparent}.kbq-code-block.kbq-code-block_filled .kbq-code-block-actionbar,.kbq-code-block.kbq-code-block_filled .kbq-code-block-actionbar.kbq-actionbar-block_floating .kbq-actionbar-block__button-stack{background:var(--kbq-code-block-filled-actionbar-background)}.kbq-code-block.kbq-code-block_filled.kbq-code-block_header-with-shadow .kbq-tab-header{box-shadow:var(--kbq-code-block-filled-header-scroll-shadow)}.kbq-code-block.kbq-code-block_filled.kbq-code-block_no-header .kbq-code-block__fade-gradient{background:var(--kbq-code-block-filled-actionbar-fade-gradient)}.kbq-code-block.kbq-code-block_filled .kbq-code-block__show-more .bg-wrapper{background:var(--kbq-code-block-filled-collapse-button-expand-background);opacity:90%}.kbq-code-block.kbq-code-block_filled .kbq-code-block__show-more_expanded{background:var(--kbq-code-block-filled-collapse-expanded-background)}.kbq-code-block.kbq-code-block_filled .kbq-code-block__show-more_collapsed{background:var(--kbq-code-block-filled-collapse-collapsed-background)}.kbq-code-block .kbq-tab-header .kbq-tab-label.kbq-tab-label_horizontal,.kbq-code-block .kbq-tab-header .kbq-tab-header__pagination{border-bottom-color:transparent}.kbq-code-block .kbq-tab-group.kbq-focused .kbq-tab-header{box-shadow:0 2px 0 -1px var(--kbq-states-line-focus-theme)}.kbq-code-block .kbq-tab-group.kbq-focused .kbq-tab-body__wrapper{border-color:var(--kbq-states-line-focus-theme);box-shadow:inset 0 0 .1 1px var(--kbq-states-line-focus-theme)}.kbq-code-block{font-size:var(--kbq-typography-mono-codeblock-font-size);font-weight:var(--kbq-typography-mono-codeblock-font-weight);line-height:var(--kbq-typography-mono-codeblock-line-height);font-family:var(--kbq-typography-mono-codeblock-font-family);text-transform:var(--kbq-typography-mono-codeblock-text-transform);font-feature-settings:var(--kbq-typography-mono-codeblock-font-feature-settings);letter-spacing:var(--kbq-typography-mono-codeblock-letter-spacing)}.kbq-code-block .kbq-code-block__code{font:inherit}.kbq-code-block .kbq-code-block__code>code{font:inherit}\n", ".kbq-code-block{--kbq-code-block-size-container-border-width: 1px;--kbq-code-block-size-container-border-radius: var(--kbq-size-m);--kbq-code-block-size-with-header-content-padding-top: var(--kbq-size-xxs);--kbq-code-block-size-with-header-content-padding-bottom: var(--kbq-size-l);--kbq-code-block-size-with-header-content-padding-horizontal: var(--kbq-size-xl);--kbq-code-block-size-with-header-content-content-gap-horizontal: var(--kbq-size-m);--kbq-code-block-size-no-header-content-padding-vertical: 14px;--kbq-code-block-size-no-header-content-padding-horizontal: 20px;--kbq-code-block-size-no-header-content-content-gap-horizontal: var(--kbq-size-m);--kbq-code-block-size-header-padding-vertical: var(--kbq-size-s);--kbq-code-block-size-header-padding-left: var(--kbq-size-m);--kbq-code-block-size-header-padding-right: var(--kbq-size-s);--kbq-code-block-size-header-content-gap-horizontal: var(--kbq-size-l);--kbq-code-block-size-actionbar-content-gap-horizontal: var(--kbq-size-3xs);--kbq-code-block-size-actionbar-padding-vertical: var(--kbq-size-s);--kbq-code-block-size-actionbar-padding-horizontal: var(--kbq-size-m);--kbq-code-block-size-actionbar-fade-gradient-width: var(--kbq-size-3xl);--kbq-code-block-size-collapse-expanded-padding-top: 0;--kbq-code-block-size-collapse-expanded-padding-bottom: var(--kbq-size-l);--kbq-code-block-size-collapse-collapsed-padding-top: var(--kbq-size-3xl);--kbq-code-block-size-collapse-collapsed-padding-bottom: var(--kbq-size-l);--kbq-code-block-font-hljs-addition-font-style: null;--kbq-code-block-font-hljs-addition-font-weight: null;--kbq-code-block-font-hljs-attr-font-style: null;--kbq-code-block-font-hljs-attr-font-weight: null;--kbq-code-block-font-hljs-attribute-font-style: null;--kbq-code-block-font-hljs-attribute-font-weight: null;--kbq-code-block-font-hljs-built-in-font-style: null;--kbq-code-block-font-hljs-built-in-font-weight: null;--kbq-code-block-font-hljs-bullet-font-style: null;--kbq-code-block-font-hljs-bullet-font-weight: null;--kbq-code-block-font-hljs-char-escape-font-style: null;--kbq-code-block-font-hljs-char-escape-font-weight: null;--kbq-code-block-font-hljs-class-font-style: null;--kbq-code-block-font-hljs-class-font-weight: null;--kbq-code-block-font-hljs-code-font-style: null;--kbq-code-block-font-hljs-code-font-weight: null;--kbq-code-block-font-hljs-comment-font-style: null;--kbq-code-block-font-hljs-comment-font-weight: null;--kbq-code-block-font-hljs-deletion-font-style: null;--kbq-code-block-font-hljs-deletion-font-weight: null;--kbq-code-block-font-hljs-doctag-font-style: null;--kbq-code-block-font-hljs-doctag-font-weight: null;--kbq-code-block-font-hljs-emphasis-font-style: null;--kbq-code-block-font-hljs-emphasis-font-weight: null;--kbq-code-block-font-hljs-formula-font-style: null;--kbq-code-block-font-hljs-formula-font-weight: null;--kbq-code-block-font-hljs-function-font-style: null;--kbq-code-block-font-hljs-function-font-weight: null;--kbq-code-block-font-hljs-keyword-font-style: null;--kbq-code-block-font-hljs-keyword-font-weight: null;--kbq-code-block-font-hljs-link-font-style: null;--kbq-code-block-font-hljs-link-font-weight: null;--kbq-code-block-font-hljs-literal-font-style: null;--kbq-code-block-font-hljs-literal-font-weight: null;--kbq-code-block-font-hljs-meta-font-style: null;--kbq-code-block-font-hljs-meta-font-weight: null;--kbq-code-block-font-hljs-meta-keyword-font-style: null;--kbq-code-block-font-hljs-meta-keyword-font-weight: null;--kbq-code-block-font-hljs-meta-string-font-style: null;--kbq-code-block-font-hljs-meta-string-font-weight: null;--kbq-code-block-font-hljs-meta-prompt-font-style: null;--kbq-code-block-font-hljs-meta-prompt-font-weight: null;--kbq-code-block-font-hljs-name-font-style: null;--kbq-code-block-font-hljs-name-font-weight: null;--kbq-code-block-font-hljs-number-font-style: null;--kbq-code-block-font-hljs-number-font-weight: null;--kbq-code-block-font-hljs-operator-font-style: null;--kbq-code-block-font-hljs-operator-font-weight: null;--kbq-code-block-font-hljs-params-font-style: null;--kbq-code-block-font-hljs-params-font-weight: null;--kbq-code-block-font-hljs-property-font-style: null;--kbq-code-block-font-hljs-property-font-weight: null;--kbq-code-block-font-hljs-punctuation-font-style: null;--kbq-code-block-font-hljs-punctuation-font-weight: null;--kbq-code-block-font-hljs-quote-font-style: null;--kbq-code-block-font-hljs-quote-font-weight: null;--kbq-code-block-font-hljs-regexp-font-style: null;--kbq-code-block-font-hljs-regexp-font-weight: null;--kbq-code-block-font-hljs-section-font-style: null;--kbq-code-block-font-hljs-section-font-weight: null;--kbq-code-block-font-hljs-selector-attr-font-style: null;--kbq-code-block-font-hljs-selector-attr-font-weight: null;--kbq-code-block-font-hljs-selector-class-font-style: null;--kbq-code-block-font-hljs-selector-class-font-weight: null;--kbq-code-block-font-hljs-selector-id-font-style: null;--kbq-code-block-font-hljs-selector-id-font-weight: null;--kbq-code-block-font-hljs-selector-pseudo-font-style: null;--kbq-code-block-font-hljs-selector-pseudo-font-weight: null;--kbq-code-block-font-hljs-selector-tag-font-style: null;--kbq-code-block-font-hljs-selector-tag-font-weight: null;--kbq-code-block-font-hljs-string-font-style: null;--kbq-code-block-font-hljs-string-font-weight: null;--kbq-code-block-font-hljs-strong-font-style: null;--kbq-code-block-font-hljs-strong-font-weight: null;--kbq-code-block-font-hljs-subst-font-style: null;--kbq-code-block-font-hljs-subst-font-weight: null;--kbq-code-block-font-hljs-symbol-font-style: null;--kbq-code-block-font-hljs-symbol-font-weight: null;--kbq-code-block-font-hljs-tag-font-style: null;--kbq-code-block-font-hljs-tag-font-weight: null;--kbq-code-block-font-hljs-template-tag-font-style: null;--kbq-code-block-font-hljs-template-tag-font-weight: null;--kbq-code-block-font-hljs-template-variable-font-style: null;--kbq-code-block-font-hljs-template-variable-font-weight: null;--kbq-code-block-font-hljs-title-font-style: null;--kbq-code-block-font-hljs-title-font-weight: null;--kbq-code-block-font-hljs-title-class-font-style: normal;--kbq-code-block-font-hljs-title-class-font-weight: 500;--kbq-code-block-font-hljs-title-class-inherited-font-style: null;--kbq-code-block-font-hljs-title-class-inherited-font-weight: null;--kbq-code-block-font-hljs-title-function-font-style: null;--kbq-code-block-font-hljs-title-function-font-weight: null;--kbq-code-block-font-hljs-title-function-invoke-font-style: null;--kbq-code-block-font-hljs-title-function-invoke-font-weight: null;--kbq-code-block-font-hljs-type-font-style: null;--kbq-code-block-font-hljs-type-font-weight: null;--kbq-code-block-font-hljs-variable-font-style: null;--kbq-code-block-font-hljs-variable-font-weight: null;--kbq-code-block-font-hljs-variable-constant-font-style: null;--kbq-code-block-font-hljs-variable-constant-font-weight: null;--kbq-code-block-font-hljs-variable-language-font-style: null;--kbq-code-block-font-hljs-variable-language-font-weight: null;--kbq-code-block-filled-container-background: var(--kbq-background-bg-secondary);--kbq-code-block-filled-container-border-color: transparent;--kbq-code-block-filled-header-background: var(--kbq-background-bg-secondary);--kbq-code-block-filled-header-scroll-shadow: var(--kbq-shadow-overflow-normal-bottom);--kbq-code-block-filled-actionbar-fade-gradient: linear-gradient( 90deg, transparent, var(--kbq-background-bg-secondary) );--kbq-code-block-filled-actionbar-background: var(--kbq-background-bg-secondary);--kbq-code-block-filled-collapse-expanded-background: transparent;--kbq-code-block-filled-collapse-collapsed-background: linear-gradient( 180deg, hsla(225, 15%, 95%, 0%) 0%, hsla(225, 15%, 95%, 100%) 100% );--kbq-code-block-filled-collapse-button-expand-background: var(--kbq-background-bg-secondary);--kbq-code-block-outline-container-background: var(--kbq-background-card);--kbq-code-block-outline-container-border-color: var(--kbq-divider-color, var(--kbq-line-contrast-less));--kbq-code-block-outline-header-background: var(--kbq-background-card);--kbq-code-block-outline-header-scroll-shadow: var(--kbq-shadow-overflow-normal-bottom);--kbq-code-block-outline-actionbar-fade-gradient: linear-gradient(90deg, transparent, var(--kbq-background-card));--kbq-code-block-outline-actionbar-background: var(--kbq-background-card);--kbq-code-block-outline-collapse-expanded-background: transparent;--kbq-code-block-outline-collapse-collapsed-background: linear-gradient( 180deg, hsla(0, 0%, 100%, 0%) 0%, hsla(0, 0%, 100%, 100%) 100% );--kbq-code-block-outline-collapse-button-expand-background: var(--kbq-background-card);--kbq-code-block-hljs-addition-background: var(--kbq-palette-green-95);--kbq-code-block-hljs-addition-color: var(--kbq-palette-green-25);--kbq-code-block-hljs-attr-background: null;--kbq-code-block-hljs-attr-color: null;--kbq-code-block-hljs-attribute-background: null;--kbq-code-block-hljs-attribute-color: null;--kbq-code-block-hljs-built-in-background: null;--kbq-code-block-hljs-built-in-color: null;--kbq-code-block-hljs-bullet-background: null;--kbq-code-block-hljs-bullet-color: null;--kbq-code-block-hljs-char-escape-background: null;--kbq-code-block-hljs-char-escape-color: null;--kbq-code-block-hljs-class-background: null;--kbq-code-block-hljs-class-color: null;--kbq-code-block-hljs-code-background: null;--kbq-code-block-hljs-code-color: null;--kbq-code-block-hljs-comment-background: null;--kbq-code-block-hljs-comment-color: var(--kbq-palette-grey-60);--kbq-code-block-hljs-deletion-background: var(--kbq-palette-red-95);--kbq-code-block-hljs-deletion-color: var(--kbq-palette-red-35);--kbq-code-block-hljs-doctag-background: null;--kbq-code-block-hljs-doctag-color: null;--kbq-code-block-hljs-emphasis-background: null;--kbq-code-block-hljs-emphasis-color: null;--kbq-code-block-hljs-formula-background: null;--kbq-code-block-hljs-formula-color: null;--kbq-code-block-hljs-function-background: null;--kbq-code-block-hljs-function-color: null;--kbq-code-block-hljs-keyword-background: null;--kbq-code-block-hljs-keyword-color: null;--kbq-code-block-hljs-line-numbers-color: var(--kbq-foreground-contrast-secondary);--kbq-code-block-hljs-link-background: null;--kbq-code-block-hljs-link-color: null;--kbq-code-block-hljs-literal-background: null;--kbq-code-block-hljs-literal-color: var(--kbq-palette-purple-30);--kbq-code-block-hljs-meta-background: null;--kbq-code-block-hljs-meta-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-meta-keyword-background: null;--kbq-code-block-hljs-meta-keyword-color: null;--kbq-code-block-hljs-meta-string-background: null;--kbq-code-block-hljs-meta-string-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-meta-prompt-background: null;--kbq-code-block-hljs-meta-prompt-color: null;--kbq-code-block-hljs-name-background: null;--kbq-code-block-hljs-name-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-number-background: null;--kbq-code-block-hljs-number-color: var(--kbq-palette-purple-30);--kbq-code-block-hljs-operator-background: null;--kbq-code-block-hljs-operator-color: null;--kbq-code-block-hljs-params-background: null;--kbq-code-block-hljs-params-color: null;--kbq-code-block-hljs-property-background: null;--kbq-code-block-hljs-property-color: null;--kbq-code-block-hljs-punctuation-background: null;--kbq-code-block-hljs-punctuation-color: null;--kbq-code-block-hljs-quote-background: null;--kbq-code-block-hljs-quote-color: null;--kbq-code-block-hljs-regexp-background: null;--kbq-code-block-hljs-regexp-color: var(--kbq-palette-green-25);--kbq-code-block-hljs-section-background: null;--kbq-code-block-hljs-section-color: null;--kbq-code-block-hljs-selector-attr-background: null;--kbq-code-block-hljs-selector-attr-color: null;--kbq-code-block-hljs-selector-class-background: null;--kbq-code-block-hljs-selector-class-color: null;--kbq-code-block-hljs-selector-id-background: null;--kbq-code-block-hljs-selector-id-color: null;--kbq-code-block-hljs-selector-pseudo-background: null;--kbq-code-block-hljs-selector-pseudo-color: null;--kbq-code-block-hljs-selector-tag-background: null;--kbq-code-block-hljs-selector-tag-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-string-background: null;--kbq-code-block-hljs-string-color: var(--kbq-palette-green-25);--kbq-code-block-hljs-strong-background: null;--kbq-code-block-hljs-strong-color: null;--kbq-code-block-hljs-subst-background: null;--kbq-code-block-hljs-subst-color: null;--kbq-code-block-hljs-symbol-background: null;--kbq-code-block-hljs-symbol-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-tag-background: null;--kbq-code-block-hljs-tag-color: null;--kbq-code-block-hljs-template-tag-background: null;--kbq-code-block-hljs-template-tag-color: null;--kbq-code-block-hljs-template-variable-background: null;--kbq-code-block-hljs-template-variable-color: null;--kbq-code-block-hljs-title-background: null;--kbq-code-block-hljs-title-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-title-class-background: null;--kbq-code-block-hljs-title-class-color: null;--kbq-code-block-hljs-title-class-inherited-background: null;--kbq-code-block-hljs-title-class-inherited-color: null;--kbq-code-block-hljs-title-function-background: null;--kbq-code-block-hljs-title-function-color: null;--kbq-code-block-hljs-title-function-invoke-background: null;--kbq-code-block-hljs-title-function-invoke-color: null;--kbq-code-block-hljs-type-background: null;--kbq-code-block-hljs-type-color: null;--kbq-code-block-hljs-variable-background: null;--kbq-code-block-hljs-variable-color: null;--kbq-code-block-hljs-variable-constant-background: null;--kbq-code-block-hljs-variable-constant-color: null;--kbq-code-block-hljs-variable-language-background: null;--kbq-code-block-hljs-variable-language-color: null}\n"] }]
|
|
729
|
-
}], ctorParameters: () => [
|
|
730
|
-
type: Optional
|
|
731
|
-
}, {
|
|
732
|
-
type: Inject,
|
|
733
|
-
args: [KBQ_CODE_BLOCK_CONFIGURATION]
|
|
734
|
-
}] }, { type: i4.KbqLocaleService, decorators: [{
|
|
735
|
-
type: Optional
|
|
736
|
-
}, {
|
|
737
|
-
type: Inject,
|
|
738
|
-
args: [KBQ_LOCALE_SERVICE]
|
|
739
|
-
}] }], propDecorators: { tabGroup: [{
|
|
749
|
+
'[class.kbq-code-block_hide-tabs]': 'hideTabs',
|
|
750
|
+
'[class.kbq-code-block_no-border]': 'noBorder || filled',
|
|
751
|
+
'[class.kbq-code-block_soft-wrap]': 'softWrap',
|
|
752
|
+
'[class.kbq-code-block_view-all]': 'viewAll'
|
|
753
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@let file = files[activeFileIndex];\n\n<div class=\"kbq-code-block__header\">\n @if (!hideTabs) {\n <div class=\"kbq-code-block__header-tabs\">\n <div kbqTabNavBar transparent [tabNavPanel]=\"tabPanel\">\n @for (file of files; track file; let index = $index) {\n <div\n kbqTabLink\n [active]=\"activeFileIndex === index\"\n [disabled]=\"files.length === 1\"\n (click)=\"onSelectedTabChange(index)\"\n >\n {{ file.filename || fallbackFileName }}\n </div>\n }\n </div>\n </div>\n }\n\n <div class=\"kbq-code-block__actionbar\">\n @if (hideTabs) {\n <div class=\"kbq-code-block__actionbar__fade-gradient\"></div>\n }\n\n <div class=\"kbq-code-block__actionbar__button-stack\">\n @if (canToggleSoftWrap) {\n <button\n kbq-button\n class=\"kbq-code-block__actionbar__soft-wrap-button\"\n [color]=\"componentColor.Contrast\"\n [kbqStyle]=\"buttonStyle.Transparent\"\n [kbqTooltip]=\"\n softWrap ? localeConfiguration.softWrapOffTooltip : localeConfiguration.softWrapOnTooltip\n \"\n (click)=\"toggleSoftWrap()\"\n >\n @if (softWrap) {\n <i kbq-icon=\"kbq-wrap-text-slash_16\"></i>\n } @else {\n <i kbq-icon=\"kbq-wrap-text_16\"></i>\n }\n </button>\n }\n\n @if (canDownload) {\n <button\n kbq-button\n class=\"kbq-code-block__actionbar__download-button\"\n [color]=\"componentColor.Contrast\"\n [kbqStyle]=\"buttonStyle.Transparent\"\n [kbqTooltip]=\"localeConfiguration.downloadTooltip\"\n (click)=\"downloadCode()\"\n >\n <i kbq-icon=\"kbq-arrow-down-to-line_16\"></i>\n </button>\n }\n\n @if (canCopy) {\n <div #copyButtonTooltip=\"kbqTooltip\" [kbqTooltip]=\"localeConfiguration.copyTooltip\">\n <button\n kbq-button\n class=\"kbq-code-block__actionbar__copy-button\"\n [color]=\"componentColor.Contrast\"\n [kbqStyle]=\"buttonStyle.Transparent\"\n (click)=\"copyCode()\"\n >\n <i kbq-icon=\"kbq-file-multiple-o_16\"></i>\n </button>\n </div>\n }\n\n @if (file.link) {\n <button\n kbq-button\n class=\"kbq-code-block__actionbar__link-button\"\n [color]=\"componentColor.Contrast\"\n [kbqStyle]=\"buttonStyle.Transparent\"\n [kbqTooltip]=\"localeConfiguration.openExternalSystemTooltip\"\n (click)=\"openLink()\"\n >\n <i kbq-icon=\"kbq-arrow-up-right-from-square_16\"></i>\n </button>\n }\n </div>\n </div>\n</div>\n\n<pre\n #tabPanel=\"kbqTabNavPanel\"\n cdkMonitorElementFocus\n cdkScrollable\n kbqTabNavPanel\n class=\"kbq-code-block__content kbq-scrollbar\"\n [style.max-height.px]=\"calculatedMaxHeight\"\n [tabIndex]=\"codeContentTabIndex\"\n><code kbqCodeBlockHighlight class=\"kbq-code-block__code\" [file]=\"file\"></code></pre>\n\n@if (maxHeight) {\n <div\n class=\"kbq-code-block__view-all\"\n [class.kbq-code-block__view-all_collapsed]=\"!viewAll\"\n [class.kbq-code-block__view-all_expanded]=\"viewAll\"\n >\n <div class=\"kbq-code-block__view-all__wrapper\">\n <button\n kbq-button\n class=\"kbq-code-block__view-all__button\"\n [color]=\"componentColor.Theme\"\n [kbqStyle]=\"buttonStyle.Transparent\"\n (click)=\"toggleViewAll()\"\n (keydown.enter)=\"onViewAllEnterKeydown()\"\n >\n @if (viewAll) {\n <i kbq-icon=\"kbq-chevron-up_16\"></i>\n {{ localeConfiguration.viewLessText }}\n } @else {\n <i kbq-icon=\"kbq-chevron-down_16\"></i>\n {{ localeConfiguration.viewAllText }}\n }\n </button>\n </div>\n </div>\n}\n", styles: [".kbq-code-block{display:flex;flex-direction:column;position:relative;overflow:hidden;border-width:var(--kbq-code-block-size-container-border-width);border-style:solid;border-radius:var(--kbq-code-block-size-container-border-radius);box-sizing:border-box;hyphens:none;-ms-hyphens:none;-moz-hyphens:none;-webkit-hyphens:none}.kbq-code-block .kbq-code-block__header{display:flex;align-items:center;padding:var(--kbq-size-s) var(--kbq-size-m)}.kbq-code-block .kbq-code-block__header .kbq-code-block__header-tabs{overflow:hidden;flex-grow:1}.kbq-code-block .kbq-code-block__actionbar{display:flex;justify-content:right;align-items:center;z-index:1}.kbq-code-block .kbq-code-block__actionbar .kbq-code-block__actionbar__button-stack{display:flex;gap:var(--kbq-code-block-size-actionbar-content-gap-horizontal)}.kbq-code-block .kbq-code-block__actionbar .kbq-code-block__actionbar__fade-gradient{align-self:stretch;width:var(--kbq-code-block-size-actionbar-fade-gradient-width)}.kbq-code-block:has(.kbq-code-block__view-all) .kbq-code-block__content .kbq-code-block__code{padding-bottom:var(--kbq-size-3xl)!important}.kbq-code-block .kbq-code-block__content{flex-grow:1;margin:0;flex-direction:column;border-width:var(--kbq-code-block-size-container-border-width);border-style:solid;border-radius:var(--kbq-code-block-size-container-border-radius)}.kbq-code-block .kbq-code-block__content .kbq-code-block__code{tab-size:var(--kbq-code-block-tab-size);padding:var(--kbq-code-block-size-with-header-content-padding-top) var(--kbq-code-block-size-with-header-content-padding-horizontal) var(--kbq-code-block-size-with-header-content-padding-bottom) var(--kbq-code-block-size-with-header-content-padding-horizontal)}.kbq-code-block .kbq-code-block__content .kbq-code-block__code:focus-visible{outline:none}.kbq-code-block .kbq-code-block__content .hljs{display:block}.kbq-code-block .kbq-code-block__content .hljs-ln-numbers{padding-right:var(--kbq-code-block-size-with-header-content-content-gap-horizontal);vertical-align:baseline;text-align:right}.kbq-code-block .kbq-code-block__content .hljs-ln{border-collapse:unset}.kbq-code-block .kbq-code-block__content .hljs-ln .hljs{padding:0}.kbq-code-block .kbq-code-block__content .hljs-ln-n:before{white-space:nowrap}.kbq-code-block.kbq-code-block_hide-line-numbers .hljs-ln-line.hljs-ln-numbers{display:none}.kbq-code-block.kbq-code-block_soft-wrap .kbq-code-block__code{white-space:pre-wrap}.kbq-code-block.kbq-code-block_view-all .kbq-code-block__content{max-height:unset;overflow:auto}.kbq-code-block.kbq-code-block_hide-tabs .kbq-code-block__header{padding:0}.kbq-code-block.kbq-code-block_hide-tabs .kbq-code-block__actionbar{display:none;position:absolute;top:0;right:0;padding:var(--kbq-size-s) var(--kbq-size-m)}.kbq-code-block.kbq-code-block_hide-tabs .kbq-code-block__content{position:relative}.kbq-code-block.kbq-code-block_hide-tabs .kbq-code-block__content .kbq-code-block__code{padding:var(--kbq-code-block-size-no-header-content-padding-vertical) var(--kbq-code-block-size-no-header-content-padding-horizontal)}.kbq-code-block.kbq-code-block_hide-tabs .kbq-code-block__content .hljs-ln-numbers{padding-right:var(--kbq-code-block-size-no-header-content-content-gap-horizontal)}.kbq-code-block.kbq-code-block_show-actionbar .kbq-code-block__actionbar{display:flex}.kbq-code-block:not(:has(.kbq-code-block__view-all)) .kbq-code-block__content{overflow:auto}.kbq-code-block .kbq-code-block__view-all{display:flex;justify-content:center;width:100%;position:absolute;bottom:0;border-radius:var(--kbq-code-block-size-container-border-radius)}.kbq-code-block .kbq-code-block__view-all .kbq-code-block__view-all__wrapper{border-radius:var(--kbq-size-border-radius)}.kbq-code-block .kbq-code-block__view-all.kbq-code-block__view-all_collapsed{padding-top:var(--kbq-code-block-size-collapse-collapsed-padding-top);padding-bottom:var(--kbq-code-block-size-collapse-collapsed-padding-bottom)}.kbq-code-block .kbq-code-block__view-all.kbq-code-block__view-all_expanded{padding-top:var(--kbq-code-block-size-collapse-expanded-padding-top);margin-bottom:var(--kbq-code-block-size-collapse-expanded-padding-bottom)}.kbq-code-block.kbq-code-block_no-border{border-color:transparent!important}.kbq-code-block .hljs-addition{background-color:var(--kbq-code-block-hljs-addition-background);color:var(--kbq-code-block-hljs-addition-color)}.kbq-code-block .hljs-attr{background-color:var(--kbq-code-block-hljs-attr-background);color:var(--kbq-code-block-hljs-attr-color)}.kbq-code-block .hljs-attribute{background-color:var(--kbq-code-block-hljs-attribute-background);color:var(--kbq-code-block-hljs-attribute-color)}.kbq-code-block .hljs-built_in{background-color:var(--kbq-code-block-hljs-built-in-background);color:var(--kbq-code-block-hljs-built-in-color)}.kbq-code-block .hljs-bullet{background-color:var(--kbq-code-block-hljs-bullet-background);color:var(--kbq-code-block-hljs-bullet-color)}.kbq-code-block .hljs-char-escape{background-color:var(--kbq-code-block-hljs-char-escape-background);color:var(--kbq-code-block-hljs-char-escape-color)}.kbq-code-block .hljs-class{background-color:var(--kbq-code-block-hljs-class-background);color:var(--kbq-code-block-hljs-class-color)}.kbq-code-block .hljs-code{background-color:var(--kbq-code-block-hljs-code-background);color:var(--kbq-code-block-hljs-code-color)}.kbq-code-block .hljs-comment{background-color:var(--kbq-code-block-hljs-comment-background);color:var(--kbq-code-block-hljs-comment-color)}.kbq-code-block .hljs-deletion{background-color:var(--kbq-code-block-hljs-deletion-background);color:var(--kbq-code-block-hljs-deletion-color)}.kbq-code-block .hljs-doctag{background-color:var(--kbq-code-block-hljs-doctag-background);color:var(--kbq-code-block-hljs-doctag-color)}.kbq-code-block .hljs-emphasis{background-color:var(--kbq-code-block-hljs-emphasis-background);color:var(--kbq-code-block-hljs-emphasis-color)}.kbq-code-block .hljs-formula{background-color:var(--kbq-code-block-hljs-formula-background);color:var(--kbq-code-block-hljs-formula-color)}.kbq-code-block .hljs-function{background-color:var(--kbq-code-block-hljs-function-background);color:var(--kbq-code-block-hljs-function-color)}.kbq-code-block .hljs-keyword{background-color:var(--kbq-code-block-hljs-keyword-background);color:var(--kbq-code-block-hljs-keyword-color)}.kbq-code-block .hljs-link{background-color:var(--kbq-code-block-hljs-link-background);color:var(--kbq-code-block-hljs-link-color)}.kbq-code-block .hljs-literal{background-color:var(--kbq-code-block-hljs-literal-background);color:var(--kbq-code-block-hljs-literal-color)}.kbq-code-block .hljs-meta{background-color:var(--kbq-code-block-hljs-meta-background);color:var(--kbq-code-block-hljs-meta-color)}.kbq-code-block .hljs-meta-keyword{background-color:var(--kbq-code-block-hljs-meta-keyword-background);color:var(--kbq-code-block-hljs-meta-keyword-color)}.kbq-code-block .hljs-meta-string{background-color:var(--kbq-code-block-hljs-meta-string-background);color:var(--kbq-code-block-hljs-meta-string-color)}.kbq-code-block .hljs-meta-prompt{background-color:var(--kbq-code-block-hljs-meta-prompt-background);color:var(--kbq-code-block-hljs-meta-prompt-color)}.kbq-code-block .hljs-name{background-color:var(--kbq-code-block-hljs-name-background);color:var(--kbq-code-block-hljs-name-color)}.kbq-code-block .hljs-number{background-color:var(--kbq-code-block-hljs-number-background);color:var(--kbq-code-block-hljs-number-color)}.kbq-code-block .hljs-operator{background-color:var(--kbq-code-block-hljs-operator-background);color:var(--kbq-code-block-hljs-operator-color)}.kbq-code-block .hljs-params{background-color:var(--kbq-code-block-hljs-params-background);color:var(--kbq-code-block-hljs-params-color)}.kbq-code-block .hljs-property{background-color:var(--kbq-code-block-hljs-property-background);color:var(--kbq-code-block-hljs-property-color)}.kbq-code-block .hljs-punctuation{background-color:var(--kbq-code-block-hljs-punctuation-background);color:var(--kbq-code-block-hljs-punctuation-color)}.kbq-code-block .hljs-quote{background-color:var(--kbq-code-block-hljs-quote-background);color:var(--kbq-code-block-hljs-quote-color)}.kbq-code-block .hljs-regexp{background-color:var(--kbq-code-block-hljs-regexp-background);color:var(--kbq-code-block-hljs-regexp-color)}.kbq-code-block .hljs-section{background-color:var(--kbq-code-block-hljs-section-background);color:var(--kbq-code-block-hljs-section-color)}.kbq-code-block .hljs-selector-attr{background-color:var(--kbq-code-block-hljs-selector-attr-background);color:var(--kbq-code-block-hljs-selector-attr-color)}.kbq-code-block .hljs-selector-class{background-color:var(--kbq-code-block-hljs-selector-class-background);color:var(--kbq-code-block-hljs-selector-class-color)}.kbq-code-block .hljs-selector-id{background-color:var(--kbq-code-block-hljs-selector-id-background);color:var(--kbq-code-block-hljs-selector-id-color)}.kbq-code-block .hljs-selector-pseudo{background-color:var(--kbq-code-block-hljs-selector-pseudo-background);color:var(--kbq-code-block-hljs-selector-pseudo-color)}.kbq-code-block .hljs-selector-tag{background-color:var(--kbq-code-block-hljs-selector-tag-background);color:var(--kbq-code-block-hljs-selector-tag-color)}.kbq-code-block .hljs-string{background-color:var(--kbq-code-block-hljs-string-background);color:var(--kbq-code-block-hljs-string-color)}.kbq-code-block .hljs-strong{background-color:var(--kbq-code-block-hljs-strong-background);color:var(--kbq-code-block-hljs-strong-color)}.kbq-code-block .hljs-subst{background-color:var(--kbq-code-block-hljs-subst-background);color:var(--kbq-code-block-hljs-subst-color)}.kbq-code-block .hljs-symbol{background-color:var(--kbq-code-block-hljs-symbol-background);color:var(--kbq-code-block-hljs-symbol-color)}.kbq-code-block .hljs-tag{background-color:var(--kbq-code-block-hljs-tag-background);color:var(--kbq-code-block-hljs-tag-color)}.kbq-code-block .hljs-template-tag{background-color:var(--kbq-code-block-hljs-template-tag-background);color:var(--kbq-code-block-hljs-template-tag-color)}.kbq-code-block .hljs-template-variable{background-color:var(--kbq-code-block-hljs-template-variable-background);color:var(--kbq-code-block-hljs-template-variable-color)}.kbq-code-block .hljs-title{background-color:var(--kbq-code-block-hljs-title-background);color:var(--kbq-code-block-hljs-title-color)}.kbq-code-block .hljs-title-class{background-color:var(--kbq-code-block-hljs-title-class-background);color:var(--kbq-code-block-hljs-title-class-color)}.kbq-code-block .hljs-title-class-inherited{background-color:var(--kbq-code-block-hljs-title-class-inherited-background);color:var(--kbq-code-block-hljs-title-class-inherited-color)}.kbq-code-block .hljs-title-function{background-color:var(--kbq-code-block-hljs-title-function-background);color:var(--kbq-code-block-hljs-title-function-color)}.kbq-code-block .hljs-title-function-invoke{background-color:var(--kbq-code-block-hljs-title-function-invoke-background);color:var(--kbq-code-block-hljs-title-function-invoke-color)}.kbq-code-block .hljs-type{background-color:var(--kbq-code-block-hljs-type-background);color:var(--kbq-code-block-hljs-type-color)}.kbq-code-block .hljs-variable{background-color:var(--kbq-code-block-hljs-variable-background);color:var(--kbq-code-block-hljs-variable-color)}.kbq-code-block .hljs-variable-constant{background-color:var(--kbq-code-block-hljs-variable-constant-background);color:var(--kbq-code-block-hljs-variable-constant-color)}.kbq-code-block .hljs-variable-language{background-color:var(--kbq-code-block-hljs-variable-language-background);color:var(--kbq-code-block-hljs-variable-language-color)}.kbq-code-block .hljs-ln-n{color:var(--kbq-code-block-hljs-line-numbers-color)}.kbq-code-block.kbq-code-block_outline{background:var(--kbq-code-block-outline-container-background);border-color:var(--kbq-code-block-outline-container-border-color)}.kbq-code-block.kbq-code-block_outline .kbq-code-block__header{background:var(--kbq-code-block-outline-header-background)}.kbq-code-block.kbq-code-block_outline .kbq-code-block__actionbar{background:var(--kbq-code-block-outline-actionbar-background)}.kbq-code-block.kbq-code-block_outline.kbq-code-block_header-with-shadow .kbq-code-block__header{box-shadow:var(--kbq-code-block-outline-header-scroll-shadow)}.kbq-code-block.kbq-code-block_outline.kbq-code-block_hide-tabs .kbq-code-block__actionbar{background:transparent}.kbq-code-block.kbq-code-block_outline.kbq-code-block_hide-tabs .kbq-code-block__actionbar .kbq-code-block__actionbar__fade-gradient{background:var(--kbq-code-block-outline-actionbar-fade-gradient)}.kbq-code-block.kbq-code-block_outline.kbq-code-block_hide-tabs .kbq-code-block__actionbar .kbq-code-block__actionbar__button-stack{background:var(--kbq-code-block-outline-actionbar-background)}.kbq-code-block.kbq-code-block_outline .kbq-code-block__view-all .kbq-code-block__view-all__wrapper{background:var(--kbq-code-block-outline-collapse-button-expand-background);opacity:90%}.kbq-code-block.kbq-code-block_outline .kbq-code-block__view-all.kbq-code-block__view-all_expanded{background:var(--kbq-code-block-outline-collapse-expanded-background)}.kbq-code-block.kbq-code-block_outline .kbq-code-block__view-all.kbq-code-block__view-all_collapsed{background:var(--kbq-code-block-outline-collapse-collapsed-background)}.kbq-code-block.kbq-code-block_filled{background:var(--kbq-code-block-filled-container-background);border-color:var(--kbq-code-block-filled-container-border-color)}.kbq-code-block.kbq-code-block_filled .kbq-code-block__header{background:var(--kbq-code-block-filled-header-background)}.kbq-code-block.kbq-code-block_filled .kbq-code-block__actionbar{background:var(--kbq-code-block-filled-actionbar-background)}.kbq-code-block.kbq-code-block_filled.kbq-code-block_header-with-shadow .kbq-code-block__header{box-shadow:var(--kbq-code-block-filled-header-scroll-shadow)}.kbq-code-block.kbq-code-block_filled.kbq-code-block_hide-tabs .kbq-code-block__actionbar{background:transparent}.kbq-code-block.kbq-code-block_filled.kbq-code-block_hide-tabs .kbq-code-block__actionbar .kbq-code-block__actionbar__fade-gradient{background:var(--kbq-code-block-filled-actionbar-fade-gradient)}.kbq-code-block.kbq-code-block_filled.kbq-code-block_hide-tabs .kbq-code-block__actionbar .kbq-code-block__actionbar__button-stack{background:var(--kbq-code-block-filled-actionbar-background)}.kbq-code-block.kbq-code-block_filled .kbq-code-block__view-all .kbq-code-block__view-all__wrapper{background:var(--kbq-code-block-filled-collapse-button-expand-background);opacity:90%}.kbq-code-block.kbq-code-block_filled .kbq-code-block__view-all.kbq-code-block__view-all_expanded{background:var(--kbq-code-block-filled-collapse-expanded-background)}.kbq-code-block.kbq-code-block_filled .kbq-code-block__view-all.kbq-code-block__view-all_collapsed{background:var(--kbq-code-block-filled-collapse-collapsed-background)}.kbq-code-block .kbq-code-block__content{border-color:transparent}.kbq-code-block .kbq-code-block__content.cdk-keyboard-focused{outline:none;border-color:var(--kbq-states-line-focus-theme)}.kbq-code-block{font-size:var(--kbq-typography-mono-codeblock-font-size);font-weight:var(--kbq-typography-mono-codeblock-font-weight);line-height:var(--kbq-typography-mono-codeblock-line-height);font-family:var(--kbq-typography-mono-codeblock-font-family);text-transform:var(--kbq-typography-mono-codeblock-text-transform);font-feature-settings:var(--kbq-typography-mono-codeblock-font-feature-settings);letter-spacing:var(--kbq-typography-mono-codeblock-letter-spacing)}.kbq-code-block .kbq-code-block__content,.kbq-code-block .kbq-code-block__content .kbq-code-block__code{font:inherit}\n", ".kbq-code-block{--kbq-code-block-size-container-border-width: 1px;--kbq-code-block-size-container-border-radius: var(--kbq-size-m);--kbq-code-block-size-with-header-content-padding-top: var(--kbq-size-xxs);--kbq-code-block-size-with-header-content-padding-bottom: var(--kbq-size-l);--kbq-code-block-size-with-header-content-padding-horizontal: var(--kbq-size-xl);--kbq-code-block-size-with-header-content-content-gap-horizontal: var(--kbq-size-m);--kbq-code-block-size-no-header-content-padding-vertical: 14px;--kbq-code-block-size-no-header-content-padding-horizontal: var(--kbq-size-xl);--kbq-code-block-size-no-header-content-content-gap-horizontal: var(--kbq-size-m);--kbq-code-block-size-header-content-gap-horizontal: var(--kbq-size-l);--kbq-code-block-size-actionbar-content-gap-horizontal: var(--kbq-size-3xs);--kbq-code-block-size-actionbar-fade-gradient-width: var(--kbq-size-3xl);--kbq-code-block-size-collapse-expanded-padding-top: 0;--kbq-code-block-size-collapse-expanded-padding-bottom: var(--kbq-size-l);--kbq-code-block-size-collapse-collapsed-padding-top: var(--kbq-size-3xl);--kbq-code-block-size-collapse-collapsed-padding-bottom: var(--kbq-size-l);--kbq-code-block-font-hljs-addition-font-style: null;--kbq-code-block-font-hljs-addition-font-weight: null;--kbq-code-block-font-hljs-attr-font-style: null;--kbq-code-block-font-hljs-attr-font-weight: null;--kbq-code-block-font-hljs-attribute-font-style: null;--kbq-code-block-font-hljs-attribute-font-weight: null;--kbq-code-block-font-hljs-built-in-font-style: null;--kbq-code-block-font-hljs-built-in-font-weight: null;--kbq-code-block-font-hljs-bullet-font-style: null;--kbq-code-block-font-hljs-bullet-font-weight: null;--kbq-code-block-font-hljs-char-escape-font-style: null;--kbq-code-block-font-hljs-char-escape-font-weight: null;--kbq-code-block-font-hljs-class-font-style: null;--kbq-code-block-font-hljs-class-font-weight: null;--kbq-code-block-font-hljs-code-font-style: null;--kbq-code-block-font-hljs-code-font-weight: null;--kbq-code-block-font-hljs-comment-font-style: null;--kbq-code-block-font-hljs-comment-font-weight: null;--kbq-code-block-font-hljs-deletion-font-style: null;--kbq-code-block-font-hljs-deletion-font-weight: null;--kbq-code-block-font-hljs-doctag-font-style: null;--kbq-code-block-font-hljs-doctag-font-weight: null;--kbq-code-block-font-hljs-emphasis-font-style: null;--kbq-code-block-font-hljs-emphasis-font-weight: null;--kbq-code-block-font-hljs-formula-font-style: null;--kbq-code-block-font-hljs-formula-font-weight: null;--kbq-code-block-font-hljs-function-font-style: null;--kbq-code-block-font-hljs-function-font-weight: null;--kbq-code-block-font-hljs-keyword-font-style: null;--kbq-code-block-font-hljs-keyword-font-weight: null;--kbq-code-block-font-hljs-link-font-style: null;--kbq-code-block-font-hljs-link-font-weight: null;--kbq-code-block-font-hljs-literal-font-style: null;--kbq-code-block-font-hljs-literal-font-weight: null;--kbq-code-block-font-hljs-meta-font-style: null;--kbq-code-block-font-hljs-meta-font-weight: null;--kbq-code-block-font-hljs-meta-keyword-font-style: null;--kbq-code-block-font-hljs-meta-keyword-font-weight: null;--kbq-code-block-font-hljs-meta-string-font-style: null;--kbq-code-block-font-hljs-meta-string-font-weight: null;--kbq-code-block-font-hljs-meta-prompt-font-style: null;--kbq-code-block-font-hljs-meta-prompt-font-weight: null;--kbq-code-block-font-hljs-name-font-style: null;--kbq-code-block-font-hljs-name-font-weight: null;--kbq-code-block-font-hljs-number-font-style: null;--kbq-code-block-font-hljs-number-font-weight: null;--kbq-code-block-font-hljs-operator-font-style: null;--kbq-code-block-font-hljs-operator-font-weight: null;--kbq-code-block-font-hljs-params-font-style: null;--kbq-code-block-font-hljs-params-font-weight: null;--kbq-code-block-font-hljs-property-font-style: null;--kbq-code-block-font-hljs-property-font-weight: null;--kbq-code-block-font-hljs-punctuation-font-style: null;--kbq-code-block-font-hljs-punctuation-font-weight: null;--kbq-code-block-font-hljs-quote-font-style: null;--kbq-code-block-font-hljs-quote-font-weight: null;--kbq-code-block-font-hljs-regexp-font-style: null;--kbq-code-block-font-hljs-regexp-font-weight: null;--kbq-code-block-font-hljs-section-font-style: null;--kbq-code-block-font-hljs-section-font-weight: null;--kbq-code-block-font-hljs-selector-attr-font-style: null;--kbq-code-block-font-hljs-selector-attr-font-weight: null;--kbq-code-block-font-hljs-selector-class-font-style: null;--kbq-code-block-font-hljs-selector-class-font-weight: null;--kbq-code-block-font-hljs-selector-id-font-style: null;--kbq-code-block-font-hljs-selector-id-font-weight: null;--kbq-code-block-font-hljs-selector-pseudo-font-style: null;--kbq-code-block-font-hljs-selector-pseudo-font-weight: null;--kbq-code-block-font-hljs-selector-tag-font-style: null;--kbq-code-block-font-hljs-selector-tag-font-weight: null;--kbq-code-block-font-hljs-string-font-style: null;--kbq-code-block-font-hljs-string-font-weight: null;--kbq-code-block-font-hljs-strong-font-style: null;--kbq-code-block-font-hljs-strong-font-weight: null;--kbq-code-block-font-hljs-subst-font-style: null;--kbq-code-block-font-hljs-subst-font-weight: null;--kbq-code-block-font-hljs-symbol-font-style: null;--kbq-code-block-font-hljs-symbol-font-weight: null;--kbq-code-block-font-hljs-tag-font-style: null;--kbq-code-block-font-hljs-tag-font-weight: null;--kbq-code-block-font-hljs-template-tag-font-style: null;--kbq-code-block-font-hljs-template-tag-font-weight: null;--kbq-code-block-font-hljs-template-variable-font-style: null;--kbq-code-block-font-hljs-template-variable-font-weight: null;--kbq-code-block-font-hljs-title-font-style: null;--kbq-code-block-font-hljs-title-font-weight: null;--kbq-code-block-font-hljs-title-class-font-style: normal;--kbq-code-block-font-hljs-title-class-font-weight: 500;--kbq-code-block-font-hljs-title-class-inherited-font-style: null;--kbq-code-block-font-hljs-title-class-inherited-font-weight: null;--kbq-code-block-font-hljs-title-function-font-style: null;--kbq-code-block-font-hljs-title-function-font-weight: null;--kbq-code-block-font-hljs-title-function-invoke-font-style: null;--kbq-code-block-font-hljs-title-function-invoke-font-weight: null;--kbq-code-block-font-hljs-type-font-style: null;--kbq-code-block-font-hljs-type-font-weight: null;--kbq-code-block-font-hljs-variable-font-style: null;--kbq-code-block-font-hljs-variable-font-weight: null;--kbq-code-block-font-hljs-variable-constant-font-style: null;--kbq-code-block-font-hljs-variable-constant-font-weight: null;--kbq-code-block-font-hljs-variable-language-font-style: null;--kbq-code-block-font-hljs-variable-language-font-weight: null;--kbq-code-block-filled-container-background: var(--kbq-background-bg-secondary);--kbq-code-block-filled-container-border-color: transparent;--kbq-code-block-filled-header-background: var(--kbq-background-bg-secondary);--kbq-code-block-filled-header-scroll-shadow: var(--kbq-shadow-overflow-normal-bottom);--kbq-code-block-filled-actionbar-fade-gradient: linear-gradient( 90deg, transparent, var(--kbq-background-bg-secondary) );--kbq-code-block-filled-actionbar-background: var(--kbq-background-bg-secondary);--kbq-code-block-filled-collapse-expanded-background: transparent;--kbq-code-block-filled-collapse-collapsed-background: linear-gradient( 180deg, transparent, var(--kbq-background-bg-secondary) 100% );--kbq-code-block-filled-collapse-button-expand-background: var(--kbq-background-bg-secondary);--kbq-code-block-outline-container-background: var(--kbq-background-card);--kbq-code-block-outline-container-border-color: var(--kbq-divider-color, var(--kbq-line-contrast-less));--kbq-code-block-outline-header-background: var(--kbq-background-card);--kbq-code-block-outline-header-scroll-shadow: var(--kbq-shadow-overflow-normal-bottom);--kbq-code-block-outline-actionbar-fade-gradient: linear-gradient(90deg, transparent, var(--kbq-background-card));--kbq-code-block-outline-actionbar-background: var(--kbq-background-card);--kbq-code-block-outline-collapse-expanded-background: transparent;--kbq-code-block-outline-collapse-collapsed-background: linear-gradient( 180deg, transparent, var(--kbq-background-bg) 100% );--kbq-code-block-outline-collapse-button-expand-background: var(--kbq-background-card);--kbq-code-block-hljs-addition-background: var(--kbq-palette-green-95);--kbq-code-block-hljs-addition-color: var(--kbq-palette-green-25);--kbq-code-block-hljs-attr-background: null;--kbq-code-block-hljs-attr-color: null;--kbq-code-block-hljs-attribute-background: null;--kbq-code-block-hljs-attribute-color: null;--kbq-code-block-hljs-built-in-background: null;--kbq-code-block-hljs-built-in-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-bullet-background: null;--kbq-code-block-hljs-bullet-color: null;--kbq-code-block-hljs-char-escape-background: null;--kbq-code-block-hljs-char-escape-color: null;--kbq-code-block-hljs-class-background: null;--kbq-code-block-hljs-class-color: null;--kbq-code-block-hljs-code-background: null;--kbq-code-block-hljs-code-color: null;--kbq-code-block-hljs-comment-background: null;--kbq-code-block-hljs-comment-color: var(--kbq-palette-grey-60);--kbq-code-block-hljs-deletion-background: var(--kbq-palette-red-95);--kbq-code-block-hljs-deletion-color: var(--kbq-palette-red-35);--kbq-code-block-hljs-doctag-background: null;--kbq-code-block-hljs-doctag-color: null;--kbq-code-block-hljs-emphasis-background: null;--kbq-code-block-hljs-emphasis-color: null;--kbq-code-block-hljs-formula-background: null;--kbq-code-block-hljs-formula-color: null;--kbq-code-block-hljs-function-background: null;--kbq-code-block-hljs-function-color: null;--kbq-code-block-hljs-keyword-background: null;--kbq-code-block-hljs-keyword-color: null;--kbq-code-block-hljs-line-numbers-color: var(--kbq-foreground-contrast-secondary);--kbq-code-block-hljs-link-background: null;--kbq-code-block-hljs-link-color: null;--kbq-code-block-hljs-literal-background: null;--kbq-code-block-hljs-literal-color: var(--kbq-palette-purple-30);--kbq-code-block-hljs-meta-background: null;--kbq-code-block-hljs-meta-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-meta-keyword-background: null;--kbq-code-block-hljs-meta-keyword-color: null;--kbq-code-block-hljs-meta-string-background: null;--kbq-code-block-hljs-meta-string-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-meta-prompt-background: null;--kbq-code-block-hljs-meta-prompt-color: null;--kbq-code-block-hljs-name-background: null;--kbq-code-block-hljs-name-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-number-background: null;--kbq-code-block-hljs-number-color: var(--kbq-palette-purple-30);--kbq-code-block-hljs-operator-background: null;--kbq-code-block-hljs-operator-color: null;--kbq-code-block-hljs-params-background: null;--kbq-code-block-hljs-params-color: null;--kbq-code-block-hljs-property-background: null;--kbq-code-block-hljs-property-color: null;--kbq-code-block-hljs-punctuation-background: null;--kbq-code-block-hljs-punctuation-color: null;--kbq-code-block-hljs-quote-background: null;--kbq-code-block-hljs-quote-color: null;--kbq-code-block-hljs-regexp-background: null;--kbq-code-block-hljs-regexp-color: var(--kbq-palette-green-25);--kbq-code-block-hljs-section-background: null;--kbq-code-block-hljs-section-color: null;--kbq-code-block-hljs-selector-attr-background: null;--kbq-code-block-hljs-selector-attr-color: null;--kbq-code-block-hljs-selector-class-background: null;--kbq-code-block-hljs-selector-class-color: null;--kbq-code-block-hljs-selector-id-background: null;--kbq-code-block-hljs-selector-id-color: null;--kbq-code-block-hljs-selector-pseudo-background: null;--kbq-code-block-hljs-selector-pseudo-color: null;--kbq-code-block-hljs-selector-tag-background: null;--kbq-code-block-hljs-selector-tag-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-string-background: null;--kbq-code-block-hljs-string-color: var(--kbq-palette-green-25);--kbq-code-block-hljs-strong-background: null;--kbq-code-block-hljs-strong-color: null;--kbq-code-block-hljs-subst-background: null;--kbq-code-block-hljs-subst-color: null;--kbq-code-block-hljs-symbol-background: null;--kbq-code-block-hljs-symbol-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-tag-background: null;--kbq-code-block-hljs-tag-color: null;--kbq-code-block-hljs-template-tag-background: null;--kbq-code-block-hljs-template-tag-color: null;--kbq-code-block-hljs-template-variable-background: null;--kbq-code-block-hljs-template-variable-color: null;--kbq-code-block-hljs-title-background: null;--kbq-code-block-hljs-title-color: var(--kbq-palette-blue-35);--kbq-code-block-hljs-title-class-background: null;--kbq-code-block-hljs-title-class-color: null;--kbq-code-block-hljs-title-class-inherited-background: null;--kbq-code-block-hljs-title-class-inherited-color: null;--kbq-code-block-hljs-title-function-background: null;--kbq-code-block-hljs-title-function-color: null;--kbq-code-block-hljs-title-function-invoke-background: null;--kbq-code-block-hljs-title-function-invoke-color: null;--kbq-code-block-hljs-type-background: null;--kbq-code-block-hljs-type-color: null;--kbq-code-block-hljs-variable-background: null;--kbq-code-block-hljs-variable-color: null;--kbq-code-block-hljs-variable-constant-background: null;--kbq-code-block-hljs-variable-constant-color: null;--kbq-code-block-hljs-variable-language-background: null;--kbq-code-block-hljs-variable-language-color: null;--kbq-code-block-tab-size: 4}\n"] }]
|
|
754
|
+
}], ctorParameters: () => [], propDecorators: { copyButtonTooltip: [{
|
|
740
755
|
type: ViewChild,
|
|
741
|
-
args: [
|
|
756
|
+
args: ['copyButtonTooltip']
|
|
757
|
+
}], scrollableCodeContent: [{
|
|
758
|
+
type: ViewChild,
|
|
759
|
+
args: [CdkScrollable]
|
|
742
760
|
}], lineNumbers: [{
|
|
743
|
-
type: Input
|
|
761
|
+
type: Input,
|
|
762
|
+
args: [{ transform: booleanAttribute }]
|
|
744
763
|
}], filled: [{
|
|
745
|
-
type: Input
|
|
746
|
-
|
|
747
|
-
|
|
764
|
+
type: Input,
|
|
765
|
+
args: [{ transform: booleanAttribute }]
|
|
766
|
+
}], canToggleSoftWrap: [{
|
|
767
|
+
type: Input,
|
|
768
|
+
args: [{ transform: booleanAttribute }]
|
|
748
769
|
}], softWrap: [{
|
|
749
|
-
type: Input
|
|
770
|
+
type: Input,
|
|
771
|
+
args: [{ transform: booleanAttribute }]
|
|
772
|
+
}], softWrapChange: [{
|
|
773
|
+
type: Output
|
|
774
|
+
}], viewAll: [{
|
|
775
|
+
type: Input,
|
|
776
|
+
args: [{ transform: booleanAttribute }]
|
|
777
|
+
}], viewAllChange: [{
|
|
778
|
+
type: Output
|
|
779
|
+
}], maxHeight: [{
|
|
780
|
+
type: Input,
|
|
781
|
+
args: [{ transform: numberAttribute }]
|
|
750
782
|
}], canLoad: [{
|
|
751
|
-
type: Input
|
|
783
|
+
type: Input,
|
|
784
|
+
args: [{ transform: booleanAttribute }]
|
|
785
|
+
}], canDownload: [{
|
|
786
|
+
type: Input,
|
|
787
|
+
args: [{ transform: booleanAttribute }]
|
|
788
|
+
}], canCopy: [{
|
|
789
|
+
type: Input,
|
|
790
|
+
args: [{ transform: booleanAttribute }]
|
|
752
791
|
}], codeFiles: [{
|
|
753
792
|
type: Input
|
|
793
|
+
}], files: [{
|
|
794
|
+
type: Input
|
|
795
|
+
}], activeFileIndex: [{
|
|
796
|
+
type: Input,
|
|
797
|
+
args: [{ transform: numberAttribute }]
|
|
798
|
+
}], activeFileIndexChange: [{
|
|
799
|
+
type: Output
|
|
800
|
+
}], noBorder: [{
|
|
801
|
+
type: Input,
|
|
802
|
+
args: [{ transform: booleanAttribute }]
|
|
803
|
+
}], hideTabs: [{
|
|
804
|
+
type: Input,
|
|
805
|
+
args: [{ transform: booleanAttribute }]
|
|
754
806
|
}] } });
|
|
755
807
|
|
|
808
|
+
const COMPONENTS = [
|
|
809
|
+
KbqCodeBlock
|
|
810
|
+
];
|
|
756
811
|
class KbqCodeBlockModule {
|
|
757
812
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqCodeBlockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
758
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: KbqCodeBlockModule,
|
|
759
|
-
|
|
760
|
-
KbqToolTipModule,
|
|
761
|
-
KbqIconModule,
|
|
762
|
-
KbqTabsModule,
|
|
763
|
-
KbqCodeBlockContent], exports: [KbqCodeBlockComponent] }); }
|
|
764
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqCodeBlockModule, imports: [KbqButtonModule,
|
|
765
|
-
KbqToolTipModule,
|
|
766
|
-
KbqIconModule,
|
|
767
|
-
KbqTabsModule] }); }
|
|
813
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: KbqCodeBlockModule, imports: [KbqCodeBlock], exports: [KbqCodeBlock] }); }
|
|
814
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqCodeBlockModule, imports: [COMPONENTS] }); }
|
|
768
815
|
}
|
|
769
816
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqCodeBlockModule, decorators: [{
|
|
770
817
|
type: NgModule,
|
|
771
818
|
args: [{
|
|
772
|
-
imports:
|
|
773
|
-
|
|
774
|
-
KbqToolTipModule,
|
|
775
|
-
KbqIconModule,
|
|
776
|
-
KbqTabsModule,
|
|
777
|
-
KbqCodeBlockContent
|
|
778
|
-
],
|
|
779
|
-
declarations: [
|
|
780
|
-
KbqCodeBlockComponent,
|
|
781
|
-
KbqActionBarComponent
|
|
782
|
-
],
|
|
783
|
-
exports: [KbqCodeBlockComponent]
|
|
819
|
+
imports: COMPONENTS,
|
|
820
|
+
exports: COMPONENTS
|
|
784
821
|
}]
|
|
785
822
|
}] });
|
|
786
823
|
|
|
@@ -788,5 +825,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
788
825
|
* Generated bundle index. Do not edit.
|
|
789
826
|
*/
|
|
790
827
|
|
|
791
|
-
export {
|
|
828
|
+
export { KBQ_CODE_BLOCK_FALLBACK_FILE_LANGUAGE, KBQ_CODE_BLOCK_FALLBACK_FILE_NAME, KBQ_CODE_BLOCK_LOCALE_CONFIGURATION, KbqCodeBlock, KbqCodeBlockHighlight, KbqCodeBlockModule, kbqCodeBlockFallbackFileLanguageProvider, kbqCodeBlockFallbackFileNameProvider, kbqCodeBlockLocaleConfigurationProvider };
|
|
792
829
|
//# sourceMappingURL=koobiq-components-code-block.mjs.map
|