iss-ctrl 0.0.12 → 0.0.14

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 (26) hide show
  1. package/fesm2022/{iss-ctrl-iss-ctrl-WfIqBEcL.mjs → iss-ctrl-iss-ctrl-CDk4_RVA.mjs} +734 -233
  2. package/fesm2022/iss-ctrl-iss-ctrl-CDk4_RVA.mjs.map +1 -0
  3. package/fesm2022/{iss-ctrl-load-event-SlQmVmyf.mjs → iss-ctrl-load-event-5MIEPp-j.mjs} +3 -3
  4. package/fesm2022/{iss-ctrl-load-event-SlQmVmyf.mjs.map → iss-ctrl-load-event-5MIEPp-j.mjs.map} +1 -1
  5. package/fesm2022/{iss-ctrl-load-options-event-CBejHpME.mjs → iss-ctrl-load-options-event-D4gOR-3h.mjs} +3 -3
  6. package/fesm2022/{iss-ctrl-load-options-event-CBejHpME.mjs.map → iss-ctrl-load-options-event-D4gOR-3h.mjs.map} +1 -1
  7. package/fesm2022/{iss-ctrl-load-value-event-Bu9-rZ6T.mjs → iss-ctrl-load-value-event-a_CrlH07.mjs} +3 -3
  8. package/fesm2022/{iss-ctrl-load-value-event-Bu9-rZ6T.mjs.map → iss-ctrl-load-value-event-a_CrlH07.mjs.map} +1 -1
  9. package/fesm2022/{iss-ctrl-note.field-onDjqI_X.mjs → iss-ctrl-note.field-DIU49W4s.mjs} +2 -2
  10. package/fesm2022/{iss-ctrl-note.field-onDjqI_X.mjs.map → iss-ctrl-note.field-DIU49W4s.mjs.map} +1 -1
  11. package/fesm2022/{iss-ctrl-replace-api-keys-Chwe42Nu.mjs → iss-ctrl-replace-api-keys-8o7-XCdX.mjs} +2 -2
  12. package/fesm2022/{iss-ctrl-replace-api-keys-Chwe42Nu.mjs.map → iss-ctrl-replace-api-keys-8o7-XCdX.mjs.map} +1 -1
  13. package/fesm2022/{iss-ctrl-set-value-event-DiHESiPT.mjs → iss-ctrl-set-value-event-BJGXPwPV.mjs} +2 -2
  14. package/fesm2022/{iss-ctrl-set-value-event-DiHESiPT.mjs.map → iss-ctrl-set-value-event-BJGXPwPV.mjs.map} +1 -1
  15. package/fesm2022/{iss-ctrl-table.field-DxwfNXNc.mjs → iss-ctrl-table.field-Ca6d7LvU.mjs} +166 -166
  16. package/fesm2022/iss-ctrl-table.field-Ca6d7LvU.mjs.map +1 -0
  17. package/fesm2022/{iss-ctrl-trigger-based-on-json-value-CprcFCWi.mjs → iss-ctrl-trigger-based-on-json-value-Jp6lQkIa.mjs} +2 -2
  18. package/fesm2022/{iss-ctrl-trigger-based-on-json-value-CprcFCWi.mjs.map → iss-ctrl-trigger-based-on-json-value-Jp6lQkIa.mjs.map} +1 -1
  19. package/fesm2022/{iss-ctrl-user-picker.field-Mqi37i7D.mjs → iss-ctrl-user-picker.field-CFK871y8.mjs} +2 -2
  20. package/fesm2022/{iss-ctrl-user-picker.field-Mqi37i7D.mjs.map → iss-ctrl-user-picker.field-CFK871y8.mjs.map} +1 -1
  21. package/fesm2022/iss-ctrl.mjs +1 -1
  22. package/package.json +1 -1
  23. package/types/iss-ctrl.d.ts +213 -14
  24. package/upgrade.scss +16 -0
  25. package/fesm2022/iss-ctrl-iss-ctrl-WfIqBEcL.mjs.map +0 -1
  26. package/fesm2022/iss-ctrl-table.field-DxwfNXNc.mjs.map +0 -1
@@ -1,11 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InputSignal, WritableSignal, OutputEmitterRef, OnInit, OnDestroy, Signal, Type, DestroyRef, StaticProvider, InjectionToken, PipeTransform, Injector } from '@angular/core';
2
+ import { InputSignal, WritableSignal, OutputEmitterRef, OnInit, OnDestroy, Signal, Type, DestroyRef, StaticProvider, InjectionToken, PipeTransform, Injector, Provider } from '@angular/core';
3
3
  import { ControlValueAccessor, Validator, FormControl, AbstractControl, ValidationErrors, FormGroup, ValidatorFn, AsyncValidatorFn, ControlContainer } from '@angular/forms';
4
4
  import { MatChipInputEvent } from '@angular/material/chips';
5
5
  import { MatDatepickerInputEvent } from '@angular/material/datepicker';
6
6
  import { PhoneNumber } from 'libphonenumber-js/mobile';
7
7
  import { Observable, BehaviorSubject } from 'rxjs';
8
- import { MatDateFormats } from '@angular/material/core';
8
+ import { MatDateFormats, NativeDateAdapter } from '@angular/material/core';
9
9
 
10
10
  interface Option {
11
11
  value: string;
@@ -52,7 +52,9 @@ interface Hint {
52
52
  *
53
53
  * ### Content projection
54
54
  * Controls that render a `mat-form-field` project `<label>` into the floating label.
55
- * The label space collapses automatically when no `<label>` is supplied.
55
+ * An omitted label or one that interpolates to an empty string — leaves `<mat-label>`
56
+ * empty, and `upgrade.scss` collapses the floating-label space for it. No label markup is
57
+ * removed at runtime, so a label that arrives later simply shows up.
56
58
  *
57
59
  * @example
58
60
  * ```html
@@ -116,16 +118,12 @@ declare class ControlBase implements ControlValueAccessor, Validator {
116
118
  */
117
119
  onChange: OutputEmitterRef<any>;
118
120
  protected ctrl: FormControl;
119
- protected hasLabel: WritableSignal<boolean>;
120
- private hostRef;
121
- constructor();
122
121
  registerOnChange(fn: () => void): void;
123
122
  registerOnTouched(fn: () => void): void;
124
123
  setDisabledState(isDisabled: boolean): void;
125
124
  writeValue(value: string | FormData | Date | null): void;
126
125
  markAsTouched(): void;
127
126
  validate(control: AbstractControl): ValidationErrors | null;
128
- private hasProjectedLabel;
129
127
  protected onTouch: () => void;
130
128
  protected onPropagateValue: (_: any) => void;
131
129
  protected emitValue(value?: any): void;
@@ -228,6 +226,14 @@ declare class ChipsControl extends ControlBase {
228
226
  * | `minDate` | `Date \| null` | `null` | Earliest selectable date. |
229
227
  * | `maxDate` | `Date \| null` | `null` | Latest selectable date. |
230
228
  * | `disabledDays` | `number[]` | `[]` | Week days to block, `0` = Sunday … `6` = Saturday. |
229
+ * | `hijriCalendar` | `boolean` | `false` | Shows an Umm al-Qura Hijri calendar; the value stays Gregorian. |
230
+ * | `emitHijri` | `boolean` | `false` | Emits the Hijri date instead of the Gregorian one. Implies `hijriCalendar`. |
231
+ *
232
+ * ### Hijri dates
233
+ * `hijriCalendar` only changes what the user sees: the calendar is Hijri, the input reads
234
+ * `dd/MM/yyyy` in Hijri, and a day shown as `16/03/1447` is still emitted as `2025-09-08`.
235
+ * Turn on `emitHijri` as well when the form value itself has to be the Hijri date. `minDate` and
236
+ * `maxDate` stay Gregorian in both cases — they are bounds on a day, not on a notation.
231
237
  *
232
238
  * ### Inherited from {@link ControlBase}
233
239
  * `formControlName` · `readonly` · `className` · `(onChange)`
@@ -235,6 +241,7 @@ declare class ChipsControl extends ControlBase {
235
241
  * Projects `<label>` into the floating label; omit it to render the control without one.
236
242
  */
237
243
  declare class DatePickerControl extends ControlBase implements Validator {
244
+ #private;
238
245
  /**
239
246
  * Week days that cannot be selected — `0` is Sunday through `6` for Saturday.
240
247
  */
@@ -247,12 +254,25 @@ declare class DatePickerControl extends ControlBase implements Validator {
247
254
  * Latest selectable date.
248
255
  */
249
256
  maxDate: InputSignal<Date | null>;
257
+ /**
258
+ * Renders the calendar as an Umm al-Qura Hijri calendar, leaving the emitted value Gregorian.
259
+ */
260
+ hijriCalendar: InputSignal<boolean>;
261
+ /**
262
+ * Emits the picked date as a Hijri `yyyy-MM-dd` string. Implies {@link hijriCalendar}.
263
+ */
264
+ emitHijri: InputSignal<boolean>;
265
+ /**
266
+ * Whether this picker is currently showing the Hijri calendar.
267
+ */
268
+ isHijri(): boolean;
269
+ writeValue(value: string | Date | null): void;
250
270
  clear(event: MouseEvent): void;
251
271
  protected calendarDaysFilter: (d: Date | null) => boolean;
252
272
  protected emit($event: MatDatepickerInputEvent<any>): void;
253
273
  protected openPicker(picker: any): void;
254
274
  static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerControl, never>;
255
- static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerControl, "iss-ctrl-date-picker", never, { "disabledDays": { "alias": "disabledDays"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; }, {}, never, ["label"], true, never>;
275
+ static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerControl, "iss-ctrl-date-picker", never, { "disabledDays": { "alias": "disabledDays"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "hijriCalendar": { "alias": "hijriCalendar"; "required": false; "isSignal": true; }; "emitHijri": { "alias": "emitHijri"; "required": false; "isSignal": true; }; }, {}, never, ["label"], true, never>;
256
276
  }
257
277
 
258
278
  interface DateRangeEmission {
@@ -281,6 +301,13 @@ interface DateRangeEmission {
281
301
  * | `minDate` | `Date \| null` | `null` | Earliest selectable date. |
282
302
  * | `maxDate` | `Date \| null` | `null` | Latest selectable date. |
283
303
  * | `disabledDays` | `number[]` | `[]` | Week days to block, `0` = Sunday … `6` = Saturday. |
304
+ * | `hijriCalendar` | `boolean` | `false` | Shows an Umm al-Qura Hijri calendar; the value stays Gregorian. |
305
+ * | `emitHijri` | `boolean` | `false` | Emits both endpoints as Hijri dates. Implies `hijriCalendar`. |
306
+ *
307
+ * ### Hijri dates
308
+ * `hijriCalendar` only changes what the user sees; the emitted range stays Gregorian until
309
+ * `emitHijri` is on as well, at which point both endpoints carry Hijri dates. `duration` is
310
+ * a count of days either way, and `minDate`/`maxDate` stay Gregorian.
284
311
  *
285
312
  * ### Inherited from {@link ControlBase}
286
313
  * `formControlName` · `readonly` · `className` · `(onChange)`
@@ -304,6 +331,14 @@ declare class DateRangePickerControl extends ControlBase implements OnInit, OnDe
304
331
  * Latest selectable date.
305
332
  */
306
333
  maxDate: InputSignal<Date | null>;
334
+ /**
335
+ * Renders the calendar as an Umm al-Qura Hijri calendar, leaving the emitted range Gregorian.
336
+ */
337
+ hijriCalendar: InputSignal<boolean>;
338
+ /**
339
+ * Emits both endpoints as Hijri dates. Implies {@link hijriCalendar}.
340
+ */
341
+ emitHijri: InputSignal<boolean>;
307
342
  /**
308
343
  * Emits the selected range as an object, or `null` while the range is incomplete.
309
344
  */
@@ -312,15 +347,19 @@ declare class DateRangePickerControl extends ControlBase implements OnInit, OnDe
312
347
  * The `start`/`end` form group backing the range input. Internal state.
313
348
  */
314
349
  readonly range: FormGroup;
350
+ /**
351
+ * Whether this picker is currently showing the Hijri calendar.
352
+ */
353
+ isHijri(): boolean;
315
354
  ngOnInit(): void;
316
355
  setDisabledState(isDisabled: boolean): void;
317
356
  clear(event: MouseEvent): void;
318
- protected openPicker(picker: any): void;
319
357
  writeValue(value: string | FormData | null): void;
320
358
  ngOnDestroy(): void;
359
+ protected openPicker(picker: any): void;
321
360
  protected calendarDaysFilter: (d: Date | null) => boolean;
322
361
  static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePickerControl, never>;
323
- static ɵcmp: i0.ɵɵComponentDeclaration<DateRangePickerControl, "iss-ctrl-date-range-picker", never, { "disabledDays": { "alias": "disabledDays"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; }, { "onDateRangeObjectChange": "onDateRangeObjectChange"; }, never, ["label"], true, never>;
362
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateRangePickerControl, "iss-ctrl-date-range-picker", never, { "disabledDays": { "alias": "disabledDays"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "hijriCalendar": { "alias": "hijriCalendar"; "required": false; "isSignal": true; }; "emitHijri": { "alias": "emitHijri"; "required": false; "isSignal": true; }; }, { "onDateRangeObjectChange": "onDateRangeObjectChange"; }, never, ["label"], true, never>;
324
363
  }
325
364
 
326
365
  /**
@@ -344,6 +383,12 @@ declare class DateRangePickerControl extends ControlBase implements OnInit, OnDe
344
383
  * | `minTime` | `string \| null` | `null` | Earliest selectable time, `HH:mm`. |
345
384
  * | `maxTime` | `string \| null` | `null` | Latest selectable time, `HH:mm`. |
346
385
  * | `disabledDays` | `number[]` | `[]` | Week days to block, `0` = Sunday … `6` = Saturday. |
386
+ * | `hijriCalendar` | `boolean` | `false` | Shows an Umm al-Qura Hijri calendar; the value stays Gregorian. |
387
+ * | `emitHijri` | `boolean` | `false` | Emits the date half as a Hijri date. Implies `hijriCalendar`. |
388
+ *
389
+ * ### Hijri dates
390
+ * Both flags are handed straight to the inner date picker; the time half is untouched, so a
391
+ * Hijri value reads `1447-03-15T09:30:00`.
347
392
  *
348
393
  * ### Inherited from {@link ControlBase}
349
394
  * `formControlName` · `readonly` · `className` · `(onChange)`
@@ -373,11 +418,19 @@ declare class DatetimePickerControl extends ControlBase {
373
418
  * Latest selectable time of day, as `HH:mm`.
374
419
  */
375
420
  maxTime: InputSignal<string | null>;
421
+ /**
422
+ * Renders the calendar as an Umm al-Qura Hijri calendar, leaving the emitted date Gregorian.
423
+ */
424
+ hijriCalendar: InputSignal<boolean>;
425
+ /**
426
+ * Emits the date half of the value as a Hijri date. Implies {@link hijriCalendar}.
427
+ */
428
+ emitHijri: InputSignal<boolean>;
376
429
  setDisabledState(isDisabled: boolean): void;
377
430
  emit(): void;
378
431
  writeValue(value: string | Date | null): void;
379
432
  static ɵfac: i0.ɵɵFactoryDeclaration<DatetimePickerControl, never>;
380
- static ɵcmp: i0.ɵɵComponentDeclaration<DatetimePickerControl, "iss-ctrl-datetime-picker", never, { "disabledDays": { "alias": "disabledDays"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minTime": { "alias": "minTime"; "required": false; "isSignal": true; }; "maxTime": { "alias": "maxTime"; "required": false; "isSignal": true; }; }, {}, never, ["label"], true, never>;
433
+ static ɵcmp: i0.ɵɵComponentDeclaration<DatetimePickerControl, "iss-ctrl-datetime-picker", never, { "disabledDays": { "alias": "disabledDays"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minTime": { "alias": "minTime"; "required": false; "isSignal": true; }; "maxTime": { "alias": "maxTime"; "required": false; "isSignal": true; }; "hijriCalendar": { "alias": "hijriCalendar"; "required": false; "isSignal": true; }; "emitHijri": { "alias": "emitHijri"; "required": false; "isSignal": true; }; }, {}, never, ["label"], true, never>;
381
434
  }
382
435
 
383
436
  interface IssAttachment {
@@ -903,7 +956,7 @@ declare class FieldAsyncValidation {
903
956
  * ### Keys by area
904
957
  * - **Common:** `type` · `disabled` · `readonly` · `placeholder` · `suffix` · `hideLabel` · `multiple`
905
958
  * - **Bounds:** `min` · `max` · `minLength` · `maxLength`
906
- * - **Dates:** `minDate` · `maxDate` · `dateFilter`
959
+ * - **Dates:** `minDate` · `maxDate` · `dateFilter` · `hijriCalendar` · `emitHijri`
907
960
  * - **Attachments:** `allowedFileSize` · `allowedFileTypes` · `minFilesCount` · `maxFilesCount` · `templateId` · `templateUrl`
908
961
  * - **Users:** `minUsersCount` · `maxUsersCount`
909
962
  * - **Table:** `showInTableColumns` · `tableWithFilter` · `tableWithSort` · `tableWithPagination`
@@ -970,6 +1023,18 @@ declare class FieldConfig {
970
1023
  * Restricts the calendar to working days. Source: `config.acceptWorkDaysOnly`.
971
1024
  */
972
1025
  dateFilter: WritableSignal<boolean | undefined>;
1026
+ /**
1027
+ * Renders the calendar as an Umm al-Qura Hijri calendar. The emitted value stays Gregorian
1028
+ * unless {@link FieldConfig.emitHijri} is also on. Source: `config.hijriCalendar`, also
1029
+ * accepted as `config.HijriCalendar`.
1030
+ */
1031
+ hijriCalendar: WritableSignal<boolean | undefined>;
1032
+ /**
1033
+ * Emits the picked date as a Hijri date instead of a Gregorian one — the same day emitted
1034
+ * as `1447-03-16` rather than `2025-09-08`. Implies {@link FieldConfig.hijriCalendar}: a
1035
+ * Hijri value is always picked from a Hijri calendar.
1036
+ */
1037
+ emitHijri: WritableSignal<boolean | undefined>;
973
1038
  /**
974
1039
  * Id of a downloadable template offered next to an attachment field.
975
1040
  */
@@ -1635,6 +1700,8 @@ declare class TimePickerField extends FieldBase {
1635
1700
  * | `minDate` | `Date` | Earliest selectable date. |
1636
1701
  * | `maxDate` | `Date` | Latest selectable date. |
1637
1702
  * | `readonly` | `boolean` | Shows the value but blocks interaction. |
1703
+ * | `hijriCalendar` | `boolean` | Renders an Umm al-Qura Hijri calendar while the emitted value stays Gregorian. |
1704
+ * | `emitHijri` | `boolean` | Emits the Hijri date instead of the Gregorian one. Implies `hijriCalendar`. |
1638
1705
  *
1639
1706
  * ### Other field members used
1640
1707
  * `label()`
@@ -1664,6 +1731,8 @@ declare class DatePickerField extends FieldBase {
1664
1731
  * | `minDate` | `Date` | Earliest selectable date. |
1665
1732
  * | `maxDate` | `Date` | Latest selectable date. |
1666
1733
  * | `readonly` | `boolean` | Shows the value but blocks interaction. |
1734
+ * | `hijriCalendar` | `boolean` | Renders an Umm al-Qura Hijri calendar while the emitted value stays Gregorian. |
1735
+ * | `emitHijri` | `boolean` | Emits the Hijri date instead of the Gregorian one. Implies `hijriCalendar`. |
1667
1736
  *
1668
1737
  * ### Other field members used
1669
1738
  * `label()`
@@ -1693,6 +1762,8 @@ declare class DatetimePickerField extends FieldBase {
1693
1762
  * | `minDate` | `Date` | Earliest selectable date. |
1694
1763
  * | `maxDate` | `Date` | Latest selectable date. |
1695
1764
  * | `readonly` | `boolean` | Shows the value but blocks interaction. |
1765
+ * | `hijriCalendar` | `boolean` | Renders an Umm al-Qura Hijri calendar while the emitted value stays Gregorian. |
1766
+ * | `emitHijri` | `boolean` | Emits the Hijri date instead of the Gregorian one. Implies `hijriCalendar`. |
1696
1767
  *
1697
1768
  * ### Other field members used
1698
1769
  * `label()`
@@ -1794,18 +1865,21 @@ declare class TimePickerViewer extends ViewerBase {
1794
1865
  }
1795
1866
 
1796
1867
  declare class DatePickerViewer extends ViewerBase {
1868
+ protected hijriDate: Signal<string | null>;
1797
1869
  static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerViewer, never>;
1798
1870
  static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerViewer, "iss-viewer-date-picker", never, {}, {}, never, never, true, never>;
1799
1871
  }
1800
1872
 
1801
1873
  declare class DatePickerTimeViewer extends ViewerBase {
1802
1874
  protected readonly DATETIME_FORMAT = "dd/MM/yyyy hh:mm a";
1875
+ protected hijriDatetime: Signal<string | null>;
1803
1876
  static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerTimeViewer, never>;
1804
1877
  static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerTimeViewer, "iss-viewer-datetime-picker", never, {}, {}, never, never, true, never>;
1805
1878
  }
1806
1879
 
1807
1880
  declare class DateRangePickerViewer extends ViewerBase implements OnInit {
1808
1881
  dateRange: string[];
1882
+ hijriDates: (string | null)[];
1809
1883
  ngOnInit(): void;
1810
1884
  static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePickerViewer, never>;
1811
1885
  static ɵcmp: i0.ɵɵComponentDeclaration<DateRangePickerViewer, "iss-viewer-date-range-picker", never, {}, {}, never, never, true, never>;
@@ -1965,12 +2039,137 @@ declare class Employee {
1965
2039
  static ɵprov: i0.ɵɵInjectableDeclaration<Employee>;
1966
2040
  }
1967
2041
 
2042
+ /**
2043
+ * The single date adapter behind every `iss-ctrl-*` picker.
2044
+ *
2045
+ * It behaves as a plain Gregorian adapter — `dd/MM/yyyy` in and out — until its locale is
2046
+ * switched to {@link HIJRI_LOCALE}, at which point the whole calendar grid becomes Umm
2047
+ * al-Qura Hijri: the month lengths, the year and month labels and the day numbers all come
2048
+ * from the Hijri calendar.
2049
+ *
2050
+ * The value never changes shape. The adapter always works on a `Date`, so a Hijri calendar
2051
+ * still hands the control an ordinary `Date`, and it stays the control's decision whether to
2052
+ * emit that as a Gregorian or a Hijri string.
2053
+ *
2054
+ * Switch modes through {@link setHijri}, never by assigning `locale` — `setLocale` is what
2055
+ * tells an open calendar to re-render.
2056
+ */
2057
+ declare class IssDateAdapter extends NativeDateAdapter {
2058
+ #private;
2059
+ /** The Gregorian locale to fall back to when the Hijri calendar is turned off. */
2060
+ gregorianLocale: string;
2061
+ /** Whether the adapter is currently presenting the Hijri calendar. */
2062
+ get isHijri(): boolean;
2063
+ /**
2064
+ * Turns the Hijri calendar on or off. Goes through `setLocale` so that a calendar that is
2065
+ * already open redraws itself.
2066
+ */
2067
+ setHijri(hijri: boolean): void;
2068
+ getYear(date: Date): number;
2069
+ getMonth(date: Date): number;
2070
+ getDate(date: Date): number;
2071
+ getMonthNames(style: "long" | "short" | "narrow"): string[];
2072
+ getDateNames(): string[];
2073
+ getDayOfWeekNames(style: "long" | "short" | "narrow"): string[];
2074
+ getYearName(date: Date): string;
2075
+ getFirstDayOfWeek(): number;
2076
+ getNumDaysInMonth(date: Date): number;
2077
+ createDate(year: number, month: number, date: number): Date;
2078
+ addCalendarYears(date: Date, years: number): Date;
2079
+ addCalendarMonths(date: Date, months: number): Date;
2080
+ addCalendarDays(date: Date, days: number): Date;
2081
+ parse(value: any, parseFormat?: any): Date | null;
2082
+ format(date: Date, displayFormat: string): string;
2083
+ deserialize(value: any): Date | null;
2084
+ toIso8601(date: Date): string;
2085
+ static ɵfac: i0.ɵɵFactoryDeclaration<IssDateAdapter, never>;
2086
+ static ɵprov: i0.ɵɵInjectableDeclaration<IssDateAdapter>;
2087
+ }
2088
+ /**
2089
+ * Providers every date-based control needs: the {@link IssDateAdapter} itself, the Gregorian
2090
+ * locale it falls back to, and the `dd/MM/yyyy` formats both of its calendars are rendered in.
2091
+ *
2092
+ * Declared per component, so each picker owns its adapter instance and one field switching to
2093
+ * the Hijri calendar leaves every other field on the form alone.
2094
+ */
2095
+ declare function provideIssDateAdapter(): Provider[];
2096
+
1968
2097
  declare function arrayFrom<T>(length: number, valueFunction: (index: number) => T): T[];
1969
2098
 
1970
2099
  declare function formatFileSize(x: string | number): string;
1971
2100
 
1972
2101
  declare function getPropertyByPath(obj: any, path: string | undefined): any;
1973
2102
 
2103
+ /**
2104
+ * Umm al-Qura Hijri calendar helpers.
2105
+ *
2106
+ * Every function here works on a plain `Date`: a `Date` is an instant, and the Hijri
2107
+ * calendar is only another way of naming that instant. Nothing stores Hijri numbers on the
2108
+ * date itself, so a value converted to Hijri for display or emission is still the same day.
2109
+ *
2110
+ * The conversion is done by `Intl` with the `islamic-umalqura` calendar, which is the
2111
+ * calendar used officially in Saudi Arabia.
2112
+ */
2113
+ /** Locale used by the calendar UI when the Hijri calendar is on. */
2114
+ declare const HIJRI_LOCALE = "ar-SA-u-ca-islamic-umalqura";
2115
+ declare const HIJRI_MONTH_NAMES: {
2116
+ ar: string[];
2117
+ en: string[];
2118
+ enShort: string[];
2119
+ };
2120
+ interface HijriParts {
2121
+ /** Hijri year, for example `1447`. */
2122
+ year: number;
2123
+ /** Hijri month, **zero based** like `Date.getMonth()` — `0` is Muharram. */
2124
+ month: number;
2125
+ /** Hijri day of month, starting at `1`. */
2126
+ day: number;
2127
+ }
2128
+ /**
2129
+ * Reads the Hijri year, month and day a `Date` falls on.
2130
+ */
2131
+ declare function getHijriParts(date: Date): HijriParts;
2132
+ /**
2133
+ * The Gregorian `Date` of the first day of the Hijri month `date` falls in, at midday.
2134
+ *
2135
+ * Midday, not midnight, so a daylight-saving shift can never push the result into the
2136
+ * previous day while the month is being walked.
2137
+ */
2138
+ declare function startOfHijriMonth(date: Date): Date;
2139
+ /**
2140
+ * Number of days in the Hijri month `date` falls in — 29 or 30, decided by Umm al-Qura.
2141
+ */
2142
+ declare function getHijriDaysInMonth(date: Date): number;
2143
+ /**
2144
+ * Builds the `Date` for a Hijri year/month/day. The month is zero based, and a day past the
2145
+ * end of the month is clamped to the last day of that month.
2146
+ */
2147
+ declare function createHijriDate(year: number, month: number, day: number): Date;
2148
+ /**
2149
+ * Formats a date as a Hijri `yyyy-MM-dd` string — the shape the form emits when
2150
+ * `emitHijri` is on.
2151
+ */
2152
+ declare function formatHijriDate(date: Date): string;
2153
+ /**
2154
+ * Reads a Hijri date back into a `Date`, accepting both the emitted `yyyy-MM-dd` shape and
2155
+ * the `dd/MM/yyyy` shape shown in the input. Returns `null` for anything else.
2156
+ */
2157
+ declare function parseHijriDate(value: string | null | undefined): Date | null;
2158
+ /**
2159
+ * Renders a stored form value as a Hijri `dd/MM/yyyy` string for the read-only viewers, or
2160
+ * returns `null` when the field is not on the Hijri calendar and the value should be shown
2161
+ * as an ordinary Gregorian date.
2162
+ *
2163
+ * The two Hijri modes store different things, so they are read differently: with `emitHijri`
2164
+ * the value already carries Hijri numbers and only its notation changes, while with
2165
+ * `hijriCalendar` alone the value is Gregorian and has to be converted.
2166
+ */
2167
+ declare function toHijriDisplay(value: string | null | undefined, options: {
2168
+ hijriCalendar?: boolean;
2169
+ emitHijri?: boolean;
2170
+ withTime?: boolean;
2171
+ }): string | null;
2172
+
1974
2173
  declare function replacePlaceholders(str: string, values: any): string;
1975
2174
 
1976
2175
  declare abstract class IssValidators {
@@ -1997,5 +2196,5 @@ declare abstract class TimeValidator {
1997
2196
  static afterDate(field: IssField): ValidatorFn;
1998
2197
  }
1999
2198
 
2000
- export { ATTACHMENT_DOWNLOAD_URL, ATTACHMENT_UPLOAD_RESPONSE_MAPPER, ATTACHMENT_UPLOAD_URL, ArabicNumberPipe, AttachmentViewer, COMPONENTS, COUNTRIES, CheckboxControl, CheckboxField, CheckboxViewer, ChipsControl, ChipsField, ChipsViewer, ControlBase, DATETIME_FORMAT, DATE_FORMAT_ADAPTER, DEFAULT_COUNTRY, DatePickerControl, DatePickerField, DatePickerTimeViewer, DatePickerViewer, DateRangePickerControl, DateRangePickerField, DateRangePickerViewer, DatetimePickerControl, DatetimePickerField, Droppable, Employee, FIELD_DATA, FieldBase, FieldDataInjector, FileHandler, FilePickerControl, FilePickerField, FileValidators, FormEngine, HOST, HintsComponent, InputControl, InputField, InputViewer, IssValidators, Loader, MobileControl, MobileField, MobileViewer, Outlet, PLACEHOLDER_REGEX, PLATE_LETTERS, Phone, PlateControl, PlateField, PlateLetterPipe, PlateViewer, RadioControl, RadioField, RadioViewer, SERVICES, SelectControl, SelectField, SelectStatusPipe, SelectViewer, SlideToggleControl, SlideToggleField, SlideToggleViewer, TextareaControl, TextareaField, TextareaViewer, TimePickerControl, TimePickerField, TimePickerViewer, TimeValidator, ToggleButtonControl, ToggleButtonField, ToggleButtonViewer, TranslatePipe, UI_LANGUAGE, USER_SEARCH_API, VALIDATION_MESSAGES, VALIDATORS, VIEW_PROVIDER, ValidationMessageComponent, arrayFrom, formatFileSize, getPropertyByPath, replacePlaceholders };
2001
- export type { ActionTriggerFn, ComponentOutlet, Country, DateRangeEmission, DynamicImport, EventArgument, EventConfigFn, EventStrategy, FieldChange, Hint, HintAlignment, I18n, ISO2, IssAttachment, IssFile, Mobile, Option, PlateLetter, ValidationMessage, ValidationMessageFn };
2199
+ export { ATTACHMENT_DOWNLOAD_URL, ATTACHMENT_UPLOAD_RESPONSE_MAPPER, ATTACHMENT_UPLOAD_URL, ArabicNumberPipe, AttachmentViewer, COMPONENTS, COUNTRIES, CheckboxControl, CheckboxField, CheckboxViewer, ChipsControl, ChipsField, ChipsViewer, ControlBase, DATETIME_FORMAT, DATE_FORMAT_ADAPTER, DEFAULT_COUNTRY, DatePickerControl, DatePickerField, DatePickerTimeViewer, DatePickerViewer, DateRangePickerControl, DateRangePickerField, DateRangePickerViewer, DatetimePickerControl, DatetimePickerField, Droppable, Employee, FIELD_DATA, FieldBase, FieldDataInjector, FileHandler, FilePickerControl, FilePickerField, FileValidators, FormEngine, HIJRI_LOCALE, HIJRI_MONTH_NAMES, HOST, HintsComponent, InputControl, InputField, InputViewer, IssDateAdapter, IssValidators, Loader, MobileControl, MobileField, MobileViewer, Outlet, PLACEHOLDER_REGEX, PLATE_LETTERS, Phone, PlateControl, PlateField, PlateLetterPipe, PlateViewer, RadioControl, RadioField, RadioViewer, SERVICES, SelectControl, SelectField, SelectStatusPipe, SelectViewer, SlideToggleControl, SlideToggleField, SlideToggleViewer, TextareaControl, TextareaField, TextareaViewer, TimePickerControl, TimePickerField, TimePickerViewer, TimeValidator, ToggleButtonControl, ToggleButtonField, ToggleButtonViewer, TranslatePipe, UI_LANGUAGE, USER_SEARCH_API, VALIDATION_MESSAGES, VALIDATORS, VIEW_PROVIDER, ValidationMessageComponent, arrayFrom, createHijriDate, formatFileSize, formatHijriDate, getHijriDaysInMonth, getHijriParts, getPropertyByPath, parseHijriDate, provideIssDateAdapter, replacePlaceholders, startOfHijriMonth, toHijriDisplay };
2200
+ export type { ActionTriggerFn, ComponentOutlet, Country, DateRangeEmission, DynamicImport, EventArgument, EventConfigFn, EventStrategy, FieldChange, HijriParts, Hint, HintAlignment, I18n, ISO2, IssAttachment, IssFile, Mobile, Option, PlateLetter, ValidationMessage, ValidationMessageFn };
package/upgrade.scss CHANGED
@@ -54,6 +54,22 @@ mat-form-field.mat-mdc-form-field:has(mat-label) .mat-mdc-form-field-infix {
54
54
  padding-top: 10px !important;
55
55
  }
56
56
 
57
+ // mat-form-field always renders its floating label, so a control whose label is omitted or
58
+ // interpolates to "" would keep the space above the input. Both cases leave an :empty element
59
+ // — <mat-label> itself when nothing is projected, the projected <label> when its text is empty
60
+ // — which is what these selectors collapse. Keep <mat-label> free of whitespace in templates,
61
+ // or it is never :empty.
62
+ mat-form-field.mat-mdc-form-field:has(mat-label:empty),
63
+ mat-form-field.mat-mdc-form-field:has(mat-label > label:empty) {
64
+ .mdc-floating-label {
65
+ display: none !important;
66
+ }
67
+
68
+ .mat-mdc-form-field-infix {
69
+ padding-top: 0 !important;
70
+ }
71
+ }
72
+
57
73
 
58
74
  mat-form-field.mat-mdc-form-field
59
75
  .mat-mdc-input-element::placeholder {