@koobiq/components 18.2.1 → 18.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/code-block/_code-block-theme.scss +1 -1
- package/code-block/actionbar.component.d.ts +14 -4
- package/code-block/code-block-tokens.scss +4 -4
- package/code-block/code-block.component.d.ts +12 -15
- package/code-block/code-block.types.d.ts +12 -0
- package/core/common-behaviors/color.d.ts +1 -1
- package/core/common-behaviors/error-state.d.ts +1 -1
- package/core/error/error-state-matcher.d.ts +26 -0
- package/core/form-field/form-field-ref.d.ts +7 -0
- package/core/forms/index.d.ts +1 -0
- package/core/forms/validators.d.ts +107 -0
- package/core/locales/en-US.d.ts +13 -0
- package/core/locales/es-LA.d.ts +13 -0
- package/core/locales/fa-IR.d.ts +13 -0
- package/core/locales/locale-service.d.ts +89 -0
- package/core/locales/pt-BR.d.ts +13 -0
- package/core/locales/ru-RU.d.ts +13 -0
- package/core/locales/zh-CN.d.ts +13 -0
- package/core/public-api.d.ts +1 -2
- package/core/select/common.d.ts +2 -0
- package/core/services/theme.service.d.ts +2 -2
- package/core/styles/theming/_components-theming.scss +1 -1
- package/core/validation/validation.d.ts +1 -0
- package/datepicker/_datepicker-theme.scss +1 -1
- package/datepicker/datepicker-tokens.scss +2 -2
- package/dropdown/_dropdown-theme.scss +1 -1
- package/dropdown/dropdown-tokens.scss +1 -1
- package/esm2022/code-block/actionbar.component.mjs +35 -8
- package/esm2022/code-block/code-block.component.mjs +28 -19
- package/esm2022/code-block/code-block.types.mjs +5 -2
- package/esm2022/core/common-behaviors/color.mjs +2 -2
- package/esm2022/core/common-behaviors/error-state.mjs +1 -1
- package/esm2022/core/error/error-state-matcher.mjs +43 -0
- package/esm2022/core/form-field/form-field-ref.mjs +4 -1
- package/esm2022/core/forms/index.mjs +2 -1
- package/esm2022/core/forms/validators.mjs +163 -0
- package/esm2022/core/locales/en-US.mjs +14 -1
- package/esm2022/core/locales/es-LA.mjs +14 -1
- package/esm2022/core/locales/fa-IR.mjs +14 -1
- package/esm2022/core/locales/locale-service.mjs +30 -1
- package/esm2022/core/locales/pt-BR.mjs +14 -1
- package/esm2022/core/locales/ru-RU.mjs +14 -1
- package/esm2022/core/locales/zh-CN.mjs +14 -1
- package/esm2022/core/public-api.mjs +2 -3
- package/esm2022/core/select/common.mjs +7 -1
- package/esm2022/core/services/theme.service.mjs +3 -3
- package/esm2022/core/validation/validation.mjs +2 -1
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-header.component.mjs +5 -6
- package/esm2022/datepicker/datepicker.component.mjs +3 -3
- package/esm2022/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/file-upload/file-upload.mjs +2 -3
- package/esm2022/file-upload/multiple-file-upload.component.mjs +57 -17
- package/esm2022/file-upload/single-file-upload.component.mjs +31 -19
- package/esm2022/form-field/form-field-control.mjs +1 -1
- package/esm2022/icon/icon.component.mjs +2 -2
- package/esm2022/icon/icon.module.mjs +1 -1
- package/esm2022/input/input-number.mjs +74 -80
- package/esm2022/markdown/markdown.values.mjs +4 -2
- package/esm2022/modal/modal.component.mjs +2 -2
- package/esm2022/navbar/navbar-item.component.mjs +2 -2
- package/esm2022/navbar/navbar.component.mjs +2 -2
- package/esm2022/navbar/vertical-navbar.component.mjs +2 -2
- package/esm2022/popover/popover-confirm.component.mjs +3 -3
- package/esm2022/popover/popover.component.mjs +3 -3
- package/esm2022/select/select.component.mjs +1 -1
- package/esm2022/select/select.module.mjs +3 -7
- package/esm2022/sidepanel/sidepanel-container.component.mjs +3 -3
- package/esm2022/timezone/timezone-select.component.mjs +20 -10
- package/esm2022/tooltip/tooltip.component.mjs +13 -1
- package/fesm2022/koobiq-components-code-block.mjs +58 -24
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +310 -16
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +10 -11
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +2 -2
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +76 -27
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +1 -1
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +74 -80
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +3 -1
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +2 -2
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +6 -6
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +4 -4
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +3 -6
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +2 -2
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +18 -8
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +12 -0
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +6 -10
- package/file-upload/file-upload.d.ts +3 -0
- package/file-upload/file-upload.scss +6 -0
- package/file-upload/multiple-file-upload.component.d.ts +28 -5
- package/file-upload/multiple-file-upload.component.scss +0 -4
- package/file-upload/single-file-upload.component.d.ts +13 -4
- package/file-upload/single-file-upload.component.scss +0 -12
- package/form-field/form-field-control.d.ts +3 -2
- package/form-field/hint.scss +0 -3
- package/input/input-number.d.ts +24 -14
- package/markdown/markdown.values.d.ts +3 -0
- package/modal/_modal-theme.scss +1 -1
- package/modal/modal-tokens.scss +2 -2
- package/navbar/_navbar-theme.scss +1 -1
- package/navbar/navbar-tokens.scss +2 -8
- package/package.json +5 -4
- package/popover/_popover-theme.scss +2 -2
- package/popover/popover-tokens.scss +2 -2
- package/popover/popover.scss +2 -2
- package/schematics/ng-add/index.js +2 -2
- package/select/select.component.d.ts +1 -1
- package/select/select.module.d.ts +1 -2
- package/sidepanel/_sidepanel-theme.scss +1 -1
- package/sidepanel/sidepanel-tokens.scss +2 -2
- package/timezone/timezone-select.component.d.ts +5 -6
- package/tooltip/tooltip.component.d.ts +9 -0
- package/core/error/error-options.d.ts +0 -14
- package/core/label/label-options.d.ts +0 -13
- package/esm2022/core/error/error-options.mjs +0 -26
- package/esm2022/core/label/label-options.mjs +0 -4
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { AfterViewInit, EventEmitter } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
2
|
+
import { KbqLocaleService } from '@koobiq/components/core';
|
|
2
3
|
import { KbqTooltipTrigger } from '@koobiq/components/tooltip';
|
|
3
4
|
import { KbqCodeBlockConfiguration, KbqCodeFile } from './code-block.types';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class KbqActionBarComponent implements AfterViewInit {
|
|
7
|
+
private changeDetectorRef;
|
|
8
|
+
protected configuration?: KbqCodeBlockConfiguration | undefined;
|
|
9
|
+
protected localeService?: KbqLocaleService | undefined;
|
|
6
10
|
copyTooltip: KbqTooltipTrigger;
|
|
7
|
-
config: KbqCodeBlockConfiguration;
|
|
8
11
|
codeFiles: KbqCodeFile[];
|
|
9
12
|
selectedTabIndex: number;
|
|
10
13
|
multiLine: boolean;
|
|
@@ -15,8 +18,15 @@ export declare class KbqActionBarComponent implements AfterViewInit {
|
|
|
15
18
|
copyCode: EventEmitter<void>;
|
|
16
19
|
openExternalSystem: EventEmitter<void>;
|
|
17
20
|
copyTooltipText: string;
|
|
21
|
+
/**
|
|
22
|
+
* @docs-private
|
|
23
|
+
*/
|
|
24
|
+
config: KbqCodeBlockConfiguration;
|
|
25
|
+
constructor(changeDetectorRef: ChangeDetectorRef, configuration?: KbqCodeBlockConfiguration | undefined, localeService?: KbqLocaleService | undefined);
|
|
18
26
|
ngAfterViewInit(): void;
|
|
19
27
|
onCopy(): void;
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
private updateLocaleParams;
|
|
29
|
+
private initDefaultParams;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KbqActionBarComponent, [null, { optional: true; }, { optional: true; }]>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqActionBarComponent, "kbq-actionbar-block", never, { "codeFiles": { "alias": "codeFiles"; "required": false; }; "selectedTabIndex": { "alias": "selectedTabIndex"; "required": false; }; "multiLine": { "alias": "multiLine"; "required": false; }; "softWrap": { "alias": "softWrap"; "required": false; }; "canLoad": { "alias": "canLoad"; "required": false; }; }, { "toggleSoftWrap": "toggleSoftWrap"; "downloadCode": "downloadCode"; "copyCode": "copyCode"; "openExternalSystem": "openExternalSystem"; }, never, never, false, never>;
|
|
22
32
|
}
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
--kbq-code-block-filled-container-background: var(--kbq-background-bg-secondary);
|
|
138
138
|
--kbq-code-block-filled-container-border-color: transparent;
|
|
139
139
|
--kbq-code-block-filled-header-background: var(--kbq-background-bg-secondary);
|
|
140
|
-
--kbq-code-block-filled-header-shadow: var(--kbq-shadow-overflow-
|
|
140
|
+
--kbq-code-block-filled-header-scroll-shadow: var(--kbq-shadow-overflow-normal-bottom);
|
|
141
141
|
--kbq-code-block-filled-actionbar-fade-gradient: linear-gradient(
|
|
142
142
|
90deg,
|
|
143
143
|
transparent,
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
--kbq-code-block-outline-container-background: var(--kbq-background-card);
|
|
155
155
|
--kbq-code-block-outline-container-border-color: var(--kbq-line-contrast-less);
|
|
156
156
|
--kbq-code-block-outline-header-background: var(--kbq-background-card);
|
|
157
|
-
--kbq-code-block-outline-header-shadow: var(--kbq-shadow-overflow-
|
|
157
|
+
--kbq-code-block-outline-header-scroll-shadow: var(--kbq-shadow-overflow-normal-bottom);
|
|
158
158
|
--kbq-code-block-outline-actionbar-fade-gradient: linear-gradient(90deg, transparent, var(--kbq-background-card));
|
|
159
159
|
--kbq-code-block-outline-actionbar-background: var(--kbq-background-card);
|
|
160
160
|
--kbq-code-block-outline-collapse-expanded-background: transparent;
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
--kbq-code-block-filled-container-background: var(--kbq-background-bg-secondary);
|
|
274
274
|
--kbq-code-block-filled-container-border-color: var(--kbq-line-contrast-less);
|
|
275
275
|
--kbq-code-block-filled-header-background: var(--kbq-background-bg-secondary);
|
|
276
|
-
--kbq-code-block-filled-header-shadow: var(--kbq-shadow-overflow-
|
|
276
|
+
--kbq-code-block-filled-header-scroll-shadow: var(--kbq-shadow-overflow-normal-bottom);
|
|
277
277
|
--kbq-code-block-filled-actionbar-fade-gradient: linear-gradient(
|
|
278
278
|
90deg,
|
|
279
279
|
transparent,
|
|
@@ -290,7 +290,7 @@
|
|
|
290
290
|
--kbq-code-block-outline-container-background: var(--kbq-background-card);
|
|
291
291
|
--kbq-code-block-outline-container-border-color: transparent;
|
|
292
292
|
--kbq-code-block-outline-header-background: var(--kbq-background-card);
|
|
293
|
-
--kbq-code-block-outline-header-shadow: var(--kbq-shadow-overflow-
|
|
293
|
+
--kbq-code-block-outline-header-scroll-shadow: var(--kbq-shadow-overflow-normal-bottom);
|
|
294
294
|
--kbq-code-block-outline-actionbar-fade-gradient: linear-gradient(90deg, transparent, var(--kbq-background-card));
|
|
295
295
|
--kbq-code-block-outline-actionbar-background: var(--kbq-background-card);
|
|
296
296
|
--kbq-code-block-outline-collapse-expanded-background: transparent;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
2
2
|
import { Clipboard } from '@angular/cdk/clipboard';
|
|
3
|
-
import { AfterViewInit, ChangeDetectorRef, ElementRef,
|
|
3
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, OnDestroy, Renderer2 } from '@angular/core';
|
|
4
|
+
import { KbqLocaleService } from '@koobiq/components/core';
|
|
4
5
|
import { KbqTabChangeEvent, KbqTabGroup } from '@koobiq/components/tabs';
|
|
5
6
|
import { Subject } from 'rxjs';
|
|
6
7
|
import { KbqCodeBlockConfiguration, KbqCodeFile } from './code-block.types';
|
|
@@ -25,24 +26,14 @@ export declare const LANGUAGES_EXTENSIONS: {
|
|
|
25
26
|
xml: string;
|
|
26
27
|
json: string;
|
|
27
28
|
};
|
|
28
|
-
export declare const KBQ_CODE_BLOCK_CONFIGURATION: InjectionToken<any>;
|
|
29
|
-
export declare const KBQ_CODE_BLOCK_DEFAULT_CONFIGURATION: {
|
|
30
|
-
softWrapOnTooltip: string;
|
|
31
|
-
softWrapOffTooltip: string;
|
|
32
|
-
downloadTooltip: string;
|
|
33
|
-
copiedTooltip: string;
|
|
34
|
-
copyTooltip: string;
|
|
35
|
-
viewAllText: string;
|
|
36
|
-
viewLessText: string;
|
|
37
|
-
openExternalSystemTooltip: string;
|
|
38
|
-
};
|
|
39
29
|
export declare class KbqCodeBlockComponent implements AfterViewInit, OnDestroy {
|
|
40
30
|
private elementRef;
|
|
41
31
|
private changeDetectorRef;
|
|
42
32
|
private clipboard;
|
|
43
33
|
private renderer;
|
|
44
34
|
private focusMonitor;
|
|
45
|
-
|
|
35
|
+
protected configuration?: KbqCodeBlockConfiguration | undefined;
|
|
36
|
+
protected localeService?: KbqLocaleService | undefined;
|
|
46
37
|
tabGroup: KbqTabGroup;
|
|
47
38
|
lineNumbers: boolean;
|
|
48
39
|
filled: boolean;
|
|
@@ -64,13 +55,17 @@ export declare class KbqCodeBlockComponent implements AfterViewInit, OnDestroy {
|
|
|
64
55
|
* @docs-private
|
|
65
56
|
*/
|
|
66
57
|
actionbarHidden?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* @docs-private
|
|
60
|
+
*/
|
|
61
|
+
config: KbqCodeBlockConfiguration;
|
|
67
62
|
readonly resizeStream: Subject<Event>;
|
|
68
63
|
readonly currentCodeBlock: Subject<HTMLElement>;
|
|
69
64
|
private readonly resizeDebounceInterval;
|
|
70
65
|
private resizeSubscription;
|
|
71
66
|
private codeBlockSubscription;
|
|
72
67
|
private hoverSubscription;
|
|
73
|
-
constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, clipboard: Clipboard, renderer: Renderer2, focusMonitor: FocusMonitor,
|
|
68
|
+
constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, clipboard: Clipboard, renderer: Renderer2, focusMonitor: FocusMonitor, configuration?: KbqCodeBlockConfiguration | undefined, localeService?: KbqLocaleService | undefined);
|
|
74
69
|
ngAfterViewInit(): void;
|
|
75
70
|
ngOnDestroy(): void;
|
|
76
71
|
updateHeader: () => void;
|
|
@@ -90,9 +85,11 @@ export declare class KbqCodeBlockComponent implements AfterViewInit, OnDestroy {
|
|
|
90
85
|
showActionBarIfNecessary(): void;
|
|
91
86
|
/** @docs-private */
|
|
92
87
|
hideActionBarIfNoHeader(event?: FocusEvent | null): void;
|
|
88
|
+
private updateLocaleParams;
|
|
89
|
+
private initDefaultParams;
|
|
93
90
|
private updateMultiline;
|
|
94
91
|
private getFullFileName;
|
|
95
92
|
private subscribeToHover;
|
|
96
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<KbqCodeBlockComponent, [null, null, null, null, null, { optional: true; }]>;
|
|
93
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KbqCodeBlockComponent, [null, null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
97
94
|
static ɵcmp: i0.ɵɵComponentDeclaration<KbqCodeBlockComponent, "kbq-code-block", ["kbqCodeBlock"], { "lineNumbers": { "alias": "lineNumbers"; "required": false; }; "filled": { "alias": "filled"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "softWrap": { "alias": "softWrap"; "required": false; }; "canLoad": { "alias": "canLoad"; "required": false; }; "codeFiles": { "alias": "codeFiles"; "required": false; }; }, {}, never, never, false, never>;
|
|
98
95
|
}
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
export declare const KBQ_CODE_BLOCK_CONFIGURATION: InjectionToken<any>;
|
|
3
|
+
export declare const KBQ_CODE_BLOCK_DEFAULT_CONFIGURATION: {
|
|
4
|
+
softWrapOnTooltip: string;
|
|
5
|
+
softWrapOffTooltip: string;
|
|
6
|
+
downloadTooltip: string;
|
|
7
|
+
copiedTooltip: string;
|
|
8
|
+
copyTooltip: string;
|
|
9
|
+
viewAllText: string;
|
|
10
|
+
viewLessText: string;
|
|
11
|
+
openExternalSystemTooltip: string;
|
|
12
|
+
};
|
|
1
13
|
export interface KbqCodeBlockConfiguration {
|
|
2
14
|
softWrapOnTooltip: string;
|
|
3
15
|
softWrapOffTooltip: string;
|
|
@@ -27,7 +27,7 @@ export declare enum KbqComponentColors {
|
|
|
27
27
|
Warning = "warning",
|
|
28
28
|
Success = "success",
|
|
29
29
|
Default = "contrast",
|
|
30
|
-
Empty = ""
|
|
30
|
+
Empty = "empty"
|
|
31
31
|
}
|
|
32
32
|
/** Mixin to augment a directive with a `color` property. */
|
|
33
33
|
export declare function mixinColor<T extends AbstractConstructor<HasElementRef>>(base: T, defaultColor?: KbqComponentColors | ThemePalette): CanColorCtor & T;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FormGroupDirective, NgControl, NgForm } from '@angular/forms';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
|
-
import { ErrorStateMatcher } from '../error/error-
|
|
3
|
+
import { ErrorStateMatcher } from '../error/error-state-matcher';
|
|
4
4
|
import { AbstractConstructor, Constructor } from './constructor';
|
|
5
5
|
/** @docs-private */
|
|
6
6
|
export interface CanUpdateErrorState {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AbstractControl, FormGroupDirective, NgForm } from '@angular/forms';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Error state matcher that matches when a control is invalid and form is submitted.
|
|
5
|
+
* Requires use FormGroupDirective or NgForm.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ShowOnFormSubmitErrorStateMatcher implements ErrorStateMatcher {
|
|
8
|
+
isErrorState(control: AbstractControl | null, form: FormGroupDirective | NgForm | null): boolean;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShowOnFormSubmitErrorStateMatcher, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ShowOnFormSubmitErrorStateMatcher>;
|
|
11
|
+
}
|
|
12
|
+
/** Error state matcher that matches when a control is invalid and dirty or form is submitted. */
|
|
13
|
+
export declare class ShowOnControlDirtyErrorStateMatcher implements ErrorStateMatcher {
|
|
14
|
+
isErrorState(control: AbstractControl | null, form: FormGroupDirective | NgForm | null): boolean;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShowOnControlDirtyErrorStateMatcher, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ShowOnControlDirtyErrorStateMatcher>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Provider that defines how form controls behave with regards to displaying error messages.
|
|
20
|
+
* Error state matcher that matches when a control is invalid and touched or form is submitted.
|
|
21
|
+
*/
|
|
22
|
+
export declare class ErrorStateMatcher {
|
|
23
|
+
isErrorState(control: AbstractControl | null, form: FormGroupDirective | NgForm | null): boolean;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorStateMatcher, never>;
|
|
25
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ErrorStateMatcher>;
|
|
26
|
+
}
|
|
@@ -2,9 +2,16 @@ import { InjectionToken } from '@angular/core';
|
|
|
2
2
|
export interface KbqFormFieldRef {
|
|
3
3
|
control: any;
|
|
4
4
|
canCleanerClearByEsc: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* @TODO should be removed, is private method (#DS-2915)
|
|
7
|
+
* @deprecated use `formField.control?.errorState` instead
|
|
8
|
+
*/
|
|
5
9
|
shouldForward(str: string): boolean;
|
|
6
10
|
focusViaKeyboard(): void;
|
|
7
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* @TODO move into form-field.ts, add correct type for `InjectionToken<KbqFormField>` (#DS-2915)
|
|
14
|
+
*/
|
|
8
15
|
/**
|
|
9
16
|
* Injection token that can be used to inject an instances of `KbqFormField`. It serves
|
|
10
17
|
* as alternative token to the actual `KbqFormField` class which would cause unnecessary
|
package/core/forms/index.d.ts
CHANGED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { ValidatorFn } from '@angular/forms';
|
|
2
|
+
/** Provides a set of validators for password form controls. */
|
|
3
|
+
export declare class PasswordValidators {
|
|
4
|
+
/**
|
|
5
|
+
* Validator that requires the control's value length to be at least `min` characters.
|
|
6
|
+
*
|
|
7
|
+
* `min` - number of characters.
|
|
8
|
+
*
|
|
9
|
+
* ## Usage:
|
|
10
|
+
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const control = new FormControl('password', PasswordValidators.minLength(10));
|
|
13
|
+
* console.log(control.errors); // {minLength: {min: 10, actual: 8}}
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
static minLength(min: number): ValidatorFn;
|
|
17
|
+
/**
|
|
18
|
+
* Validator that requires the control's value length to be at most `max` characters.
|
|
19
|
+
*
|
|
20
|
+
* `max` - number of characters.
|
|
21
|
+
*
|
|
22
|
+
* ## Usage:
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const control = new FormControl('password', PasswordValidators.maxLength(6));
|
|
25
|
+
* console.log(control.errors); // {maxLength: {max: 6, actual: 8}}
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
static maxLength(max: number): ValidatorFn;
|
|
29
|
+
/**
|
|
30
|
+
* Validator that requires the control's value to be at least `min` uppercase characters.
|
|
31
|
+
*
|
|
32
|
+
* `min` - number of uppercase characters.
|
|
33
|
+
*
|
|
34
|
+
* ### Usage:
|
|
35
|
+
*
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const control = new FormControl('Password', PasswordValidators.minUppercase(2));
|
|
38
|
+
* console.log(control.errors); // {minUppercase: {min: 2, actual: 1}}
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
static minUppercase(min: number): ValidatorFn;
|
|
42
|
+
/**
|
|
43
|
+
* Validator that requires the control's value to be at least `min` lowercase characters.
|
|
44
|
+
*
|
|
45
|
+
* `min` - number of lowercase characters.
|
|
46
|
+
*
|
|
47
|
+
* ### Usage:
|
|
48
|
+
*
|
|
49
|
+
* ```typescript
|
|
50
|
+
* const control = new FormControl('PASSWORD', PasswordValidators.minLowercase());
|
|
51
|
+
* console.log(control.errors); // {minLowercase: {min: 1, actual: 0}}
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
static minLowercase(min: number): ValidatorFn;
|
|
55
|
+
/**
|
|
56
|
+
* Validator that requires the control's value to be at least `min` number characters.
|
|
57
|
+
*
|
|
58
|
+
* `min` - number of number characters.
|
|
59
|
+
*
|
|
60
|
+
* ### Usage:
|
|
61
|
+
*
|
|
62
|
+
* ```typescript
|
|
63
|
+
* const control = new FormControl('passw0rd', PasswordValidators.minNumber(2));
|
|
64
|
+
* console.log(control.errors); // {minNumber: {min: 2, actual: 1}}
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
static minNumber(min: number): ValidatorFn;
|
|
68
|
+
/**
|
|
69
|
+
* Validator that requires the control's value to be at least `min` special characters.
|
|
70
|
+
*
|
|
71
|
+
* `min` - number of special characters.
|
|
72
|
+
*
|
|
73
|
+
* ### Special characters:
|
|
74
|
+
* ```js
|
|
75
|
+
* ['!','@','#','$','%','^','&','*']
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* ### Usage:
|
|
79
|
+
*
|
|
80
|
+
* ```typescript
|
|
81
|
+
* const control = new FormControl('pa$sword', PasswordValidators.minSpecial(2));
|
|
82
|
+
* console.log(control.errors); // {minSpecial: {min: 2, actual: 1}}
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
static minSpecial(min: number): ValidatorFn;
|
|
86
|
+
}
|
|
87
|
+
/** Provides a set of validators for file-related form controls. */
|
|
88
|
+
export declare class FileValidators {
|
|
89
|
+
/**
|
|
90
|
+
* Validator that checks if the file size is less than or equal to the provided `maxSize`.
|
|
91
|
+
*
|
|
92
|
+
* @param maxSize - The maximum allowed file size in bytes.
|
|
93
|
+
*
|
|
94
|
+
* @returns A ValidatorFn function that checks the file size.
|
|
95
|
+
*
|
|
96
|
+
* ## Usage:
|
|
97
|
+
*
|
|
98
|
+
* ```typescript
|
|
99
|
+
* const control = new FormControl(null, [FileValidators.maxFileSize(1024 * 1024)]); // 1MB
|
|
100
|
+
* control.setValue(FILE_LESS_OR_EQUAL_THAN_1MB);
|
|
101
|
+
* console.log(control.errors); // null
|
|
102
|
+
* control.setValue(FILE_MORE_THAN_1MB);
|
|
103
|
+
* console.log(control.errors); // {maxFileSize: { max: 1048576, actual: FILE_MORE_THAN_1MB.size }}
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
static maxFileSize(maxSize: number): ValidatorFn;
|
|
107
|
+
}
|
package/core/locales/en-US.d.ts
CHANGED
|
@@ -29,4 +29,17 @@ export declare const enUSLocaleData: {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
+
codeBlock: {
|
|
33
|
+
softWrapOnTooltip: string;
|
|
34
|
+
softWrapOffTooltip: string;
|
|
35
|
+
downloadTooltip: string;
|
|
36
|
+
copiedTooltip: string;
|
|
37
|
+
copyTooltip: string;
|
|
38
|
+
viewAllText: string;
|
|
39
|
+
viewLessText: string;
|
|
40
|
+
openExternalSystemTooltip: string;
|
|
41
|
+
};
|
|
42
|
+
timezone: {
|
|
43
|
+
searchPlaceholder: string;
|
|
44
|
+
};
|
|
32
45
|
};
|
package/core/locales/es-LA.d.ts
CHANGED
|
@@ -28,4 +28,17 @@ export declare const esLALocaleData: {
|
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
+
codeBlock: {
|
|
32
|
+
softWrapOnTooltip: string;
|
|
33
|
+
softWrapOffTooltip: string;
|
|
34
|
+
downloadTooltip: string;
|
|
35
|
+
copiedTooltip: string;
|
|
36
|
+
copyTooltip: string;
|
|
37
|
+
viewAllText: string;
|
|
38
|
+
viewLessText: string;
|
|
39
|
+
openExternalSystemTooltip: string;
|
|
40
|
+
};
|
|
41
|
+
timezone: {
|
|
42
|
+
searchPlaceholder: string;
|
|
43
|
+
};
|
|
31
44
|
};
|
package/core/locales/fa-IR.d.ts
CHANGED
|
@@ -28,4 +28,17 @@ export declare const faIRLocaleData: {
|
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
+
codeBlock: {
|
|
32
|
+
softWrapOnTooltip: string;
|
|
33
|
+
softWrapOffTooltip: string;
|
|
34
|
+
downloadTooltip: string;
|
|
35
|
+
copiedTooltip: string;
|
|
36
|
+
copyTooltip: string;
|
|
37
|
+
viewAllText: string;
|
|
38
|
+
viewLessText: string;
|
|
39
|
+
openExternalSystemTooltip: string;
|
|
40
|
+
};
|
|
41
|
+
timezone: {
|
|
42
|
+
searchPlaceholder: string;
|
|
43
|
+
};
|
|
31
44
|
};
|
|
@@ -73,6 +73,19 @@ export declare function KBQ_DEFAULT_LOCALE_DATA_FACTORY(): {
|
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
|
+
codeBlock: {
|
|
77
|
+
softWrapOnTooltip: string;
|
|
78
|
+
softWrapOffTooltip: string;
|
|
79
|
+
downloadTooltip: string;
|
|
80
|
+
copiedTooltip: string;
|
|
81
|
+
copyTooltip: string;
|
|
82
|
+
viewAllText: string;
|
|
83
|
+
viewLessText: string;
|
|
84
|
+
openExternalSystemTooltip: string;
|
|
85
|
+
};
|
|
86
|
+
timezone: {
|
|
87
|
+
searchPlaceholder: string;
|
|
88
|
+
};
|
|
76
89
|
};
|
|
77
90
|
'zh-CN': {
|
|
78
91
|
formatters: {
|
|
@@ -137,6 +150,19 @@ export declare function KBQ_DEFAULT_LOCALE_DATA_FACTORY(): {
|
|
|
137
150
|
};
|
|
138
151
|
};
|
|
139
152
|
};
|
|
153
|
+
codeBlock: {
|
|
154
|
+
softWrapOnTooltip: string;
|
|
155
|
+
softWrapOffTooltip: string;
|
|
156
|
+
downloadTooltip: string;
|
|
157
|
+
copiedTooltip: string;
|
|
158
|
+
copyTooltip: string;
|
|
159
|
+
viewAllText: string;
|
|
160
|
+
viewLessText: string;
|
|
161
|
+
openExternalSystemTooltip: string;
|
|
162
|
+
};
|
|
163
|
+
timezone: {
|
|
164
|
+
searchPlaceholder: string;
|
|
165
|
+
};
|
|
140
166
|
};
|
|
141
167
|
'es-LA': {
|
|
142
168
|
formatters: {
|
|
@@ -202,6 +228,19 @@ export declare function KBQ_DEFAULT_LOCALE_DATA_FACTORY(): {
|
|
|
202
228
|
};
|
|
203
229
|
};
|
|
204
230
|
};
|
|
231
|
+
codeBlock: {
|
|
232
|
+
softWrapOnTooltip: string;
|
|
233
|
+
softWrapOffTooltip: string;
|
|
234
|
+
downloadTooltip: string;
|
|
235
|
+
copiedTooltip: string;
|
|
236
|
+
copyTooltip: string;
|
|
237
|
+
viewAllText: string;
|
|
238
|
+
viewLessText: string;
|
|
239
|
+
openExternalSystemTooltip: string;
|
|
240
|
+
};
|
|
241
|
+
timezone: {
|
|
242
|
+
searchPlaceholder: string;
|
|
243
|
+
};
|
|
205
244
|
};
|
|
206
245
|
'pt-BR': {
|
|
207
246
|
formatters: {
|
|
@@ -267,6 +306,19 @@ export declare function KBQ_DEFAULT_LOCALE_DATA_FACTORY(): {
|
|
|
267
306
|
};
|
|
268
307
|
};
|
|
269
308
|
};
|
|
309
|
+
codeBlock: {
|
|
310
|
+
softWrapOnTooltip: string;
|
|
311
|
+
softWrapOffTooltip: string;
|
|
312
|
+
downloadTooltip: string;
|
|
313
|
+
copiedTooltip: string;
|
|
314
|
+
copyTooltip: string;
|
|
315
|
+
viewAllText: string;
|
|
316
|
+
viewLessText: string;
|
|
317
|
+
openExternalSystemTooltip: string;
|
|
318
|
+
};
|
|
319
|
+
timezone: {
|
|
320
|
+
searchPlaceholder: string;
|
|
321
|
+
};
|
|
270
322
|
};
|
|
271
323
|
'ru-RU': {
|
|
272
324
|
formatters: {
|
|
@@ -334,6 +386,19 @@ export declare function KBQ_DEFAULT_LOCALE_DATA_FACTORY(): {
|
|
|
334
386
|
};
|
|
335
387
|
};
|
|
336
388
|
};
|
|
389
|
+
codeBlock: {
|
|
390
|
+
softWrapOnTooltip: string;
|
|
391
|
+
softWrapOffTooltip: string;
|
|
392
|
+
downloadTooltip: string;
|
|
393
|
+
copiedTooltip: string;
|
|
394
|
+
copyTooltip: string;
|
|
395
|
+
viewAllText: string;
|
|
396
|
+
viewLessText: string;
|
|
397
|
+
openExternalSystemTooltip: string;
|
|
398
|
+
};
|
|
399
|
+
timezone: {
|
|
400
|
+
searchPlaceholder: string;
|
|
401
|
+
};
|
|
337
402
|
};
|
|
338
403
|
'fa-IR': {
|
|
339
404
|
formatters: {
|
|
@@ -400,6 +465,19 @@ export declare function KBQ_DEFAULT_LOCALE_DATA_FACTORY(): {
|
|
|
400
465
|
};
|
|
401
466
|
};
|
|
402
467
|
};
|
|
468
|
+
codeBlock: {
|
|
469
|
+
softWrapOnTooltip: string;
|
|
470
|
+
softWrapOffTooltip: string;
|
|
471
|
+
downloadTooltip: string;
|
|
472
|
+
copiedTooltip: string;
|
|
473
|
+
copyTooltip: string;
|
|
474
|
+
viewAllText: string;
|
|
475
|
+
viewLessText: string;
|
|
476
|
+
openExternalSystemTooltip: string;
|
|
477
|
+
};
|
|
478
|
+
timezone: {
|
|
479
|
+
searchPlaceholder: string;
|
|
480
|
+
};
|
|
403
481
|
};
|
|
404
482
|
};
|
|
405
483
|
export declare const KBQ_LOCALE_DATA: InjectionToken<any>;
|
|
@@ -417,3 +495,14 @@ export declare class KbqLocaleService {
|
|
|
417
495
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqLocaleService, [{ optional: true; }, { optional: true; }]>;
|
|
418
496
|
static ɵprov: i0.ɵɵInjectableDeclaration<KbqLocaleService>;
|
|
419
497
|
}
|
|
498
|
+
/**
|
|
499
|
+
* Function that returns a string representation of a number without localized separators
|
|
500
|
+
*/
|
|
501
|
+
export declare function normalizeNumber(value: string | null | undefined, customConfig: {
|
|
502
|
+
groupSeparator: string[];
|
|
503
|
+
fractionSeparator: string;
|
|
504
|
+
}): string;
|
|
505
|
+
/**
|
|
506
|
+
* Function that parse string and return a number. The string can be in any locale.
|
|
507
|
+
*/
|
|
508
|
+
export declare function checkAndNormalizeLocalizedNumber(num: string | null | undefined): number | null;
|
package/core/locales/pt-BR.d.ts
CHANGED
|
@@ -28,4 +28,17 @@ export declare const ptBRLocaleData: {
|
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
+
codeBlock: {
|
|
32
|
+
softWrapOnTooltip: string;
|
|
33
|
+
softWrapOffTooltip: string;
|
|
34
|
+
downloadTooltip: string;
|
|
35
|
+
copiedTooltip: string;
|
|
36
|
+
copyTooltip: string;
|
|
37
|
+
viewAllText: string;
|
|
38
|
+
viewLessText: string;
|
|
39
|
+
openExternalSystemTooltip: string;
|
|
40
|
+
};
|
|
41
|
+
timezone: {
|
|
42
|
+
searchPlaceholder: string;
|
|
43
|
+
};
|
|
31
44
|
};
|
package/core/locales/ru-RU.d.ts
CHANGED
|
@@ -29,4 +29,17 @@ export declare const ruRULocaleData: {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
+
codeBlock: {
|
|
33
|
+
softWrapOnTooltip: string;
|
|
34
|
+
softWrapOffTooltip: string;
|
|
35
|
+
downloadTooltip: string;
|
|
36
|
+
copiedTooltip: string;
|
|
37
|
+
copyTooltip: string;
|
|
38
|
+
viewAllText: string;
|
|
39
|
+
viewLessText: string;
|
|
40
|
+
openExternalSystemTooltip: string;
|
|
41
|
+
};
|
|
42
|
+
timezone: {
|
|
43
|
+
searchPlaceholder: string;
|
|
44
|
+
};
|
|
32
45
|
};
|
package/core/locales/zh-CN.d.ts
CHANGED
|
@@ -28,4 +28,17 @@ export declare const zhCNLocaleData: {
|
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
+
codeBlock: {
|
|
32
|
+
softWrapOnTooltip: string;
|
|
33
|
+
softWrapOffTooltip: string;
|
|
34
|
+
downloadTooltip: string;
|
|
35
|
+
copiedTooltip: string;
|
|
36
|
+
copyTooltip: string;
|
|
37
|
+
viewAllText: string;
|
|
38
|
+
viewLessText: string;
|
|
39
|
+
openExternalSystemTooltip: string;
|
|
40
|
+
};
|
|
41
|
+
timezone: {
|
|
42
|
+
searchPlaceholder: string;
|
|
43
|
+
};
|
|
31
44
|
};
|
package/core/public-api.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
export * from './animation/index';
|
|
2
2
|
export * from './common-behaviors/index';
|
|
3
3
|
export * from './datetime/index';
|
|
4
|
-
export * from './error/error-
|
|
4
|
+
export * from './error/error-state-matcher';
|
|
5
5
|
export * from './form-field/index';
|
|
6
6
|
export * from './formatters/index';
|
|
7
7
|
export * from './forms/index';
|
|
8
8
|
export * from './highlight/index';
|
|
9
|
-
export * from './label/label-options';
|
|
10
9
|
export * from './line/line';
|
|
11
10
|
export * from './locales/index';
|
|
12
11
|
export * from './option/index';
|
package/core/select/common.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export declare class KbqSelectSearch implements AfterContentInit, OnDestroy {
|
|
|
20
20
|
isSearchChanged: boolean;
|
|
21
21
|
get ngControl(): any;
|
|
22
22
|
constructor(formField: KbqFormFieldRef);
|
|
23
|
+
setPlaceholder(value: string): void;
|
|
24
|
+
hasPlaceholder(): boolean;
|
|
23
25
|
focus(): void;
|
|
24
26
|
reset(): void;
|
|
25
27
|
value(): any;
|
|
@@ -16,11 +16,11 @@ export declare enum KbqThemeSelector {
|
|
|
16
16
|
* This is the standard theme that is applied
|
|
17
17
|
* when the application is first loaded if nothing else provided
|
|
18
18
|
*/
|
|
19
|
-
Default = "kbq-
|
|
19
|
+
Default = "kbq-light",
|
|
20
20
|
/**
|
|
21
21
|
* This theme is used to provide a darker visual experience, often preferred in low-light environments.
|
|
22
22
|
*/
|
|
23
|
-
Dark = "kbq-
|
|
23
|
+
Dark = "kbq-dark"
|
|
24
24
|
}
|
|
25
25
|
export declare const KbqDefaultThemes: KbqTheme[];
|
|
26
26
|
export declare class ThemeService<T extends KbqTheme | null = KbqTheme> implements OnDestroy {
|
|
@@ -969,7 +969,7 @@
|
|
|
969
969
|
|
|
970
970
|
$modal: (
|
|
971
971
|
container-background: map.get($tokens, 'modal-#{$scheme}-container-background'),
|
|
972
|
-
container-box-shadow: map.get($tokens, 'modal-#{$scheme}-container-
|
|
972
|
+
container-box-shadow: map.get($tokens, 'modal-#{$scheme}-container-shadow'),
|
|
973
973
|
close-button: map.get($tokens, 'modal-#{$scheme}-close-button-color'),
|
|
974
974
|
header: map.get($tokens, 'modal-#{$scheme}-header-text-color'),
|
|
975
975
|
content: map.get($tokens, 'modal-#{$scheme}-content-text-color'),
|
|
@@ -4,4 +4,5 @@ export declare const validationTooltipHideDelay = 3000;
|
|
|
4
4
|
export interface KbqValidationOptions {
|
|
5
5
|
useValidation: boolean;
|
|
6
6
|
}
|
|
7
|
+
/** @deprecated Will be removed in next major release (#DS-2838) */
|
|
7
8
|
export declare const KBQ_VALIDATION: InjectionToken<KbqValidationOptions>;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
@mixin kbq-datepicker-theme() {
|
|
9
9
|
.kbq-datepicker__content {
|
|
10
10
|
background: var(--kbq-datepicker-container-background);
|
|
11
|
-
box-shadow: var(--kbq-datepicker-container-
|
|
11
|
+
box-shadow: var(--kbq-datepicker-container-shadow);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.kbq-calendar__table-header {
|