@recursyve/ngx-material-components 19.0.0-beta.19 → 19.0.0-beta.20

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.
Files changed (60) hide show
  1. package/chip-list/index.d.ts +41 -2
  2. package/common/index.d.ts +24 -4
  3. package/dropzone/index.d.ts +125 -6
  4. package/fesm2022/recursyve-ngx-material-components-chip-list.mjs +13 -13
  5. package/fesm2022/recursyve-ngx-material-components-chip-list.mjs.map +1 -1
  6. package/fesm2022/recursyve-ngx-material-components-common.mjs +3 -3
  7. package/fesm2022/recursyve-ngx-material-components-common.mjs.map +1 -1
  8. package/fesm2022/recursyve-ngx-material-components-dropzone.mjs +35 -35
  9. package/fesm2022/recursyve-ngx-material-components-dropzone.mjs.map +1 -1
  10. package/fesm2022/recursyve-ngx-material-components-form-field-error.mjs +6 -6
  11. package/fesm2022/recursyve-ngx-material-components-form-field-error.mjs.map +1 -1
  12. package/fesm2022/recursyve-ngx-material-components-loading.mjs +10 -10
  13. package/fesm2022/recursyve-ngx-material-components-loading.mjs.map +1 -1
  14. package/fesm2022/recursyve-ngx-material-components-typeahead.mjs +53 -46
  15. package/fesm2022/recursyve-ngx-material-components-typeahead.mjs.map +1 -1
  16. package/form-field-error/index.d.ts +53 -4
  17. package/index.d.ts +3 -1
  18. package/loading/index.d.ts +31 -3
  19. package/package.json +7 -7
  20. package/typeahead/index.d.ts +216 -4
  21. package/chip-list/chip-list.d.ts +0 -26
  22. package/chip-list/icons/clear/chip-list-items-clear-icon.d.ts +0 -5
  23. package/chip-list/items/chip-list-items.d.ts +0 -14
  24. package/common/provider.d.ts +0 -3
  25. package/common/translater/constant.d.ts +0 -2
  26. package/common/translater/options.d.ts +0 -7
  27. package/common/translater/translate-pipe.d.ts +0 -8
  28. package/common/translater/translater.d.ts +0 -1
  29. package/dropzone/config.d.ts +0 -42
  30. package/dropzone/constant.d.ts +0 -2
  31. package/dropzone/dropzone.d.ts +0 -42
  32. package/dropzone/dropzone.directive.d.ts +0 -12
  33. package/dropzone/icons/delete/delete-icon.component.d.ts +0 -5
  34. package/dropzone/icons/file/file-icon.component.d.ts +0 -5
  35. package/dropzone/icons/image/image-icon.component.d.ts +0 -5
  36. package/dropzone/models.d.ts +0 -20
  37. package/dropzone/options.d.ts +0 -4
  38. package/dropzone/pipes/file-size.pipe.d.ts +0 -10
  39. package/dropzone/preview/file-preview.d.ts +0 -14
  40. package/dropzone/provider.d.ts +0 -3
  41. package/form-field-error/constant.d.ts +0 -3
  42. package/form-field-error/error-transformer.d.ts +0 -13
  43. package/form-field-error/form-field-error.d.ts +0 -8
  44. package/form-field-error/form-field-error.directive.d.ts +0 -17
  45. package/form-field-error/options.d.ts +0 -9
  46. package/form-field-error/provider.d.ts +0 -3
  47. package/loading/constant.d.ts +0 -2
  48. package/loading/loading-spinner.d.ts +0 -9
  49. package/loading/loading.d.ts +0 -13
  50. package/loading/options.d.ts +0 -4
  51. package/loading/provider.d.ts +0 -3
  52. package/typeahead/async-typeahead.d.ts +0 -32
  53. package/typeahead/constants.d.ts +0 -2
  54. package/typeahead/icons/search/typeahead-search-icon.d.ts +0 -5
  55. package/typeahead/provider.d.ts +0 -3
  56. package/typeahead/providers/async-typeahead.provider.d.ts +0 -11
  57. package/typeahead/providers/async-typeahead.service.d.ts +0 -47
  58. package/typeahead/providers/index.d.ts +0 -2
  59. package/typeahead/typeahead-base.d.ts +0 -111
  60. package/typeahead/typeahead.d.ts +0 -12
@@ -1,2 +1,41 @@
1
- export * from "./chip-list";
2
- export * from "./items/chip-list-items";
1
+ import * as _angular_core from '@angular/core';
2
+ import { Injector, Signal, OnInit } from '@angular/core';
3
+ import { ControlValueAccessor } from '@angular/forms';
4
+ import { Observable } from 'rxjs';
5
+
6
+ declare class NiceChipListItems<T> {
7
+ readonly removeChip: _angular_core.OutputEmitterRef<number>;
8
+ protected readonly injector: Injector;
9
+ items?: Signal<T[]>;
10
+ formatLabelFn?: (value: T) => string;
11
+ setItemsReactivity(items$: Observable<T[]>): void;
12
+ setFormatLabel(fn: (value: T) => string): void;
13
+ remove(index: number): void;
14
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NiceChipListItems<any>, never>;
15
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NiceChipListItems<any>, "nice-chip-list-items", never, {}, { "removeChip": "removeChip"; }, never, never, true, never>;
16
+ }
17
+
18
+ declare class NiceChipListDirective<T> implements ControlValueAccessor, OnInit {
19
+ readonly withItemList: _angular_core.InputSignal<NiceChipListItems<T>>;
20
+ readonly reloadOnSelected: _angular_core.InputSignal<boolean>;
21
+ readonly separatorKeyboardCodes: _angular_core.InputSignal<string[]>;
22
+ private readonly elementRef;
23
+ private readonly injector;
24
+ private readonly asyncTypeahead;
25
+ private readonly ngControl;
26
+ private readonly values;
27
+ private propagateChanges?;
28
+ constructor();
29
+ onKeyDown(event: KeyboardEvent): void;
30
+ ngOnInit(): void;
31
+ writeValue(obj: T[] | null): void;
32
+ registerOnChange(fn: (_: T[]) => void): void;
33
+ registerOnTouched(): void;
34
+ private setupAsyncTypeahead;
35
+ private addValue;
36
+ private updateTypeaheadSearchOptions;
37
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NiceChipListDirective<any>, never>;
38
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NiceChipListDirective<any>, "input[niceChipList], nice-async-typeahead[niceChipList]", never, { "withItemList": { "alias": "withItemList"; "required": true; "isSignal": true; }; "reloadOnSelected": { "alias": "reloadOnSelected"; "required": false; "isSignal": true; }; "separatorKeyboardCodes": { "alias": "separatorKeyboardCodes"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
39
+ }
40
+
41
+ export { NiceChipListDirective, NiceChipListItems };
package/common/index.d.ts CHANGED
@@ -1,4 +1,24 @@
1
- export * from "./provider";
2
- export * from "./translater/constant";
3
- export * from "./translater/translate-pipe";
4
- export * from "./translater/translater";
1
+ import * as i0 from '@angular/core';
2
+ import { FactoryProvider, Provider, InjectionToken, PipeTransform } from '@angular/core';
3
+
4
+ type NiceTranslater = (key: string, params?: Record<string, string>) => string;
5
+
6
+ type NiceTranslaterOptions = {
7
+ translater: Omit<FactoryProvider, "provide" | "multi"> & {
8
+ useFactory: (...args: any[]) => NiceTranslater;
9
+ };
10
+ };
11
+
12
+ declare function provideNiceComponents(options: NiceTranslaterOptions): Provider[];
13
+
14
+ declare const NICE_COMPONENTS_TRANSLATER: InjectionToken<unknown>;
15
+
16
+ declare class NiceTranslatePipe implements PipeTransform {
17
+ private readonly translater;
18
+ transform(key: string, params?: Record<string, string>): string;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<NiceTranslatePipe, never>;
20
+ static ɵpipe: i0.ɵɵPipeDeclaration<NiceTranslatePipe, "niceTranslate", true>;
21
+ }
22
+
23
+ export { NICE_COMPONENTS_TRANSLATER, NiceTranslatePipe, provideNiceComponents };
24
+ export type { NiceTranslater };
@@ -1,6 +1,125 @@
1
- export * from "./dropzone.directive";
2
- export * from "./dropzone";
3
- export * from "./config";
4
- export * from "./models";
5
- export * from "./options";
6
- export * from "./provider";
1
+ import * as _angular_core from '@angular/core';
2
+ import { EventEmitter, OnDestroy, ElementRef, Provider } from '@angular/core';
3
+ import { ControlValueAccessor } from '@angular/forms';
4
+ import { MatRippleLoader } from '@angular/material/core';
5
+
6
+ declare class NiceDropzoneDirective {
7
+ fileOver: boolean;
8
+ filesDropped: EventEmitter<FileList>;
9
+ files: _angular_core.OutputEmitterRef<void>;
10
+ onDragOver(event: DragEvent): void;
11
+ onDragLeave(event: DragEvent): void;
12
+ ondrop(event: DragEvent): void;
13
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NiceDropzoneDirective, never>;
14
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NiceDropzoneDirective, "[niceDropzone]", never, {}, { "filesDropped": "filesDropped"; "files": "files"; }, never, never, true, never>;
15
+ }
16
+
17
+ type NiceDropzoneImageConfig = {
18
+ minSize?: {
19
+ width: number;
20
+ height: number;
21
+ };
22
+ maxSize?: {
23
+ width: number;
24
+ height: number;
25
+ };
26
+ recommendedSize?: {
27
+ width: number;
28
+ height: number;
29
+ };
30
+ };
31
+ type NiceDropzoneFileSizeConfig = {
32
+ size: number;
33
+ unit: "B" | "KB" | "MB" | "GB";
34
+ };
35
+ type NiceDropzoneTranslationKeyConfig = {
36
+ upload: {
37
+ file: string;
38
+ files: string;
39
+ image: string;
40
+ images: string;
41
+ };
42
+ format: {
43
+ label: string;
44
+ };
45
+ ratio: {
46
+ label: string;
47
+ pixels: string;
48
+ };
49
+ size: {
50
+ label: string;
51
+ units: {
52
+ B: string;
53
+ KB: string;
54
+ MB: string;
55
+ GB: string;
56
+ };
57
+ };
58
+ };
59
+
60
+ type NiceFileDimensions = {
61
+ width: number;
62
+ height: number;
63
+ ratio: number;
64
+ };
65
+ type NiceLocalFile = {
66
+ file: File;
67
+ name: string;
68
+ size?: number;
69
+ dimensions?: NiceFileDimensions;
70
+ };
71
+ type NiceRemoteFile = {
72
+ id: string | number;
73
+ name: string;
74
+ url: string;
75
+ size?: number;
76
+ };
77
+ type NiceSelectedFiles = NiceLocalFile | NiceRemoteFile;
78
+ declare function isLocalFile(file: NiceSelectedFiles): file is NiceLocalFile;
79
+ declare function isRemoteFile(file: NiceSelectedFiles): file is NiceRemoteFile;
80
+
81
+ declare const niceDropzoneModes: readonly ["image", "file", "all"];
82
+ type NiceDropzoneModes = (typeof niceDropzoneModes)[number];
83
+ declare class NiceDropzone implements OnDestroy, ControlValueAccessor {
84
+ readonly mode: _angular_core.InputSignal<"file" | "image" | "all">;
85
+ readonly multiple: _angular_core.InputSignalWithTransform<boolean, any>;
86
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, any>;
87
+ readonly accept: _angular_core.InputSignal<string[] | undefined>;
88
+ readonly config: _angular_core.InputSignal<NiceDropzoneImageConfig | undefined>;
89
+ readonly maxFileSize: _angular_core.InputSignal<NiceDropzoneFileSizeConfig | undefined>;
90
+ protected readonly _elementRef: _angular_core.Signal<ElementRef<any> | undefined>;
91
+ protected readonly _inputRef: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
92
+ /**
93
+ * Handles the lazy creation of the MatButton ripple.
94
+ * Used to improve the initial load time of large applications.
95
+ */
96
+ protected readonly _rippleLoader: MatRippleLoader;
97
+ protected readonly _translationKeys: NiceDropzoneTranslationKeyConfig;
98
+ protected readonly files: _angular_core.WritableSignal<NiceSelectedFiles[]>;
99
+ protected _disabled: boolean;
100
+ private _onChange;
101
+ private _value;
102
+ constructor();
103
+ ngOnDestroy(): void;
104
+ writeValue(value: NiceSelectedFiles | NiceSelectedFiles[] | null): void;
105
+ registerOnChange(fn: (value: NiceSelectedFiles | NiceSelectedFiles[] | null) => void): void;
106
+ registerOnTouched(): void;
107
+ setDisabledState(disabled: boolean): void;
108
+ onFileChanged(event: Event): void;
109
+ onFilesDropped(fileList: FileList): Promise<void>;
110
+ onFileDelete(index: number): void;
111
+ protected propagateChanges(value: NiceSelectedFiles | NiceSelectedFiles[] | null): void;
112
+ protected getImageDimension(file: File): Promise<NiceFileDimensions>;
113
+ protected resetInput(): void;
114
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NiceDropzone, never>;
115
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NiceDropzone, "nice-dropzone", never, { "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
116
+ }
117
+
118
+ type NiceDropzoneOptions = {
119
+ translationKeys: NiceDropzoneTranslationKeyConfig;
120
+ };
121
+
122
+ declare function provideDropzone(options?: NiceDropzoneOptions): Provider[];
123
+
124
+ export { NiceDropzone, NiceDropzoneDirective, isLocalFile, isRemoteFile, niceDropzoneModes, provideDropzone };
125
+ export type { NiceDropzoneFileSizeConfig, NiceDropzoneImageConfig, NiceDropzoneModes, NiceDropzoneOptions, NiceDropzoneTranslationKeyConfig, NiceFileDimensions, NiceLocalFile, NiceRemoteFile, NiceSelectedFiles };
@@ -6,14 +6,14 @@ import { NiceAsyncTypeahead } from '@recursyve/ngx-material-components/typeahead
6
6
  import { MatChipSet, MatChipRemove, MatChipRow } from '@angular/material/chips';
7
7
 
8
8
  class NiceChipListDirective {
9
- withItemList = input.required();
10
- reloadOnSelected = input(true);
11
- separatorKeyboardCodes = input(["Enter"]);
9
+ withItemList = input.required(...(ngDevMode ? [{ debugName: "withItemList" }] : []));
10
+ reloadOnSelected = input(true, ...(ngDevMode ? [{ debugName: "reloadOnSelected" }] : []));
11
+ separatorKeyboardCodes = input(["Enter"], ...(ngDevMode ? [{ debugName: "separatorKeyboardCodes" }] : []));
12
12
  elementRef = inject(ElementRef);
13
13
  injector = inject(Injector);
14
14
  asyncTypeahead = inject(NiceAsyncTypeahead, { optional: true });
15
15
  ngControl = inject(NgControl, { optional: true });
16
- values = signal([]);
16
+ values = signal([], ...(ngDevMode ? [{ debugName: "values" }] : []));
17
17
  propagateChanges;
18
18
  constructor() {
19
19
  if (this.ngControl) {
@@ -100,10 +100,10 @@ class NiceChipListDirective {
100
100
  const searchOptions = this.asyncTypeahead.searchOptions();
101
101
  this.asyncTypeahead.setSearchOptions({ ...(searchOptions ?? {}), ignore });
102
102
  }
103
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceChipListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
104
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.10", type: NiceChipListDirective, isStandalone: true, selector: "input[niceChipList], nice-async-typeahead[niceChipList]", inputs: { withItemList: { classPropertyName: "withItemList", publicName: "withItemList", isSignal: true, isRequired: true, transformFunction: null }, reloadOnSelected: { classPropertyName: "reloadOnSelected", publicName: "reloadOnSelected", isSignal: true, isRequired: false, transformFunction: null }, separatorKeyboardCodes: { classPropertyName: "separatorKeyboardCodes", publicName: "separatorKeyboardCodes", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0 });
103
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceChipListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
104
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.1", type: NiceChipListDirective, isStandalone: true, selector: "input[niceChipList], nice-async-typeahead[niceChipList]", inputs: { withItemList: { classPropertyName: "withItemList", publicName: "withItemList", isSignal: true, isRequired: true, transformFunction: null }, reloadOnSelected: { classPropertyName: "reloadOnSelected", publicName: "reloadOnSelected", isSignal: true, isRequired: false, transformFunction: null }, separatorKeyboardCodes: { classPropertyName: "separatorKeyboardCodes", publicName: "separatorKeyboardCodes", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0 });
105
105
  }
106
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceChipListDirective, decorators: [{
106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceChipListDirective, decorators: [{
107
107
  type: Directive,
108
108
  args: [{
109
109
  selector: "input[niceChipList], nice-async-typeahead[niceChipList]"
@@ -114,10 +114,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
114
114
  }] } });
115
115
 
116
116
  class NiceChipListItemsClearIcon {
117
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceChipListItemsClearIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
118
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: NiceChipListItemsClearIcon, isStandalone: true, selector: "nice-chip-list-items-clear-icon", ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm5.49 16.07a1 1 0 0 1 -1.41 1.42l-3.9 -3.9a0.25 0.25 0 0 0 -0.36 0l-3.9 3.9a1 1 0 1 1 -1.41 -1.42l3.9 -3.89a0.25 0.25 0 0 0 0 -0.36l-3.9 -3.9a1 1 0 0 1 1.41 -1.41l3.9 3.9a0.25 0.25 0 0 0 0.36 0l3.9 -3.9a1 1 0 0 1 1.41 1.41l-3.9 3.9a0.25 0.25 0 0 0 0 0.36Z\" fill=\"currentColor\" stroke-width=\"1\"></path>\n</svg>\n" });
117
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceChipListItemsClearIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
118
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: NiceChipListItemsClearIcon, isStandalone: true, selector: "nice-chip-list-items-clear-icon", ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm5.49 16.07a1 1 0 0 1 -1.41 1.42l-3.9 -3.9a0.25 0.25 0 0 0 -0.36 0l-3.9 3.9a1 1 0 1 1 -1.41 -1.42l3.9 -3.89a0.25 0.25 0 0 0 0 -0.36l-3.9 -3.9a1 1 0 0 1 1.41 -1.41l3.9 3.9a0.25 0.25 0 0 0 0.36 0l3.9 -3.9a1 1 0 0 1 1.41 1.41l-3.9 3.9a0.25 0.25 0 0 0 0 0.36Z\" fill=\"currentColor\" stroke-width=\"1\"></path>\n</svg>\n" });
119
119
  }
120
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceChipListItemsClearIcon, decorators: [{
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceChipListItemsClearIcon, decorators: [{
121
121
  type: Component,
122
122
  args: [{ selector: "nice-chip-list-items-clear-icon", template: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm5.49 16.07a1 1 0 0 1 -1.41 1.42l-3.9 -3.9a0.25 0.25 0 0 0 -0.36 0l-3.9 3.9a1 1 0 1 1 -1.41 -1.42l3.9 -3.89a0.25 0.25 0 0 0 0 -0.36l-3.9 -3.9a1 1 0 0 1 1.41 -1.41l3.9 3.9a0.25 0.25 0 0 0 0.36 0l3.9 -3.9a1 1 0 0 1 1.41 1.41l-3.9 3.9a0.25 0.25 0 0 0 0 0.36Z\" fill=\"currentColor\" stroke-width=\"1\"></path>\n</svg>\n" }]
123
123
  }] });
@@ -136,10 +136,10 @@ class NiceChipListItems {
136
136
  remove(index) {
137
137
  this.removeChip.emit(index);
138
138
  }
139
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceChipListItems, deps: [], target: i0.ɵɵFactoryTarget.Component });
140
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: NiceChipListItems, isStandalone: true, selector: "nice-chip-list-items", outputs: { removeChip: "removeChip" }, ngImport: i0, template: "@if (items) {\n <mat-chip-set>\n @for (item of items(); track item) {\n <mat-chip-row [highlighted]=\"true\" (removed)=\"remove($index)\">\n @if (formatLabelFn) {\n {{ formatLabelFn(item) }}\n } @else {\n {{ item }}\n }\n\n <button matChipRemove>\n <nice-chip-list-items-clear-icon />\n </button>\n </mat-chip-row>\n }\n </mat-chip-set>\n}\n", styles: ["nice-chip-list-items-clear-icon{margin-top:-1px;width:16px;height:16px}\n"], dependencies: [{ kind: "component", type: MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { kind: "directive", type: MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "component", type: NiceChipListItemsClearIcon, selector: "nice-chip-list-items-clear-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
139
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceChipListItems, deps: [], target: i0.ɵɵFactoryTarget.Component });
140
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: NiceChipListItems, isStandalone: true, selector: "nice-chip-list-items", outputs: { removeChip: "removeChip" }, ngImport: i0, template: "@if (items) {\n <mat-chip-set>\n @for (item of items(); track item) {\n <mat-chip-row [highlighted]=\"true\" (removed)=\"remove($index)\">\n @if (formatLabelFn) {\n {{ formatLabelFn(item) }}\n } @else {\n {{ item }}\n }\n\n <button matChipRemove>\n <nice-chip-list-items-clear-icon />\n </button>\n </mat-chip-row>\n }\n </mat-chip-set>\n}\n", styles: ["nice-chip-list-items-clear-icon{margin-top:-1px;width:16px;height:16px}\n"], dependencies: [{ kind: "component", type: MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { kind: "directive", type: MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "component", type: NiceChipListItemsClearIcon, selector: "nice-chip-list-items-clear-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
141
141
  }
142
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceChipListItems, decorators: [{
142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceChipListItems, decorators: [{
143
143
  type: Component,
144
144
  args: [{ selector: "nice-chip-list-items", imports: [
145
145
  MatChipSet,
@@ -1 +1 @@
1
- {"version":3,"file":"recursyve-ngx-material-components-chip-list.mjs","sources":["../../../src/material-components/chip-list/chip-list.ts","../../../src/material-components/chip-list/icons/clear/chip-list-items-clear-icon.ts","../../../src/material-components/chip-list/icons/clear/chip-list-items-clear-icon.svg","../../../src/material-components/chip-list/items/chip-list-items.ts","../../../src/material-components/chip-list/items/chip-list-items.html","../../../src/material-components/chip-list/recursyve-ngx-material-components-chip-list.ts"],"sourcesContent":["import {\n Directive,\n effect,\n ElementRef,\n HostListener,\n inject,\n Injector,\n input,\n OnInit,\n signal,\n untracked\n} from \"@angular/core\";\nimport { toObservable } from \"@angular/core/rxjs-interop\";\nimport { ControlValueAccessor, NgControl } from \"@angular/forms\";\nimport { NiceAsyncTypeahead } from \"@recursyve/ngx-material-components/typeahead\";\nimport { NiceChipListItems } from \"./items/chip-list-items\";\n\n@Directive({\n selector: \"input[niceChipList], nice-async-typeahead[niceChipList]\"\n})\nexport class NiceChipListDirective<T> implements ControlValueAccessor, OnInit {\n public readonly withItemList = input.required<NiceChipListItems<T>>();\n public readonly reloadOnSelected = input<boolean>(true);\n public readonly separatorKeyboardCodes = input<string[]>([\"Enter\"]);\n\n private readonly elementRef = inject(ElementRef);\n private readonly injector = inject(Injector);\n private readonly asyncTypeahead = inject<NiceAsyncTypeahead<T>>(NiceAsyncTypeahead, { optional: true });\n private readonly ngControl = inject<NgControl>(NgControl, { optional: true });\n\n private readonly values = signal<T[]>([]);\n\n private propagateChanges?: (_: T[]) => void;\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n\n effect(() => {\n const values = this.values();\n untracked(() => this.updateTypeaheadSearchOptions(values));\n });\n }\n\n @HostListener(\"keydown\", [\"$event\"])\n public onKeyDown(event: KeyboardEvent): void {\n if (this.asyncTypeahead) {\n return;\n }\n\n if (!this.separatorKeyboardCodes().includes(event.code)) {\n return;\n }\n\n if (!this.elementRef.nativeElement.validity.valid) {\n return;\n }\n\n this.addValue(this.elementRef.nativeElement.value);\n this.elementRef.nativeElement.value = \"\";\n event.preventDefault();\n }\n\n public ngOnInit(): void {\n this.setupAsyncTypeahead();\n\n const parentElement = this.elementRef.nativeElement.parentElement;\n if (parentElement.classList.contains(\"mat-mdc-form-field-infix\")) {\n parentElement.style.alignItems = \"flex-start\";\n parentElement.style.flexDirection = \"column-reverse\";\n }\n\n const withItemList = this.withItemList();\n withItemList.setItemsReactivity(toObservable(this.values, { injector: this.injector }));\n withItemList.removeChip.subscribe((index) => {\n const values = [...this.values()];\n values.splice(index, 1);\n\n this.propagateChanges?.(values);\n this.values.set(values);\n });\n\n if (this.asyncTypeahead) {\n withItemList.setFormatLabel((item) => this.asyncTypeahead!.formatLabel(item));\n }\n }\n\n public writeValue(obj: T[] | null): void {\n if (!obj) {\n this.values.set([]);\n } else if (Array.isArray(obj)) {\n this.values.set([...obj]);\n }\n }\n\n public registerOnChange(fn: (_: T[]) => void): void {\n this.propagateChanges = fn;\n }\n\n public registerOnTouched(): void {\n return;\n }\n\n private setupAsyncTypeahead(): void {\n if (!this.asyncTypeahead) {\n return;\n }\n\n this.asyncTypeahead.selected\n .subscribe((value) => {\n if (!value) {\n return;\n }\n\n this.addValue(value);\n this.asyncTypeahead?.removeActiveValue();\n });\n }\n\n private addValue(value: T): void {\n const values = [...this.values()];\n if (values.includes(value)) {\n return;\n }\n\n values.push(value);\n this.propagateChanges?.(values);\n this.values.set(values);\n }\n\n private updateTypeaheadSearchOptions(ignore: T[]): void {\n if (!this.asyncTypeahead) {\n return;\n }\n\n const searchOptions = this.asyncTypeahead.searchOptions();\n this.asyncTypeahead.setSearchOptions({ ...(searchOptions ?? {}), ignore });\n }\n}\n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"nice-chip-list-items-clear-icon\",\n templateUrl: \"chip-list-items-clear-icon.svg\"\n})\nexport class NiceChipListItemsClearIcon {}\n","<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm5.49 16.07a1 1 0 0 1 -1.41 1.42l-3.9 -3.9a0.25 0.25 0 0 0 -0.36 0l-3.9 3.9a1 1 0 1 1 -1.41 -1.42l3.9 -3.89a0.25 0.25 0 0 0 0 -0.36l-3.9 -3.9a1 1 0 0 1 1.41 -1.41l3.9 3.9a0.25 0.25 0 0 0 0.36 0l3.9 -3.9a1 1 0 0 1 1.41 1.41l-3.9 3.9a0.25 0.25 0 0 0 0 0.36Z\" fill=\"currentColor\" stroke-width=\"1\"></path>\n</svg>\n","import { ChangeDetectionStrategy, Component, inject, Injector, output, Signal } from \"@angular/core\";\nimport { toSignal } from \"@angular/core/rxjs-interop\";\nimport { MatChipRemove, MatChipRow, MatChipSet } from \"@angular/material/chips\";\nimport { Observable } from \"rxjs\";\nimport { NiceChipListItemsClearIcon } from \"../icons/clear/chip-list-items-clear-icon\";\n\n@Component({\n selector: \"nice-chip-list-items\",\n templateUrl: \"./chip-list-items.html\",\n styleUrls: [\"./chip-list-items.scss\"],\n imports: [\n MatChipSet,\n MatChipRemove,\n MatChipRow,\n NiceChipListItemsClearIcon\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NiceChipListItems<T> {\n public readonly removeChip = output<number>();\n\n protected readonly injector = inject(Injector);\n\n public items?: Signal<T[]>;\n public formatLabelFn?: (value: T) => string;\n\n public setItemsReactivity(items$: Observable<T[]>): void {\n this.items = toSignal(items$, { injector: this.injector, initialValue: [] });\n }\n\n public setFormatLabel(fn: (value: T) => string): void {\n this.formatLabelFn = fn;\n }\n\n public remove(index: number): void {\n this.removeChip.emit(index);\n }\n}\n","@if (items) {\n <mat-chip-set>\n @for (item of items(); track item) {\n <mat-chip-row [highlighted]=\"true\" (removed)=\"remove($index)\">\n @if (formatLabelFn) {\n {{ formatLabelFn(item) }}\n } @else {\n {{ item }}\n }\n\n <button matChipRemove>\n <nice-chip-list-items-clear-icon />\n </button>\n </mat-chip-row>\n }\n </mat-chip-set>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAoBa,qBAAqB,CAAA;AACd,IAAA,YAAY,GAAG,KAAK,CAAC,QAAQ,EAAwB;AACrD,IAAA,gBAAgB,GAAG,KAAK,CAAU,IAAI,CAAC;AACvC,IAAA,sBAAsB,GAAG,KAAK,CAAW,CAAC,OAAO,CAAC,CAAC;AAElD,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC3B,cAAc,GAAG,MAAM,CAAwB,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACtF,SAAS,GAAG,MAAM,CAAY,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAE5D,IAAA,MAAM,GAAG,MAAM,CAAM,EAAE,CAAC;AAEjC,IAAA,gBAAgB;AAExB,IAAA,WAAA,GAAA;AACI,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,aAAa,GAAG,IAAI;;QAGvC,MAAM,CAAC,MAAK;AACR,YAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;YAC5B,SAAS,CAAC,MAAM,IAAI,CAAC,4BAA4B,CAAC,MAAM,CAAC,CAAC;AAC9D,SAAC,CAAC;;AAIC,IAAA,SAAS,CAAC,KAAoB,EAAA;AACjC,QAAA,IAAI,IAAI,CAAC,cAAc,EAAE;YACrB;;AAGJ,QAAA,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YACrD;;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AAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACV,0BAA0B,EAAA,QAAA,EAAA,iCAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAIrB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAZ7B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAGvB,OAAA,EAAA;wBACL,UAAU;wBACV,aAAa;wBACb,UAAU;wBACV;qBACH,EACgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,qgBAAA,EAAA,MAAA,EAAA,CAAA,2EAAA,CAAA,EAAA;;;AEhBnD;;AAEG;;;;"}
1
+ {"version":3,"file":"recursyve-ngx-material-components-chip-list.mjs","sources":["../../../src/material-components/chip-list/chip-list.ts","../../../src/material-components/chip-list/icons/clear/chip-list-items-clear-icon.ts","../../../src/material-components/chip-list/icons/clear/chip-list-items-clear-icon.svg","../../../src/material-components/chip-list/items/chip-list-items.ts","../../../src/material-components/chip-list/items/chip-list-items.html","../../../src/material-components/chip-list/recursyve-ngx-material-components-chip-list.ts"],"sourcesContent":["import {\n Directive,\n effect,\n ElementRef,\n HostListener,\n inject,\n Injector,\n input,\n OnInit,\n signal,\n untracked\n} from \"@angular/core\";\nimport { toObservable } from \"@angular/core/rxjs-interop\";\nimport { ControlValueAccessor, NgControl } from \"@angular/forms\";\nimport { NiceAsyncTypeahead } from \"@recursyve/ngx-material-components/typeahead\";\nimport { NiceChipListItems } from \"./items/chip-list-items\";\n\n@Directive({\n selector: \"input[niceChipList], nice-async-typeahead[niceChipList]\"\n})\nexport class NiceChipListDirective<T> implements ControlValueAccessor, OnInit {\n public readonly withItemList = input.required<NiceChipListItems<T>>();\n public readonly reloadOnSelected = input<boolean>(true);\n public readonly separatorKeyboardCodes = input<string[]>([\"Enter\"]);\n\n private readonly elementRef = inject(ElementRef);\n private readonly injector = inject(Injector);\n private readonly asyncTypeahead = inject<NiceAsyncTypeahead<T>>(NiceAsyncTypeahead, { optional: true });\n private readonly ngControl = inject<NgControl>(NgControl, { optional: true });\n\n private readonly values = signal<T[]>([]);\n\n private propagateChanges?: (_: T[]) => void;\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n\n effect(() => {\n const values = this.values();\n untracked(() => this.updateTypeaheadSearchOptions(values));\n });\n }\n\n @HostListener(\"keydown\", [\"$event\"])\n public onKeyDown(event: KeyboardEvent): void {\n if (this.asyncTypeahead) {\n return;\n }\n\n if (!this.separatorKeyboardCodes().includes(event.code)) {\n return;\n }\n\n if (!this.elementRef.nativeElement.validity.valid) {\n return;\n }\n\n this.addValue(this.elementRef.nativeElement.value);\n this.elementRef.nativeElement.value = \"\";\n event.preventDefault();\n }\n\n public ngOnInit(): void {\n this.setupAsyncTypeahead();\n\n const parentElement = this.elementRef.nativeElement.parentElement;\n if (parentElement.classList.contains(\"mat-mdc-form-field-infix\")) {\n parentElement.style.alignItems = \"flex-start\";\n parentElement.style.flexDirection = \"column-reverse\";\n }\n\n const withItemList = this.withItemList();\n withItemList.setItemsReactivity(toObservable(this.values, { injector: this.injector }));\n withItemList.removeChip.subscribe((index) => {\n const values = [...this.values()];\n values.splice(index, 1);\n\n this.propagateChanges?.(values);\n this.values.set(values);\n });\n\n if (this.asyncTypeahead) {\n withItemList.setFormatLabel((item) => this.asyncTypeahead!.formatLabel(item));\n }\n }\n\n public writeValue(obj: T[] | null): void {\n if (!obj) {\n this.values.set([]);\n } else if (Array.isArray(obj)) {\n this.values.set([...obj]);\n }\n }\n\n public registerOnChange(fn: (_: T[]) => void): void {\n this.propagateChanges = fn;\n }\n\n public registerOnTouched(): void {\n return;\n }\n\n private setupAsyncTypeahead(): void {\n if (!this.asyncTypeahead) {\n return;\n }\n\n this.asyncTypeahead.selected\n .subscribe((value) => {\n if (!value) {\n return;\n }\n\n this.addValue(value);\n this.asyncTypeahead?.removeActiveValue();\n });\n }\n\n private addValue(value: T): void {\n const values = [...this.values()];\n if (values.includes(value)) {\n return;\n }\n\n values.push(value);\n this.propagateChanges?.(values);\n this.values.set(values);\n }\n\n private updateTypeaheadSearchOptions(ignore: T[]): void {\n if (!this.asyncTypeahead) {\n return;\n }\n\n const searchOptions = this.asyncTypeahead.searchOptions();\n this.asyncTypeahead.setSearchOptions({ ...(searchOptions ?? {}), ignore });\n }\n}\n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"nice-chip-list-items-clear-icon\",\n templateUrl: \"chip-list-items-clear-icon.svg\"\n})\nexport class NiceChipListItemsClearIcon {}\n","<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm5.49 16.07a1 1 0 0 1 -1.41 1.42l-3.9 -3.9a0.25 0.25 0 0 0 -0.36 0l-3.9 3.9a1 1 0 1 1 -1.41 -1.42l3.9 -3.89a0.25 0.25 0 0 0 0 -0.36l-3.9 -3.9a1 1 0 0 1 1.41 -1.41l3.9 3.9a0.25 0.25 0 0 0 0.36 0l3.9 -3.9a1 1 0 0 1 1.41 1.41l-3.9 3.9a0.25 0.25 0 0 0 0 0.36Z\" fill=\"currentColor\" stroke-width=\"1\"></path>\n</svg>\n","import { ChangeDetectionStrategy, Component, inject, Injector, output, Signal } from \"@angular/core\";\nimport { toSignal } from \"@angular/core/rxjs-interop\";\nimport { MatChipRemove, MatChipRow, MatChipSet } from \"@angular/material/chips\";\nimport { Observable } from \"rxjs\";\nimport { NiceChipListItemsClearIcon } from \"../icons/clear/chip-list-items-clear-icon\";\n\n@Component({\n selector: \"nice-chip-list-items\",\n templateUrl: \"./chip-list-items.html\",\n styleUrls: [\"./chip-list-items.scss\"],\n imports: [\n MatChipSet,\n MatChipRemove,\n MatChipRow,\n NiceChipListItemsClearIcon\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NiceChipListItems<T> {\n public readonly removeChip = output<number>();\n\n protected readonly injector = inject(Injector);\n\n public items?: Signal<T[]>;\n public formatLabelFn?: (value: T) => string;\n\n public setItemsReactivity(items$: Observable<T[]>): void {\n this.items = toSignal(items$, { injector: this.injector, initialValue: [] });\n }\n\n public setFormatLabel(fn: (value: T) => string): void {\n this.formatLabelFn = fn;\n }\n\n public remove(index: number): void {\n this.removeChip.emit(index);\n }\n}\n","@if (items) {\n <mat-chip-set>\n @for (item of items(); track item) {\n <mat-chip-row [highlighted]=\"true\" (removed)=\"remove($index)\">\n @if (formatLabelFn) {\n {{ formatLabelFn(item) }}\n } @else {\n {{ item }}\n }\n\n <button matChipRemove>\n <nice-chip-list-items-clear-icon />\n </button>\n </mat-chip-row>\n }\n </mat-chip-set>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAoBa,qBAAqB,CAAA;AACd,IAAA,YAAY,GAAG,KAAK,CAAC,QAAQ,uDAAwB;AACrD,IAAA,gBAAgB,GAAG,KAAK,CAAU,IAAI,4DAAC;AACvC,IAAA,sBAAsB,GAAG,KAAK,CAAW,CAAC,OAAO,CAAC,kEAAC;AAElD,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC3B,cAAc,GAAG,MAAM,CAAwB,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACtF,SAAS,GAAG,MAAM,CAAY,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAE5D,IAAA,MAAM,GAAG,MAAM,CAAM,EAAE,kDAAC;AAEjC,IAAA,gBAAgB;AAExB,IAAA,WAAA,GAAA;AACI,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,aAAa,GAAG,IAAI;QACvC;QAEA,MAAM,CAAC,MAAK;AACR,YAAA,MAAM,MAAM,GAAG,IAA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AAA,sBAAA,EAAA,OAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EClB9B,qgBAiBA,EAAA,MAAA,EAAA,CAAA,2EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDNQ,UAAU,mGACV,aAAa,EAAA,QAAA,EAAA,iBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACb,UAAU,EAAA,QAAA,EAAA,wEAAA,EAAA,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACV,0BAA0B,EAAA,QAAA,EAAA,iCAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAIrB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAZ7B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAAA,OAAA,EAGvB;wBACL,UAAU;wBACV,aAAa;wBACb,UAAU;wBACV;qBACH,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,qgBAAA,EAAA,MAAA,EAAA,CAAA,2EAAA,CAAA,EAAA;;;AEhBnD;;AAEG;;;;"}
@@ -17,10 +17,10 @@ class NiceTranslatePipe {
17
17
  transform(key, params) {
18
18
  return this.translater(key, params);
19
19
  }
20
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTranslatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
21
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: NiceTranslatePipe, isStandalone: true, name: "niceTranslate" });
20
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceTranslatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
21
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: NiceTranslatePipe, isStandalone: true, name: "niceTranslate" });
22
22
  }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTranslatePipe, decorators: [{
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceTranslatePipe, decorators: [{
24
24
  type: Pipe,
25
25
  args: [{
26
26
  name: "niceTranslate"
@@ -1 +1 @@
1
- {"version":3,"file":"recursyve-ngx-material-components-common.mjs","sources":["../../../src/material-components/common/translater/constant.ts","../../../src/material-components/common/provider.ts","../../../src/material-components/common/translater/translate-pipe.ts","../../../src/material-components/common/index.ts","../../../src/material-components/common/recursyve-ngx-material-components-common.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nexport const NICE_COMPONENTS_TRANSLATER = new InjectionToken(\"nice_components_translater\");\n","import { Provider } from \"@angular/core\";\nimport { NICE_COMPONENTS_TRANSLATER } from \"./translater/constant\";\nimport { NiceTranslaterOptions } from \"./translater/options\";\n\nexport function provideNiceComponents(options: NiceTranslaterOptions): Provider[] {\n return [\n { \n provide: NICE_COMPONENTS_TRANSLATER,\n ...options.translater\n }\n ];\n}\n","import { inject, Pipe, PipeTransform } from \"@angular/core\";\nimport { NICE_COMPONENTS_TRANSLATER } from \"./constant\";\nimport { NiceTranslater } from \"./translater\";\n\n@Pipe({\n name: \"niceTranslate\"\n})\nexport class NiceTranslatePipe implements PipeTransform {\n private readonly translater = inject<NiceTranslater>(NICE_COMPONENTS_TRANSLATER);\n\n public transform(key: string, params?: Record<string, string>): string {\n return this.translater(key, params);\n }\n}\n","/*\n * Public API Surface of dropzone\n */\n\nexport * from \"./provider\";\nexport * from \"./translater/constant\";\nexport * from \"./translater/translate-pipe\";\nexport * from \"./translater/translater\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAEa,0BAA0B,GAAG,IAAI,cAAc,CAAC,4BAA4B;;ACEnF,SAAU,qBAAqB,CAAC,OAA8B,EAAA;IAChE,OAAO;AACH,QAAA;AACI,YAAA,OAAO,EAAE,0BAA0B;YACnC,GAAG,OAAO,CAAC;AACd;KACJ;AACL;;MCJa,iBAAiB,CAAA;AACT,IAAA,UAAU,GAAG,MAAM,CAAiB,0BAA0B,CAAC;IAEzE,SAAS,CAAC,GAAW,EAAE,MAA+B,EAAA;QACzD,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;;wGAJ9B,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;sGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,eAAA,EAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE;AACT,iBAAA;;;ACND;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"recursyve-ngx-material-components-common.mjs","sources":["../../../src/material-components/common/translater/constant.ts","../../../src/material-components/common/provider.ts","../../../src/material-components/common/translater/translate-pipe.ts","../../../src/material-components/common/index.ts","../../../src/material-components/common/recursyve-ngx-material-components-common.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nexport const NICE_COMPONENTS_TRANSLATER = new InjectionToken(\"nice_components_translater\");\n","import { Provider } from \"@angular/core\";\nimport { NICE_COMPONENTS_TRANSLATER } from \"./translater/constant\";\nimport { NiceTranslaterOptions } from \"./translater/options\";\n\nexport function provideNiceComponents(options: NiceTranslaterOptions): Provider[] {\n return [\n { \n provide: NICE_COMPONENTS_TRANSLATER,\n ...options.translater\n }\n ];\n}\n","import { inject, Pipe, PipeTransform } from \"@angular/core\";\nimport { NICE_COMPONENTS_TRANSLATER } from \"./constant\";\nimport { NiceTranslater } from \"./translater\";\n\n@Pipe({\n name: \"niceTranslate\"\n})\nexport class NiceTranslatePipe implements PipeTransform {\n private readonly translater = inject<NiceTranslater>(NICE_COMPONENTS_TRANSLATER);\n\n public transform(key: string, params?: Record<string, string>): string {\n return this.translater(key, params);\n }\n}\n","/*\n * Public API Surface of dropzone\n */\n\nexport * from \"./provider\";\nexport * from \"./translater/constant\";\nexport * from \"./translater/translate-pipe\";\nexport * from \"./translater/translater\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAEa,0BAA0B,GAAG,IAAI,cAAc,CAAC,4BAA4B;;ACEnF,SAAU,qBAAqB,CAAC,OAA8B,EAAA;IAChE,OAAO;AACH,QAAA;AACI,YAAA,OAAO,EAAE,0BAA0B;YACnC,GAAG,OAAO,CAAC;AACd;KACJ;AACL;;MCJa,iBAAiB,CAAA;AACT,IAAA,UAAU,GAAG,MAAM,CAAiB,0BAA0B,CAAC;IAEzE,SAAS,CAAC,GAAW,EAAE,MAA+B,EAAA;QACzD,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;IACvC;uGALS,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;qGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,eAAA,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE;AACT,iBAAA;;;ACND;;AAEG;;ACFH;;AAEG;;;;"}
@@ -34,10 +34,10 @@ class NiceDropzoneDirective {
34
34
  this.filesDropped.emit(files);
35
35
  }
36
36
  }
37
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceDropzoneDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
38
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.10", type: NiceDropzoneDirective, isStandalone: true, selector: "[niceDropzone]", outputs: { filesDropped: "filesDropped", files: "files" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "ondrop($event)" }, properties: { "class.file-over": "this.fileOver" } }, ngImport: i0 });
37
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceDropzoneDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
38
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: NiceDropzoneDirective, isStandalone: true, selector: "[niceDropzone]", outputs: { filesDropped: "filesDropped", files: "files" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "ondrop($event)" }, properties: { "class.file-over": "this.fileOver" } }, ngImport: i0 });
39
39
  }
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceDropzoneDirective, decorators: [{
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceDropzoneDirective, decorators: [{
41
41
  type: Directive,
42
42
  args: [{
43
43
  selector: "[niceDropzone]",
@@ -62,19 +62,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
62
62
  const NICE_DROPZONE_TRANSLATION_KEYS = new InjectionToken("nice_dropzone_translation_keys");
63
63
 
64
64
  class NiceDropzoneFileIcon {
65
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceDropzoneFileIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
66
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: NiceDropzoneFileIcon, isStandalone: true, selector: "nice-dropzone-file-icon", ngImport: i0, template: "<svg fill=\"none\" viewBox=\"-1.25 -1.25 40 40\" height=\"40\" width=\"40\">\n <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M5.859375 36.328125h25.78125c1.294375 0 2.34375 -1.049375 2.34375 -2.34375V12.6890625c-0.00015625 -0.621171875 -0.246875 -1.2168750000000002 -0.6859375 -1.65625l-9.175 -9.175c-0.439375 -0.43909062499999996 -1.03515625 -0.6858046875 -1.65625 -0.6859375H5.859375c-1.2765624999999998 0 -2.34375 1.0671875000000002 -2.34375 2.34375v30.46875c0 1.2765624999999998 1.0671875000000002 2.34375 2.34375 2.34375Z\" stroke-width=\"2.5\"></path>\n <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M33.984375 12.890625h-9.375c-0.6215625 0 -1.2178125 -0.24693750000000003 -1.65734375 -0.68646875S22.265625 11.16846875 22.265625 10.546875v-9.375\" stroke-width=\"2.5\"></path>\n</svg>" });
65
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceDropzoneFileIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
66
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: NiceDropzoneFileIcon, isStandalone: true, selector: "nice-dropzone-file-icon", ngImport: i0, template: "<svg fill=\"none\" viewBox=\"-1.25 -1.25 40 40\" height=\"40\" width=\"40\">\n <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M5.859375 36.328125h25.78125c1.294375 0 2.34375 -1.049375 2.34375 -2.34375V12.6890625c-0.00015625 -0.621171875 -0.246875 -1.2168750000000002 -0.6859375 -1.65625l-9.175 -9.175c-0.439375 -0.43909062499999996 -1.03515625 -0.6858046875 -1.65625 -0.6859375H5.859375c-1.2765624999999998 0 -2.34375 1.0671875000000002 -2.34375 2.34375v30.46875c0 1.2765624999999998 1.0671875000000002 2.34375 2.34375 2.34375Z\" stroke-width=\"2.5\"></path>\n <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M33.984375 12.890625h-9.375c-0.6215625 0 -1.2178125 -0.24693750000000003 -1.65734375 -0.68646875S22.265625 11.16846875 22.265625 10.546875v-9.375\" stroke-width=\"2.5\"></path>\n</svg>" });
67
67
  }
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceDropzoneFileIcon, decorators: [{
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceDropzoneFileIcon, decorators: [{
69
69
  type: Component,
70
70
  args: [{ selector: "nice-dropzone-file-icon", template: "<svg fill=\"none\" viewBox=\"-1.25 -1.25 40 40\" height=\"40\" width=\"40\">\n <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M5.859375 36.328125h25.78125c1.294375 0 2.34375 -1.049375 2.34375 -2.34375V12.6890625c-0.00015625 -0.621171875 -0.246875 -1.2168750000000002 -0.6859375 -1.65625l-9.175 -9.175c-0.439375 -0.43909062499999996 -1.03515625 -0.6858046875 -1.65625 -0.6859375H5.859375c-1.2765624999999998 0 -2.34375 1.0671875000000002 -2.34375 2.34375v30.46875c0 1.2765624999999998 1.0671875000000002 2.34375 2.34375 2.34375Z\" stroke-width=\"2.5\"></path>\n <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M33.984375 12.890625h-9.375c-0.6215625 0 -1.2178125 -0.24693750000000003 -1.65734375 -0.68646875S22.265625 11.16846875 22.265625 10.546875v-9.375\" stroke-width=\"2.5\"></path>\n</svg>" }]
71
71
  }] });
72
72
 
73
73
  class NiceDropzoneImageIcon {
74
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceDropzoneImageIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
75
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: NiceDropzoneImageIcon, isStandalone: true, selector: "nice-dropzone-image-icon", ngImport: i0, template: "<svg width=\"40\" height=\"43\" viewBox=\"0 0 40 43\" fill=\"none\">\n <path d=\"M29.333 1.5H2.66634C1.92996 1.5 1.33301 2.09695 1.33301 2.83333V33.0556C1.33301 33.7919 1.92996 34.3889 2.66634 34.3889H29.333C30.0694 34.3889 30.6663 33.7919 30.6663 33.0556V2.83333C30.6663 2.09695 30.0694 1.5 29.333 1.5Z\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M38.6667 11.2778V40.1667C38.6621 40.5189 38.5201 40.8554 38.2711 41.1044C38.022 41.3535 37.6855 41.4954 37.3333 41.5001H12\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M30.6663 27.2778H1.33301\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M7.55566 27.2778L16.8001 14.0689C17.0316 13.7366 17.3357 13.4614 17.6895 13.2642C18.0432 13.0669 18.4372 12.9528 18.8415 12.9306C19.2459 12.9083 19.6501 12.9784 20.0233 13.1356C20.3965 13.2928 20.7291 13.533 20.9957 13.8378L30.6668 25.0556\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M9.33268 6.8335C9.8601 6.8335 10.3757 6.98989 10.8142 7.28291C11.2527 7.57593 11.5945 7.9924 11.7964 8.47967C11.9982 8.96694 12.051 9.50312 11.9481 10.0204C11.8452 10.5377 11.5912 11.0128 11.2183 11.3858C10.8454 11.7587 10.3702 12.0127 9.85292 12.1156C9.33564 12.2185 8.79946 12.1657 8.31219 11.9638C7.82492 11.762 7.40845 11.4202 7.11543 10.9817C6.82241 10.5432 6.66602 10.0276 6.66602 9.50016C6.66602 8.79292 6.94697 8.11464 7.44706 7.61454C7.94716 7.11445 8.62544 6.8335 9.33268 6.8335\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n" });
74
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceDropzoneImageIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
75
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: NiceDropzoneImageIcon, isStandalone: true, selector: "nice-dropzone-image-icon", ngImport: i0, template: "<svg width=\"40\" height=\"43\" viewBox=\"0 0 40 43\" fill=\"none\">\n <path d=\"M29.333 1.5H2.66634C1.92996 1.5 1.33301 2.09695 1.33301 2.83333V33.0556C1.33301 33.7919 1.92996 34.3889 2.66634 34.3889H29.333C30.0694 34.3889 30.6663 33.7919 30.6663 33.0556V2.83333C30.6663 2.09695 30.0694 1.5 29.333 1.5Z\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M38.6667 11.2778V40.1667C38.6621 40.5189 38.5201 40.8554 38.2711 41.1044C38.022 41.3535 37.6855 41.4954 37.3333 41.5001H12\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M30.6663 27.2778H1.33301\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M7.55566 27.2778L16.8001 14.0689C17.0316 13.7366 17.3357 13.4614 17.6895 13.2642C18.0432 13.0669 18.4372 12.9528 18.8415 12.9306C19.2459 12.9083 19.6501 12.9784 20.0233 13.1356C20.3965 13.2928 20.7291 13.533 20.9957 13.8378L30.6668 25.0556\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M9.33268 6.8335C9.8601 6.8335 10.3757 6.98989 10.8142 7.28291C11.2527 7.57593 11.5945 7.9924 11.7964 8.47967C11.9982 8.96694 12.051 9.50312 11.9481 10.0204C11.8452 10.5377 11.5912 11.0128 11.2183 11.3858C10.8454 11.7587 10.3702 12.0127 9.85292 12.1156C9.33564 12.2185 8.79946 12.1657 8.31219 11.9638C7.82492 11.762 7.40845 11.4202 7.11543 10.9817C6.82241 10.5432 6.66602 10.0276 6.66602 9.50016C6.66602 8.79292 6.94697 8.11464 7.44706 7.61454C7.94716 7.11445 8.62544 6.8335 9.33268 6.8335\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n" });
76
76
  }
77
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceDropzoneImageIcon, decorators: [{
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceDropzoneImageIcon, decorators: [{
78
78
  type: Component,
79
79
  args: [{ selector: "nice-dropzone-image-icon", template: "<svg width=\"40\" height=\"43\" viewBox=\"0 0 40 43\" fill=\"none\">\n <path d=\"M29.333 1.5H2.66634C1.92996 1.5 1.33301 2.09695 1.33301 2.83333V33.0556C1.33301 33.7919 1.92996 34.3889 2.66634 34.3889H29.333C30.0694 34.3889 30.6663 33.7919 30.6663 33.0556V2.83333C30.6663 2.09695 30.0694 1.5 29.333 1.5Z\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M38.6667 11.2778V40.1667C38.6621 40.5189 38.5201 40.8554 38.2711 41.1044C38.022 41.3535 37.6855 41.4954 37.3333 41.5001H12\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M30.6663 27.2778H1.33301\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M7.55566 27.2778L16.8001 14.0689C17.0316 13.7366 17.3357 13.4614 17.6895 13.2642C18.0432 13.0669 18.4372 12.9528 18.8415 12.9306C19.2459 12.9083 19.6501 12.9784 20.0233 13.1356C20.3965 13.2928 20.7291 13.533 20.9957 13.8378L30.6668 25.0556\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M9.33268 6.8335C9.8601 6.8335 10.3757 6.98989 10.8142 7.28291C11.2527 7.57593 11.5945 7.9924 11.7964 8.47967C11.9982 8.96694 12.051 9.50312 11.9481 10.0204C11.8452 10.5377 11.5912 11.0128 11.2183 11.3858C10.8454 11.7587 10.3702 12.0127 9.85292 12.1156C9.33564 12.2185 8.79946 12.1657 8.31219 11.9638C7.82492 11.762 7.40845 11.4202 7.11543 10.9817C6.82241 10.5432 6.66602 10.0276 6.66602 9.50016C6.66602 8.79292 6.94697 8.11464 7.44706 7.61454C7.94716 7.11445 8.62544 6.8335 9.33268 6.8335\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n" }]
80
80
  }] });
@@ -101,10 +101,10 @@ class FileSizePipe {
101
101
  const unit = this.translater(this.translationKeys.size.units[this.units[boundedUnitIndex]]);
102
102
  return `${size.toFixed(precision)} ${unit}`;
103
103
  }
104
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: FileSizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
105
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: FileSizePipe, isStandalone: true, name: "niceFileSize" });
104
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FileSizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
105
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: FileSizePipe, isStandalone: true, name: "niceFileSize" });
106
106
  }
107
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: FileSizePipe, decorators: [{
107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FileSizePipe, decorators: [{
108
108
  type: Pipe,
109
109
  args: [{
110
110
  name: "niceFileSize"
@@ -112,38 +112,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
112
112
  }] });
113
113
 
114
114
  class NiceDropzoneDeleteIcon {
115
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceDropzoneDeleteIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
116
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: NiceDropzoneDeleteIcon, isStandalone: true, selector: "nice-dropzone-delete-icon", ngImport: i0, template: "<svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm5.49 16.07a1 1 0 0 1 -1.41 1.42l-3.9 -3.9a0.25 0.25 0 0 0 -0.36 0l-3.9 3.9a1 1 0 1 1 -1.41 -1.42l3.9 -3.89a0.25 0.25 0 0 0 0 -0.36l-3.9 -3.9a1 1 0 0 1 1.41 -1.41l3.9 3.9a0.25 0.25 0 0 0 0.36 0l3.9 -3.9a1 1 0 0 1 1.41 1.41l-3.9 3.9a0.25 0.25 0 0 0 0 0.36Z\" fill=\"currentColor\" stroke-width=\"1\"></path>\n</svg>" });
115
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceDropzoneDeleteIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
116
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: NiceDropzoneDeleteIcon, isStandalone: true, selector: "nice-dropzone-delete-icon", ngImport: i0, template: "<svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm5.49 16.07a1 1 0 0 1 -1.41 1.42l-3.9 -3.9a0.25 0.25 0 0 0 -0.36 0l-3.9 3.9a1 1 0 1 1 -1.41 -1.42l3.9 -3.89a0.25 0.25 0 0 0 0 -0.36l-3.9 -3.9a1 1 0 0 1 1.41 -1.41l3.9 3.9a0.25 0.25 0 0 0 0.36 0l3.9 -3.9a1 1 0 0 1 1.41 1.41l-3.9 3.9a0.25 0.25 0 0 0 0 0.36Z\" fill=\"currentColor\" stroke-width=\"1\"></path>\n</svg>" });
117
117
  }
118
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceDropzoneDeleteIcon, decorators: [{
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceDropzoneDeleteIcon, decorators: [{
119
119
  type: Component,
120
120
  args: [{ selector: "nice-dropzone-delete-icon", template: "<svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm5.49 16.07a1 1 0 0 1 -1.41 1.42l-3.9 -3.9a0.25 0.25 0 0 0 -0.36 0l-3.9 3.9a1 1 0 1 1 -1.41 -1.42l3.9 -3.89a0.25 0.25 0 0 0 0 -0.36l-3.9 -3.9a1 1 0 0 1 1.41 -1.41l3.9 3.9a0.25 0.25 0 0 0 0.36 0l3.9 -3.9a1 1 0 0 1 1.41 1.41l-3.9 3.9a0.25 0.25 0 0 0 0 0.36Z\" fill=\"currentColor\" stroke-width=\"1\"></path>\n</svg>" }]
121
121
  }] });
122
122
 
123
123
  class NiceDropzoneFilePreview {
124
- file = input.required();
125
- mode = input.required();
124
+ file = input.required(...(ngDevMode ? [{ debugName: "file" }] : []));
125
+ mode = input.required(...(ngDevMode ? [{ debugName: "mode" }] : []));
126
126
  clickDelete = output();
127
- isImage = computed(() => this.mode() === "image");
127
+ isImage = computed(() => this.mode() === "image", ...(ngDevMode ? [{ debugName: "isImage" }] : []));
128
128
  imageDimensions = computed(() => {
129
129
  const file = this.file();
130
130
  if (isLocalFile(file)) {
131
131
  return file.dimensions ?? null;
132
132
  }
133
133
  return null;
134
- });
134
+ }, ...(ngDevMode ? [{ debugName: "imageDimensions" }] : []));
135
135
  imageUrl = computed(() => {
136
136
  const file = this.file();
137
137
  if (isLocalFile(file)) {
138
138
  return URL.createObjectURL(file.file);
139
139
  }
140
140
  return file.url;
141
- });
141
+ }, ...(ngDevMode ? [{ debugName: "imageUrl" }] : []));
142
142
  _translationKeys = inject(NICE_DROPZONE_TRANSLATION_KEYS);
143
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceDropzoneFilePreview, deps: [], target: i0.ɵɵFactoryTarget.Component });
144
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: NiceDropzoneFilePreview, isStandalone: true, selector: "nice-dropzone-file-preview", inputs: { file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { clickDelete: "clickDelete" }, host: { styleAttribute: "flex: 1 1 auto;" }, ngImport: i0, template: "<div class=\"nice-dropzone-preview\">\n @if (isImage()) {\n <img class=\"nice-dropzone-preview-image\" alt=\"\" draggable=\"false\" [src]=\"imageUrl()\" />\n } @else {\n <div class=\"nice-dropzone-preview-file\">\n <nice-dropzone-file-icon />\n </div>\n }\n\n <div class=\"nice-dropzone-preview-file-info\">\n <span class=\"mat-body-medium\">{{ file().name }}</span>\n\n @if (imageDimensions(); as dimension) {\n <span class=\"mat-label-medium\">\n {{ `${dimension.width}x${dimension.height}` }} {{ _translationKeys.ratio.pixels | niceTranslate }}\n </span>\n }\n\n @if (file().size; as size) {\n <span class=\"mat-label-medium\">{{ size | niceFileSize }}</span>\n }\n </div>\n\n <div class=\"nice-dropzone-preview-actions\">\n <button class=\"nice-dropzone-preview-actions-delete\" (click)=\"$event.stopPropagation(); clickDelete.emit()\">\n <nice-dropzone-delete-icon />\n </button>\n </div>\n</div>\n", styles: [".nice-dropzone-preview{position:relative;display:flex;align-items:center;justify-content:center;flex:1 1 auto;gap:32px;height:100px;padding-top:12px;padding-bottom:12px;border-style:solid;border-radius:var(--nice-dropzone-shape, 8px);border-width:var(--nice-dropzone-border-width, 1px);border-color:var(--nice-dropzone-border-color, var(--mat-sys-primary))}.nice-dropzone-preview .nice-dropzone-preview-image{max-height:100%;max-width:min(200px,50%);-webkit-user-select:none;user-select:none}.nice-dropzone-preview .nice-dropzone-preview-file{color:var(--mat-sys-primary)}.nice-dropzone-preview .nice-dropzone-preview-file-info{display:flex;flex-direction:column;gap:4px;max-width:min(400px,40%);-webkit-user-select:none;user-select:none}.nice-dropzone-preview .nice-dropzone-preview-actions{position:absolute;width:24px;height:24px;background-color:var(--mat-sys-on-primary);border-radius:50%;top:-12px;right:-12px;opacity:0;transition:opacity .1s ease-in-out}.nice-dropzone-preview .nice-dropzone-preview-actions .nice-dropzone-preview-actions-delete{background-color:transparent;color:var(--mat-sys-primary);border:none;cursor:pointer;padding:0}.nice-dropzone-preview:hover .nice-dropzone-preview-actions,.nice-dropzone-preview:focus .nice-dropzone-preview-actions{opacity:1}\n"], dependencies: [{ kind: "component", type: NiceDropzoneDeleteIcon, selector: "nice-dropzone-delete-icon" }, { kind: "pipe", type: NiceTranslatePipe, name: "niceTranslate" }, { kind: "pipe", type: FileSizePipe, name: "niceFileSize" }, { kind: "component", type: NiceDropzoneFileIcon, selector: "nice-dropzone-file-icon" }] });
143
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceDropzoneFilePreview, deps: [], target: i0.ɵɵFactoryTarget.Component });
144
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: NiceDropzoneFilePreview, isStandalone: true, selector: "nice-dropzone-file-preview", inputs: { file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { clickDelete: "clickDelete" }, host: { styleAttribute: "flex: 1 1 auto;" }, ngImport: i0, template: "<div class=\"nice-dropzone-preview\">\n @if (isImage()) {\n <img class=\"nice-dropzone-preview-image\" alt=\"\" draggable=\"false\" [src]=\"imageUrl()\" />\n } @else {\n <div class=\"nice-dropzone-preview-file\">\n <nice-dropzone-file-icon />\n </div>\n }\n\n <div class=\"nice-dropzone-preview-file-info\">\n <span class=\"mat-body-medium\">{{ file().name }}</span>\n\n @if (imageDimensions(); as dimension) {\n <span class=\"mat-label-medium\">\n {{ `${dimension.width}x${dimension.height}` }} {{ _translationKeys.ratio.pixels | niceTranslate }}\n </span>\n }\n\n @if (file().size; as size) {\n <span class=\"mat-label-medium\">{{ size | niceFileSize }}</span>\n }\n </div>\n\n <div class=\"nice-dropzone-preview-actions\">\n <button class=\"nice-dropzone-preview-actions-delete\" (click)=\"$event.stopPropagation(); clickDelete.emit()\">\n <nice-dropzone-delete-icon />\n </button>\n </div>\n</div>\n", styles: [".nice-dropzone-preview{position:relative;display:flex;align-items:center;justify-content:center;flex:1 1 auto;gap:32px;height:100px;padding-top:12px;padding-bottom:12px;border-style:solid;border-radius:var(--nice-dropzone-shape, 8px);border-width:var(--nice-dropzone-border-width, 1px);border-color:var(--nice-dropzone-border-color, var(--mat-sys-primary))}.nice-dropzone-preview .nice-dropzone-preview-image{max-height:100%;max-width:min(200px,50%);-webkit-user-select:none;user-select:none}.nice-dropzone-preview .nice-dropzone-preview-file{color:var(--mat-sys-primary)}.nice-dropzone-preview .nice-dropzone-preview-file-info{display:flex;flex-direction:column;gap:4px;max-width:min(400px,40%);-webkit-user-select:none;user-select:none}.nice-dropzone-preview .nice-dropzone-preview-actions{position:absolute;width:24px;height:24px;background-color:var(--mat-sys-on-primary);border-radius:50%;top:-12px;right:-12px;opacity:0;transition:opacity .1s ease-in-out}.nice-dropzone-preview .nice-dropzone-preview-actions .nice-dropzone-preview-actions-delete{background-color:transparent;color:var(--mat-sys-primary);border:none;cursor:pointer;padding:0}.nice-dropzone-preview:hover .nice-dropzone-preview-actions,.nice-dropzone-preview:focus .nice-dropzone-preview-actions{opacity:1}\n"], dependencies: [{ kind: "component", type: NiceDropzoneDeleteIcon, selector: "nice-dropzone-delete-icon" }, { kind: "component", type: NiceDropzoneFileIcon, selector: "nice-dropzone-file-icon" }, { kind: "pipe", type: NiceTranslatePipe, name: "niceTranslate" }, { kind: "pipe", type: FileSizePipe, name: "niceFileSize" }] });
145
145
  }
146
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceDropzoneFilePreview, decorators: [{
146
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceDropzoneFilePreview, decorators: [{
147
147
  type: Component,
148
148
  args: [{ selector: "nice-dropzone-file-preview", imports: [NiceDropzoneDeleteIcon, NiceTranslatePipe, FileSizePipe, NiceDropzoneFileIcon], host: {
149
149
  style: "flex: 1 1 auto;"
@@ -152,21 +152,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
152
152
 
153
153
  const niceDropzoneModes = ["image", "file", "all"];
154
154
  class NiceDropzone {
155
- mode = input("all");
156
- multiple = input(false, { transform: coerceBooleanProperty });
157
- disabled = input(false, { transform: coerceBooleanProperty });
158
- accept = input();
159
- config = input();
160
- maxFileSize = input();
161
- _elementRef = viewChild("element", { read: ElementRef });
162
- _inputRef = viewChild("fileInput");
155
+ mode = input("all", ...(ngDevMode ? [{ debugName: "mode" }] : []));
156
+ multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple", transform: coerceBooleanProperty }] : [{ transform: coerceBooleanProperty }]));
157
+ disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: coerceBooleanProperty }] : [{ transform: coerceBooleanProperty }]));
158
+ accept = input(...(ngDevMode ? [undefined, { debugName: "accept" }] : []));
159
+ config = input(...(ngDevMode ? [undefined, { debugName: "config" }] : []));
160
+ maxFileSize = input(...(ngDevMode ? [undefined, { debugName: "maxFileSize" }] : []));
161
+ _elementRef = viewChild("element", ...(ngDevMode ? [{ debugName: "_elementRef", read: ElementRef }] : [{ read: ElementRef }]));
162
+ _inputRef = viewChild("fileInput", ...(ngDevMode ? [{ debugName: "_inputRef" }] : []));
163
163
  /**
164
164
  * Handles the lazy creation of the MatButton ripple.
165
165
  * Used to improve the initial load time of large applications.
166
166
  */
167
167
  _rippleLoader = inject(MatRippleLoader);
168
168
  _translationKeys = inject(NICE_DROPZONE_TRANSLATION_KEYS);
169
- files = signal([]);
169
+ files = signal([], ...(ngDevMode ? [{ debugName: "files" }] : []));
170
170
  _disabled = false;
171
171
  _onChange;
172
172
  _value = null;
@@ -283,8 +283,8 @@ class NiceDropzone {
283
283
  }
284
284
  input.nativeElement.value = "";
285
285
  }
286
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceDropzone, deps: [], target: i0.ɵɵFactoryTarget.Component });
287
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: NiceDropzone, isStandalone: true, selector: "nice-dropzone", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
286
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceDropzone, deps: [], target: i0.ɵɵFactoryTarget.Component });
287
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: NiceDropzone, isStandalone: true, selector: "nice-dropzone", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
288
288
  {
289
289
  provide: NG_VALUE_ACCESSOR,
290
290
  useExisting: forwardRef(() => NiceDropzone),
@@ -292,7 +292,7 @@ class NiceDropzone {
292
292
  }
293
293
  ], viewQueries: [{ propertyName: "_elementRef", first: true, predicate: ["element"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "_inputRef", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"nice-dropzone-container\"\n>\n <div\n #element\n role=\"none\"\n class=\"nice-dropzone\"\n [class.nice-dropzone-disabled]=\"_disabled\"\n [class.nice-dropzone-multiple]=\"multiple()\"\n [class.nice-dropzone-single]=\"!multiple()\"\n [class.nice-dropzone-image]=\"mode() === 'image'\"\n [class.nice-dropzone-file]=\"mode() === 'file'\"\n [class.nice-dropzone-all]=\"mode() === 'all'\"\n [class.nice-dropzone-selected]=\"files().length > 0\"\n\n niceDropzone\n (filesDropped)=\"onFilesDropped($event)\"\n (click)=\"fileInput.click()\"\n (keyup.enter)=\"fileInput.click()\"\n >\n <div class=\"nice-dropzone-ripple\"></div>\n\n @if (multiple() || (!multiple() && !files().length)) {\n <div class=\"nice-dropzone-placeholder\">\n <div class=\"nice-dropzone-icon\">\n @if (mode() === \"image\") {\n <nice-dropzone-image-icon />\n } @else {\n <nice-dropzone-file-icon />\n }\n </div>\n\n <div class=\"nice-dropzone-content\">\n <span class=\"nice-dropzone-content-title\">\n @if (mode() === \"image\") {\n @if (multiple()) {\n {{ _translationKeys.upload.images | niceTranslate }}\n } @else {\n {{ _translationKeys.upload.image | niceTranslate }}\n }\n } @else {\n @if (multiple()) {\n {{ _translationKeys.upload.files | niceTranslate }}\n } @else {\n {{ _translationKeys.upload.file | niceTranslate }}\n }\n }\n </span>\n\n <div class=\"nice-dropzone-content-description\">\n @if (accept()?.length) {\n <span>\n {{ _translationKeys.format.label | niceTranslate }}:&nbsp;\n\n <span>\n {{ accept()?.join(\", \") }}\n </span>\n </span>\n }\n\n @if (mode() === \"image\" && config()?.recommendedSize; as recommendedSize) {\n <span>\n {{ _translationKeys.ratio.label | niceTranslate }}:&nbsp;\n\n <span>{{ recommendedSize.width }}x{{ recommendedSize.height }} {{ _translationKeys.ratio.pixels | niceTranslate }}</span>\n </span>\n }\n\n @if (maxFileSize(); as maxFileSize) {\n <span>\n {{ _translationKeys.size.label | niceTranslate }}:&nbsp;\n\n <span>{{ maxFileSize.size }} {{ _translationKeys.size.units[maxFileSize.unit] | niceTranslate }}</span>\n </span>\n }\n </div>\n </div>\n </div>\n } @else {\n <nice-dropzone-file-preview [file]=\"files()[0]\" [mode]=\"mode()\" (clickDelete)=\"onFileDelete(0)\" />\n }\n </div>\n\n @if (multiple()) {\n <div class=\"nice-dropzone-multiple-files-preview\">\n @for (file of files(); track file) {\n <nice-dropzone-file-preview [file]=\"file\" [mode]=\"mode()\" (clickDelete)=\"onFileDelete($index)\" />\n }\n </div>\n }\n</div>\n\n<input #fileInput style=\"display: none;\" type=\"file\" [accept]=\"accept()\" [multiple]=\"multiple()\" (change)=\"onFileChanged($event)\" />\n", styles: [".nice-dropzone-container{--nice-dropzone-ripple-color: color-mix(in srgb, var(--mat-sys-primary) 10%, transparent);--mat-ripple-color: var(--nice-dropzone-ripple-color)}.nice-dropzone-container .nice-dropzone{position:relative;display:flex;justify-content:center;place-items:center;cursor:pointer;min-height:124px;border-radius:var(--nice-dropzone-shape, 8px)}.nice-dropzone-container .nice-dropzone.nice-dropzone-single:not(.nice-dropzone-selected),.nice-dropzone-container .nice-dropzone.nice-dropzone-multiple{border-style:dashed;border-width:var(--nice-dropzone-border-width, 1px);border-color:var(--nice-dropzone-border-color, var(--mat-sys-primary))}.nice-dropzone-container .nice-dropzone .nice-dropzone-placeholder{display:flex;justify-content:center;place-items:center;gap:32px}.nice-dropzone-container .nice-dropzone .nice-dropzone-icon{color:var(--nice-dropzone-icon-color, var(--mat-sys-primary))}.nice-dropzone-container .nice-dropzone .nice-dropzone-content{-webkit-user-select:none;user-select:none;color:var(--nice-dropzone-text-color, var(--mat-sys-primary))}.nice-dropzone-container .nice-dropzone .nice-dropzone-content .nice-dropzone-content-title{font-size:var(--nice-dropzone-content-title-font-size, 18px);font-weight:var(--nice-dropzone-content-title-font-weight, 600);line-height:var(--nice-dropzone-content-title-line-height, 22px)}.nice-dropzone-container .nice-dropzone .nice-dropzone-content .nice-dropzone-content-description{padding-top:4px;display:flex;flex-direction:column;gap:4px;font-size:var(--nice-dropzone-content-description-font-size, 14px);font-weight:var(--nice-dropzone-content-description-font-weight, 400);line-height:var(--nice-dropzone-content-description-line-height, 16px)}.nice-dropzone-container .nice-dropzone .nice-dropzone-ripple,.nice-dropzone-container .nice-dropzone .nice-dropzone-ripple:before{inset:0;position:absolute;pointer-events:none;border-radius:inherit}.nice-dropzone-container .nice-dropzone .nice-dropzone-ripple{overflow:hidden}.nice-dropzone-container .nice-dropzone .mat-ripple-element{background-color:var(--nice-dropzone-ripple-color)}.nice-dropzone-container .nice-dropzone:hover{background-color:var(--nice-dropzone-hover-color, color-mix(in srgb, var(--mat-sys-primary) 20%, transparent))}.nice-dropzone-container .nice-dropzone.nice-dropzone-disabled{cursor:default;pointer-events:none;opacity:.5}.nice-dropzone-container .nice-dropzone-multiple-files-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding-top:16px}\n"], dependencies: [{ kind: "directive", type: NiceDropzoneDirective, selector: "[niceDropzone]", outputs: ["filesDropped", "files"] }, { kind: "component", type: NiceDropzoneImageIcon, selector: "nice-dropzone-image-icon" }, { kind: "component", type: NiceDropzoneFileIcon, selector: "nice-dropzone-file-icon" }, { kind: "component", type: NiceDropzoneFilePreview, selector: "nice-dropzone-file-preview", inputs: ["file", "mode"], outputs: ["clickDelete"] }, { kind: "pipe", type: NiceTranslatePipe, name: "niceTranslate" }], encapsulation: i0.ViewEncapsulation.None });
294
294
  }
295
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceDropzone, decorators: [{
295
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NiceDropzone, decorators: [{
296
296
  type: Component,
297
297
  args: [{ selector: "nice-dropzone", imports: [
298
298
  NiceDropzoneDirective,