impact-nova 2.6.2 → 2.6.3

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.
@@ -1,6 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ColDef, ColGroupDef, IHeaderParams, IHeaderGroupParams, Column, ValueFormatterParams } from 'ag-grid-community';
3
3
  import { Theme } from 'ag-grid-enterprise';
4
+ import { FiscalPickerProps } from '../../forms/date-picker/date-picker.types';
5
+ import { FiscalCalendarConfig } from '../../../lib/fiscal-calendar';
4
6
  import { AgGridReactProps } from 'ag-grid-react';
5
7
  /** ColDef extended with Impact Nova runtime metadata set during column processing */
6
8
  export interface ImpactNovaColDef<TData = unknown> extends ColDef<TData> {
@@ -44,15 +46,18 @@ export interface ExtendedHeaderComponentParams extends Partial<IHeaderParams> {
44
46
  datePickerVariant?: 'date' | 'month' | 'week';
45
47
  /** Display format for dates in this column (date-fns token string). Default: "MM/dd/yyyy" */
46
48
  dateDisplayFormat?: string;
47
- /** Fiscal calendar configuration for week/month picker */
48
- fiscalConfig?: {
49
- calendarKind?: 'gregorian' | 'fiscal';
50
- fiscalMode?: 'basic' | 'advanced' | 'custom';
51
- granularity?: 'day' | 'week' | 'period' | 'quarter' | 'year';
52
- fiscalMonthPattern?: number[];
53
- fiscalYearStartMonth?: number;
54
- weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
55
- };
49
+ /**
50
+ * Fiscal options — same sibling shape as form `week_range` / FiscalPickerProps:
51
+ * calendarKind, fiscalMode, granularity, weekStartsOn, fiscalYearStartMonth,
52
+ * fiscalConfig: { kind: 'retail' | 'shifted-year' | 'custom-table', ... }
53
+ */
54
+ calendarKind?: FiscalPickerProps['calendarKind'];
55
+ fiscalMode?: FiscalPickerProps['fiscalMode'];
56
+ granularity?: FiscalPickerProps['granularity'];
57
+ fiscalMonthPattern?: FiscalPickerProps['fiscalMonthPattern'];
58
+ fiscalYearStartMonth?: FiscalPickerProps['fiscalYearStartMonth'];
59
+ weekStartsOn?: FiscalPickerProps['weekStartsOn'];
60
+ fiscalConfig?: FiscalCalendarConfig;
56
61
  /** Generic info data for the info modal */
57
62
  infoData?: InfoContent;
58
63
  /** How to display the information (tooltip or modal) */
@@ -1,16 +1,7 @@
1
1
  import { default as React } from 'react';
2
+ import { FiscalPickerProps } from '../../../../forms/date-picker/date-picker.types';
2
3
  export type DatePickerVariant = 'date' | 'month' | 'week';
3
- export interface FiscalConfig {
4
- calendarKind?: 'gregorian' | 'fiscal';
5
- fiscalMode?: 'basic' | 'advanced' | 'custom';
6
- granularity?: 'day' | 'week' | 'period' | 'quarter' | 'year';
7
- fiscalMonthPattern?: number[];
8
- fiscalYearStartMonth?: number;
9
- weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
10
- fiscalConfig?: import('../../../../../lib/fiscal-calendar').FiscalCalendarConfig;
11
- showPresets?: boolean;
12
- }
13
- export interface DateFilterPickerProps {
4
+ export interface DateFilterPickerProps extends FiscalPickerProps {
14
5
  variant: DatePickerVariant;
15
6
  mode: 'single' | 'range';
16
7
  value: {
@@ -21,7 +12,6 @@ export interface DateFilterPickerProps {
21
12
  dateFrom: string;
22
13
  dateTo: string;
23
14
  } | null) => void;
24
- fiscalConfig?: FiscalConfig;
25
15
  placeholder?: string;
26
16
  className?: string;
27
17
  showFooter?: boolean;