@progress/kendo-react-data-tools 9.3.1 → 9.4.0-develop.1

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.
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var N=(e=>(e.TOGGLE="GROUP-EXPAND_TOGGLE",e.EXPAND="GROUP-EXPAND_EXPAND",e.COLLAPSE="GROUP-EXPAND_COLLAPSE",e.RESET="GROUP-EXPAND_RESET",e))(N||{});const U=e=>{var r;return{enabled:typeof e=="boolean"?e:(r=e==null?void 0:e.enabled)!=null?r:!0,defaultExpand:typeof e=="object"?e==null?void 0:e.defaultExpand:!0}},v=(e=[],r=null)=>{const u=[];return e==null||e.forEach(d=>{var s;const l={value:d.value,field:d.field,parents:r?[r,...(s=r.parents)!=null?s:[]]:[]};d.expanded!==void 0&&(l.expanded=d.expanded),d.groups&&u.push(...v(d.groups,l)),u.push(l)}),u},x=e=>{var r,u,d,l;return`${(r=e.parents)!=null&&r.length?((l=(d=(u=e.parents)==null?void 0:u.slice())==null?void 0:d.reverse())==null?void 0:l.map(s=>x({field:s.field,value:s.value})).join("/"))+"/":""}${e.field}:${e.value}`},w=(e,r)=>{const u=v(e);return g(u,r)},j=(e,r)=>{var l;const u=v(e),d=g(u,r);return d?(l=d.expanded)!=null?l:!0:!1},i=e=>{var l;const r=new Map;r.set("root",{value:null,field:"",groups:new Set}),(s=>{s.forEach(a=>{var o,P,h,G;const c=x(a),n=(o=r.get(c))!=null?o:{value:a.value,field:a.field};a.expanded!==void 0&&(n.expanded=a.expanded),r.has(c)||r.set(c,n);let f=n;(P=a.parents)!=null&&P.length?a.parents.forEach((p,O)=>{var A,L,R,S,T,D,X;const E=x({value:p.value,field:p.field,parents:(L=a.parents)==null?void 0:L.slice(O+1,(A=a==null?void 0:a.parents)==null?void 0:A.length)}),t=(R=r.get(E))!=null?R:{value:p.value,field:p.field};p.expanded&&(t.expanded=p.expanded),r.has(E)||r.set(E,t),t!=null&&t.groups||(t.groups=new Set),t.groups.add(f),f=t,O===((T=(S=a.parents)==null?void 0:S.length)!=null?T:-1)-1&&((X=(D=r.get("root"))==null?void 0:D.groups)==null||X.add(t))}):(G=(h=r.get("root"))==null?void 0:h.groups)==null||G.add(f)})})(e);const d=s=>{s.groups&&(s.groups=Array.from(s.groups),s.groups.forEach(d))};return d(r.get("root")),((l=r.get("root"))==null?void 0:l.groups)||[]},F=(e,r)=>{var u;return!!((u=r.parents)!=null&&u.every((d,l)=>{var s;return(s=e.parents)==null?void 0:s.find(a=>d.value===a.value&&d.field===a.field)}))},g=(e,r)=>e.find(d=>d.value===r.value&&d.field===r.field&&F(d,r)),_=(e,r,u)=>{var s,a,c;const d=v(e!=null?e:[]),l=g(d,r.group);switch(r.type){case"GROUP-EXPAND_TOGGLE":return i(l?d==null?void 0:d.map(n=>{var f,o;return n===l?{...n,expanded:!((o=(f=n.expanded)!=null?f:u==null?void 0:u.defaultExpand)==null||o)}:n}):[...d,{...r.group,expanded:!((s=u==null?void 0:u.defaultExpand)==null||s)}]);case"GROUP-EXPAND_EXPAND":{let n;return l?n=d==null?void 0:d.map(f=>f===l?{...f,expanded:!0}:f):(a=u==null?void 0:u.defaultExpand)==null||a?n=d:n=[...d,{...r.group,expanded:!0}],i(n)}case"GROUP-EXPAND_COLLAPSE":{let n;return l?n=d==null?void 0:d.map(f=>f===l?{...f,expanded:!1}:f):(c=u==null?void 0:u.defaultExpand)==null||c?n=[...d,{...r.group,expanded:!1}]:n=d,i(n)}default:return e}};exports.GROUP_EXPAND_ACTION=N;exports.findGroupExpand=w;exports.flatToTree=i;exports.getGroupExpandableOptions=U;exports.groupExpandReducer=_;exports.isExpanded=j;
@@ -0,0 +1,108 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ var w = /* @__PURE__ */ ((e) => (e.TOGGLE = "GROUP-EXPAND_TOGGLE", e.EXPAND = "GROUP-EXPAND_EXPAND", e.COLLAPSE = "GROUP-EXPAND_COLLAPSE", e.RESET = "GROUP-EXPAND_RESET", e))(w || {});
10
+ const U = (e) => {
11
+ var r;
12
+ return {
13
+ enabled: typeof e == "boolean" ? e : (r = e == null ? void 0 : e.enabled) != null ? r : !0,
14
+ defaultExpand: typeof e == "object" ? e == null ? void 0 : e.defaultExpand : !0
15
+ };
16
+ }, p = (e = [], r = null) => {
17
+ const u = [];
18
+ return e == null || e.forEach((d) => {
19
+ var s;
20
+ const l = {
21
+ value: d.value,
22
+ field: d.field,
23
+ parents: r ? [r, ...(s = r.parents) != null ? s : []] : []
24
+ };
25
+ d.expanded !== void 0 && (l.expanded = d.expanded), d.groups && u.push(...p(d.groups, l)), u.push(l);
26
+ }), u;
27
+ }, h = (e) => {
28
+ var r, u, d, l;
29
+ return `${(r = e.parents) != null && r.length ? ((l = (d = (u = e.parents) == null ? void 0 : u.slice()) == null ? void 0 : d.reverse()) == null ? void 0 : l.map((s) => h({ field: s.field, value: s.value })).join("/")) + "/" : ""}${e.field}:${e.value}`;
30
+ }, F = (e, r) => {
31
+ const u = p(e);
32
+ return x(u, r);
33
+ }, $ = (e, r) => {
34
+ var l;
35
+ const u = p(e), d = x(u, r);
36
+ return d ? (l = d.expanded) != null ? l : !0 : !1;
37
+ }, o = (e) => {
38
+ var l;
39
+ const r = /* @__PURE__ */ new Map();
40
+ r.set("root", { value: null, field: "", groups: /* @__PURE__ */ new Set() }), ((s) => {
41
+ s.forEach((f) => {
42
+ var i, P, g, G;
43
+ const c = h(f), a = (i = r.get(c)) != null ? i : {
44
+ value: f.value,
45
+ field: f.field
46
+ };
47
+ f.expanded !== void 0 && (a.expanded = f.expanded), r.has(c) || r.set(c, a);
48
+ let n = a;
49
+ (P = f.parents) != null && P.length ? f.parents.forEach((v, L) => {
50
+ var A, O, D, R, S, X, T;
51
+ const E = h({
52
+ value: v.value,
53
+ field: v.field,
54
+ parents: (O = f.parents) == null ? void 0 : O.slice(L + 1, (A = f == null ? void 0 : f.parents) == null ? void 0 : A.length)
55
+ }), t = (D = r.get(E)) != null ? D : {
56
+ value: v.value,
57
+ field: v.field
58
+ };
59
+ v.expanded && (t.expanded = v.expanded), r.has(E) || r.set(E, t), t != null && t.groups || (t.groups = /* @__PURE__ */ new Set()), t.groups.add(n), n = t, L === ((S = (R = f.parents) == null ? void 0 : R.length) != null ? S : -1) - 1 && ((T = (X = r.get("root")) == null ? void 0 : X.groups) == null || T.add(t));
60
+ }) : (G = (g = r.get("root")) == null ? void 0 : g.groups) == null || G.add(n);
61
+ });
62
+ })(e);
63
+ const d = (s) => {
64
+ s.groups && (s.groups = Array.from(s.groups), s.groups.forEach(d));
65
+ };
66
+ return d(r.get("root")), ((l = r.get("root")) == null ? void 0 : l.groups) || [];
67
+ }, N = (e, r) => {
68
+ var u;
69
+ return !!((u = r.parents) != null && u.every((d, l) => {
70
+ var s;
71
+ return (s = e.parents) == null ? void 0 : s.find((f) => d.value === f.value && d.field === f.field);
72
+ }));
73
+ }, x = (e, r) => e.find((d) => d.value === r.value && d.field === r.field && N(d, r)), j = (e, r, u) => {
74
+ var s, f, c;
75
+ const d = p(e != null ? e : []), l = x(d, r.group);
76
+ switch (r.type) {
77
+ case "GROUP-EXPAND_TOGGLE":
78
+ return o(
79
+ l ? d == null ? void 0 : d.map(
80
+ (a) => {
81
+ var n, i;
82
+ return a === l ? {
83
+ ...a,
84
+ expanded: !((i = (n = a.expanded) != null ? n : u == null ? void 0 : u.defaultExpand) == null || i)
85
+ } : a;
86
+ }
87
+ ) : [...d, { ...r.group, expanded: !((s = u == null ? void 0 : u.defaultExpand) == null || s) }]
88
+ );
89
+ case "GROUP-EXPAND_EXPAND": {
90
+ let a;
91
+ return l ? a = d == null ? void 0 : d.map((n) => n === l ? { ...n, expanded: !0 } : n) : (f = u == null ? void 0 : u.defaultExpand) == null || f ? a = d : a = [...d, { ...r.group, expanded: !0 }], o(a);
92
+ }
93
+ case "GROUP-EXPAND_COLLAPSE": {
94
+ let a;
95
+ return l ? a = d == null ? void 0 : d.map((n) => n === l ? { ...n, expanded: !1 } : n) : (c = u == null ? void 0 : u.defaultExpand) == null || c ? a = [...d, { ...r.group, expanded: !1 }] : a = d, o(a);
96
+ }
97
+ default:
98
+ return e;
99
+ }
100
+ };
101
+ export {
102
+ w as GROUP_EXPAND_ACTION,
103
+ F as findGroupExpand,
104
+ o as flatToTree,
105
+ U as getGroupExpandableOptions,
106
+ j as groupExpandReducer,
107
+ $ as isExpanded
108
+ };
package/index.d.mts CHANGED
@@ -109,6 +109,8 @@ export declare interface CellProps {
109
109
  * Indicates if the cell is selected.
110
110
  */
111
111
  isSelected: boolean;
112
+ /** @hidden */
113
+ isInEdit?: boolean;
112
114
  /**
113
115
  * Indicates if the cell is sorted.
114
116
  */
@@ -742,6 +744,32 @@ declare const DateFilterCell_base: React_2.ComponentClass<FilterComponentProps_2
742
744
  export declare interface DateFilterProps extends TextFilterProps {
743
745
  }
744
746
 
747
+ /** @hidden */
748
+ export declare enum DETAIL_EXPAND_ACTION {
749
+ DETAIL_EXPAND = "DETAIL_EXPAND_DETAIL_EXPAND",
750
+ COLLAPSE = "DETAIL_EXPAND_COLLAPSE",
751
+ TOGGLE = "DETAIL_EXPAND_TOGGLE",
752
+ SET = "DETAIL_EXPAND_SET"
753
+ }
754
+
755
+ /** @hidden */
756
+ export declare type DetailExpandAction = {
757
+ type: DETAIL_EXPAND_ACTION.TOGGLE | DETAIL_EXPAND_ACTION.DETAIL_EXPAND | DETAIL_EXPAND_ACTION.COLLAPSE;
758
+ id: string;
759
+ } | {
760
+ type: DETAIL_EXPAND_ACTION.SET;
761
+ id: string;
762
+ payload: boolean;
763
+ };
764
+
765
+ /** @hidden */
766
+ export declare type DetailExpandDescriptor = {
767
+ [id: string]: boolean;
768
+ };
769
+
770
+ /** @hidden */
771
+ export declare const detailExpandReducer: (state: DetailExpandDescriptor, action: DetailExpandAction) => DetailExpandDescriptor;
772
+
745
773
  /**
746
774
  * @hidden
747
775
  */
@@ -785,6 +813,67 @@ declare interface DropClueState {
785
813
  height: number;
786
814
  }
787
815
 
816
+ /**
817
+ * @hidden
818
+ */
819
+ export declare enum EDIT_ACTION {
820
+ ENTER_EDIT = "EDITING_ENTER_EDIT",
821
+ ENTER_FIELD_EDIT = "EDITING_ENTER_FIELD_EDIT",
822
+ ADD_EDIT = "EDITING_ADD_EDIT",
823
+ ADD_FIELD_EDIT = "EDITING_ADD_FIELD_EDIT",
824
+ EXIT_EDIT = "EDITING_EXIT_EDIT",
825
+ EXIT_FIELD_EDIT = "EDITING_EXIT_FIELD_EDIT",
826
+ TOGGLE_EDIT = "EDITING_TOGGLE_EDIT",
827
+ TOGGLE_FIELD_EDIT = "EDITING_TOGGLE_FIELD_EDIT"
828
+ }
829
+
830
+ /**
831
+ * @hidden
832
+ */
833
+ export declare type EditAction = {
834
+ type: EDIT_ACTION.ENTER_EDIT | EDIT_ACTION.ADD_EDIT | EDIT_ACTION.EXIT_EDIT | EDIT_ACTION.TOGGLE_EDIT;
835
+ payload: {
836
+ id: string;
837
+ };
838
+ } | {
839
+ type: EDIT_ACTION.ENTER_FIELD_EDIT | EDIT_ACTION.ADD_FIELD_EDIT | EDIT_ACTION.EXIT_FIELD_EDIT | EDIT_ACTION.TOGGLE_FIELD_EDIT;
840
+ payload: {
841
+ id: string;
842
+ field: string;
843
+ };
844
+ };
845
+
846
+ /**
847
+ * The `edit` descriptor used to identify which data-items are in edit mode.
848
+ * TODO: uncomment
849
+ *
850
+ * @hidden
851
+ * @example
852
+ * ```ts
853
+ * const data = [
854
+ * { id: 0, name: 'Jane Doe' },
855
+ * { id: 1, name: 'John Doe' }
856
+ * ]
857
+ *
858
+ * const edit = {
859
+ * 1: true
860
+ * }
861
+ * ```
862
+ */
863
+ export declare type EditDescriptor = {
864
+ /**
865
+ * The data-item id is in edit mode.
866
+ * If the value is `true` if the whole item (row) is in edit mode.
867
+ * If the value is an array of strings if only specific fields (cells) are in edit mode.
868
+ */
869
+ [id: string]: boolean | string[];
870
+ };
871
+
872
+ /**
873
+ * @hidden
874
+ */
875
+ export declare const editReducer: (state: EditDescriptor | undefined, action: EditAction) => EditDescriptor;
876
+
788
877
  /**
789
878
  * The EnumFilter component used for editing the value of FilterDescriptor object.
790
879
  * It renders a DropDownList and allows you to choose a value from the predefined list.
@@ -1135,14 +1224,31 @@ export declare interface FilterRowProps {
1135
1224
  ariaRowIndex?: number;
1136
1225
  }
1137
1226
 
1227
+ /** @hidden */
1228
+ export declare const findGroupExpand: (groupExpand: GroupExpandDescriptor[], group: GroupState) => GroupExpandDescriptor | undefined;
1229
+
1138
1230
  /**
1139
1231
  * @hidden
1140
1232
  */
1141
1233
  export declare function flatData(data: any[], getChildren: (dataItem: any) => any[], itemMap: (item: any) => any): DataItemWrapper[];
1142
1234
 
1235
+ /** @hidden */
1236
+ export declare const flatToTree: (flat: GroupState[]) => GroupExpandDescriptor[];
1237
+
1143
1238
  /** @hidden */
1144
1239
  export declare const getColumnIndex: (element: HTMLTableCellElement) => number | undefined;
1145
1240
 
1241
+ /** @hidden */
1242
+ export declare const getDetailExpandableOptions: (expandable?: boolean | TableExpandableSettings) => TableExpandableSettings;
1243
+
1244
+ /**
1245
+ * @hidden
1246
+ */
1247
+ export declare const getEditableOptions: (editable?: boolean | TableEditableSettings) => TableEditableSettings;
1248
+
1249
+ /** @hidden */
1250
+ export declare const getGroupExpandableOptions: (groupExpandable?: boolean | TableGroupExpandableSettings) => TableGroupExpandableSettings;
1251
+
1146
1252
  /**
1147
1253
  * Get all group ids from the data.
1148
1254
  *
@@ -1239,6 +1345,14 @@ export declare class Group extends React_2.Component<GroupProps> {
1239
1345
  private onRemove;
1240
1346
  }
1241
1347
 
1348
+ /** @hidden */
1349
+ export declare enum GROUP_EXPAND_ACTION {
1350
+ TOGGLE = "GROUP-EXPAND_TOGGLE",
1351
+ EXPAND = "GROUP-EXPAND_EXPAND",
1352
+ COLLAPSE = "GROUP-EXPAND_COLLAPSE",
1353
+ RESET = "GROUP-EXPAND_RESET"
1354
+ }
1355
+
1242
1356
  /**
1243
1357
  * @hidden
1244
1358
  */
@@ -1247,6 +1361,23 @@ export declare interface GroupChangeEvent extends BaseEvent<Group> {
1247
1361
  nextFilter: CompositeFilterDescriptor;
1248
1362
  }
1249
1363
 
1364
+ /** @hidden */
1365
+ export declare type GroupExpandAction = {
1366
+ type: GROUP_EXPAND_ACTION;
1367
+ group: GroupState;
1368
+ };
1369
+
1370
+ /** @hidden */
1371
+ export declare type GroupExpandDescriptor = {
1372
+ value: any;
1373
+ field: string;
1374
+ expanded?: boolean;
1375
+ groups?: GroupExpandDescriptor[];
1376
+ };
1377
+
1378
+ /** @hidden */
1379
+ export declare const groupExpandReducer: (state: GroupExpandDescriptor[], action: GroupExpandAction, options?: TableGroupExpandableSettings) => GroupExpandDescriptor[];
1380
+
1250
1381
  /**
1251
1382
  * @hidden
1252
1383
  */
@@ -1267,6 +1398,14 @@ export declare interface GroupRemoveEvent extends BaseEvent<Group> {
1267
1398
  filter: CompositeFilterDescriptor;
1268
1399
  }
1269
1400
 
1401
+ /** @hidden */
1402
+ export declare type GroupState = {
1403
+ value: any;
1404
+ field: string;
1405
+ expanded?: boolean;
1406
+ parents?: GroupState[];
1407
+ };
1408
+
1270
1409
  /**
1271
1410
  * @hidden
1272
1411
  */
@@ -1425,6 +1564,9 @@ export declare interface HeaderThElementProps extends React_2.ThHTMLAttributes<H
1425
1564
  navigatable?: boolean;
1426
1565
  }
1427
1566
 
1567
+ /** @hidden */
1568
+ export declare const isExpanded: (groupExpand: GroupExpandDescriptor[], group: GroupState) => boolean;
1569
+
1428
1570
  /** @hidden */
1429
1571
  export declare const isInNonSelectable: (target: HTMLElement | null) => boolean;
1430
1572
 
@@ -1868,6 +2010,14 @@ export declare const relativeContextElement: (element: any) => any;
1868
2010
  */
1869
2011
  export declare const removeItems: (data: any[], subItemsField: string, condition: (item: any) => boolean) => any[];
1870
2012
 
2013
+ /**
2014
+ * @hidden
2015
+ * TODO: document
2016
+ */
2017
+ export declare type SelectDescriptor = {
2018
+ [id: string]: boolean | number[];
2019
+ };
2020
+
1871
2021
  /**
1872
2022
  * @hidden
1873
2023
  */
@@ -1951,6 +2101,8 @@ export declare function tableColumnsVirtualization(args: {
1951
2101
  }[];
1952
2102
  tableViewPortWidth: number;
1953
2103
  scrollLeft: number;
2104
+ getColSpan?: any;
2105
+ dataItem?: any;
1954
2106
  }): {
1955
2107
  colSpans: number[];
1956
2108
  hiddenColumns: boolean[];
@@ -2008,6 +2160,37 @@ export declare interface TableDragSelectionReleaseEvent {
2008
2160
  isDrag: boolean;
2009
2161
  }
2010
2162
 
2163
+ /** @hidden */
2164
+ export declare interface TableEditableSettings {
2165
+ /**
2166
+ * Determines if the editing is enabled.
2167
+ *
2168
+ * @default false
2169
+ */
2170
+ enabled?: boolean;
2171
+ /**
2172
+ * Determines the editing mode.
2173
+ * The available values are:
2174
+ * * `inline`
2175
+ * * `incell`
2176
+ *
2177
+ * @default 'inline
2178
+ */
2179
+ mode?: 'inline' | 'incell';
2180
+ }
2181
+
2182
+ /** @hidden */
2183
+ export declare type TableExpandableSettings = {
2184
+ enabled?: boolean;
2185
+ column?: string;
2186
+ };
2187
+
2188
+ /** @hidden */
2189
+ export declare type TableGroupExpandableSettings = {
2190
+ enabled?: boolean;
2191
+ defaultExpand?: boolean;
2192
+ };
2193
+
2011
2194
  /**
2012
2195
  * @hidden
2013
2196
  */
@@ -2417,7 +2600,7 @@ export declare const unaryOperator: (operator: any) => boolean;
2417
2600
  */
2418
2601
  export declare function updateLeft(columnsMap: number[][], columns: Array<{
2419
2602
  parentIndex: number;
2420
- colSpan: number;
2603
+ colSpan?: number;
2421
2604
  rowSpan: number;
2422
2605
  depth: number;
2423
2606
  kFirst?: boolean;
@@ -2436,7 +2619,7 @@ export declare function updateLeft(columnsMap: number[][], columns: Array<{
2436
2619
  */
2437
2620
  export declare function updateRight(columnsMap: number[][], columns: Array<{
2438
2621
  parentIndex: number;
2439
- colSpan: number;
2622
+ colSpan?: number;
2440
2623
  rowSpan: number;
2441
2624
  depth: number;
2442
2625
  kFirst?: boolean;
package/index.d.ts CHANGED
@@ -109,6 +109,8 @@ export declare interface CellProps {
109
109
  * Indicates if the cell is selected.
110
110
  */
111
111
  isSelected: boolean;
112
+ /** @hidden */
113
+ isInEdit?: boolean;
112
114
  /**
113
115
  * Indicates if the cell is sorted.
114
116
  */
@@ -742,6 +744,32 @@ declare const DateFilterCell_base: React_2.ComponentClass<FilterComponentProps_2
742
744
  export declare interface DateFilterProps extends TextFilterProps {
743
745
  }
744
746
 
747
+ /** @hidden */
748
+ export declare enum DETAIL_EXPAND_ACTION {
749
+ DETAIL_EXPAND = "DETAIL_EXPAND_DETAIL_EXPAND",
750
+ COLLAPSE = "DETAIL_EXPAND_COLLAPSE",
751
+ TOGGLE = "DETAIL_EXPAND_TOGGLE",
752
+ SET = "DETAIL_EXPAND_SET"
753
+ }
754
+
755
+ /** @hidden */
756
+ export declare type DetailExpandAction = {
757
+ type: DETAIL_EXPAND_ACTION.TOGGLE | DETAIL_EXPAND_ACTION.DETAIL_EXPAND | DETAIL_EXPAND_ACTION.COLLAPSE;
758
+ id: string;
759
+ } | {
760
+ type: DETAIL_EXPAND_ACTION.SET;
761
+ id: string;
762
+ payload: boolean;
763
+ };
764
+
765
+ /** @hidden */
766
+ export declare type DetailExpandDescriptor = {
767
+ [id: string]: boolean;
768
+ };
769
+
770
+ /** @hidden */
771
+ export declare const detailExpandReducer: (state: DetailExpandDescriptor, action: DetailExpandAction) => DetailExpandDescriptor;
772
+
745
773
  /**
746
774
  * @hidden
747
775
  */
@@ -785,6 +813,67 @@ declare interface DropClueState {
785
813
  height: number;
786
814
  }
787
815
 
816
+ /**
817
+ * @hidden
818
+ */
819
+ export declare enum EDIT_ACTION {
820
+ ENTER_EDIT = "EDITING_ENTER_EDIT",
821
+ ENTER_FIELD_EDIT = "EDITING_ENTER_FIELD_EDIT",
822
+ ADD_EDIT = "EDITING_ADD_EDIT",
823
+ ADD_FIELD_EDIT = "EDITING_ADD_FIELD_EDIT",
824
+ EXIT_EDIT = "EDITING_EXIT_EDIT",
825
+ EXIT_FIELD_EDIT = "EDITING_EXIT_FIELD_EDIT",
826
+ TOGGLE_EDIT = "EDITING_TOGGLE_EDIT",
827
+ TOGGLE_FIELD_EDIT = "EDITING_TOGGLE_FIELD_EDIT"
828
+ }
829
+
830
+ /**
831
+ * @hidden
832
+ */
833
+ export declare type EditAction = {
834
+ type: EDIT_ACTION.ENTER_EDIT | EDIT_ACTION.ADD_EDIT | EDIT_ACTION.EXIT_EDIT | EDIT_ACTION.TOGGLE_EDIT;
835
+ payload: {
836
+ id: string;
837
+ };
838
+ } | {
839
+ type: EDIT_ACTION.ENTER_FIELD_EDIT | EDIT_ACTION.ADD_FIELD_EDIT | EDIT_ACTION.EXIT_FIELD_EDIT | EDIT_ACTION.TOGGLE_FIELD_EDIT;
840
+ payload: {
841
+ id: string;
842
+ field: string;
843
+ };
844
+ };
845
+
846
+ /**
847
+ * The `edit` descriptor used to identify which data-items are in edit mode.
848
+ * TODO: uncomment
849
+ *
850
+ * @hidden
851
+ * @example
852
+ * ```ts
853
+ * const data = [
854
+ * { id: 0, name: 'Jane Doe' },
855
+ * { id: 1, name: 'John Doe' }
856
+ * ]
857
+ *
858
+ * const edit = {
859
+ * 1: true
860
+ * }
861
+ * ```
862
+ */
863
+ export declare type EditDescriptor = {
864
+ /**
865
+ * The data-item id is in edit mode.
866
+ * If the value is `true` if the whole item (row) is in edit mode.
867
+ * If the value is an array of strings if only specific fields (cells) are in edit mode.
868
+ */
869
+ [id: string]: boolean | string[];
870
+ };
871
+
872
+ /**
873
+ * @hidden
874
+ */
875
+ export declare const editReducer: (state: EditDescriptor | undefined, action: EditAction) => EditDescriptor;
876
+
788
877
  /**
789
878
  * The EnumFilter component used for editing the value of FilterDescriptor object.
790
879
  * It renders a DropDownList and allows you to choose a value from the predefined list.
@@ -1135,14 +1224,31 @@ export declare interface FilterRowProps {
1135
1224
  ariaRowIndex?: number;
1136
1225
  }
1137
1226
 
1227
+ /** @hidden */
1228
+ export declare const findGroupExpand: (groupExpand: GroupExpandDescriptor[], group: GroupState) => GroupExpandDescriptor | undefined;
1229
+
1138
1230
  /**
1139
1231
  * @hidden
1140
1232
  */
1141
1233
  export declare function flatData(data: any[], getChildren: (dataItem: any) => any[], itemMap: (item: any) => any): DataItemWrapper[];
1142
1234
 
1235
+ /** @hidden */
1236
+ export declare const flatToTree: (flat: GroupState[]) => GroupExpandDescriptor[];
1237
+
1143
1238
  /** @hidden */
1144
1239
  export declare const getColumnIndex: (element: HTMLTableCellElement) => number | undefined;
1145
1240
 
1241
+ /** @hidden */
1242
+ export declare const getDetailExpandableOptions: (expandable?: boolean | TableExpandableSettings) => TableExpandableSettings;
1243
+
1244
+ /**
1245
+ * @hidden
1246
+ */
1247
+ export declare const getEditableOptions: (editable?: boolean | TableEditableSettings) => TableEditableSettings;
1248
+
1249
+ /** @hidden */
1250
+ export declare const getGroupExpandableOptions: (groupExpandable?: boolean | TableGroupExpandableSettings) => TableGroupExpandableSettings;
1251
+
1146
1252
  /**
1147
1253
  * Get all group ids from the data.
1148
1254
  *
@@ -1239,6 +1345,14 @@ export declare class Group extends React_2.Component<GroupProps> {
1239
1345
  private onRemove;
1240
1346
  }
1241
1347
 
1348
+ /** @hidden */
1349
+ export declare enum GROUP_EXPAND_ACTION {
1350
+ TOGGLE = "GROUP-EXPAND_TOGGLE",
1351
+ EXPAND = "GROUP-EXPAND_EXPAND",
1352
+ COLLAPSE = "GROUP-EXPAND_COLLAPSE",
1353
+ RESET = "GROUP-EXPAND_RESET"
1354
+ }
1355
+
1242
1356
  /**
1243
1357
  * @hidden
1244
1358
  */
@@ -1247,6 +1361,23 @@ export declare interface GroupChangeEvent extends BaseEvent<Group> {
1247
1361
  nextFilter: CompositeFilterDescriptor;
1248
1362
  }
1249
1363
 
1364
+ /** @hidden */
1365
+ export declare type GroupExpandAction = {
1366
+ type: GROUP_EXPAND_ACTION;
1367
+ group: GroupState;
1368
+ };
1369
+
1370
+ /** @hidden */
1371
+ export declare type GroupExpandDescriptor = {
1372
+ value: any;
1373
+ field: string;
1374
+ expanded?: boolean;
1375
+ groups?: GroupExpandDescriptor[];
1376
+ };
1377
+
1378
+ /** @hidden */
1379
+ export declare const groupExpandReducer: (state: GroupExpandDescriptor[], action: GroupExpandAction, options?: TableGroupExpandableSettings) => GroupExpandDescriptor[];
1380
+
1250
1381
  /**
1251
1382
  * @hidden
1252
1383
  */
@@ -1267,6 +1398,14 @@ export declare interface GroupRemoveEvent extends BaseEvent<Group> {
1267
1398
  filter: CompositeFilterDescriptor;
1268
1399
  }
1269
1400
 
1401
+ /** @hidden */
1402
+ export declare type GroupState = {
1403
+ value: any;
1404
+ field: string;
1405
+ expanded?: boolean;
1406
+ parents?: GroupState[];
1407
+ };
1408
+
1270
1409
  /**
1271
1410
  * @hidden
1272
1411
  */
@@ -1425,6 +1564,9 @@ export declare interface HeaderThElementProps extends React_2.ThHTMLAttributes<H
1425
1564
  navigatable?: boolean;
1426
1565
  }
1427
1566
 
1567
+ /** @hidden */
1568
+ export declare const isExpanded: (groupExpand: GroupExpandDescriptor[], group: GroupState) => boolean;
1569
+
1428
1570
  /** @hidden */
1429
1571
  export declare const isInNonSelectable: (target: HTMLElement | null) => boolean;
1430
1572
 
@@ -1868,6 +2010,14 @@ export declare const relativeContextElement: (element: any) => any;
1868
2010
  */
1869
2011
  export declare const removeItems: (data: any[], subItemsField: string, condition: (item: any) => boolean) => any[];
1870
2012
 
2013
+ /**
2014
+ * @hidden
2015
+ * TODO: document
2016
+ */
2017
+ export declare type SelectDescriptor = {
2018
+ [id: string]: boolean | number[];
2019
+ };
2020
+
1871
2021
  /**
1872
2022
  * @hidden
1873
2023
  */
@@ -1951,6 +2101,8 @@ export declare function tableColumnsVirtualization(args: {
1951
2101
  }[];
1952
2102
  tableViewPortWidth: number;
1953
2103
  scrollLeft: number;
2104
+ getColSpan?: any;
2105
+ dataItem?: any;
1954
2106
  }): {
1955
2107
  colSpans: number[];
1956
2108
  hiddenColumns: boolean[];
@@ -2008,6 +2160,37 @@ export declare interface TableDragSelectionReleaseEvent {
2008
2160
  isDrag: boolean;
2009
2161
  }
2010
2162
 
2163
+ /** @hidden */
2164
+ export declare interface TableEditableSettings {
2165
+ /**
2166
+ * Determines if the editing is enabled.
2167
+ *
2168
+ * @default false
2169
+ */
2170
+ enabled?: boolean;
2171
+ /**
2172
+ * Determines the editing mode.
2173
+ * The available values are:
2174
+ * * `inline`
2175
+ * * `incell`
2176
+ *
2177
+ * @default 'inline
2178
+ */
2179
+ mode?: 'inline' | 'incell';
2180
+ }
2181
+
2182
+ /** @hidden */
2183
+ export declare type TableExpandableSettings = {
2184
+ enabled?: boolean;
2185
+ column?: string;
2186
+ };
2187
+
2188
+ /** @hidden */
2189
+ export declare type TableGroupExpandableSettings = {
2190
+ enabled?: boolean;
2191
+ defaultExpand?: boolean;
2192
+ };
2193
+
2011
2194
  /**
2012
2195
  * @hidden
2013
2196
  */
@@ -2417,7 +2600,7 @@ export declare const unaryOperator: (operator: any) => boolean;
2417
2600
  */
2418
2601
  export declare function updateLeft(columnsMap: number[][], columns: Array<{
2419
2602
  parentIndex: number;
2420
- colSpan: number;
2603
+ colSpan?: number;
2421
2604
  rowSpan: number;
2422
2605
  depth: number;
2423
2606
  kFirst?: boolean;
@@ -2436,7 +2619,7 @@ export declare function updateLeft(columnsMap: number[][], columns: Array<{
2436
2619
  */
2437
2620
  export declare function updateRight(columnsMap: number[][], columns: Array<{
2438
2621
  parentIndex: number;
2439
- colSpan: number;
2622
+ colSpan?: number;
2440
2623
  rowSpan: number;
2441
2624
  depth: number;
2442
2625
  kFirst?: boolean;