@koobiq/components 16.0.0-beta.2 → 16.0.0-beta.6
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.scss +0 -3
- package/button/_button-theme.scss +20 -9
- package/button/button.scss +5 -2
- package/core/common-behaviors/color.d.ts +1 -1
- package/core/forms/_forms-theme.scss +4 -4
- package/core/forms/_forms.scss +1 -3
- package/core/option/_option-theme.scss +39 -16
- package/core/option/action.scss +3 -4
- package/core/option/option.scss +6 -51
- package/core/styles/_koobiq-theme.scss +3 -0
- package/core/styles/common/_list.scss +123 -0
- package/core/styles/common/_select.scss +218 -0
- package/core/styles/theming/_components-theming.scss +414 -47
- package/dropdown/_dropdown-theme.scss +30 -37
- package/dropdown/dropdown-item.component.d.ts +1 -1
- package/dropdown/dropdown-item.scss +18 -40
- package/dropdown/dropdown.scss +16 -39
- package/esm2022/alert/alert.component.mjs +1 -1
- package/esm2022/autocomplete/autocomplete.component.mjs +2 -2
- package/esm2022/badge/badge.component.mjs +1 -1
- package/esm2022/button/button.component.mjs +2 -2
- package/esm2022/code-block/code-block.component.mjs +3 -3
- package/esm2022/core/common-behaviors/color.mjs +1 -1
- package/esm2022/core/option/action.mjs +5 -5
- package/esm2022/core/option/option.mjs +3 -3
- package/esm2022/core/overlay/overlay-position-map.mjs +2 -1
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/dropdown/dropdown-item.component.mjs +3 -3
- package/esm2022/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/file-upload/multiple-file-upload.component.mjs +2 -2
- package/esm2022/file-upload/single-file-upload.component.mjs +2 -2
- package/esm2022/form-field/form-field.mjs +6 -9
- package/esm2022/form-field/password-hint.mjs +13 -4
- package/esm2022/form-field/password-toggle.mjs +7 -3
- package/esm2022/icon/icon.component.mjs +3 -3
- package/esm2022/list/list-selection.component.mjs +20 -7
- package/esm2022/list/list.component.mjs +2 -2
- package/esm2022/list/list.module.mjs +8 -4
- package/esm2022/loader-overlay/loader-overlay.component.mjs +20 -19
- package/esm2022/modal/modal.component.mjs +8 -21
- package/esm2022/modal/modal.module.mjs +13 -7
- package/esm2022/navbar/navbar-item.component.mjs +13 -13
- package/esm2022/progress-spinner/progress-spinner.component.mjs +1 -1
- package/esm2022/radio/radio.component.mjs +3 -2
- package/esm2022/risk-level/index.mjs +2 -0
- package/esm2022/risk-level/koobiq-components-risk-level.mjs +5 -0
- package/esm2022/risk-level/public-api.mjs +3 -0
- package/esm2022/risk-level/risk-level.component.mjs +40 -0
- package/esm2022/risk-level/risk-level.module.mjs +28 -0
- package/esm2022/select/select.component.mjs +7 -8
- package/esm2022/sidepanel/sidepanel-container.component.mjs +3 -3
- package/esm2022/sidepanel/sidepanel-directives.mjs +7 -9
- package/esm2022/sidepanel/sidepanel.module.mjs +10 -4
- package/esm2022/tabs/paginated-tab-header.mjs +11 -2
- package/esm2022/tabs/tab-group.component.mjs +16 -21
- package/esm2022/tabs/tab-header.component.mjs +2 -2
- package/esm2022/tabs/tab-label-wrapper.directive.mjs +3 -3
- package/esm2022/tabs/tab-label.directive.mjs +3 -3
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +17 -7
- package/esm2022/tabs/tabs.module.mjs +2 -6
- package/esm2022/tags/tag-default-options.mjs +1 -1
- package/esm2022/tags/tag-input.mjs +10 -8
- package/esm2022/tags/tag-list.component.mjs +10 -6
- package/esm2022/tags/tag.component.mjs +5 -5
- package/esm2022/timezone/timezone-option.component.mjs +3 -3
- package/esm2022/timezone/timezone-select.component.mjs +2 -2
- package/esm2022/title/title.directive.mjs +2 -2
- package/esm2022/toast/toast-container.component.mjs +2 -2
- package/esm2022/toast/toast.component.mjs +25 -13
- package/esm2022/toast/toast.module.mjs +14 -5
- package/esm2022/toast/toast.type.mjs +6 -1
- package/esm2022/tree/padding.directive.mjs +4 -4
- package/esm2022/tree/toggle.mjs +5 -4
- package/esm2022/tree/tree-option.component.mjs +5 -7
- package/esm2022/tree/tree.module.mjs +13 -4
- package/esm2022/tree-select/tree-select.component.mjs +16 -10
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +2 -2
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.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 +2 -2
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +8 -7
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +4 -4
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +4 -4
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +22 -13
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +2 -2
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +28 -11
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +19 -18
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +18 -25
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +12 -12
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +2 -1
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-risk-level.mjs +72 -0
- package/fesm2022/koobiq-components-risk-level.mjs.map +1 -0
- package/fesm2022/koobiq-components-select.mjs +6 -7
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +18 -13
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +48 -38
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +22 -16
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +4 -4
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +1 -1
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +41 -15
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +15 -9
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +28 -20
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +2 -2
- package/form-field/form-field.d.ts +0 -1
- package/form-field/password-hint.d.ts +6 -3
- package/form-field/password-toggle.d.ts +1 -0
- package/input/_input-theme.scss +2 -1
- package/input/input.scss +3 -1
- package/link/_link-theme.scss +1 -3
- package/list/_list-theme.scss +35 -15
- package/list/list-selection.component.d.ts +5 -1
- package/list/list.module.d.ts +1 -1
- package/list/list.scss +3 -12
- package/loader-overlay/_loader-overlay-theme.scss +43 -11
- package/loader-overlay/loader-overlay.component.d.ts +6 -5
- package/loader-overlay/loader-overlay.scss +53 -22
- package/modal/_modal-confirm.scss +20 -28
- package/modal/_modal-theme.scss +5 -35
- package/modal/modal.component.d.ts +3 -6
- package/modal/modal.module.d.ts +2 -1
- package/modal/modal.scss +38 -35
- package/navbar/navbar-item.component.d.ts +3 -2
- package/package.json +9 -3
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/progress-spinner/progress-spinner.component.d.ts +2 -2
- package/risk-level/README.md +0 -0
- package/risk-level/_risk-level-theme.scss +88 -0
- package/risk-level/index.d.ts +1 -0
- package/risk-level/public-api.d.ts +2 -0
- package/risk-level/risk-level.component.d.ts +18 -0
- package/risk-level/risk-level.component.scss +26 -0
- package/risk-level/risk-level.module.d.ts +10 -0
- package/select/_select-theme.scss +8 -0
- package/select/select.scss +6 -190
- package/sidepanel/_sidepanel-theme.scss +6 -41
- package/sidepanel/sidepanel-directives.d.ts +0 -2
- package/sidepanel/sidepanel.scss +33 -35
- package/tabs/_tabs-common.scss +27 -146
- package/tabs/_tabs-theme.scss +81 -175
- package/tabs/paginated-tab-header.d.ts +1 -0
- package/tabs/tab-group.component.d.ts +5 -8
- package/tabs/tab-group.scss +10 -10
- package/tabs/tab-header.scss +2 -24
- package/tabs/tab-label-wrapper.directive.d.ts +1 -1
- package/tabs/tab-label.directive.d.ts +1 -1
- package/tabs/tab-nav-bar/tab-nav-bar.d.ts +3 -1
- package/tabs/tab-nav-bar/tab-nav-bar.scss +9 -16
- package/tabs/tabs.module.d.ts +1 -1
- package/tags/_tag-theme.scss +0 -24
- package/tags/tag-default-options.d.ts +4 -0
- package/tags/tag-list.component.d.ts +1 -0
- package/tags/tag-list.scss +20 -16
- package/tags/tag.component.d.ts +1 -1
- package/toast/_toast-theme.scss +21 -33
- package/toast/toast-container.component.scss +2 -1
- package/toast/toast.component.d.ts +4 -1
- package/toast/toast.component.scss +41 -34
- package/toast/toast.module.d.ts +1 -1
- package/toast/toast.type.d.ts +8 -5
- package/tree/_tree-theme.scss +46 -34
- package/tree/tree-option.component.d.ts +0 -1
- package/tree/tree-option.scss +34 -23
- package/tree/tree.module.d.ts +2 -1
- package/tree-select/_tree-select-theme.scss +9 -1
- package/tree-select/tree-select.component.d.ts +5 -3
- package/tree-select/tree-select.scss +5 -194
- package/list/_list-base.scss +0 -54
|
@@ -3,10 +3,9 @@ import { PlatformModule } from '@angular/cdk/platform';
|
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Directive, Component, ChangeDetectionStrategy, ViewEncapsulation,
|
|
6
|
+
import { Directive, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ContentChild, NgModule } from '@angular/core';
|
|
7
7
|
import * as i2 from '@koobiq/components/progress-spinner';
|
|
8
8
|
import { KbqProgressSpinnerModule } from '@koobiq/components/progress-spinner';
|
|
9
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
10
9
|
|
|
11
10
|
const mcLoaderOverlayParent = 'kbq-loader-overlay_parent';
|
|
12
11
|
class KbqLoaderOverlayIndicator {
|
|
@@ -58,16 +57,17 @@ class KbqLoaderOverlay {
|
|
|
58
57
|
get isExternalCaption() {
|
|
59
58
|
return !!this.externalCaption;
|
|
60
59
|
}
|
|
61
|
-
get isFixedTop() {
|
|
62
|
-
return coerceBooleanProperty(this.fixedTop);
|
|
63
|
-
}
|
|
64
60
|
get isEmpty() {
|
|
65
61
|
return !(!!this.text || this.isExternalText || !!this.caption || this.isExternalCaption);
|
|
66
62
|
}
|
|
67
|
-
|
|
63
|
+
get spinnerSize() {
|
|
64
|
+
return this.compact ? 'compact' : 'big';
|
|
65
|
+
}
|
|
66
|
+
constructor(elementRef, renderer) {
|
|
68
67
|
this.elementRef = elementRef;
|
|
69
68
|
this.renderer = renderer;
|
|
70
|
-
this.
|
|
69
|
+
this.compact = false;
|
|
70
|
+
this.transparent = false;
|
|
71
71
|
}
|
|
72
72
|
ngOnInit() {
|
|
73
73
|
this.renderer.addClass(this.elementRef.nativeElement.parentElement, mcLoaderOverlayParent);
|
|
@@ -75,26 +75,27 @@ class KbqLoaderOverlay {
|
|
|
75
75
|
ngOnDestroy() {
|
|
76
76
|
this.renderer.removeClass(this.elementRef.nativeElement.parentElement, mcLoaderOverlayParent);
|
|
77
77
|
}
|
|
78
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqLoaderOverlay, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }
|
|
79
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqLoaderOverlay, selector: "kbq-loader-overlay", inputs: { text: "text", caption: "caption" }, host: { properties: { "class.kbq-loader-overlay_empty": "isEmpty", "class.kbq-loader-
|
|
78
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqLoaderOverlay, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
79
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqLoaderOverlay, selector: "kbq-loader-overlay", inputs: { text: "text", caption: "caption", compact: "compact", transparent: "transparent" }, host: { properties: { "class.kbq-loader-overlay_empty": "isEmpty", "class.kbq-loader-overlay_transparent": "transparent", "class.kbq-loader-overlay_filled": "!transparent", "class.kbq-loader-overlay_big": "!compact", "class.kbq-loader-overlay_compact": "compact" }, classAttribute: "kbq-loader-overlay" }, queries: [{ propertyName: "externalIndicator", first: true, predicate: KbqLoaderOverlayIndicator, descendants: true }, { propertyName: "externalText", first: true, predicate: KbqLoaderOverlayText, descendants: true }, { propertyName: "externalCaption", first: true, predicate: KbqLoaderOverlayCaption, descendants: true }], ngImport: i0, template: "<div class=\"kbq-loader-overlay__container\">\n <ng-container [ngSwitch]=\"isExternalIndicator\">\n <ng-content *ngSwitchCase=\"true\" select=\"[kbq-loader-overlay-indicator]\"></ng-content>\n <kbq-progress-spinner *ngSwitchDefault [size]=\"spinnerSize\" [mode]=\"'indeterminate'\"></kbq-progress-spinner>\n </ng-container>\n\n <ng-container [ngSwitch]=\"isExternalText\">\n <ng-content *ngSwitchCase=\"true\" select=\"[kbq-loader-overlay-text]\"></ng-content>\n <ng-container *ngSwitchDefault>\n <div class=\"kbq-loader-overlay-text\" *ngIf=\"text\">{{ text }}</div>\n </ng-container>\n </ng-container>\n\n <ng-container [ngSwitch]=\"isExternalCaption\">\n <ng-content *ngSwitchCase=\"true\" select=\"[kbq-loader-overlay-caption]\"></ng-content>\n <ng-container *ngSwitchDefault>\n <div class=\"kbq-loader-overlay-caption\" *ngIf=\"caption\">{{ caption }}</div>\n </ng-container>\n </ng-container>\n</div>\n", styles: [".kbq-loader-overlay_parent{position:relative}.kbq-loader-overlay-text,.kbq-loader-overlay-caption{max-width:90%;text-align:center}.kbq-loader-overlay{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;inset:0}.kbq-loader-overlay .kbq-loader-overlay__container{display:flex;flex-direction:column;justify-content:center;align-items:center;width:80%;max-width:80%}.kbq-loader-overlay.kbq-loader-overlay_big{padding-left:var(--kbq-loader-overlay-size-big-overlay-padding-horizontal, 32px);padding-right:var(--kbq-loader-overlay-size-big-overlay-padding-horizontal, 32px)}.kbq-loader-overlay.kbq-loader-overlay_big .kbq-progress-spinner{margin-bottom:var(--kbq-loader-overlay-size-big-loader-margin-bottom, 24px)}.kbq-loader-overlay.kbq-loader-overlay_big .kbq-loader-overlay-text{margin-bottom:var(--kbq-loader-overlay-size-big-content-content-gap-vertical, 4px)}.kbq-loader-overlay.kbq-loader-overlay_compact{padding-left:var(--kbq-loader-overlay-size-compact-overlay-padding-horizontal, 32px);padding-right:var(--kbq-loader-overlay-size-compact-overlay-padding-horizontal, 32px)}.kbq-loader-overlay.kbq-loader-overlay_compact .kbq-progress-spinner{margin-bottom:var(--kbq-loader-overlay-size-compact-loader-margin-bottom, 8px)}.kbq-loader-overlay.kbq-loader-overlay_compact .kbq-loader-overlay-text{margin-bottom:var(--kbq-loader-overlay-size-compact-content-content-gap-vertical, 2px)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i2.KbqProgressSpinner, selector: "kbq-progress-spinner", inputs: ["color", "id", "value", "mode", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
80
80
|
}
|
|
81
81
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqLoaderOverlay, decorators: [{
|
|
82
82
|
type: Component,
|
|
83
83
|
args: [{ selector: 'kbq-loader-overlay', host: {
|
|
84
84
|
class: 'kbq-loader-overlay',
|
|
85
85
|
'[class.kbq-loader-overlay_empty]': 'isEmpty',
|
|
86
|
-
'[class.kbq-loader-
|
|
87
|
-
'[class.kbq-loader-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
type: Attribute,
|
|
93
|
-
args: ['fixed-top']
|
|
94
|
-
}] }]; }, propDecorators: { text: [{
|
|
86
|
+
'[class.kbq-loader-overlay_transparent]': 'transparent',
|
|
87
|
+
'[class.kbq-loader-overlay_filled]': '!transparent',
|
|
88
|
+
'[class.kbq-loader-overlay_big]': '!compact',
|
|
89
|
+
'[class.kbq-loader-overlay_compact]': 'compact'
|
|
90
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"kbq-loader-overlay__container\">\n <ng-container [ngSwitch]=\"isExternalIndicator\">\n <ng-content *ngSwitchCase=\"true\" select=\"[kbq-loader-overlay-indicator]\"></ng-content>\n <kbq-progress-spinner *ngSwitchDefault [size]=\"spinnerSize\" [mode]=\"'indeterminate'\"></kbq-progress-spinner>\n </ng-container>\n\n <ng-container [ngSwitch]=\"isExternalText\">\n <ng-content *ngSwitchCase=\"true\" select=\"[kbq-loader-overlay-text]\"></ng-content>\n <ng-container *ngSwitchDefault>\n <div class=\"kbq-loader-overlay-text\" *ngIf=\"text\">{{ text }}</div>\n </ng-container>\n </ng-container>\n\n <ng-container [ngSwitch]=\"isExternalCaption\">\n <ng-content *ngSwitchCase=\"true\" select=\"[kbq-loader-overlay-caption]\"></ng-content>\n <ng-container *ngSwitchDefault>\n <div class=\"kbq-loader-overlay-caption\" *ngIf=\"caption\">{{ caption }}</div>\n </ng-container>\n </ng-container>\n</div>\n", styles: [".kbq-loader-overlay_parent{position:relative}.kbq-loader-overlay-text,.kbq-loader-overlay-caption{max-width:90%;text-align:center}.kbq-loader-overlay{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;inset:0}.kbq-loader-overlay .kbq-loader-overlay__container{display:flex;flex-direction:column;justify-content:center;align-items:center;width:80%;max-width:80%}.kbq-loader-overlay.kbq-loader-overlay_big{padding-left:var(--kbq-loader-overlay-size-big-overlay-padding-horizontal, 32px);padding-right:var(--kbq-loader-overlay-size-big-overlay-padding-horizontal, 32px)}.kbq-loader-overlay.kbq-loader-overlay_big .kbq-progress-spinner{margin-bottom:var(--kbq-loader-overlay-size-big-loader-margin-bottom, 24px)}.kbq-loader-overlay.kbq-loader-overlay_big .kbq-loader-overlay-text{margin-bottom:var(--kbq-loader-overlay-size-big-content-content-gap-vertical, 4px)}.kbq-loader-overlay.kbq-loader-overlay_compact{padding-left:var(--kbq-loader-overlay-size-compact-overlay-padding-horizontal, 32px);padding-right:var(--kbq-loader-overlay-size-compact-overlay-padding-horizontal, 32px)}.kbq-loader-overlay.kbq-loader-overlay_compact .kbq-progress-spinner{margin-bottom:var(--kbq-loader-overlay-size-compact-loader-margin-bottom, 8px)}.kbq-loader-overlay.kbq-loader-overlay_compact .kbq-loader-overlay-text{margin-bottom:var(--kbq-loader-overlay-size-compact-content-content-gap-vertical, 2px)}\n"] }]
|
|
91
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { text: [{
|
|
95
92
|
type: Input
|
|
96
93
|
}], caption: [{
|
|
97
94
|
type: Input
|
|
95
|
+
}], compact: [{
|
|
96
|
+
type: Input
|
|
97
|
+
}], transparent: [{
|
|
98
|
+
type: Input
|
|
98
99
|
}], externalIndicator: [{
|
|
99
100
|
type: ContentChild,
|
|
100
101
|
args: [KbqLoaderOverlayIndicator]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koobiq-components-loader-overlay.mjs","sources":["../../../packages/components/loader-overlay/loader-overlay.component.ts","../../../packages/components/loader-overlay/loader-overlay.component.html","../../../packages/components/loader-overlay/loader-overlay.module.ts","../../../packages/components/loader-overlay/koobiq-components-loader-overlay.ts"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n Attribute,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n Directive,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Renderer2,\n ViewEncapsulation\n} from '@angular/core';\n\n\nconst mcLoaderOverlayParent = 'kbq-loader-overlay_parent';\n\n\n@Directive({\n selector: '[kbq-loader-overlay-indicator]',\n host: {\n class: 'kbq-loader-overlay-indicator'\n }\n})\nexport class KbqLoaderOverlayIndicator {}\n\n\n@Directive({\n selector: '[kbq-loader-overlay-text]',\n host: {\n class: 'kbq-loader-overlay-text'\n }\n})\nexport class KbqLoaderOverlayText {}\n\n\n@Directive({\n selector: '[kbq-loader-overlay-caption]',\n host: {\n class: 'kbq-loader-overlay-caption'\n }\n})\nexport class KbqLoaderOverlayCaption {}\n\n\n@Component({\n selector: 'kbq-loader-overlay',\n templateUrl: './loader-overlay.component.html',\n styleUrls: ['./loader-overlay.scss'],\n host: {\n class: 'kbq-loader-overlay',\n '[class.kbq-loader-overlay_empty]': 'isEmpty',\n '[class.kbq-loader-overlay_center]': '!isFixedTop',\n '[class.kbq-loader-overlay_fixed-top]': 'isFixedTop'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class KbqLoaderOverlay implements OnInit, OnDestroy {\n @Input() text: string;\n\n @Input() caption: string;\n\n get isExternalIndicator(): boolean {\n return !!this.externalIndicator;\n }\n\n get isExternalText(): boolean {\n return !!this.externalText;\n }\n\n get isExternalCaption(): boolean {\n return !!this.externalCaption;\n }\n\n get isFixedTop(): boolean {\n return coerceBooleanProperty(this.fixedTop);\n }\n\n get isEmpty(): boolean {\n return !(!!this.text || this.isExternalText || !!this.caption || this.isExternalCaption);\n }\n\n @ContentChild(KbqLoaderOverlayIndicator) externalIndicator: KbqLoaderOverlayIndicator | null;\n @ContentChild(KbqLoaderOverlayText) externalText: KbqLoaderOverlayText | null;\n @ContentChild(KbqLoaderOverlayCaption) externalCaption: KbqLoaderOverlayCaption | null;\n\n constructor(\n private elementRef: ElementRef,\n private renderer: Renderer2,\n @Optional() @Attribute('fixed-top') private fixedTop: string | null\n ) {}\n\n ngOnInit(): void {\n this.renderer.addClass(this.elementRef.nativeElement.parentElement, mcLoaderOverlayParent);\n }\n\n ngOnDestroy(): void {\n this.renderer.removeClass(this.elementRef.nativeElement.parentElement, mcLoaderOverlayParent);\n }\n}\n\n","<div class=\"kbq-loader-overlay__container\">\n <ng-container [ngSwitch]=\"isExternalIndicator\">\n <ng-content *ngSwitchCase=\"true\" select=\"[kbq-loader-overlay-indicator]\"></ng-content>\n <kbq-progress-spinner *ngSwitchDefault [mode]=\"'indeterminate'\"></kbq-progress-spinner>\n </ng-container>\n\n <ng-container [ngSwitch]=\"isExternalText\">\n <ng-content *ngSwitchCase=\"true\" select=\"[kbq-loader-overlay-text]\"></ng-content>\n <ng-container *ngSwitchDefault>\n <div class=\"kbq-loader-overlay-text\" *ngIf=\"text\">{{ text }}</div>\n </ng-container>\n </ng-container>\n\n <ng-container [ngSwitch]=\"isExternalCaption\">\n <ng-content *ngSwitchCase=\"true\" select=\"[kbq-loader-overlay-caption]\"></ng-content>\n <ng-container *ngSwitchDefault>\n <div class=\"kbq-loader-overlay-caption\" *ngIf=\"caption\">{{ caption }}</div>\n </ng-container>\n </ng-container>\n</div>\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { PlatformModule } from '@angular/cdk/platform';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { KbqProgressSpinnerModule } from '@koobiq/components/progress-spinner';\n\nimport {\n KbqLoaderOverlay,\n KbqLoaderOverlayCaption,\n KbqLoaderOverlayIndicator,\n KbqLoaderOverlayText\n} from './loader-overlay.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n A11yModule,\n PlatformModule,\n KbqProgressSpinnerModule\n ],\n declarations: [\n KbqLoaderOverlay,\n KbqLoaderOverlayIndicator,\n KbqLoaderOverlayText,\n KbqLoaderOverlayCaption\n ],\n exports: [\n KbqLoaderOverlay,\n KbqLoaderOverlayIndicator,\n KbqLoaderOverlayText,\n KbqLoaderOverlayCaption\n ]\n})\nexport class KbqLoaderOverlayModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAiBA,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;MAS7C,yBAAyB,CAAA;iIAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;qHAAzB,yBAAyB,EAAA,QAAA,EAAA,gCAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,8BAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBANrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,gCAAgC;AAC1C,oBAAA,IAAI,EAAE;AACF,wBAAA,KAAK,EAAE,8BAA8B;AACxC,qBAAA;AACJ,iBAAA,CAAA;;MAUY,oBAAoB,CAAA;iIAApB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CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAlB3B,YAAY;YACZ,UAAU;YACV,cAAc;YACd,wBAAwB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAenB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBApBlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,UAAU;wBACV,cAAc;wBACd,wBAAwB;AAC3B,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,gBAAgB;wBAChB,yBAAyB;wBACzB,oBAAoB;wBACpB,uBAAuB;AAC1B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,gBAAgB;wBAChB,yBAAyB;wBACzB,oBAAoB;wBACpB,uBAAuB;AAC1B,qBAAA;AACJ,iBAAA,CAAA;;;ACjCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"koobiq-components-loader-overlay.mjs","sources":["../../../packages/components/loader-overlay/loader-overlay.component.ts","../../../packages/components/loader-overlay/loader-overlay.component.html","../../../packages/components/loader-overlay/loader-overlay.module.ts","../../../packages/components/loader-overlay/koobiq-components-loader-overlay.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n Directive,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n Renderer2,\n ViewEncapsulation\n} from '@angular/core';\n\n\nconst mcLoaderOverlayParent = 'kbq-loader-overlay_parent';\n\n\n@Directive({\n selector: '[kbq-loader-overlay-indicator]',\n host: {\n class: 'kbq-loader-overlay-indicator'\n }\n})\nexport class KbqLoaderOverlayIndicator {}\n\n\n@Directive({\n selector: '[kbq-loader-overlay-text]',\n host: {\n class: 'kbq-loader-overlay-text'\n }\n})\nexport class KbqLoaderOverlayText {}\n\n\n@Directive({\n selector: '[kbq-loader-overlay-caption]',\n host: {\n class: 'kbq-loader-overlay-caption'\n }\n})\nexport class KbqLoaderOverlayCaption {}\n\n\n@Component({\n selector: 'kbq-loader-overlay',\n templateUrl: './loader-overlay.component.html',\n styleUrls: ['./loader-overlay.scss'],\n host: {\n class: 'kbq-loader-overlay',\n '[class.kbq-loader-overlay_empty]': 'isEmpty',\n '[class.kbq-loader-overlay_transparent]': 'transparent',\n '[class.kbq-loader-overlay_filled]': '!transparent',\n '[class.kbq-loader-overlay_big]': '!compact',\n '[class.kbq-loader-overlay_compact]': 'compact'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class KbqLoaderOverlay implements OnInit, OnDestroy {\n @Input() text: string;\n\n @Input() caption: string;\n @Input() compact: boolean = false;\n @Input() transparent: boolean = false;\n\n get isExternalIndicator(): boolean {\n return !!this.externalIndicator;\n }\n\n get isExternalText(): boolean {\n return !!this.externalText;\n }\n\n get isExternalCaption(): boolean {\n return !!this.externalCaption;\n }\n\n get isEmpty(): boolean {\n return !(!!this.text || this.isExternalText || !!this.caption || this.isExternalCaption);\n }\n\n get spinnerSize(): string {\n return this.compact ? 'compact' : 'big';\n }\n\n @ContentChild(KbqLoaderOverlayIndicator) externalIndicator: KbqLoaderOverlayIndicator | null;\n @ContentChild(KbqLoaderOverlayText) externalText: KbqLoaderOverlayText | null;\n @ContentChild(KbqLoaderOverlayCaption) externalCaption: KbqLoaderOverlayCaption | null;\n\n constructor(\n private elementRef: ElementRef,\n private renderer: Renderer2\n ) {}\n\n ngOnInit(): void {\n this.renderer.addClass(this.elementRef.nativeElement.parentElement, mcLoaderOverlayParent);\n }\n\n ngOnDestroy(): void {\n this.renderer.removeClass(this.elementRef.nativeElement.parentElement, mcLoaderOverlayParent);\n }\n}\n\n","<div class=\"kbq-loader-overlay__container\">\n <ng-container [ngSwitch]=\"isExternalIndicator\">\n <ng-content *ngSwitchCase=\"true\" select=\"[kbq-loader-overlay-indicator]\"></ng-content>\n <kbq-progress-spinner *ngSwitchDefault [size]=\"spinnerSize\" [mode]=\"'indeterminate'\"></kbq-progress-spinner>\n </ng-container>\n\n <ng-container [ngSwitch]=\"isExternalText\">\n <ng-content *ngSwitchCase=\"true\" select=\"[kbq-loader-overlay-text]\"></ng-content>\n <ng-container *ngSwitchDefault>\n <div class=\"kbq-loader-overlay-text\" *ngIf=\"text\">{{ text }}</div>\n </ng-container>\n </ng-container>\n\n <ng-container [ngSwitch]=\"isExternalCaption\">\n <ng-content *ngSwitchCase=\"true\" select=\"[kbq-loader-overlay-caption]\"></ng-content>\n <ng-container *ngSwitchDefault>\n <div class=\"kbq-loader-overlay-caption\" *ngIf=\"caption\">{{ caption }}</div>\n </ng-container>\n </ng-container>\n</div>\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { PlatformModule } from '@angular/cdk/platform';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { KbqProgressSpinnerModule } from '@koobiq/components/progress-spinner';\n\nimport {\n KbqLoaderOverlay,\n KbqLoaderOverlayCaption,\n KbqLoaderOverlayIndicator,\n KbqLoaderOverlayText\n} from './loader-overlay.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n A11yModule,\n PlatformModule,\n KbqProgressSpinnerModule\n ],\n declarations: [\n KbqLoaderOverlay,\n KbqLoaderOverlayIndicator,\n KbqLoaderOverlayText,\n KbqLoaderOverlayCaption\n ],\n exports: [\n KbqLoaderOverlay,\n KbqLoaderOverlayIndicator,\n KbqLoaderOverlayText,\n KbqLoaderOverlayCaption\n ]\n})\nexport class KbqLoaderOverlayModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAcA,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;MAS7C,yBAAyB,CAAA;iIAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;qHAAzB,yBAAyB,E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A,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,iBAZ3B,gBAAgB;YAChB,yBAAyB;YACzB,oBAAoB;AACpB,YAAA,uBAAuB,aATvB,YAAY;YACZ,UAAU;YACV,cAAc;AACd,YAAA,wBAAwB,aASxB,gBAAgB;YAChB,yBAAyB;YACzB,oBAAoB;YACpB,uBAAuB,CAAA,EAAA,CAAA,CAAA,EAAA;AAGlB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAlB3B,YAAY;YACZ,UAAU;YACV,cAAc;YACd,wBAAwB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAenB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBApBlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,UAAU;wBACV,cAAc;wBACd,wBAAwB;AAC3B,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,gBAAgB;wBAChB,yBAAyB;wBACzB,oBAAoB;wBACpB,uBAAuB;AAC1B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,gBAAgB;wBAChB,yBAAyB;wBACzB,oBAAoB;wBACpB,uBAAuB;AAC1B,qBAAA;AACJ,iBAAA,CAAA;;;ACjCD;;AAEG;;;;"}
|
|
@@ -5,14 +5,16 @@ import { DOCUMENT, CommonModule } from '@angular/common';
|
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import { Injectable, Optional, SkipSelf, Pipe, EventEmitter, TemplateRef, Type, Injector, ViewContainerRef, ElementRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, Input, Output, ViewChild, ViewChildren, Directive, NgModule } from '@angular/core';
|
|
7
7
|
import { ESCAPE, ENTER } from '@koobiq/cdk/keycodes';
|
|
8
|
-
import {
|
|
8
|
+
import { KbqComponentColors } from '@koobiq/components/core';
|
|
9
9
|
import { Subject } from 'rxjs';
|
|
10
10
|
import * as i4 from '@angular/cdk/a11y';
|
|
11
|
-
import { A11yModule } from '@angular/cdk/a11y';
|
|
11
|
+
import { A11yModule, FocusTrapFactory, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
|
12
12
|
import * as i5 from '@koobiq/components/button';
|
|
13
13
|
import { KbqButtonModule } from '@koobiq/components/button';
|
|
14
14
|
import * as i6 from '@koobiq/components/icon';
|
|
15
15
|
import { KbqIconModule } from '@koobiq/components/icon';
|
|
16
|
+
import * as i7 from '@koobiq/components/title';
|
|
17
|
+
import { KbqTitleModule } from '@koobiq/components/title';
|
|
16
18
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
17
19
|
import { filter } from 'rxjs/operators';
|
|
18
20
|
|
|
@@ -190,7 +192,7 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
190
192
|
this.modalControl = modalControl;
|
|
191
193
|
this.changeDetector = changeDetector;
|
|
192
194
|
this.document = document;
|
|
193
|
-
this.
|
|
195
|
+
this.componentColors = KbqComponentColors;
|
|
194
196
|
this.mcModalType = 'default';
|
|
195
197
|
this._mcVisible = false;
|
|
196
198
|
this.mcVisibleChange = new EventEmitter();
|
|
@@ -204,14 +206,12 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
204
206
|
this.mcAfterOpen = new EventEmitter();
|
|
205
207
|
// Trigger when modal leave-animation over
|
|
206
208
|
this.mcAfterClose = new EventEmitter();
|
|
207
|
-
this.mcOkType =
|
|
209
|
+
this.mcOkType = KbqComponentColors.Contrast;
|
|
208
210
|
this.mcRestoreFocus = true;
|
|
209
211
|
this._mcOkLoading = false;
|
|
210
212
|
this.mcOnOk = new EventEmitter();
|
|
211
213
|
this._mcCancelLoading = false;
|
|
212
214
|
this.mcOnCancel = new EventEmitter();
|
|
213
|
-
this.isTopOverflow = false;
|
|
214
|
-
this.isBottomOverflow = false;
|
|
215
215
|
// The origin point that animation based on
|
|
216
216
|
this.transformOrigin = '0px 0px 0px';
|
|
217
217
|
this.mcGetContainer = () => this.overlay.create();
|
|
@@ -263,24 +263,12 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
263
263
|
break;
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
this.checkOverflow();
|
|
267
266
|
}
|
|
268
267
|
ngOnDestroy() {
|
|
269
268
|
if (this.container instanceof OverlayRef) {
|
|
270
269
|
this.container.dispose();
|
|
271
270
|
}
|
|
272
271
|
}
|
|
273
|
-
checkOverflow() {
|
|
274
|
-
const nativeElement = this.modalBody?.nativeElement;
|
|
275
|
-
if (!nativeElement) {
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
const scrollTop = nativeElement.scrollTop;
|
|
279
|
-
const offsetHeight = nativeElement.offsetHeight;
|
|
280
|
-
const scrollHeight = nativeElement.scrollHeight;
|
|
281
|
-
this.isTopOverflow = scrollTop > 0;
|
|
282
|
-
this.isBottomOverflow = scrollTop + offsetHeight < scrollHeight;
|
|
283
|
-
}
|
|
284
272
|
open() {
|
|
285
273
|
this.focusedElementBeforeOpen = this.document.activeElement;
|
|
286
274
|
this.changeVisibleFromInside(true);
|
|
@@ -541,13 +529,13 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
541
529
|
}
|
|
542
530
|
}
|
|
543
531
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqModalComponent, deps: [{ token: i1.Overlay }, { token: i0.Renderer2 }, { token: i0.ComponentFactoryResolver }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: KbqModalControlService }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
544
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqModalComponent, selector: "kbq-modal", inputs: { mcModalType: "mcModalType", mcComponent: "mcComponent", mcContent: "mcContent", mcComponentParams: "mcComponentParams", mcFooter: "mcFooter", mcVisible: "mcVisible", mcZIndex: "mcZIndex", mcWidth: "mcWidth", mcSize: "mcSize", mcWrapClassName: "mcWrapClassName", mcClassName: "mcClassName", mcStyle: "mcStyle", mcTitle: "mcTitle", mcCloseByESC: "mcCloseByESC", mcClosable: "mcClosable", mcMask: "mcMask", mcMaskClosable: "mcMaskClosable", mcMaskStyle: "mcMaskStyle", mcBodyStyle: "mcBodyStyle", mcOkText: "mcOkText", mcOkType: "mcOkType", mcRestoreFocus: "mcRestoreFocus", mcOkLoading: "mcOkLoading", mcOnOk: "mcOnOk", mcCancelText: "mcCancelText", mcCancelLoading: "mcCancelLoading", mcOnCancel: "mcOnCancel", mcGetContainer: "mcGetContainer" }, outputs: { mcVisibleChange: "mcVisibleChange", mcAfterOpen: "mcAfterOpen", mcAfterClose: "mcAfterClose", mcOnOk: "mcOnOk", mcOnCancel: "mcOnCancel" }, host: { listeners: { "keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "modalContainer", first: true, predicate: ["modalContainer"], descendants: true, static: true }, { propertyName: "bodyContainer", first: true, predicate: ["bodyContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "modalBody", first: true, predicate: ["modalBody"], descendants: true }, { propertyName: "autoFocusedButtons", predicate: ["autoFocusedButton"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content></ng-content>\n</ng-template>\n\n<div>\n <div *ngIf=\"mcMask\"\n class=\"kbq-modal-mask\"\n [ngClass]=\"maskAnimationClassMap\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngStyle]=\"mcMaskStyle\"\n [style.zIndex]=\"mcZIndex\"\n ></div>\n <div (mousedown)=\"onClickMask($event)\"\n class=\"kbq-modal-wrap {{ mcWrapClassName }}\"\n [style.zIndex]=\"mcZIndex\"\n [style.display]=\"hidden ? 'none' : ''\"\n tabindex=\"-1\">\n\n <div #modalContainer\n class=\"kbq-modal {{ mcClassName }} kbq-modal_{{ mcSize }}\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"mcStyle\"\n [style.width]=\"mcWidth | toCssUnit\"\n [style.transform-origin]=\"transformOrigin\">\n\n <div class=\"kbq-modal-content\" cdkTrapFocus>\n <button *ngIf=\"mcClosable\"\n kbq-button\n (click)=\"onClickCloseBtn()\"\n class=\"kbq-modal-close kbq-button_transparent\">\n <i kbq-icon=\"mc-close-L_16\" class=\"kbq-icon kbq-icon_light\" [color]=\"themePalette.Secondary\"></i>\n </button>\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isModalType('default')\"\n [ngTemplateOutlet]=\"tplContentDefault\"></ng-container>\n <ng-container *ngSwitchCase=\"isModalType('confirm')\"\n [ngTemplateOutlet]=\"tplContentConfirm\"></ng-container>\n <ng-container *ngSwitchCase=\"isModalType('custom')\"\n [ngTemplateOutlet]=\"tplContentCustom\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer></ng-container>\n</ng-template>\n\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n <div *ngIf=\"mcTitle\" class=\"kbq-modal-header\" [class.kbq-modal-body_top-overflow]=\"isTopOverflow\">\n <div class=\"kbq-modal-title\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcTitle)\" [ngTemplateOutlet]=\"$any(mcTitle)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcTitle)\">\n <div [innerHTML]=\"mcTitle\"></div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"kbq-modal-body kbq-scrollbar\" #modalBody [ngStyle]=\"mcBodyStyle\" (scroll)=\"checkOverflow()\">\n <ng-container #bodyContainer>\n <ng-container *ngIf=\"!isComponent(mcContent)\" [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcContent)\" [ngTemplateOutlet]=\"$any(mcContent)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcContent)\">\n <div [innerHTML]=\"mcContent\"></div>\n </ng-container>\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"tplOriginContent\"></ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div *ngIf=\"mcFooter || mcOkText || mcCancelText\" class=\"kbq-modal-footer\" [class.kbq-modal-body_bottom-overflow]=\"isBottomOverflow\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcFooter)\" [ngTemplateOutlet]=\"$any(mcFooter)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcFooter)\">\n <div [innerHTML]=\"mcFooter\"></div>\n </ng-container>\n <ng-container *ngSwitchCase=\"isModalButtons(mcFooter)\">\n <ng-container *ngFor=\"let button of $any(mcFooter)\">\n <button\n kbq-button\n #autoFocusedButton\n [attr.autofocus]=\"button.autoFocus\"\n [attr.kbq-modal-main-action]=\"button.mcModalMainAction\"\n *ngIf=\"getButtonCallableProp(button, 'show')\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n [class.kbq-progress]=\"getButtonCallableProp(button, 'loading')\"\n (click)=\"onButtonClick(button)\"\n [color]=\"button.type\">\n {{ button.label }}\n </button>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button\n #autoFocusedButton\n [attr.autofocus]=\"true\"\n *ngIf=\"mcOkText\"\n kbq-button\n [color]=\"themePalette.Primary\"\n (click)=\"onClickOkCancel('ok')\">\n\n {{ okText }}\n </button>\n <button *ngIf=\"mcCancelText\" kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n<!-- /[Predefined] Default Modal Content -->\n\n<!-- [Predefined] Confirm Modal Content -->\n<ng-template #tplContentConfirm>\n <div class=\"kbq-modal-body\" [ngStyle]=\"mcBodyStyle\">\n <div class=\"kbq-confirm-body-wrapper\">\n <div class=\"kbq-confirm-body\">\n <div class=\"kbq-confirm-content\">\n <ng-container #bodyContainer>\n <ng-container *ngIf=\"!isComponent(mcContent)\" [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcContent)\"\n [ngTemplateOutlet]=\"$any(mcContent)\">\n </ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcContent)\">\n <div [innerHTML]=\"mcContent\"></div>\n </ng-container>\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"tplOriginContent\"></ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </div> <!-- /.kbq-confirm-body-wrapper -->\n </div>\n <div class=\"kbq-confirm-btns\" *ngIf=\"mcOkText || mcCancelText\">\n <button\n kbq-button\n #autoFocusedButton\n [color]=\"mcOkType\"\n [attr.autofocus]=\"true\"\n *ngIf=\"mcOkText\"\n (click)=\"onClickOkCancel('ok')\">\n\n {{ okText }}\n </button>\n\n <button kbq-button [color]=\"themePalette.Secondary\" *ngIf=\"mcCancelText\" (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n </div>\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".kbq-confirm .kbq-modal-header,.kbq-confirm .kbq-modal-close{display:none}.kbq-confirm .kbq-modal-body{padding:var(--kbq-modal-confirm-size-padding, 24px)}.kbq-confirm-body-wrapper{zoom:1}.kbq-confirm-body-wrapper:before,.kbq-confirm-body-wrapper:after{content:\"\";display:table}.kbq-confirm-body-wrapper:after{clear:both}.kbq-confirm-body .kbq-confirm-title{display:block;overflow:auto}.kbq-confirm .kbq-confirm-btns{border-radius:var(--kbq-modal-footer-size-border-radius, 0 0 8px 8px);text-align:right}.kbq-confirm .kbq-confirm-btns button+button,.kbq-confirm .kbq-confirm-btns button:only-child{margin:16px}.kbq-modal{box-sizing:border-box;position:relative;top:var(--kbq-modal-size-top, 48px);width:auto;margin:0 auto;list-style:none}.kbq-modal.zoom-enter,.kbq-modal.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.kbq-modal.kbq-modal_small{width:var(--kbq-modal-size-small, 400px)}.kbq-modal.kbq-modal_medium{width:var(--kbq-modal-size-medium, 640px)}.kbq-modal.kbq-modal_large{width:var(--kbq-modal-size-large, 960px)}.kbq-modal .kbq-modal-close{position:absolute;z-index:10;top:0;right:0;width:var(--kbq-modal-size-close-width, 56px);height:var(--kbq-modal-size-close-width, 56px)}.kbq-modal-wrap{position:fixed;z-index:1000;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.kbq-modal-title{margin:0}.kbq-modal-content{position:relative;border-radius:var(--kbq-modal-size-border-radius, 8px);background-clip:padding-box;background-color:#fff}.kbq-modal-header{display:flex;align-items:center;height:var(--kbq-modal-header-size-height, 56px);border-radius:var(--kbq-modal-header-size-border-radius, 8px 8px 0 0);padding:var(--kbq-modal-header-size-padding, 0 16px)}.kbq-modal-body{display:block;overflow-y:auto;max-height:var(--kbq-modal-body-size-max-height, calc(100vh - 260px));padding:var(--kbq-modal-body-size-padding, 16px 24px 24px);word-wrap:break-word}.kbq-modal-footer{display:flex;align-items:center;justify-content:flex-end;height:var(--kbq-modal-footer-size-height, 64px);border-radius:var(--kbq-modal-footer-size-border-radius, 0 0 8px 8px);padding:var(--kbq-modal-footer-size-padding, 0 16px)}.kbq-modal-footer button+button{margin-left:16px;margin-bottom:0}.kbq-modal-mask{position:fixed;z-index:1000;inset:0;height:100%}.kbq-modal-mask.kbq-modal-mask-hidden{display:none}.kbq-modal-open{overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i4.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: i5.KbqButton, selector: "[kbq-button]", inputs: ["color", "tabIndex", "kbqStyle", "disabled"] }, { kind: "directive", type: i5.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "component", type: i6.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "pipe", type: CssUnitPipe, name: "toCssUnit" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
532
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqModalComponent, selector: "kbq-modal", inputs: { mcModalType: "mcModalType", mcComponent: "mcComponent", mcContent: "mcContent", mcComponentParams: "mcComponentParams", mcFooter: "mcFooter", mcVisible: "mcVisible", mcZIndex: "mcZIndex", mcWidth: "mcWidth", mcSize: "mcSize", mcWrapClassName: "mcWrapClassName", mcClassName: "mcClassName", mcStyle: "mcStyle", mcTitle: "mcTitle", mcCloseByESC: "mcCloseByESC", mcClosable: "mcClosable", mcMask: "mcMask", mcMaskClosable: "mcMaskClosable", mcMaskStyle: "mcMaskStyle", mcBodyStyle: "mcBodyStyle", mcOkText: "mcOkText", mcOkType: "mcOkType", mcRestoreFocus: "mcRestoreFocus", mcOkLoading: "mcOkLoading", mcOnOk: "mcOnOk", mcCancelText: "mcCancelText", mcCancelLoading: "mcCancelLoading", mcOnCancel: "mcOnCancel", mcGetContainer: "mcGetContainer" }, outputs: { mcVisibleChange: "mcVisibleChange", mcAfterOpen: "mcAfterOpen", mcAfterClose: "mcAfterClose", mcOnOk: "mcOnOk", mcOnCancel: "mcOnCancel" }, host: { listeners: { "keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "modalContainer", first: true, predicate: ["modalContainer"], descendants: true, static: true }, { propertyName: "bodyContainer", first: true, predicate: ["bodyContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "modalBody", first: true, predicate: ["modalBody"], descendants: true }, { propertyName: "autoFocusedButtons", predicate: ["autoFocusedButton"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content></ng-content>\n</ng-template>\n\n<div>\n <div *ngIf=\"mcMask\"\n class=\"kbq-modal-mask\"\n [ngClass]=\"maskAnimationClassMap\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngStyle]=\"mcMaskStyle\"\n [style.zIndex]=\"mcZIndex\">\n </div>\n\n <div (mousedown)=\"onClickMask($event)\"\n class=\"kbq-modal-wrap {{ mcWrapClassName }}\"\n [style.zIndex]=\"mcZIndex\"\n [style.display]=\"hidden ? 'none' : ''\"\n tabindex=\"-1\">\n\n <div #modalContainer\n class=\"kbq-modal {{ mcClassName }} kbq-modal_{{ mcSize }}\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"mcStyle\"\n [style.width]=\"mcWidth | toCssUnit\"\n [style.transform-origin]=\"transformOrigin\">\n\n <div class=\"kbq-modal-content\" cdkTrapFocus [cdkTrapFocusAutoCapture]=\"mcRestoreFocus\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isModalType('default')\"\n [ngTemplateOutlet]=\"tplContentDefault\"></ng-container>\n <ng-container *ngSwitchCase=\"isModalType('confirm')\"\n [ngTemplateOutlet]=\"tplContentConfirm\"></ng-container>\n <ng-container *ngSwitchCase=\"isModalType('custom')\"\n [ngTemplateOutlet]=\"tplContentCustom\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer></ng-container>\n</ng-template>\n\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n <div *ngIf=\"mcTitle\" class=\"kbq-modal-header\" kbq-title>\n <div class=\"kbq-modal-title\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcTitle)\" [ngTemplateOutlet]=\"$any(mcTitle)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcTitle)\">\n <div [innerHTML]=\"mcTitle\"></div>\n </ng-container>\n </ng-container>\n </div>\n\n <button *ngIf=\"mcClosable\"\n kbq-button\n [color]=\"'contrast'\"\n (click)=\"onClickCloseBtn()\"\n class=\"kbq-modal-close kbq-button_transparent\">\n <i kbq-icon=\"mc-close-L_16\" [color]=\"componentColors.Contrast\"></i>\n </button>\n </div>\n <div class=\"kbq-modal-body kbq-scrollbar\" #modalBody [ngStyle]=\"mcBodyStyle\">\n <ng-container #bodyContainer>\n <ng-container *ngIf=\"!isComponent(mcContent)\" [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcContent)\" [ngTemplateOutlet]=\"$any(mcContent)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcContent)\">\n <div [innerHTML]=\"mcContent\"></div>\n </ng-container>\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"tplOriginContent\"></ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div *ngIf=\"mcFooter || mcOkText || mcCancelText\" class=\"kbq-modal-footer\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcFooter)\" [ngTemplateOutlet]=\"$any(mcFooter)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcFooter)\">\n <div [innerHTML]=\"mcFooter\"></div>\n </ng-container>\n <ng-container *ngSwitchCase=\"isModalButtons(mcFooter)\">\n <ng-container *ngFor=\"let button of $any(mcFooter)\">\n <button\n kbq-button\n #autoFocusedButton\n [attr.autofocus]=\"button.autoFocus\"\n [attr.kbq-modal-main-action]=\"button.mcModalMainAction\"\n *ngIf=\"getButtonCallableProp(button, 'show')\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n [class.kbq-progress]=\"getButtonCallableProp(button, 'loading')\"\n (click)=\"onButtonClick(button)\"\n [color]=\"button.type\">\n {{ button.label }}\n </button>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button\n #autoFocusedButton\n [attr.autofocus]=\"true\"\n *ngIf=\"mcOkText\"\n kbq-button\n [color]=\"componentColors.Contrast\"\n (click)=\"onClickOkCancel('ok')\">\n\n {{ okText }}\n </button>\n <button *ngIf=\"mcCancelText\" kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n<!-- /[Predefined] Default Modal Content -->\n\n<!-- [Predefined] Confirm Modal Content -->\n<ng-template #tplContentConfirm>\n <div class=\"kbq-modal-body\" [ngStyle]=\"mcBodyStyle\">\n <ng-container #bodyContainer>\n <ng-container *ngIf=\"!isComponent(mcContent)\" [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcContent)\"\n [ngTemplateOutlet]=\"$any(mcContent)\">\n </ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcContent)\">\n <div [innerHTML]=\"mcContent\"></div>\n </ng-container>\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"tplOriginContent\"></ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div class=\"kbq-confirm-footer\" *ngIf=\"mcOkText || mcCancelText\">\n <button\n kbq-button\n #autoFocusedButton\n [color]=\"mcOkType\"\n [attr.autofocus]=\"true\"\n *ngIf=\"mcOkText\"\n (click)=\"onClickOkCancel('ok')\">\n\n {{ okText }}\n </button>\n\n <button kbq-button *ngIf=\"mcCancelText\" (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n </div>\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".kbq-confirm .kbq-modal-close{display:none}.kbq-confirm .kbq-modal-body{padding-right:var(--kbq-modal-size-content-padding-horizontal, 32px);padding-left:var(--kbq-modal-size-content-padding-horizontal, 32px);padding-bottom:var(--kbq-modal-size-content-padding-bottom, 24px)}.kbq-confirm .kbq-confirm-footer{display:flex;padding:var(--kbq-modal-size-footer-padding-top, 8px) var(--kbq-modal-size-footer-padding-horizontal, ) var(--kbq-modal-size-footer-padding-bottom, 32px) var(--kbq-modal-size-footer-padding-horizontal, 32px);gap:var(--kbq-modal-size-footer-content-gap-horizontal, 16px)}.kbq-modal{box-sizing:border-box;position:relative;top:48px;border-radius:var(--kbq-modal-size-border-radius, 8px);width:auto;margin:0 auto;list-style:none}.kbq-modal.zoom-enter,.kbq-modal.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.kbq-modal.kbq-modal_small{width:var(--kbq-modal-size-small-width, 400px)}.kbq-modal.kbq-modal_medium{width:var(--kbq-modal-size-medium-width, 640px)}.kbq-modal.kbq-modal_large{width:var(--kbq-modal-size-large-width, 960px)}.kbq-modal-wrap{position:fixed;z-index:1000;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.kbq-modal-content{position:relative;border-radius:var(--kbq-modal-size-border-radius, 8px);background-clip:padding-box;background-color:#fff}.kbq-modal-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kbq-modal-size-header-padding-vertical, 16px) var(--kbq-modal-size-header-padding-right, 12px) var(--kbq-modal-size-header-padding-vertical, 16px) var(--kbq-modal-size-header-padding-left, 32px)}.kbq-modal-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.kbq-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);padding-right:var(--kbq-modal-size-content-padding-horizontal, 32px);padding-left:var(--kbq-modal-size-content-padding-horizontal, 32px);padding-bottom:var(--kbq-modal-size-content-padding-bottom, 24px);word-wrap:break-word}.kbq-modal-footer{display:flex;align-items:center;padding:var(--kbq-modal-size-footer-padding-top, 8px) var(--kbq-modal-size-footer-padding-horizontal, ) var(--kbq-modal-size-footer-padding-bottom, 32px) var(--kbq-modal-size-footer-padding-horizontal, 32px);gap:var(--kbq-modal-size-footer-content-gap-horizontal, 16px)}.kbq-modal-mask{position:fixed;z-index:1000;inset:0;height:100%}.kbq-modal-mask.kbq-modal-mask-hidden{display:none}.kbq-modal-open{overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i4.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: i5.KbqButton, selector: "[kbq-button]", inputs: ["color", "tabIndex", "kbqStyle", "disabled"] }, { kind: "directive", type: i5.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "component", type: i6.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "directive", type: i7.KbqTitleDirective, selector: "[kbq-title]", exportAs: ["mcTitle"] }, { kind: "pipe", type: CssUnitPipe, name: "toCssUnit" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
545
533
|
}
|
|
546
534
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqModalComponent, decorators: [{
|
|
547
535
|
type: Component,
|
|
548
536
|
args: [{ selector: 'kbq-modal', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
549
537
|
'(keydown)': 'onKeyDown($event)'
|
|
550
|
-
}, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content></ng-content>\n</ng-template>\n\n<div>\n <div *ngIf=\"mcMask\"\n class=\"kbq-modal-mask\"\n [ngClass]=\"maskAnimationClassMap\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngStyle]=\"mcMaskStyle\"\n [style.zIndex]=\"mcZIndex\"
|
|
538
|
+
}, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content></ng-content>\n</ng-template>\n\n<div>\n <div *ngIf=\"mcMask\"\n class=\"kbq-modal-mask\"\n [ngClass]=\"maskAnimationClassMap\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngStyle]=\"mcMaskStyle\"\n [style.zIndex]=\"mcZIndex\">\n </div>\n\n <div (mousedown)=\"onClickMask($event)\"\n class=\"kbq-modal-wrap {{ mcWrapClassName }}\"\n [style.zIndex]=\"mcZIndex\"\n [style.display]=\"hidden ? 'none' : ''\"\n tabindex=\"-1\">\n\n <div #modalContainer\n class=\"kbq-modal {{ mcClassName }} kbq-modal_{{ mcSize }}\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"mcStyle\"\n [style.width]=\"mcWidth | toCssUnit\"\n [style.transform-origin]=\"transformOrigin\">\n\n <div class=\"kbq-modal-content\" cdkTrapFocus [cdkTrapFocusAutoCapture]=\"mcRestoreFocus\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isModalType('default')\"\n [ngTemplateOutlet]=\"tplContentDefault\"></ng-container>\n <ng-container *ngSwitchCase=\"isModalType('confirm')\"\n [ngTemplateOutlet]=\"tplContentConfirm\"></ng-container>\n <ng-container *ngSwitchCase=\"isModalType('custom')\"\n [ngTemplateOutlet]=\"tplContentCustom\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer></ng-container>\n</ng-template>\n\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n <div *ngIf=\"mcTitle\" class=\"kbq-modal-header\" kbq-title>\n <div class=\"kbq-modal-title\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcTitle)\" [ngTemplateOutlet]=\"$any(mcTitle)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcTitle)\">\n <div [innerHTML]=\"mcTitle\"></div>\n </ng-container>\n </ng-container>\n </div>\n\n <button *ngIf=\"mcClosable\"\n kbq-button\n [color]=\"'contrast'\"\n (click)=\"onClickCloseBtn()\"\n class=\"kbq-modal-close kbq-button_transparent\">\n <i kbq-icon=\"mc-close-L_16\" [color]=\"componentColors.Contrast\"></i>\n </button>\n </div>\n <div class=\"kbq-modal-body kbq-scrollbar\" #modalBody [ngStyle]=\"mcBodyStyle\">\n <ng-container #bodyContainer>\n <ng-container *ngIf=\"!isComponent(mcContent)\" [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcContent)\" [ngTemplateOutlet]=\"$any(mcContent)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcContent)\">\n <div [innerHTML]=\"mcContent\"></div>\n </ng-container>\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"tplOriginContent\"></ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div *ngIf=\"mcFooter || mcOkText || mcCancelText\" class=\"kbq-modal-footer\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcFooter)\" [ngTemplateOutlet]=\"$any(mcFooter)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcFooter)\">\n <div [innerHTML]=\"mcFooter\"></div>\n </ng-container>\n <ng-container *ngSwitchCase=\"isModalButtons(mcFooter)\">\n <ng-container *ngFor=\"let button of $any(mcFooter)\">\n <button\n kbq-button\n #autoFocusedButton\n [attr.autofocus]=\"button.autoFocus\"\n [attr.kbq-modal-main-action]=\"button.mcModalMainAction\"\n *ngIf=\"getButtonCallableProp(button, 'show')\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n [class.kbq-progress]=\"getButtonCallableProp(button, 'loading')\"\n (click)=\"onButtonClick(button)\"\n [color]=\"button.type\">\n {{ button.label }}\n </button>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button\n #autoFocusedButton\n [attr.autofocus]=\"true\"\n *ngIf=\"mcOkText\"\n kbq-button\n [color]=\"componentColors.Contrast\"\n (click)=\"onClickOkCancel('ok')\">\n\n {{ okText }}\n </button>\n <button *ngIf=\"mcCancelText\" kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n<!-- /[Predefined] Default Modal Content -->\n\n<!-- [Predefined] Confirm Modal Content -->\n<ng-template #tplContentConfirm>\n <div class=\"kbq-modal-body\" [ngStyle]=\"mcBodyStyle\">\n <ng-container #bodyContainer>\n <ng-container *ngIf=\"!isComponent(mcContent)\" [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcContent)\"\n [ngTemplateOutlet]=\"$any(mcContent)\">\n </ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcContent)\">\n <div [innerHTML]=\"mcContent\"></div>\n </ng-container>\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"tplOriginContent\"></ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div class=\"kbq-confirm-footer\" *ngIf=\"mcOkText || mcCancelText\">\n <button\n kbq-button\n #autoFocusedButton\n [color]=\"mcOkType\"\n [attr.autofocus]=\"true\"\n *ngIf=\"mcOkText\"\n (click)=\"onClickOkCancel('ok')\">\n\n {{ okText }}\n </button>\n\n <button kbq-button *ngIf=\"mcCancelText\" (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n </div>\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".kbq-confirm .kbq-modal-close{display:none}.kbq-confirm .kbq-modal-body{padding-right:var(--kbq-modal-size-content-padding-horizontal, 32px);padding-left:var(--kbq-modal-size-content-padding-horizontal, 32px);padding-bottom:var(--kbq-modal-size-content-padding-bottom, 24px)}.kbq-confirm .kbq-confirm-footer{display:flex;padding:var(--kbq-modal-size-footer-padding-top, 8px) var(--kbq-modal-size-footer-padding-horizontal, ) var(--kbq-modal-size-footer-padding-bottom, 32px) var(--kbq-modal-size-footer-padding-horizontal, 32px);gap:var(--kbq-modal-size-footer-content-gap-horizontal, 16px)}.kbq-modal{box-sizing:border-box;position:relative;top:48px;border-radius:var(--kbq-modal-size-border-radius, 8px);width:auto;margin:0 auto;list-style:none}.kbq-modal.zoom-enter,.kbq-modal.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.kbq-modal.kbq-modal_small{width:var(--kbq-modal-size-small-width, 400px)}.kbq-modal.kbq-modal_medium{width:var(--kbq-modal-size-medium-width, 640px)}.kbq-modal.kbq-modal_large{width:var(--kbq-modal-size-large-width, 960px)}.kbq-modal-wrap{position:fixed;z-index:1000;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.kbq-modal-content{position:relative;border-radius:var(--kbq-modal-size-border-radius, 8px);background-clip:padding-box;background-color:#fff}.kbq-modal-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kbq-modal-size-header-padding-vertical, 16px) var(--kbq-modal-size-header-padding-right, 12px) var(--kbq-modal-size-header-padding-vertical, 16px) var(--kbq-modal-size-header-padding-left, 32px)}.kbq-modal-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.kbq-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);padding-right:var(--kbq-modal-size-content-padding-horizontal, 32px);padding-left:var(--kbq-modal-size-content-padding-horizontal, 32px);padding-bottom:var(--kbq-modal-size-content-padding-bottom, 24px);word-wrap:break-word}.kbq-modal-footer{display:flex;align-items:center;padding:var(--kbq-modal-size-footer-padding-top, 8px) var(--kbq-modal-size-footer-padding-horizontal, ) var(--kbq-modal-size-footer-padding-bottom, 32px) var(--kbq-modal-size-footer-padding-horizontal, 32px);gap:var(--kbq-modal-size-footer-content-gap-horizontal, 16px)}.kbq-modal-mask{position:fixed;z-index:1000;inset:0;height:100%}.kbq-modal-mask.kbq-modal-mask-hidden{display:none}.kbq-modal-open{overflow:hidden}\n"] }]
|
|
551
539
|
}], ctorParameters: function () { return [{ type: i1.Overlay }, { type: i0.Renderer2 }, { type: i0.ComponentFactoryResolver }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: KbqModalControlService }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
552
540
|
type: Inject,
|
|
553
541
|
args: [DOCUMENT]
|
|
@@ -814,19 +802,22 @@ class KbqModalModule {
|
|
|
814
802
|
OverlayModule,
|
|
815
803
|
A11yModule,
|
|
816
804
|
KbqButtonModule,
|
|
817
|
-
KbqIconModule
|
|
805
|
+
KbqIconModule,
|
|
806
|
+
KbqTitleModule], exports: [KbqModalComponent,
|
|
818
807
|
KbqModalTitle,
|
|
819
808
|
KbqModalBody,
|
|
820
809
|
KbqModalFooter,
|
|
821
810
|
KbqModalMainAction] }); }
|
|
822
811
|
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqModalModule, providers: [
|
|
823
812
|
KbqModalControlService,
|
|
824
|
-
KbqModalService
|
|
813
|
+
KbqModalService,
|
|
814
|
+
{ provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory }
|
|
825
815
|
], imports: [CommonModule,
|
|
826
816
|
OverlayModule,
|
|
827
817
|
A11yModule,
|
|
828
818
|
KbqButtonModule,
|
|
829
|
-
KbqIconModule
|
|
819
|
+
KbqIconModule,
|
|
820
|
+
KbqTitleModule] }); }
|
|
830
821
|
}
|
|
831
822
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqModalModule, decorators: [{
|
|
832
823
|
type: NgModule,
|
|
@@ -836,7 +827,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
836
827
|
OverlayModule,
|
|
837
828
|
A11yModule,
|
|
838
829
|
KbqButtonModule,
|
|
839
|
-
KbqIconModule
|
|
830
|
+
KbqIconModule,
|
|
831
|
+
KbqTitleModule
|
|
840
832
|
],
|
|
841
833
|
exports: [
|
|
842
834
|
KbqModalComponent,
|
|
@@ -855,7 +847,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
855
847
|
],
|
|
856
848
|
providers: [
|
|
857
849
|
KbqModalControlService,
|
|
858
|
-
KbqModalService
|
|
850
|
+
KbqModalService,
|
|
851
|
+
{ provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory }
|
|
859
852
|
]
|
|
860
853
|
}]
|
|
861
854
|
}] });
|