@clr/angular 18.0.0 → 18.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.
@@ -196,8 +196,14 @@ declare abstract class ClrAbstractContainer implements OnDestroy {
196
196
  static ɵdir: i0.ɵɵDirectiveDeclaration<ClrAbstractContainer, never, never, {}, {}, ["label", "controlSuccessComponent", "controlErrorComponent", "controlHelperComponent"], never, true, never>;
197
197
  }
198
198
 
199
+ declare enum CONTROL_STATE {
200
+ VALID = "VALID",
201
+ INVALID = "INVALID"
202
+ }
203
+
199
204
  declare abstract class AbstractIfState {
200
205
  protected ngControlService: NgControlService;
206
+ protected state: CONTROL_STATE;
201
207
  protected displayedContent: boolean;
202
208
  protected controls: NgControl[];
203
209
  protected constructor(ngControlService: NgControlService);
@@ -207,17 +213,14 @@ declare abstract class AbstractIfState {
207
213
  static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractIfState, never, never, {}, {}, never, never, true, never>;
208
214
  }
209
215
 
210
- declare enum CONTROL_STATE {
211
- VALID = "VALID",
212
- INVALID = "INVALID"
213
- }
214
-
215
216
  declare class ClrIfError extends AbstractIfState {
216
217
  private template;
217
218
  private container;
218
- error: string;
219
+ private _error;
219
220
  private embeddedViewRef;
220
221
  constructor(ngControlService: NgControlService, template: TemplateRef<any>, container: ViewContainerRef);
222
+ get error(): string;
223
+ set error(value: string);
221
224
  /**
222
225
  * @param state CONTROL_STATE
223
226
  */
@@ -13,6 +13,20 @@ import * as i13 from '@angular/common';
13
13
  import * as i16 from '@clr/angular/icon';
14
14
  import * as i18 from '@clr/angular/layout/vertical-nav';
15
15
 
16
+ /**
17
+ * Index of the day of the week, matching JavaScript's Date.getDay() convention.
18
+ * Used to override the locale-derived first day of the week in the date picker.
19
+ */
20
+ declare enum ClrWeekday {
21
+ Sunday = 0,
22
+ Monday = 1,
23
+ Tuesday = 2,
24
+ Wednesday = 3,
25
+ Thursday = 4,
26
+ Friday = 5,
27
+ Saturday = 6
28
+ }
29
+
16
30
  declare class DateFormControlService {
17
31
  disabled: boolean;
18
32
  private _touchedChange;
@@ -48,6 +62,12 @@ declare class LocaleHelperService {
48
62
  get localeMonthsAbbreviated(): ReadonlyArray<string>;
49
63
  get localeMonthsWide(): ReadonlyArray<string>;
50
64
  get localeDateFormat(): string;
65
+ /**
66
+ * Overrides the first day of the week regardless of locale.
67
+ * Accepts a `ClrWeekday` value (Sunday=0 through Saturday=6), or null to revert to locale default.
68
+ * Incorrect values will revert to default value (Sunday).
69
+ */
70
+ updateFirstDayOfWeek(day: ClrWeekday | null): void;
51
71
  /**
52
72
  * Initializes the locale data.
53
73
  */
@@ -70,7 +90,7 @@ declare class LocaleHelperService {
70
90
  /**
71
91
  * Initializes the first day of the week based on the locale.
72
92
  */
73
- private initializeFirstDayOfWeek;
93
+ private initializeLocaleFirstDayOfWeek;
74
94
  private initializeLocaleDateFormat;
75
95
  static ɵfac: i0.ɵɵFactoryDeclaration<LocaleHelperService, never>;
76
96
  static ɵprov: i0.ɵɵInjectableDeclaration<LocaleHelperService>;
@@ -335,10 +355,17 @@ declare class ClrDateContainer extends ClrAbstractContainer implements AfterView
335
355
  protected controlClassService: ControlClassService;
336
356
  protected layoutService: LayoutService;
337
357
  protected ngControlService: NgControlService;
358
+ private localeHelperService;
338
359
  focus: boolean;
339
360
  protected popoverType: ClrPopoverType;
340
361
  private toggleButton;
341
- constructor(renderer: Renderer2, elem: ElementRef, popoverService: ClrPopoverService, dateNavigationService: DateNavigationService, datepickerEnabledService: DatepickerEnabledService, dateFormControlService: DateFormControlService, dateIOService: DateIOService, commonStrings: ClrCommonStringsService, focusService: FormsFocusService, viewManagerService: ViewManagerService, controlClassService: ControlClassService, layoutService: LayoutService, ngControlService: NgControlService);
362
+ constructor(renderer: Renderer2, elem: ElementRef, popoverService: ClrPopoverService, dateNavigationService: DateNavigationService, datepickerEnabledService: DatepickerEnabledService, dateFormControlService: DateFormControlService, dateIOService: DateIOService, commonStrings: ClrCommonStringsService, focusService: FormsFocusService, viewManagerService: ViewManagerService, controlClassService: ControlClassService, layoutService: LayoutService, ngControlService: NgControlService, localeHelperService: LocaleHelperService);
363
+ /**
364
+ * Overrides the locale-derived first day of the week for the calendar.
365
+ * Accepts a `ClrWeekday` value (Sunday=0 through Saturday=6).
366
+ * When not set, the first day of the week is determined by the Angular locale.
367
+ */
368
+ set firstDayOfWeek(value: ClrWeekday | null);
342
369
  /**
343
370
  * For date range picker actions buttons are shown by default
344
371
  */
@@ -371,8 +398,8 @@ declare class ClrDateContainer extends ClrAbstractContainer implements AfterView
371
398
  */
372
399
  private initializeCalendar;
373
400
  private dateRangeStructuralChecks;
374
- static ɵfac: i0.ɵɵFactoryDeclaration<ClrDateContainer, [null, null, null, null, null, null, null, null, null, null, null, { optional: true; }, null]>;
375
- static ɵcmp: i0.ɵɵComponentDeclaration<ClrDateContainer, "clr-date-container, clr-date-range-container", never, { "showActionButtons": { "alias": "showActionButtons"; "required": false; }; "clrPosition": { "alias": "clrPosition"; "required": false; }; "rangeOptions": { "alias": "rangeOptions"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; }, {}, never, ["label", "[clrStartDate]", "[clrEndDate]", "[clrDate]", "clr-control-helper", "clr-control-error", "clr-control-success"], false, [{ directive: typeof i1.ClrPopoverHostDirective; inputs: {}; outputs: {}; }]>;
401
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClrDateContainer, [null, null, null, null, null, null, null, null, null, null, null, { optional: true; }, null, null]>;
402
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClrDateContainer, "clr-date-container, clr-date-range-container", never, { "firstDayOfWeek": { "alias": "clrFirstDayOfWeek"; "required": false; }; "showActionButtons": { "alias": "showActionButtons"; "required": false; }; "clrPosition": { "alias": "clrPosition"; "required": false; }; "rangeOptions": { "alias": "rangeOptions"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; }, {}, never, ["label", "[clrStartDate]", "[clrEndDate]", "[clrDate]", "clr-control-helper", "clr-control-error", "clr-control-success"], false, [{ directive: typeof i1.ClrPopoverHostDirective; inputs: {}; outputs: {}; }]>;
376
403
  }
377
404
 
378
405
  /**
@@ -955,4 +982,5 @@ declare class ClrDatepickerModule {
955
982
  static ɵinj: i0.ɵɵInjectorDeclaration<ClrDatepickerModule>;
956
983
  }
957
984
 
958
- export { CLR_DATEPICKER_DIRECTIVES, ClrCalendar, ClrDateContainer, ClrDateInput, ClrDateInputBase, ClrDateInputValidator, ClrDatepickerActions, ClrDatepickerModule, ClrDatepickerViewManager, ClrDay, ClrDaypicker, ClrEndDateInput, ClrEndDateInputValidator, ClrMonthpicker, ClrStartDateInput, ClrStartDateInputValidator, ClrYearpicker };
985
+ export { CLR_DATEPICKER_DIRECTIVES, ClrCalendar, ClrDateContainer, ClrDateInput, ClrDateInputBase, ClrDateInputValidator, ClrDatepickerActions, ClrDatepickerModule, ClrDatepickerViewManager, ClrDay, ClrDaypicker, ClrEndDateInput, ClrEndDateInputValidator, ClrMonthpicker, ClrStartDateInput, ClrStartDateInputValidator, ClrWeekday, ClrYearpicker };
986
+ export type { ClrDayOfWeek };