@koobiq/components 17.0.0-rc.1 → 17.0.0-rc.3
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/alert/_alert-theme.scss +58 -19
- package/alert/alert.component.d.ts +23 -3
- package/alert/alert.component.scss +175 -50
- package/core/locales/formatters.d.ts +96 -0
- package/core/locales/locale-service.d.ts +96 -0
- package/core/pop-up/pop-up-trigger.d.ts +3 -1
- package/core/styles/theming/_components-theming.scss +53 -8
- package/core/styles/theming/_theming.scss +1 -3
- package/core/styles/typography/_typography.scss +35 -2
- package/core/utils/data-size/config.d.ts +20 -2
- package/core/utils/data-size/data-size.pipe.d.ts +10 -9
- package/core/utils/data-size/size.d.ts +3 -4
- package/ellipsis-center/ellipsis-center.directive.d.ts +3 -2
- package/esm2022/alert/alert.component.mjs +52 -5
- package/esm2022/core/animation/select-animations.mjs +4 -4
- package/esm2022/core/locales/formatters.mjs +97 -1
- package/esm2022/core/pop-up/pop-up-trigger.mjs +18 -11
- package/esm2022/core/utils/data-size/config.mjs +5 -17
- package/esm2022/core/utils/data-size/data-size.pipe.mjs +36 -22
- package/esm2022/core/utils/data-size/size.mjs +10 -14
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/dropdown/dropdown-animations.mjs +4 -4
- package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +7 -5
- package/esm2022/file-upload/file-upload.module.mjs +12 -6
- package/esm2022/file-upload/multiple-file-upload.component.mjs +85 -22
- package/esm2022/file-upload/single-file-upload.component.mjs +92 -21
- package/esm2022/form-field/password-toggle.mjs +11 -9
- package/esm2022/modal/modal.component.mjs +5 -6
- package/esm2022/navbar/navbar-item.component.mjs +9 -9
- package/esm2022/select/select-option.directive.mjs +7 -5
- package/esm2022/select/select.component.mjs +18 -8
- package/esm2022/textarea/textarea.component.mjs +4 -4
- package/esm2022/timezone/timezone-option.directive.mjs +7 -5
- package/esm2022/title/title.directive.mjs +2 -3
- package/esm2022/tooltip/tooltip.component.mjs +26 -12
- package/esm2022/tree/padding.directive.mjs +2 -2
- package/esm2022/tree-select/tree-select.component.mjs +18 -7
- package/fesm2022/koobiq-components-alert.mjs +52 -5
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +160 -62
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +3 -3
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +5 -4
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +171 -34
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +15 -15
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +4 -5
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +8 -8
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +22 -11
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +3 -3
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +5 -4
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +1 -2
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +24 -11
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +17 -6
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +1 -1
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/file-upload/file-upload.module.d.ts +11 -10
- package/file-upload/multiple-file-upload.component.d.ts +36 -6
- package/file-upload/single-file-upload.component.d.ts +37 -7
- package/form-field/password-toggle.d.ts +3 -2
- package/navbar/navbar-item.component.d.ts +4 -4
- package/package.json +7 -6
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/schematics/collection.json +11 -0
- package/schematics/ng-add/index.js +70 -0
- package/schematics/ng-add/schema.json +15 -0
- package/select/select-option.directive.d.ts +3 -2
- package/select/select.component.d.ts +2 -0
- package/splitter/_splitter-theme.scss +2 -2
- package/timezone/timezone-option.directive.d.ts +3 -2
- package/title/title.directive.d.ts +0 -1
- package/tooltip/tooltip.component.d.ts +12 -8
- package/tree-select/tree-select.component.d.ts +1 -0
|
@@ -3,9 +3,22 @@ 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, ContentChild, NgModule } from '@angular/core';
|
|
7
|
-
import { KbqIconItem } from '@koobiq/components/icon';
|
|
6
|
+
import { Directive, Component, ChangeDetectionStrategy, ViewEncapsulation, ContentChild, Input, NgModule } from '@angular/core';
|
|
7
|
+
import { KbqIconItem, KbqIcon } from '@koobiq/components/icon';
|
|
8
8
|
|
|
9
|
+
var KbqAlertStyles;
|
|
10
|
+
(function (KbqAlertStyles) {
|
|
11
|
+
KbqAlertStyles["Default"] = "default";
|
|
12
|
+
KbqAlertStyles["Colored"] = "colored";
|
|
13
|
+
})(KbqAlertStyles || (KbqAlertStyles = {}));
|
|
14
|
+
var KbqAlertColors;
|
|
15
|
+
(function (KbqAlertColors) {
|
|
16
|
+
KbqAlertColors["Contrast"] = "contrast";
|
|
17
|
+
KbqAlertColors["Error"] = "error";
|
|
18
|
+
KbqAlertColors["Warning"] = "warning";
|
|
19
|
+
KbqAlertColors["Success"] = "success";
|
|
20
|
+
KbqAlertColors["Theme"] = "theme";
|
|
21
|
+
})(KbqAlertColors || (KbqAlertColors = {}));
|
|
9
22
|
class KbqAlertTitle {
|
|
10
23
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqAlertTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
11
24
|
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: KbqAlertTitle, selector: "[kbq-alert-title]", host: { classAttribute: "kbq-alert__title" }, ngImport: i0 }); }
|
|
@@ -46,18 +59,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
46
59
|
}]
|
|
47
60
|
}] });
|
|
48
61
|
class KbqAlert {
|
|
62
|
+
constructor() {
|
|
63
|
+
this.compact = false;
|
|
64
|
+
this.alertStyle = KbqAlertStyles.Default;
|
|
65
|
+
this._alertColor = KbqAlertColors.Contrast;
|
|
66
|
+
}
|
|
67
|
+
get alertColor() {
|
|
68
|
+
return `kbq-alert_${this._alertColor}`;
|
|
69
|
+
}
|
|
70
|
+
set alertColor(value) {
|
|
71
|
+
this._alertColor = value || KbqAlertColors.Contrast;
|
|
72
|
+
}
|
|
73
|
+
get isColored() {
|
|
74
|
+
return this.alertStyle === KbqAlertStyles.Colored;
|
|
75
|
+
}
|
|
76
|
+
ngAfterContentInit() {
|
|
77
|
+
const icon = this.icon || this.iconItem;
|
|
78
|
+
if (icon) {
|
|
79
|
+
icon.color = this._alertColor;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
49
82
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
50
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqAlert, selector: "kbq-alert", host: { properties: { "class.kbq-alert_dismissible": "closeButton" }, classAttribute: "kbq-alert" }, queries: [{ propertyName: "iconItem", first: true, predicate: KbqIconItem, descendants: true }, { propertyName: "title", first: true, predicate: KbqAlertTitle, descendants: true }, { propertyName: "control", first: true, predicate: KbqAlertControl, descendants: true }, { propertyName: "closeButton", first: true, predicate: KbqAlertCloseButton, descendants: true }], ngImport: i0, template: "<div class=\"kbq-alert__icon\" *ngIf=\"iconItem\">\n <ng-content select=\"[kbq-icon-item]\"></ng-content>\n</div>\n\n<div class=\"kbq-alert__content\">\n <ng-content select=\"[kbq-alert-title]\"></ng-content>\n\n <div class=\"kbq-alert__text\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"kbq-
|
|
83
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqAlert, selector: "kbq-alert", inputs: { compact: "compact", alertStyle: "alertStyle", alertColor: "alertColor" }, host: { properties: { "class": "alertColor", "class.kbq-alert_normal": "!compact", "class.kbq-alert_compact": "compact", "class.kbq-alert_default": "!isColored", "class.kbq-alert_colored": "isColored", "class.kbq-alert_dismissible": "closeButton" }, classAttribute: "kbq-alert" }, queries: [{ propertyName: "iconItem", first: true, predicate: KbqIconItem, descendants: true }, { propertyName: "icon", first: true, predicate: KbqIcon, descendants: true }, { propertyName: "title", first: true, predicate: KbqAlertTitle, descendants: true }, { propertyName: "control", first: true, predicate: KbqAlertControl, descendants: true }, { propertyName: "closeButton", first: true, predicate: KbqAlertCloseButton, descendants: true }], ngImport: i0, template: "<div class=\"kbq-alert__icon\" [class.kbq-alert__icon_title]=\"title\" *ngIf=\"iconItem || icon\">\n <ng-content select=\"[kbq-icon-item],[kbq-icon]\"></ng-content>\n</div>\n\n<div class=\"kbq-alert__content\" [class.kbq-alert__content_title]=\"title\">\n <ng-content select=\"[kbq-alert-title]\"></ng-content>\n\n <div class=\"kbq-alert__text\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"kbq-alert__button-stack\" *ngIf=\"control\">\n <ng-content select=\"[kbq-alert-control]\"></ng-content>\n </div>\n</div>\n\n<div class=\"kbq-alert__close-button\" [hidden]=\"!closeButton\">\n <ng-content select=\"[kbq-alert-close-button]\"></ng-content>\n</div>\n", styles: [".kbq-alert{display:flex;width:492px}.kbq-alert .kbq-alert__content_title{margin-bottom:4px}.kbq-alert__content{display:flex;flex-direction:column;flex:1;justify-content:center}.kbq-alert.kbq-alert_normal{border-radius:var(--kbq-alert-size-normal-container-border-radius, 12px);padding:var(--kbq-alert-size-normal-container-padding-top, 0) var(--kbq-alert-size-normal-container-padding-right, 8px) var(--kbq-alert-size-normal-container-padding-bottom, 0) var(--kbq-alert-size-normal-container-padding-left, 8px)}.kbq-alert.kbq-alert_normal .kbq-alert__icon{margin:var(--kbq-alert-size-normal-icon-margin-top, 16px) var(--kbq-alert-size-normal-icon-margin-right, 0) var(--kbq-alert-size-normal-icon-margin-bottom, 16px) var(--kbq-alert-size-normal-icon-margin-left, 12px)}.kbq-alert.kbq-alert_normal .kbq-alert__icon.kbq-alert__icon_title .kbq-icon{margin-top:var(--kbq-alert-size-normal-icon-margin-addon-title, 2px)}.kbq-alert.kbq-alert_normal .kbq-alert__content{padding:var(--kbq-alert-size-normal-content-padding-top, 16px) var(--kbq-alert-size-normal-content-padding-right, 8px) var(--kbq-alert-size-normal-content-padding-bottom, 16px) var(--kbq-alert-size-normal-content-padding-left, 12px)}.kbq-alert.kbq-alert_normal .kbq-alert__title{margin-bottom:var(--kbq-alert-size-normal-title-margin-bottom, 4px)}.kbq-alert.kbq-alert_normal .kbq-alert__button-stack{padding-top:var(--kbq-alert-size-normal-button-stack-padding-top, 6px);padding-bottom:var(--kbq-alert-size-normal-button-stack-padding-bottom, 2px)}.kbq-alert.kbq-alert_normal .kbq-alert__close-button{margin-top:var(--kbq-alert-size-normal-close-button-margin-top, 4px);margin-left:var(--kbq-alert-size-normal-close-button-margin-left, 2px)}.kbq-alert.kbq-alert_compact{border-radius:var(--kbq-alert-size-compact-container-border-radius, 12px);padding:var(--kbq-alert-size-compact-container-padding-top, 0) var(--kbq-alert-size-compact-container-padding-right, 8px) var(--kbq-alert-size-compact-container-padding-bottom, 0) var(--kbq-alert-size-compact-container-padding-left, 16px)}.kbq-alert.kbq-alert_compact .kbq-alert__icon{margin-top:var(--kbq-alert-size-compact-icon-margin-top, 12px);margin-right:var(--kbq-alert-size-compact-icon-margin-right, 8px)}.kbq-alert.kbq-alert_compact .kbq-alert__icon.kbq-alert__icon_title .kbq-icon{margin-top:var(--kbq-alert-size-compact-icon-margin-addon-title, 2px)}.kbq-alert.kbq-alert_compact .kbq-alert__content{padding:var(--kbq-alert-size-compact-content-padding-top, 12px) var(--kbq-alert-size-compact-content-padding-right, 0) var(--kbq-alert-size-compact-content-padding-bottom, 12px) var(--kbq-alert-size-compact-content-padding-left, 0)}.kbq-alert.kbq-alert_compact .kbq-alert__title{margin-bottom:var(--kbq-alert-size-compact-title-margin-bottom, 2px)}.kbq-alert.kbq-alert_compact .kbq-alert__button-stack{padding-top:var(--kbq-alert-size-compact-button-stack-padding-top, 6px);padding-bottom:var(--kbq-alert-size-compact-button-stack-padding-bottom, 2px)}.kbq-alert.kbq-alert_compact .kbq-alert__close-button{margin-top:var(--kbq-alert-size-compact-close-button-margin-top, 4px);margin-left:var(--kbq-alert-size-compact-close-button-margin-left, 2px)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
51
84
|
}
|
|
52
85
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqAlert, decorators: [{
|
|
53
86
|
type: Component,
|
|
54
87
|
args: [{ selector: 'kbq-alert', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
55
88
|
class: 'kbq-alert',
|
|
89
|
+
'[class]': 'alertColor',
|
|
90
|
+
'[class.kbq-alert_normal]': '!compact',
|
|
91
|
+
'[class.kbq-alert_compact]': 'compact',
|
|
92
|
+
'[class.kbq-alert_default]': '!isColored',
|
|
93
|
+
'[class.kbq-alert_colored]': 'isColored',
|
|
56
94
|
'[class.kbq-alert_dismissible]': 'closeButton'
|
|
57
|
-
}, template: "<div class=\"kbq-alert__icon\" *ngIf=\"iconItem\">\n <ng-content select=\"[kbq-icon-item]\"></ng-content>\n</div>\n\n<div class=\"kbq-alert__content\">\n <ng-content select=\"[kbq-alert-title]\"></ng-content>\n\n <div class=\"kbq-alert__text\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"kbq-
|
|
95
|
+
}, template: "<div class=\"kbq-alert__icon\" [class.kbq-alert__icon_title]=\"title\" *ngIf=\"iconItem || icon\">\n <ng-content select=\"[kbq-icon-item],[kbq-icon]\"></ng-content>\n</div>\n\n<div class=\"kbq-alert__content\" [class.kbq-alert__content_title]=\"title\">\n <ng-content select=\"[kbq-alert-title]\"></ng-content>\n\n <div class=\"kbq-alert__text\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"kbq-alert__button-stack\" *ngIf=\"control\">\n <ng-content select=\"[kbq-alert-control]\"></ng-content>\n </div>\n</div>\n\n<div class=\"kbq-alert__close-button\" [hidden]=\"!closeButton\">\n <ng-content select=\"[kbq-alert-close-button]\"></ng-content>\n</div>\n", styles: [".kbq-alert{display:flex;width:492px}.kbq-alert .kbq-alert__content_title{margin-bottom:4px}.kbq-alert__content{display:flex;flex-direction:column;flex:1;justify-content:center}.kbq-alert.kbq-alert_normal{border-radius:var(--kbq-alert-size-normal-container-border-radius, 12px);padding:var(--kbq-alert-size-normal-container-padding-top, 0) var(--kbq-alert-size-normal-container-padding-right, 8px) var(--kbq-alert-size-normal-container-padding-bottom, 0) var(--kbq-alert-size-normal-container-padding-left, 8px)}.kbq-alert.kbq-alert_normal .kbq-alert__icon{margin:var(--kbq-alert-size-normal-icon-margin-top, 16px) var(--kbq-alert-size-normal-icon-margin-right, 0) var(--kbq-alert-size-normal-icon-margin-bottom, 16px) var(--kbq-alert-size-normal-icon-margin-left, 12px)}.kbq-alert.kbq-alert_normal .kbq-alert__icon.kbq-alert__icon_title .kbq-icon{margin-top:var(--kbq-alert-size-normal-icon-margin-addon-title, 2px)}.kbq-alert.kbq-alert_normal .kbq-alert__content{padding:var(--kbq-alert-size-normal-content-padding-top, 16px) var(--kbq-alert-size-normal-content-padding-right, 8px) var(--kbq-alert-size-normal-content-padding-bottom, 16px) var(--kbq-alert-size-normal-content-padding-left, 12px)}.kbq-alert.kbq-alert_normal .kbq-alert__title{margin-bottom:var(--kbq-alert-size-normal-title-margin-bottom, 4px)}.kbq-alert.kbq-alert_normal .kbq-alert__button-stack{padding-top:var(--kbq-alert-size-normal-button-stack-padding-top, 6px);padding-bottom:var(--kbq-alert-size-normal-button-stack-padding-bottom, 2px)}.kbq-alert.kbq-alert_normal .kbq-alert__close-button{margin-top:var(--kbq-alert-size-normal-close-button-margin-top, 4px);margin-left:var(--kbq-alert-size-normal-close-button-margin-left, 2px)}.kbq-alert.kbq-alert_compact{border-radius:var(--kbq-alert-size-compact-container-border-radius, 12px);padding:var(--kbq-alert-size-compact-container-padding-top, 0) var(--kbq-alert-size-compact-container-padding-right, 8px) var(--kbq-alert-size-compact-container-padding-bottom, 0) var(--kbq-alert-size-compact-container-padding-left, 16px)}.kbq-alert.kbq-alert_compact .kbq-alert__icon{margin-top:var(--kbq-alert-size-compact-icon-margin-top, 12px);margin-right:var(--kbq-alert-size-compact-icon-margin-right, 8px)}.kbq-alert.kbq-alert_compact .kbq-alert__icon.kbq-alert__icon_title .kbq-icon{margin-top:var(--kbq-alert-size-compact-icon-margin-addon-title, 2px)}.kbq-alert.kbq-alert_compact .kbq-alert__content{padding:var(--kbq-alert-size-compact-content-padding-top, 12px) var(--kbq-alert-size-compact-content-padding-right, 0) var(--kbq-alert-size-compact-content-padding-bottom, 12px) var(--kbq-alert-size-compact-content-padding-left, 0)}.kbq-alert.kbq-alert_compact .kbq-alert__title{margin-bottom:var(--kbq-alert-size-compact-title-margin-bottom, 2px)}.kbq-alert.kbq-alert_compact .kbq-alert__button-stack{padding-top:var(--kbq-alert-size-compact-button-stack-padding-top, 6px);padding-bottom:var(--kbq-alert-size-compact-button-stack-padding-bottom, 2px)}.kbq-alert.kbq-alert_compact .kbq-alert__close-button{margin-top:var(--kbq-alert-size-compact-close-button-margin-top, 4px);margin-left:var(--kbq-alert-size-compact-close-button-margin-left, 2px)}\n"] }]
|
|
58
96
|
}], propDecorators: { iconItem: [{
|
|
59
97
|
type: ContentChild,
|
|
60
98
|
args: [KbqIconItem]
|
|
99
|
+
}], icon: [{
|
|
100
|
+
type: ContentChild,
|
|
101
|
+
args: [KbqIcon]
|
|
61
102
|
}], title: [{
|
|
62
103
|
type: ContentChild,
|
|
63
104
|
args: [KbqAlertTitle]
|
|
@@ -67,6 +108,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
67
108
|
}], closeButton: [{
|
|
68
109
|
type: ContentChild,
|
|
69
110
|
args: [KbqAlertCloseButton]
|
|
111
|
+
}], compact: [{
|
|
112
|
+
type: Input
|
|
113
|
+
}], alertStyle: [{
|
|
114
|
+
type: Input
|
|
115
|
+
}], alertColor: [{
|
|
116
|
+
type: Input
|
|
70
117
|
}] } });
|
|
71
118
|
|
|
72
119
|
class KbqAlertModule {
|
|
@@ -111,5 +158,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
111
158
|
* Generated bundle index. Do not edit.
|
|
112
159
|
*/
|
|
113
160
|
|
|
114
|
-
export { KbqAlert, KbqAlertCloseButton, KbqAlertControl, KbqAlertModule, KbqAlertTitle };
|
|
161
|
+
export { KbqAlert, KbqAlertCloseButton, KbqAlertColors, KbqAlertControl, KbqAlertModule, KbqAlertStyles, KbqAlertTitle };
|
|
115
162
|
//# sourceMappingURL=koobiq-components-alert.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koobiq-components-alert.mjs","sources":["../../../packages/components/alert/alert.component.ts","../../../packages/components/alert/alert.component.html","../../../packages/components/alert/alert.module.ts","../../../packages/components/alert/koobiq-components-alert.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n Directive,\n ViewEncapsulation\n} from '@angular/core';\nimport { KbqIconItem } from '@koobiq/components/icon';\n\n\n@Directive({\n selector: '[kbq-alert-title]',\n host: {\n class: 'kbq-alert__title'\n }\n})\nexport class KbqAlertTitle {}\n\n@Directive({\n selector: '[kbq-alert-close-button]',\n host: {\n class: 'kbq-alert-close-button'\n }\n})\nexport class KbqAlertCloseButton {}\n\n@Directive({\n selector: '[kbq-alert-control]',\n host: {\n class: 'kbq-alert-control'\n }\n})\nexport class KbqAlertControl {}\n\n@Component({\n selector: 'kbq-alert',\n templateUrl: './alert.component.html',\n styleUrls: ['alert.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-alert',\n '[class.kbq-alert_dismissible]': 'closeButton'\n }\n})\nexport class KbqAlert {\n @ContentChild(KbqIconItem) iconItem: KbqIconItem;\n @ContentChild(KbqAlertTitle) title: KbqAlertTitle;\n @ContentChild(KbqAlertControl) control: KbqAlertControl;\n @ContentChild(KbqAlertCloseButton) closeButton: KbqAlertCloseButton;\n}\n","<div class=\"kbq-alert__icon\" *ngIf=\"iconItem\">\n <ng-content select=\"[kbq-icon-item]\"></ng-content>\n</div>\n\n<div class=\"kbq-alert__content\">\n <ng-content select=\"[kbq-alert-title]\"></ng-content>\n\n <div class=\"kbq-alert__text\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"kbq-
|
|
1
|
+
{"version":3,"file":"koobiq-components-alert.mjs","sources":["../../../packages/components/alert/alert.component.ts","../../../packages/components/alert/alert.component.html","../../../packages/components/alert/alert.module.ts","../../../packages/components/alert/koobiq-components-alert.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n Directive,\n Input,\n ViewEncapsulation\n} from '@angular/core';\nimport { KbqIcon, KbqIconItem } from '@koobiq/components/icon';\n\n\nexport enum KbqAlertStyles {\n Default = 'default',\n Colored = 'colored'\n}\n\nexport enum KbqAlertColors {\n Contrast = 'contrast',\n Error = 'error',\n Warning = 'warning',\n Success = 'success',\n Theme = 'theme'\n}\n\n@Directive({\n selector: '[kbq-alert-title]',\n host: {\n class: 'kbq-alert__title'\n }\n})\nexport class KbqAlertTitle {}\n\n@Directive({\n selector: '[kbq-alert-close-button]',\n host: {\n class: 'kbq-alert-close-button'\n }\n})\nexport class KbqAlertCloseButton {}\n\n@Directive({\n selector: '[kbq-alert-control]',\n host: {\n class: 'kbq-alert-control'\n }\n})\nexport class KbqAlertControl {}\n\n@Component({\n selector: 'kbq-alert',\n templateUrl: './alert.component.html',\n styleUrls: ['alert.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-alert',\n '[class]': 'alertColor',\n '[class.kbq-alert_normal]': '!compact',\n '[class.kbq-alert_compact]': 'compact',\n '[class.kbq-alert_default]': '!isColored',\n '[class.kbq-alert_colored]': 'isColored',\n '[class.kbq-alert_dismissible]': 'closeButton'\n }\n})\nexport class KbqAlert implements AfterContentInit {\n @ContentChild(KbqIconItem) iconItem: KbqIconItem;\n @ContentChild(KbqIcon) icon: KbqIcon;\n @ContentChild(KbqAlertTitle) title: KbqAlertTitle;\n @ContentChild(KbqAlertControl) control: KbqAlertControl;\n @ContentChild(KbqAlertCloseButton) closeButton: KbqAlertCloseButton;\n\n @Input() compact: boolean = false;\n @Input() alertStyle: KbqAlertStyles | string = KbqAlertStyles.Default;\n\n @Input()\n get alertColor(): string {\n return `kbq-alert_${this._alertColor}`;\n }\n\n set alertColor(value: string | KbqAlertColors) {\n this._alertColor = value || KbqAlertColors.Contrast;\n }\n\n private _alertColor: string | KbqAlertColors = KbqAlertColors.Contrast;\n\n get isColored(): boolean {\n return this.alertStyle === KbqAlertStyles.Colored\n }\n\n ngAfterContentInit(): void {\n const icon = this.icon || this.iconItem;\n\n if (icon) {\n icon.color = this._alertColor;\n }\n }\n}\n\n","<div class=\"kbq-alert__icon\" [class.kbq-alert__icon_title]=\"title\" *ngIf=\"iconItem || icon\">\n <ng-content select=\"[kbq-icon-item],[kbq-icon]\"></ng-content>\n</div>\n\n<div class=\"kbq-alert__content\" [class.kbq-alert__content_title]=\"title\">\n <ng-content select=\"[kbq-alert-title]\"></ng-content>\n\n <div class=\"kbq-alert__text\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"kbq-alert__button-stack\" *ngIf=\"control\">\n <ng-content select=\"[kbq-alert-control]\"></ng-content>\n </div>\n</div>\n\n<div class=\"kbq-alert__close-button\" [hidden]=\"!closeButton\">\n <ng-content select=\"[kbq-alert-close-button]\"></ng-content>\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';\n\nimport {\n KbqAlert,\n KbqAlertCloseButton,\n KbqAlertControl,\n KbqAlertTitle\n} from './alert.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n A11yModule,\n PlatformModule\n ],\n exports: [\n KbqAlert,\n KbqAlertTitle,\n KbqAlertCloseButton,\n KbqAlertControl\n ],\n declarations: [\n KbqAlert,\n KbqAlertTitle,\n KbqAlertCloseButton,\n KbqAlertControl\n ]\n})\nexport class KbqAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IAYY,eAGX;AAHD,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,c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
animate('
|
|
58
|
+
animate('0ms cubic-bezier(0.25, 0.8, 0.25, 1)')
|
|
59
59
|
])),
|
|
60
60
|
transition('* => void', [
|
|
61
|
-
animate('
|
|
61
|
+
animate('0ms 0ms linear', style({ opacity: 0 }))
|
|
62
62
|
])
|
|
63
63
|
]),
|
|
64
64
|
/**
|
|
@@ -70,7 +70,7 @@ const kbqSelectAnimations = {
|
|
|
70
70
|
state('showing', style({ opacity: 1 })),
|
|
71
71
|
transition('void => showing', [
|
|
72
72
|
style({ opacity: 0 }),
|
|
73
|
-
animate('
|
|
73
|
+
animate('0ms 0ms cubic-bezier(0.55, 0, 0.55, 0.2)')
|
|
74
74
|
])
|
|
75
75
|
])
|
|
76
76
|
};
|
|
@@ -726,6 +726,22 @@ const enUSFormattersData = {
|
|
|
726
726
|
groupSeparator: [','],
|
|
727
727
|
fractionSeparator: '.'
|
|
728
728
|
}
|
|
729
|
+
},
|
|
730
|
+
sizeUnits: {
|
|
731
|
+
defaultUnitSystem: 'SI',
|
|
732
|
+
defaultPrecision: 2,
|
|
733
|
+
unitSystems: {
|
|
734
|
+
SI: {
|
|
735
|
+
abbreviations: ['B', 'KB', 'MB', 'GB', 'TB'],
|
|
736
|
+
base: 10,
|
|
737
|
+
power: 3
|
|
738
|
+
},
|
|
739
|
+
IEC: {
|
|
740
|
+
abbreviations: ['B', 'KiB', 'MiB', 'GiB', 'TiB'],
|
|
741
|
+
base: 2,
|
|
742
|
+
power: 10
|
|
743
|
+
}
|
|
744
|
+
}
|
|
729
745
|
}
|
|
730
746
|
};
|
|
731
747
|
const esLAFormattersData = {
|
|
@@ -748,6 +764,22 @@ const esLAFormattersData = {
|
|
|
748
764
|
groupSeparator: [' ', ' '],
|
|
749
765
|
fractionSeparator: ','
|
|
750
766
|
}
|
|
767
|
+
},
|
|
768
|
+
sizeUnits: {
|
|
769
|
+
defaultUnitSystem: 'SI',
|
|
770
|
+
defaultPrecision: 2,
|
|
771
|
+
unitSystems: {
|
|
772
|
+
SI: {
|
|
773
|
+
abbreviations: ['Б', 'КБ', 'МБ', 'ГБ', 'ТБ'],
|
|
774
|
+
base: 10,
|
|
775
|
+
power: 3
|
|
776
|
+
},
|
|
777
|
+
IEC: {
|
|
778
|
+
abbreviations: ['Б', 'КиБ', 'МиБ', 'ГиБ', 'ТиБ'],
|
|
779
|
+
base: 2,
|
|
780
|
+
power: 10
|
|
781
|
+
}
|
|
782
|
+
}
|
|
751
783
|
}
|
|
752
784
|
};
|
|
753
785
|
const faIRFormattersData = {
|
|
@@ -769,6 +801,22 @@ const faIRFormattersData = {
|
|
|
769
801
|
groupSeparator: ['\u066C'],
|
|
770
802
|
fractionSeparator: '\u066B'
|
|
771
803
|
}
|
|
804
|
+
},
|
|
805
|
+
sizeUnits: {
|
|
806
|
+
defaultUnitSystem: 'SI',
|
|
807
|
+
defaultPrecision: 2,
|
|
808
|
+
unitSystems: {
|
|
809
|
+
SI: {
|
|
810
|
+
abbreviations: ['Б', 'КБ', 'МБ', 'ГБ', 'ТБ'],
|
|
811
|
+
base: 10,
|
|
812
|
+
power: 3
|
|
813
|
+
},
|
|
814
|
+
IEC: {
|
|
815
|
+
abbreviations: ['Б', 'КиБ', 'МиБ', 'ГиБ', 'ТиБ'],
|
|
816
|
+
base: 2,
|
|
817
|
+
power: 10
|
|
818
|
+
}
|
|
819
|
+
}
|
|
772
820
|
}
|
|
773
821
|
};
|
|
774
822
|
const ptBRFormattersData = {
|
|
@@ -789,6 +837,22 @@ const ptBRFormattersData = {
|
|
|
789
837
|
groupSeparator: ['.'],
|
|
790
838
|
fractionSeparator: ','
|
|
791
839
|
}
|
|
840
|
+
},
|
|
841
|
+
sizeUnits: {
|
|
842
|
+
defaultUnitSystem: 'SI',
|
|
843
|
+
defaultPrecision: 2,
|
|
844
|
+
unitSystems: {
|
|
845
|
+
SI: {
|
|
846
|
+
abbreviations: ['Б', 'КБ', 'МБ', 'ГБ', 'ТБ'],
|
|
847
|
+
base: 10,
|
|
848
|
+
power: 3
|
|
849
|
+
},
|
|
850
|
+
IEC: {
|
|
851
|
+
abbreviations: ['Б', 'КиБ', 'МиБ', 'ГиБ', 'ТиБ'],
|
|
852
|
+
base: 2,
|
|
853
|
+
power: 10
|
|
854
|
+
}
|
|
855
|
+
}
|
|
792
856
|
}
|
|
793
857
|
};
|
|
794
858
|
const ruRUFormattersData = {
|
|
@@ -812,6 +876,22 @@ const ruRUFormattersData = {
|
|
|
812
876
|
fractionSeparator: ',',
|
|
813
877
|
startFormattingFrom: 4
|
|
814
878
|
}
|
|
879
|
+
},
|
|
880
|
+
sizeUnits: {
|
|
881
|
+
defaultUnitSystem: 'SI',
|
|
882
|
+
defaultPrecision: 2,
|
|
883
|
+
unitSystems: {
|
|
884
|
+
SI: {
|
|
885
|
+
abbreviations: ['Б', 'КБ', 'МБ', 'ГБ', 'ТБ'],
|
|
886
|
+
base: 10,
|
|
887
|
+
power: 3
|
|
888
|
+
},
|
|
889
|
+
IEC: {
|
|
890
|
+
abbreviations: ['Б', 'КиБ', 'МиБ', 'ГиБ', 'ТиБ'],
|
|
891
|
+
base: 2,
|
|
892
|
+
power: 10
|
|
893
|
+
}
|
|
894
|
+
}
|
|
815
895
|
}
|
|
816
896
|
};
|
|
817
897
|
const zhCNFormattersData = {
|
|
@@ -831,6 +911,22 @@ const zhCNFormattersData = {
|
|
|
831
911
|
groupSeparator: [','],
|
|
832
912
|
fractionSeparator: '.'
|
|
833
913
|
}
|
|
914
|
+
},
|
|
915
|
+
sizeUnits: {
|
|
916
|
+
defaultUnitSystem: 'SI',
|
|
917
|
+
defaultPrecision: 2,
|
|
918
|
+
unitSystems: {
|
|
919
|
+
SI: {
|
|
920
|
+
abbreviations: ['Б', 'КБ', 'МБ', 'ГБ', 'ТБ'],
|
|
921
|
+
base: 10,
|
|
922
|
+
power: 3
|
|
923
|
+
},
|
|
924
|
+
IEC: {
|
|
925
|
+
abbreviations: ['Б', 'КиБ', 'МиБ', 'ГиБ', 'ТиБ'],
|
|
926
|
+
base: 2,
|
|
927
|
+
power: 10
|
|
928
|
+
}
|
|
929
|
+
}
|
|
834
930
|
}
|
|
835
931
|
};
|
|
836
932
|
|
|
@@ -2596,20 +2692,17 @@ class KbqPopUpTrigger {
|
|
|
2596
2692
|
this.clearListeners();
|
|
2597
2693
|
if (this.trigger.includes(PopUpTriggers.Click)) {
|
|
2598
2694
|
this.listeners
|
|
2599
|
-
.set('click',
|
|
2600
|
-
.forEach(this.addEventListener);
|
|
2695
|
+
.set(...this.createListener('click', this.show));
|
|
2601
2696
|
}
|
|
2602
2697
|
if (this.trigger.includes(PopUpTriggers.Hover)) {
|
|
2603
2698
|
this.listeners
|
|
2604
|
-
.set('mouseenter',
|
|
2605
|
-
.set('mouseleave',
|
|
2606
|
-
.forEach(this.addEventListener);
|
|
2699
|
+
.set(...this.createListener('mouseenter', this.show))
|
|
2700
|
+
.set(...this.createListener('mouseleave', this.hide));
|
|
2607
2701
|
}
|
|
2608
2702
|
if (this.trigger.includes(PopUpTriggers.Focus)) {
|
|
2609
2703
|
this.listeners
|
|
2610
|
-
.set('focus',
|
|
2611
|
-
.set('blur',
|
|
2612
|
-
.forEach(this.addEventListener);
|
|
2704
|
+
.set(...this.createListener('focus', this.show))
|
|
2705
|
+
.set(...this.createListener('blur', this.hide));
|
|
2613
2706
|
}
|
|
2614
2707
|
if (this.trigger.includes(PopUpTriggers.Keydown)) {
|
|
2615
2708
|
this.listeners
|
|
@@ -2617,9 +2710,10 @@ class KbqPopUpTrigger {
|
|
|
2617
2710
|
if (event instanceof KeyboardEvent && [ENTER, SPACE].includes(event.keyCode)) {
|
|
2618
2711
|
this.show();
|
|
2619
2712
|
}
|
|
2620
|
-
})
|
|
2621
|
-
.forEach(this.addEventListener);
|
|
2713
|
+
});
|
|
2622
2714
|
}
|
|
2715
|
+
this.listeners
|
|
2716
|
+
.forEach(this.addEventListener);
|
|
2623
2717
|
}
|
|
2624
2718
|
/** Updates the position of the current popover. */
|
|
2625
2719
|
updatePosition(reapplyPosition = false) {
|
|
@@ -2657,6 +2751,15 @@ class KbqPopUpTrigger {
|
|
|
2657
2751
|
this.listeners.forEach(this.removeEventListener);
|
|
2658
2752
|
this.listeners.clear();
|
|
2659
2753
|
}
|
|
2754
|
+
createListener(name, listener) {
|
|
2755
|
+
return [
|
|
2756
|
+
name,
|
|
2757
|
+
() => {
|
|
2758
|
+
this.triggerName = name;
|
|
2759
|
+
return listener.call(this);
|
|
2760
|
+
}
|
|
2761
|
+
];
|
|
2762
|
+
}
|
|
2660
2763
|
subscribeOnClosingActions() {
|
|
2661
2764
|
this.closingActionsSubscription?.unsubscribe();
|
|
2662
2765
|
this.closingActionsSubscription = this.closingActions()
|
|
@@ -2841,32 +2944,19 @@ var MeasurementSystem;
|
|
|
2841
2944
|
MeasurementSystem["SI"] = "SI";
|
|
2842
2945
|
MeasurementSystem["IEC"] = "IEC";
|
|
2843
2946
|
})(MeasurementSystem || (MeasurementSystem = {}));
|
|
2844
|
-
const
|
|
2845
|
-
|
|
2846
|
-
defaultPrecision: 2,
|
|
2847
|
-
unitSystems: {
|
|
2848
|
-
[MeasurementSystem.SI]: {
|
|
2849
|
-
abbreviations: ['B', 'KB', 'MB', 'GB', 'TB'],
|
|
2850
|
-
base: 10,
|
|
2851
|
-
power: 3
|
|
2852
|
-
},
|
|
2853
|
-
[MeasurementSystem.IEC]: {
|
|
2854
|
-
abbreviations: ['B', 'KiB', 'MiB', 'GiB', 'TiB'],
|
|
2855
|
-
base: 2,
|
|
2856
|
-
power: 10
|
|
2857
|
-
}
|
|
2858
|
-
}
|
|
2859
|
-
};
|
|
2947
|
+
const KBQ_SIZE_UNITS_DEFAULT_CONFIG = enUSFormattersData.sizeUnits;
|
|
2948
|
+
const KBQ_SIZE_UNITS_CONFIG = new InjectionToken('KbqSizeUnitsConfig');
|
|
2860
2949
|
|
|
2861
|
-
const formatDataSize = (value,
|
|
2862
|
-
const
|
|
2863
|
-
const { result, unit } = getHumanizedBytes(value, systemCode);
|
|
2950
|
+
const formatDataSize = (value, precision, system) => {
|
|
2951
|
+
const { result, unit } = getHumanizedBytes(value, system);
|
|
2864
2952
|
let volume;
|
|
2865
2953
|
if (system.abbreviations[0] === unit) {
|
|
2866
2954
|
volume = result.toString();
|
|
2867
2955
|
}
|
|
2868
2956
|
else {
|
|
2869
|
-
volume = result
|
|
2957
|
+
volume = result
|
|
2958
|
+
.toFixed(precision)
|
|
2959
|
+
.replace(/\./g, ',');
|
|
2870
2960
|
}
|
|
2871
2961
|
return {
|
|
2872
2962
|
value: volume,
|
|
@@ -2877,25 +2967,21 @@ const formatDataSize = (value, systemCode = sizeUnitsConfig.defaultUnitSystem, p
|
|
|
2877
2967
|
* Переводит байты в Кб, Мб, Гб
|
|
2878
2968
|
*
|
|
2879
2969
|
* @param value количество байт
|
|
2880
|
-
* @param
|
|
2970
|
+
* @param system система измерения
|
|
2881
2971
|
* @param threshold нижний порог подсчета
|
|
2882
2972
|
*/
|
|
2883
|
-
const getHumanizedBytes = (value,
|
|
2884
|
-
const system = sizeUnitsConfig.unitSystems[systemCode];
|
|
2885
|
-
if (!system) {
|
|
2886
|
-
throw new Error(`Unit system "${systemCode}" not configured!`);
|
|
2887
|
-
}
|
|
2973
|
+
const getHumanizedBytes = (value, system, threshold) => {
|
|
2888
2974
|
if (!Number.isFinite(value)) {
|
|
2889
2975
|
throw new Error('Argument "value" must be number!');
|
|
2890
2976
|
}
|
|
2891
|
-
const
|
|
2977
|
+
const calculatedThreshold = Number.isFinite(threshold)
|
|
2892
2978
|
? threshold : Math.pow(system.base, system.power);
|
|
2893
2979
|
const orderOfMagnitude = Math.pow(system.base, system.power);
|
|
2894
2980
|
let result = value;
|
|
2895
2981
|
let step = 0;
|
|
2896
2982
|
const len = system.abbreviations.length - 1;
|
|
2897
2983
|
while (step < len) {
|
|
2898
|
-
if (
|
|
2984
|
+
if (calculatedThreshold !== undefined && result < calculatedThreshold) {
|
|
2899
2985
|
break;
|
|
2900
2986
|
}
|
|
2901
2987
|
step++;
|
|
@@ -2908,42 +2994,54 @@ const getHumanizedBytes = (value, systemCode = sizeUnitsConfig.defaultUnitSystem
|
|
|
2908
2994
|
};
|
|
2909
2995
|
|
|
2910
2996
|
class KbqDataSizePipe {
|
|
2911
|
-
|
|
2912
|
-
|
|
2997
|
+
constructor(externalConfig, localeService) {
|
|
2998
|
+
this.externalConfig = externalConfig;
|
|
2999
|
+
this.localeService = localeService;
|
|
3000
|
+
this.updateLocaleParams = () => {
|
|
3001
|
+
this.config = this.externalConfig || this.localeService?.getParams('sizeUnits');
|
|
3002
|
+
};
|
|
3003
|
+
this.localeService?.changes
|
|
3004
|
+
.subscribe(this.updateLocaleParams);
|
|
3005
|
+
if (!localeService) {
|
|
3006
|
+
this.config = KBQ_SIZE_UNITS_DEFAULT_CONFIG;
|
|
3007
|
+
}
|
|
3008
|
+
}
|
|
3009
|
+
transform(source, precision, unitSystemName) {
|
|
3010
|
+
const unitSystem = this.config.unitSystems[unitSystemName || this.config.defaultUnitSystem];
|
|
3011
|
+
const { value, unit } = formatDataSize(source, precision || this.config.defaultPrecision, unitSystem);
|
|
2913
3012
|
return `${value} ${unit}`;
|
|
2914
3013
|
}
|
|
2915
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqDataSizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2916
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0", ngImport: i0, type: KbqDataSizePipe, name: "kbqDataSize" }); }
|
|
3014
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqDataSizePipe, deps: [{ token: KBQ_SIZE_UNITS_CONFIG, optional: true }, { token: KBQ_LOCALE_SERVICE, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3015
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0", ngImport: i0, type: KbqDataSizePipe, isStandalone: true, name: "kbqDataSize", pure: false }); }
|
|
2917
3016
|
}
|
|
2918
3017
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqDataSizePipe, decorators: [{
|
|
2919
3018
|
type: Pipe,
|
|
2920
3019
|
args: [{
|
|
2921
|
-
name: 'kbqDataSize'
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
class KbqDataSizeModule {
|
|
2925
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqDataSizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2926
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.0", ngImport: i0, type: KbqDataSizeModule, declarations: [KbqDataSizePipe], exports: [KbqDataSizePipe] }); }
|
|
2927
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqDataSizeModule }); }
|
|
2928
|
-
}
|
|
2929
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqDataSizeModule, decorators: [{
|
|
2930
|
-
type: NgModule,
|
|
2931
|
-
args: [{
|
|
2932
|
-
imports: [],
|
|
2933
|
-
exports: [KbqDataSizePipe],
|
|
2934
|
-
declarations: [KbqDataSizePipe]
|
|
3020
|
+
name: 'kbqDataSize',
|
|
3021
|
+
standalone: true,
|
|
3022
|
+
pure: false
|
|
2935
3023
|
}]
|
|
2936
|
-
}]
|
|
3024
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
3025
|
+
type: Optional
|
|
3026
|
+
}, {
|
|
3027
|
+
type: Inject,
|
|
3028
|
+
args: [KBQ_SIZE_UNITS_CONFIG]
|
|
3029
|
+
}] }, { type: KbqLocaleService, decorators: [{
|
|
3030
|
+
type: Optional
|
|
3031
|
+
}, {
|
|
3032
|
+
type: Inject,
|
|
3033
|
+
args: [KBQ_LOCALE_SERVICE]
|
|
3034
|
+
}] }] });
|
|
2937
3035
|
|
|
2938
3036
|
const validationTooltipShowDelay = 10;
|
|
2939
3037
|
const validationTooltipHideDelay = 3000;
|
|
2940
3038
|
const KBQ_VALIDATION = new InjectionToken('KbqUseValidation', { factory: () => ({ useValidation: true }) });
|
|
2941
3039
|
|
|
2942
|
-
const VERSION = new Version('17.0.0-rc.
|
|
3040
|
+
const VERSION = new Version('17.0.0-rc.3+sha-be6ab54');
|
|
2943
3041
|
|
|
2944
3042
|
/**
|
|
2945
3043
|
* Generated bundle index. Do not edit.
|
|
2946
3044
|
*/
|
|
2947
3045
|
|
|
2948
|
-
export { AbsoluteDateFormatterPipe, AbsoluteDateShortFormatterPipe, AbsoluteDateTimeFormatterPipe, AbsoluteShortDateTimeFormatterPipe, AnimationCurves, BOTTOM_LEFT_POSITION_PRIORITY, BOTTOM_POSITION_PRIORITY, BOTTOM_RIGHT_POSITION_PRIORITY, DateAdapter, DateFormatter, EXTENDED_OVERLAY_POSITIONS, ErrorStateMatcher, KBQ_CUSTOM_SCROLL_STRATEGY_PROVIDER, KBQ_DATE_FORMATS, KBQ_DATE_LOCALE, KBQ_DATE_LOCALE_FACTORY, KBQ_DEFAULT_LOCALE_DATA_FACTORY, KBQ_DEFAULT_LOCALE_ID, KBQ_FORM_FIELD_REF, KBQ_LABEL_GLOBAL_OPTIONS, KBQ_LOCALE_DATA, KBQ_LOCALE_ID, KBQ_LOCALE_SERVICE, KBQ_NUMBER_FORMATTER_DEFAULT_OPTIONS, KBQ_NUMBER_FORMATTER_OPTIONS, KBQ_OPTION_ACTION_PARENT, KBQ_OPTION_PARENT_COMPONENT, KBQ_PARENT_ANIMATION_COMPONENT, KBQ_SANITY_CHECKS, KBQ_SELECT_SCROLL_STRATEGY, KBQ_SELECT_SCROLL_STRATEGY_PROVIDER, KBQ_TITLE_TEXT_REF, KBQ_VALIDATION, KbqCommonModule, KbqComponentColors,
|
|
3046
|
+
export { AbsoluteDateFormatterPipe, AbsoluteDateShortFormatterPipe, AbsoluteDateTimeFormatterPipe, AbsoluteShortDateTimeFormatterPipe, AnimationCurves, BOTTOM_LEFT_POSITION_PRIORITY, BOTTOM_POSITION_PRIORITY, BOTTOM_RIGHT_POSITION_PRIORITY, DateAdapter, DateFormatter, EXTENDED_OVERLAY_POSITIONS, ErrorStateMatcher, KBQ_CUSTOM_SCROLL_STRATEGY_PROVIDER, KBQ_DATE_FORMATS, KBQ_DATE_LOCALE, KBQ_DATE_LOCALE_FACTORY, KBQ_DEFAULT_LOCALE_DATA_FACTORY, KBQ_DEFAULT_LOCALE_ID, KBQ_FORM_FIELD_REF, KBQ_LABEL_GLOBAL_OPTIONS, KBQ_LOCALE_DATA, KBQ_LOCALE_ID, KBQ_LOCALE_SERVICE, KBQ_NUMBER_FORMATTER_DEFAULT_OPTIONS, KBQ_NUMBER_FORMATTER_OPTIONS, KBQ_OPTION_ACTION_PARENT, KBQ_OPTION_PARENT_COMPONENT, KBQ_PARENT_ANIMATION_COMPONENT, KBQ_SANITY_CHECKS, KBQ_SELECT_SCROLL_STRATEGY, KBQ_SELECT_SCROLL_STRATEGY_PROVIDER, KBQ_SIZE_UNITS_CONFIG, KBQ_SIZE_UNITS_DEFAULT_CONFIG, KBQ_TITLE_TEXT_REF, KBQ_VALIDATION, KbqCommonModule, KbqComponentColors, KbqDataSizePipe, KbqDecimalPipe, KbqDefaultThemes, KbqForm, KbqFormElement, KbqFormattersModule, KbqFormsModule, KbqHighlightModule, KbqHighlightPipe, KbqLine, KbqLineModule, KbqLineSetter, KbqLocaleService, KbqLocaleServiceModule, KbqMeasureScrollbarService, KbqOptgroup, KbqOptgroupBase, KbqOptgroupMixinBase, KbqOption, KbqOptionActionBase, KbqOptionActionComponent, KbqOptionActionMixinBase, KbqOptionBase, KbqOptionModule, KbqOptionSelectionChange, KbqPopUp, KbqPopUpTrigger, KbqPseudoCheckbox, KbqPseudoCheckboxBase, KbqPseudoCheckboxMixinBase, KbqPseudoCheckboxModule, KbqRoundDecimalPipe, KbqTableNumberPipe, KbqVirtualOption, LEFT_BOTTOM_POSITION_PRIORITY, LEFT_POSITION_PRIORITY, LEFT_TOP_POSITION_PRIORITY, MeasurementSystem, MultipleMode, NUMBER_FORMAT_REGEXP, POSITION_MAP, POSITION_PRIORITY_STRATEGY, POSITION_TO_CSS_MAP, PopUpPlacements, PopUpSizes, PopUpTriggers, PopUpVisibility, RIGHT_BOTTOM_POSITION_PRIORITY, RIGHT_POSITION_PRIORITY, RIGHT_TOP_POSITION_PRIORITY, RangeDateFormatterPipe, RangeDateTimeFormatterPipe, RangeMiddleDateTimeFormatterPipe, RangeShortDateFormatterPipe, RangeShortDateTimeFormatterPipe, RelativeDateFormatterPipe, RelativeDateTimeFormatterPipe, RelativeShortDateFormatterPipe, RelativeShortDateTimeFormatterPipe, SELECT_PANEL_INDENT_PADDING_X, SELECT_PANEL_MAX_HEIGHT, SELECT_PANEL_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, ShowOnDirtyErrorStateMatcher, TOP_LEFT_POSITION_PRIORITY, TOP_POSITION_PRIORITY, TOP_RIGHT_POSITION_PRIORITY, ThemePalette, ThemeService, VERSION, countGroupLabelsBeforeOption, enUSFormattersData, enUSLocaleData, esLAFormattersData, esLALocaleData, escapeRegExp, faIRFormattersData, faIRLocaleData, fadeAnimation, formatDataSize, getHumanizedBytes, getKbqSelectDynamicMultipleError, getKbqSelectNonArrayValueError, getKbqSelectNonFunctionValueError, getOptionScrollPosition, isBoolean, isWithin, kbqSelectAnimations, kbqSelectScrollStrategyProviderFactory, mixinColor, mixinDisabled, mixinErrorState, mixinTabIndex, ptBRFormattersData, ptBRLocaleData, ruRUFormattersData, ruRULocaleData, selectEvents, toBoolean, validationTooltipHideDelay, validationTooltipShowDelay, zhCNFormattersData, zhCNLocaleData };
|
|
2949
3047
|
//# sourceMappingURL=koobiq-components-core.mjs.map
|