@tap-payments/os-micro-frontend-shared 0.0.217 → 0.0.218
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/TableCells/CustomCells/ActionCell/ActionIconColumn.d.ts +6 -0
- package/build/components/TableCells/CustomCells/ActionCell/ActionIconColumn.js +48 -0
- package/build/components/TableCells/CustomCells/ActionCell/ActionsColumn.d.ts +10 -0
- package/build/components/TableCells/CustomCells/ActionCell/ActionsColumn.js +78 -0
- package/build/components/TableCells/CustomCells/ActionCell/index.d.ts +2 -0
- package/build/components/TableCells/CustomCells/ActionCell/index.js +2 -0
- package/build/components/TableCells/CustomCells/StatusCell/constant.d.ts +4 -0
- package/build/components/TableCells/CustomCells/StatusCell/constant.js +4 -0
- package/build/components/VirtualTable/SheetView/SheetViewVirtualTable.js +6 -0
- package/build/components/VirtualTable/SheetView/hooks/usePinnedColumns.js +9 -1
- package/build/constants/table/cell/chargeTableCellWidth.d.ts +5 -0
- package/build/constants/table/cell/chargeTableCellWidth.js +5 -0
- package/build/utils/columns.d.ts +2 -0
- package/build/utils/columns.js +1 -1
- package/package.json +134 -132
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ActionCellProps } from '../type';
|
|
3
|
+
type ActionIconColumnProps = Readonly<Pick<ActionCellProps, 'actions' | 'dropdownAction' | 'onCloseDropdown' | 'isDropdownShown' | 'renderDropdown'>>;
|
|
4
|
+
declare function ActionIconColumn({ actions, dropdownAction, onCloseDropdown, isDropdownShown, renderDropdown, ...props }: ActionIconColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const _default: React.MemoExoticComponent<typeof ActionIconColumn>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { memo } from 'react';
|
|
14
|
+
import { AnimatePresence } from 'framer-motion';
|
|
15
|
+
import Dropdown from '../../../DropdownMenu';
|
|
16
|
+
import { TableCell } from '../../../TableCells';
|
|
17
|
+
import ActionIconsVariants from './components/ActionIconsVariants';
|
|
18
|
+
import { actionIcons } from './constant';
|
|
19
|
+
import { useActionCell } from './hooks/useActionCell';
|
|
20
|
+
import { ActionIcon, ActionsIconContainer } from './style';
|
|
21
|
+
import { TransparentButton } from '../style';
|
|
22
|
+
function ActionIconColumn(_a) {
|
|
23
|
+
var { actions, dropdownAction, onCloseDropdown, isDropdownShown = true, renderDropdown } = _a, props = __rest(_a, ["actions", "dropdownAction", "onCloseDropdown", "isDropdownShown", "renderDropdown"]);
|
|
24
|
+
const { open, anchorEl, filteredActions, isAnyActionLoading, isAnyActionHasError, isAnyActionSuccessful, areThereAnyShownActions, handleClick, handleClose, setAnchorEl, } = useActionCell({ actions, isDropdownShown, onCloseDropdown, renderDropdown });
|
|
25
|
+
return (_jsx(TableCell, Object.assign({}, props, { sx: {
|
|
26
|
+
overflow: 'visible',
|
|
27
|
+
} }, { children: _jsx("div", Object.assign({ "data-testid": "ActionIconColumn_Container", style: {
|
|
28
|
+
display: 'flex',
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
justifyContent: 'center',
|
|
31
|
+
gap: '5px',
|
|
32
|
+
} }, { children: _jsxs(ActionsIconContainer, Object.assign({ id: "styled-popover", selected: !!dropdownAction || open, "data-testid": "ActionIconColumn_ActionsIconContainer", "data-is-active": areThereAnyShownActions, sx: Object.assign({}, (!areThereAnyShownActions && {
|
|
33
|
+
pointerEvents: 'none',
|
|
34
|
+
})) }, { children: [_jsx(TransparentButton, Object.assign({ onClick: handleClick, "data-testid": "ActionIconColumn_ActionsIconContainer_TransparentButton", "data-is-active": areThereAnyShownActions, sx: Object.assign({}, (!areThereAnyShownActions && {
|
|
35
|
+
pointerEvents: 'none',
|
|
36
|
+
})) }, { children: _jsx(AnimatePresence, Object.assign({ mode: "wait" }, { children: _jsx(ActionIconsVariants, { isAnyActionLoading: isAnyActionLoading, isAnyActionHasError: isAnyActionHasError, isAnyActionSuccessful: isAnyActionSuccessful, areThereAnyShownActions: areThereAnyShownActions }) })) })), renderDropdown ? (renderDropdown(anchorEl, setAnchorEl)) : (_jsxs(_Fragment, { children: [dropdownAction, areThereAnyShownActions && (_jsx(Dropdown, { style: { zIndex: 2000 }, open: open, onClose: handleClose, anchorEl: anchorEl, menuItems: filteredActions.map((action) => (Object.assign(Object.assign({}, action), { onClick: (e) => {
|
|
37
|
+
var _a;
|
|
38
|
+
(_a = action === null || action === void 0 ? void 0 : action.onClick) === null || _a === void 0 ? void 0 : _a.call(action, e);
|
|
39
|
+
if (!action.hasActionMenu) {
|
|
40
|
+
handleClose();
|
|
41
|
+
}
|
|
42
|
+
}, onRightClick: (e) => {
|
|
43
|
+
var _a;
|
|
44
|
+
(_a = action === null || action === void 0 ? void 0 : action.onRightClick) === null || _a === void 0 ? void 0 : _a.call(action, e);
|
|
45
|
+
handleClose();
|
|
46
|
+
}, icon: (_jsx(ActionIcon, { icon: action.icon, src: actionIcons[action.icon], initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 } }, `action.label-${action.label.trim()}`)) }))) }))] }))] })) })) })));
|
|
47
|
+
}
|
|
48
|
+
export default memo(ActionIconColumn);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ActionCellProps } from '../type';
|
|
3
|
+
import { TableMode } from '../../../../types/index.js';
|
|
4
|
+
type ActionsColumnProps = Readonly<Pick<ActionCellProps, 'flag' | 'flagTooltip' | 'flagsCount' | 'row' | 'showJsonViewer' | 'isTextShown' | 'showIdButton' | 'rowId'>> & {
|
|
5
|
+
onJsonViewClick?: () => void;
|
|
6
|
+
tableMode?: TableMode;
|
|
7
|
+
};
|
|
8
|
+
declare function ActionsColumn({ flag, flagTooltip, flagsCount, row, showJsonViewer, isTextShown, showIdButton, rowId, onJsonViewClick, tableMode, ...props }: ActionsColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const _default: React.MemoExoticComponent<typeof ActionsColumn>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
import { memo } from 'react';
|
|
14
|
+
import { motion } from 'framer-motion';
|
|
15
|
+
import { useTranslation } from 'react-i18next';
|
|
16
|
+
import Tooltip from '../../../Tooltip';
|
|
17
|
+
import { TableCell } from '../../../TableCells';
|
|
18
|
+
import StyledBadge, { BadgeVariants } from '../../../CountBadge';
|
|
19
|
+
import { jsonBlackIcon } from '../../../../constants/index.js';
|
|
20
|
+
import { colorToVariant, flags } from './constant';
|
|
21
|
+
import { ActionCellContainer, ActionIcon } from './style';
|
|
22
|
+
import { IDButton } from '../IDButton';
|
|
23
|
+
import { BadgeWrapper, IdButtonContainer, TextLabel, TransparentButton } from '../style';
|
|
24
|
+
import SheetViewIDButton from '../SheetViewIDButton/SheetViewIDButton';
|
|
25
|
+
function ActionsColumn(_a) {
|
|
26
|
+
var _b, _c;
|
|
27
|
+
var { flag, flagTooltip, flagsCount, row, showJsonViewer = true, isTextShown, showIdButton = true, rowId, onJsonViewClick, tableMode } = _a, props = __rest(_a, ["flag", "flagTooltip", "flagsCount", "row", "showJsonViewer", "isTextShown", "showIdButton", "rowId", "onJsonViewClick", "tableMode"]);
|
|
28
|
+
const { t } = useTranslation();
|
|
29
|
+
return (_jsx(TableCell, Object.assign({}, props, { sx: {
|
|
30
|
+
overflow: 'visible',
|
|
31
|
+
} }, { children: _jsxs(ActionCellContainer, Object.assign({ "data-testid": "ActionsColumn_ActionCellContainer", tableMode: tableMode }, { children: [flag && (_jsx(_Fragment, { children: isTextShown ? (_jsx(Tooltip, Object.assign({ title: flagTooltip }, { children: _jsx(TextLabel, Object.assign({ "data-testid": "ActionsColumn_FlagLabel", sx: {
|
|
32
|
+
textAlign: 'left',
|
|
33
|
+
justifyContent: 'flex-start',
|
|
34
|
+
} }, { children: flagTooltip })) }))) : (_jsx(Tooltip, Object.assign({ title: flagTooltip }, { children: _jsxs(BadgeWrapper, Object.assign({ "data-testid": "ActionsColumn_FlagBadge", sx: {
|
|
35
|
+
paddingInline: '12px',
|
|
36
|
+
width: 'auto',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
position: 'relative',
|
|
39
|
+
zIndex: 21,
|
|
40
|
+
gap: '0px',
|
|
41
|
+
}, whileHover: ['animate', 'fadeIn'], variants: {
|
|
42
|
+
animate: {
|
|
43
|
+
gap: '4px',
|
|
44
|
+
},
|
|
45
|
+
} }, { children: [_jsx(ActionIcon, { "data-testid": "ActionsColumn_FlagIcon", sx: {
|
|
46
|
+
width: '12px',
|
|
47
|
+
height: '11px',
|
|
48
|
+
}, src: (_b = flags[flag]) === null || _b === void 0 ? void 0 : _b.icon, alt: "flag-icon" }), (flagsCount !== null && flagsCount !== void 0 ? flagsCount : 0) > 1 && (_jsx(motion.div, Object.assign({ "data-testid": "ActionsColumn_StyledBadge_Container", style: {
|
|
49
|
+
alignItems: 'center',
|
|
50
|
+
justifyContent: 'center',
|
|
51
|
+
gap: '4px',
|
|
52
|
+
display: 'flex',
|
|
53
|
+
zIndex: 10,
|
|
54
|
+
}, initial: { width: 0, opacity: 0 }, transition: {
|
|
55
|
+
animate: {
|
|
56
|
+
duration: 0.5,
|
|
57
|
+
},
|
|
58
|
+
fadeIn: {
|
|
59
|
+
duration: 0.2,
|
|
60
|
+
},
|
|
61
|
+
}, variants: {
|
|
62
|
+
animate: {
|
|
63
|
+
width: 'auto',
|
|
64
|
+
},
|
|
65
|
+
fadeIn: {
|
|
66
|
+
transition: {
|
|
67
|
+
delay: 0.5,
|
|
68
|
+
},
|
|
69
|
+
opacity: 1,
|
|
70
|
+
},
|
|
71
|
+
} }, { children: _jsxs(StyledBadge, Object.assign({ compact: true, variant: colorToVariant[(_c = flags[flag]) === null || _c === void 0 ? void 0 : _c.color] || BadgeVariants.ORANGE, "data-testid": "ActionsColumn_StyledBadge" }, { children: [flagsCount, "x"] })) })))] })) }))) })), showIdButton ? (tableMode === 'sheet' ? (_jsx(SheetViewIDButton, { rowId: rowId || row.id })) : (_jsx(IDButton, { rowId: rowId || row.id }))) : null, _jsx("div", Object.assign({ "data-testid": "ActionsColumn_IconsContainer", style: {
|
|
72
|
+
display: 'flex',
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
justifyContent: 'center',
|
|
75
|
+
gap: '5px',
|
|
76
|
+
} }, { children: showJsonViewer && (_jsx(TransparentButton, Object.assign({ onClick: onJsonViewClick, type: "button", "data-testid": "ActionsColumn_TransparentButton" }, { children: _jsx(Tooltip, Object.assign({ title: t('jsonViewer') }, { children: _jsx(IdButtonContainer, Object.assign({ tableMode: tableMode, "data-testid": "ActionsColumn_IdButtonContainer" }, { children: tableMode === 'sheet' ? (_jsx("span", Object.assign({ style: { fontSize: '11px', fontWeight: 400 } }, { children: "View API" }))) : (_jsx(motion.img, { src: jsonBlackIcon, alt: "icon" }, "id-icon")) })) })) }))) }))] })) })));
|
|
77
|
+
}
|
|
78
|
+
export default memo(ActionsColumn);
|
|
@@ -52,12 +52,18 @@ function SheetViewVirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, sho
|
|
|
52
52
|
const [selectedColumn, setSelectedColumn] = useState(null);
|
|
53
53
|
const handleCellClick = useCallback((rowIndex, columnId, event) => {
|
|
54
54
|
event.stopPropagation();
|
|
55
|
+
if (event.target !== event.currentTarget) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
55
58
|
const cellKey = `${rowIndex}-${columnId}`;
|
|
56
59
|
setSelectedCell((prev) => (prev === cellKey ? null : cellKey));
|
|
57
60
|
setSelectedColumn(null);
|
|
58
61
|
}, []);
|
|
59
62
|
const handleColumnClick = useCallback((columnId, event) => {
|
|
60
63
|
event.stopPropagation();
|
|
64
|
+
if (event.target !== event.currentTarget) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
61
67
|
setSelectedColumn((prev) => (prev === columnId ? null : columnId));
|
|
62
68
|
setSelectedCell(null);
|
|
63
69
|
}, []);
|
|
@@ -6,7 +6,15 @@ export const usePinnedColumns = (columns, isPinnable, onColumnPin) => {
|
|
|
6
6
|
return Array.from(new Set([...defaultPinned, ...userPinned]));
|
|
7
7
|
});
|
|
8
8
|
const [pinnedEndColumns, setPinnedEndColumns] = useState(() => {
|
|
9
|
-
|
|
9
|
+
if (!isPinnable)
|
|
10
|
+
return [];
|
|
11
|
+
const userPinned = columns.filter((c) => c.pinned === 'end').map((c) => c.id);
|
|
12
|
+
const visibleColumns = columns.filter((column) => !column.hidden);
|
|
13
|
+
const lastColumn = visibleColumns[visibleColumns.length - 1];
|
|
14
|
+
if (userPinned.length === 0 && lastColumn && !lastColumn.pinned && !lastColumn.isDefaultPinned) {
|
|
15
|
+
return [lastColumn.id];
|
|
16
|
+
}
|
|
17
|
+
return userPinned;
|
|
10
18
|
});
|
|
11
19
|
const handleColumnPin = useCallback((columnId, position = 'start') => {
|
|
12
20
|
if (!isPinnable)
|
package/build/utils/columns.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { IColumnProps, ColumnViewProps, ColumnsView } from '../types/index.js';
|
|
2
2
|
export declare function filterShownColumns<T>(columns: Array<IColumnProps<T & {
|
|
3
3
|
actions: string;
|
|
4
|
+
action_icon: string;
|
|
4
5
|
}>>, tableViews: ColumnViewProps[]): IColumnProps<T & {
|
|
5
6
|
actions: string;
|
|
7
|
+
action_icon: string;
|
|
6
8
|
}>[];
|
|
7
9
|
export declare function isParameterSelected(columns: ColumnViewProps[], columnId: string, parameter: string): boolean;
|
|
8
10
|
export declare function mapDataToViews(columnData?: ColumnsView[], language?: string): ColumnViewProps[];
|
package/build/utils/columns.js
CHANGED
|
@@ -7,7 +7,7 @@ export function filterShownColumns(columns, tableViews) {
|
|
|
7
7
|
const isColumnWithMenuItems = !!column.tableViewId && (((_a = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.menuItems) === null || _a === void 0 ? void 0 : _a.length) || 0) > 1;
|
|
8
8
|
const isMenuItemSelected = (_c = (_b = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.menuItems) === null || _b === void 0 ? void 0 : _b.find((item) => item.name === column.tableViewId)) === null || _c === void 0 ? void 0 : _c.selected;
|
|
9
9
|
const isColumnSelected = !!selectedColumn && (isMenuItemSelected || !isColumnWithMenuItems);
|
|
10
|
-
const isBasicColumn = ['actions'].includes((_e = (_d = column.id) === null || _d === void 0 ? void 0 : _d.toString()) === null || _e === void 0 ? void 0 : _e.toLowerCase());
|
|
10
|
+
const isBasicColumn = ['actions', 'action_icon'].includes((_e = (_d = column.id) === null || _d === void 0 ? void 0 : _d.toString()) === null || _e === void 0 ? void 0 : _e.toLowerCase());
|
|
11
11
|
if (isColumnSelected || isBasicColumn) {
|
|
12
12
|
return true;
|
|
13
13
|
}
|
package/package.json
CHANGED
|
@@ -1,132 +1,134 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
|
-
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"@
|
|
76
|
-
"@
|
|
77
|
-
"@
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"react
|
|
87
|
-
"react-
|
|
88
|
-
"react-
|
|
89
|
-
"react-
|
|
90
|
-
"react-
|
|
91
|
-
"react-
|
|
92
|
-
"react-
|
|
93
|
-
"react-
|
|
94
|
-
"react-
|
|
95
|
-
"react-
|
|
96
|
-
"react-
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"@
|
|
104
|
-
"@
|
|
105
|
-
"@types/
|
|
106
|
-
"@types/react
|
|
107
|
-
"@types/react-
|
|
108
|
-
"@types/react-
|
|
109
|
-
"@
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"eslint
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
|
+
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
+
"version": "0.0.218",
|
|
5
|
+
"testVersion": 7,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "build/index.js",
|
|
8
|
+
"module": "build/index.js",
|
|
9
|
+
"types": "build/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./build/index.d.ts",
|
|
13
|
+
"import": "./build/index.js",
|
|
14
|
+
"require": "./build/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./constants": {
|
|
17
|
+
"types": "./build/constants/index.d.ts",
|
|
18
|
+
"import": "./build/constants/index.js",
|
|
19
|
+
"require": "./build/constants/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./components": {
|
|
22
|
+
"types": "./build/components/index.d.ts",
|
|
23
|
+
"import": "./build/components/index.js",
|
|
24
|
+
"require": "./build/components/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./components/*": {
|
|
27
|
+
"types": "./build/components/*/index.d.ts",
|
|
28
|
+
"import": "./build/components/*/index.js",
|
|
29
|
+
"require": "./build/components/*/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./hooks": {
|
|
32
|
+
"types": "./build/hooks/index.d.ts",
|
|
33
|
+
"import": "./build/hooks/index.js",
|
|
34
|
+
"require": "./build/hooks/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./utils": {
|
|
37
|
+
"types": "./build/utils/index.d.ts",
|
|
38
|
+
"import": "./build/utils/index.js",
|
|
39
|
+
"require": "./build/utils/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./theme": {
|
|
42
|
+
"types": "./build/theme/index.d.ts",
|
|
43
|
+
"import": "./build/theme/index.js",
|
|
44
|
+
"require": "./build/theme/index.js"
|
|
45
|
+
},
|
|
46
|
+
"./types": {
|
|
47
|
+
"types": "./build/types/index.d.ts",
|
|
48
|
+
"import": "./build/types/index.js",
|
|
49
|
+
"require": "./build/types/index.js"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"author": {
|
|
54
|
+
"name": "Ahmed Sharkawy",
|
|
55
|
+
"email": "a.elsharkawy@tap.company"
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"build",
|
|
59
|
+
"readme.md"
|
|
60
|
+
],
|
|
61
|
+
"scripts": {
|
|
62
|
+
"ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
|
|
63
|
+
"push": "npm version patch --no-git-tag-version && npm run ts:build && npm publish --access public",
|
|
64
|
+
"push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
|
|
65
|
+
"dev": "vite",
|
|
66
|
+
"build": "tsc -b && vite build ",
|
|
67
|
+
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
|
|
68
|
+
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
|
|
69
|
+
"lint": "eslint . --color",
|
|
70
|
+
"lint:fix": "eslint src --fix --color",
|
|
71
|
+
"preview": "vite preview",
|
|
72
|
+
"prepare": "husky"
|
|
73
|
+
},
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"@emotion/react": "^11.11.0",
|
|
76
|
+
"@emotion/styled": "^11.11.0",
|
|
77
|
+
"@hookform/resolvers": "^3.3.1",
|
|
78
|
+
"@mui/material": "^5.12.3",
|
|
79
|
+
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
80
|
+
"axios": "^1.4.0",
|
|
81
|
+
"dayjs": "^1.11.8",
|
|
82
|
+
"framer-motion": "10.11.0",
|
|
83
|
+
"i18next": "^22.4.15",
|
|
84
|
+
"memoize-one": "^6.0.0",
|
|
85
|
+
"re-resizable": "^6.9.9",
|
|
86
|
+
"react": "^18.2.0",
|
|
87
|
+
"react-currency-input-field": "^3.6.11",
|
|
88
|
+
"react-dom": "^18.2.0",
|
|
89
|
+
"react-draggable": "^4.4.6",
|
|
90
|
+
"react-dropzone": "^14.2.3",
|
|
91
|
+
"react-hook-form": "^7.45.4",
|
|
92
|
+
"react-hot-toast": "^2.4.1",
|
|
93
|
+
"react-i18next": "^12.2.2",
|
|
94
|
+
"react-multi-date-picker": "^4.1.2",
|
|
95
|
+
"react-router-dom": "^7.7.0",
|
|
96
|
+
"react-virtualized-auto-sizer": "^1.0.20",
|
|
97
|
+
"react-window": "^1.8.9",
|
|
98
|
+
"react-window-infinite-loader": "^1.0.9",
|
|
99
|
+
"react18-input-otp": "^1.1.4",
|
|
100
|
+
"recharts": "^2.15.1"
|
|
101
|
+
},
|
|
102
|
+
"devDependencies": {
|
|
103
|
+
"@eslint/js": "^9.17.0",
|
|
104
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
105
|
+
"@types/lodash": "^4.17.15",
|
|
106
|
+
"@types/react": "^18.2.6",
|
|
107
|
+
"@types/react-dom": "^18.3.5",
|
|
108
|
+
"@types/react-virtualized-auto-sizer": "^1.0.8",
|
|
109
|
+
"@types/react-window": "^1.8.5",
|
|
110
|
+
"@types/react-window-infinite-loader": "^1.0.6",
|
|
111
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
112
|
+
"eslint": "^9.17.0",
|
|
113
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
114
|
+
"eslint-plugin-react-refresh": "^0.4.16",
|
|
115
|
+
"globals": "^15.14.0",
|
|
116
|
+
"husky": "^8.0.3",
|
|
117
|
+
"lint-staged": "^13.2.2",
|
|
118
|
+
"prettier": "^2.8.8",
|
|
119
|
+
"tsc-alias": "^1.8.16",
|
|
120
|
+
"typescript": "5.0.2",
|
|
121
|
+
"typescript-eslint": "^8.18.2",
|
|
122
|
+
"vite": "6.0.5",
|
|
123
|
+
"vite-tsconfig-paths": "^4.2.0"
|
|
124
|
+
},
|
|
125
|
+
"lint-staged": {
|
|
126
|
+
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
127
|
+
"yarn run prettier:fix",
|
|
128
|
+
"yarn run lint"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"publishConfig": {
|
|
132
|
+
"registry": "https://registry.npmjs.org/"
|
|
133
|
+
}
|
|
134
|
+
}
|