@codezee/sixtify-brahma 0.2.67 → 0.2.69
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/package.json +1 -1
- package/packages/shared-components/dist/AgGrid/AgGrid.js +1 -1
- package/packages/shared-components/dist/CellSelectionTable/CellSelectionTable.d.ts +9 -3
- package/packages/shared-components/dist/CellSelectionTable/CellSelectionTable.d.ts.map +1 -1
- package/packages/shared-components/dist/CellSelectionTable/CellSelectionTable.js +32 -6
- package/packages/shared-components/dist/CellSelectionTable/SubComponents/EmployeeCell.d.ts +2 -1
- package/packages/shared-components/dist/CellSelectionTable/SubComponents/EmployeeCell.d.ts.map +1 -1
- package/packages/shared-components/dist/CellSelectionTable/SubComponents/EmployeeCell.js +4 -1
- package/packages/shared-components/dist/CellSelectionTable/hook/useStickyColumns.d.ts +12 -0
- package/packages/shared-components/dist/CellSelectionTable/hook/useStickyColumns.d.ts.map +1 -0
- package/packages/shared-components/dist/CellSelectionTable/hook/useStickyColumns.js +37 -0
- package/packages/shared-components/dist/CellSelectionTable/utils/helper.d.ts +2 -0
- package/packages/shared-components/dist/CellSelectionTable/utils/helper.d.ts.map +1 -1
- package/packages/shared-components/dist/CellSelectionTable/utils/helper.js +18 -0
- package/packages/shared-components/dist/CellSelectionTable/utils/index.d.ts +1 -0
- package/packages/shared-components/dist/CellSelectionTable/utils/index.d.ts.map +1 -1
- package/packages/shared-components/dist/CellSelectionTable/utils/index.js +1 -0
- package/packages/shared-components/dist/CellSelectionTable/utils/types.d.ts +9 -0
- package/packages/shared-components/dist/CellSelectionTable/utils/types.d.ts.map +1 -1
- package/packages/shared-components/dist/Drawer/CloseDrawer/CloseDrawerMenuItemList.d.ts.map +1 -1
- package/packages/shared-components/dist/Drawer/CloseDrawer/CloseDrawerMenuItemList.js +3 -0
- package/packages/shared-components/dist/Svgs/Drawer/MasterIcon.d.ts +3 -0
- package/packages/shared-components/dist/Svgs/Drawer/MasterIcon.d.ts.map +1 -0
- package/packages/shared-components/dist/Svgs/Drawer/MasterIcon.js +6 -0
- package/packages/shared-components/dist/Svgs/Drawer/index.d.ts +2 -1
- package/packages/shared-components/dist/Svgs/Drawer/index.d.ts.map +1 -1
- package/packages/shared-components/dist/Svgs/Drawer/index.js +2 -1
package/package.json
CHANGED
|
@@ -34,6 +34,6 @@ exports.AgGrid = (0, react_1.forwardRef)((props, ref) => {
|
|
|
34
34
|
backgroundColor: color.butterflyBlue[700],
|
|
35
35
|
}, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", children: "No result found" }) }));
|
|
36
36
|
}
|
|
37
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "ag-theme-quartz ", style: { width: "100%", height, position: "relative" }, children: [(0, jsx_runtime_1.jsx)(ag_grid_react_1.AgGridReact, { ref: ref, cacheBlockSize: cacheBlockSize, defaultColDef: defaultColDef, rowHeight: rowHeight, rowModelType: rowModelType, rowBuffer: rowBuffer, infiniteInitialRowCount: infiniteInitialRowCount, overlayNoRowsTemplate: overlayNoRowsTemplate, pagination: pagination, ...(pagination ? { paginationPageSize: exports.defaultPageSize } : {}), paginationPageSizeSelector: pagination ? exports.pageSizeOptions : false, ...rest }), !!props.selectedItems && ((0, jsx_runtime_1.jsx)(material_1.Box, { position: "absolute", bottom: "15px", children: (0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { paddingLeft: "20px" }, children: (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "body2", children: ["Selected Rows ", props.selectedItems] }) }) }))] }));
|
|
37
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "ag-theme-quartz ", style: { width: "100%", height, position: "relative" }, children: [(0, jsx_runtime_1.jsx)(ag_grid_react_1.AgGridReact, { ref: ref, cacheBlockSize: cacheBlockSize, defaultColDef: defaultColDef, rowHeight: rowHeight, rowModelType: rowModelType, rowBuffer: rowBuffer, infiniteInitialRowCount: infiniteInitialRowCount, overlayNoRowsTemplate: overlayNoRowsTemplate, pagination: pagination, ...(pagination ? { paginationPageSize: exports.defaultPageSize } : {}), paginationPageSizeSelector: pagination ? exports.pageSizeOptions : false, ...rest }), !!props.selectedItems && pagination && ((0, jsx_runtime_1.jsx)(material_1.Box, { position: "absolute", bottom: "15px", children: (0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { paddingLeft: "20px" }, children: (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "body2", children: ["Selected Rows ", props.selectedItems] }) }) }))] }));
|
|
38
38
|
});
|
|
39
39
|
exports.AgGrid.displayName = "AgGrid";
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import type { Dictionary } from "lodash";
|
|
2
|
-
import { type MouseEvent } from "react";
|
|
2
|
+
import { type MouseEvent, type ReactNode } from "react";
|
|
3
3
|
import type { CellCoord, Column } from "./utils/types";
|
|
4
|
+
export type Cell = {
|
|
5
|
+
cellLabel: string;
|
|
6
|
+
[key: string]: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export type TableDataRow = Record<string, string | Cell>;
|
|
4
9
|
export type CellSelectionTableProps = {
|
|
5
10
|
columns: Column[];
|
|
6
|
-
data:
|
|
11
|
+
data: TableDataRow[];
|
|
7
12
|
onCellSelection: (selectedCells: Dictionary<CellCoord[]>, e: MouseEvent) => void;
|
|
8
13
|
cellColors?: (status: string) => string;
|
|
9
14
|
height?: string | number;
|
|
10
15
|
loading?: boolean;
|
|
16
|
+
getCellTextColor?: (status: string) => string;
|
|
11
17
|
};
|
|
12
|
-
export declare const CellSelectionTable: ({ columns, data, onCellSelection, cellColors, height, loading, }: Readonly<CellSelectionTableProps>) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const CellSelectionTable: ({ columns, data, onCellSelection, cellColors, height, loading, getCellTextColor, }: Readonly<CellSelectionTableProps>) => import("react/jsx-runtime").JSX.Element;
|
|
13
19
|
//# sourceMappingURL=CellSelectionTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CellSelectionTable.d.ts","sourceRoot":"","sources":["../../src/CellSelectionTable/CellSelectionTable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CellSelectionTable.d.ts","sourceRoot":"","sources":["../../src/CellSelectionTable/CellSelectionTable.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGzC,OAAO,EACL,KAAK,UAAU,EACf,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAWf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAoB,MAAM,eAAe,CAAC;AAEzE,MAAM,MAAM,IAAI,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;AAEzD,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,eAAe,EAAE,CACf,aAAa,EAAE,UAAU,CAAC,SAAS,EAAE,CAAC,EACtC,CAAC,EAAE,UAAU,KACV,IAAI,CAAC;IACV,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/C,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,oFAQhC,QAAQ,CAAC,uBAAuB,CAAC,4CAwRnC,CAAC"}
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.CellSelectionTable = void 0;
|
|
8
8
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
9
|
const material_1 = require("@mui/material");
|
|
10
|
+
const useStickyColumns_1 = require("./hook/useStickyColumns");
|
|
10
11
|
const groupBy_1 = __importDefault(require("lodash/groupBy"));
|
|
11
12
|
const uniqBy_1 = __importDefault(require("lodash/uniqBy"));
|
|
12
13
|
const react_1 = require("react");
|
|
@@ -14,13 +15,14 @@ const Tooltip_1 = require("../Tooltip");
|
|
|
14
15
|
const EmployeeCell_1 = require("./SubComponents/EmployeeCell");
|
|
15
16
|
const TableBodyLoader_1 = require("./SubComponents/TableBodyLoader");
|
|
16
17
|
const helper_1 = require("./utils/helper");
|
|
17
|
-
const CellSelectionTable = ({ columns, data, onCellSelection, cellColors, height, loading = false, }) => {
|
|
18
|
+
const CellSelectionTable = ({ columns, data, onCellSelection, cellColors, height, loading = false, getCellTextColor = () => "", }) => {
|
|
18
19
|
const theme = (0, material_1.useTheme)();
|
|
19
20
|
const { slate, iron, butterflyBlue } = theme.palette.app.color;
|
|
20
21
|
const selectingRef = (0, react_1.useRef)(false);
|
|
21
22
|
const anchorRef = (0, react_1.useRef)(null);
|
|
22
23
|
const hoveringRef = (0, react_1.useRef)(null);
|
|
23
24
|
const [selectedRanges, setSelectedRanges] = (0, react_1.useState)([]);
|
|
25
|
+
const { stickyMap } = (0, useStickyColumns_1.useStickyColumns)(columns);
|
|
24
26
|
const selectedSet = (0, react_1.useMemo)(() => {
|
|
25
27
|
const set = new Set();
|
|
26
28
|
selectedRanges.flat().forEach((cell) => {
|
|
@@ -95,18 +97,42 @@ const CellSelectionTable = ({ columns, data, onCellSelection, cellColors, height
|
|
|
95
97
|
padding: "5px",
|
|
96
98
|
height: "50px",
|
|
97
99
|
},
|
|
98
|
-
}, children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: (0, jsx_runtime_1.jsx)(material_1.TableRow, { children: columns.map(({ key, label, minWidth = "auto", align = "left" }) => ((0, jsx_runtime_1.jsx)(material_1.TableCell, { align: align, sx: {
|
|
100
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: (0, jsx_runtime_1.jsx)(material_1.TableRow, { children: columns.map(({ key, label, minWidth = "auto", lockPinned = false, align = "left", }, ci) => ((0, jsx_runtime_1.jsx)(material_1.TableCell, { align: align, sx: {
|
|
101
|
+
...(lockPinned && {
|
|
102
|
+
top: 0,
|
|
103
|
+
left: stickyMap.has(ci) ? stickyMap.get(ci) : 0,
|
|
104
|
+
zIndex: 10,
|
|
105
|
+
position: "sticky",
|
|
106
|
+
}),
|
|
99
107
|
backgroundColor: slate[700],
|
|
100
108
|
minWidth,
|
|
101
109
|
padding: "5px 10px",
|
|
102
|
-
}, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "subtitle2", children: label }) }, key))) }) }), loading ? ((0, jsx_runtime_1.jsx)(TableBodyLoader_1.TableBodyLoader, { columns: columns, rowCount: 25 })) : ((0, jsx_runtime_1.jsx)(material_1.TableBody, { children: memoizedData.map((row, ri) => ((0, jsx_runtime_1.jsx)(material_1.TableRow, { sx: { backgroundColor: iron[600] }, children: columns.map(({ key, maxWidth = "auto", minWidth = "auto", isEmployee, align = "center", }, ci) => {
|
|
110
|
+
}, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "subtitle2", children: label }) }, key))) }) }), loading ? ((0, jsx_runtime_1.jsx)(TableBodyLoader_1.TableBodyLoader, { columns: columns, rowCount: 25 })) : ((0, jsx_runtime_1.jsx)(material_1.TableBody, { children: memoizedData.map((row, ri) => ((0, jsx_runtime_1.jsx)(material_1.TableRow, { sx: { backgroundColor: iron[600] }, children: columns.map(({ key, maxWidth = "auto", minWidth = "auto", isEmployee, align = "center", lockPinned = false, }, ci) => {
|
|
111
|
+
const cell = row[key];
|
|
112
|
+
const getRowTitle = (0, helper_1.getCellValue)(cell, "cellLabel");
|
|
113
|
+
const tooltip = typeof cell !== "string" &&
|
|
114
|
+
typeof cell?.["cellTooltip"] === "object"
|
|
115
|
+
? cell["cellTooltip"]
|
|
116
|
+
: (0, helper_1.getCellValue)(cell, "cellTooltip");
|
|
117
|
+
const getColor = (0, helper_1.getCellValue)(cell, "cellBackgroundConditionKey");
|
|
118
|
+
const cellActive = (0, helper_1.getCellValue)(cell, "cellActive");
|
|
119
|
+
const isSticky = stickyMap.has(ci);
|
|
120
|
+
const left = isSticky ? stickyMap.get(ci) : 0;
|
|
103
121
|
return ((0, jsx_runtime_1.jsx)(material_1.TableCell, { align: align, sx: {
|
|
122
|
+
...(lockPinned && {
|
|
123
|
+
top: 0,
|
|
124
|
+
left,
|
|
125
|
+
zIndex: 5,
|
|
126
|
+
position: "sticky",
|
|
127
|
+
}),
|
|
104
128
|
userSelect: "none",
|
|
105
129
|
overflow: "hidden",
|
|
106
130
|
bgcolor: (0, material_1.lighten)(getCellColor({
|
|
107
|
-
cellKey:
|
|
131
|
+
cellKey: getColor,
|
|
108
132
|
isSelected: isSelectedCell(ri, ci),
|
|
109
133
|
}), 0.8),
|
|
134
|
+
...(cellActive &&
|
|
135
|
+
ci > 0 && { color: getCellTextColor(cellActive) }),
|
|
110
136
|
padding: "5px 10px",
|
|
111
137
|
cursor: "pointer",
|
|
112
138
|
maxWidth,
|
|
@@ -119,7 +145,7 @@ const CellSelectionTable = ({ columns, data, onCellSelection, cellColors, height
|
|
|
119
145
|
? handleCellMouseUp
|
|
120
146
|
: undefined, onContextMenu: !columns[ci]?.disableSelection
|
|
121
147
|
? handleContextMenuCallback(ri, ci)
|
|
122
|
-
: undefined, children: (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { toolTipLabel:
|
|
123
|
-
}) }, row.id))) }))] }) }));
|
|
148
|
+
: undefined, children: (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { toolTipLabel: tooltip, children: isEmployee ? ((0, jsx_runtime_1.jsx)(EmployeeCell_1.EmployeeCell, { row: row })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", children: getRowTitle })) }) }, key));
|
|
149
|
+
}) }, typeof row.id === "string" ? row.id : ""))) }))] }) }));
|
|
124
150
|
};
|
|
125
151
|
exports.CellSelectionTable = CellSelectionTable;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { ModifyCellObj } from "../utils";
|
|
1
2
|
type EmployeeCellProps = {
|
|
2
|
-
row: Record<string, string>;
|
|
3
|
+
row: Record<string, string | ModifyCellObj | undefined>;
|
|
3
4
|
};
|
|
4
5
|
export declare const EmployeeCell: ({ row }: EmployeeCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export {};
|
package/packages/shared-components/dist/CellSelectionTable/SubComponents/EmployeeCell.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmployeeCell.d.ts","sourceRoot":"","sources":["../../../src/CellSelectionTable/SubComponents/EmployeeCell.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EmployeeCell.d.ts","sourceRoot":"","sources":["../../../src/CellSelectionTable/SubComponents/EmployeeCell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,KAAK,iBAAiB,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC,CAAC;CACzD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,SAAS,iBAAiB,4CAiBtD,CAAC"}
|
|
@@ -3,8 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EmployeeCell = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
|
+
const helper_1 = require("../utils/helper");
|
|
6
7
|
const EmployeeCell = ({ row }) => {
|
|
7
|
-
const
|
|
8
|
+
const avatar = (0, helper_1.getCellValue)(row.avatar, "avatar");
|
|
9
|
+
const name = (0, helper_1.getCellValue)(row.name, "name");
|
|
10
|
+
const employee_code = (0, helper_1.getCellValue)(row.employee_code, "employee_code");
|
|
8
11
|
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", gap: "10px", children: [(0, jsx_runtime_1.jsx)(material_1.Avatar, { src: avatar, alt: name, sx: { width: 40, height: 40 } }), (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: name }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", children: employee_code })] })] }));
|
|
9
12
|
};
|
|
10
13
|
exports.EmployeeCell = EmployeeCell;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Column } from "../utils";
|
|
2
|
+
type ParsedColumn = Column & {
|
|
3
|
+
idx: number;
|
|
4
|
+
parsedMinWidth: number;
|
|
5
|
+
};
|
|
6
|
+
type UseStickyColumnsResult = {
|
|
7
|
+
parsedColumns: ParsedColumn[];
|
|
8
|
+
stickyMap: Map<number, number>;
|
|
9
|
+
};
|
|
10
|
+
export declare const useStickyColumns: (columns: Column[]) => UseStickyColumnsResult;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=useStickyColumns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStickyColumns.d.ts","sourceRoot":"","sources":["../../../src/CellSelectionTable/hook/useStickyColumns.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,KAAK,YAAY,GAAG,MAAM,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC,CAAC;AAYF,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,EAAE,KAAG,sBA4BpD,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useStickyColumns = void 0;
|
|
7
|
+
const isNaN_1 = __importDefault(require("lodash/isNaN"));
|
|
8
|
+
const isNumber_1 = __importDefault(require("lodash/isNumber"));
|
|
9
|
+
const parseInt_1 = __importDefault(require("lodash/parseInt"));
|
|
10
|
+
const react_1 = require("react");
|
|
11
|
+
const parseMinWidth = (minWidth) => {
|
|
12
|
+
if ((0, isNumber_1.default)(minWidth)) {
|
|
13
|
+
return minWidth;
|
|
14
|
+
}
|
|
15
|
+
const parsed = (0, parseInt_1.default)((minWidth ?? "36").replace("px", ""));
|
|
16
|
+
return (0, isNaN_1.default)(parsed) ? 36 : parsed;
|
|
17
|
+
};
|
|
18
|
+
const useStickyColumns = (columns) => {
|
|
19
|
+
return (0, react_1.useMemo)(() => {
|
|
20
|
+
const { parsedColumns, stickyMap } = columns.reduce((acc, col, idx) => {
|
|
21
|
+
const parsedMinWidth = parseMinWidth(col.minWidth);
|
|
22
|
+
const parsedCol = { ...col, idx, parsedMinWidth };
|
|
23
|
+
acc.parsedColumns.push(parsedCol);
|
|
24
|
+
if (col.lockPinned) {
|
|
25
|
+
acc.stickyMap.set(idx, acc.offset);
|
|
26
|
+
acc.offset += parsedMinWidth;
|
|
27
|
+
}
|
|
28
|
+
return acc;
|
|
29
|
+
}, {
|
|
30
|
+
parsedColumns: [],
|
|
31
|
+
stickyMap: new Map(),
|
|
32
|
+
offset: 0,
|
|
33
|
+
});
|
|
34
|
+
return { parsedColumns, stickyMap };
|
|
35
|
+
}, [columns]);
|
|
36
|
+
};
|
|
37
|
+
exports.useStickyColumns = useStickyColumns;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { HandleContextMenuArgs, HandleMouseDownArgs, HandleMouseEnterArgs, HandleMunseUpArgs } from "./types";
|
|
2
|
+
import type { Cell } from "../CellSelectionTable";
|
|
2
3
|
export declare function handleMouseEnter({ selectingRef, anchorRef, hoveringRef, ri, ci, setSelectedRanges, }: HandleMouseEnterArgs): void;
|
|
3
4
|
export declare function handleMouseDown({ e, ri, ci, selectingRef, anchorRef, setSelectedRanges, }: HandleMouseDownArgs): void;
|
|
4
5
|
export declare function handleMouseUp({ e, selectingRef, anchorRef, hoveringRef, setSelectedRanges, }: HandleMunseUpArgs): void;
|
|
5
6
|
export declare function handleContextMenu({ e, ri, ci, setSelectedRanges, onCellSelection, selectedRanges, }: HandleContextMenuArgs): void;
|
|
7
|
+
export declare const getCellValue: (cell: string | Cell | undefined, key: string) => string;
|
|
6
8
|
//# sourceMappingURL=helper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../src/CellSelectionTable/utils/helper.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../src/CellSelectionTable/utils/helper.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAgClD,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,EACZ,SAAS,EACT,WAAW,EACX,EAAE,EACF,EAAE,EACF,iBAAiB,GAClB,EAAE,oBAAoB,QAOtB;AAED,wBAAgB,eAAe,CAAC,EAC9B,CAAC,EACD,EAAE,EACF,EAAE,EACF,YAAY,EACZ,SAAS,EACT,iBAAiB,GAClB,EAAE,mBAAmB,QAkBrB;AAED,wBAAgB,aAAa,CAAC,EAC5B,CAAC,EACD,YAAY,EACZ,SAAS,EACT,WAAW,EACX,iBAAiB,GAClB,EAAE,iBAAiB,QAQnB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,CAAC,EACD,EAAE,EACF,EAAE,EACF,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,EAAE,qBAAqB,QAkCvB;AACD,eAAO,MAAM,YAAY,GACvB,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,KAAK,MAAM,KACV,MAoBF,CAAC"}
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getCellValue = void 0;
|
|
6
7
|
exports.handleMouseEnter = handleMouseEnter;
|
|
7
8
|
exports.handleMouseDown = handleMouseDown;
|
|
8
9
|
exports.handleMouseUp = handleMouseUp;
|
|
@@ -75,3 +76,20 @@ function handleContextMenu({ e, ri, ci, setSelectedRanges, onCellSelection, sele
|
|
|
75
76
|
setSelectedRanges(singleCell);
|
|
76
77
|
onCellSelection?.({ selectedCells: singleCell }, e);
|
|
77
78
|
}
|
|
79
|
+
const getCellValue = (cell, key) => {
|
|
80
|
+
if (typeof cell === "string") {
|
|
81
|
+
return cell;
|
|
82
|
+
}
|
|
83
|
+
const value = cell?.[key];
|
|
84
|
+
if (typeof value === "string") {
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
if (typeof value === "number") {
|
|
88
|
+
return value.toString();
|
|
89
|
+
}
|
|
90
|
+
if (value === true) {
|
|
91
|
+
return "active";
|
|
92
|
+
}
|
|
93
|
+
return "";
|
|
94
|
+
};
|
|
95
|
+
exports.getCellValue = getCellValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/CellSelectionTable/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/CellSelectionTable/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./helper"), exports);
|
|
17
18
|
__exportStar(require("./types"), exports);
|
|
@@ -9,6 +9,8 @@ export type Column = {
|
|
|
9
9
|
maxWidth?: string | number;
|
|
10
10
|
align?: TableCellProps["align"];
|
|
11
11
|
disableSelection?: boolean;
|
|
12
|
+
lockPinned?: boolean;
|
|
13
|
+
colorKey?: string;
|
|
12
14
|
};
|
|
13
15
|
export type OptionsType = {
|
|
14
16
|
value: string;
|
|
@@ -53,5 +55,12 @@ export type HandleContextMenuArgs = {
|
|
|
53
55
|
export type GetCellColorArgs = {
|
|
54
56
|
cellKey?: string;
|
|
55
57
|
isSelected: boolean;
|
|
58
|
+
colorKey?: string;
|
|
59
|
+
};
|
|
60
|
+
export type ModifyCellObj = {
|
|
61
|
+
cellActive?: boolean;
|
|
62
|
+
cellBackgroundConditionKey?: string;
|
|
63
|
+
cellLabel: string;
|
|
64
|
+
cellTooltip?: string;
|
|
56
65
|
};
|
|
57
66
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/CellSelectionTable/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACzC,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AAC;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,SAAS,EAAE,CAAC;IAC5B,iBAAiB,EAAE,QAAQ,CAAC,cAAc,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IACzD,eAAe,EAAE,CACf,MAAM,EAAE,UAAU,CAAC,SAAS,EAAE,CAAC,EAC/B,CAAC,EAAE,UAAU,CAAC,oBAAoB,CAAC,KAChC,IAAI,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloseDrawerMenuItemList.d.ts","sourceRoot":"","sources":["../../../src/Drawer/CloseDrawer/CloseDrawerMenuItemList.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAQ1C,KAAK,4BAA4B,GAAG;IAClC,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,iCAGrC,4BAA4B,
|
|
1
|
+
{"version":3,"file":"CloseDrawerMenuItemList.d.ts","sourceRoot":"","sources":["../../../src/Drawer/CloseDrawer/CloseDrawerMenuItemList.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAQ1C,KAAK,4BAA4B,GAAG;IAClC,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,iCAGrC,4BAA4B,4CAsF9B,CAAC"}
|
|
@@ -26,6 +26,9 @@ const CloseDrawerMenuItemList = ({ menuItems, currentPathname, }) => {
|
|
|
26
26
|
setAnchorEl(null);
|
|
27
27
|
};
|
|
28
28
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [menuItems.map((menuItem, i) => {
|
|
29
|
+
if (menuItem.isView === false) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
29
32
|
const { onClick, key: key1, icon, menuItems = [] } = menuItem;
|
|
30
33
|
const handleClick = (target) => {
|
|
31
34
|
if (onClick) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MasterIcon.d.ts","sourceRoot":"","sources":["../../../src/Svgs/Drawer/MasterIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAO,MAAM,UAAU,GAAI,OAAO,QAAQ,CAAC,aAAa,CAAC,4CAqBxD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MasterIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const MasterIcon = (props) => ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: 20, height: 20, fill: "none", ...props, style: { color: "inherit" }, children: [(0, jsx_runtime_1.jsx)("g", { clipPath: "url(#clip0_2088_3743)", children: (0, jsx_runtime_1.jsx)("path", { d: "M20 15.4167V17.0833C20 18.6917 18.6917 20 17.0833 20H2.91667C1.30833 20 0 18.6917 0 17.0833V15.4167C0 13.8083 1.30833 12.5 2.91667 12.5H4.58333C5.04417 12.5 5.41667 12.8725 5.41667 13.3333C5.41667 13.7942 5.04417 14.1667 4.58333 14.1667H2.91667C2.2275 14.1667 1.66667 14.7275 1.66667 15.4167V17.0833C1.66667 17.7725 2.2275 18.3333 2.91667 18.3333H17.0833C17.7725 18.3333 18.3333 17.7725 18.3333 17.0833V15.4167C18.3333 14.7275 17.7725 14.1667 17.0833 14.1667H15.4167C14.9558 14.1667 14.5833 13.7942 14.5833 13.3333C14.5833 12.8725 14.9558 12.5 15.4167 12.5H17.0833C18.6917 12.5 20 13.8083 20 15.4167ZM20 2.91667V3.75C20 5.35833 18.6917 6.66667 17.0833 6.66667H16.6667V7.5C16.6667 8.87833 15.545 10 14.1667 10H10.8333V12.8292L11.9125 11.7508C12.2383 11.425 12.765 11.425 13.0908 11.7508C13.4167 12.0767 13.4167 12.6033 13.0908 12.9292L11.0283 14.9925C10.4617 15.5583 9.54167 15.5592 8.975 14.9925L6.91167 12.9292C6.58583 12.6033 6.58583 12.0767 6.91167 11.7508C7.2375 11.425 7.76417 11.425 8.09 11.7508L9.16667 12.8275V9.99917H5.83333C4.455 9.99917 3.33333 8.8775 3.33333 7.49917V6.66583H2.91667C1.30833 6.66583 0 5.3575 0 3.74917V2.91583C0 1.30833 1.30833 0 2.91667 0H5.41667C7.025 0 8.33333 1.30833 8.33333 2.91667V3.75C8.33333 5.35833 7.025 6.66667 5.41667 6.66667H5V7.5C5 7.95917 5.37333 8.33333 5.83333 8.33333H14.1667C14.6267 8.33333 15 7.95917 15 7.5V6.66667H14.5833C12.975 6.66667 11.6667 5.35833 11.6667 3.75V2.91667C11.6667 1.30833 12.975 0 14.5833 0H17.0833C18.6917 0 20 1.30833 20 2.91667ZM5.41667 5C6.10583 5 6.66667 4.43917 6.66667 3.75V2.91667C6.66667 2.2275 6.10583 1.66667 5.41667 1.66667H2.91667C2.2275 1.66667 1.66667 2.2275 1.66667 2.91667V3.75C1.66667 4.43917 2.2275 5 2.91667 5H5.41667ZM18.3333 2.91667C18.3333 2.2275 17.7725 1.66667 17.0833 1.66667H14.5833C13.8942 1.66667 13.3333 2.2275 13.3333 2.91667V3.75C13.3333 4.43917 13.8942 5 14.5833 5H17.0833C17.7725 5 18.3333 4.43917 18.3333 3.75V2.91667Z", fill: props.fill ?? "currentColor" }) }), (0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", { id: "clip0_2088_3743", children: (0, jsx_runtime_1.jsx)("rect", { width: "20", height: "20", fill: props.fill ?? "currentColor" }) }) })] }));
|
|
6
|
+
exports.MasterIcon = MasterIcon;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
export * from "./MasterIcon";
|
|
1
2
|
export * from "./SettingIcon";
|
|
2
3
|
export * from "./SvgBankConfig";
|
|
3
4
|
export * from "./SvgConfiguration";
|
|
4
|
-
export * from "./SvgPayroll";
|
|
5
5
|
export * from "./SvgEmployees";
|
|
6
6
|
export * from "./SvgOrganization";
|
|
7
|
+
export * from "./SvgPayroll";
|
|
7
8
|
export * from "./SvgTransaction";
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Svgs/Drawer/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Svgs/Drawer/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC"}
|
|
@@ -14,10 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./MasterIcon"), exports);
|
|
17
18
|
__exportStar(require("./SettingIcon"), exports);
|
|
18
19
|
__exportStar(require("./SvgBankConfig"), exports);
|
|
19
20
|
__exportStar(require("./SvgConfiguration"), exports);
|
|
20
|
-
__exportStar(require("./SvgPayroll"), exports);
|
|
21
21
|
__exportStar(require("./SvgEmployees"), exports);
|
|
22
22
|
__exportStar(require("./SvgOrganization"), exports);
|
|
23
|
+
__exportStar(require("./SvgPayroll"), exports);
|
|
23
24
|
__exportStar(require("./SvgTransaction"), exports);
|