@codezee/sixtify-brahma 0.2.68 → 0.2.70
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/CellSelectionTable/CellSelectionTable.d.ts.map +1 -1
- package/packages/shared-components/dist/CellSelectionTable/CellSelectionTable.js +10 -4
- 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/Drawer/CloseDrawer/CloseDrawerMenuItemList.d.ts.map +1 -1
- package/packages/shared-components/dist/Drawer/CloseDrawer/CloseDrawerMenuItemList.js +3 -4
- package/packages/shared-components/dist/Drawer/CloseDrawer/CloseDrawerSubMenuItemList.d.ts.map +1 -1
- package/packages/shared-components/dist/Drawer/CloseDrawer/CloseDrawerSubMenuItemList.js +3 -1
- package/packages/shared-components/dist/FormFields/Autocomplete/Autocomplete.d.ts +4 -11
- package/packages/shared-components/dist/FormFields/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/Autocomplete/Autocomplete.js +11 -3
- 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/packages/shared-components/dist/Tooltip/Tooltip.d.ts +2 -1
- package/packages/shared-components/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/packages/shared-components/dist/Tooltip/Tooltip.js +2 -2
package/package.json
CHANGED
|
@@ -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");
|
|
@@ -21,6 +22,7 @@ const CellSelectionTable = ({ columns, data, onCellSelection, cellColors, height
|
|
|
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,10 +97,11 @@ 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", lockPinned = false, 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: {
|
|
99
101
|
...(lockPinned && {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
top: 0,
|
|
103
|
+
left: stickyMap.has(ci) ? stickyMap.get(ci) : 0,
|
|
104
|
+
zIndex: 10,
|
|
102
105
|
position: "sticky",
|
|
103
106
|
}),
|
|
104
107
|
backgroundColor: slate[700],
|
|
@@ -113,9 +116,12 @@ const CellSelectionTable = ({ columns, data, onCellSelection, cellColors, height
|
|
|
113
116
|
: (0, helper_1.getCellValue)(cell, "cellTooltip");
|
|
114
117
|
const getColor = (0, helper_1.getCellValue)(cell, "cellBackgroundConditionKey");
|
|
115
118
|
const cellActive = (0, helper_1.getCellValue)(cell, "cellActive");
|
|
119
|
+
const isSticky = stickyMap.has(ci);
|
|
120
|
+
const left = isSticky ? stickyMap.get(ci) : 0;
|
|
116
121
|
return ((0, jsx_runtime_1.jsx)(material_1.TableCell, { align: align, sx: {
|
|
117
122
|
...(lockPinned && {
|
|
118
|
-
|
|
123
|
+
top: 0,
|
|
124
|
+
left,
|
|
119
125
|
zIndex: 5,
|
|
120
126
|
position: "sticky",
|
|
121
127
|
}),
|
|
@@ -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 +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,4CAoF9B,CAAC"}
|
|
@@ -25,10 +25,9 @@ const CloseDrawerMenuItemList = ({ menuItems, currentPathname, }) => {
|
|
|
25
25
|
const handleClose = () => {
|
|
26
26
|
setAnchorEl(null);
|
|
27
27
|
};
|
|
28
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [menuItems
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [menuItems
|
|
29
|
+
.filter((item) => item.isView !== false)
|
|
30
|
+
.map((menuItem, i) => {
|
|
32
31
|
const { onClick, key: key1, icon, menuItems = [] } = menuItem;
|
|
33
32
|
const handleClick = (target) => {
|
|
34
33
|
if (onClick) {
|
package/packages/shared-components/dist/Drawer/CloseDrawer/CloseDrawerSubMenuItemList.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloseDrawerSubMenuItemList.d.ts","sourceRoot":"","sources":["../../../src/Drawer/CloseDrawer/CloseDrawerSubMenuItemList.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,WAAW,CAAC;AAI1C,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,GAAG,OAAO,CAAC;CACxC,CAAC;AAqFF,KAAK,+BAA+B,GAAG;IACrC,mBAAmB,EAAE,aAAa,CAAC;IACnC,eAAe,CAAC,EAAE,QAAQ,CAAC;IAC3B,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,+DAIxC,+BAA+B,
|
|
1
|
+
{"version":3,"file":"CloseDrawerSubMenuItemList.d.ts","sourceRoot":"","sources":["../../../src/Drawer/CloseDrawer/CloseDrawerSubMenuItemList.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,WAAW,CAAC;AAI1C,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,GAAG,OAAO,CAAC;CACxC,CAAC;AAqFF,KAAK,+BAA+B,GAAG;IACrC,mBAAmB,EAAE,aAAa,CAAC;IACnC,eAAe,CAAC,EAAE,QAAQ,CAAC;IAC3B,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,+DAIxC,+BAA+B,4CAsBjC,CAAC"}
|
|
@@ -38,6 +38,8 @@ const CloseDrawerSubMenuItemList = ({ currentPathMenuOpen, currentMenuItem, onCl
|
|
|
38
38
|
if (!currentMenuItem) {
|
|
39
39
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "Loading..." });
|
|
40
40
|
}
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(material_1.List, { disablePadding: true, children: currentMenuItem.menuItems
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(material_1.List, { disablePadding: true, children: currentMenuItem.menuItems
|
|
42
|
+
?.filter((item) => item.isView !== false)
|
|
43
|
+
.map((item) => ((0, jsx_runtime_1.jsx)(RecursiveMenuItem, { item: item, parentPath: `/${currentMenuItem.key}`, currentPathMenuOpen: currentPathMenuOpen[currentMenuItem.key] ?? {}, onCloseMenuPopover: onCloseMenuPopover }, item.key))) }));
|
|
42
44
|
};
|
|
43
45
|
exports.CloseDrawerSubMenuItemList = CloseDrawerSubMenuItemList;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AutocompleteProps as MuiAutocompleteProps } from "@mui/material";
|
|
1
|
+
import type { AutocompleteValue, AutocompleteProps as MuiAutocompleteProps } from "@mui/material";
|
|
2
2
|
import { type ControllerRenderProps, type FieldValues, type UseControllerProps } from "react-hook-form";
|
|
3
3
|
export type Option = {
|
|
4
4
|
heading?: string;
|
|
@@ -9,15 +9,7 @@ export type Option = {
|
|
|
9
9
|
avatar?: string;
|
|
10
10
|
punch_code?: string;
|
|
11
11
|
};
|
|
12
|
-
export type AutocompleteProps<P extends FieldValues> = UseControllerProps<P> & Omit<Omit<MuiAutocompleteProps<{
|
|
13
|
-
heading?: string;
|
|
14
|
-
label: string;
|
|
15
|
-
value: string | number;
|
|
16
|
-
disabled?: boolean;
|
|
17
|
-
avatar?: string;
|
|
18
|
-
employee_code?: string;
|
|
19
|
-
punch_code?: string;
|
|
20
|
-
}, boolean, boolean, boolean>, "renderInput">, keyof ControllerRenderProps<P>> & {
|
|
12
|
+
export type AutocompleteProps<P extends FieldValues> = UseControllerProps<P> & Omit<Omit<MuiAutocompleteProps<Option, boolean, boolean, boolean>, "renderInput">, keyof ControllerRenderProps<P>> & {
|
|
21
13
|
required?: boolean;
|
|
22
14
|
label?: string;
|
|
23
15
|
helperText?: string;
|
|
@@ -35,6 +27,7 @@ export type AutocompleteProps<P extends FieldValues> = UseControllerProps<P> & O
|
|
|
35
27
|
selected: boolean;
|
|
36
28
|
}) => JSX.Element;
|
|
37
29
|
getOptionLabel?: (option: string) => string;
|
|
30
|
+
defaultOption?: AutocompleteValue<Option, boolean, boolean, boolean>;
|
|
38
31
|
};
|
|
39
|
-
export declare function Autocomplete<P extends FieldValues>({ control, defaultValue, name, required, label, multiple, disabled, options, rules, loading, helperText, error, withLabel, placeholder, freeSolo, isShowOptionsOnType, isShowSelectAll, isShowAvatar, isShowEmployeeData, shouldCloseOnSelect, onAction, renderOption, getOptionLabel, maxLimit, ...restProps }: AutocompleteProps<P>): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function Autocomplete<P extends FieldValues>({ control, defaultValue, name, required, label, multiple, disabled, options, rules, loading, helperText, error, withLabel, placeholder, freeSolo, isShowOptionsOnType, isShowSelectAll, isShowAvatar, isShowEmployeeData, shouldCloseOnSelect, onAction, renderOption, getOptionLabel, maxLimit, defaultOption, ...restProps }: AutocompleteProps<P>): import("react/jsx-runtime").JSX.Element;
|
|
40
33
|
//# sourceMappingURL=Autocomplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/FormFields/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/FormFields/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,IAAI,oBAAoB,EAC1C,MAAM,eAAe,CAAC;AAmBvB,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACxB,MAAM,iBAAiB,CAAC;AAOzB,MAAM,MAAM,MAAM,GAAG;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,WAAW,IAAI,kBAAkB,CAAC,CAAC,CAAC,GAC1E,IAAI,CACF,IAAI,CACF,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EACvD,aAAa,CACd,EACD,MAAM,qBAAqB,CAAC,CAAC,CAAC,CAC/B,GAAG;IACF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,CACb,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC,EACrC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,KACzB,GAAG,CAAC,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5C,aAAa,CAAC,EAAE,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;CACtE,CAAC;AAEJ,wBAAgB,YAAY,CAAC,CAAC,SAAS,WAAW,EAAE,EAClD,OAAO,EACP,YAAY,EACZ,IAAI,EACJ,QAAgB,EAChB,KAAK,EACL,QAAgB,EAChB,QAAgB,EAChB,OAAY,EACZ,KAAK,EACL,OAAe,EACf,UAAU,EACV,KAAK,EACL,SAAiB,EACjB,WAAgB,EAChB,QAAQ,EACR,mBAA2B,EAC3B,eAAsB,EACtB,YAAoB,EACpB,kBAA0B,EAC1B,mBAA2B,EAC3B,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,aAAa,EACb,GAAG,SAAS,EACb,EAAE,iBAAiB,CAAC,CAAC,CAAC,2CA+XtB"}
|
|
@@ -11,8 +11,13 @@ const Actions_1 = require("../../Actions");
|
|
|
11
11
|
const Toast_1 = require("../../Toast");
|
|
12
12
|
const CheckBox_styled_1 = require("../CheckBox/CheckBox.styled");
|
|
13
13
|
const Skeleton_1 = require("./Skeleton");
|
|
14
|
-
function Autocomplete({ control, defaultValue, name, required = false, label, multiple = false, disabled = false, options = [], rules, loading = false, helperText, error, withLabel = false, placeholder = "", freeSolo, isShowOptionsOnType = false, isShowSelectAll = true, isShowAvatar = false, isShowEmployeeData = false, shouldCloseOnSelect = false, onAction, renderOption, getOptionLabel, maxLimit, ...restProps }) {
|
|
15
|
-
const { field: { onChange, value, ...restField }, } = (0, react_hook_form_1.useController)({
|
|
14
|
+
function Autocomplete({ control, defaultValue, name, required = false, label, multiple = false, disabled = false, options = [], rules, loading = false, helperText, error, withLabel = false, placeholder = "", freeSolo, isShowOptionsOnType = false, isShowSelectAll = true, isShowAvatar = false, isShowEmployeeData = false, shouldCloseOnSelect = false, onAction, renderOption, getOptionLabel, maxLimit, defaultOption, ...restProps }) {
|
|
15
|
+
const { field: { onChange, value, ...restField }, } = (0, react_hook_form_1.useController)({
|
|
16
|
+
name,
|
|
17
|
+
control,
|
|
18
|
+
defaultValue,
|
|
19
|
+
rules,
|
|
20
|
+
});
|
|
16
21
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
17
22
|
const [inputValue, setInputValue] = (0, react_1.useState)("");
|
|
18
23
|
const handleSelectAll = (isSelected) => {
|
|
@@ -62,8 +67,11 @@ function Autocomplete({ control, defaultValue, name, required = false, label, mu
|
|
|
62
67
|
else if (!options.find((option) => option.value === value) && freeSolo) {
|
|
63
68
|
return value;
|
|
64
69
|
}
|
|
70
|
+
else if (defaultOption) {
|
|
71
|
+
return defaultOption;
|
|
72
|
+
}
|
|
65
73
|
return options.find((option) => option.value === value) || null;
|
|
66
|
-
}, [multiple, options, value]);
|
|
74
|
+
}, [multiple, options, value, defaultOption]);
|
|
67
75
|
const { palette: { app: { color }, }, } = (0, material_1.useTheme)();
|
|
68
76
|
const StyledPaper = (0, styles_1.styled)(material_1.Paper)(({ theme }) => ({
|
|
69
77
|
"& .MuiAutocomplete-listbox": {
|
|
@@ -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);
|
|
@@ -3,7 +3,8 @@ import type { PropsWithChildren, ReactNode } from "react";
|
|
|
3
3
|
type TooltipProps = PropsWithChildren<{
|
|
4
4
|
toolTipLabel: ReactNode;
|
|
5
5
|
placement?: MuiTooltipProps["placement"];
|
|
6
|
+
hidden?: MuiTooltipProps["hidden"];
|
|
6
7
|
}>;
|
|
7
|
-
export declare const Tooltip: ({ toolTipLabel, children, placement, ...rest }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const Tooltip: ({ toolTipLabel, children, placement, hidden, ...rest }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
9
10
|
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAErE,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1D,KAAK,YAAY,GAAG,iBAAiB,CAAC;IACpC,YAAY,EAAE,SAAS,CAAC;IACxB,SAAS,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAErE,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1D,KAAK,YAAY,GAAG,iBAAiB,CAAC;IACpC,YAAY,EAAE,SAAS,CAAC;IACxB,SAAS,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;IACzC,MAAM,CAAC,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;CACpC,CAAC,CAAC;AAEH,eAAO,MAAM,OAAO,GAAI,wDAMrB,YAAY,4CA2Bd,CAAC"}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Tooltip = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
|
-
const Tooltip = ({ toolTipLabel, children, placement = "top-start", ...rest }) => {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { arrow: true, placement: placement, title: toolTipLabel, ...rest, children: typeof children === "string" ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, sx: {
|
|
6
|
+
const Tooltip = ({ toolTipLabel, children, placement = "top-start", hidden = false, ...rest }) => {
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { arrow: true, placement: placement, title: toolTipLabel, hidden: hidden, ...rest, children: typeof children === "string" ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, sx: {
|
|
8
8
|
maxWidth: "150px",
|
|
9
9
|
overflow: "hidden",
|
|
10
10
|
textOverflow: "ellipsis",
|