@recursyve/ngx-material-components 22.0.0 → 22.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/_sass/_override-utils.scss +31 -0
- package/colorpicker/_index.scss +1 -0
- package/colorpicker/_theme.scss +19 -0
- package/fesm2022/recursyve-ngx-material-components-chip-list.mjs +2 -2
- package/fesm2022/recursyve-ngx-material-components-chip-list.mjs.map +1 -1
- package/fesm2022/recursyve-ngx-material-components-colorpicker.mjs +237 -0
- package/fesm2022/recursyve-ngx-material-components-colorpicker.mjs.map +1 -0
- package/fesm2022/recursyve-ngx-material-components-dropzone.mjs +23 -7
- package/fesm2022/recursyve-ngx-material-components-dropzone.mjs.map +1 -1
- package/fesm2022/recursyve-ngx-material-components-form-field-error.mjs +174 -33
- package/fesm2022/recursyve-ngx-material-components-form-field-error.mjs.map +1 -1
- package/fesm2022/recursyve-ngx-material-components-timepicker.mjs +550 -0
- package/fesm2022/recursyve-ngx-material-components-timepicker.mjs.map +1 -0
- package/fesm2022/recursyve-ngx-material-components-typeahead.mjs +24 -12
- package/fesm2022/recursyve-ngx-material-components-typeahead.mjs.map +1 -1
- package/package.json +16 -4
- package/timepicker/_index.scss +1 -0
- package/timepicker/_theme.scss +41 -0
- package/types/recursyve-ngx-material-components-colorpicker.d.ts +77 -0
- package/types/recursyve-ngx-material-components-dropzone.d.ts +8 -1
- package/types/recursyve-ngx-material-components-form-field-error.d.ts +25 -3
- package/types/recursyve-ngx-material-components-timepicker.d.ts +99 -0
- package/types/recursyve-ngx-material-components-typeahead.d.ts +3 -0
|
@@ -38,6 +38,10 @@ type NiceDropzoneTranslationKeyConfig = {
|
|
|
38
38
|
files: string;
|
|
39
39
|
image: string;
|
|
40
40
|
images: string;
|
|
41
|
+
uploadingFile: string;
|
|
42
|
+
uploadingFiles: string;
|
|
43
|
+
uploadingImage: string;
|
|
44
|
+
uploadingImages: string;
|
|
41
45
|
};
|
|
42
46
|
format: {
|
|
43
47
|
label: string;
|
|
@@ -87,6 +91,7 @@ declare class NiceDropzone implements OnDestroy, ControlValueAccessor {
|
|
|
87
91
|
readonly accept: _angular_core.InputSignal<string[] | undefined>;
|
|
88
92
|
readonly config: _angular_core.InputSignal<NiceDropzoneImageConfig | undefined>;
|
|
89
93
|
readonly maxFileSize: _angular_core.InputSignal<NiceDropzoneFileSizeConfig | undefined>;
|
|
94
|
+
readonly uploadProgress: _angular_core.InputSignal<number | null>;
|
|
90
95
|
protected readonly _elementRef: _angular_core.Signal<ElementRef<any> | undefined>;
|
|
91
96
|
protected readonly _inputRef: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
92
97
|
/**
|
|
@@ -96,6 +101,8 @@ declare class NiceDropzone implements OnDestroy, ControlValueAccessor {
|
|
|
96
101
|
protected readonly _rippleLoader: MatRippleLoader;
|
|
97
102
|
protected readonly _translationKeys: NiceDropzoneTranslationKeyConfig;
|
|
98
103
|
protected readonly files: _angular_core.WritableSignal<NiceSelectedFiles[]>;
|
|
104
|
+
protected readonly isUploading: _angular_core.Signal<boolean>;
|
|
105
|
+
protected readonly normalizedUploadProgress: _angular_core.Signal<number>;
|
|
99
106
|
protected _disabled: boolean;
|
|
100
107
|
private _onChange;
|
|
101
108
|
private _value;
|
|
@@ -112,7 +119,7 @@ declare class NiceDropzone implements OnDestroy, ControlValueAccessor {
|
|
|
112
119
|
protected getImageDimension(file: File): Promise<NiceFileDimensions>;
|
|
113
120
|
protected resetInput(): void;
|
|
114
121
|
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>;
|
|
122
|
+
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; }; "uploadProgress": { "alias": "uploadProgress"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
116
123
|
}
|
|
117
124
|
|
|
118
125
|
type NiceDropzoneOptions = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ValidationErrors } from '@angular/forms';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { AfterViewInit, FactoryProvider, Provider } from '@angular/core';
|
|
4
|
+
import { Field } from '@angular/forms/signals';
|
|
4
5
|
import { NiceTranslater } from '@recursyve/ngx-material-components/common';
|
|
5
6
|
|
|
6
7
|
type TransformedError = {
|
|
@@ -23,15 +24,35 @@ declare class NiceFormFieldErrorDirective implements AfterViewInit {
|
|
|
23
24
|
private readonly formField;
|
|
24
25
|
private readonly transformers;
|
|
25
26
|
private readonly translater;
|
|
26
|
-
private
|
|
27
|
+
private readonly display;
|
|
27
28
|
private control;
|
|
28
29
|
onChange: () => void;
|
|
29
30
|
ngAfterViewInit(): void;
|
|
30
|
-
setError(text: string, params: Record<string, string>): void;
|
|
31
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFormFieldErrorDirective, never>;
|
|
32
32
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NiceFormFieldErrorDirective, "[niceFormFieldError]", never, {}, {}, never, never, true, never>;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
declare class NiceSignalFormFieldErrorDirective {
|
|
36
|
+
private readonly elementRef;
|
|
37
|
+
private readonly formField;
|
|
38
|
+
private readonly transformers;
|
|
39
|
+
private readonly translater;
|
|
40
|
+
private readonly viewContainerRef;
|
|
41
|
+
/**
|
|
42
|
+
* The signal form field to watch. When omitted, the directive resolves the `[formField]`
|
|
43
|
+
* binding from a descendant control inside the `mat-form-field`.
|
|
44
|
+
*/
|
|
45
|
+
readonly field: i0.InputSignal<Field<unknown> | undefined>;
|
|
46
|
+
private readonly formFieldDirective;
|
|
47
|
+
private readonly display;
|
|
48
|
+
private readonly signalTransformers;
|
|
49
|
+
constructor();
|
|
50
|
+
private resolveFieldState;
|
|
51
|
+
private resolveErrors;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceSignalFormFieldErrorDirective, never>;
|
|
53
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NiceSignalFormFieldErrorDirective, "[niceSignalFormFieldError]", never, { "field": { "alias": "field"; "required": false; "isSignal": true; }; }, {}, ["formFieldDirective"], never, true, never>;
|
|
54
|
+
}
|
|
55
|
+
|
|
35
56
|
declare class NiceFormErrorComponent {
|
|
36
57
|
message: string;
|
|
37
58
|
increment: number;
|
|
@@ -45,9 +66,10 @@ type NiceFormFieldErrorsOptions = {
|
|
|
45
66
|
useFactory: (...args: any[]) => NiceTranslater;
|
|
46
67
|
};
|
|
47
68
|
errorTransformers?: ErrorTransformers;
|
|
69
|
+
signalErrorTransformers?: ErrorTransformers;
|
|
48
70
|
};
|
|
49
71
|
|
|
50
72
|
declare function provideFormFieldError(options: NiceFormFieldErrorsOptions): Provider[];
|
|
51
73
|
|
|
52
|
-
export { DefaultErrorTransformers, LengthErrorTransformer, MaskErrorTransformer, MaxErrorTransformer, MinErrorTransformer, NiceFormErrorComponent, NiceFormFieldErrorDirective, PatternErrorTransformer, provideFormFieldError };
|
|
74
|
+
export { DefaultErrorTransformers, LengthErrorTransformer, MaskErrorTransformer, MaxErrorTransformer, MinErrorTransformer, NiceFormErrorComponent, NiceFormFieldErrorDirective, NiceSignalFormFieldErrorDirective, PatternErrorTransformer, provideFormFieldError };
|
|
53
75
|
export type { ErrorTransformer, ErrorTransformers, TransformedError };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Provider } from '@angular/core';
|
|
3
|
+
import { FieldTree, SchemaPath, FieldState } from '@angular/forms/signals';
|
|
4
|
+
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
5
|
+
import { Subject } from 'rxjs';
|
|
6
|
+
import * as _recursyve_ngx_material_components_timepicker from '@recursyve/ngx-material-components/timepicker';
|
|
7
|
+
|
|
8
|
+
type NiceTimepickerTranslationKeyConfig = {
|
|
9
|
+
cancel: string;
|
|
10
|
+
confirm: string;
|
|
11
|
+
title: string;
|
|
12
|
+
};
|
|
13
|
+
type NiceTimepickerConfig = {
|
|
14
|
+
dottedMinutesInGap?: boolean;
|
|
15
|
+
minutesGap?: number;
|
|
16
|
+
toggleIcon?: string;
|
|
17
|
+
/** Translation key for invalid free-text time values. */
|
|
18
|
+
invalidFormatKey?: string;
|
|
19
|
+
translationKeys: NiceTimepickerTranslationKeyConfig;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
type NiceTimepickerOptions = {
|
|
23
|
+
config?: Partial<NiceTimepickerConfig>;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
declare const defaultConfig: NiceTimepickerConfig;
|
|
27
|
+
|
|
28
|
+
declare function provideTimepicker(options?: NiceTimepickerOptions): Provider[];
|
|
29
|
+
|
|
30
|
+
declare class NiceTimepicker implements MatFormFieldControl<string> {
|
|
31
|
+
private static nextId;
|
|
32
|
+
readonly field: _angular_core.InputSignal<FieldTree<string>>;
|
|
33
|
+
readonly id: string;
|
|
34
|
+
readonly controlType = "nice-timepicker";
|
|
35
|
+
readonly stateChanges: Subject<void>;
|
|
36
|
+
readonly ngControl: null;
|
|
37
|
+
readonly placeholder = "";
|
|
38
|
+
readonly required = false;
|
|
39
|
+
private readonly textInput;
|
|
40
|
+
protected readonly isInputFocused: _angular_core.WritableSignal<boolean>;
|
|
41
|
+
get value(): string | null;
|
|
42
|
+
get focused(): boolean;
|
|
43
|
+
get empty(): boolean;
|
|
44
|
+
get shouldLabelFloat(): boolean;
|
|
45
|
+
get disabled(): boolean;
|
|
46
|
+
get errorState(): boolean;
|
|
47
|
+
constructor();
|
|
48
|
+
setDescribedByIds(ids: string[]): void;
|
|
49
|
+
onContainerClick(): void;
|
|
50
|
+
protected onInputBlur(): void;
|
|
51
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NiceTimepicker, never>;
|
|
52
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NiceTimepicker, "nice-timepicker", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare class NiceTimepickerToggle {
|
|
56
|
+
private readonly config;
|
|
57
|
+
private readonly dialog;
|
|
58
|
+
private readonly destroyRef;
|
|
59
|
+
readonly field: _angular_core.InputSignal<FieldTree<string>>;
|
|
60
|
+
protected readonly toggleIcon: string | undefined;
|
|
61
|
+
protected readonly translationKeys: _recursyve_ngx_material_components_timepicker.NiceTimepickerTranslationKeyConfig;
|
|
62
|
+
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
63
|
+
protected openPicker(event: MouseEvent): void;
|
|
64
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NiceTimepickerToggle, never>;
|
|
65
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NiceTimepickerToggle, "nice-timepicker-toggle", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare const NICE_TIME_PARSE_ERROR_KIND = "parse";
|
|
69
|
+
declare function isValidNiceTime(value: string | null | undefined): boolean;
|
|
70
|
+
declare function normalizeNiceTime(value: string): string | null;
|
|
71
|
+
declare function niceTimeFormat(path: FieldTree<string> | SchemaPath<string>, message: string): void;
|
|
72
|
+
declare function registerNiceTimeFormatValidation(field: FieldTree<string>, message: string): void;
|
|
73
|
+
|
|
74
|
+
declare function hasNiceTimeFormatError(value: string | null | undefined): boolean;
|
|
75
|
+
declare function niceTimeFieldErrorState(state: FieldState<string>): boolean;
|
|
76
|
+
|
|
77
|
+
type TimePeriod = "AM" | "PM";
|
|
78
|
+
type ParsedTime = {
|
|
79
|
+
hour: number;
|
|
80
|
+
minute: number;
|
|
81
|
+
period: TimePeriod;
|
|
82
|
+
};
|
|
83
|
+
type ClockFaceOption = {
|
|
84
|
+
angle: number;
|
|
85
|
+
value: number;
|
|
86
|
+
};
|
|
87
|
+
declare const DEFAULT_MINUTES_GAP = 1;
|
|
88
|
+
declare const DEFAULT_MINUTE_LABEL_GAP = 5;
|
|
89
|
+
declare function parseTime(value: string | null | undefined): ParsedTime | null;
|
|
90
|
+
declare function formatTime(time: ParsedTime): string;
|
|
91
|
+
declare function getDefaultTime(): ParsedTime;
|
|
92
|
+
declare function resolveTime(value: string | null | undefined): ParsedTime;
|
|
93
|
+
declare function getHourFaceOptions(): ClockFaceOption[];
|
|
94
|
+
declare function getMinuteFaceOptions(minutesGap?: number): ClockFaceOption[];
|
|
95
|
+
declare function isMinuteLabelVisible(minute: number, minutesGap?: number): boolean;
|
|
96
|
+
declare function getMinuteLabelGap(minutesGap: number, dottedMinutesInGap: boolean): number;
|
|
97
|
+
|
|
98
|
+
export { DEFAULT_MINUTES_GAP, DEFAULT_MINUTE_LABEL_GAP, NICE_TIME_PARSE_ERROR_KIND, NiceTimepicker, NiceTimepickerToggle, defaultConfig as defaultTimepickerConfig, formatTime, getDefaultTime, getHourFaceOptions, getMinuteFaceOptions, getMinuteLabelGap, hasNiceTimeFormatError, isMinuteLabelVisible, isValidNiceTime, niceTimeFieldErrorState, niceTimeFormat, normalizeNiceTime, parseTime, provideTimepicker, registerNiceTimeFormatValidation, resolveTime };
|
|
99
|
+
export type { ClockFaceOption, NiceTimepickerConfig, NiceTimepickerOptions, NiceTimepickerTranslationKeyConfig, ParsedTime, TimePeriod };
|
|
@@ -112,6 +112,8 @@ declare class NiceTypeaheadBase<T> implements MatFormFieldControl<T>, ControlVal
|
|
|
112
112
|
readonly optionSelectionChanges: Observable<MatOptionSelectionChange>;
|
|
113
113
|
readonly ngControl: NgControl | null;
|
|
114
114
|
readonly _panelDoneAnimatingStream: Subject<string>;
|
|
115
|
+
/** Tab index of the typeahead trigger, aligned with `MatSelect`. */
|
|
116
|
+
tabIndex: number;
|
|
115
117
|
_keyManager: ActiveDescendantKeyManager<MatOption>;
|
|
116
118
|
_preferredOverlayOrigin?: CdkOverlayOrigin | ElementRef;
|
|
117
119
|
_overlayWidth: string | number;
|
|
@@ -155,6 +157,7 @@ declare class NiceTypeaheadBase<T> implements MatFormFieldControl<T>, ControlVal
|
|
|
155
157
|
_handleScrollEnd(): void;
|
|
156
158
|
protected _canOpen(): boolean;
|
|
157
159
|
protected _onAttached(): void;
|
|
160
|
+
protected _focusSearchInput(): void;
|
|
158
161
|
protected _initKeyManager(): void;
|
|
159
162
|
protected _getOverlayWidth(preferredOrigin?: ElementRef<ElementRef> | CdkOverlayOrigin): string | number;
|
|
160
163
|
protected _skipPredicate: (option: MatOption) => boolean;
|