@codezee/sixtify-brahma 0.2.69 → 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/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/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":"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,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
|
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": {
|
|
@@ -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",
|