@koobiq/components 19.0.0 → 19.2.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/app-switcher/app-switcher.d.ts +11 -4
- package/checkbox/checkbox.scss +5 -21
- package/core/locales/en-US.d.ts +8 -4
- package/core/locales/es-LA.d.ts +8 -4
- package/core/locales/locale-service.d.ts +40 -20
- package/core/locales/pt-BR.d.ts +8 -4
- package/core/locales/ru-RU.d.ts +8 -4
- package/core/locales/tk-TM.d.ts +8 -4
- package/core/locales/types.d.ts +17 -0
- package/core/option/option.d.ts +1 -0
- package/core/styles/common/_animation.scss +2 -1
- package/core/styles/common/_visually-hidden.scss +1 -0
- package/core/styles/theming/_scrollbar-theme.scss +1 -0
- package/datepicker/datepicker-input.directive.d.ts +1 -1
- package/dropdown/dropdown.scss +3 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +60 -30
- package/fesm2022/koobiq-components-app-switcher.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-checkbox.mjs +2 -2
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +61 -39
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +0 -1
- 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 +114 -80
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +161 -64
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +1 -1
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +2 -2
- package/fesm2022/koobiq-components-loader-overlay.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-ic.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 +8 -4
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +3 -2
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-risk-level.mjs +6 -0
- package/fesm2022/koobiq-components-risk-level.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +4 -2
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.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-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +3 -4
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +17 -4
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +2 -2
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +2 -2
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +8 -8
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +2 -2
- package/fesm2022/koobiq-components-username.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +0 -256
- package/file-upload/file-upload-tokens.scss +25 -18
- package/file-upload/file-upload.d.ts +22 -3
- package/file-upload/file-upload.scss +8 -4
- package/file-upload/multiple-file-upload.component.d.ts +17 -33
- package/file-upload/multiple-file-upload.component.scss +209 -91
- package/file-upload/primitives/file-drop.d.ts +1 -2
- package/file-upload/single-file-upload.component.d.ts +16 -13
- package/file-upload/single-file-upload.component.scss +117 -36
- package/filter-bar/filter-bar-button.d.ts +5 -0
- package/filter-bar/filters.d.ts +38 -6
- package/filter-bar/pipes/pipe-multi-select.d.ts +4 -1
- package/filter-bar/pipes/pipe-multi-tree-select.d.ts +5 -0
- package/loader-overlay/loader-overlay.scss +22 -31
- package/modal/modal.scss +1 -1
- package/navbar/_navbar-item_vertical.scss +8 -0
- package/navbar/navbar-brand.scss +2 -2
- package/package.json +6 -6
- package/popover/_popover-theme.scss +2 -2
- package/popover/popover.component.d.ts +3 -1
- package/progress-spinner/_progress-spinner-theme.scss +14 -4
- package/progress-spinner/progress-spinner-tokens.scss +2 -0
- package/progress-spinner/progress-spinner.scss +1 -1
- package/risk-level/risk-level.component.d.ts +3 -0
- package/risk-level/risk-level.module.d.ts +3 -0
- package/schematics/migrations/new-icons-pack/README.md +52 -4
- package/schematics/migrations/new-icons-pack/data.js +1142 -1142
- package/schematics/migrations/new-icons-pack/index.js +18 -7
- package/schematics/migrations/new-icons-pack/migration.json +4570 -0
- package/schematics/migrations/new-icons-pack/replacement.json +18 -0
- package/schematics/migrations/new-icons-pack/schema.json +13 -0
- package/schematics/ng-add/index.js +4 -4
- package/timepicker/timepicker.directive.d.ts +2 -2
- package/title/title.directive.d.ts +3 -0
- package/tooltip/_tooltip-theme.scss +5 -6
- package/tooltip/tooltip.scss +1 -0
- package/tree/_tree-theme.scss +11 -5
- package/tree/tree-option.scss +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChangeDetectorRef, DestroyRef, ElementRef, InjectionToken, InputSignal, Renderer2 } from '@angular/core';
|
|
2
2
|
import { FormGroupDirective, NgControl, NgForm } from '@angular/forms';
|
|
3
|
-
import { CanUpdateErrorState, ErrorStateMatcher } from '@koobiq/components/core';
|
|
3
|
+
import { CanUpdateErrorState, ErrorStateMatcher, KbqBaseFileUploadLocaleConfig, KbqEnumValues, KbqMultipleFileUploadLocaleConfig } from '@koobiq/components/core';
|
|
4
4
|
import { BehaviorSubject, Subject } from 'rxjs';
|
|
5
5
|
import { KbqFileList, KbqFileUploadContext } from './primitives';
|
|
6
6
|
export interface KbqFile extends File {
|
|
@@ -22,20 +22,39 @@ export interface KbqInputFile {
|
|
|
22
22
|
onFileSelectedViaClick(event: Event): void;
|
|
23
23
|
onFileDropped(files: FileList | KbqFile[]): void;
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* @docs-private
|
|
27
|
+
* @deprecated Will be removed in next major release
|
|
28
|
+
*/
|
|
25
29
|
export interface KbqInputFileLabel {
|
|
26
30
|
captionText: string;
|
|
27
31
|
browseLink: string;
|
|
28
32
|
title?: string | undefined;
|
|
29
33
|
}
|
|
34
|
+
/** Upload modes enum. */
|
|
35
|
+
export declare enum KbqFileUploadAllowedType {
|
|
36
|
+
File = "file",
|
|
37
|
+
Folder = "folder",
|
|
38
|
+
Mixed = "mixed"
|
|
39
|
+
}
|
|
40
|
+
/** Allowed upload modes for the upload component. */
|
|
41
|
+
export type KbqFileUploadAllowedTypeValues = KbqEnumValues<KbqFileUploadAllowedType>;
|
|
42
|
+
/** @docs-private */
|
|
43
|
+
export type KbqFileUploadCaptionContext = {
|
|
44
|
+
captionText: string;
|
|
45
|
+
browseLink?: string;
|
|
46
|
+
captionTextSeparator?: string;
|
|
47
|
+
browseLinkFolder?: string;
|
|
48
|
+
};
|
|
30
49
|
/**
|
|
31
50
|
* @deprecated use FormControl for validation
|
|
32
51
|
*/
|
|
33
52
|
export type KbqFileValidatorFn = (file: File) => string | null;
|
|
34
|
-
export declare const KBQ_FILE_UPLOAD_CONFIGURATION: InjectionToken<
|
|
53
|
+
export declare const KBQ_FILE_UPLOAD_CONFIGURATION: InjectionToken<KbqBaseFileUploadLocaleConfig | KbqMultipleFileUploadLocaleConfig>;
|
|
35
54
|
/** @deprecated use `FileValidators.isCorrectExtension` instead. Will be removed in next major release. */
|
|
36
55
|
export declare const isCorrectExtension: (file: File, accept?: string[]) => boolean;
|
|
37
56
|
/** @docs-private */
|
|
38
|
-
export declare abstract class KbqFileUploadBase<T =
|
|
57
|
+
export declare abstract class KbqFileUploadBase<T = KbqBaseFileUploadLocaleConfig> implements CanUpdateErrorState {
|
|
39
58
|
protected abstract localeConfig: InputSignal<Partial<T> | undefined>;
|
|
40
59
|
/** Tracks whether the component is in an error state based on the control, parent form,
|
|
41
60
|
* and `errorStateMatcher`, triggering visual updates and state changes if needed. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use './file-upload-theme' as theme;
|
|
2
|
+
@use '../form-field/form-field';
|
|
2
3
|
|
|
3
4
|
.kbq-file-upload {
|
|
4
5
|
box-sizing: border-box;
|
|
@@ -6,12 +7,17 @@
|
|
|
6
7
|
align-items: center;
|
|
7
8
|
position: relative;
|
|
8
9
|
|
|
9
|
-
.kbq-file-dropzone,
|
|
10
10
|
.kbq-file-item {
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.kbq-file-dropzone {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: baseline;
|
|
18
|
+
gap: var(--dropzone-gap, var(--kbq-file-upload-size-dropzone-content-gap-horizontal));
|
|
19
|
+
}
|
|
20
|
+
|
|
15
21
|
.kbq-ellipsis-center {
|
|
16
22
|
position: relative;
|
|
17
23
|
display: flex;
|
|
@@ -32,9 +38,7 @@
|
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
.kbq-file-upload__hint {
|
|
35
|
-
.kbq-hint
|
|
36
|
-
margin-top: var(--kbq-size-xxs);
|
|
37
|
-
}
|
|
41
|
+
@include form-field.kbq-form-field-hint-geometry();
|
|
38
42
|
}
|
|
39
43
|
|
|
40
44
|
@include theme.kbq-file-upload-theme();
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
2
2
|
import { AfterViewInit, DoCheck, ElementRef, EventEmitter, QueryList, TemplateRef } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
-
import { ErrorStateMatcher } from '@koobiq/components/core';
|
|
4
|
+
import { ErrorStateMatcher, KbqMultipleFileUploadLocaleConfig } from '@koobiq/components/core';
|
|
5
5
|
import { ProgressSpinnerMode } from '@koobiq/components/progress-spinner';
|
|
6
|
-
import { KbqFile, KbqFileItem, KbqFileUploadBase,
|
|
6
|
+
import { KbqFile, KbqFileItem, KbqFileUploadBase, KbqFileUploadCaptionContext, KbqFileValidatorFn } from './file-upload';
|
|
7
7
|
import { KbqFileLoader } from './primitives';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
import * as i1 from "./primitives/file-picker";
|
|
10
|
-
export interface KbqInputFileMultipleLabel extends
|
|
11
|
-
captionTextWhenSelected: string;
|
|
12
|
-
captionTextForCompactSize: string;
|
|
13
|
-
gridHeaders: {
|
|
14
|
-
file: string;
|
|
15
|
-
size: string;
|
|
16
|
-
};
|
|
10
|
+
export interface KbqInputFileMultipleLabel extends KbqMultipleFileUploadLocaleConfig {
|
|
17
11
|
[k: string | number | symbol]: unknown;
|
|
18
12
|
}
|
|
19
|
-
export declare const KBQ_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION:
|
|
13
|
+
export declare const KBQ_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION: KbqMultipleFileUploadLocaleConfig;
|
|
20
14
|
export declare class KbqMultipleFileUploadComponent extends KbqFileUploadBase implements AfterViewInit, ControlValueAccessor, DoCheck {
|
|
21
15
|
/**
|
|
22
16
|
* A value responsible for progress spinner type.
|
|
@@ -41,8 +35,13 @@ export declare class KbqMultipleFileUploadComponent extends KbqFileUploadBase im
|
|
|
41
35
|
errorStateMatcher: ErrorStateMatcher;
|
|
42
36
|
get files(): KbqFileItem[];
|
|
43
37
|
set files(currentFileList: KbqFileItem[]);
|
|
38
|
+
/**
|
|
39
|
+
* Determines which kind of items the upload component can accept.
|
|
40
|
+
* @default mixed
|
|
41
|
+
*/
|
|
42
|
+
allowed: import("@angular/core").InputSignal<"file" | "folder" | "mixed">;
|
|
44
43
|
/** Optional configuration to override default labels with localized text.*/
|
|
45
|
-
readonly localeConfig: import("@angular/core").InputSignal<Partial<
|
|
44
|
+
readonly localeConfig: import("@angular/core").InputSignal<Partial<KbqMultipleFileUploadLocaleConfig> | undefined>;
|
|
46
45
|
/** Emits an event containing updated file list.
|
|
47
46
|
* public output will be renamed to filesChange in next major release (#DS-3700) */
|
|
48
47
|
readonly filesChange: EventEmitter<KbqFileItem[]>;
|
|
@@ -59,24 +58,14 @@ export declare class KbqMultipleFileUploadComponent extends KbqFileUploadBase im
|
|
|
59
58
|
/** File Icon Template */
|
|
60
59
|
protected readonly customFileIcon: TemplateRef<HTMLElement>;
|
|
61
60
|
protected readonly fileLoader: KbqFileLoader | undefined;
|
|
62
|
-
private readonly fileSizeHeaderCell;
|
|
63
61
|
/** @docs-private */
|
|
64
62
|
protected readonly hint: QueryList<TemplateRef<any>>;
|
|
65
63
|
/** @docs-private */
|
|
66
64
|
hasFocus: boolean;
|
|
67
65
|
/** @docs-private */
|
|
68
|
-
|
|
69
|
-
header: string;
|
|
70
|
-
cssClass: string;
|
|
71
|
-
}[];
|
|
72
|
-
/** @docs-private */
|
|
73
|
-
config: KbqInputFileMultipleLabel;
|
|
74
|
-
/** @docs-private */
|
|
75
|
-
separatedCaptionText: string[];
|
|
76
|
-
/** @docs-private */
|
|
77
|
-
separatedCaptionTextWhenSelected: string[];
|
|
66
|
+
readonly resolvedLocaleConfig: import("@angular/core").Signal<KbqMultipleFileUploadLocaleConfig>;
|
|
78
67
|
/** @docs-private */
|
|
79
|
-
|
|
68
|
+
protected readonly captionContext: import("@angular/core").Signal<KbqFileUploadCaptionContext>;
|
|
80
69
|
/** cvaOnChange function registered via registerOnChange (ControlValueAccessor).
|
|
81
70
|
* @docs-private
|
|
82
71
|
*/
|
|
@@ -100,13 +89,11 @@ export declare class KbqMultipleFileUploadComponent extends KbqFileUploadBase im
|
|
|
100
89
|
* @docs-private
|
|
101
90
|
*/
|
|
102
91
|
get invalid(): boolean;
|
|
103
|
-
/**
|
|
104
|
-
* Set maxWidth for filesize cell to enable proper ellipsis center,
|
|
105
|
-
* @docs-private
|
|
106
|
-
*/
|
|
107
|
-
protected get fileSizeCellMaxWidth(): number;
|
|
108
92
|
/** @docs-private */
|
|
109
|
-
|
|
93
|
+
protected get captionTextWhenSelected(): string;
|
|
94
|
+
/** @docs-private */
|
|
95
|
+
readonly configuration: KbqMultipleFileUploadLocaleConfig | null;
|
|
96
|
+
private readonly localeId;
|
|
110
97
|
private readonly focusMonitor;
|
|
111
98
|
private readonly platformId;
|
|
112
99
|
constructor();
|
|
@@ -133,12 +120,9 @@ export declare class KbqMultipleFileUploadComponent extends KbqFileUploadBase im
|
|
|
133
120
|
onFileDropped(files: KbqFile[]): void;
|
|
134
121
|
/** @docs-private */
|
|
135
122
|
deleteFile(index: number, event?: MouseEvent, origin?: FocusOrigin): void;
|
|
136
|
-
private updateLocaleParams;
|
|
137
123
|
private mapToFileItem;
|
|
138
124
|
private validateFile;
|
|
139
|
-
private initDefaultParams;
|
|
140
|
-
private getCaptionText;
|
|
141
125
|
private onFileAdded;
|
|
142
126
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqMultipleFileUploadComponent, never>;
|
|
143
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqMultipleFileUploadComponent, "kbq-multiple-file-upload,kbq-file-upload[multiple]", never, { "progressMode": { "alias": "progressMode"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "size": { "alias": "size"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "customValidation": { "alias": "customValidation"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "files": { "alias": "files"; "required": false; }; "localeConfig": { "alias": "localeConfig"; "required": false; "isSignal": true; }; }, { "filesChange": "fileQueueChanged"; "filesAdded": "filesAdded"; "fileRemoved": "fileRemoved"; }, ["customFileIcon", "hint"], ["kbq-hint"], true, [{ directive: typeof i1.KbqFileUploadContext; inputs: { "id": "id"; "disabled": "disabled";
|
|
127
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqMultipleFileUploadComponent, "kbq-multiple-file-upload,kbq-file-upload[multiple]", never, { "progressMode": { "alias": "progressMode"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "size": { "alias": "size"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "customValidation": { "alias": "customValidation"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "files": { "alias": "files"; "required": false; }; "allowed": { "alias": "allowed"; "required": false; "isSignal": true; }; "localeConfig": { "alias": "localeConfig"; "required": false; "isSignal": true; }; }, { "filesChange": "fileQueueChanged"; "filesAdded": "filesAdded"; "fileRemoved": "fileRemoved"; }, ["customFileIcon", "hint"], ["kbq-hint"], true, [{ directive: typeof i1.KbqFileUploadContext; inputs: { "id": "id"; "disabled": "disabled"; }; outputs: {}; }, { directive: typeof i1.KbqFileList; inputs: {}; outputs: { "listChange": "filesChange"; "itemsAdded": "itemsAdded"; "itemRemoved": "itemRemoved"; }; }]>;
|
|
144
128
|
}
|
|
@@ -1,80 +1,218 @@
|
|
|
1
|
-
@
|
|
1
|
+
@mixin _kbq-list-item($state-name) {
|
|
2
|
+
--kbq-option-background: var(--kbq-list-#{$state-name}-container-background);
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
background: var(--kbq-list-#{$state-name}-container-background);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@mixin _kbq-multiple-file-upload-theme() {
|
|
8
|
+
background-color: var(--kbq-file-upload-multiple-default-container-background);
|
|
9
|
+
border-color: var(--kbq-file-upload-multiple-default-container-border) !important;
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
&:not(.kbq-disabled, .kbq-error) {
|
|
12
|
+
.kbq-file-upload__dropzone-icon {
|
|
13
|
+
color: var(--kbq-file-upload-multiple-default-dropzone-icon-color);
|
|
14
|
+
}
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
var(--kbq-file-upload-
|
|
16
|
+
.kbq-multiple-file-upload__empty-state {
|
|
17
|
+
--kbq-empty-state-title: var(--kbq-file-upload-multiple-default-text-block-color);
|
|
18
|
+
--kbq-empty-state-color: var(--kbq-file-upload-multiple-default-text-block-color);
|
|
19
|
+
}
|
|
14
20
|
|
|
15
|
-
|
|
21
|
+
.kbq-multiple-file-upload__empty-state-upload-icon {
|
|
22
|
+
color: var(--kbq-file-upload-multiple-default-upload-icon-color);
|
|
23
|
+
}
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
.kbq-file-upload__dropzone-caption {
|
|
26
|
+
color: var(--kbq-file-upload-multiple-default-text-block-color);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.kbq-file-drop_dragover {
|
|
31
|
+
background-color: var(--kbq-file-upload-multiple-states-on-drag-container-background);
|
|
32
|
+
border-color: var(--kbq-file-upload-multiple-states-on-drag-container-border) !important;
|
|
18
33
|
|
|
19
|
-
.kbq-file-
|
|
20
|
-
|
|
34
|
+
.kbq-file-upload__dropzone-icon {
|
|
35
|
+
color: var(--kbq-file-upload-multiple-states-on-drag-dropzone-icon-color);
|
|
21
36
|
}
|
|
22
37
|
|
|
23
|
-
.kbq-file-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
38
|
+
.kbq-file-upload__list-footer {
|
|
39
|
+
border-top-color: var(--kbq-file-upload-multiple-states-on-drag-container-border);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.kbq-multiple-file-upload__empty-state-upload-icon {
|
|
43
|
+
color: var(--kbq-file-upload-multiple-states-on-drag-upload-icon-color);
|
|
27
44
|
}
|
|
28
45
|
}
|
|
29
46
|
|
|
30
|
-
&.kbq-
|
|
31
|
-
|
|
32
|
-
|
|
47
|
+
&.kbq-disabled {
|
|
48
|
+
background-color: var(--kbq-file-upload-multiple-states-disabled-container-background);
|
|
49
|
+
border-color: var(--kbq-file-upload-multiple-states-disabled-container-border) !important;
|
|
50
|
+
|
|
51
|
+
.kbq-file-upload__dropzone-icon {
|
|
52
|
+
color: var(--kbq-file-upload-multiple-states-disabled-dropzone-icon-color);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.kbq-file-upload__list-footer {
|
|
56
|
+
border-top-color: var(--kbq-file-upload-multiple-states-disabled-container-border);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.kbq-multiple-file-upload__empty-state-upload-icon {
|
|
60
|
+
color: var(--kbq-file-upload-multiple-states-disabled-upload-icon-color);
|
|
61
|
+
}
|
|
33
62
|
|
|
34
|
-
.kbq-file-
|
|
35
|
-
|
|
63
|
+
.kbq-multiple-file-upload__empty-state {
|
|
64
|
+
--kbq-empty-state-title: var(--kbq-file-upload-multiple-states-disabled-text-block-color);
|
|
65
|
+
--kbq-empty-state-color: var(--kbq-file-upload-multiple-states-disabled-text-block-color);
|
|
66
|
+
}
|
|
36
67
|
|
|
37
|
-
|
|
38
|
-
|
|
68
|
+
.kbq-file-upload__dropzone-caption {
|
|
69
|
+
color: var(--kbq-file-upload-multiple-states-disabled-text-block-color);
|
|
70
|
+
}
|
|
39
71
|
|
|
40
|
-
|
|
72
|
+
.kbq-file-upload__item {
|
|
73
|
+
.kbq-file-upload__file .kbq-icon.kbq-empty {
|
|
74
|
+
color: var(--kbq-file-upload-multiple-states-disabled-left-icon-color);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.kbq-file-item__text,
|
|
78
|
+
.kbq-file-upload__size {
|
|
79
|
+
color: var(--kbq-file-upload-multiple-states-disabled-text-block-color);
|
|
41
80
|
}
|
|
42
81
|
}
|
|
43
82
|
}
|
|
44
83
|
|
|
45
|
-
.kbq-
|
|
46
|
-
|
|
47
|
-
|
|
84
|
+
&:not(.kbq-disabled) {
|
|
85
|
+
&.kbq-error {
|
|
86
|
+
background-color: var(--kbq-file-upload-multiple-states-error-container-background);
|
|
87
|
+
border-color: var(--kbq-file-upload-multiple-states-error-container-border) !important;
|
|
88
|
+
|
|
89
|
+
.kbq-file-upload__dropzone-icon {
|
|
90
|
+
color: var(--kbq-file-upload-multiple-states-error-dropzone-icon-color);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.kbq-multiple-file-upload__empty-state-upload-icon {
|
|
94
|
+
color: var(--kbq-file-upload-multiple-states-error-upload-icon-color);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.kbq-file-upload__dropzone-caption {
|
|
98
|
+
color: var(--kbq-file-upload-multiple-states-error-text-block-color);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.kbq-multiple-file-upload__empty-state {
|
|
102
|
+
--kbq-file-upload-multiple-states-error-text-block-color: var(
|
|
103
|
+
--kbq-file-upload-multiple-default-text-block-color
|
|
104
|
+
);
|
|
48
105
|
|
|
49
|
-
|
|
50
|
-
|
|
106
|
+
--kbq-empty-state-title: var(--kbq-file-upload-multiple-states-error-text-block-color);
|
|
107
|
+
--kbq-empty-state-color: var(--kbq-file-upload-multiple-states-error-text-block-color);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.kbq-file-upload__list-footer {
|
|
111
|
+
border-top-color: var(--kbq-file-upload-multiple-states-error-container-border);
|
|
112
|
+
}
|
|
51
113
|
}
|
|
52
|
-
}
|
|
53
114
|
|
|
54
|
-
|
|
55
|
-
|
|
115
|
+
.kbq-file-upload__item {
|
|
116
|
+
&:has(.kbq-file-upload__row.kbq-error) {
|
|
117
|
+
&:hover,
|
|
118
|
+
&.kbq-hovered {
|
|
119
|
+
.kbq-file-upload__row {
|
|
120
|
+
background-color: var(--kbq-states-background-error-less-hover);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.kbq-file-item__text,
|
|
125
|
+
.kbq-file-upload__size {
|
|
126
|
+
color: var(--kbq-file-upload-multiple-states-error-text-block-color);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.kbq-file-upload__file .kbq-icon.kbq-empty {
|
|
130
|
+
color: var(--kbq-file-upload-multiple-states-error-left-icon-color);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.kbq-file-upload__action.kbq-icon.kbq-empty {
|
|
134
|
+
color: var(--kbq-file-upload-multiple-states-error-icon-button-color);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&:not(:has(.kbq-file-upload__row.kbq-error)) {
|
|
139
|
+
&:hover,
|
|
140
|
+
&.kbq-hovered {
|
|
141
|
+
.kbq-file-upload__row {
|
|
142
|
+
@include _kbq-list-item(states-hover);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&.kbq-disabled {
|
|
147
|
+
.kbq-file-upload__row {
|
|
148
|
+
@include _kbq-list-item(states-disabled);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
56
153
|
}
|
|
57
154
|
|
|
58
|
-
.kbq-file-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
align-items: center;
|
|
155
|
+
.kbq-file-upload__list-footer {
|
|
156
|
+
border-top-color: var(--kbq-file-upload-multiple-default-container-border);
|
|
157
|
+
}
|
|
62
158
|
|
|
63
|
-
|
|
64
|
-
|
|
159
|
+
.kbq-file-upload__item {
|
|
160
|
+
.kbq-file-upload__file .kbq-icon.kbq-empty {
|
|
161
|
+
color: var(--kbq-file-upload-multiple-default-left-icon-color);
|
|
65
162
|
}
|
|
66
163
|
|
|
67
164
|
.kbq-file-upload__size {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
165
|
+
color: var(--kbq-file-upload-multiple-default-file-size-text-color);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// todo нужно рефакторить со стилями тут сложно
|
|
171
|
+
.kbq-multiple-file-upload .kbq-file-upload {
|
|
172
|
+
border-radius: var(--kbq-file-upload-size-multiple-big-container-border-radius);
|
|
173
|
+
border-width: var(--kbq-file-upload-size-multiple-big-container-border-width);
|
|
174
|
+
border-style: dashed;
|
|
175
|
+
|
|
176
|
+
&:not(.kbq-selected) {
|
|
177
|
+
&.kbq-file-upload_default {
|
|
178
|
+
justify-content: center;
|
|
179
|
+
min-height: var(--kbq-file-upload-size-multiple-big-container-min-height);
|
|
180
|
+
min-width: var(--kbq-file-upload-size-multiple-big-container-min-width);
|
|
181
|
+
|
|
182
|
+
.kbq-empty-state {
|
|
183
|
+
--kbq-empty-state-size-normal-padding-top: 0;
|
|
184
|
+
--kbq-empty-state-size-normal-padding-bottom: 0;
|
|
185
|
+
--kbq-empty-state-size-normal-image-addon-height: 4px;
|
|
186
|
+
--kbq-empty-state-size-normal-padding-horizontal: 23px;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&.kbq-file-upload_compact {
|
|
191
|
+
padding: var(--kbq-file-upload-multiple-compact-container-padding-vertical)
|
|
192
|
+
var(--kbq-file-upload-multiple-compact-container-padding-horizontal);
|
|
74
193
|
}
|
|
75
194
|
}
|
|
76
195
|
|
|
196
|
+
.kbq-multiple-file-upload__empty-state {
|
|
197
|
+
--kbq-empty-state-size-normal-image-margin-bottom: var(--kbq-size-m);
|
|
198
|
+
--kbq-empty-state-size-normal-title-margin-bottom: var(--kbq-size-xs);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.kbq-file-upload__list {
|
|
202
|
+
min-height: var(--kbq-file-upload-size-multiple-min-height);
|
|
203
|
+
max-height: var(--kbq-file-upload-size-multiple-max-height);
|
|
204
|
+
|
|
205
|
+
overflow-y: auto;
|
|
206
|
+
|
|
207
|
+
padding-top: calc(var(--kbq-size-xxs) - var(--kbq-size-border-width));
|
|
208
|
+
padding-bottom: var(--kbq-size-xxl);
|
|
209
|
+
}
|
|
210
|
+
|
|
77
211
|
.kbq-file-upload__row {
|
|
212
|
+
display: flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
flex: 1;
|
|
215
|
+
|
|
78
216
|
.kbq-file-upload__grid-cell {
|
|
79
217
|
padding: 0 var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal);
|
|
80
218
|
}
|
|
@@ -82,71 +220,51 @@
|
|
|
82
220
|
.kbq-file-upload__file {
|
|
83
221
|
display: flex;
|
|
84
222
|
align-items: center;
|
|
223
|
+
flex-grow: 1;
|
|
85
224
|
gap: var(--kbq-file-upload-size-multiple-big-grid-cell-content-gap-horizontal);
|
|
225
|
+
padding-left: var(--kbq-size-m);
|
|
86
226
|
|
|
87
227
|
.kbq-file-item__text {
|
|
88
228
|
width: 90%;
|
|
89
229
|
}
|
|
90
230
|
}
|
|
91
231
|
|
|
92
|
-
.kbq-file-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
);
|
|
100
|
-
padding-bottom: calc(
|
|
101
|
-
var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal) - $list-option-border-width
|
|
102
|
-
);
|
|
103
|
-
min-height: var(--kbq-size-xxl);
|
|
104
|
-
min-width: var(--kbq-size-xxl);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.kbq-file-multiple-uploaded__header {
|
|
109
|
-
margin: -1px;
|
|
110
|
-
border-bottom-width: var(--kbq-file-upload-size-multiple-big-container-border-width);
|
|
111
|
-
border-bottom-style: solid;
|
|
112
|
-
|
|
113
|
-
padding: 0 var(--kbq-size-xxs);
|
|
114
|
-
|
|
115
|
-
.kbq-file-upload__grid-cell {
|
|
116
|
-
$header-cell-vertical-padding: 10px;
|
|
117
|
-
padding: $header-cell-vertical-padding var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal)
|
|
118
|
-
calc($header-cell-vertical-padding - var(--kbq-file-upload-size-multiple-big-container-border-width))
|
|
119
|
-
var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal);
|
|
232
|
+
.kbq-file-upload__size {
|
|
233
|
+
width: var(--kbq-file-upload-size-multiple-big-grid-cell-file-size-width);
|
|
234
|
+
min-width: var(--kbq-file-upload-size-multiple-big-grid-cell-file-size-width);
|
|
235
|
+
max-width: var(--kbq-file-upload-size-multiple-big-grid-cell-file-size-width);
|
|
236
|
+
flex-grow: 1;
|
|
237
|
+
flex-shrink: 1;
|
|
238
|
+
text-align: left;
|
|
120
239
|
}
|
|
121
240
|
|
|
122
241
|
.kbq-file-upload__action {
|
|
123
|
-
|
|
124
|
-
min-width: var(--kbq-size-xxl);
|
|
125
|
-
padding: var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal)
|
|
126
|
-
var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal)
|
|
127
|
-
calc(
|
|
128
|
-
var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical) - var(
|
|
129
|
-
--kbq-file-upload-size-multiple-big-container-border-width
|
|
130
|
-
)
|
|
131
|
-
);
|
|
242
|
+
padding: var(--kbq-size-m);
|
|
132
243
|
}
|
|
133
244
|
}
|
|
134
245
|
|
|
135
|
-
.kbq-file-
|
|
246
|
+
.kbq-file-upload__list-footer {
|
|
136
247
|
margin: -1px;
|
|
137
|
-
padding:
|
|
138
|
-
var(--kbq-size-m) var(--kbq-size-m) var(--kbq-size-m);
|
|
248
|
+
padding: var(--kbq-size-m) var(--kbq-size-l);
|
|
139
249
|
|
|
140
250
|
border-top-width: var(--kbq-file-upload-size-multiple-big-container-border-width);
|
|
141
251
|
border-top-style: dashed;
|
|
142
|
-
|
|
143
|
-
.kbq-file-dropzone {
|
|
144
|
-
gap: var(--kbq-file-upload-size-multiple-big-dropzone-content-gap-horizontal);
|
|
145
|
-
}
|
|
146
252
|
}
|
|
147
253
|
|
|
148
|
-
.kbq-file-
|
|
254
|
+
.kbq-file-upload__wrapper {
|
|
149
255
|
width: 100%;
|
|
150
256
|
height: 100%;
|
|
151
257
|
}
|
|
258
|
+
|
|
259
|
+
.kbq-file-upload__item {
|
|
260
|
+
border-radius: 0;
|
|
261
|
+
border: 0;
|
|
262
|
+
padding: 0 calc(var(--kbq-size-xxs) - var(--kbq-size-border-width));
|
|
263
|
+
|
|
264
|
+
.kbq-file-upload__row {
|
|
265
|
+
border-radius: var(--kbq-size-xs);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
@include _kbq-multiple-file-upload-theme();
|
|
152
270
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
1
|
import { KbqFile } from '../file-upload';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
export declare class KbqFileDropDirective {
|
|
5
4
|
/** Flag that controls css-class modifications on drag events. */
|
|
6
5
|
dragover: boolean;
|
|
7
6
|
/** Emits an event when file items were dropped. */
|
|
8
|
-
readonly filesDropped:
|
|
7
|
+
readonly filesDropped: import("@angular/core").OutputEmitterRef<KbqFile[]>;
|
|
9
8
|
/** @docs-private */
|
|
10
9
|
onDragOver(event: DragEvent): void;
|
|
11
10
|
/** @docs-private */
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
2
2
|
import { AfterViewInit, DoCheck, ElementRef, EventEmitter } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
-
import { ErrorStateMatcher } from '@koobiq/components/core';
|
|
4
|
+
import { ErrorStateMatcher, KbqBaseFileUploadLocaleConfig, KbqFileUploadLocaleConfig } from '@koobiq/components/core';
|
|
5
5
|
import { ProgressSpinnerMode } from '@koobiq/components/progress-spinner';
|
|
6
|
-
import { KbqFile, KbqFileItem, KbqFileUploadBase,
|
|
6
|
+
import { KbqFile, KbqFileItem, KbqFileUploadBase, KbqFileUploadCaptionContext, KbqFileValidatorFn } from './file-upload';
|
|
7
7
|
import { KbqFileLoader } from './primitives';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
import * as i1 from "./primitives/file-picker";
|
|
10
|
-
export declare const KBQ_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION:
|
|
10
|
+
export declare const KBQ_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION: KbqFileUploadLocaleConfig['single'];
|
|
11
11
|
export declare class KbqSingleFileUploadComponent extends KbqFileUploadBase implements AfterViewInit, ControlValueAccessor, DoCheck {
|
|
12
12
|
/**
|
|
13
13
|
* A value responsible for progress spinner type.
|
|
@@ -33,8 +33,13 @@ export declare class KbqSingleFileUploadComponent extends KbqFileUploadBase impl
|
|
|
33
33
|
* @default true
|
|
34
34
|
*/
|
|
35
35
|
showFileSize: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Determines which kind of items the upload component can accept.
|
|
38
|
+
* @default mixed
|
|
39
|
+
*/
|
|
40
|
+
allowed: import("@angular/core").InputSignal<"file" | "folder" | "mixed">;
|
|
36
41
|
/** Optional configuration to override default labels with localized text.*/
|
|
37
|
-
readonly localeConfig: import("@angular/core").InputSignal<Partial<
|
|
42
|
+
readonly localeConfig: import("@angular/core").InputSignal<Partial<KbqBaseFileUploadLocaleConfig> | undefined>;
|
|
38
43
|
/** Emits an event containing updated file.
|
|
39
44
|
* public output will be renamed to fileChange in next major release (#DS-3700) */
|
|
40
45
|
readonly fileChange: EventEmitter<KbqFileItem | null>;
|
|
@@ -42,10 +47,6 @@ export declare class KbqSingleFileUploadComponent extends KbqFileUploadBase impl
|
|
|
42
47
|
protected readonly fileLoader: KbqFileLoader | undefined;
|
|
43
48
|
/** @docs-private */
|
|
44
49
|
private readonly hint;
|
|
45
|
-
/** @docs-private */
|
|
46
|
-
config: KbqInputFileLabel;
|
|
47
|
-
/** @docs-private */
|
|
48
|
-
separatedCaptionText: string[];
|
|
49
50
|
/** cvaOnChange function registered via registerOnChange (ControlValueAccessor).
|
|
50
51
|
* @docs-private
|
|
51
52
|
*/
|
|
@@ -67,7 +68,12 @@ export declare class KbqSingleFileUploadComponent extends KbqFileUploadBase impl
|
|
|
67
68
|
*/
|
|
68
69
|
get invalid(): boolean;
|
|
69
70
|
/** @docs-private */
|
|
70
|
-
readonly configuration:
|
|
71
|
+
readonly configuration: KbqBaseFileUploadLocaleConfig | null;
|
|
72
|
+
/** @docs-private */
|
|
73
|
+
protected readonly captionContext: import("@angular/core").Signal<KbqFileUploadCaptionContext>;
|
|
74
|
+
private readonly localeId;
|
|
75
|
+
/** @docs-private */
|
|
76
|
+
readonly resolvedLocaleConfig: import("@angular/core").Signal<KbqBaseFileUploadLocaleConfig>;
|
|
71
77
|
private readonly focusMonitor;
|
|
72
78
|
private readonly platformId;
|
|
73
79
|
constructor();
|
|
@@ -94,12 +100,9 @@ export declare class KbqSingleFileUploadComponent extends KbqFileUploadBase impl
|
|
|
94
100
|
onFileDropped(files: KbqFile[]): void;
|
|
95
101
|
/** @docs-private */
|
|
96
102
|
deleteItem(event?: MouseEvent, origin?: FocusOrigin): void;
|
|
97
|
-
private updateLocaleParams;
|
|
98
103
|
private mapToFileItem;
|
|
99
104
|
private validateFile;
|
|
100
|
-
private initDefaultParams;
|
|
101
|
-
private getCaptionText;
|
|
102
105
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqSingleFileUploadComponent, never>;
|
|
103
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqSingleFileUploadComponent, "kbq-single-file-upload,kbq-file-upload:not([multiple])", never, { "progressMode": { "alias": "progressMode"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "customValidation": { "alias": "customValidation"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "file": { "alias": "file"; "required": false; }; "showFileSize": { "alias": "showFileSize"; "required": false; }; "localeConfig": { "alias": "localeConfig"; "required": false; "isSignal": true; }; }, { "fileChange": "fileQueueChange"; }, ["hint"], ["[kbq-icon]", "kbq-hint"], true, [{ directive: typeof i1.KbqFileUploadContext; inputs: { "id": "id"; "disabled": "disabled"; "multiple": "multiple";
|
|
106
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqSingleFileUploadComponent, "kbq-single-file-upload,kbq-file-upload:not([multiple])", never, { "progressMode": { "alias": "progressMode"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "customValidation": { "alias": "customValidation"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "file": { "alias": "file"; "required": false; }; "showFileSize": { "alias": "showFileSize"; "required": false; }; "allowed": { "alias": "allowed"; "required": false; "isSignal": true; }; "localeConfig": { "alias": "localeConfig"; "required": false; "isSignal": true; }; }, { "fileChange": "fileQueueChange"; }, ["hint"], ["[kbq-icon]", "kbq-hint"], true, [{ directive: typeof i1.KbqFileUploadContext; inputs: { "id": "id"; "disabled": "disabled"; "multiple": "multiple"; }; outputs: {}; }, { directive: typeof i1.KbqFileList; inputs: {}; outputs: { "listChange": "fileChange"; }; }]>;
|
|
104
107
|
static ngAcceptInputType_showFileSize: unknown;
|
|
105
108
|
}
|