commons-shared-web-ui 0.0.68 → 0.0.69

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,32 @@ 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;
1542
1578
  isMultiDropdownOpen: boolean;
1543
1579
  isSingleDropdownOpen: boolean;
1544
1580
  dropdownCurrentPage: number;
@@ -4515,6 +4551,12 @@ interface FilterPanelConfig {
4515
4551
  smartFormConfig: FormSchema;
4516
4552
  /** Maps each form field to the API query-param that the table expects */
4517
4553
  filterParamMapping: FilterParamMap[];
4554
+ /**
4555
+ * Controls whether filter parameters are appended as URL query parameters ('queryParams')
4556
+ * or merged into tableConfig.apiPayload ('apiPayload').
4557
+ * Default: 'queryParams' for GET, 'apiPayload' for POST.
4558
+ */
4559
+ filterTarget?: 'queryParams' | 'apiPayload';
4518
4560
  /**
4519
4561
  * Optional default values pre-filled when the component opens AND restored on Clear Filter.
4520
4562
  * Key = formFieldName, Value = the field value.
@@ -4642,8 +4684,9 @@ declare class FilterTableSelectorComponent implements OnInit, OnChanges, OnDestr
4642
4684
  */
4643
4685
  private buildFormJson;
4644
4686
  /**
4645
- * Rebuilds resolvedTableConfig with the current activeFilterParams appended
4646
- * to the base API URL.
4687
+ * Rebuilds resolvedTableConfig.
4688
+ * If filterTarget is 'apiPayload' (or tableConfig.apiMethod is 'POST'), filter parameters are merged into apiPayload.
4689
+ * Otherwise, filter parameters are appended to apiUrl as query string parameters.
4647
4690
  */
4648
4691
  private applyFilterParamsToTable;
4649
4692
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commons-shared-web-ui",
3
- "version": "0.0.68",
3
+ "version": "0.0.69",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "20.3.15",
6
6
  "@angular/cdk": "20.2.14",