@progress/kendo-vue-data-tools 7.0.3-develop.1 → 7.1.0-develop.2

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.mts CHANGED
@@ -194,7 +194,7 @@ export declare interface CellProps {
194
194
  export declare const closestTagName: (target: HTMLElement | null, tagName: 'TD' | 'TR' | 'TABLE') => HTMLElement | null;
195
195
 
196
196
  /**
197
- * @hidden
197
+ * Base interface for column props
198
198
  */
199
199
  export declare interface ColumnBaseProps {
200
200
  /**
@@ -336,6 +336,9 @@ export declare type ColumnSortSettings = boolean | {
336
336
  allowUnsort?: boolean;
337
337
  };
338
338
 
339
+ /** @hidden */
340
+ export declare const combineFilters: (first?: CompositeFilterDescriptor, second?: CompositeFilterDescriptor) => CompositeFilterDescriptor;
341
+
339
342
  /**
340
343
  * @hidden
341
344
  */
@@ -412,6 +415,34 @@ export declare const defaultHideSecondFilter: {
412
415
  boolean: boolean;
413
416
  };
414
417
 
418
+ /** @hidden */
419
+ export declare enum DETAIL_EXPAND_ACTION {
420
+ DETAIL_EXPAND = "DETAIL_EXPAND_DETAIL_EXPAND",
421
+ COLLAPSE = "DETAIL_EXPAND_COLLAPSE",
422
+ TOGGLE = "DETAIL_EXPAND_TOGGLE",
423
+ SET = "DETAIL_EXPAND_SET"
424
+ }
425
+
426
+ /** @hidden */
427
+ export declare type DetailExpandAction = {
428
+ type: DETAIL_EXPAND_ACTION.TOGGLE | DETAIL_EXPAND_ACTION.DETAIL_EXPAND | DETAIL_EXPAND_ACTION.COLLAPSE;
429
+ id: string;
430
+ } | {
431
+ type: DETAIL_EXPAND_ACTION.SET;
432
+ id: string;
433
+ payload: boolean;
434
+ };
435
+
436
+ /**
437
+ * The descriptor used to define the expanded state of the detail-row.
438
+ */
439
+ export declare type DetailExpandDescriptor = {
440
+ [id: string]: boolean;
441
+ };
442
+
443
+ /** @hidden */
444
+ export declare const detailExpandReducer: (state: DetailExpandDescriptor, action: DetailExpandAction) => DetailExpandDescriptor;
445
+
415
446
  /**
416
447
  * @hidden
417
448
  */
@@ -433,6 +464,65 @@ left: number;
433
464
  top: number;
434
465
  }, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
435
466
 
467
+ /**
468
+ * @hidden
469
+ */
470
+ export declare enum EDIT_ACTION {
471
+ ENTER_EDIT = "EDITING_ENTER_EDIT",
472
+ ENTER_FIELD_EDIT = "EDITING_ENTER_FIELD_EDIT",
473
+ ADD_EDIT = "EDITING_ADD_EDIT",
474
+ ADD_FIELD_EDIT = "EDITING_ADD_FIELD_EDIT",
475
+ EXIT_EDIT = "EDITING_EXIT_EDIT",
476
+ EXIT_FIELD_EDIT = "EDITING_EXIT_FIELD_EDIT",
477
+ TOGGLE_EDIT = "EDITING_TOGGLE_EDIT",
478
+ TOGGLE_FIELD_EDIT = "EDITING_TOGGLE_FIELD_EDIT"
479
+ }
480
+
481
+ /**
482
+ * @hidden
483
+ */
484
+ export declare type EditAction = {
485
+ type: EDIT_ACTION.ENTER_EDIT | EDIT_ACTION.ADD_EDIT | EDIT_ACTION.EXIT_EDIT | EDIT_ACTION.TOGGLE_EDIT;
486
+ payload: {
487
+ id: string;
488
+ };
489
+ } | {
490
+ type: EDIT_ACTION.ENTER_FIELD_EDIT | EDIT_ACTION.ADD_FIELD_EDIT | EDIT_ACTION.EXIT_FIELD_EDIT | EDIT_ACTION.TOGGLE_FIELD_EDIT;
491
+ payload: {
492
+ id: string;
493
+ field: string;
494
+ };
495
+ };
496
+
497
+ /**
498
+ * The `edit` descriptor used to identify which data-items are in edit mode.
499
+ *
500
+ * @example
501
+ * ```ts
502
+ * const data = [
503
+ * { id: 0, name: 'Jane Doe' },
504
+ * { id: 1, name: 'John Doe' }
505
+ * ]
506
+ *
507
+ * const edit = {
508
+ * 1: true
509
+ * }
510
+ * ```
511
+ */
512
+ export declare type EditDescriptor = {
513
+ /**
514
+ * The data-item id is in edit mode.
515
+ * If the value is `true` if the whole item (row) is in edit mode.
516
+ * If the value is an array of strings if only specific fields (cells) are in edit mode.
517
+ */
518
+ [id: string]: boolean | string[];
519
+ };
520
+
521
+ /**
522
+ * @hidden
523
+ */
524
+ export declare const editReducer: (state: EditDescriptor, action: EditAction) => EditDescriptor;
525
+
436
526
  /**
437
527
  * @hidden
438
528
  */
@@ -947,6 +1037,12 @@ export declare interface FilterRowProps {
947
1037
  size?: string;
948
1038
  }
949
1039
 
1040
+ /** @hidden */
1041
+ export declare const findGroupExpand: (groupExpand: GroupExpandDescriptor[], group: GroupState) => GroupExpandDescriptor | undefined;
1042
+
1043
+ /** @hidden */
1044
+ export declare const flatToTree: (flat: GroupState[]) => GroupExpandDescriptor[];
1045
+
950
1046
  /**
951
1047
  * @hidden
952
1048
  */
@@ -960,11 +1056,22 @@ export declare const getColumnIndex: (element: HTMLTableCellElement) => number;
960
1056
  */
961
1057
  export declare const getDefaultOperator: (filterOperators: FilterOperators | FilterOperator[], filterType?: string) => any;
962
1058
 
1059
+ /** @hidden */
1060
+ export declare const getDetailExpandableOptions: (expandable?: boolean | TableExpandableSettings) => TableExpandableSettings;
1061
+
1062
+ /**
1063
+ * @hidden
1064
+ */
1065
+ export declare const getEditableOptions: (editable?: boolean | TableEditableSettings) => Required<TableEditableSettings>;
1066
+
963
1067
  /**
964
1068
  * @hidden
965
1069
  */
966
1070
  export declare const getFilterType: (filterType: 'text' | 'numeric' | 'boolean' | 'date' | undefined) => "boolean" | "text" | "date" | "numeric";
967
1071
 
1072
+ /** @hidden */
1073
+ export declare const getGroupExpandableOptions: (groupExpandable?: boolean | TableGroupExpandableSettings) => TableGroupExpandableSettings;
1074
+
968
1075
  /**
969
1076
  * Get all group ids from the data.
970
1077
  *
@@ -986,6 +1093,9 @@ export declare const getOffset: (offsetParent: any) => any;
986
1093
  /** @hidden */
987
1094
  export declare const getRowIndex: (element: HTMLTableRowElement) => number;
988
1095
 
1096
+ /** @hidden */
1097
+ export declare const getSearchFromString: (search: CompositeFilterDescriptor, value: string) => CompositeFilterDescriptor;
1098
+
989
1099
  /**
990
1100
  * Get selected state from the component selection event.
991
1101
  *
@@ -1026,6 +1136,9 @@ export declare const getSelectionOptions: (selectable?: TableSelectableSettings)
1026
1136
  cell: boolean;
1027
1137
  };
1028
1138
 
1139
+ /** @hidden */
1140
+ export declare const getStringFromSearch: (search: CompositeFilterDescriptor | undefined) => string;
1141
+
1029
1142
  /**
1030
1143
  * The pager settings of the Grid ([see example]({% slug paging_grid %})).
1031
1144
  *
@@ -1086,6 +1199,14 @@ export declare interface GridPagerSettings {
1086
1199
  */
1087
1200
  export declare type GridPagerType = 'numeric' | 'input';
1088
1201
 
1202
+ /** @hidden */
1203
+ export declare enum GROUP_EXPAND_ACTION {
1204
+ TOGGLE = "GROUP-EXPAND_TOGGLE",
1205
+ EXPAND = "GROUP-EXPAND_EXPAND",
1206
+ COLLAPSE = "GROUP-EXPAND_COLLAPSE",
1207
+ RESET = "GROUP-EXPAND_RESET"
1208
+ }
1209
+
1089
1210
  /**
1090
1211
  * @hidden
1091
1212
  */
@@ -1096,6 +1217,25 @@ export declare interface GroupChangeEvent {
1096
1217
  nextFilter: CompositeFilterDescriptor;
1097
1218
  }
1098
1219
 
1220
+ /** @hidden */
1221
+ export declare type GroupExpandAction = {
1222
+ type: GROUP_EXPAND_ACTION;
1223
+ group: GroupState;
1224
+ };
1225
+
1226
+ /**
1227
+ * The descriptor used to define the expanded state of a group.
1228
+ */
1229
+ export declare type GroupExpandDescriptor = {
1230
+ value: any;
1231
+ field: string;
1232
+ expanded?: boolean;
1233
+ groups?: GroupExpandDescriptor[];
1234
+ };
1235
+
1236
+ /** @hidden */
1237
+ export declare const groupExpandReducer: (state: GroupExpandDescriptor[], action: GroupExpandAction, options?: TableGroupExpandableSettings) => GroupExpandDescriptor[];
1238
+
1099
1239
  /**
1100
1240
  * @hidden
1101
1241
  */
@@ -1155,6 +1295,14 @@ export declare interface GroupRemoveEvent {
1155
1295
  filter: CompositeFilterDescriptor;
1156
1296
  }
1157
1297
 
1298
+ /** @hidden */
1299
+ export declare type GroupState = {
1300
+ value: any;
1301
+ field: string;
1302
+ expanded?: boolean;
1303
+ parents?: GroupState[];
1304
+ };
1305
+
1158
1306
  /**
1159
1307
  * @hidden
1160
1308
  */
@@ -1525,6 +1673,9 @@ export declare interface HeaderThElementProps {
1525
1673
  navigatable?: boolean;
1526
1674
  }
1527
1675
 
1676
+ /** @hidden */
1677
+ export declare const isExpanded: (groupExpand: GroupExpandDescriptor[], group: GroupState) => boolean;
1678
+
1528
1679
  /**
1529
1680
  * @hidden
1530
1681
  */
@@ -1587,7 +1738,18 @@ export declare function mapColumns(columns: Array<{
1587
1738
  right: number;
1588
1739
  rightBorder: boolean;
1589
1740
  ariaColumnIndex: number;
1590
- }>): number[][];
1741
+ }>, changedColumnLength?: boolean): number[][];
1742
+
1743
+ /**
1744
+ * @hidden
1745
+ */
1746
+ export declare function nextColumn(columns: {
1747
+ depth: number;
1748
+ locked?: boolean;
1749
+ }[], current: number): {
1750
+ depth: number;
1751
+ locked?: boolean;
1752
+ };
1591
1753
 
1592
1754
  /**
1593
1755
  * @hidden
@@ -2068,7 +2230,7 @@ export declare interface PagerProps extends GridPagerSettings {
2068
2230
  /**
2069
2231
  * @hidden
2070
2232
  */
2071
- export declare function readColumns(elements: TreeColumnBaseProps[], idInfo: {
2233
+ export declare function readColumns<C = CellProps, H = HeaderCellProps, F = FilterCellProps>(elements: TreeColumnBaseProps[], idInfo: {
2072
2234
  prevId: number;
2073
2235
  idPrefix: string;
2074
2236
  }, depth?: number): ExtendedColumnProps[];
@@ -2076,6 +2238,24 @@ export declare function readColumns(elements: TreeColumnBaseProps[], idInfo: {
2076
2238
  /** @hidden */
2077
2239
  export declare const relativeContextElement: (element: any) => any;
2078
2240
 
2241
+ /**
2242
+ * Represents the SearchField that configures the way a data field is searched.
2243
+ */
2244
+ export declare interface SearchField {
2245
+ /**
2246
+ * The name of the searched field.
2247
+ */
2248
+ field: string;
2249
+ /**
2250
+ * The string operator that will be used for search.
2251
+ */
2252
+ operator?: string;
2253
+ /**
2254
+ * Defines if the search is case sensitive.
2255
+ */
2256
+ ignoreCase?: boolean;
2257
+ }
2258
+
2079
2259
  /**
2080
2260
  * Apply the `expanded` prop to the group items in data based on the provided collection of group ids.
2081
2261
  *
@@ -2216,6 +2396,36 @@ export declare interface TableDragSelectionReleaseEvent {
2216
2396
  isDrag: boolean;
2217
2397
  }
2218
2398
 
2399
+ export declare interface TableEditableSettings {
2400
+ /**
2401
+ * Determines if the editing is enabled.
2402
+ *
2403
+ * @default false
2404
+ */
2405
+ enabled?: boolean;
2406
+ /**
2407
+ * Determines the editing mode.
2408
+ * The available values are:
2409
+ * * `inline`
2410
+ * * `incell`
2411
+ *
2412
+ * @default 'incell
2413
+ */
2414
+ mode?: 'inline' | 'incell' | 'dialog';
2415
+ }
2416
+
2417
+ /** @hidden */
2418
+ export declare type TableExpandableSettings = {
2419
+ enabled?: boolean;
2420
+ column?: string;
2421
+ };
2422
+
2423
+ /** @hidden */
2424
+ export declare type TableGroupExpandableSettings = {
2425
+ enabled?: boolean;
2426
+ defaultExpand?: boolean;
2427
+ };
2428
+
2219
2429
  /**
2220
2430
  * @hidden
2221
2431
  */
@@ -2329,7 +2539,7 @@ export declare interface TableKeyboardNavigationStateType {
2329
2539
  * @hidden
2330
2540
  */
2331
2541
  export declare const tableKeyboardNavigationTools: {
2332
- generateNavigatableId: (navigationId: string, idPrefix: string, type?: 'column' | 'cell') => string;
2542
+ generateNavigatableId: (navigationId: string, idPrefix: string, type?: 'column' | 'cell' | 'group' | 'expand' | 'nodata') => string;
2333
2543
  getNavigatableId: (element: Element | null) => string;
2334
2544
  getNavigatableLevel: (element: Element | null) => number;
2335
2545
  getNavigatableElement: (scope: HTMLElement, options?: {
@@ -2541,6 +2751,10 @@ export declare interface TreeColumnBaseProps extends ColumnBaseProps {
2541
2751
  * Defines the component that will be rendered as a filter cell.
2542
2752
  */
2543
2753
  filterCell?: any;
2754
+ /**
2755
+ * Defines the component that will be rendered as a footer cell.
2756
+ */
2757
+ footerCell?: any;
2544
2758
  }
2545
2759
 
2546
2760
  /**
@@ -2548,4 +2762,42 @@ export declare interface TreeColumnBaseProps extends ColumnBaseProps {
2548
2762
  */
2549
2763
  export declare const unaryOperator: (operator: any) => boolean;
2550
2764
 
2765
+ /**
2766
+ * @hidden
2767
+ */
2768
+ export declare function updateLeft(columnsMap: number[][], columns: Array<{
2769
+ parentIndex: number;
2770
+ colSpan?: number;
2771
+ rowSpan: number;
2772
+ depth: number;
2773
+ kFirst?: boolean;
2774
+ children: any[];
2775
+ width?: string | number;
2776
+ locked?: boolean;
2777
+ index: number;
2778
+ left: number;
2779
+ right: number;
2780
+ rightBorder: boolean;
2781
+ ariaColumnIndex: number;
2782
+ }>, generateLeft?: boolean): void;
2783
+
2784
+ /**
2785
+ * @hidden
2786
+ */
2787
+ export declare function updateRight(columnsMap: number[][], columns: Array<{
2788
+ parentIndex: number;
2789
+ colSpan?: number;
2790
+ rowSpan: number;
2791
+ depth: number;
2792
+ kFirst?: boolean;
2793
+ children: any[];
2794
+ width?: string | number;
2795
+ locked?: boolean;
2796
+ index: number;
2797
+ left: number;
2798
+ right: number;
2799
+ rightBorder: boolean;
2800
+ ariaColumnIndex: number;
2801
+ }>, generateRight?: boolean): void;
2802
+
2551
2803
  export { }