commons-shared-web-ui 0.0.68 → 0.0.70
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/index.d.ts
CHANGED
|
@@ -372,6 +372,16 @@ interface DateConfig {
|
|
|
372
372
|
inputReadonly?: boolean;
|
|
373
373
|
/** Name of a sibling field whose value is used as the dynamic minimum date. */
|
|
374
374
|
minDateField?: string;
|
|
375
|
+
/**
|
|
376
|
+
* Fixes this field's picker to a specific entry granularity — no per-user toggle.
|
|
377
|
+
* 'DAY' (default, or omitted) = today's full day+month+year picker, unchanged.
|
|
378
|
+
* 'MONTH' = the picker opens straight to the year grid; picking a month commits that
|
|
379
|
+
* month with day=1 and closes immediately (the day grid is never shown).
|
|
380
|
+
* 'YEAR' = the picker opens to the year grid; picking a year commits Jan 1 of that year
|
|
381
|
+
* and closes immediately (neither the month nor day grid is ever shown).
|
|
382
|
+
* Opt-in and additive: fields that don't set this keep today's default behavior.
|
|
383
|
+
*/
|
|
384
|
+
dateGranularity?: 'DAY' | 'MONTH' | 'YEAR';
|
|
375
385
|
}
|
|
376
386
|
interface TimeConfig {
|
|
377
387
|
/** Explicit minimum time in "HH:mm" 24-hour format (e.g. "09:00"). */
|
|
@@ -1539,6 +1549,46 @@ declare class FormFieldComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1539
1549
|
get effectiveMinTime(): string | null;
|
|
1540
1550
|
/** Effective maximum time for the time input (explicit maxTime only). */
|
|
1541
1551
|
get effectiveMaxTime(): string | null;
|
|
1552
|
+
/** Fixed entry granularity for this DATE field — no per-user toggle, set entirely by
|
|
1553
|
+
* config (see DateConfig.dateGranularity's doc for what each level means). */
|
|
1554
|
+
get effectiveDateGranularity(): 'DAY' | 'MONTH' | 'YEAR';
|
|
1555
|
+
/** Effective start view for the datepicker — jumps straight to the year grid for
|
|
1556
|
+
* MONTH/YEAR granularity so the day grid (and, for YEAR, the month grid) is skipped. */
|
|
1557
|
+
get datePickerStartView(): 'month' | 'year' | 'multi-year';
|
|
1558
|
+
/**
|
|
1559
|
+
* Material's (yearSelected) output on <mat-datepicker> — fires whenever a year is
|
|
1560
|
+
* clicked in the multi-year grid, for ANY granularity (it's just how Material's
|
|
1561
|
+
* datepicker works), so this only acts when granularity is actually 'YEAR': commits
|
|
1562
|
+
* Jan 1 of that year and closes immediately, skipping the month/day grids entirely.
|
|
1563
|
+
* For 'DAY'/'MONTH' granularity this is a no-op — Material's own default behavior
|
|
1564
|
+
* (drill into the month grid next) proceeds untouched.
|
|
1565
|
+
*/
|
|
1566
|
+
onDateYearSelected(date: Date, picker: {
|
|
1567
|
+
close: () => void;
|
|
1568
|
+
}): void;
|
|
1569
|
+
/**
|
|
1570
|
+
* Material's (monthSelected) output — fires when a month is clicked in the month grid.
|
|
1571
|
+
* Only acts when granularity is 'MONTH': commits day=1 for that month/year and closes
|
|
1572
|
+
* immediately, skipping the day grid. No-op for 'DAY' (default drill-in continues) and
|
|
1573
|
+
* 'YEAR' (the picker already closed at year-selection, so this never fires for YEAR).
|
|
1574
|
+
*/
|
|
1575
|
+
onDateMonthSelected(date: Date, picker: {
|
|
1576
|
+
close: () => void;
|
|
1577
|
+
}): void;
|
|
1578
|
+
/**
|
|
1579
|
+
* Fired every time the picker opens (Material's (opened) output). `startView` only sets
|
|
1580
|
+
* the calendar's view on its very first render — clicking a year (in multi-year view)
|
|
1581
|
+
* also drives Material's OWN internal auto-drill (MatCalendar's `_goToDateInView`, called
|
|
1582
|
+
* as a side effect of the exact same click that fires (yearSelected)/(monthSelected)),
|
|
1583
|
+
* which advances the calendar's `currentView` to 'year' then 'month' regardless of our
|
|
1584
|
+
* close()-on-select handlers above. There's no public API to suppress that internal
|
|
1585
|
+
* drill, so for MONTH/YEAR granularity we defensively force the view back to
|
|
1586
|
+
* 'multi-year' on every open via Material's internal calendar reference — there's no
|
|
1587
|
+
* supported public way to do this, so it's wrapped in a try/catch and silently no-ops if
|
|
1588
|
+
* that internal shape ever changes in a future Material version. No-op entirely for
|
|
1589
|
+
* 'DAY' granularity, leaving default date fields completely untouched.
|
|
1590
|
+
*/
|
|
1591
|
+
onDatePickerOpened(picker: any): void;
|
|
1542
1592
|
isMultiDropdownOpen: boolean;
|
|
1543
1593
|
isSingleDropdownOpen: boolean;
|
|
1544
1594
|
dropdownCurrentPage: number;
|
|
@@ -4515,6 +4565,12 @@ interface FilterPanelConfig {
|
|
|
4515
4565
|
smartFormConfig: FormSchema;
|
|
4516
4566
|
/** Maps each form field to the API query-param that the table expects */
|
|
4517
4567
|
filterParamMapping: FilterParamMap[];
|
|
4568
|
+
/**
|
|
4569
|
+
* Controls whether filter parameters are appended as URL query parameters ('queryParams')
|
|
4570
|
+
* or merged into tableConfig.apiPayload ('apiPayload').
|
|
4571
|
+
* Default: 'queryParams' for GET, 'apiPayload' for POST.
|
|
4572
|
+
*/
|
|
4573
|
+
filterTarget?: 'queryParams' | 'apiPayload';
|
|
4518
4574
|
/**
|
|
4519
4575
|
* Optional default values pre-filled when the component opens AND restored on Clear Filter.
|
|
4520
4576
|
* Key = formFieldName, Value = the field value.
|
|
@@ -4642,8 +4698,9 @@ declare class FilterTableSelectorComponent implements OnInit, OnChanges, OnDestr
|
|
|
4642
4698
|
*/
|
|
4643
4699
|
private buildFormJson;
|
|
4644
4700
|
/**
|
|
4645
|
-
* Rebuilds resolvedTableConfig
|
|
4646
|
-
*
|
|
4701
|
+
* Rebuilds resolvedTableConfig.
|
|
4702
|
+
* If filterTarget is 'apiPayload' (or tableConfig.apiMethod is 'POST'), filter parameters are merged into apiPayload.
|
|
4703
|
+
* Otherwise, filter parameters are appended to apiUrl as query string parameters.
|
|
4647
4704
|
*/
|
|
4648
4705
|
private applyFilterParamsToTable;
|
|
4649
4706
|
/**
|