ia-table 0.13.2 → 0.14.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.
package/dist/index.d.ts CHANGED
@@ -498,6 +498,8 @@ export declare interface RowSpanParams {
498
498
 
499
499
  export declare type SmartGridActionTypes = typeof ACTION_TYPES;
500
500
 
501
+ export declare type SmartGridAggregationType = "sum" | "count" | "avg" | "min" | "max";
502
+
501
503
  export declare interface SmartGridAPI {
502
504
  getInfiniteRowModel: () => SmartGridInfiniteRowModel | null;
503
505
  getInfiniteCache: () => SmartGridInfiniteCache | null;
@@ -666,7 +668,10 @@ export declare interface SmartGridBaseColumnDefinition {
666
668
  isWithEmptyHeaderName?: boolean;
667
669
  isParentWithChildEmptyHeaderName?: boolean;
668
670
  path?: string[];
671
+ pathIdentifier?: string;
669
672
  parentField?: string | null;
673
+ value?: string | number;
674
+ dimension_type?: string;
670
675
  originalFields?: string[];
671
676
  colId?: string;
672
677
  colSpan?: number;
@@ -697,6 +702,7 @@ export declare interface SmartGridBaseColumnDefinition {
697
702
  columnGroupShow?: "open" | "closed";
698
703
  is_multi?: boolean;
699
704
  options_column?: string;
705
+ aggregation_func?: SmartGridSelectOption[];
700
706
  [key: string]: unknown;
701
707
  };
702
708
  headerComponent?: default_2.FC<SmartGridHeaderStyleParams>;
@@ -706,6 +712,10 @@ export declare interface SmartGridBaseColumnDefinition {
706
712
  originalPath?: string[] | null;
707
713
  isReorderedColumn?: boolean | null;
708
714
  processCellForClipboard?: (params: SmartGridCellRendererParams) => string;
715
+ pivotAggregation?: "sum" | "count" | "avg" | "min" | "max";
716
+ pivotFilterValue?: string;
717
+ pivotFilterMode?: "value" | "condition";
718
+ pivotFilterCondition?: string;
709
719
  [key: string]: unknown;
710
720
  }
711
721
 
@@ -871,6 +881,7 @@ export declare interface SmartGridButtonProps {
871
881
  leftIcon?: ReactNode;
872
882
  rightIcon?: ReactNode;
873
883
  buttonRef?: MutableRefObject<HTMLButtonElement> | RefObject<HTMLButtonElement>;
884
+ simpleButton?: boolean;
874
885
  }
875
886
 
876
887
  export declare type SmartGridButtonSize = "small" | "medium" | "large";
@@ -1111,6 +1122,7 @@ export declare type SmartGridCellRendererParams = {
1111
1122
  leftLabel?: string;
1112
1123
  rightLabel?: string;
1113
1124
  splits?: SmartGridColumnDefinition[];
1125
+ isEnableResetButton?: boolean;
1114
1126
  } & Record<string, unknown>;
1115
1127
 
1116
1128
  export declare interface SmartGridCellRendererRendererProps {
@@ -1624,6 +1636,8 @@ export declare type SmartGridFetDataParams = (body: SmartGridFetchDataFunctionBo
1624
1636
  totalCount?: number | null;
1625
1637
  }>;
1626
1638
 
1639
+ export declare type SmartGridFilterMode = "value" | "condition";
1640
+
1627
1641
  export declare interface SmartGridFilterModel {
1628
1642
  pattern: string;
1629
1643
  search_type: string;
@@ -2319,6 +2333,231 @@ export declare type SmartGridPinnedType = "leftPinned" | "rightPinned" | null;
2319
2333
 
2320
2334
  export declare type SmartGridPinType = "leftPinnedOnly" | "rightPinnedOnly" | "normal";
2321
2335
 
2336
+ export declare interface SmartGridPivotAggregationOption {
2337
+ value: string;
2338
+ label: string;
2339
+ }
2340
+
2341
+ export declare interface SmartGridPivotConfig {
2342
+ PivotComponent: React.FC<SmartGridPivotWrapperProps>;
2343
+ savedPivotState: SmartGridPivotState | undefined;
2344
+ pivotPanelColumnDef: SmartGridColumnDefinition[];
2345
+ enablePivotTutorial?: boolean;
2346
+ savedPivots?: SmartGridPivotState[];
2347
+ recentlyUsedPivots?: SmartGridPivotState[];
2348
+ isHidePivotSave?: boolean;
2349
+ pivotChildren?: React.ReactNode;
2350
+ handlePivotSave?: (state: SmartGridPivotSavePayload, setIsPivotOpen: React.Dispatch<React.SetStateAction<boolean>>) => void;
2351
+ handlePivotApply?: (state: SmartGridPivotState, setIsPivotOpen: React.Dispatch<React.SetStateAction<boolean>>) => void;
2352
+ pivotAggregationFunc?: SmartGridSelectOption[];
2353
+ showPivotTotalsSection?: boolean;
2354
+ isPivotRowGrandTotal?: boolean;
2355
+ isPivotColumnGrandTotal?: boolean;
2356
+ isPivotRowSubTotal?: boolean;
2357
+ isPivotColumnSubTotal?: boolean;
2358
+ isHideFilters?: boolean;
2359
+ isHideValues?: boolean;
2360
+ }
2361
+
2362
+ export declare interface SmartGridPivotDropZoneItem {
2363
+ mode: string;
2364
+ filterValue: string;
2365
+ id: string;
2366
+ name: string;
2367
+ aggregation?: SmartGridAggregationType;
2368
+ condition?: string;
2369
+ }
2370
+
2371
+ export declare interface SmartGridPivotDropZoneProps {
2372
+ type: "rows" | "columns" | "values";
2373
+ items: SmartGridColumnDefinition[];
2374
+ defaultExpanded?: boolean;
2375
+ onDrop: (column: SmartGridColumnDefinition) => void;
2376
+ onRemoveItem: (itemId: string) => void;
2377
+ isDragOver?: boolean;
2378
+ onClearAll?: () => void;
2379
+ }
2380
+
2381
+ export declare interface SmartGridPivotField {
2382
+ id: string;
2383
+ name: string;
2384
+ type: "dimension" | "measure";
2385
+ }
2386
+
2387
+ export declare interface SmartGridPivotFieldItemProps {
2388
+ column: SmartGridColumnDefinition;
2389
+ isDragging?: boolean;
2390
+ }
2391
+
2392
+ export declare interface SmartGridPivotFieldListProps {
2393
+ fields: SmartGridColumnDefinition[];
2394
+ }
2395
+
2396
+ export declare interface SmartGridPivotFilterConditionOption {
2397
+ value: string;
2398
+ label: string;
2399
+ }
2400
+
2401
+ export declare interface SmartGridPivotFilterConditions {
2402
+ number?: SmartGridPivotFilterConditionOption[];
2403
+ text?: SmartGridPivotFilterConditionOption[];
2404
+ }
2405
+
2406
+ export declare interface SmartGridPivotFilterItem {
2407
+ id: string;
2408
+ name: string;
2409
+ value: string;
2410
+ mode: SmartGridFilterMode;
2411
+ condition?: string;
2412
+ }
2413
+
2414
+ export declare interface SmartGridPivotFiltersSectionProps {
2415
+ items: SmartGridColumnDefinition[];
2416
+ defaultExpanded?: boolean;
2417
+ onDrop: (column: SmartGridColumnDefinition) => void;
2418
+ onRemoveItem: (id: string) => void;
2419
+ onFilterValueChange: (id: string, value: string) => void;
2420
+ onFilterModeChange?: (id: string, mode: SmartGridFilterMode) => void;
2421
+ onFilterConditionChange?: (id: string, condition: string) => void;
2422
+ onClearAll?: () => void;
2423
+ }
2424
+
2425
+ export declare interface SmartGridPivotFooterProps {
2426
+ onCancel: () => void;
2427
+ onSave?: () => void;
2428
+ onApply?: () => void;
2429
+ isSaveDisabled?: boolean;
2430
+ isApplyDisabled?: boolean;
2431
+ isHideSave?: boolean;
2432
+ cancelText?: string;
2433
+ saveText?: string;
2434
+ applyText?: string;
2435
+ }
2436
+
2437
+ export declare interface SmartGridPivotHeaderProps {
2438
+ title: string;
2439
+ onClose: () => void;
2440
+ }
2441
+
2442
+ export declare type SmartGridPivotMode = "saved" | "create";
2443
+
2444
+ export declare interface SmartGridPivotNotificationProps {
2445
+ message: string;
2446
+ defaultVisible?: boolean;
2447
+ onClose?: () => void;
2448
+ }
2449
+
2450
+ export declare interface SmartGridPivotPanelProps {
2451
+ isOpen: boolean;
2452
+ onClose: () => void;
2453
+ onSave: (state: SmartGridPivotSavePayload) => void;
2454
+ availableFields: SmartGridColumnDefinition[];
2455
+ versions?: SmartGridPivotVersion[];
2456
+ selectedVersion?: SmartGridPivotVersion;
2457
+ onVersionChange?: (version: SmartGridPivotVersion) => void;
2458
+ initialState?: Partial<SmartGridPivotState>;
2459
+ showNotification?: boolean;
2460
+ onNotificationClose?: () => void;
2461
+ pivotAggrValues?: SmartGridPivotAggregationOption[];
2462
+ pivotFilterConditions?: SmartGridPivotFilterConditions;
2463
+ pivotChildren?: React.ReactNode;
2464
+ savedPivots?: SmartGridPivotState[];
2465
+ recentlyUsedPivots?: SmartGridPivotState[];
2466
+ onDeleteSavedPivot?: (pivotId: string) => void;
2467
+ onEditSavedPivot?: (pivot: SmartGridPivotState) => void;
2468
+ defaultMode?: SmartGridPivotMode;
2469
+ handlePivotApply?: (state: SmartGridPivotState) => void;
2470
+ isHidePivotSave?: boolean;
2471
+ showTotalsSection?: boolean;
2472
+ pivotAggregationFunc?: SmartGridSelectOption[];
2473
+ isPivotRowGrandTotal?: boolean;
2474
+ isPivotColumnGrandTotal?: boolean;
2475
+ isPivotRowSubTotal?: boolean;
2476
+ isPivotColumnSubTotal?: boolean;
2477
+ isHideFilters?: boolean;
2478
+ isHideValues?: boolean;
2479
+ }
2480
+
2481
+ export declare type SmartGridPivotSaveHandler = {
2482
+ handlePivotSave?: (state: SmartGridPivotSavePayload, setIsPivotOpen: Dispatch<SetStateAction<boolean>>) => void;
2483
+ handlePivotApply?: (state: SmartGridPivotSavePayload, setIsPivotOpen: Dispatch<SetStateAction<boolean>>) => void;
2484
+ };
2485
+
2486
+ export declare interface SmartGridPivotSavePayload extends SmartGridPivotState {
2487
+ isReplace?: boolean;
2488
+ isUpdated?: boolean;
2489
+ oldName?: string;
2490
+ }
2491
+
2492
+ export declare interface SmartGridPivotSectionProps {
2493
+ title: string;
2494
+ type: SmartGridPivotSectionType;
2495
+ isExpanded: boolean;
2496
+ onToggleExpand: () => void;
2497
+ children?: React.ReactNode;
2498
+ }
2499
+
2500
+ export declare interface SmartGridPivotSectionState {
2501
+ items: SmartGridColumnDefinition[];
2502
+ }
2503
+
2504
+ export declare type SmartGridPivotSectionType = "rows" | "columns" | "values" | "filters" | "totals";
2505
+
2506
+ export declare interface SmartGridPivotState {
2507
+ id?: string;
2508
+ name: string;
2509
+ viewType?: SmartGridPivotViewType;
2510
+ isDefault?: boolean;
2511
+ rows: SmartGridPivotSectionState;
2512
+ columns: SmartGridPivotSectionState;
2513
+ values: SmartGridPivotSectionState;
2514
+ filters: SmartGridPivotSectionState;
2515
+ totals: SmartGridPivotTotalsState;
2516
+ }
2517
+
2518
+ export declare interface SmartGridPivotTotalsState {
2519
+ showRowGrandTotal: boolean;
2520
+ showColumnGrandTotal: boolean;
2521
+ showRowSubTotal: boolean;
2522
+ showColumnSubTotal: boolean;
2523
+ }
2524
+
2525
+ export declare interface SmartGridPivotValueItem {
2526
+ id: string;
2527
+ name: string;
2528
+ aggregation: SmartGridAggregationType;
2529
+ }
2530
+
2531
+ export declare interface SmartGridPivotValuesSectionProps {
2532
+ items: SmartGridColumnDefinition[];
2533
+ defaultExpanded?: boolean;
2534
+ onDrop: (column: SmartGridColumnDefinition) => void;
2535
+ onRemoveItem: (id: string) => void;
2536
+ onAggregationChange: (id: string, aggregation: SmartGridAggregationType) => void;
2537
+ onClearAll?: () => void;
2538
+ pivotAggregationFunc?: SmartGridSelectOption[];
2539
+ }
2540
+
2541
+ export declare interface SmartGridPivotVersion {
2542
+ value: string;
2543
+ label: string;
2544
+ }
2545
+
2546
+ export declare interface SmartGridPivotVersionSelectProps {
2547
+ label: string;
2548
+ versions: SmartGridPivotVersion[];
2549
+ selectedVersion: SmartGridPivotVersion | null;
2550
+ onVersionChange: (version: SmartGridPivotVersion) => void;
2551
+ }
2552
+
2553
+ export declare type SmartGridPivotViewType = "global" | "personal";
2554
+
2555
+ export declare interface SmartGridPivotWrapperProps {
2556
+ pivotConfig: SmartGridPivotConfig;
2557
+ shouldRenderTable: boolean;
2558
+ showSaveTableConfig: boolean;
2559
+ }
2560
+
2322
2561
  export declare interface SmartGridPromptButton {
2323
2562
  label: string;
2324
2563
  type: "default" | "primary" | "secondary";
@@ -2347,6 +2586,7 @@ export declare interface SmartGridRadioGroupProps {
2347
2586
  orientation?: SmartGridRadioOrientation;
2348
2587
  disabled?: boolean;
2349
2588
  name?: string;
2589
+ className?: string;
2350
2590
  }
2351
2591
 
2352
2592
  export declare interface SmartGridRadioOption {
@@ -2571,6 +2811,7 @@ export declare interface SmartGridRowRenderProps {
2571
2811
  scrollContainerRef: RefObject<HTMLDivElement>;
2572
2812
  rowHeightCache: RowHeightCache | null;
2573
2813
  adjustTableHeightServerSide?: boolean;
2814
+ height: string | number;
2574
2815
  }
2575
2816
 
2576
2817
  export declare interface SmartGridRowSpanInfo {
@@ -2729,6 +2970,7 @@ export declare interface SmartGridSelectProps {
2729
2970
  isCellRenderer?: boolean;
2730
2971
  tableApi?: SmartGridAPI | null;
2731
2972
  lazyLoadCellRenderer?: boolean;
2973
+ isEnableResetButton?: boolean;
2732
2974
  }
2733
2975
 
2734
2976
  export declare interface SmartGridServerProps {
@@ -2941,6 +3183,7 @@ export declare interface SmartGridStateContext {
2941
3183
  isSavingViewLoading?: boolean;
2942
3184
  savedViewsOptions?: SmartGridSavedViewsOptions[];
2943
3185
  } & Record<string, unknown>;
3186
+ pivotPanelColumnDef: null | SmartGridColumnDefinition[];
2944
3187
  [key: string]: unknown;
2945
3188
  }
2946
3189
 
@@ -3080,6 +3323,7 @@ export declare interface SmartGridTableContentProps {
3080
3323
  copyToClipboardHandler?: () => void;
3081
3324
  downloadExcelHandler?: () => void;
3082
3325
  downloadCSVHandler?: () => void;
3326
+ pivotConfig?: SmartGridPivotConfig;
3083
3327
  }
3084
3328
 
3085
3329
  export declare interface SmartGridTableContentRendererProps {
@@ -3306,6 +3550,7 @@ export declare interface SmartGridTableProps extends SmartGridSaveViewCallbackRe
3306
3550
  hasSplitRenderer?: boolean;
3307
3551
  splitRendererKeys?: string[];
3308
3552
  removeSelectionOnOperation?: boolean;
3553
+ pivotConfig?: SmartGridPivotConfig;
3309
3554
  }
3310
3555
 
3311
3556
  export declare interface SmartGridTableRef {