pixelize-design-library 2.1.64 → 2.1.65

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.
@@ -1,9 +1,11 @@
1
1
  import React from "react";
2
2
  import { Account, KanbanBoardProps } from "./KanbanBoardProps";
3
- declare const AccountCard: ({ account, index, onDelete, onOpen, }: {
3
+ declare const AccountCard: ({ account, index, onDelete, onOpen, isExpanded, onToggleExpand, }: {
4
4
  account: Account;
5
5
  index: number;
6
6
  onDelete: KanbanBoardProps['onDelete'];
7
7
  onOpen: KanbanBoardProps['onOpen'];
8
+ isExpanded?: boolean | undefined;
9
+ onToggleExpand?: (() => void) | undefined;
8
10
  }) => React.JSX.Element;
9
11
  export default AccountCard;
@@ -45,30 +45,35 @@ var useCustomTheme_1 = require("../../Theme/useCustomTheme");
45
45
  var AccountRow_1 = __importDefault(require("./AccountRow"));
46
46
  var excludeKeys = ["id", "details"];
47
47
  var AccountCard = function (_a) {
48
- var account = _a.account, index = _a.index, onDelete = _a.onDelete, onOpen = _a.onOpen;
48
+ var account = _a.account, index = _a.index, onDelete = _a.onDelete, onOpen = _a.onOpen, _b = _a.isExpanded, isExpanded = _b === void 0 ? false : _b, onToggleExpand = _a.onToggleExpand;
49
49
  var colors = (0, useCustomTheme_1.useCustomTheme)().colors;
50
- var _b = (0, react_1.useState)(false), showMore = _b[0], setShowMore = _b[1];
50
+ var _c = (0, react_1.useState)(false), showMore = _c[0], setShowMore = _c[1];
51
51
  var keys = Object.keys(account).filter(function (key) { return typeof account[key] === "string" && !excludeKeys.includes(key); });
52
- var visibleKeys = showMore ? keys : keys.slice(0, 4);
52
+ var visibleKeys = isExpanded ? keys : keys.slice(0, 4);
53
+ // Handle the show more/less toggle
54
+ var handleToggle = function () {
55
+ setShowMore(!showMore);
56
+ onToggleExpand === null || onToggleExpand === void 0 ? void 0 : onToggleExpand();
57
+ };
53
58
  return (react_1.default.createElement(dnd_1.Draggable, { draggableId: account.id.toString(), index: index }, function (provided) {
54
59
  var _a, _b, _c, _d, _e, _f;
55
- return (react_1.default.createElement(react_2.Box, __assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { width: "16.5rem", borderRadius: "0.25rem", borderWidth: "0.063rem", background: (_a = colors === null || colors === void 0 ? void 0 : colors.background) === null || _a === void 0 ? void 0 : _a[500], border: "0.1rem solid ".concat((_b = colors.gray) === null || _b === void 0 ? void 0 : _b[200]), p: 2, mt: 3 }),
60
+ return (react_1.default.createElement(react_2.Box, __assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { width: "16.5rem", borderRadius: "0.25rem", borderWidth: "0.063rem", background: (_a = colors === null || colors === void 0 ? void 0 : colors.background) === null || _a === void 0 ? void 0 : _a[500], border: "0.1rem solid ".concat((_b = colors.gray) === null || _b === void 0 ? void 0 : _b[200]), p: 2, mt: 3, minHeight: isExpanded ? "180px" : "100px" }),
56
61
  react_1.default.createElement(react_2.VStack, { align: "start", spacing: 2, fontSize: "0.875rem", color: (_c = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _c === void 0 ? void 0 : _c[700], overflow: "none" },
57
62
  visibleKeys.map(function (key) { return (react_1.default.createElement(AccountRow_1.default, { key: key, label: key.replace(/\b\w/g, function (c) { return c.toUpperCase(); }), value: account[key] })); }),
58
- react_1.default.createElement(react_2.Collapse, { in: showMore && account.details !== undefined, animateOpacity: true },
63
+ react_1.default.createElement(react_2.Collapse, { in: isExpanded && account.details !== undefined, animateOpacity: true },
59
64
  react_1.default.createElement(react_2.Text, { pt: 2 }, account.details)),
60
65
  keys.length > 4 && (react_1.default.createElement(react_2.Flex, { justify: "space-between", w: "full", pt: 2, alignItems: "center" },
61
- react_1.default.createElement(react_2.Text, { color: (_d = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _d === void 0 ? void 0 : _d[500], fontSize: "sm", fontWeight: "medium", cursor: "pointer", onClick: function () { return setShowMore(!showMore); }, display: "flex", alignItems: "center", gap: 2 },
66
+ react_1.default.createElement(react_2.Text, { color: (_d = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _d === void 0 ? void 0 : _d[500], fontSize: "sm", fontWeight: "medium", cursor: "pointer", onClick: handleToggle, display: "flex", alignItems: "center", gap: 2 },
62
67
  "Show ",
63
- showMore ? "less" : "more",
68
+ isExpanded ? "less" : "more",
64
69
  " ",
65
- showMore ? (react_1.default.createElement(lucide_react_1.ChevronUp, { size: 14 })) : (react_1.default.createElement(lucide_react_1.ChevronDown, { size: 14 }))),
70
+ isExpanded ? (react_1.default.createElement(lucide_react_1.ChevronUp, { size: 14 })) : (react_1.default.createElement(lucide_react_1.ChevronDown, { size: 14 }))),
66
71
  react_1.default.createElement(react_2.Spacer, null),
67
72
  react_1.default.createElement(react_2.HStack, { spacing: 2 },
68
73
  react_1.default.createElement(react_2.Tooltip, { label: "Delete" },
69
- react_1.default.createElement(lucide_react_1.Trash2, { size: 16, color: (_e = colors === null || colors === void 0 ? void 0 : colors.red) === null || _e === void 0 ? void 0 : _e[600], onClick: function () { return onDelete === null || onDelete === void 0 ? void 0 : onDelete(account); } })),
74
+ react_1.default.createElement(lucide_react_1.Trash2, { size: 16, color: (_e = colors === null || colors === void 0 ? void 0 : colors.red) === null || _e === void 0 ? void 0 : _e[600], onClick: function () { return onDelete === null || onDelete === void 0 ? void 0 : onDelete(account); }, cursor: "pointer" })),
70
75
  react_1.default.createElement(react_2.Tooltip, { label: "Open" },
71
- react_1.default.createElement(lucide_react_1.ExternalLink, { size: 16, color: (_f = colors === null || colors === void 0 ? void 0 : colors.blue) === null || _f === void 0 ? void 0 : _f[600], onClick: function () { return onOpen === null || onOpen === void 0 ? void 0 : onOpen(account); } }))))))));
76
+ react_1.default.createElement(lucide_react_1.ExternalLink, { size: 16, color: (_f = colors === null || colors === void 0 ? void 0 : colors.blue) === null || _f === void 0 ? void 0 : _f[600], onClick: function () { return onOpen === null || onOpen === void 0 ? void 0 : onOpen(account); }, cursor: "pointer" }))))))));
72
77
  }));
73
78
  };
74
79
  exports.default = AccountCard;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { KanbanBoardProps } from "./KanbanBoardProps";
3
- declare const KanbanBoard: ({ data, onDrag, onDelete, onOpen, onColumnDelete, isLoading, kanbanSelect, kanbanEdit, kanbanCreate }: KanbanBoardProps) => React.JSX.Element;
3
+ declare const KanbanBoard: ({ data, onDrag, onDelete, onOpen, onColumnDelete, isLoading, kanbanSelect, kanbanEdit, kanbanCreate, virtualization, }: KanbanBoardProps) => React.JSX.Element;
4
4
  export default KanbanBoard;
@@ -50,14 +50,59 @@ var react_1 = __importStar(require("react"));
50
50
  var react_2 = require("@chakra-ui/react");
51
51
  var dnd_1 = require("@hello-pangea/dnd");
52
52
  var lucide_react_1 = require("lucide-react");
53
+ var react_window_1 = require("react-window");
53
54
  var useCustomTheme_1 = require("../../Theme/useCustomTheme");
54
55
  var AccountCard_1 = __importDefault(require("./AccountCard"));
55
56
  var HeaderActions_1 = __importDefault(require("../Header/HeaderActions"));
57
+ // base row height and expanded height
58
+ var BASE_ROW_HEIGHT = 180;
59
+ var EXPANDED_ROW_HEIGHT = 280;
56
60
  var KanbanBoard = function (_a) {
57
- var _b, _c, _d;
58
- var data = _a.data, onDrag = _a.onDrag, onDelete = _a.onDelete, onOpen = _a.onOpen, onColumnDelete = _a.onColumnDelete, _e = _a.isLoading, isLoading = _e === void 0 ? false : _e, kanbanSelect = _a.kanbanSelect, kanbanEdit = _a.kanbanEdit, kanbanCreate = _a.kanbanCreate;
61
+ var _b;
62
+ var data = _a.data, onDrag = _a.onDrag, onDelete = _a.onDelete, onOpen = _a.onOpen, onColumnDelete = _a.onColumnDelete, _c = _a.isLoading, isLoading = _c === void 0 ? false : _c, kanbanSelect = _a.kanbanSelect, kanbanEdit = _a.kanbanEdit, kanbanCreate = _a.kanbanCreate, virtualization = _a.virtualization;
59
63
  var colors = (0, useCustomTheme_1.useCustomTheme)().colors;
60
- var _f = (0, react_1.useState)(data), columns = _f[0], setColumns = _f[1];
64
+ var _d = (0, react_1.useState)(data), columns = _d[0], setColumns = _d[1];
65
+ var _e = (0, react_1.useState)(600), containerHeight = _e[0], setContainerHeight = _e[1];
66
+ // Responsive column width
67
+ var columnWidth = (0, react_2.useBreakpointValue)({
68
+ base: "16rem",
69
+ md: "17.5rem",
70
+ lg: "19rem",
71
+ });
72
+ // store expanded row heights (id → boolean)
73
+ var _f = (0, react_1.useState)({}), expanded = _f[0], setExpanded = _f[1];
74
+ // ref for VariableSizeList
75
+ var listRefs = (0, react_1.useRef)({});
76
+ var containerRef = (0, react_1.useRef)(null);
77
+ // Calculate container height based on available space
78
+ (0, react_1.useEffect)(function () {
79
+ var calculateHeight = function () {
80
+ var _a;
81
+ if (containerRef.current) {
82
+ var headerHeight = ((_a = document.querySelector('header')) === null || _a === void 0 ? void 0 : _a.clientHeight) || 0;
83
+ var availableHeight = window.innerHeight - headerHeight - 100; // Adjust for padding/margins
84
+ setContainerHeight(Math.max(500, availableHeight));
85
+ }
86
+ };
87
+ calculateHeight();
88
+ window.addEventListener('resize', calculateHeight);
89
+ return function () {
90
+ window.removeEventListener('resize', calculateHeight);
91
+ };
92
+ }, []);
93
+ // toggle expand/collapse
94
+ var toggleExpand = function (id, colId, index) {
95
+ setExpanded(function (prev) {
96
+ var _a;
97
+ var newExpanded = __assign(__assign({}, prev), (_a = {}, _a[id] = !prev[id], _a));
98
+ // tell react-window to recompute sizes
99
+ if (listRefs.current[colId]) {
100
+ listRefs.current[colId].resetAfterIndex(index);
101
+ }
102
+ return newExpanded;
103
+ });
104
+ };
105
+ // ✅ drag end handler
61
106
  var onDragEnd = function (result) {
62
107
  var _a, _b;
63
108
  var source = result.source, destination = result.destination;
@@ -72,16 +117,14 @@ var KanbanBoard = function (_a) {
72
117
  var copiedItems = __spreadArray([], sourceCol.items, true);
73
118
  copiedItems.splice(source.index, 1);
74
119
  copiedItems.splice(destination.index, 0, draggedItem);
75
- var newCol = __assign(__assign({}, columns), (_a = {}, _a[source.droppableId] = __assign(__assign({}, sourceCol), { items: copiedItems }), _a));
76
- setColumns(newCol);
120
+ setColumns(__assign(__assign({}, columns), (_a = {}, _a[source.droppableId] = __assign(__assign({}, sourceCol), { items: copiedItems }), _a)));
77
121
  }
78
122
  else {
79
123
  var sourceItems = __spreadArray([], sourceCol.items, true);
80
124
  var destItems = __spreadArray([], destCol.items, true);
81
125
  sourceItems.splice(source.index, 1);
82
126
  destItems.splice(destination.index, 0, draggedItem);
83
- var updatedCols = __assign(__assign({}, columns), (_b = {}, _b[source.droppableId] = __assign(__assign({}, sourceCol), { items: sourceItems }), _b[destination.droppableId] = __assign(__assign({}, destCol), { items: destItems }), _b));
84
- setColumns(updatedCols);
127
+ setColumns(__assign(__assign({}, columns), (_b = {}, _b[source.droppableId] = __assign(__assign({}, sourceCol), { items: sourceItems }), _b[destination.droppableId] = __assign(__assign({}, destCol), { items: destItems }), _b)));
85
128
  onDrag === null || onDrag === void 0 ? void 0 : onDrag({
86
129
  from: source.droppableId,
87
130
  to: destination.droppableId,
@@ -94,30 +137,54 @@ var KanbanBoard = function (_a) {
94
137
  var columnIds = ((_b = (_a = columns[colId]) === null || _a === void 0 ? void 0 : _a.items) === null || _b === void 0 ? void 0 : _b.map(function (item) { return item.id; })) || [];
95
138
  onColumnDelete === null || onColumnDelete === void 0 ? void 0 : onColumnDelete(columnIds);
96
139
  };
140
+ // ✅ row renderer for react-window
141
+ var Row = function (_a) {
142
+ var index = _a.index, style = _a.style, data = _a.data;
143
+ var items = data.items, colId = data.colId;
144
+ var account = items[index];
145
+ return (react_1.default.createElement("div", { style: style },
146
+ react_1.default.createElement(dnd_1.Draggable, { draggableId: account.id.toString(), index: index, key: account.id }, function (provided) { return (react_1.default.createElement("div", __assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { style: provided.draggableProps.style }),
147
+ react_1.default.createElement(AccountCard_1.default, { key: account.id, account: account, index: index, onDelete: onDelete, onOpen: onOpen, isExpanded: expanded[account.id], onToggleExpand: function () { return toggleExpand(account.id, colId, index); } }))); })));
148
+ };
149
+ // ✅ dynamic row size calculator
150
+ var getItemSize = (0, react_1.useCallback)(function (index, items) {
151
+ var account = items[index];
152
+ return expanded[account.id] ? EXPANDED_ROW_HEIGHT : BASE_ROW_HEIGHT;
153
+ }, [expanded]);
97
154
  return (react_1.default.createElement(react_1.default.Fragment, null,
98
155
  react_1.default.createElement(HeaderActions_1.default, { select: kanbanSelect, edit: kanbanEdit, create: kanbanCreate }),
99
156
  react_1.default.createElement(dnd_1.DragDropContext, { onDragEnd: onDragEnd },
100
- react_1.default.createElement(react_2.Flex, { gap: 4, p: 4, mt: 2, bg: (_b = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _b === void 0 ? void 0 : _b[200], minH: "100vh", overflowX: "auto", maxWidth: "100vw" }, isLoading ? ((_c = Array.from({ length: 5 })) === null || _c === void 0 ? void 0 : _c.map(function (_, idx) {
101
- var _a, _b;
102
- return (react_1.default.createElement(react_2.Box, { key: idx, width: "17.5rem", p: 4, borderRadius: "0.5rem", bg: (_a = colors === null || colors === void 0 ? void 0 : colors.background) === null || _a === void 0 ? void 0 : _a[100], border: "0.125rem solid ".concat((_b = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _b === void 0 ? void 0 : _b[200]), flexShrink: 0 },
103
- react_1.default.createElement(react_2.Skeleton, { height: "2.75rem", mb: 4, borderRadius: "0.25rem" }),
104
- react_1.default.createElement(react_2.SkeletonText, { mt: "4", noOfLines: 5, spacing: "4" })));
105
- })) : ((_d = Object.entries(columns)) === null || _d === void 0 ? void 0 : _d.map(function (_a) {
106
- var colId = _a[0], column = _a[1];
107
- return (react_1.default.createElement(dnd_1.Droppable, { droppableId: colId.toString(), key: colId }, function (provided, snapshot) {
108
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
109
- return (react_1.default.createElement(react_2.Box, __assign({ ref: provided.innerRef }, provided.droppableProps, { width: "17.5rem", opacity: 1, borderRadius: "0.5rem", borderWidth: "0.063rem", background: snapshot.isDraggingOver
110
- ? (_a = colors === null || colors === void 0 ? void 0 : colors.blue) === null || _a === void 0 ? void 0 : _a[50]
111
- : (_b = colors === null || colors === void 0 ? void 0 : colors.background) === null || _b === void 0 ? void 0 : _b[100], border: "".concat(snapshot.isDraggingOver
112
- ? "0.5px dashed" + ((_c = colors === null || colors === void 0 ? void 0 : colors.blue) === null || _c === void 0 ? void 0 : _c[500])
113
- : "0.125rem solid" + ((_d = colors.gray) === null || _d === void 0 ? void 0 : _d[200])), display: "flex", flexDirection: "column", flexShrink: 0 }),
114
- react_1.default.createElement(react_2.Flex, { width: "16.5rem", height: "2.75rem", borderRadius: "0.25rem", borderLeft: "0.188rem solid", borderLeftColor: (_e = column.color) !== null && _e !== void 0 ? _e : (_f = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _f === void 0 ? void 0 : _f[500], background: (_g = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _g === void 0 ? void 0 : _g[100], align: "center", px: 2, mb: 3, flexShrink: 0, m: 2, justifyContent: "space-between" },
115
- react_1.default.createElement(react_2.Text, { fontWeight: "600", fontSize: "1rem", color: (_h = colors === null || colors === void 0 ? void 0 : colors.text) === null || _h === void 0 ? void 0 : _h[700] }, column.title),
116
- react_1.default.createElement(react_2.Box, { as: lucide_react_1.Trash2, size: 16, cursor: "pointer", color: (_j = colors === null || colors === void 0 ? void 0 : colors.text) === null || _j === void 0 ? void 0 : _j[600], _hover: { color: (_k = colors === null || colors === void 0 ? void 0 : colors.red) === null || _k === void 0 ? void 0 : _k[600] }, onClick: function () { return handleColumnDelete(colId); } })),
117
- react_1.default.createElement(react_2.Box, { px: 2, pb: 2, overflowY: "auto", maxHeight: "calc(100vh - 7rem)", overflowX: "hidden" }, (_l = column.items) === null || _l === void 0 ? void 0 :
118
- _l.map(function (account, index) { return (react_1.default.createElement(AccountCard_1.default, { key: account.id, account: account, index: index, onDelete: onDelete, onOpen: onOpen })); }),
119
- provided.placeholder)));
120
- }));
121
- }))))));
157
+ react_1.default.createElement(react_2.Flex, { ref: containerRef, gap: 4, p: 4, mt: 2, bg: (_b = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _b === void 0 ? void 0 : _b[200], minH: "".concat(containerHeight, "px"), overflowX: "auto", maxWidth: "100vw" }, isLoading
158
+ ? Array.from({ length: 5 }).map(function (_, idx) {
159
+ var _a, _b;
160
+ return (react_1.default.createElement(react_2.Box, { key: idx, width: columnWidth, p: 4, borderRadius: "0.5rem", bg: (_a = colors === null || colors === void 0 ? void 0 : colors.background) === null || _a === void 0 ? void 0 : _a[100], border: "0.125rem solid ".concat((_b = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _b === void 0 ? void 0 : _b[200]), flexShrink: 0 },
161
+ react_1.default.createElement(react_2.Skeleton, { height: "2.75rem", mb: 4, borderRadius: "0.25rem" }),
162
+ react_1.default.createElement(react_2.SkeletonText, { mt: "4", noOfLines: 5, spacing: "4" })));
163
+ })
164
+ : Object.entries(columns).map(function (_a) {
165
+ var colId = _a[0], column = _a[1];
166
+ return (react_1.default.createElement(dnd_1.Droppable, { droppableId: colId, key: colId, mode: virtualization ? "virtual" : "standard", renderClone: function (provided, snapshot, rubric) {
167
+ var item = column.items[rubric.source.index];
168
+ return (react_1.default.createElement("div", __assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { style: provided.draggableProps.style }),
169
+ react_1.default.createElement(AccountCard_1.default, { key: item.id, account: item, index: rubric.source.index, onDelete: onDelete, onOpen: onOpen, isExpanded: expanded[item.id], onToggleExpand: function () { return toggleExpand(item.id, colId, rubric.source.index); } })));
170
+ } }, function (provided, snapshot) {
171
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
172
+ return (react_1.default.createElement(react_2.Box, __assign({ ref: provided.innerRef }, provided.droppableProps, { width: columnWidth, borderRadius: "0.5rem", borderWidth: "0.063rem", background: snapshot.isDraggingOver
173
+ ? (_a = colors === null || colors === void 0 ? void 0 : colors.blue) === null || _a === void 0 ? void 0 : _a[50]
174
+ : (_b = colors === null || colors === void 0 ? void 0 : colors.background) === null || _b === void 0 ? void 0 : _b[100], border: "".concat(snapshot.isDraggingOver
175
+ ? "0.5px dashed " + ((_c = colors === null || colors === void 0 ? void 0 : colors.blue) === null || _c === void 0 ? void 0 : _c[500])
176
+ : "0.125rem solid " + ((_d = colors.gray) === null || _d === void 0 ? void 0 : _d[200])), display: "flex", flexDirection: "column", flexShrink: 0, overflow: "hidden", height: "".concat(containerHeight, "px") }),
177
+ react_1.default.createElement(react_2.Flex, { width: "100%", height: "2.75rem", borderRadius: "0.25rem", borderLeft: "0.188rem solid", borderLeftColor: (_e = column.color) !== null && _e !== void 0 ? _e : (_f = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _f === void 0 ? void 0 : _f[500], background: (_g = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _g === void 0 ? void 0 : _g[100], align: "center", px: 3, flexShrink: 0, justifyContent: "space-between" },
178
+ react_1.default.createElement(react_2.Text, { fontWeight: "600", fontSize: "1rem", color: (_h = colors === null || colors === void 0 ? void 0 : colors.text) === null || _h === void 0 ? void 0 : _h[700] }, column.title),
179
+ react_1.default.createElement(react_2.Box, { as: lucide_react_1.Trash2, size: 16, cursor: "pointer", color: (_j = colors === null || colors === void 0 ? void 0 : colors.text) === null || _j === void 0 ? void 0 : _j[600], _hover: { color: (_k = colors === null || colors === void 0 ? void 0 : colors.red) === null || _k === void 0 ? void 0 : _k[600] }, onClick: function () { return handleColumnDelete(colId); } })),
180
+ react_1.default.createElement(react_2.Box, { px: 2, pb: 2, flex: "1", overflow: "auto", width: "100%" },
181
+ virtualization ? (react_1.default.createElement(react_window_1.VariableSizeList, { ref: function (el) {
182
+ if (el)
183
+ listRefs.current[colId] = el;
184
+ }, height: containerHeight - 100, itemCount: column.items.length, itemSize: function (index) { return getItemSize(index, column.items); }, width: "100%", itemData: { items: column.items, colId: colId } }, Row)) : (react_1.default.createElement(react_2.Box, { height: "100%", overflow: "auto" }, column.items.map(function (account, index) { return (react_1.default.createElement(dnd_1.Draggable, { draggableId: account.id.toString(), index: index, key: account.id }, function (provided) { return (react_1.default.createElement("div", __assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { style: provided.draggableProps.style }),
185
+ react_1.default.createElement(AccountCard_1.default, { key: account.id, account: account, index: index, onDelete: onDelete, onOpen: onOpen, isExpanded: expanded[account.id], onToggleExpand: function () { return toggleExpand(account.id, colId, index); } }))); })); }))),
186
+ provided.placeholder)));
187
+ }));
188
+ })))));
122
189
  };
123
190
  exports.default = KanbanBoard;
@@ -38,4 +38,5 @@ export type KanbanBoardProps = {
38
38
  onCreate?: () => void;
39
39
  label?: string;
40
40
  };
41
+ virtualization?: boolean;
41
42
  };
@@ -69,18 +69,18 @@ var normalizeMultiValue = function (val) {
69
69
  return [];
70
70
  };
71
71
  var SearchSelect = function (_a) {
72
- var _b, _c, _d, _e, _f, _g, _h;
73
- var id = _a.id, label = _a.label, options = _a.options, onSelect = _a.onSelect, onSearch = _a.onSearch, _j = _a.isOptionLoading, isOptionLoading = _j === void 0 ? false : _j, _k = _a.isLoading, isLoading = _k === void 0 ? false : _k, _l = _a.loadingText, loadingText = _l === void 0 ? 'Loading...' : _l, _m = _a.placeholder, placeholder = _m === void 0 ? 'Select' : _m, value = _a.value, _o = _a.searchQuery, searchQuery = _o === void 0 ? '' : _o, _p = _a.isMultiple, isMultiple = _p === void 0 ? false : _p, _q = _a.isRequired, isRequired = _q === void 0 ? false : _q, _r = _a.error, error = _r === void 0 ? false : _r, errorMessage = _a.errorMessage, helperText = _a.helperText, _s = _a.width, width = _s === void 0 ? '100%' : _s, _t = _a.height, height = _t === void 0 ? "2.75rem" : _t, _u = _a.size, size = _u === void 0 ? 'md' : _u, chip = _a.chip, information = _a.information, rightIcon = _a.rightIcon, addNew = _a.addNew, _v = _a.isSelectAll, isSelectAll = _v === void 0 ? false : _v, pagination = _a.pagination, insideSelect = _a.insideSelect, isRemoveAllIcon = _a.isRemoveAllIcon;
74
- var _w = (0, react_1.useState)(searchQuery), inputValue = _w[0], setInputValue = _w[1];
75
- var _x = (0, react_1.useState)(false), isOpen = _x[0], setIsOpen = _x[1];
76
- var _y = (0, react_1.useState)(true), hasMore = _y[0], setHasMore = _y[1];
72
+ var _b, _c, _d, _e, _f, _g, _h, _j;
73
+ var id = _a.id, label = _a.label, options = _a.options, onSelect = _a.onSelect, onSearch = _a.onSearch, _k = _a.isOptionLoading, isOptionLoading = _k === void 0 ? false : _k, _l = _a.isLoading, isLoading = _l === void 0 ? false : _l, _m = _a.loadingText, loadingText = _m === void 0 ? 'Loading...' : _m, _o = _a.placeholder, placeholder = _o === void 0 ? 'Select' : _o, value = _a.value, _p = _a.searchQuery, searchQuery = _p === void 0 ? '' : _p, _q = _a.isMultiple, isMultiple = _q === void 0 ? false : _q, _r = _a.isRequired, isRequired = _r === void 0 ? false : _r, _s = _a.error, error = _s === void 0 ? false : _s, errorMessage = _a.errorMessage, helperText = _a.helperText, _t = _a.width, width = _t === void 0 ? '100%' : _t, _u = _a.height, height = _u === void 0 ? "2.75rem" : _u, _v = _a.size, size = _v === void 0 ? 'md' : _v, chip = _a.chip, information = _a.information, rightIcon = _a.rightIcon, addNew = _a.addNew, _w = _a.isSelectAll, isSelectAll = _w === void 0 ? false : _w, pagination = _a.pagination, insideSelect = _a.insideSelect, isRemoveAllIcon = _a.isRemoveAllIcon;
74
+ var _x = (0, react_1.useState)(searchQuery), inputValue = _x[0], setInputValue = _x[1];
75
+ var _y = (0, react_1.useState)(false), isOpen = _y[0], setIsOpen = _y[1];
76
+ var _z = (0, react_1.useState)(true), hasMore = _z[0], setHasMore = _z[1];
77
77
  var inputRef = (0, react_1.useRef)(null);
78
78
  var containerRef = (0, react_1.useRef)(null);
79
79
  var scrollTimeoutRef = (0, react_1.useRef)(null);
80
- var _z = (0, react_1.useState)(false), focused = _z[0], setFocused = _z[1];
81
- var _0 = (0, react_1.useState)(false), customSelectOpen = _0[0], setCustomSelectOpen = _0[1];
80
+ var _0 = (0, react_1.useState)(false), focused = _0[0], setFocused = _0[1];
81
+ var _1 = (0, react_1.useState)(false), customSelectOpen = _1[0], setCustomSelectOpen = _1[1];
82
82
  var customSelectRef = (0, react_1.useRef)(null);
83
- var _1 = (0, react_1.useState)({ top: 0, left: 0, width: 0 }), customSelectPos = _1[0], setCustomSelectPos = _1[1];
83
+ var _2 = (0, react_1.useState)({ top: 0, left: 0, width: 0 }), customSelectPos = _2[0], setCustomSelectPos = _2[1];
84
84
  var theme = (0, useCustomTheme_1.useCustomTheme)();
85
85
  (0, react_2.useOutsideClick)({
86
86
  ref: containerRef,
@@ -203,13 +203,13 @@ var SearchSelect = function (_a) {
203
203
  return (react_1.default.createElement(react_2.Box, { ref: containerRef, width: width, position: "relative" },
204
204
  label && (react_1.default.createElement(FormLabel_1.TextLabel, { label: label, id: id, isRequired: isRequired, isInformation: information === null || information === void 0 ? void 0 : information.isInformation, informationMessage: information === null || information === void 0 ? void 0 : information.informationMessage })),
205
205
  react_1.default.createElement(react_2.InputGroup, { size: size },
206
- react_1.default.createElement(react_2.Box, { as: "div", w: "100%", minH: "2.85rem", px: 3, display: "flex", alignItems: "center", flexWrap: "wrap", gap: "0.375rem", border: "0.063rem solid", borderColor: error ? theme.colors.semantic.error[500] : focused ? theme.colors.primary[500] : (_b = theme.colors.boxborder) === null || _b === void 0 ? void 0 : _b[500], borderRadius: "0.25rem", bg: (_c = theme.colors.gray) === null || _c === void 0 ? void 0 : _c[50], boxShadow: focused ? error ? "0 0 0 0.125rem ".concat((_d = theme.colors.boxShadow) === null || _d === void 0 ? void 0 : _d.error) : "0 0 0 0.125rem ".concat((_e = theme.colors.boxShadow) === null || _e === void 0 ? void 0 : _e.primary) : 'none', transition: "box-shadow 0.2s, border-color 0.2s" },
206
+ react_1.default.createElement(react_2.Box, { as: "div", w: "100%", minH: "2.85rem", px: 3, display: "flex", alignItems: "center", flexWrap: "wrap", gap: "0.375rem", border: "0.063rem solid", borderColor: error ? theme.colors.semantic.error[500] : focused ? theme.colors.primary[500] : (_b = theme.colors.boxborder) === null || _b === void 0 ? void 0 : _b[500], borderRadius: "0.25rem", bg: (_c = theme.colors.gray) === null || _c === void 0 ? void 0 : _c[50], boxShadow: focused ? error ? "0 0 0 0.125rem ".concat((_d = theme.colors.boxShadow) === null || _d === void 0 ? void 0 : _d.error) : "0 0 0 0.125rem ".concat((_e = theme.colors.boxShadow) === null || _e === void 0 ? void 0 : _e.primary) : error ? "0 0 0 0.125rem ".concat((_f = theme.colors.boxShadow) === null || _f === void 0 ? void 0 : _f.error) : 'none', transition: "box-shadow 0.2s, border-color 0.2s" },
207
207
  insideSelect && (react_1.default.createElement(react_2.Box, { position: "relative", ref: customSelectRef, backgroundColor: theme.colors.gray[200], ml: "-0.75rem", h: "-webkit-fill-available", borderRadius: "0.25rem 0 0 0.25rem", onClick: function () { return setCustomSelectOpen(function (prev) { return !prev; }); } },
208
208
  react_1.default.createElement(react_2.Box, { minW: "5rem", cursor: "pointer", display: "flex", justifyContent: "space-between", alignItems: "center", width: insideSelect.width, height: height, pl: "0.5rem", pr: "0.5rem" },
209
- react_1.default.createElement(SelectTruncatedLabel_1.default, { label: (_g = (_f = insideSelect === null || insideSelect === void 0 ? void 0 : insideSelect.value) === null || _f === void 0 ? void 0 : _f.label) !== null && _g !== void 0 ? _g : "", maxWidth: (insideSelect === null || insideSelect === void 0 ? void 0 : insideSelect.width) || "6rem" }),
209
+ react_1.default.createElement(SelectTruncatedLabel_1.default, { label: (_h = (_g = insideSelect === null || insideSelect === void 0 ? void 0 : insideSelect.value) === null || _g === void 0 ? void 0 : _g.label) !== null && _h !== void 0 ? _h : "", maxWidth: (insideSelect === null || insideSelect === void 0 ? void 0 : insideSelect.width) || "6rem" }),
210
210
  customSelectOpen ? react_1.default.createElement(lucide_react_1.ChevronUp, { size: 16 }) : react_1.default.createElement(lucide_react_1.ChevronDown, { size: 16 })),
211
211
  customSelectOpen && (react_1.default.createElement(react_2.Portal, null,
212
- react_1.default.createElement(react_2.Box, { id: "custom-select-portal", position: "absolute", top: "".concat(customSelectPos.top, "px"), left: "".concat(customSelectPos.left, "px"), zIndex: 1400, bg: theme.colors.white, border: "0.063rem solid", borderColor: theme.colors.gray[300], borderRadius: "md", boxShadow: "md", minW: "10rem", maxW: "38rem" }, (_h = insideSelect === null || insideSelect === void 0 ? void 0 : insideSelect.option) === null || _h === void 0 ? void 0 : _h.map(function (item) { return (react_1.default.createElement(react_2.Box, { key: item.id, display: "flex", alignItems: "center", height: "2.5rem", px: "0.75rem", fontSize: "sm", _hover: { bg: theme.colors.gray[100] }, cursor: "pointer", onClick: function (e) {
212
+ react_1.default.createElement(react_2.Box, { id: "custom-select-portal", position: "absolute", top: "".concat(customSelectPos.top, "px"), left: "".concat(customSelectPos.left, "px"), zIndex: 1400, bg: theme.colors.white, border: "0.063rem solid", borderColor: theme.colors.gray[300], borderRadius: "md", boxShadow: "md", minW: "10rem", maxW: "38rem" }, (_j = insideSelect === null || insideSelect === void 0 ? void 0 : insideSelect.option) === null || _j === void 0 ? void 0 : _j.map(function (item) { return (react_1.default.createElement(react_2.Box, { key: item.id, display: "flex", alignItems: "center", height: "2.5rem", px: "0.75rem", fontSize: "sm", _hover: { bg: theme.colors.gray[100] }, cursor: "pointer", onClick: function (e) {
213
213
  e.stopPropagation();
214
214
  handleCustomSelect(item);
215
215
  } }, item.label)); })))))),
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
2
  import { TableProps } from "./TableProps";
3
- export default function Table({ data, columns, onSelection, isLoading, isCheckbox, headerBgColor, freezedBgColor, headerTextColor, freezedTextColor, tableBorderColor, noBorders, isPagination, onRowClick, selections, isActionFreeze, preferencesUrl, preferencesKey, preferencesName, preferencesPage, authToken, paginationMode, noOfRowsPerPage, totalRecords, onPagination, isTableSettings, headerActions, onGlobalSearch, }: TableProps): React.JSX.Element;
3
+ export default function Table({ data, columns, onSelection, isLoading, isCheckbox, headerBgColor, freezedBgColor, headerTextColor, freezedTextColor, tableBorderColor, noBorders, isPagination, onRowClick, selections, isActionFreeze, preferencesUrl, preferencesKey, preferencesName, preferencesPage, authToken, paginationMode, noOfRowsPerPage, totalRecords, onPagination, isTableSettings, headerActions, onGlobalSearch, onColumnFilter }: TableProps): React.JSX.Element;
@@ -34,7 +34,6 @@ var TableHeader_1 = __importDefault(require("./Components/TableHeader"));
34
34
  var TableBody_1 = __importDefault(require("./Components/TableBody"));
35
35
  var useCustomTheme_1 = require("../../Theme/useCustomTheme");
36
36
  var useTable_1 = __importDefault(require("./Components/useTable"));
37
- var table_1 = require("../../Utils/table");
38
37
  var usePreferences_1 = require("../../Hooks/usePreferences");
39
38
  var TableSettings_1 = __importDefault(require("./TableSettings/TableSettings"));
40
39
  var HeaderActions_1 = __importDefault(require("./Components/HeaderActions"));
@@ -42,9 +41,14 @@ var Divider_1 = __importDefault(require("../Divider/Divider"));
42
41
  var TableSearch_1 = __importDefault(require("./Components/TableSearch"));
43
42
  function Table(_a) {
44
43
  var _b, _c, _d, _e, _f, _g;
45
- var data = _a.data, columns = _a.columns, onSelection = _a.onSelection, isLoading = _a.isLoading, _h = _a.isCheckbox, isCheckbox = _h === void 0 ? false : _h, headerBgColor = _a.headerBgColor, freezedBgColor = _a.freezedBgColor, headerTextColor = _a.headerTextColor, freezedTextColor = _a.freezedTextColor, tableBorderColor = _a.tableBorderColor, _j = _a.noBorders, noBorders = _j === void 0 ? false : _j, _k = _a.isPagination, isPagination = _k === void 0 ? true : _k, onRowClick = _a.onRowClick, selections = _a.selections, _l = _a.isActionFreeze, isActionFreeze = _l === void 0 ? true : _l, _m = _a.preferencesUrl, preferencesUrl = _m === void 0 ? "" : _m, _o = _a.preferencesKey, preferencesKey = _o === void 0 ? "" : _o, _p = _a.preferencesName, preferencesName = _p === void 0 ? "" : _p, _q = _a.preferencesPage, preferencesPage = _q === void 0 ? "" : _q, _r = _a.authToken, authToken = _r === void 0 ? "" : _r, _s = _a.paginationMode, paginationMode = _s === void 0 ? "client" : _s, _t = _a.noOfRowsPerPage, noOfRowsPerPage = _t === void 0 ? 50 : _t, _u = _a.totalRecords, totalRecords = _u === void 0 ? 0 : _u, onPagination = _a.onPagination, _v = _a.isTableSettings, isTableSettings = _v === void 0 ? false : _v, headerActions = _a.headerActions, onGlobalSearch = _a.onGlobalSearch;
44
+ var data = _a.data, columns = _a.columns, onSelection = _a.onSelection, isLoading = _a.isLoading, _h = _a.isCheckbox, isCheckbox = _h === void 0 ? false : _h, headerBgColor = _a.headerBgColor, freezedBgColor = _a.freezedBgColor, headerTextColor = _a.headerTextColor, freezedTextColor = _a.freezedTextColor, tableBorderColor = _a.tableBorderColor, _j = _a.noBorders, noBorders = _j === void 0 ? false : _j, _k = _a.isPagination, isPagination = _k === void 0 ? true : _k, onRowClick = _a.onRowClick, selections = _a.selections, _l = _a.isActionFreeze, isActionFreeze = _l === void 0 ? true : _l, _m = _a.preferencesUrl, preferencesUrl = _m === void 0 ? "" : _m, _o = _a.preferencesKey, preferencesKey = _o === void 0 ? "" : _o, _p = _a.preferencesName, preferencesName = _p === void 0 ? "" : _p, _q = _a.preferencesPage, preferencesPage = _q === void 0 ? "" : _q, _r = _a.authToken, authToken = _r === void 0 ? "" : _r, _s = _a.paginationMode, paginationMode = _s === void 0 ? "client" : _s, _t = _a.noOfRowsPerPage, noOfRowsPerPage = _t === void 0 ? 50 : _t, _u = _a.totalRecords, totalRecords = _u === void 0 ? 0 : _u, onPagination = _a.onPagination, _v = _a.isTableSettings, isTableSettings = _v === void 0 ? false : _v, headerActions = _a.headerActions, onGlobalSearch = _a.onGlobalSearch, onColumnFilter = _a.onColumnFilter;
46
45
  var theme = (0, useCustomTheme_1.useCustomTheme)();
47
46
  var _w = (0, react_1.useState)({}), columnsSearch = _w[0], setColumnsSearch = _w[1];
47
+ (0, react_1.useEffect)(function () {
48
+ if (onColumnFilter) {
49
+ onColumnFilter(columnsSearch);
50
+ }
51
+ }, [columnsSearch, onColumnFilter]);
48
52
  var isServerPagination = paginationMode === "server";
49
53
  var _x = (0, usePreferences_1.useGetPreferences)({
50
54
  baseUrl: preferencesUrl,
@@ -82,9 +86,9 @@ function Table(_a) {
82
86
  totalRecords: totalRecords,
83
87
  isServerPagination: isServerPagination,
84
88
  }), tableData = _y.tableData, isContent = _y.isContent, isLink = _y.isLink, headerRefs = _y.headerRefs, columnWidths = _y.columnWidths, handleSort = _y.handleSort, handleCheckbox = _y.handleCheckbox, filteredData = _y.filteredData, startRow = _y.startRow, endRow = _y.endRow, selection = _y.selection, columnsSort = _y.columnsSort, currentPage = _y.currentPage, pages = _y.pages, rowsPerPage = _y.rowsPerPage, handlePageSizeChange = _y.handlePageSizeChange, setCurrentPage = _y.setCurrentPage, columnsList = _y.columnsList, handleColumnPreferences = _y.handleColumnPreferences;
85
- var _filteredData = (0, react_1.useMemo)(function () {
86
- return (0, table_1.searchAndSortData)(filteredData, columnsSearch);
87
- }, [columnsSearch, filteredData]);
89
+ // const _filteredData = useMemo(() => {
90
+ // return searchAndSortData(filteredData, columnsSearch);
91
+ // }, [columnsSearch, filteredData]);
88
92
  (0, react_1.useEffect)(function () {
89
93
  if (onPagination) {
90
94
  onPagination(currentPage + 1, noOfRowsPerPage);
@@ -124,6 +128,6 @@ function Table(_a) {
124
128
  ? false
125
129
  : "indeterminate", isContent: isContent, isLink: isLink, isActionFreeze: isActionFreeze, setColumnsSearch: setColumnsSearch, columnsSearch: columnsSearch })),
126
130
  react_1.default.createElement(react_3.Tbody, null,
127
- react_1.default.createElement(TableBody_1.default, { data: _filteredData, columns: columnsList, startRow: startRow, endRow: endRow, isCheckbox: isCheckbox, columnWidths: columnWidths, noBorders: noBorders, freezedBgColor: freezedBgColor !== null && freezedBgColor !== void 0 ? freezedBgColor : theme.colors.backgroundColor.secondary, freezedTextColor: freezedTextColor !== null && freezedTextColor !== void 0 ? freezedTextColor : (_g = theme.colors) === null || _g === void 0 ? void 0 : _g.gray[600], handleCheckbox: handleCheckbox, selections: selection, isLoading: isTableLoading, onRowClick: onRowClick, isContent: isContent, isLink: isLink, isActionFreeze: isActionFreeze }))))));
131
+ react_1.default.createElement(TableBody_1.default, { data: filteredData, columns: columnsList, startRow: startRow, endRow: endRow, isCheckbox: isCheckbox, columnWidths: columnWidths, noBorders: noBorders, freezedBgColor: freezedBgColor !== null && freezedBgColor !== void 0 ? freezedBgColor : theme.colors.backgroundColor.secondary, freezedTextColor: freezedTextColor !== null && freezedTextColor !== void 0 ? freezedTextColor : (_g = theme.colors) === null || _g === void 0 ? void 0 : _g.gray[600], handleCheckbox: handleCheckbox, selections: selection, isLoading: isTableLoading, onRowClick: onRowClick, isContent: isContent, isLink: isLink, isActionFreeze: isActionFreeze }))))));
128
132
  }
129
133
  exports.default = Table;
@@ -31,6 +31,7 @@ export type TableProps = {
31
31
  isTableSettings?: boolean;
32
32
  headerActions?: HeaderActionsProps;
33
33
  onGlobalSearch?: (searchVal: string) => void;
34
+ onColumnFilter?: (filters: Record<string, any>) => void;
34
35
  };
35
36
  export type HeaderActionsProps = {
36
37
  isDelete?: {
@@ -5,117 +5,57 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var react_1 = __importDefault(require("react"));
7
7
  var KanbanBoard_1 = __importDefault(require("../Components/KanbanBoard/KanbanBoard"));
8
+ var createItems = function (count, prefix) {
9
+ return Array.from({ length: count }, function (_, i) { return ({
10
+ id: "".concat(prefix, "-").concat(i),
11
+ rating: "Acquired",
12
+ name: "".concat(prefix, " Item ").concat(i),
13
+ owner: "Owner ".concat(i),
14
+ site: "Demo",
15
+ details: "Additional details here...",
16
+ location: i % 2 === 0 ? "Chennai" : "Bangalore",
17
+ status: i % 3 === 0 ? "Pending" : "Completed",
18
+ }); });
19
+ };
8
20
  var initialData = {
9
21
  acquired: {
10
22
  id: "acquired",
11
23
  title: "Acquired",
12
24
  color: "#9A4FE5",
13
- items: [
14
- {
15
- id: "1",
16
- rating: "Acquired",
17
- name: "1",
18
- owner: "Mathew John and so",
19
- site: "Demo",
20
- details: "Additional details here...",
21
- location: "Chennai",
22
- status: "Pending",
23
- },
24
- ],
25
+ items: createItems(10, "acq"), // 👈 1000 records
25
26
  },
26
27
  active: {
27
- id: "requetsed",
28
+ id: "requested",
28
29
  title: "Requested",
29
30
  color: "#4CAF50",
30
- items: [
31
- {
32
- id: "2",
33
- rating: "Acquired",
34
- name: "1",
35
- owner: "Mathew John",
36
- site: "Demo",
37
- details: "Additional details here...",
38
- location: "Bangalore",
39
- status: "Completed",
40
- },
41
- ],
42
- },
43
- active2: {
44
- id: "done",
45
- title: "Done",
46
- color: "#4CfF50",
47
- items: [
48
- {
49
- id: "33",
50
- rating: "Done",
51
- name: "1",
52
- owner: "Mathew John",
53
- site: "Demo",
54
- details: "Additional details here...",
55
- location: "Mumbai",
56
- status: "In Progress",
57
- },
58
- ],
31
+ items: createItems(4, "req"), // 👈 800 records
59
32
  },
60
- active3: {
61
- id: "done",
62
- title: "Done",
33
+ closed: {
34
+ id: "closed",
35
+ title: "close",
63
36
  color: "#4CfF50",
64
- items: [
65
- {
66
- id: "332",
67
- rating: "Done",
68
- name: "1",
69
- owner: "Mathew John",
70
- site: "Demo",
71
- details: "Additional details here...",
72
- location: "Mumbai",
73
- status: "In Progress",
74
- },
75
- ],
37
+ items: createItems(3, "cls"),
76
38
  },
77
- active4: {
78
- id: "done",
79
- title: "Done",
39
+ open: {
40
+ id: "open",
41
+ title: "Open",
80
42
  color: "#4CfF50",
81
- items: [
82
- {
83
- id: "3322",
84
- rating: "Done",
85
- name: "1",
86
- owner: "Mathew John",
87
- site: "Demo",
88
- details: "Additional details here...",
89
- location: "Mumbai",
90
- status: "In Progress",
91
- },
92
- ],
43
+ items: createItems(5, "OP"),
93
44
  },
94
- active5: {
45
+ done: {
95
46
  id: "done",
96
47
  title: "Done",
97
48
  color: "#4CfF50",
98
- items: [
99
- {
100
- id: "332e2",
101
- rating: "Done",
102
- name: "1",
103
- owner: "Mathew John",
104
- site: "Demo",
105
- details: "Additional details here...",
106
- location: "Mumbai",
107
- status: "In Progress",
108
- },
109
- ],
49
+ items: createItems(6, "done"), // 👈 600 records
110
50
  },
111
51
  };
112
52
  var viewListData = [
113
53
  {
114
- "view_id": 5,
115
- "type": "contact",
116
- "viewName": "status",
117
- "groupBy": "Lead Source",
118
- "selectedField": [
54
+ view_id: 5,
55
+ type: "contact",
56
+ viewName: "status",
57
+ groupBy: "Lead Source",
58
+ selectedField: [
119
59
  "contact_owner",
120
60
  "first_name",
121
61
  "last_name",
@@ -139,18 +79,18 @@ var viewListData = [
139
79
  "other_zip",
140
80
  "other_country",
141
81
  "fax",
142
- "description"
82
+ "description",
143
83
  ],
144
- "moduleId": null,
145
- "created_at": 1756720852175,
146
- "updated_at": 1756720852175
84
+ moduleId: null,
85
+ created_at: 1756720852175,
86
+ updated_at: 1756720852175,
147
87
  },
148
88
  {
149
- "view_id": 4,
150
- "type": "contact",
151
- "viewName": "demo",
152
- "groupBy": "Lead Source",
153
- "selectedField": [
89
+ view_id: 4,
90
+ type: "contact",
91
+ viewName: "demo",
92
+ groupBy: "Lead Source",
93
+ selectedField: [
154
94
  "contact_owner",
155
95
  "first_name",
156
96
  "last_name",
@@ -174,18 +114,18 @@ var viewListData = [
174
114
  "other_zip",
175
115
  "other_country",
176
116
  "fax",
177
- "description"
117
+ "description",
178
118
  ],
179
- "moduleId": null,
180
- "created_at": 1756720474429,
181
- "updated_at": 1756720474429
119
+ moduleId: null,
120
+ created_at: 1756720474429,
121
+ updated_at: 1756720474429,
182
122
  },
183
123
  {
184
- "view_id": 2,
185
- "type": "contact",
186
- "viewName": "kanabana",
187
- "groupBy": "Lead Source",
188
- "selectedField": [
124
+ view_id: 2,
125
+ type: "contact",
126
+ viewName: "kanabana",
127
+ groupBy: "Lead Source",
128
+ selectedField: [
189
129
  "contact_owner",
190
130
  "first_name",
191
131
  "last_name",
@@ -209,15 +149,15 @@ var viewListData = [
209
149
  "other_zip",
210
150
  "other_country",
211
151
  "fax",
212
- "description"
152
+ "description",
213
153
  ],
214
- "moduleId": null,
215
- "created_at": 1756457931264,
216
- "updated_at": 1756457931264
217
- }
154
+ moduleId: null,
155
+ created_at: 1756457931264,
156
+ updated_at: 1756457931264,
157
+ },
218
158
  ];
219
159
  var KanbanBoardExample = function () {
220
- return (react_1.default.createElement(KanbanBoard_1.default, { data: initialData, onDelete: function (item) { return console.log("Delete", item); }, onOpen: function (item) { return console.log("Open", item); }, onDrag: function (updatedColumns) { return console.log("New State", updatedColumns); }, onColumnDelete: function (updatedColumns) { return console.log("New Del", updatedColumns); }, isLoading: false, kanbanCreate: {
160
+ return (react_1.default.createElement(KanbanBoard_1.default, { data: initialData, onDelete: function (item) { return console.log("Delete", item); }, onOpen: function (item) { return console.log("Open", item); }, onDrag: function (updatedColumns) { return console.log("New State", updatedColumns); }, onColumnDelete: function (updatedColumns) { return console.log("New Del", updatedColumns); }, isLoading: false, virtualization: true, kanbanCreate: {
221
161
  isCreatable: true,
222
162
  onCreate: function () { },
223
163
  }, kanbanEdit: {
@@ -75,6 +75,7 @@ var react_1 = __importStar(require("react"));
75
75
  var SearchSelect_1 = __importDefault(require("../Components/SearchSelect/SearchSelect"));
76
76
  // import { Plus } from "lucide-react";
77
77
  var react_2 = require("@chakra-ui/react");
78
+ var TextInput_1 = __importDefault(require("../Components/Input/TextInput"));
78
79
  var max = 149;
79
80
  var rrr = function (start, limit) {
80
81
  var end = Math.min(start + limit, max + 1); // +1 to include `max` as valid
@@ -102,7 +103,7 @@ var SearchSelect = function () {
102
103
  }, onSearch: function (query) { return setSearch(query); }, searchQuery: search, isOptionLoading: false, placeholder: "Search users...", chip: {
103
104
  maxChips: 3,
104
105
  onClick: function () { return console.log("chip removed"); },
105
- }, isSelectAll: true, pagination: {
106
+ }, isSelectAll: true, isRequired: true, pagination: {
106
107
  limit: 50,
107
108
  scrollLoading: paginationLoading,
108
109
  onScroll: function (startIndex, limit, query) { return __awaiter(void 0, void 0, void 0, function () {
@@ -179,6 +180,40 @@ var SearchSelect = function () {
179
180
  "label": "Hariharan Jeganathan",
180
181
  }
181
182
  ]
182
- } })));
183
+ } }),
184
+ react_1.default.createElement("br", null),
185
+ react_1.default.createElement("br", null),
186
+ react_1.default.createElement("br", null),
187
+ react_1.default.createElement(TextInput_1.default, { label: "My Label", id: "input1", name: "hello",
188
+ //helperText="Hello"
189
+ // errorMessage="Required"
190
+ // error={true}
191
+ type: "email",
192
+ // inputRightIcon={<User color="#FF0000" />}
193
+ // onRightIconclick={() => {
194
+ // console.log("icon click");
195
+ // }}
196
+ // inputLeftIcon={<User color="#FF0000" />}
197
+ // onLeftIconClick={() => {
198
+ // console.log("icon click");
199
+ // }}
200
+ key: "input1",
201
+ // border={"0px solid"}
202
+ // padding={"0px"}
203
+ // inputStyle={{ border: "0px solid", padding: "0px" }}
204
+ // inputGroupStyle={{ border: "0px solid", padding: "0px" }}
205
+ // error={true}
206
+ // errorMessage="Required"
207
+ onChange: function (e) {
208
+ console.log(e.target.files);
209
+ }, onKeyDown: function () {
210
+ console.log("keydown");
211
+ }, onBlur: function () {
212
+ console.log("blur");
213
+ },
214
+ // helperText="sometibg"
215
+ isRequired: true, informationMessage: "This is information", isInformation: true,
216
+ // isDisabled
217
+ minW: "200px", maxW: "300px" })));
183
218
  };
184
219
  exports.default = SearchSelect;
@@ -172,6 +172,6 @@ var column = [
172
172
  ];
173
173
  var TableExample = function () {
174
174
  return (react_1.default.createElement("div", null,
175
- react_1.default.createElement(Table_1.default, { columns: column, data: tableData, isCheckbox: true, isVisiblity: false, isLoading: false, noBorders: false, onSelection: function (checked) { return console.log(checked); }, onRowClick: function (row, header) { return console.log(row, header); }, isPagination: false, isTableSettings: true, onGlobalSearch: function (value) { return console.log(value, "searched"); } })));
175
+ react_1.default.createElement(Table_1.default, { columns: column, data: tableData, isCheckbox: true, isVisiblity: false, isLoading: false, noBorders: false, onSelection: function (checked) { return console.log(checked); }, onRowClick: function (row, header) { return console.log(row, header); }, isPagination: false, isTableSettings: true, onGlobalSearch: function (value) { return console.log(value, "searched"); }, onColumnFilter: function (filters) { return console.log(filters, "all column filters"); } })));
176
176
  };
177
177
  exports.TableExample = TableExample;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelize-design-library",
3
- "version": "2.1.64",
3
+ "version": "2.1.65",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",