@tap-payments/os-micro-frontend-shared 0.1.96-test.2 → 0.1.96-test.20
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/LICENSE +21 -21
- package/README.md +12 -12
- package/build/components/ActionMenu/style.d.ts +1 -1
- package/build/components/AmountStatusChip/AmountStatusChip.d.ts +9 -0
- package/build/components/AmountStatusChip/AmountStatusChip.js +19 -0
- package/build/components/AmountStatusChip/index.d.ts +3 -0
- package/build/components/AmountStatusChip/index.js +2 -0
- package/build/components/AmountStatusChip/style.d.ts +3 -0
- package/build/components/AmountStatusChip/style.js +13 -0
- package/build/components/AppServices/AppServices.d.ts +10 -5
- package/build/components/AppServices/AppServices.js +16 -18
- package/build/components/AppServices/ServiceItem.d.ts +2 -4
- package/build/components/AppServices/ServiceItem.js +2 -4
- package/build/components/AppServicesBar/AppServicesBar.d.ts +25 -0
- package/build/components/AppServicesBar/AppServicesBar.js +18 -0
- package/build/components/AppServicesBar/index.d.ts +3 -0
- package/build/components/AppServicesBar/index.js +3 -0
- package/build/components/AppServicesBar/style.d.ts +4 -0
- package/build/components/AppServicesBar/style.js +6 -0
- package/build/components/AppWindowWrapper/headers/AccountHeader/components/AccountHeaderTitle/AccountHeaderTitle.d.ts +1 -1
- package/build/components/AppWindowWrapper/headers/AccountHeader/components/AccountHeaderTitle/AccountHeaderTitle.js +1 -1
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeaderBase.d.ts +1 -1
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeaderBase.js +2 -2
- package/build/components/AuthenticationTypeChip/AuthenticationTypeChip.d.ts +9 -0
- package/build/components/AuthenticationTypeChip/AuthenticationTypeChip.js +21 -0
- package/build/components/AuthenticationTypeChip/constants.d.ts +16 -0
- package/build/components/AuthenticationTypeChip/constants.js +13 -0
- package/build/components/AuthenticationTypeChip/index.d.ts +3 -0
- package/build/components/AuthenticationTypeChip/index.js +2 -0
- package/build/components/ColorPicker/ColorPicker.d.ts +4 -1
- package/build/components/ColorPicker/ColorPicker.js +10 -43
- package/build/components/ColorPicker/ColorPickerPanel.d.ts +7 -0
- package/build/components/ColorPicker/ColorPickerPanel.js +41 -0
- package/build/components/ColorPicker/ColorSchemeSelect.d.ts +7 -0
- package/build/components/ColorPicker/ColorSchemeSelect.js +35 -0
- package/build/components/ColorPicker/HexaFields.d.ts +7 -0
- package/build/components/ColorPicker/HexaFields.js +79 -0
- package/build/components/ColorPicker/RGBAFields.d.ts +7 -0
- package/build/components/ColorPicker/RGBAFields.js +25 -0
- package/build/components/ColorPicker/style.d.ts +20 -9
- package/build/components/ColorPicker/style.js +49 -2
- package/build/components/JSONViewer/components/JSONTitleBar/JSONTitleBar.d.ts +1 -1
- package/build/components/JSONViewer/components/JSONTitleBar/JSONTitleBar.js +1 -1
- package/build/components/ListLayout/ListLayout.d.ts +10 -0
- package/build/components/ListLayout/ListLayout.js +20 -0
- package/build/components/ListLayout/index.d.ts +2 -0
- package/build/components/ListLayout/index.js +2 -0
- package/build/components/ListLayout/styles.d.ts +4 -0
- package/build/components/ListLayout/styles.js +9 -0
- package/build/components/RightLeftExpandingCenterChip/style.js +0 -2
- package/build/components/SearchButton/styles.d.ts +1 -1
- package/build/components/StatusChip/StatusChip.d.ts +1 -1
- package/build/components/StatusChip/StatusChip.js +13 -10
- package/build/components/StatusChip/style.d.ts +4 -0
- package/build/components/StatusChip/style.js +13 -5
- package/build/components/StatusChip/type.d.ts +4 -0
- package/build/components/StatusChipWithCopy/StatusChipWithCopy.d.ts +2 -1
- package/build/components/StatusChipWithCopy/StatusChipWithCopy.js +2 -2
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.js +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/constant.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ActionCell/constant.js +2 -1
- package/build/components/TableCells/CustomCells/ActionCell/hooks/useActionCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/ApplicationStatusCell.js +4 -4
- package/build/components/TableCells/CustomCells/BalanceCell/style.js +1 -1
- package/build/components/TableCells/CustomCells/ProductsCell/style.js +1 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.js +1 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.js +1 -1
- package/build/components/TableCells/CustomCells/style.js +1 -1
- package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/PaymentAgreementCell.d.ts +13 -0
- package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/PaymentAgreementCell.js +26 -0
- package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/index.d.ts +1 -0
- package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/index.js +1 -0
- package/build/components/TableCells/SheetViewCells/index.d.ts +1 -0
- package/build/components/TableCells/SheetViewCells/index.js +1 -0
- package/build/components/TableCells/index.d.ts +1 -0
- package/build/components/TableCells/index.js +1 -0
- package/build/components/ToggleView/ToggleView.d.ts +16 -0
- package/build/components/ToggleView/ToggleView.js +32 -0
- package/build/components/ToggleView/ToggleWrapper.d.ts +4 -0
- package/build/components/ToggleView/ToggleWrapper.js +8 -0
- package/build/components/ToggleView/index.d.ts +3 -0
- package/build/components/ToggleView/index.js +3 -0
- package/build/components/ToggleView/style.d.ts +14 -0
- package/build/components/ToggleView/style.js +31 -0
- package/build/components/ToggleView/types.d.ts +6 -0
- package/build/components/ToggleView/types.js +6 -0
- package/build/components/Toolbar/style.d.ts +5 -2
- package/build/components/Toolbar/style.js +6 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.d.ts +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.js +2 -2
- package/build/components/VirtualTables/SheetViewVirtualTable/components/LoadingMainTable.js +2 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/MainTable.js +5 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/components/PinnedColumn.js +5 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.d.ts +1 -4
- package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.js +39 -7
- package/build/components/VirtualTables/VirtualTable/VirtualTable.d.ts +1 -1
- package/build/components/VirtualTables/VirtualTable/VirtualTable.js +2 -2
- package/build/components/VirtualTables/VirtualTableWithCard/VirtualTableWithCard.d.ts +1 -1
- package/build/components/VirtualTables/VirtualTableWithCard/VirtualTableWithCard.js +2 -2
- package/build/components/VirtualTables/components/TableRow.js +2 -1
- package/build/components/Window/Window.d.ts +2 -1
- package/build/components/Window/Window.js +2 -2
- package/build/components/Window/style.d.ts +1 -0
- package/build/components/Window/style.js +1 -1
- package/build/components/index.d.ts +8 -0
- package/build/components/index.js +8 -0
- package/build/constants/apps.d.ts +41 -0
- package/build/constants/apps.js +19 -2
- package/build/constants/chips/index.d.ts +1 -0
- package/build/constants/chips/index.js +1 -0
- package/build/{components/StatusChip/constants.d.ts → constants/chips/statusChips.d.ts} +1 -1
- package/build/{components/StatusChip/constants.js → constants/chips/statusChips.js} +1 -1
- package/build/constants/index.d.ts +1 -0
- package/build/constants/index.js +1 -0
- package/build/constants/table/cell/authenticationsTableCellWidth.d.ts +1 -1
- package/build/constants/table/cell/authenticationsTableCellWidth.js +1 -1
- package/build/constants/table/cell/authorizationTableCellWidth.d.ts +4 -4
- package/build/constants/table/cell/authorizationTableCellWidth.js +4 -4
- package/build/constants/table/cell/chargeTableCellWidth.d.ts +3 -3
- package/build/constants/table/cell/chargeTableCellWidth.js +3 -3
- package/build/constants/table/cell/destinationsTableCellWidth.d.ts +3 -3
- package/build/constants/table/cell/destinationsTableCellWidth.js +3 -3
- package/build/constants/table/cell/merchantsTableCellWidth.d.ts +1 -1
- package/build/constants/table/cell/merchantsTableCellWidth.js +1 -1
- package/build/constants/table/cell/refundTableCellWidth.d.ts +3 -3
- package/build/constants/table/cell/refundTableCellWidth.js +3 -3
- package/build/types/apps.d.ts +50 -1
- package/build/types/table.d.ts +1 -1
- package/build/utils/color.d.ts +11 -0
- package/build/utils/color.js +27 -0
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +4 -3
- package/build/utils/table.d.ts +3 -6
- package/build/utils/table.js +6 -32
- package/package.json +29 -2
package/build/utils/table.js
CHANGED
|
@@ -73,38 +73,12 @@ export const isHeightNotFullyFilledByRows = (totalRows) => {
|
|
|
73
73
|
const allowedRows = maxRowsThatFit();
|
|
74
74
|
return totalRows < allowedRows + 1;
|
|
75
75
|
};
|
|
76
|
-
export const
|
|
77
|
-
|
|
78
|
-
const padding = 16;
|
|
79
|
-
const calculatedHeight = headerHeight + totalRows * rowHeight + padding;
|
|
80
|
-
const minHeight = 200;
|
|
81
|
-
const maxHeight = window.innerHeight * 0.8;
|
|
82
|
-
return Math.max(minHeight, Math.min(calculatedHeight, maxHeight));
|
|
83
|
-
};
|
|
84
|
-
export const calculateSheetViewMaxRows = (availableHeight, rowHeight = TABLE_CONTENT_ROW_HEIGHT) => {
|
|
85
|
-
const headerHeight = 56;
|
|
86
|
-
const padding = 16;
|
|
87
|
-
const availableContentHeight = availableHeight - headerHeight - padding;
|
|
88
|
-
return Math.floor(availableContentHeight / rowHeight);
|
|
89
|
-
};
|
|
90
|
-
export const isSheetViewScrollable = (totalRows, containerHeight, rowHeight = TABLE_CONTENT_ROW_HEIGHT) => {
|
|
91
|
-
const headerHeight = 56;
|
|
92
|
-
const padding = 16;
|
|
93
|
-
const contentHeight = headerHeight + totalRows * rowHeight + padding;
|
|
94
|
-
return contentHeight > containerHeight;
|
|
95
|
-
};
|
|
96
|
-
export const getSheetViewRowHeight = () => {
|
|
97
|
-
const baseRowHeight = TABLE_CONTENT_ROW_HEIGHT;
|
|
98
|
-
return baseRowHeight * 0.8;
|
|
76
|
+
export const isTableDefaultMode = (tableMode) => {
|
|
77
|
+
return tableMode === 'default';
|
|
99
78
|
};
|
|
100
|
-
export const
|
|
101
|
-
|
|
102
|
-
const headerHeight = 56;
|
|
103
|
-
const padding = 16;
|
|
104
|
-
const calculatedHeight = headerHeight + totalRows * rowHeight + padding;
|
|
105
|
-
const maxHeight = window.innerHeight * maxHeightPercentage;
|
|
106
|
-
return Math.min(calculatedHeight, maxHeight);
|
|
79
|
+
export const isTableSheetMode = (tableMode) => {
|
|
80
|
+
return tableMode === 'sheet';
|
|
107
81
|
};
|
|
108
|
-
export const
|
|
109
|
-
return tableMode === '
|
|
82
|
+
export const isTableTextMode = (tableMode) => {
|
|
83
|
+
return tableMode === 'text';
|
|
110
84
|
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
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.96-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.96-test.20",
|
|
5
|
+
"testVersion": 20,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|
|
9
9
|
"types": "build/index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
|
+
"./package.json": "./package.json",
|
|
11
12
|
".": {
|
|
12
13
|
"types": "./build/index.d.ts",
|
|
13
14
|
"import": "./build/index.js",
|
|
@@ -127,6 +128,32 @@
|
|
|
127
128
|
"vite": "6.0.5",
|
|
128
129
|
"vite-tsconfig-paths": "^4.2.0"
|
|
129
130
|
},
|
|
131
|
+
"peerDependencies": {
|
|
132
|
+
"react": "^18",
|
|
133
|
+
"react-dom": "^18",
|
|
134
|
+
"@mui/material": "^5",
|
|
135
|
+
"@emotion/react": "^11",
|
|
136
|
+
"@emotion/styled": "^11",
|
|
137
|
+
"framer-motion": "^10",
|
|
138
|
+
"react-hook-form": "^7",
|
|
139
|
+
"@hookform/resolvers": "^3",
|
|
140
|
+
"react-router-dom": "^7",
|
|
141
|
+
"i18next": "^22",
|
|
142
|
+
"react-i18next": "^12",
|
|
143
|
+
"react-multi-date-picker": "^4",
|
|
144
|
+
"dayjs": "^1",
|
|
145
|
+
"react-dropzone": "^14",
|
|
146
|
+
"react-hot-toast": "^2",
|
|
147
|
+
"recharts": "^2",
|
|
148
|
+
"react-window": "^1.8",
|
|
149
|
+
"react-window-infinite-loader": "^1",
|
|
150
|
+
"react-virtualized-auto-sizer": "^1",
|
|
151
|
+
"re-resizable": "^6",
|
|
152
|
+
"react-draggable": "^4",
|
|
153
|
+
"react-currency-input-field": "^3",
|
|
154
|
+
"react18-input-otp": "^1",
|
|
155
|
+
"@uiw/react-json-view": "^2.0.0-alpha"
|
|
156
|
+
},
|
|
130
157
|
"lint-staged": {
|
|
131
158
|
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
132
159
|
"yarn run prettier:fix",
|