@tap-payments/os-micro-frontend-shared 0.1.374-test.1-test.2 → 0.1.374-test.1-test.2-test.3-test.4
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/build/components/TableHeader/TableView/ViewSelector.js +55 -13
- package/build/components/TableHeader/TableView/ViewsDropdown.d.ts +1 -1
- package/build/components/TableHeader/TableView/ViewsDropdown.js +81 -140
- package/build/components/TableHeader/TableView/components/ViewsSubmenu.js +42 -23
- package/build/components/TableHeader/TableView/hooks/useViewSelector.d.ts +8 -7
- package/build/components/TableHeader/TableView/hooks/useViewSelector.js +78 -122
- package/build/components/TableHeader/TableView/hooks/useViewsManager.d.ts +13 -5
- package/build/components/TableHeader/TableView/hooks/useViewsManager.js +72 -122
- package/build/components/TableHeader/TableView/index.d.ts +2 -2
- package/build/components/TableHeader/TableView/index.js +1 -1
- package/build/components/TableHeader/TableView/types.d.ts +9 -8
- package/build/components/TableHeader/TableView/utils.d.ts +5 -5
- package/build/components/TableHeader/TableView/utils.js +9 -3
- package/package.json +2 -2
|
@@ -31,7 +31,9 @@ export const transformLayoutToColumns = (layout, lang = 'en') => {
|
|
|
31
31
|
};
|
|
32
32
|
export const getColumnsByMode = (mode, layoutData) => {
|
|
33
33
|
if (layoutData && layoutData.length > 0) {
|
|
34
|
-
|
|
34
|
+
// Map TableMode to layout section code: 'default' → 'Advanced', 'sheet' → 'Sheet'
|
|
35
|
+
const sectionCode = mode === 'sheet' ? 'sheet' : 'advanced';
|
|
36
|
+
const section = layoutData.find((s) => s.code.toLowerCase() === sectionCode);
|
|
35
37
|
if (section) {
|
|
36
38
|
return transformLayoutToColumns([section]);
|
|
37
39
|
}
|
|
@@ -103,7 +105,9 @@ export const transformTemplatesToViewMenuItems = (templates, mode = 'sheet', lan
|
|
|
103
105
|
let defaultTemplate;
|
|
104
106
|
templates.forEach((template) => {
|
|
105
107
|
// Get columns for the specified mode
|
|
106
|
-
|
|
108
|
+
// Map TableMode to layout section code: 'default' → 'Advanced', 'sheet' → 'Sheet'
|
|
109
|
+
const sectionCode = mode === 'sheet' ? 'sheet' : 'advanced';
|
|
110
|
+
const section = template.layout.find((s) => s.code.toLowerCase() === sectionCode);
|
|
107
111
|
const columns = section ? transformLayoutToColumns([section], lang) : [];
|
|
108
112
|
// Handle id as either string or object
|
|
109
113
|
const templateIdString = typeof template.id === 'string' ? template.id : template.templateId;
|
|
@@ -172,8 +176,10 @@ export const convertColumnsToLayoutSection = (columns, mode, lang = 'en') => {
|
|
|
172
176
|
},
|
|
173
177
|
], order: index + 1, default: (_b = col.selected) !== null && _b !== void 0 ? _b : false }, (fieldItems && fieldItems.length > 0 && { fields: fieldItems }));
|
|
174
178
|
});
|
|
179
|
+
// Map TableMode to layout section code: 'default' → 'Advanced', 'sheet' → 'Sheet'
|
|
180
|
+
const sectionCode = mode === 'sheet' ? 'Sheet' : 'Advanced';
|
|
175
181
|
return {
|
|
176
|
-
code:
|
|
182
|
+
code: sectionCode,
|
|
177
183
|
columns: columnItems,
|
|
178
184
|
};
|
|
179
185
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
3
|
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.1.374-test.1-test.2",
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.374-test.1-test.2-test.3-test.4",
|
|
5
|
+
"testVersion": 4,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|