@ngrdt/gov 0.0.83 → 0.0.85
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/fesm2022/ngrdt-gov.mjs +271 -148
- package/fesm2022/ngrdt-gov.mjs.map +1 -1
- package/index.d.ts +81 -27
- package/package.json +7 -7
package/index.d.ts
CHANGED
|
@@ -9,11 +9,13 @@ import * as _ngrdt_icon from '@ngrdt/icon';
|
|
|
9
9
|
import { RdtIcon, RdtIconComponent } from '@ngrdt/icon';
|
|
10
10
|
import * as _angular_core from '@angular/core';
|
|
11
11
|
import { Injector, ElementRef, Type, WritableSignal, InjectionToken, OnDestroy } from '@angular/core';
|
|
12
|
+
import { MatDatepickerIntl, MatDatepickerInputEvent } from '@angular/material/datepicker';
|
|
12
13
|
import { RdtBooleanResult } from '@ngrdt/core';
|
|
13
14
|
import { Nullable } from '@ngrdt/utils';
|
|
14
|
-
import
|
|
15
|
-
import { GovFormInputCustomEvent, FormInputEvent, Nullable as Nullable$1 } from '@gov-design-system-ce/components';
|
|
15
|
+
import * as date_fns from 'date-fns';
|
|
16
16
|
import { Observable } from 'rxjs';
|
|
17
|
+
import { Nullable as Nullable$1 } from '@gov-design-system-ce/components';
|
|
18
|
+
import { GovFormInput } from '@gov-design-system-ce/angular';
|
|
17
19
|
|
|
18
20
|
type GovSize = 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
19
21
|
type GovColor = 'primary' | 'secondary' | 'neutral' | 'success' | 'warning' | 'error';
|
|
@@ -41,6 +43,7 @@ declare class RdtGovButtonComponent extends RdtButtonBase<RdtIcon> {
|
|
|
41
43
|
readonly expanded: _angular_core.WritableSignal<boolean>;
|
|
42
44
|
readonly iconStart: _angular_core.WritableSignal<Nullable<RdtIcon>>;
|
|
43
45
|
private readonly govButton;
|
|
46
|
+
get hostWidth(): string | null;
|
|
44
47
|
private readonly buttonEffect;
|
|
45
48
|
constructor();
|
|
46
49
|
focus(): void;
|
|
@@ -61,6 +64,15 @@ declare class RdtGovCheckboxComponent extends RdtCheckboxComponent {
|
|
|
61
64
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RdtGovCheckboxComponent, "rdt-gov-checkbox", never, { "labelPositionInput": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "sizeInput": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
62
65
|
}
|
|
63
66
|
|
|
67
|
+
declare class RdtDatepickerIntl extends MatDatepickerIntl {
|
|
68
|
+
private readonly translateService;
|
|
69
|
+
constructor();
|
|
70
|
+
private readonly setLabelsEffect;
|
|
71
|
+
private setLabels;
|
|
72
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdtDatepickerIntl, never>;
|
|
73
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<RdtDatepickerIntl>;
|
|
74
|
+
}
|
|
75
|
+
|
|
64
76
|
declare class RdtGovIconComponent extends RdtIconComponent<string> {
|
|
65
77
|
parsedName: _angular_core.Signal<{
|
|
66
78
|
type: string;
|
|
@@ -83,15 +95,18 @@ declare class RdtGovSpinnerComponent extends RdtSpinnerComponent {
|
|
|
83
95
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RdtGovSpinnerComponent, "rdt-gov-spinner", never, { "messageInput": { "alias": "message"; "required": false; "isSignal": true; }; "sizeInput": { "alias": "size"; "required": false; "isSignal": true; }; "modeInput": { "alias": "mode"; "required": false; "isSignal": true; }; "messagePositionInput": { "alias": "messagePosition"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
84
96
|
}
|
|
85
97
|
|
|
86
|
-
declare function provideNgrdtGov(options?: {}): (_angular_core.EnvironmentProviders | {
|
|
98
|
+
declare function provideNgrdtGov(options?: {}): (_angular_core.EnvironmentProviders | _angular_core.Provider[] | {
|
|
87
99
|
provide: _angular_core.InjectionToken<_angular_core.Type<_ngrdt_icon.RdtIconBaseInt>>;
|
|
88
100
|
useValue: typeof RdtGovIconComponent;
|
|
101
|
+
useClass?: undefined;
|
|
89
102
|
} | {
|
|
90
103
|
provide: _angular_core.InjectionToken<_angular_core.Type<_ngrdt_forms.RdtCheckboxComponent<any, any>>>;
|
|
91
104
|
useValue: typeof RdtGovCheckboxComponent;
|
|
105
|
+
useClass?: undefined;
|
|
92
106
|
} | {
|
|
93
107
|
provide: _angular_core.InjectionToken<_angular_core.Type<_ngrdt_button.RdtButtonBaseInt<string>>>;
|
|
94
108
|
useValue: typeof RdtGovButtonComponent;
|
|
109
|
+
useClass?: undefined;
|
|
95
110
|
} | {
|
|
96
111
|
provide: _angular_core.InjectionToken<Record<RdtIcon, string>>;
|
|
97
112
|
useValue: {
|
|
@@ -113,6 +128,7 @@ declare function provideNgrdtGov(options?: {}): (_angular_core.EnvironmentProvid
|
|
|
113
128
|
minHeight?: undefined;
|
|
114
129
|
isDraggable?: undefined;
|
|
115
130
|
};
|
|
131
|
+
useClass?: undefined;
|
|
116
132
|
} | {
|
|
117
133
|
provide: _angular_core.InjectionToken<_ngrdt_gov.RdtGovNotificationDefaultConfig>;
|
|
118
134
|
useValue: {
|
|
@@ -134,6 +150,7 @@ declare function provideNgrdtGov(options?: {}): (_angular_core.EnvironmentProvid
|
|
|
134
150
|
minHeight?: undefined;
|
|
135
151
|
isDraggable?: undefined;
|
|
136
152
|
};
|
|
153
|
+
useClass?: undefined;
|
|
137
154
|
} | {
|
|
138
155
|
provide: _angular_core.InjectionToken<Partial<_ngrdt_gov.RdtGovDialogAlertConfigInt>>;
|
|
139
156
|
useValue: {
|
|
@@ -155,6 +172,7 @@ declare function provideNgrdtGov(options?: {}): (_angular_core.EnvironmentProvid
|
|
|
155
172
|
errorMsg?: undefined;
|
|
156
173
|
isDraggable?: undefined;
|
|
157
174
|
};
|
|
175
|
+
useClass?: undefined;
|
|
158
176
|
} | {
|
|
159
177
|
provide: _angular_core.InjectionToken<Partial<_ngrdt_gov.RdtGovDialogConfigInt<any, any>>>;
|
|
160
178
|
useValue: {
|
|
@@ -176,9 +194,19 @@ declare function provideNgrdtGov(options?: {}): (_angular_core.EnvironmentProvid
|
|
|
176
194
|
warningMsg?: undefined;
|
|
177
195
|
errorMsg?: undefined;
|
|
178
196
|
};
|
|
197
|
+
useClass?: undefined;
|
|
179
198
|
} | {
|
|
180
199
|
provide: _angular_core.InjectionToken<_angular_core.Type<_ngrdt_loading.RdtSpinnerComponent>>;
|
|
181
200
|
useValue: typeof RdtGovSpinnerComponent;
|
|
201
|
+
useClass?: undefined;
|
|
202
|
+
} | {
|
|
203
|
+
provide: _angular_core.InjectionToken<{}>;
|
|
204
|
+
useValue: string;
|
|
205
|
+
useClass?: undefined;
|
|
206
|
+
} | {
|
|
207
|
+
provide: typeof MatDatepickerIntl;
|
|
208
|
+
useClass: typeof RdtDatepickerIntl;
|
|
209
|
+
useValue?: undefined;
|
|
182
210
|
})[];
|
|
183
211
|
|
|
184
212
|
interface RdtGovConfig {
|
|
@@ -187,36 +215,62 @@ interface RdtGovConfig {
|
|
|
187
215
|
}
|
|
188
216
|
declare function initRdtGov(config?: RdtGovConfig): void;
|
|
189
217
|
|
|
190
|
-
declare
|
|
191
|
-
|
|
192
|
-
|
|
218
|
+
declare class RdtGovDateComponent extends RdtDateComponent<string, Date> {
|
|
219
|
+
private readonly translateService;
|
|
220
|
+
private readonly dateAdapter;
|
|
221
|
+
protected readonly dateInput: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
222
|
+
protected readonly timeInput: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
193
223
|
readonly size: _angular_core.InputSignal<GovSize>;
|
|
194
|
-
readonly mode: _angular_core.InputSignal<"date" | "datetime" | "time">;
|
|
195
|
-
readonly outputMode: _angular_core.InputSignal<"date" | "datetime" | "time">;
|
|
196
224
|
readonly labelPositionInput: _angular_core.InputSignal<GovLabelPosition>;
|
|
197
225
|
readonly labelPosition: _angular_core.WritableSignal<GovLabelPosition>;
|
|
198
|
-
|
|
199
|
-
|
|
226
|
+
readonly showSeconds: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
227
|
+
readonly stepInput: _angular_core.InputSignalWithTransform<number | undefined, unknown>;
|
|
228
|
+
readonly step: _angular_core.WritableSignal<number | undefined>;
|
|
229
|
+
private dateInputFocused;
|
|
230
|
+
protected readonly dateInputValue: _angular_core.WritableSignal<Date | null>;
|
|
231
|
+
protected readonly timeInputValue: _angular_core.WritableSignal<string>;
|
|
232
|
+
readonly internalTimeFormat: _angular_core.Signal<"HH:mm:ss" | "HH:mm">;
|
|
233
|
+
protected readonly defaultTime: _angular_core.Signal<"00:00:00" | "00:00">;
|
|
234
|
+
readonly localeUsed: _angular_core.Signal<date_fns.Locale>;
|
|
235
|
+
readonly hasDate: _angular_core.Signal<boolean>;
|
|
236
|
+
readonly hasTime: _angular_core.Signal<boolean>;
|
|
237
|
+
readonly internalTimeValue: _angular_core.Signal<string>;
|
|
200
238
|
protected isEmpty(value: string | null): boolean;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
protected
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
protected
|
|
214
|
-
|
|
215
|
-
|
|
239
|
+
protected readonly dateFnsLocaleEffect: _angular_core.EffectRef;
|
|
240
|
+
toExternalValue(internalValue: Date | null): string | null;
|
|
241
|
+
toInternalValue(externalValue: string | null): Date | null;
|
|
242
|
+
/**
|
|
243
|
+
* Prevents unnecessary change emissions on FormControl
|
|
244
|
+
* @returns True if both Date objects represent the same point in time
|
|
245
|
+
*/
|
|
246
|
+
protected areInternalValuesEqual(value1: Date | null, value2: Date | null): boolean;
|
|
247
|
+
writeValue(value: any): void;
|
|
248
|
+
onDateInput(event: MatDatepickerInputEvent<Date>): void;
|
|
249
|
+
onTimeChange(event: Event): void;
|
|
250
|
+
onDateChange(date?: Date): void;
|
|
251
|
+
protected onDateInputFocus(): void;
|
|
252
|
+
protected onDateInputBlur(): void;
|
|
253
|
+
/**
|
|
254
|
+
* Returns Date object constructed from current date and time input values
|
|
255
|
+
* or null if either input is invalid
|
|
256
|
+
*/
|
|
257
|
+
private getDateTimeFromInputs;
|
|
258
|
+
protected onTimeInputFocus(): void;
|
|
259
|
+
protected onTimeInputBlur(): void;
|
|
260
|
+
/**
|
|
261
|
+
* Helper function to format a Date object to a time string
|
|
262
|
+
*/
|
|
263
|
+
private formatTime;
|
|
264
|
+
/**
|
|
265
|
+
* Helper function to populate a Date object with time from a string
|
|
266
|
+
* in the format HH:mm or HH:mm:ss
|
|
267
|
+
*/
|
|
268
|
+
private populateTime;
|
|
269
|
+
private isValidTime;
|
|
216
270
|
focus(): Promise<void>;
|
|
217
271
|
canFocus(): RdtBooleanResult;
|
|
218
272
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdtGovDateComponent, never>;
|
|
219
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RdtGovDateComponent, "rdt-gov-date", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "
|
|
273
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RdtGovDateComponent, "rdt-gov-date", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "labelPositionInput": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "stepInput": { "alias": "step"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
220
274
|
}
|
|
221
275
|
|
|
222
276
|
declare class RdtGovDialogContentComponent {
|
|
@@ -492,5 +546,5 @@ declare class RdtGovThemeService {
|
|
|
492
546
|
|
|
493
547
|
declare function forceFocus(input: HTMLInputElement): void;
|
|
494
548
|
|
|
495
|
-
export { DEFAULT_GOV_BUTTON_COLOR, DEFAULT_GOV_BUTTON_SIZE, DEFAULT_GOV_BUTTON_TYPE, RDT_ALERT_DIALOG_PROVIDER, RDT_BASE_DIALOG_PROVIDER, RDT_BASE_NOTIFICATION_PROVIDER, RDT_CONFIRM_DIALOG_PROVIDER,
|
|
549
|
+
export { DEFAULT_GOV_BUTTON_COLOR, DEFAULT_GOV_BUTTON_SIZE, DEFAULT_GOV_BUTTON_TYPE, RDT_ALERT_DIALOG_PROVIDER, RDT_BASE_DIALOG_PROVIDER, RDT_BASE_NOTIFICATION_PROVIDER, RDT_CONFIRM_DIALOG_PROVIDER, RdtGovBaseDialog, RdtGovButtonComponent, RdtGovCheckboxComponent, RdtGovDateComponent, RdtGovDialogContentComponent, RdtGovDialogFooterComponent, RdtGovDialogHeaderComponent, RdtGovDialogLoadingComponent, RdtGovDialogService, RdtGovIconComponent, RdtGovNotificationService, RdtGovNumberInputComponent, RdtGovSelectComponent, RdtGovSelectOfflineProviderDirective, RdtGovSpinnerComponent, RdtGovTextInputComponent, RdtGovThemeService, forceFocus, initRdtGov, provideNgrdtGov };
|
|
496
550
|
export type { GovButtonType, GovColor, GovDialogSize, GovLabelPosition, GovMessageVariant, GovSize, RdtGovConfig, RdtGovDialogAlertConfigInt, RdtGovDialogConfigInt, RdtGovDialogConfimConfigInt, RdtGovNotificationCustomConfig, RdtGovNotificationDefaultConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngrdt/gov",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.85",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/core": ">=20.0.0",
|
|
6
6
|
"@angular/forms": ">=20.0.0",
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"@gov-design-system-ce/angular": "^1.3.1",
|
|
10
10
|
"@gov-design-system-ce/components": "^4.2.0",
|
|
11
11
|
"rxjs": "~7.8.0",
|
|
12
|
-
"@ngrdt/core": "^0.0.
|
|
13
|
-
"@ngrdt/forms": "^0.0.
|
|
14
|
-
"@ngrdt/icon": "^0.0.
|
|
15
|
-
"@ngrdt/utils": "^0.0.
|
|
12
|
+
"@ngrdt/core": "^0.0.85",
|
|
13
|
+
"@ngrdt/forms": "^0.0.85",
|
|
14
|
+
"@ngrdt/icon": "^0.0.85",
|
|
15
|
+
"@ngrdt/utils": "^0.0.85",
|
|
16
16
|
"@angular/cdk": ">=20.0.0",
|
|
17
|
-
"@ngrdt/button": "^0.0.
|
|
18
|
-
"@ngrdt/loading": "^0.0.
|
|
17
|
+
"@ngrdt/button": "^0.0.85",
|
|
18
|
+
"@ngrdt/loading": "^0.0.85"
|
|
19
19
|
},
|
|
20
20
|
"sideEffects": false,
|
|
21
21
|
"exports": {
|