@codezee/sixtify-brahma 0.2.188 → 0.2.190
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 +2 -1
- package/packages/shared-components/dist/FormFields/Autocomplete/Autocomplete.d.ts +2 -2
- package/packages/shared-components/dist/FormFields/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/Autocomplete/Skeleton.d.ts +2 -1
- package/packages/shared-components/dist/FormFields/Autocomplete/Skeleton.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/DatePicker/DatePicker.d.ts +2 -1
- package/packages/shared-components/dist/FormFields/DatePicker/DatePicker.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/DatePicker/Skeleton.d.ts +2 -1
- package/packages/shared-components/dist/FormFields/DatePicker/Skeleton.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/DateTimePicker/DateTimePicker.d.ts +2 -1
- package/packages/shared-components/dist/FormFields/DateTimePicker/DateTimePicker.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/DateTimePicker/Skeleton.d.ts +2 -1
- package/packages/shared-components/dist/FormFields/DateTimePicker/Skeleton.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/DecimalTextField/DecimalTextField.d.ts +2 -1
- package/packages/shared-components/dist/FormFields/DecimalTextField/DecimalTextField.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/FileUpload/FileNames.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/FileUpload/FileNames.js +2 -1
- package/packages/shared-components/dist/FormFields/ImageUpload/ImageUpload.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/ImageUpload/ImageUpload.js +24 -6
- package/packages/shared-components/dist/FormFields/ImageUpload/ImageUpload.styled.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/ImageUpload/ImageUpload.styled.js +3 -2
- package/packages/shared-components/dist/FormFields/PhoneInputField/PhoneInputField.d.ts +3 -1
- package/packages/shared-components/dist/FormFields/PhoneInputField/PhoneInputField.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/PhoneInputField/PhoneInputField.js +5 -30
- package/packages/shared-components/dist/FormFields/PhoneInputField/PhoneInputField.styled.d.ts +10 -0
- package/packages/shared-components/dist/FormFields/PhoneInputField/PhoneInputField.styled.d.ts.map +1 -0
- package/packages/shared-components/dist/FormFields/PhoneInputField/PhoneInputField.styled.js +214 -0
- package/packages/shared-components/dist/FormFields/PhoneInputField/Skeleton.d.ts +3 -1
- package/packages/shared-components/dist/FormFields/PhoneInputField/Skeleton.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/PhoneInputField/Skeleton.js +2 -2
- package/packages/shared-components/dist/FormFields/RadioGroupField/RadioGroupField.d.ts +2 -1
- package/packages/shared-components/dist/FormFields/RadioGroupField/RadioGroupField.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/RadioGroupField/RadioGroupField.js +24 -16
- package/packages/shared-components/dist/FormFields/Select/Select.d.ts +2 -2
- package/packages/shared-components/dist/FormFields/Select/Select.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/Select/Select.styled.js +1 -1
- package/packages/shared-components/dist/FormFields/TextField/Skeleton.d.ts +2 -1
- package/packages/shared-components/dist/FormFields/TextField/Skeleton.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/TextField/TextField.d.ts +2 -1
- package/packages/shared-components/dist/FormFields/TextField/TextField.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/TimeField/Skeleton.d.ts +2 -1
- package/packages/shared-components/dist/FormFields/TimeField/Skeleton.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/TimeField/TimeField.d.ts +2 -1
- package/packages/shared-components/dist/FormFields/TimeField/TimeField.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/TimePicker/Skeleton.d.ts +2 -1
- package/packages/shared-components/dist/FormFields/TimePicker/Skeleton.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/TimePicker/TimePicker.d.ts +2 -1
- package/packages/shared-components/dist/FormFields/TimePicker/TimePicker.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/CellRenderer.d.ts +2 -1
- package/packages/shared-components/dist/SmartGrid/Components/CellRenderer.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/CellRenderer.js +12 -11
- package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/FacetedFilter.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/FacetedFilter.js +17 -34
- package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/VirtualCheckboxList.d.ts +2 -2
- package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/VirtualCheckboxList.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/VirtualCheckboxList.js +21 -5
- package/packages/shared-components/dist/SmartGrid/Components/FilterStatusPanel.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/FilterStatusPanel.js +13 -6
- package/packages/shared-components/dist/SmartGrid/Components/Grouped/GroupAreaOverlay.d.ts +10 -0
- package/packages/shared-components/dist/SmartGrid/Components/Grouped/GroupAreaOverlay.d.ts.map +1 -0
- package/packages/shared-components/dist/SmartGrid/Components/Grouped/GroupAreaOverlay.js +82 -0
- package/packages/shared-components/dist/SmartGrid/Components/Grouped/GroupChip.d.ts +10 -0
- package/packages/shared-components/dist/SmartGrid/Components/Grouped/GroupChip.d.ts.map +1 -0
- package/packages/shared-components/dist/SmartGrid/Components/Grouped/GroupChip.js +73 -0
- package/packages/shared-components/dist/SmartGrid/Components/Grouped/GroupedColumn.d.ts +8 -0
- package/packages/shared-components/dist/SmartGrid/Components/Grouped/GroupedColumn.d.ts.map +1 -0
- package/packages/shared-components/dist/SmartGrid/Components/Grouped/GroupedColumn.js +64 -0
- package/packages/shared-components/dist/SmartGrid/Components/Grouped/GroupedPanel.d.ts +10 -0
- package/packages/shared-components/dist/SmartGrid/Components/Grouped/GroupedPanel.d.ts.map +1 -0
- package/packages/shared-components/dist/SmartGrid/Components/Grouped/GroupedPanel.js +53 -0
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderCell.d.ts +2 -1
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderCell.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderCell.js +2 -2
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderGroupRows.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderGroupRows.js +12 -8
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/HeaderCell.d.ts +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/HeaderCell.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/HeaderCell.js +47 -27
- package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/DateRangeInput/DateRangeInput.js +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/DateRangeInput/StyleDateRangeWrapper.js +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/GetRenderInputs.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/SearchFilterRow.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/TableFooterComponent/TableFooterComponent.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/TableRowComponent.d.ts +3 -2
- package/packages/shared-components/dist/SmartGrid/Components/TableRowComponent.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/TableRowComponent.js +75 -57
- package/packages/shared-components/dist/SmartGrid/SmartGrid.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/SmartGrid.js +103 -47
- package/packages/shared-components/dist/SmartGrid/hooks/useGetColumnWidth.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/hooks/useGetFacetedFilter.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/hooks/useGetGroupedColumn.d.ts +18 -6
- package/packages/shared-components/dist/SmartGrid/hooks/useGetGroupedColumn.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/hooks/useGetGroupedColumn.js +160 -6
- package/packages/shared-components/dist/SmartGrid/hooks/useGetPinningColumns.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/hooks/useGetRowSelection.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/hooks/useGetSortedColumn.d.ts +1 -1
- package/packages/shared-components/dist/SmartGrid/hooks/useGetSortedColumn.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/hooks/useGetSortedColumn.js +1 -2
- package/packages/shared-components/dist/SmartGrid/hooks/useProcessColumnsForGroupDisplay.d.ts +11 -0
- package/packages/shared-components/dist/SmartGrid/hooks/useProcessColumnsForGroupDisplay.d.ts.map +1 -0
- package/packages/shared-components/dist/SmartGrid/hooks/useProcessColumnsForGroupDisplay.js +30 -0
- package/packages/shared-components/dist/SmartGrid/hooks/useTableState.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/hooks/useTableState.js +51 -4
- package/packages/shared-components/dist/SmartGrid/utils/helper.d.ts +1 -0
- package/packages/shared-components/dist/SmartGrid/utils/helper.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/utils/helper.js +7 -5
- package/packages/shared-components/dist/TabBar/Tab.d.ts.map +1 -1
- package/packages/shared-components/dist/TabBar/Tab.js +1 -1
- package/packages/shared-components/dist/UserProfileMenu/UserProfileMenu.styled.d.ts.map +1 -1
- package/packages/shared-components/dist/UserProfileMenu/UserProfileMenu.styled.js +2 -1
- package/packages/shared-components/dist/utils/theme/colorPalette.js +3 -3
- package/packages/shared-components/dist/utils/types.d.ts +1 -0
- package/packages/shared-components/dist/utils/types.d.ts.map +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { Styling } from "../../utils/types";
|
|
1
2
|
type SkeletonProps = {
|
|
2
3
|
rows?: number;
|
|
3
4
|
label?: string;
|
|
5
|
+
styling: Styling;
|
|
4
6
|
};
|
|
5
|
-
export declare const Skeleton: ({ rows, label }: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const Skeleton: ({ rows, label, styling }: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
export {};
|
|
7
9
|
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/FormFields/PhoneInputField/Skeleton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/FormFields/PhoneInputField/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,KAAK,aAAa,GAAG;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,0BAA0B,aAAa,4CAuB/D,CAAC"}
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Skeleton = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
|
-
const Skeleton = ({ rows, label }) => {
|
|
6
|
+
const Skeleton = ({ rows, label, styling }) => {
|
|
7
7
|
const height = rows === undefined ? 35.69 : rows * 26.5;
|
|
8
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px", children: [label && ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 120, height: "18.69px", sx: {
|
|
8
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px", children: [label && styling === "custom" && ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 120, height: "18.69px", sx: {
|
|
9
9
|
transform: "scale(1)",
|
|
10
10
|
} })), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { height: `${height}px`, sx: {
|
|
11
11
|
transform: "scale(1)",
|
|
@@ -19,7 +19,8 @@ export type RadioGroupFieldProps<P extends FieldValues> = UseControllerProps<P>
|
|
|
19
19
|
isHorizontal?: boolean;
|
|
20
20
|
containerProps?: StackProps;
|
|
21
21
|
navigationKey?: NavigationKey;
|
|
22
|
+
customOnChange?: (selected: Options) => void;
|
|
22
23
|
};
|
|
23
|
-
export declare function RadioGroupField<P extends FieldValues>({ name, rules, label, control, options, defaultValue, size, color, loading, required, direction, sx, containerProps, isHorizontal, navigationKey, ...restRadioButtonProps }: RadioGroupFieldProps<P>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function RadioGroupField<P extends FieldValues>({ name, rules, label, control, options, defaultValue, size, color, loading, required, direction, sx, containerProps, isHorizontal, navigationKey, customOnChange, ...restRadioButtonProps }: RadioGroupFieldProps<P>): import("react/jsx-runtime").JSX.Element;
|
|
24
25
|
export {};
|
|
25
26
|
//# sourceMappingURL=RadioGroupField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupField.d.ts","sourceRoot":"","sources":["../../../src/FormFields/RadioGroupField/RadioGroupField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,OAAO,EACb,MAAM,eAAe,CAAC;AACvB,OAAc,EAAE,KAAK,UAAU,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KA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radio_1 = __importDefault(require("@mui/material/Radio"));
|
|
|
10
10
|
const react_hook_form_1 = require("react-hook-form");
|
|
11
11
|
const useFormFieldFocus_1 = require("../../utils/hooks/useFormFieldFocus");
|
|
12
12
|
const Skeleton_1 = require("./Skeleton");
|
|
13
|
-
function RadioGroupField({ name, rules, label, control, options, defaultValue, size = "small", color = "secondary", loading = false, required = false, direction = "row", sx = {}, containerProps, isHorizontal = false, navigationKey = "tab", ...restRadioButtonProps }) {
|
|
13
|
+
function RadioGroupField({ name, rules, label, control, options, defaultValue, size = "small", color = "secondary", loading = false, required = false, direction = "row", sx = {}, containerProps, isHorizontal = false, navigationKey = "tab", customOnChange, ...restRadioButtonProps }) {
|
|
14
14
|
const { field: { value, onChange, ref, ...restField }, } = (0, react_hook_form_1.useController)({ name, control, defaultValue, rules });
|
|
15
15
|
const { inputRef, handleKeyDown: handleNavigationKeyDown, maintainFocus, } = (0, useFormFieldFocus_1.useFormFieldFocus)({ navigationKey });
|
|
16
16
|
const handleKeyDown = (event) => {
|
|
17
17
|
handleNavigationKeyDown(event, undefined, false);
|
|
18
18
|
};
|
|
19
|
-
const handleRadioChange = (event) => {
|
|
20
|
-
const newValue = event.target.value;
|
|
21
|
-
if (newValue === "true") {
|
|
22
|
-
onChange(true);
|
|
23
|
-
}
|
|
24
|
-
else if (newValue === "false") {
|
|
25
|
-
onChange(false);
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
onChange(newValue);
|
|
29
|
-
}
|
|
30
|
-
maintainFocus();
|
|
31
|
-
};
|
|
32
19
|
if (loading) {
|
|
33
20
|
return (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, {});
|
|
34
21
|
}
|
|
@@ -36,10 +23,31 @@ function RadioGroupField({ name, rules, label, control, options, defaultValue, s
|
|
|
36
23
|
whiteSpace: "normal",
|
|
37
24
|
overflow: "visible",
|
|
38
25
|
textOverflow: "unset",
|
|
39
|
-
}, required: required, disabled: restRadioButtonProps.disabled, children: label })), (0, jsx_runtime_1.jsx)(material_1.RadioGroup, { name: name, value: value,
|
|
26
|
+
}, required: required, disabled: restRadioButtonProps.disabled, children: label })), (0, jsx_runtime_1.jsx)(material_1.RadioGroup, { name: name, value: value, onKeyDown: handleKeyDown, onChange: (_, event) => {
|
|
27
|
+
let selectedValue;
|
|
28
|
+
if (event === "true") {
|
|
29
|
+
selectedValue = true;
|
|
30
|
+
onChange(true);
|
|
31
|
+
}
|
|
32
|
+
else if (event === "false") {
|
|
33
|
+
selectedValue = false;
|
|
34
|
+
onChange(false);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
selectedValue = event;
|
|
38
|
+
onChange(event);
|
|
39
|
+
}
|
|
40
|
+
if (customOnChange) {
|
|
41
|
+
const selectedOption = options.find(({ values }) => values === selectedValue);
|
|
42
|
+
if (selectedOption) {
|
|
43
|
+
customOnChange(selectedOption);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
maintainFocus();
|
|
47
|
+
}, children: (0, jsx_runtime_1.jsx)(material_1.Stack, { gap: direction === "column" ? "5px" : "10px", direction: direction, ...containerProps, children: options?.map(({ label, values, disabled }, index) => {
|
|
40
48
|
return (
|
|
41
49
|
// eslint-disable-next-line sonarjs/no-array-index-key
|
|
42
|
-
(0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: values, control: (0, jsx_runtime_1.jsx)(Radio_1.default, { ...restField, ...restRadioButtonProps, color: color, size: size, inputRef: (el) => {
|
|
50
|
+
(0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: values, control: (0, jsx_runtime_1.jsx)(Radio_1.default, { ...restField, ...restRadioButtonProps, tabIndex: -1, color: color, size: size, inputRef: (el) => {
|
|
43
51
|
if (el && !inputRef.current) {
|
|
44
52
|
inputRef.current = el;
|
|
45
53
|
if (ref) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SelectProps as MuiSelectProps } from "@mui/material";
|
|
2
2
|
import { type ControllerRenderProps, type FieldValues, type UseControllerProps } from "react-hook-form";
|
|
3
3
|
import { type NavigationKey } from "../../utils/hooks/useFormFieldFocus";
|
|
4
|
-
import type { OnAction } from "../../utils/types";
|
|
4
|
+
import type { OnAction, Styling } from "../../utils/types";
|
|
5
5
|
export type SelectOption = {
|
|
6
6
|
heading?: string;
|
|
7
7
|
label: string;
|
|
@@ -28,7 +28,7 @@ export type SelectProps<P extends FieldValues> = UseControllerProps<P> & Omit<Mu
|
|
|
28
28
|
maxDisplayItems?: number;
|
|
29
29
|
disableClearable?: boolean;
|
|
30
30
|
setOnFinalChange?: boolean;
|
|
31
|
-
styling?:
|
|
31
|
+
styling?: Styling;
|
|
32
32
|
navigationKey?: NavigationKey;
|
|
33
33
|
};
|
|
34
34
|
export declare function Select<P extends FieldValues>({ control, defaultValue, name, required, label, multiple, disabled, options, rules, loading, helperText, error, placeholder, isShowSelectAll, isShowAvatar, onAction, renderOption, maxLimit, maxDisplayItems, disableClearable, setOnFinalChange, styling, navigationKey, ...restProps }: SelectProps<P>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/FormFields/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AAmBnE,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACxB,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/FormFields/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,IAAI,c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AAM,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,KAAK,GAAG,CAAC,OAAO,CAAC;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEJ,wBAAgB,MAAM,CAAC,CAAC,SAAS,WAAW,EAAE,EAC5C,OAAO,EACP,YAAY,EACZ,IAAI,EACJ,QAAgB,EAChB,KAAK,EACL,QAAgB,EAChB,QAAgB,EAChB,OAAY,EACZ,KAAK,EACL,OAAe,EACf,UAAU,EACV,KAAK,EACL,WAAgB,EAChB,eAAsB,EACtB,YAAoB,EACpB,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,eAAmB,EACnB,gBAA0C,EAC1C,gBAAwB,EACxB,OAAkB,EAClB,aAAqB,EACrB,GAAG,SAAS,EACb,EAAE,WAAW,CAAC,CAAC,CAAC,2CAkfhB"}
|
|
@@ -35,7 +35,7 @@ exports.GroupHeader = (0, styles_1.styled)(material_1.Typography)(({ theme, }) =
|
|
|
35
35
|
position: "sticky",
|
|
36
36
|
top: 0,
|
|
37
37
|
padding: "8px 16px",
|
|
38
|
-
fontSize: "
|
|
38
|
+
fontSize: "13px",
|
|
39
39
|
fontWeight: 600,
|
|
40
40
|
color: butterflyBlue[900],
|
|
41
41
|
backgroundColor: butterflyBlue[500],
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { Styling } from "../../utils/types";
|
|
1
2
|
type SkeletonProps = {
|
|
2
3
|
rows?: number;
|
|
3
4
|
label?: string;
|
|
4
|
-
styling:
|
|
5
|
+
styling: Styling;
|
|
5
6
|
};
|
|
6
7
|
export declare const Skeleton: ({ rows, label, styling }: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/FormFields/TextField/Skeleton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/FormFields/TextField/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,KAAK,aAAa,GAAG;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,0BAA0B,aAAa,4CAuB/D,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { type TextFieldProps as MuiTextFieldProps, type StackProps } from "@mui/
|
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
3
|
import { type ControllerRenderProps, type FieldError, type FieldValues, type UseControllerProps } from "react-hook-form";
|
|
4
4
|
import { type NavigationKey } from "../../utils/hooks/useFormFieldFocus";
|
|
5
|
+
import type { Styling } from "../../utils/types";
|
|
5
6
|
export type AllowedCharacterType = "string" | "string-number" | "string-number-special" | "string-special" | "string-special-all" | "custom";
|
|
6
7
|
export type LetterCase = "uppercase" | "lowercase" | "mixed";
|
|
7
8
|
export type TextFieldProps<P extends FieldValues> = UseControllerProps<P> & Omit<MuiTextFieldProps, keyof ControllerRenderProps<P>> & {
|
|
@@ -16,7 +17,7 @@ export type TextFieldProps<P extends FieldValues> = UseControllerProps<P> & Omit
|
|
|
16
17
|
message?: string;
|
|
17
18
|
}) => void;
|
|
18
19
|
containerProps?: StackProps;
|
|
19
|
-
styling?:
|
|
20
|
+
styling?: Styling;
|
|
20
21
|
infoMessage?: ReactNode;
|
|
21
22
|
characterType?: AllowedCharacterType;
|
|
22
23
|
regexExpression?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/FormFields/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,IAAI,iBAAiB,EACxC,KAAK,UAAU,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACxB,MAAM,iBAAiB,CAAC;AAKzB,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/FormFields/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,IAAI,iBAAiB,EACxC,KAAK,UAAU,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACxB,MAAM,iBAAiB,CAAC;AAKzB,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,qCAAqC,CAAC;AAM7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,MAAM,oBAAoB,GAC5B,QAAQ,GACR,eAAe,GACf,uBAAuB,GACvB,gBAAgB,GAChB,oBAAoB,GACpB,QAAQ,CAAC;AAEb,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,OAAO,CAAC;AAY7D,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,WAAW,IAAI,kBAAkB,CAAC,CAAC,CAAC,GACvE,IAAI,CAAC,iBAAiB,EAAE,MAAM,qBAAqB,CAAC,CAAC,CAAC,CAAC,GAAG;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,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
+
styling: Styling;
|
|
4
5
|
};
|
|
5
6
|
export declare const Skeleton: ({ label, styling }: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/FormFields/TimeField/Skeleton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/FormFields/TimeField/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,KAAK,aAAa,GAAG;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,oBAAoB,aAAa,4CAqBzD,CAAC"}
|
|
@@ -2,6 +2,7 @@ import type { PickerValidDate } from "@mui/x-date-pickers/models";
|
|
|
2
2
|
import { type TimeFieldProps as MuiTimeFieldProps } from "@mui/x-date-pickers/TimeField";
|
|
3
3
|
import type { FieldValues, UseControllerProps } from "react-hook-form";
|
|
4
4
|
import { type NavigationKey } from "../../utils/hooks/useFormFieldFocus";
|
|
5
|
+
import type { Styling } from "../../utils/types";
|
|
5
6
|
export type TimeFieldProps<P extends FieldValues> = UseControllerProps<P> & MuiTimeFieldProps<PickerValidDate> & Partial<{
|
|
6
7
|
label: string;
|
|
7
8
|
required: boolean;
|
|
@@ -12,7 +13,7 @@ export type TimeFieldProps<P extends FieldValues> = UseControllerProps<P> & MuiT
|
|
|
12
13
|
format: string;
|
|
13
14
|
isReturnLocalTime: boolean;
|
|
14
15
|
isReturnDateWithTime: boolean;
|
|
15
|
-
styling?:
|
|
16
|
+
styling?: Styling;
|
|
16
17
|
navigationKey?: NavigationKey;
|
|
17
18
|
}>;
|
|
18
19
|
export declare function TimeField<P extends FieldValues>({ control, defaultValue, disabled, label, name, error, helperText, loading, required, rules, format, isReturnLocalTime, isReturnDateWithTime, styling, navigationKey, ...restProps }: TimeFieldProps<P>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeField.d.ts","sourceRoot":"","sources":["../../../src/FormFields/TimeField/TimeField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAEL,KAAK,cAAc,IAAI,iBAAiB,EACzC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EACV,WAAW,EAGX,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"TimeField.d.ts","sourceRoot":"","sources":["../../../src/FormFields/TimeField/TimeField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAEL,KAAK,cAAc,IAAI,iBAAiB,EACzC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EACV,WAAW,EAGX,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,qCAAqC,CAAC;AAM7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,WAAW,IAAI,kBAAkB,CAAC,CAAC,CAAC,GACvE,iBAAiB,CAAC,eAAe,CAAC,GAClC,OAAO,CAAC;IACN,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,OAAO,CAAC;IAC3B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC,CAAC;AAEL,wBAAgB,SAAS,CAAC,CAAC,SAAS,WAAW,EAAE,EAC/C,OAAO,EACP,YAAY,EACZ,QAAgB,EAChB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,UAAU,EACV,OAAe,EACf,QAAgB,EAChB,KAAK,EACL,MAAgB,EAChB,iBAAyB,EACzB,oBAA4B,EAC5B,OAAkB,EAClB,aAAqB,EACrB,GAAG,SAAS,EACb,EAAE,cAAc,CAAC,CAAC,CAAC,2CAgGnB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { Styling } from "../../utils/types";
|
|
1
2
|
type SkeletonProps = {
|
|
2
3
|
label?: string;
|
|
3
|
-
styling:
|
|
4
|
+
styling: Styling;
|
|
4
5
|
};
|
|
5
6
|
export declare const Skeleton: ({ label, styling }: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/FormFields/TimePicker/Skeleton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/FormFields/TimePicker/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,KAAK,aAAa,GAAG;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,oBAAoB,aAAa,4CAqBzD,CAAC"}
|
|
@@ -4,6 +4,7 @@ import type { PickerValidDate } from "@mui/x-date-pickers/models";
|
|
|
4
4
|
import { type ReactElement } from "react";
|
|
5
5
|
import type { FieldValues, UseControllerProps } from "react-hook-form";
|
|
6
6
|
import { type NavigationKey } from "../../utils/hooks/useFormFieldFocus";
|
|
7
|
+
import type { Styling } from "../../utils/types";
|
|
7
8
|
export type TimePickerProps<P extends FieldValues> = UseControllerProps<P> & MuiTimePickerProps<PickerValidDate> & Partial<{
|
|
8
9
|
label: string;
|
|
9
10
|
required: boolean;
|
|
@@ -18,7 +19,7 @@ export type TimePickerProps<P extends FieldValues> = UseControllerProps<P> & Mui
|
|
|
18
19
|
toolTipText?: string;
|
|
19
20
|
timeStepsMinutes?: number;
|
|
20
21
|
containerProps?: StackProps;
|
|
21
|
-
styling?:
|
|
22
|
+
styling?: Styling;
|
|
22
23
|
navigationKey?: NavigationKey;
|
|
23
24
|
}>;
|
|
24
25
|
export declare function TimePicker<P extends FieldValues>({ control, defaultValue, disabled, label, readOnly, name, error, helperText, loading, required, rules, format, isReturnLocalTime, isReturnDateWithTime, timeStepsMinutes, helperIcon, toolTipText, containerProps, styling, navigationKey, ...restProps }: TimePickerProps<P>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../src/FormFields/TimePicker/TimePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,eAAe,IAAI,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAE5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,EACV,WAAW,EAGX,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../src/FormFields/TimePicker/TimePicker.tsx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U,EACV,OAAe,EACf,QAAgB,EAChB,KAAK,EACL,MAAgB,EAChB,iBAAyB,EACzB,oBAA4B,EAC5B,gBAAoB,EACpB,UAAU,EACV,WAAW,EACX,cAAc,EACd,OAAkB,EAClB,aAAqB,EACrB,GAAG,SAAS,EACb,EAAE,eAAe,CAAC,CAAC,CAAC,2CAwMpB"}
|
|
@@ -5,7 +5,8 @@ type CellRendererProps<T> = {
|
|
|
5
5
|
isSummaryRow: boolean;
|
|
6
6
|
row: Row<T>;
|
|
7
7
|
summaryData?: SummaryRecord<T>;
|
|
8
|
+
isGroupColumn?: boolean;
|
|
8
9
|
};
|
|
9
|
-
export declare const CellRenderer: <T>({ cell, isSummaryRow, row, summaryData, }: CellRendererProps<T>) => string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode> | Promise<import("react").AwaitedReactNode> | null | undefined;
|
|
10
|
+
export declare const CellRenderer: <T>({ cell, isSummaryRow, row, summaryData, isGroupColumn, }: CellRendererProps<T>) => string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode> | Promise<import("react").AwaitedReactNode> | null | undefined;
|
|
10
11
|
export {};
|
|
11
12
|
//# sourceMappingURL=CellRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CellRenderer.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/Components/CellRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CellRenderer.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/Components/CellRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,KAAK,iBAAiB,CAAC,CAAC,IAAI;IAC1B,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IACZ,WAAW,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,EAAG,0DAM9B,iBAAiB,CAAC,CAAC,CAAC,sLA8DtB,CAAC"}
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CellRenderer = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
/* eslint-disable sonarjs/function-return-type */
|
|
6
|
-
const icons_material_1 = require("@mui/icons-material");
|
|
7
|
-
const material_1 = require("@mui/material");
|
|
8
5
|
const react_table_1 = require("@tanstack/react-table");
|
|
9
|
-
const
|
|
6
|
+
const GroupedColumn_1 = require("./Grouped/GroupedColumn");
|
|
7
|
+
const CellRenderer = ({ cell, isSummaryRow, row, summaryData, isGroupColumn = false, }) => {
|
|
10
8
|
const renderSummaryCell = (cell) => {
|
|
11
9
|
const columnId = cell.column.id;
|
|
12
10
|
const summaryValue = summaryData?.[columnId];
|
|
@@ -18,24 +16,27 @@ const CellRenderer = ({ cell, isSummaryRow, row, summaryData, }) => {
|
|
|
18
16
|
}
|
|
19
17
|
return null;
|
|
20
18
|
};
|
|
21
|
-
const renderGroupedHeaderCell = (cell) => {
|
|
22
|
-
if (!cell.getIsGrouped()) {
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Button, { variant: "text", onClick: row.getToggleExpandedHandler(), startIcon: row.getIsExpanded() ? ((0, jsx_runtime_1.jsx)(icons_material_1.ExpandMore, { color: "primary" })) : ((0, jsx_runtime_1.jsx)(icons_material_1.ChevronRight, { color: "primary" })), sx: { textTransform: "none" }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: "13px", children: String(row.getGroupingValue(row.groupingColumnId ?? "") ?? "") }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { fontSize: "13px", children: ["(", row.subRows.length, ")"] })] }));
|
|
26
|
-
};
|
|
27
19
|
// Handle summary rows
|
|
28
20
|
if (isSummaryRow) {
|
|
21
|
+
if (isGroupColumn) {
|
|
22
|
+
return "Total";
|
|
23
|
+
}
|
|
29
24
|
return renderSummaryCell(cell);
|
|
30
25
|
}
|
|
26
|
+
// Group column mode - show grouping information
|
|
27
|
+
if (isGroupColumn) {
|
|
28
|
+
return (0, jsx_runtime_1.jsx)(GroupedColumn_1.GroupedColumn, { row: row, isSummaryRow: isSummaryRow });
|
|
29
|
+
}
|
|
31
30
|
// Regular row rendering
|
|
32
31
|
// If this is a grouped header row, hide all non-grouping cells explicitly
|
|
33
32
|
// to avoid TanStack's auto-aggregated values appearing in the header row.
|
|
34
33
|
if (row.getIsGrouped() && !cell.getIsGrouped()) {
|
|
34
|
+
// Grouped rows should only show content in the group column
|
|
35
|
+
// All other columns should be empty for grouped rows
|
|
35
36
|
return null;
|
|
36
37
|
}
|
|
37
38
|
if (cell.getIsGrouped()) {
|
|
38
|
-
return
|
|
39
|
+
return (0, jsx_runtime_1.jsx)(GroupedColumn_1.GroupedColumn, { row: row, isSummaryRow: isSummaryRow });
|
|
39
40
|
}
|
|
40
41
|
if (cell.getIsAggregated()) {
|
|
41
42
|
// Only render if a custom aggregatedCell is explicitly provided.
|
package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/FacetedFilter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FacetedFilter.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/FacetedFilter/FacetedFilter.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FacetedFilter.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/FacetedFilter/FacetedFilter.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AASpD,KAAK,kBAAkB,CAAC,CAAC,IAAI;IAC3B,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,CAAC,EAAG,8BAG/B,kBAAkB,CAAC,CAAC,CAAC,4CAuUvB,CAAC"}
|
|
@@ -7,7 +7,6 @@ const material_1 = require("@mui/material");
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const DebouncedInput_1 = require("../SearchFilterRow/DebouncedInput");
|
|
9
9
|
const useGetDynamicOptionData_1 = require("./hooks/useGetDynamicOptionData");
|
|
10
|
-
const ActionButtons_1 = require("../../../ActionButtons");
|
|
11
10
|
const Tooltip_1 = require("../../../Tooltip");
|
|
12
11
|
const VirtualCheckboxList_1 = require("./VirtualCheckboxList");
|
|
13
12
|
const FacetedFilter = ({ header, resetAllFilters, }) => {
|
|
@@ -94,9 +93,12 @@ const FacetedFilter = ({ header, resetAllFilters, }) => {
|
|
|
94
93
|
setLocalFilterData(allOptions);
|
|
95
94
|
}
|
|
96
95
|
};
|
|
96
|
+
// useCallback is needed here because handleApply and handleReset are passed as onClick props
|
|
97
|
+
// to Button components, ensuring stable references for event handlers
|
|
97
98
|
const handleApply = (0, react_1.useCallback)(() => {
|
|
98
99
|
if (localFilterData !== undefined) {
|
|
99
100
|
if (isCombinedFilter) {
|
|
101
|
+
// Update only the facets part of the combined filter
|
|
100
102
|
const currentFilter = getFilterValue() ?? {
|
|
101
103
|
facets: [],
|
|
102
104
|
search: "",
|
|
@@ -111,8 +113,11 @@ const FacetedFilter = ({ header, resetAllFilters, }) => {
|
|
|
111
113
|
setIsOpen(false);
|
|
112
114
|
setSearchValue("");
|
|
113
115
|
}, [localFilterData, header.column, isCombinedFilter]);
|
|
116
|
+
// useCallback is needed here because handleApply and handleReset are passed as onClick props
|
|
117
|
+
// to Button components, ensuring stable references for event handlers
|
|
114
118
|
const handleReset = (0, react_1.useCallback)(() => {
|
|
115
119
|
if (isCombinedFilter) {
|
|
120
|
+
// Reset only the facets part of the combined filter
|
|
116
121
|
const currentFilter = getFilterValue() ?? {
|
|
117
122
|
facets: [],
|
|
118
123
|
search: "",
|
|
@@ -132,40 +137,22 @@ const FacetedFilter = ({ header, resetAllFilters, }) => {
|
|
|
132
137
|
handleReset();
|
|
133
138
|
}
|
|
134
139
|
}, [resetAllFilters]);
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
}, [isOpen]);
|
|
141
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: { position: "relative" }, children: [(0, jsx_runtime_1.jsxs)(material_1.IconButton, { ref: buttonRef, onClick: () => setIsOpen(!isOpen), sx: {
|
|
142
|
-
padding: "2px",
|
|
143
|
-
position: "relative",
|
|
144
|
-
backgroundColor: hasActiveFilter
|
|
145
|
-
? (0, material_1.lighten)(butterflyBlue[900], 0.7)
|
|
146
|
-
: "transparent",
|
|
147
|
-
"&:hover": {
|
|
148
|
-
backgroundColor: hasActiveFilter
|
|
149
|
-
? (0, material_1.lighten)(butterflyBlue[900], 0.7)
|
|
150
|
-
: (0, material_1.lighten)(iron[500], 0.7),
|
|
151
|
-
},
|
|
152
|
-
}, children: [(0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { toolTipLabel: "Faceted Filter", children: (0, jsx_runtime_1.jsx)(icons_material_1.FilterListRounded, {}) }), hasActiveFilter && ((0, jsx_runtime_1.jsx)("span", { style: {
|
|
140
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { position: "relative" }, children: [(0, jsx_runtime_1.jsxs)(material_1.IconButton, { ref: buttonRef, onClick: (e) => {
|
|
141
|
+
e.stopPropagation();
|
|
142
|
+
setIsOpen(!isOpen);
|
|
143
|
+
}, sx: { padding: 0, position: "relative" }, children: [(0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { toolTipLabel: "Faceted Filter", children: (0, jsx_runtime_1.jsx)(icons_material_1.FilterListRounded, {}) }), activeFilterCount > 0 && ((0, jsx_runtime_1.jsx)("span", { style: {
|
|
153
144
|
backgroundColor: butterflyBlue[900],
|
|
145
|
+
border: `2px solid ${iron[600]}`,
|
|
154
146
|
borderRadius: "50%",
|
|
155
147
|
color: iron[600],
|
|
156
148
|
fontSize: "10px",
|
|
157
149
|
fontWeight: "bold",
|
|
158
|
-
height: "
|
|
150
|
+
height: "6px",
|
|
159
151
|
position: "absolute",
|
|
160
|
-
right:
|
|
161
|
-
top:
|
|
162
|
-
width: "
|
|
163
|
-
} }))] }), isOpen && ((0, jsx_runtime_1.jsx)(material_1.ClickAwayListener, { onClickAway: handleClickAway, children: (0, jsx_runtime_1.jsxs)("div", { ref: popoverRef,
|
|
164
|
-
if (e.key === "Escape") {
|
|
165
|
-
e.stopPropagation();
|
|
166
|
-
handleClickAway();
|
|
167
|
-
}
|
|
168
|
-
}, style: {
|
|
152
|
+
right: 0,
|
|
153
|
+
top: 1,
|
|
154
|
+
width: "6px",
|
|
155
|
+
} }))] }), isOpen && ((0, jsx_runtime_1.jsx)(material_1.ClickAwayListener, { onClickAway: handleClickAway, children: (0, jsx_runtime_1.jsxs)("div", { ref: popoverRef, role: "presentation", "data-faceted-filter-popover": "true", onClick: (e) => e.stopPropagation(), onMouseDown: (e) => e.stopPropagation(), onMouseUp: (e) => e.stopPropagation(), onMouseMove: (e) => e.stopPropagation(), onPointerDown: (e) => e.stopPropagation(), onPointerUp: (e) => e.stopPropagation(), onPointerMove: (e) => e.stopPropagation(), onKeyDown: (e) => e.stopPropagation(), style: {
|
|
169
156
|
backgroundColor: iron[600],
|
|
170
157
|
borderRadius: "6px",
|
|
171
158
|
boxShadow: `0 0 20px ${mirage[50]}`,
|
|
@@ -197,10 +184,6 @@ const FacetedFilter = ({ header, resetAllFilters, }) => {
|
|
|
197
184
|
display: "flex",
|
|
198
185
|
justifyContent: "space-between",
|
|
199
186
|
paddingTop: "8px",
|
|
200
|
-
}, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "text", size: "small", sx: { fontSize: "12px", height: "22px", minWidth: "40px" }, onClick: handleReset, children: "Reset" }), (0, jsx_runtime_1.jsx)(
|
|
201
|
-
height: "22px",
|
|
202
|
-
fontSize: "12px",
|
|
203
|
-
minWidth: "40px",
|
|
204
|
-
} })] })] }) }))] }));
|
|
187
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "text", size: "small", sx: { fontSize: "12px", height: "22px", minWidth: "40px" }, onClick: handleReset, children: "Reset" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", size: "small", sx: { fontSize: "12px", height: "22px", minWidth: "40px" }, onClick: handleApply, disableElevation: true, children: "Apply" })] })] }) }))] }));
|
|
205
188
|
};
|
|
206
189
|
exports.FacetedFilter = FacetedFilter;
|
package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/VirtualCheckboxList.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type VirtualCheckboxListProps = {
|
|
2
2
|
checkedMap: Record<string, boolean>;
|
|
3
|
-
onToggle: (value: string
|
|
4
|
-
options:
|
|
3
|
+
onToggle: (value: string) => void;
|
|
4
|
+
options: string[];
|
|
5
5
|
};
|
|
6
6
|
export declare const VirtualCheckboxList: import("react").MemoExoticComponent<({ checkedMap, onToggle, options }: VirtualCheckboxListProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualCheckboxList.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/FacetedFilter/VirtualCheckboxList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VirtualCheckboxList.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/FacetedFilter/VirtualCheckboxList.tsx"],"names":[],"mappings":"AAKA,KAAK,wBAAwB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,mBAAmB,0EACM,wBAAwB,6CAgN7D,CAAC"}
|
package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/VirtualCheckboxList.js
CHANGED
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const helper_1 = require("../../utils/helper");
|
|
8
|
+
const luxon_1 = require("luxon");
|
|
8
9
|
exports.VirtualCheckboxList = (0, react_1.memo)(({ checkedMap, onToggle, options }) => {
|
|
9
10
|
const theme = (0, material_1.useTheme)();
|
|
10
11
|
const { butterflyBlue, sapphireBlue } = theme.palette.app.color;
|
|
@@ -59,7 +60,7 @@ exports.VirtualCheckboxList = (0, react_1.memo)(({ checkedMap, onToggle, options
|
|
|
59
60
|
document.addEventListener("mouseup", handleMouseUp);
|
|
60
61
|
return () => document.removeEventListener("mouseup", handleMouseUp);
|
|
61
62
|
}, [handleMouseUp]);
|
|
62
|
-
return ((0, jsx_runtime_1.jsx)("div", { ref: containerRef, onScroll: handleScroll, style: {
|
|
63
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: containerRef, role: "presentation", onScroll: handleScroll, onClick: (e) => e.stopPropagation(), onMouseDown: (e) => e.stopPropagation(), onMouseUp: (e) => e.stopPropagation(), onMouseMove: (e) => e.stopPropagation(), onPointerDown: (e) => e.stopPropagation(), onPointerUp: (e) => e.stopPropagation(), onPointerMove: (e) => e.stopPropagation(), onKeyDown: (e) => e.stopPropagation(), style: {
|
|
63
64
|
display: "flex",
|
|
64
65
|
flexDirection: "column",
|
|
65
66
|
height: "300px",
|
|
@@ -76,7 +77,23 @@ exports.VirtualCheckboxList = (0, react_1.memo)(({ checkedMap, onToggle, options
|
|
|
76
77
|
width: "100%",
|
|
77
78
|
}, children: visibleItems.map((value) => {
|
|
78
79
|
const isChecked = checkedMap[value] || false;
|
|
79
|
-
|
|
80
|
+
const getLabel = () => {
|
|
81
|
+
if (typeof value === "string") {
|
|
82
|
+
if (!(0, helper_1.isFullISODate)(value)) {
|
|
83
|
+
return value;
|
|
84
|
+
}
|
|
85
|
+
const dt = luxon_1.DateTime.fromISO(value, { zone: "utc" });
|
|
86
|
+
return dt.isValid ? (0, helper_1.formatDateValue)(value) : value;
|
|
87
|
+
}
|
|
88
|
+
return String(value);
|
|
89
|
+
};
|
|
90
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { onMouseDown: (e) => {
|
|
91
|
+
e.stopPropagation();
|
|
92
|
+
handleMouseDown(value);
|
|
93
|
+
}, onMouseUp: (e) => e.stopPropagation(), onMouseEnter: (e) => {
|
|
94
|
+
e.stopPropagation();
|
|
95
|
+
handleMouseEnter(value);
|
|
96
|
+
}, onMouseMove: (e) => e.stopPropagation(), onPointerDown: (e) => e.stopPropagation(), onPointerUp: (e) => e.stopPropagation(), onPointerMove: (e) => e.stopPropagation(), onClick: (e) => e.stopPropagation(), style: {
|
|
80
97
|
backgroundColor: isChecked
|
|
81
98
|
? sapphireBlue[400]
|
|
82
99
|
: "transparent",
|
|
@@ -84,7 +101,7 @@ exports.VirtualCheckboxList = (0, react_1.memo)(({ checkedMap, onToggle, options
|
|
|
84
101
|
}, flexDirection: "row", alignItems: "center", gap: "5px", height: `${ITEM_HEIGHT}px`, children: [(0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: isChecked, onChange: (e) => {
|
|
85
102
|
e.stopPropagation();
|
|
86
103
|
onToggle(value);
|
|
87
|
-
}, onMouseDown: (e) => e.stopPropagation(), size: "small", style: {
|
|
104
|
+
}, onMouseDown: (e) => e.stopPropagation(), onMouseUp: (e) => e.stopPropagation(), onPointerDown: (e) => e.stopPropagation(), onClick: (e) => e.stopPropagation(), size: "small", style: {
|
|
88
105
|
color: isChecked ? butterflyBlue[900] : "",
|
|
89
106
|
padding: "4px",
|
|
90
107
|
} }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", color: "black", sx: {
|
|
@@ -94,8 +111,7 @@ exports.VirtualCheckboxList = (0, react_1.memo)(({ checkedMap, onToggle, options
|
|
|
94
111
|
display: "-webkit-box",
|
|
95
112
|
overflow: "hidden",
|
|
96
113
|
textOverflow: "ellipsis",
|
|
97
|
-
|
|
98
|
-
}, children: typeof value === "string" ? (0, helper_1.formatDateValue)(value) : value })] }, value));
|
|
114
|
+
}, children: getLabel() })] }, value));
|
|
99
115
|
}) }) }) }));
|
|
100
116
|
});
|
|
101
117
|
exports.VirtualCheckboxList.displayName = "VirtualCheckboxList";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterStatusPanel.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/Components/FilterStatusPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"FilterStatusPanel.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/Components/FilterStatusPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAKlD,KAAK,sBAAsB,CAAC,CAAC,IAAI;IAC/B,eAAe,EAAE,QAAQ,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,CAAC,EAAG,6BAGnC,sBAAsB,CAAC,CAAC,CAAC,4CAyJ3B,CAAC"}
|
|
@@ -6,6 +6,7 @@ const icons_material_1 = require("@mui/icons-material");
|
|
|
6
6
|
const material_1 = require("@mui/material");
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const helper_1 = require("../utils/helper");
|
|
9
|
+
const luxon_1 = require("luxon");
|
|
9
10
|
const FilterStatusPanel = ({ clearAllFilters, table, }) => {
|
|
10
11
|
const theme = (0, material_1.useTheme)();
|
|
11
12
|
const { brown, butterflyBlue, iron, slate } = theme.palette.app.color;
|
|
@@ -30,7 +31,7 @@ const FilterStatusPanel = ({ clearAllFilters, table, }) => {
|
|
|
30
31
|
// Handle primitive filters (string/number)
|
|
31
32
|
if (typeof filter === "string" || typeof filter === "number") {
|
|
32
33
|
return {
|
|
33
|
-
facets: filter !== "" ? [filter] : [],
|
|
34
|
+
facets: filter !== "" ? [String(filter)] : [],
|
|
34
35
|
search: [],
|
|
35
36
|
};
|
|
36
37
|
}
|
|
@@ -51,11 +52,17 @@ const FilterStatusPanel = ({ clearAllFilters, table, }) => {
|
|
|
51
52
|
const filter = header.column.getFilterValue();
|
|
52
53
|
const { facets, search } = extractFilterValues(filter);
|
|
53
54
|
const hasValues = facets.length > 0 || search.length > 0;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
const getLabel = (value) => {
|
|
56
|
+
if (typeof value === "string") {
|
|
57
|
+
if (!(0, helper_1.isFullISODate)(value)) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
const dt = luxon_1.DateTime.fromISO(value, { zone: "utc" });
|
|
61
|
+
return dt.isValid ? (0, helper_1.formatDateValue)(value) : value;
|
|
62
|
+
}
|
|
63
|
+
return String(value);
|
|
64
|
+
};
|
|
65
|
+
return hasValues ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, { flexDirection: "row", gap: "3px", children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "caption", fontWeight: 600, children: [header.column.columnDef.header, ":"] }), facets.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", sx: { color: butterflyBlue[900] }, children: facets.map(getLabel).join(", ") })), facets.length > 0 && search.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", children: "," })), search.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", sx: { color: brown[900] }, children: search.join(", ") }))] }, header.id)) : null;
|
|
59
66
|
})
|
|
60
67
|
.filter(Boolean);
|
|
61
68
|
// Don't render if no filters applied
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Table } from "@tanstack/react-table";
|
|
2
|
+
type GroupAreaOverlayProps<T> = {
|
|
3
|
+
activeDragId: string | null;
|
|
4
|
+
activeDragOver: string | null;
|
|
5
|
+
table: Table<T>;
|
|
6
|
+
defaultGrouping: Array<keyof T>;
|
|
7
|
+
};
|
|
8
|
+
export declare const GroupAreaOverlay: <T>({ activeDragId, activeDragOver, table, defaultGrouping, }: GroupAreaOverlayProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=GroupAreaOverlay.d.ts.map
|