@tap-payments/os-micro-frontend-shared 0.1.411 → 0.1.412-test.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.
Files changed (118) hide show
  1. package/build/components/AnimatedSpinnerIcon/style.d.ts +0 -1
  2. package/build/components/Chip/style.d.ts +0 -1
  3. package/build/components/CountBadge/style.d.ts +0 -1
  4. package/build/components/Dialog/style.d.ts +0 -1
  5. package/build/components/FlippingCard/style.d.ts +0 -1
  6. package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
  7. package/build/components/JSONViewer/style.d.ts +0 -1
  8. package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
  9. package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
  10. package/build/components/SearchButton/styles.d.ts +0 -1
  11. package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
  12. package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
  13. package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
  14. package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
  15. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
  16. package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +0 -1
  17. package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
  18. package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
  19. package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
  20. package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
  21. package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
  22. package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
  23. package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
  24. package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
  25. package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
  26. package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
  27. package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
  28. package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
  29. package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +0 -1
  30. package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
  31. package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
  32. package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
  33. package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
  34. package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
  35. package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
  36. package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
  37. package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
  38. package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
  39. package/build/components/TableCells/CustomCells/style.d.ts +0 -1
  40. package/build/components/TableHeader/FiltersRow.d.ts +1 -1
  41. package/build/components/TableHeader/FiltersRow.js +4 -2
  42. package/build/components/TableHeader/TableHeader.d.ts +1 -1
  43. package/build/components/TableHeader/TableHeader.js +2 -2
  44. package/build/components/TableHeader/TableView/CreateViewDialog.d.ts +3 -0
  45. package/build/components/TableHeader/TableView/CreateViewDialog.js +91 -0
  46. package/build/components/TableHeader/TableView/CustomViews.d.ts +1 -1
  47. package/build/components/TableHeader/TableView/CustomViews.js +1 -1
  48. package/build/components/TableHeader/TableView/DefaultViews.js +1 -1
  49. package/build/components/TableHeader/TableView/TableView.js +1 -2
  50. package/build/components/TableHeader/TableView/ViewsDropdown.d.ts +5 -0
  51. package/build/components/TableHeader/TableView/ViewsDropdown.js +153 -0
  52. package/build/components/TableHeader/TableView/ViewsMenu.d.ts +5 -0
  53. package/build/components/TableHeader/TableView/ViewsMenu.js +56 -0
  54. package/build/components/TableHeader/TableView/components/ColumnList.d.ts +3 -0
  55. package/build/components/TableHeader/TableView/components/ColumnList.js +70 -0
  56. package/build/components/TableHeader/TableView/components/ViewsSubmenu.d.ts +3 -0
  57. package/build/components/TableHeader/TableView/components/ViewsSubmenu.js +68 -0
  58. package/build/components/TableHeader/TableView/components/index.d.ts +2 -0
  59. package/build/components/TableHeader/TableView/components/index.js +2 -0
  60. package/build/components/TableHeader/TableView/constants.d.ts +25 -0
  61. package/build/components/TableHeader/TableView/constants.js +25 -0
  62. package/build/components/TableHeader/TableView/hooks/index.d.ts +6 -0
  63. package/build/components/TableHeader/TableView/hooks/index.js +6 -0
  64. package/build/components/TableHeader/TableView/hooks/useCreateViewDialog.d.ts +22 -0
  65. package/build/components/TableHeader/TableView/hooks/useCreateViewDialog.js +92 -0
  66. package/build/components/TableHeader/TableView/hooks/useDialogPosition.d.ts +8 -0
  67. package/build/components/TableHeader/TableView/hooks/useDialogPosition.js +16 -0
  68. package/build/components/TableHeader/TableView/hooks/useNestedSubmenu.d.ts +7 -0
  69. package/build/components/TableHeader/TableView/hooks/useNestedSubmenu.js +27 -0
  70. package/build/components/TableHeader/TableView/hooks/useOriginalColumns.d.ts +6 -0
  71. package/build/components/TableHeader/TableView/hooks/useOriginalColumns.js +18 -0
  72. package/build/components/TableHeader/TableView/hooks/useSubmenuHover.d.ts +8 -0
  73. package/build/components/TableHeader/TableView/hooks/useSubmenuHover.js +42 -0
  74. package/build/components/TableHeader/TableView/hooks/useViewsManager.d.ts +12 -0
  75. package/build/components/TableHeader/TableView/hooks/useViewsManager.js +32 -0
  76. package/build/components/TableHeader/TableView/hooks/useViewsMenu.d.ts +48 -0
  77. package/build/components/TableHeader/TableView/hooks/useViewsMenu.js +150 -0
  78. package/build/components/TableHeader/TableView/index.d.ts +11 -3
  79. package/build/components/TableHeader/TableView/index.js +10 -3
  80. package/build/components/TableHeader/TableView/styles.d.ts +127 -0
  81. package/build/components/TableHeader/TableView/styles.js +427 -0
  82. package/build/components/TableHeader/TableView/types.d.ts +198 -0
  83. package/build/components/TableHeader/TableView/utils/columnState.d.ts +20 -0
  84. package/build/components/TableHeader/TableView/utils/columnState.js +187 -0
  85. package/build/components/TableHeader/TableView/utils/index.d.ts +4 -0
  86. package/build/components/TableHeader/TableView/utils/index.js +4 -0
  87. package/build/components/TableHeader/TableView/utils/layoutTransform.d.ts +10 -0
  88. package/build/components/TableHeader/TableView/utils/layoutTransform.js +71 -0
  89. package/build/components/TableHeader/TableView/utils/templateToColumnsView.d.ts +30 -0
  90. package/build/components/TableHeader/TableView/utils/templateToColumnsView.js +144 -0
  91. package/build/components/TableHeader/TableView/utils/viewMenu.d.ts +36 -0
  92. package/build/components/TableHeader/TableView/utils/viewMenu.js +90 -0
  93. package/build/components/TableHeader/index.d.ts +2 -0
  94. package/build/components/TableHeader/index.js +1 -0
  95. package/build/components/TableHeader/type.d.ts +18 -1
  96. package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
  97. package/build/components/TableReports/style.d.ts +0 -1
  98. package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.d.ts +1 -1
  99. package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.js +6 -3
  100. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableRowLoading.js +1 -2
  101. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/usePinnedColumns.js +3 -2
  102. package/build/components/VirtualTables/VirtualTable/VirtualTable.d.ts +1 -1
  103. package/build/components/VirtualTables/VirtualTable/VirtualTable.js +4 -3
  104. package/build/components/VirtualTables/components/style.d.ts +0 -1
  105. package/build/constants/assets.d.ts +1 -0
  106. package/build/constants/assets.js +1 -0
  107. package/build/constants/table/cell/authenticationsTableCellWidth.d.ts +10 -0
  108. package/build/constants/table/cell/authenticationsTableCellWidth.js +10 -0
  109. package/build/types/table.d.ts +1 -0
  110. package/build/utils/index.d.ts +1 -0
  111. package/build/utils/index.js +1 -0
  112. package/build/utils/skeletonColumns.d.ts +4 -0
  113. package/build/utils/skeletonColumns.js +55 -0
  114. package/package.json +3 -3
  115. package/build/components/TableHeader/TableView/style.d.ts +0 -24
  116. package/build/components/TableHeader/TableView/style.js +0 -102
  117. package/build/components/TableHeader/TableView/type.d.ts +0 -10
  118. /package/build/components/TableHeader/TableView/{type.js → types.js} +0 -0
@@ -0,0 +1,187 @@
1
+ import { isDateColumn } from './layoutTransform';
2
+ export const getColumnCheckState = (column) => {
3
+ var _a, _b;
4
+ if (!((_a = column.menuItems) === null || _a === void 0 ? void 0 : _a.length)) {
5
+ return { checked: (_b = column.selected) !== null && _b !== void 0 ? _b : false, indeterminate: false };
6
+ }
7
+ const selectedCount = column.menuItems.filter((item) => item.selected).length;
8
+ return {
9
+ checked: selectedCount > 0,
10
+ indeterminate: selectedCount > 0 && selectedCount < column.menuItems.length,
11
+ };
12
+ };
13
+ export const toggleColumn = (columns, columnName) => columns.map((col) => {
14
+ var _a;
15
+ if (col.name !== columnName)
16
+ return col;
17
+ const newSelected = !col.selected;
18
+ const updatedMenuItems = (_a = col.menuItems) === null || _a === void 0 ? void 0 : _a.map((item) => (Object.assign(Object.assign({}, item), { selected: newSelected })));
19
+ return Object.assign(Object.assign({}, col), { selected: newSelected, menuItems: updatedMenuItems });
20
+ });
21
+ export const toggleSubItem = (columns, columnName, subItemName) => columns.map((col) => {
22
+ var _a, _b;
23
+ if (col.name !== columnName)
24
+ return col;
25
+ const updatedMenuItems = (_a = col.menuItems) === null || _a === void 0 ? void 0 : _a.map((item) => (item.name === subItemName ? Object.assign(Object.assign({}, item), { selected: !item.selected }) : item));
26
+ const hasSelected = (_b = updatedMenuItems === null || updatedMenuItems === void 0 ? void 0 : updatedMenuItems.some((item) => item.selected)) !== null && _b !== void 0 ? _b : false;
27
+ return Object.assign(Object.assign({}, col), { menuItems: updatedMenuItems, selected: hasSelected });
28
+ });
29
+ export const toggleAllColumns = (columns, selectAll) => columns.map((col) => {
30
+ var _a;
31
+ if (isDateColumn(col.name))
32
+ return col;
33
+ const updatedMenuItems = (_a = col.menuItems) === null || _a === void 0 ? void 0 : _a.map((item) => (Object.assign(Object.assign({}, item), { selected: selectAll })));
34
+ return Object.assign(Object.assign({}, col), { selected: selectAll, menuItems: updatedMenuItems });
35
+ });
36
+ export const areAllColumnsSelected = (columns) => {
37
+ const nonDate = columns.filter((c) => !isDateColumn(c.name));
38
+ if (nonDate.length === 0)
39
+ return false;
40
+ return nonDate.every((col) => {
41
+ var _a;
42
+ if ((_a = col.menuItems) === null || _a === void 0 ? void 0 : _a.length)
43
+ return col.menuItems.every((item) => item.selected);
44
+ return col.selected;
45
+ });
46
+ };
47
+ export const areSomeColumnsSelected = (columns, allSelected) => {
48
+ const nonDate = columns.filter((c) => !isDateColumn(c.name));
49
+ const hasAny = nonDate.some((col) => {
50
+ var _a;
51
+ if ((_a = col.menuItems) === null || _a === void 0 ? void 0 : _a.length)
52
+ return col.menuItems.some((item) => item.selected);
53
+ return col.selected;
54
+ });
55
+ return hasAny && !allSelected;
56
+ };
57
+ export const isValidTemplateName = (name, maxLength) => name.trim().length > 0 && name.length <= maxLength;
58
+ export const deepCloneColumns = (columns) => columns.map((col) => {
59
+ var _a, _b;
60
+ return (Object.assign(Object.assign({}, col), { selected: (_a = col.selected) !== null && _a !== void 0 ? _a : false, menuItems: (_b = col.menuItems) === null || _b === void 0 ? void 0 : _b.map((item) => { var _a; return (Object.assign(Object.assign({}, item), { selected: (_a = item.selected) !== null && _a !== void 0 ? _a : false })); }) }));
61
+ });
62
+ export const toggleSingleColumn = (columns, columnName) => columns.map((col) => {
63
+ var _a;
64
+ if (col.name !== columnName)
65
+ return col;
66
+ if (isDateColumn(col.name))
67
+ return Object.assign(Object.assign({}, col), { selected: true });
68
+ const newSelected = !col.selected;
69
+ const updatedMenuItems = (_a = col.menuItems) === null || _a === void 0 ? void 0 : _a.map((item) => (Object.assign(Object.assign({}, item), { selected: newSelected })));
70
+ return Object.assign(Object.assign({}, col), { selected: newSelected, menuItems: updatedMenuItems });
71
+ });
72
+ export const toggleAllCurrentColumns = (columns, shouldSelect) => columns.map((col) => {
73
+ var _a;
74
+ if (isDateColumn(col.name))
75
+ return Object.assign(Object.assign({}, col), { selected: true });
76
+ const updatedMenuItems = (_a = col.menuItems) === null || _a === void 0 ? void 0 : _a.map((item) => (Object.assign(Object.assign({}, item), { selected: shouldSelect })));
77
+ return Object.assign(Object.assign({}, col), { selected: shouldSelect, menuItems: updatedMenuItems });
78
+ });
79
+ export const areAllCurrentColumnsSelected = (columns) => {
80
+ if (columns.length === 0)
81
+ return false;
82
+ return columns.every((col) => {
83
+ var _a;
84
+ if ((_a = col.menuItems) === null || _a === void 0 ? void 0 : _a.length)
85
+ return col.menuItems.every((item) => item.selected);
86
+ return col.selected;
87
+ });
88
+ };
89
+ export const areSomeCurrentColumnsSelected = (columns, allSelected) => {
90
+ if (columns.length === 0)
91
+ return false;
92
+ const hasAny = columns.some((col) => {
93
+ var _a;
94
+ if ((_a = col.menuItems) === null || _a === void 0 ? void 0 : _a.length)
95
+ return col.menuItems.some((item) => item.selected);
96
+ return col.selected;
97
+ });
98
+ return hasAny && !allSelected;
99
+ };
100
+ export const normalizeColumnsSelected = (columns) => columns.map((col) => {
101
+ var _a, _b;
102
+ return (Object.assign(Object.assign({}, col), { selected: (_a = col.selected) !== null && _a !== void 0 ? _a : false, menuItems: (_b = col.menuItems) === null || _b === void 0 ? void 0 : _b.map((item) => { var _a; return (Object.assign(Object.assign({}, item), { selected: (_a = item.selected) !== null && _a !== void 0 ? _a : false })); }) }));
103
+ });
104
+ export const areColumnsEqual = (cols1, cols2) => {
105
+ if (cols1.length !== cols2.length)
106
+ return false;
107
+ const n1 = normalizeColumnsSelected(cols1);
108
+ const n2 = normalizeColumnsSelected(cols2);
109
+ for (let i = 0; i < n1.length; i++) {
110
+ const c1 = n1[i];
111
+ const c2 = n2[i];
112
+ if (c1.name !== c2.name || c1.selected !== c2.selected)
113
+ return false;
114
+ if (c1.menuItems && c2.menuItems) {
115
+ if (c1.menuItems.length !== c2.menuItems.length)
116
+ return false;
117
+ for (let j = 0; j < c1.menuItems.length; j++) {
118
+ if (c1.menuItems[j].name !== c2.menuItems[j].name || c1.menuItems[j].selected !== c2.menuItems[j].selected) {
119
+ return false;
120
+ }
121
+ }
122
+ }
123
+ else if (c1.menuItems || c2.menuItems)
124
+ return false;
125
+ }
126
+ return true;
127
+ };
128
+ export const resetColumnsToDefault = (columns) => columns
129
+ .filter((c) => !isDateColumn(c.name))
130
+ .map((col) => {
131
+ var _a, _b;
132
+ return (Object.assign(Object.assign({}, col), { selected: (_a = col.selected) !== null && _a !== void 0 ? _a : false, menuItems: (_b = col.menuItems) === null || _b === void 0 ? void 0 : _b.map((item) => { var _a; return (Object.assign(Object.assign({}, item), { selected: (_a = item.selected) !== null && _a !== void 0 ? _a : false })); }) }));
133
+ });
134
+ export const initializeEditingColumns = (editingColumns, availableColumns) => {
135
+ var _a, _b;
136
+ const editingOrder = editingColumns.filter((c) => !isDateColumn(c.name)).map((c) => c.name);
137
+ const availableByName = new Map(availableColumns.filter((c) => !isDateColumn(c.name)).map((c) => [c.name, c]));
138
+ const result = [];
139
+ for (const name of editingOrder) {
140
+ const saved = editingColumns.find((ec) => ec.name === name);
141
+ const avail = availableByName.get(name);
142
+ if (avail) {
143
+ result.push(saved !== null && saved !== void 0 ? saved : Object.assign(Object.assign({}, avail), { selected: false, menuItems: (_a = avail.menuItems) === null || _a === void 0 ? void 0 : _a.map((item) => (Object.assign(Object.assign({}, item), { selected: false }))) }));
144
+ }
145
+ else if (saved)
146
+ result.push(saved);
147
+ }
148
+ for (const [, avail] of availableByName) {
149
+ if (!editingOrder.includes(avail.name)) {
150
+ const saved = editingColumns.find((ec) => ec.name === avail.name);
151
+ result.push(saved !== null && saved !== void 0 ? saved : Object.assign(Object.assign({}, avail), { selected: false, menuItems: (_b = avail.menuItems) === null || _b === void 0 ? void 0 : _b.map((item) => (Object.assign(Object.assign({}, item), { selected: false }))) }));
152
+ }
153
+ }
154
+ return result;
155
+ };
156
+ export const initializeCreateColumns = (availableColumns) => availableColumns
157
+ .filter((c) => !isDateColumn(c.name))
158
+ .map((col) => {
159
+ var _a;
160
+ return (Object.assign(Object.assign({}, col), { selected: false, menuItems: (_a = col.menuItems) === null || _a === void 0 ? void 0 : _a.map((item) => (Object.assign(Object.assign({}, item), { selected: false }))) }));
161
+ });
162
+ export const initializeCreateColumnsWithCurrentState = (availableColumns, currentTableViews) => {
163
+ var _a, _b, _c, _d;
164
+ const availableByName = new Map(availableColumns.filter((c) => !isDateColumn(c.name)).map((c) => [c.name, c]));
165
+ const currentOrder = currentTableViews.filter((c) => !isDateColumn(c.name)).map((c) => c.name);
166
+ const result = [];
167
+ for (const name of currentOrder) {
168
+ const current = currentTableViews.find((tc) => tc.name === name);
169
+ const avail = availableByName.get(name);
170
+ if (avail && current) {
171
+ result.push(Object.assign(Object.assign({}, avail), { selected: (_a = current.selected) !== null && _a !== void 0 ? _a : false, menuItems: (_b = avail.menuItems) === null || _b === void 0 ? void 0 : _b.map((item) => {
172
+ var _a, _b;
173
+ const curItem = (_a = current.menuItems) === null || _a === void 0 ? void 0 : _a.find((mi) => mi.name === item.name);
174
+ return Object.assign(Object.assign({}, item), { selected: (_b = curItem === null || curItem === void 0 ? void 0 : curItem.selected) !== null && _b !== void 0 ? _b : false });
175
+ }) }));
176
+ }
177
+ else if (avail) {
178
+ result.push(Object.assign(Object.assign({}, avail), { selected: false, menuItems: (_c = avail.menuItems) === null || _c === void 0 ? void 0 : _c.map((item) => (Object.assign(Object.assign({}, item), { selected: false }))) }));
179
+ }
180
+ }
181
+ for (const [, avail] of availableByName) {
182
+ if (!currentOrder.includes(avail.name)) {
183
+ result.push(Object.assign(Object.assign({}, avail), { selected: false, menuItems: (_d = avail.menuItems) === null || _d === void 0 ? void 0 : _d.map((item) => (Object.assign(Object.assign({}, item), { selected: false }))) }));
184
+ }
185
+ }
186
+ return result;
187
+ };
@@ -0,0 +1,4 @@
1
+ export { isDateColumn, transformLayoutToColumns, getColumnsByMode, convertColumnsToLayoutSection, mapColumnsToLayoutSection, getLayoutDataFromTemplates, } from './layoutTransform';
2
+ export { createCustomViewMenuItem, setViewAsDefault, transformTemplatesToViewMenuItems, mapTemplatesToMenuItems, getSubmenuItems, getSubmenuItemsForDisplay, hasSubmenu, } from './viewMenu';
3
+ export { getColumnCheckState, toggleColumn, toggleSubItem, toggleAllColumns, areAllColumnsSelected, areSomeColumnsSelected, isValidTemplateName, deepCloneColumns, toggleSingleColumn, toggleAllCurrentColumns, areAllCurrentColumnsSelected, areSomeCurrentColumnsSelected, normalizeColumnsSelected, areColumnsEqual, resetColumnsToDefault, initializeEditingColumns, initializeCreateColumns, initializeCreateColumnsWithCurrentState, } from './columnState';
4
+ export { getSubmenuFromTemplateLayout, getColumnOrder, updateTemplate, templateToViewMenuItem, convertTemplateToColumnsView, convertTemplatesToColumnsView, } from './templateToColumnsView';
@@ -0,0 +1,4 @@
1
+ export { isDateColumn, transformLayoutToColumns, getColumnsByMode, convertColumnsToLayoutSection, mapColumnsToLayoutSection, getLayoutDataFromTemplates, } from './layoutTransform';
2
+ export { createCustomViewMenuItem, setViewAsDefault, transformTemplatesToViewMenuItems, mapTemplatesToMenuItems, getSubmenuItems, getSubmenuItemsForDisplay, hasSubmenu, } from './viewMenu';
3
+ export { getColumnCheckState, toggleColumn, toggleSubItem, toggleAllColumns, areAllColumnsSelected, areSomeColumnsSelected, isValidTemplateName, deepCloneColumns, toggleSingleColumn, toggleAllCurrentColumns, areAllCurrentColumnsSelected, areSomeCurrentColumnsSelected, normalizeColumnsSelected, areColumnsEqual, resetColumnsToDefault, initializeEditingColumns, initializeCreateColumns, initializeCreateColumnsWithCurrentState, } from './columnState';
4
+ export { getSubmenuFromTemplateLayout, getColumnOrder, updateTemplate, templateToViewMenuItem, convertTemplateToColumnsView, convertTemplatesToColumnsView, } from './templateToColumnsView';
@@ -0,0 +1,10 @@
1
+ import type { ColumnViewProps, TableMode } from '../../../../types/index.js';
2
+ import type { LayoutSection } from '../types';
3
+ export declare const isDateColumn: (name: string) => boolean;
4
+ export declare const transformLayoutToColumns: (layout: LayoutSection[], lang?: string) => ColumnViewProps[];
5
+ export declare const getColumnsByMode: (mode: TableMode, layoutData?: LayoutSection[]) => ColumnViewProps[];
6
+ export declare const convertColumnsToLayoutSection: (columns: ColumnViewProps[], mode: TableMode, lang?: string) => LayoutSection;
7
+ export declare const mapColumnsToLayoutSection: (columns: ColumnViewProps[], mode: TableMode, lang?: string) => LayoutSection;
8
+ export declare const getLayoutDataFromTemplates: (templates: Array<{
9
+ layout: LayoutSection[];
10
+ }>) => LayoutSection[];
@@ -0,0 +1,71 @@
1
+ export const isDateColumn = (name) => name.toLowerCase() === 'date';
2
+ export const transformLayoutToColumns = (layout, lang = 'en') => {
3
+ const columns = [];
4
+ layout.forEach((section) => {
5
+ section.columns.forEach((col) => {
6
+ var _a, _b, _c, _d;
7
+ const label = ((_a = col.name.find((n) => n.lang === lang)) === null || _a === void 0 ? void 0 : _a.text) || ((_b = col.name[0]) === null || _b === void 0 ? void 0 : _b.text) || col.code;
8
+ const menuItems = ((_c = col.fields) === null || _c === void 0 ? void 0 : _c.length)
9
+ ? col.fields.map((field) => {
10
+ var _a, _b;
11
+ return ({
12
+ name: field.code,
13
+ label: ((_a = field.name.find((n) => n.lang === lang || n.lang === '')) === null || _a === void 0 ? void 0 : _a.text) || field.code,
14
+ selected: (_b = field.default) !== null && _b !== void 0 ? _b : false,
15
+ });
16
+ })
17
+ : undefined;
18
+ columns.push({
19
+ name: col.code,
20
+ label,
21
+ selected: isDateColumn(col.code) ? true : (_d = col.default) !== null && _d !== void 0 ? _d : false,
22
+ menuItems: (menuItems === null || menuItems === void 0 ? void 0 : menuItems.length) ? menuItems : undefined,
23
+ });
24
+ });
25
+ });
26
+ return columns;
27
+ };
28
+ export const getColumnsByMode = (mode, layoutData) => {
29
+ if (!(layoutData === null || layoutData === void 0 ? void 0 : layoutData.length))
30
+ return [];
31
+ const sectionCode = mode === 'sheet' ? 'sheet' : 'advanced';
32
+ const section = layoutData.find((s) => s.code.toLowerCase() === sectionCode);
33
+ return section ? transformLayoutToColumns([section]) : [];
34
+ };
35
+ export const convertColumnsToLayoutSection = (columns, mode, lang = 'en') => {
36
+ const columnItems = columns.map((col, index) => {
37
+ var _a, _b;
38
+ const fieldItems = (_a = col.menuItems) === null || _a === void 0 ? void 0 : _a.map((field) => {
39
+ var _a;
40
+ return ({
41
+ code: field.name,
42
+ name: [{ text: typeof field.label === 'string' ? field.label : field.name, lang: lang || '' }],
43
+ default: (_a = field.selected) !== null && _a !== void 0 ? _a : false,
44
+ });
45
+ });
46
+ const columnLabel = typeof col.label === 'string' ? col.label : col.name;
47
+ return Object.assign({ code: col.name, name: [{ text: columnLabel, lang }], order: index + 1, default: (_b = col.selected) !== null && _b !== void 0 ? _b : false }, ((fieldItems === null || fieldItems === void 0 ? void 0 : fieldItems.length) ? { fields: fieldItems } : {}));
48
+ });
49
+ const sectionCode = mode === 'sheet' ? 'Sheet' : 'Advanced';
50
+ return { code: sectionCode, columns: columnItems };
51
+ };
52
+ export const mapColumnsToLayoutSection = (columns, mode, lang = 'en') => convertColumnsToLayoutSection(columns, mode, lang);
53
+ export const getLayoutDataFromTemplates = (templates) => {
54
+ const sectionsMap = new Map();
55
+ templates.forEach((template) => {
56
+ template.layout.forEach((section) => {
57
+ const existing = sectionsMap.get(section.code);
58
+ if (existing) {
59
+ const codes = new Set(existing.columns.map((c) => c.code));
60
+ section.columns.forEach((col) => {
61
+ if (!codes.has(col.code))
62
+ existing.columns.push(col);
63
+ });
64
+ }
65
+ else {
66
+ sectionsMap.set(section.code, Object.assign(Object.assign({}, section), { columns: [...section.columns] }));
67
+ }
68
+ });
69
+ });
70
+ return Array.from(sectionsMap.values());
71
+ };
@@ -0,0 +1,30 @@
1
+ import type { ColumnsView, TableMode, ColumnViewProps } from '../../../../types/index.js';
2
+ import type { ViewMenuItem, Template } from '../types';
3
+ export declare function getSubmenuFromTemplateLayout(template: Template, tableMode: TableMode, lang?: string): ColumnViewProps[];
4
+ export declare const getColumnOrder: (col: {
5
+ order?: number | string | null;
6
+ }) => number;
7
+ export declare function updateTemplate<T extends {
8
+ layout?: Array<{
9
+ columns?: unknown[];
10
+ }>;
11
+ }>(template: T): T;
12
+ export declare function templateToViewMenuItem(template: Template, tableMode: TableMode): ViewMenuItem & {
13
+ layout?: Template['layout'];
14
+ };
15
+ type TemplateWithSubmenu = Template & {
16
+ columns?: string[];
17
+ submenu?: Array<{
18
+ name: string;
19
+ label: string;
20
+ selected: boolean;
21
+ menuItems?: Array<{
22
+ name: string;
23
+ label: string;
24
+ selected: boolean;
25
+ }>;
26
+ }>;
27
+ };
28
+ export declare const convertTemplateToColumnsView: (template: Template | TemplateWithSubmenu, tableMode: TableMode) => ColumnsView[];
29
+ export declare const convertTemplatesToColumnsView: (templates: Template[], tableMode: TableMode) => ColumnsView[];
30
+ export {};
@@ -0,0 +1,144 @@
1
+ export function getSubmenuFromTemplateLayout(template, tableMode, lang = 'en') {
2
+ var _a, _b;
3
+ if (!((_a = template === null || template === void 0 ? void 0 : template.layout) === null || _a === void 0 ? void 0 : _a.length))
4
+ return [];
5
+ const sectionCode = tableMode === 'sheet' ? 'sheet' : 'advanced';
6
+ const section = template.layout.find((s) => { var _a; return ((_a = s.code) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === sectionCode; });
7
+ if (!((_b = section === null || section === void 0 ? void 0 : section.columns) === null || _b === void 0 ? void 0 : _b.length))
8
+ return [];
9
+ const columns = section.columns.map((col) => {
10
+ var _a, _b, _c, _d, _e, _f, _g;
11
+ const label = ((_b = (_a = col.name) === null || _a === void 0 ? void 0 : _a.find((n) => n.lang === lang)) === null || _b === void 0 ? void 0 : _b.text) || ((_d = (_c = col.name) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.text) || col.code;
12
+ const menuItems = ((_e = col.fields) === null || _e === void 0 ? void 0 : _e.length)
13
+ ? col.fields.map((field) => {
14
+ var _a, _b, _c;
15
+ return ({
16
+ name: field.code,
17
+ label: ((_b = (_a = field.name) === null || _a === void 0 ? void 0 : _a.find((n) => n.lang === lang || n.lang === '')) === null || _b === void 0 ? void 0 : _b.text) || field.code,
18
+ selected: (_c = field.default) !== null && _c !== void 0 ? _c : false,
19
+ });
20
+ })
21
+ : undefined;
22
+ return Object.assign({ name: col.code, label, selected: ((_f = col.code) === null || _f === void 0 ? void 0 : _f.toLowerCase()) === 'date' ? true : (_g = col.default) !== null && _g !== void 0 ? _g : false }, (menuItems && menuItems.length > 0 && { menuItems }));
23
+ });
24
+ const hasDate = columns.some((c) => { var _a; return ((_a = c.name) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'date'; });
25
+ return hasDate ? columns : [{ name: 'date', label: 'Date', selected: true }, ...columns];
26
+ }
27
+ export const getColumnOrder = (col) => {
28
+ const o = col === null || col === void 0 ? void 0 : col.order;
29
+ if (o == null)
30
+ return 999;
31
+ const n = Number(o);
32
+ return Number.isFinite(n) ? n : 999;
33
+ };
34
+ export function updateTemplate(template) {
35
+ var _a, _b;
36
+ return Object.assign(Object.assign({}, template), { layout: (_b = (_a = template.layout) === null || _a === void 0 ? void 0 : _a.map((section) => {
37
+ var _a;
38
+ return (Object.assign(Object.assign({}, section), { columns: [...((_a = section.columns) !== null && _a !== void 0 ? _a : [])] }));
39
+ })) !== null && _b !== void 0 ? _b : [] });
40
+ }
41
+ export function templateToViewMenuItem(template, tableMode) {
42
+ var _a;
43
+ const layout = (_a = template.layout) === null || _a === void 0 ? void 0 : _a.map((section) => {
44
+ var _a;
45
+ return (Object.assign(Object.assign({}, section), { columns: [...((_a = section.columns) !== null && _a !== void 0 ? _a : [])].sort((a, b) => getColumnOrder(a) - getColumnOrder(b)) }));
46
+ });
47
+ const submenu = getSubmenuFromTemplateLayout(template, tableMode);
48
+ return {
49
+ id: template.templateId,
50
+ label: template.name,
51
+ templateId: template.templateId,
52
+ layout,
53
+ submenu,
54
+ columns: submenu.map((c) => c.name),
55
+ isCustom: true,
56
+ default: template.default,
57
+ };
58
+ }
59
+ export const convertTemplateToColumnsView = (template, tableMode) => {
60
+ if (!template) {
61
+ return [];
62
+ }
63
+ const templateWithSubmenu = template;
64
+ if (template.layout && Array.isArray(template.layout) && template.layout.length > 0) {
65
+ const modeCode = tableMode === 'default' ? 'Advanced' : 'Sheet';
66
+ const layoutForMode = template.layout.find((layout) => {
67
+ var _a;
68
+ const layoutCode = (_a = layout.code) === null || _a === void 0 ? void 0 : _a.trim();
69
+ return layoutCode === modeCode || (layoutCode === null || layoutCode === void 0 ? void 0 : layoutCode.toLowerCase()) === modeCode.toLowerCase();
70
+ }) ||
71
+ template.layout.find((layout) => {
72
+ var _a, _b;
73
+ const layoutCode = (_b = (_a = layout.code) === null || _a === void 0 ? void 0 : _a.trim()) === null || _b === void 0 ? void 0 : _b.toLowerCase();
74
+ if (tableMode === 'default') {
75
+ return layoutCode === 'default' || layoutCode === 'advanced';
76
+ }
77
+ else {
78
+ return layoutCode === 'sheet' || layoutCode === 'sheets';
79
+ }
80
+ });
81
+ if (layoutForMode && layoutForMode.columns && layoutForMode.columns.length > 0) {
82
+ const templateColumnsView = layoutForMode.columns
83
+ .map((templateCol) => {
84
+ var _a, _b;
85
+ return ({
86
+ name: templateCol.name && templateCol.name.length > 0 ? templateCol.name : [{ text: templateCol.code, lang: 'en' }],
87
+ selected: (_a = templateCol.default) !== null && _a !== void 0 ? _a : false,
88
+ sort_order: getColumnOrder(templateCol),
89
+ fields: ((_b = templateCol.fields) === null || _b === void 0 ? void 0 : _b.map((field) => ({
90
+ code: field.code,
91
+ type: 'single',
92
+ parameters: [{ parameter: field.code, code: field.code }],
93
+ }))) || [
94
+ {
95
+ code: templateCol.code,
96
+ type: 'single',
97
+ parameters: [{ parameter: templateCol.code, code: templateCol.code }],
98
+ },
99
+ ],
100
+ });
101
+ })
102
+ .sort((a, b) => { var _a, _b; return ((_a = a.sort_order) !== null && _a !== void 0 ? _a : 999) - ((_b = b.sort_order) !== null && _b !== void 0 ? _b : 999); });
103
+ return templateColumnsView;
104
+ }
105
+ }
106
+ if (templateWithSubmenu.submenu && Array.isArray(templateWithSubmenu.submenu) && templateWithSubmenu.submenu.length > 0) {
107
+ const templateColumnsView = templateWithSubmenu.submenu.map((submenuItem, index) => {
108
+ const columnCode = submenuItem.name.toLowerCase();
109
+ let selectedMenuItems;
110
+ if (submenuItem.menuItems && submenuItem.menuItems.length > 0) {
111
+ selectedMenuItems = submenuItem.menuItems.filter((item) => item.selected);
112
+ }
113
+ else {
114
+ selectedMenuItems = [{ name: columnCode, label: submenuItem.label || submenuItem.name, selected: true }];
115
+ }
116
+ const parameters = selectedMenuItems.length > 0
117
+ ? selectedMenuItems.map((menuItem) => ({
118
+ parameter: menuItem.name.toLowerCase(),
119
+ code: menuItem.name.toLowerCase(),
120
+ }))
121
+ : [{ parameter: columnCode, code: columnCode }];
122
+ const fieldType = selectedMenuItems.length > 1 ? 'combined' : 'single';
123
+ const result = {
124
+ name: [{ text: submenuItem.label || submenuItem.name, lang: 'en' }],
125
+ selected: submenuItem.selected,
126
+ sort_order: index + 1,
127
+ fields: [{ code: columnCode, type: fieldType, parameters }],
128
+ };
129
+ return result;
130
+ });
131
+ return templateColumnsView;
132
+ }
133
+ return [];
134
+ };
135
+ export const convertTemplatesToColumnsView = (templates, tableMode) => {
136
+ if (!templates || !Array.isArray(templates) || templates.length === 0) {
137
+ return [];
138
+ }
139
+ const defaultTemplate = (templates === null || templates === void 0 ? void 0 : templates.find((t) => t.default)) || templates[0];
140
+ if (!defaultTemplate) {
141
+ return [];
142
+ }
143
+ return convertTemplateToColumnsView(defaultTemplate, tableMode);
144
+ };
@@ -0,0 +1,36 @@
1
+ import type { ColumnViewProps, TableMode } from '../../../../types/index.js';
2
+ import type { LayoutSection, ViewMenuItem } from '../types';
3
+ export declare const createCustomViewMenuItem: (name: string, selectedColumns: ColumnViewProps[], isDefault?: boolean) => ViewMenuItem;
4
+ export declare const setViewAsDefault: (views: ViewMenuItem[], viewId: string) => ViewMenuItem[];
5
+ export declare const transformTemplatesToViewMenuItems: (templates: Array<{
6
+ id: string | {
7
+ timestamp: number;
8
+ date: string;
9
+ };
10
+ name: string;
11
+ default: boolean;
12
+ layout: LayoutSection[];
13
+ templateId: string;
14
+ }>, mode?: TableMode, lang?: string) => {
15
+ customViews: ViewMenuItem[];
16
+ defaultTemplateColumns?: ColumnViewProps[] | undefined;
17
+ defaultTemplate?: ViewMenuItem | undefined;
18
+ };
19
+ export declare const mapTemplatesToMenuItems: (templates: Array<{
20
+ id: string | {
21
+ timestamp: number;
22
+ date: string;
23
+ };
24
+ name: string;
25
+ default: boolean;
26
+ layout: LayoutSection[];
27
+ templateId: string;
28
+ }>, mode?: TableMode, lang?: string) => {
29
+ menuItems: ViewMenuItem[];
30
+ defaultItem?: ViewMenuItem | undefined;
31
+ allItems: ViewMenuItem[];
32
+ };
33
+ export declare const getSubmenuItems: (item: ViewMenuItem, defaultColumns: ColumnViewProps[]) => ColumnViewProps[];
34
+ export declare const hasSubmenu: (item: ViewMenuItem, defaultColumns: ColumnViewProps[]) => boolean;
35
+ /** Columns for menu display only: exclude index so it is hidden in the UI but still present in table */
36
+ export declare const getSubmenuItemsForDisplay: (columns: ColumnViewProps[]) => ColumnViewProps[];
@@ -0,0 +1,90 @@
1
+ import { INDEX_COLUMN_CONFIG, DATE_COLUMN_CONFIG } from '../constants';
2
+ import { transformLayoutToColumns } from './layoutTransform';
3
+ export const createCustomViewMenuItem = (name, selectedColumns, isDefault = false) => ({
4
+ label: name,
5
+ id: `custom_${Date.now()}`,
6
+ columns: selectedColumns.map((c) => c.name),
7
+ submenu: selectedColumns,
8
+ isCustom: true,
9
+ default: isDefault,
10
+ });
11
+ export const setViewAsDefault = (views, viewId) => views.map((v) => (Object.assign(Object.assign({}, v), { default: v.id === viewId })));
12
+ export const transformTemplatesToViewMenuItems = (templates, mode = 'sheet', lang = 'en') => {
13
+ const customViews = [];
14
+ let defaultTemplateColumns;
15
+ let defaultTemplate;
16
+ templates.forEach((template) => {
17
+ const sectionCode = mode === 'sheet' ? 'sheet' : 'advanced';
18
+ const section = template.layout.find((s) => s.code.toLowerCase() === sectionCode);
19
+ const columns = section ? transformLayoutToColumns([section], lang) : [];
20
+ const viewId = typeof template.id === 'string' ? template.id : template.templateId;
21
+ const indexColumn = INDEX_COLUMN_CONFIG;
22
+ const dateColumn = DATE_COLUMN_CONFIG;
23
+ const withDate = columns.some((c) => { var _a; return ((_a = c.name) !== null && _a !== void 0 ? _a : '').toLowerCase() === 'date'; }) ? columns : [dateColumn, ...columns];
24
+ const dateIndex = withDate.findIndex((c) => { var _a; return ((_a = c.name) !== null && _a !== void 0 ? _a : '').toLowerCase() === 'date'; });
25
+ const withDateFirst = dateIndex > 0 ? [withDate[dateIndex], ...withDate.filter((c) => { var _a; return ((_a = c.name) !== null && _a !== void 0 ? _a : '').toLowerCase() !== 'date'; })] : withDate;
26
+ const finalColumns = [indexColumn, ...withDateFirst];
27
+ const item = {
28
+ id: template.default ? 'default' : viewId,
29
+ templateId: template.templateId,
30
+ label: template.name,
31
+ isCustom: !template.default,
32
+ default: !!template.default,
33
+ columns: finalColumns.map((c) => c.name),
34
+ submenu: finalColumns,
35
+ };
36
+ if (template.default) {
37
+ defaultTemplateColumns = finalColumns;
38
+ defaultTemplate = item;
39
+ }
40
+ else {
41
+ customViews.push(item);
42
+ }
43
+ });
44
+ return { customViews, defaultTemplateColumns, defaultTemplate };
45
+ };
46
+ export const mapTemplatesToMenuItems = (templates, mode = 'sheet', lang = 'en') => {
47
+ const { customViews, defaultTemplate } = transformTemplatesToViewMenuItems(templates, mode, lang);
48
+ const allItems = defaultTemplate ? [defaultTemplate, ...customViews] : customViews;
49
+ return { menuItems: customViews, defaultItem: defaultTemplate, allItems };
50
+ };
51
+ export const getSubmenuItems = (item, defaultColumns) => {
52
+ var _a, _b;
53
+ let columns = [];
54
+ if (item.isCustom && ((_a = item.submenu) === null || _a === void 0 ? void 0 : _a.length)) {
55
+ columns = item.submenu;
56
+ }
57
+ else if (item.id === 'default') {
58
+ columns = defaultColumns;
59
+ }
60
+ else {
61
+ columns = (_b = item.submenu) !== null && _b !== void 0 ? _b : [];
62
+ }
63
+ const indexColumn = INDEX_COLUMN_CONFIG;
64
+ const hasDate = columns.some((c) => { var _a; return ((_a = c.name) !== null && _a !== void 0 ? _a : '').toLowerCase() === 'date'; });
65
+ if (!hasDate) {
66
+ const dateColumn = {
67
+ name: 'date',
68
+ label: 'Date',
69
+ selected: true,
70
+ };
71
+ return [indexColumn, dateColumn, ...columns];
72
+ }
73
+ const dateIndex = columns.findIndex((c) => { var _a; return ((_a = c.name) !== null && _a !== void 0 ? _a : '').toLowerCase() === 'date'; });
74
+ const dateCol = dateIndex >= 0 ? columns[dateIndex] : { name: 'date', label: 'Date', selected: true };
75
+ const rest = columns.filter((c) => { var _a, _b; return ((_a = c.name) !== null && _a !== void 0 ? _a : '').toLowerCase() !== 'date' && ((_b = c.name) !== null && _b !== void 0 ? _b : '').toLowerCase() !== 'index'; });
76
+ const withDateFirst = [dateCol, ...rest];
77
+ const hasIndex = withDateFirst.some((c) => { var _a; return ((_a = c.name) !== null && _a !== void 0 ? _a : '').toLowerCase() === 'index'; });
78
+ const indexInList = withDateFirst.findIndex((c) => { var _a; return ((_a = c.name) !== null && _a !== void 0 ? _a : '').toLowerCase() === 'index'; });
79
+ if (hasIndex && indexInList > 0) {
80
+ const indexCol = withDateFirst[indexInList];
81
+ const restWithoutIndex = withDateFirst.filter((c) => { var _a; return ((_a = c.name) !== null && _a !== void 0 ? _a : '').toLowerCase() !== 'index'; });
82
+ return [indexCol, ...restWithoutIndex];
83
+ }
84
+ if (hasIndex && indexInList === 0)
85
+ return withDateFirst;
86
+ return [indexColumn, ...withDateFirst];
87
+ };
88
+ export const hasSubmenu = (item, defaultColumns) => getSubmenuItems(item, defaultColumns).length > 0;
89
+ /** Columns for menu display only: exclude index so it is hidden in the UI but still present in table */
90
+ export const getSubmenuItemsForDisplay = (columns) => columns.filter((c) => { var _a; return ((_a = c.name) !== null && _a !== void 0 ? _a : '').toLowerCase() !== 'index'; });
@@ -6,3 +6,5 @@ export { default as FiltersRowWrapper } from './FiltersRowWrapper';
6
6
  export { default as FiltersRow } from './FiltersRow';
7
7
  export * from './style';
8
8
  export * from './type';
9
+ export type { Template, LayoutSection, ViewMenuItem, ColumnChange, CreateOrEditViewPayload } from './TableView/types';
10
+ export { getSubmenuFromTemplateLayout, getColumnOrder, updateTemplate, templateToViewMenuItem, convertTemplateToColumnsView, convertTemplatesToColumnsView, } from './TableView';
@@ -6,3 +6,4 @@ export { default as FiltersRowWrapper } from './FiltersRowWrapper';
6
6
  export { default as FiltersRow } from './FiltersRow';
7
7
  export * from './style';
8
8
  export * from './type';
9
+ export { getSubmenuFromTemplateLayout, getColumnOrder, updateTemplate, templateToViewMenuItem, convertTemplateToColumnsView, convertTemplatesToColumnsView, } from './TableView';
@@ -2,6 +2,7 @@ import React, { ReactNode } from 'react';
2
2
  import type { CalenderMode, TableHeaderStatus, ColumnViewProps, TableMode, Timezone, SegmentCountry } from '../../types/index.js';
3
3
  import { AvailableStatus } from '../StatusBar/type';
4
4
  import { PartialExcept } from '../../types/index.js';
5
+ import type { ViewMenuItem, LayoutSection, Template } from './TableView/types';
5
6
  type ViewsOptions = {
6
7
  default: {};
7
8
  developer: {};
@@ -22,7 +23,7 @@ export interface TableHeaderProps<IStatus extends TableHeaderStatus | TableHeade
22
23
  calendarMode?: CalenderMode;
23
24
  onStatusChange?: <T extends IStatus>(status?: T) => void;
24
25
  onSearch?: (search: string) => void;
25
- onViewChange?: () => void;
26
+ onViewChange?: (selectedView?: ViewMenuItem) => void;
26
27
  onDateChange?: (date: Date | [Date, Date]) => void;
27
28
  tableReportsComponent?: React.ReactNode;
28
29
  tableFilterComponent?: React.ReactNode;
@@ -44,6 +45,22 @@ export interface TableHeaderProps<IStatus extends TableHeaderStatus | TableHeade
44
45
  id: string;
45
46
  label: string;
46
47
  }) => void;
48
+ onCreateCustomView?: (data: {
49
+ name: string;
50
+ selectedColumns: ColumnViewProps[];
51
+ layout: LayoutSection;
52
+ }) => Promise<{
53
+ templateId: string;
54
+ name: string;
55
+ } | void>;
56
+ onEditCustomView?: (viewId: string, data: {
57
+ name: string;
58
+ selectedColumns: ColumnViewProps[];
59
+ layout: LayoutSection;
60
+ }) => Promise<void>;
61
+ onDeleteCustomView?: (viewId: string) => Promise<void>;
62
+ templates?: Template[];
63
+ lang?: string;
47
64
  onToggleTextButtonClick?: () => void;
48
65
  children?: ReactNode;
49
66
  calendarGroupBy?: string;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const Button: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  type ExportButtonProps = {
4
3
  notificationState?: {
5
4
  success: boolean;