@m4l/components 9.2.39-beta-1 → 9.2.39
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/components/Chip/Chip.js +3 -0
- package/components/Chip/types.d.ts +4 -0
- package/components/DataGrid/dictionary.js +1 -2
- package/components/DataGrid/formatters/ColumnBooleanFormatter/useColumnBoolean.js +3 -6
- package/components/DataGrid/formatters/ColumnChipStatusFormatter/ColumnChipStatusFormatter.js +2 -2
- package/components/DataGrid/formatters/ColumnChipStatusFormatter/useColumnChipStatusFormatter.js +3 -3
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/formatter.js +1 -2
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/useColumnNestedValue.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/useColumnNestedValue.js +1 -2
- package/components/DataGrid/formatters/ColumnPriceFormatter/useColumnPrice.js +8 -6
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/useColumnSetCheck.js +1 -3
- package/components/DynamicFilter/helpers/frontEndHelpers.js +2 -2
- package/components/DynamicFilter/index.d.ts +2 -3
- package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.d.ts +3 -3
- package/components/DynamicFilter/types.d.ts +9 -9
- package/components/DynamicSort/index.d.ts +1 -2
- package/components/DynamicSort/subcomponents/PopoverSort/usePopoverSort.d.ts +3 -3
- package/components/DynamicSort/types.d.ts +1 -0
- package/components/MenuActions/MenuActions.js +14 -17
- package/components/MenuActions/dictionary.js +2 -2
- package/components/Pager/subcomponents/PagerActions/PagerActions.js +0 -4
- package/components/SideBar/SideBar.js +2 -7
- package/components/SideBar/constants.js +3 -3
- package/components/SideBar/context/sideBarContext/index.js +2 -4
- package/components/SideBar/subcomponents/ContentComponent/index.js +1 -1
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js +5 -3
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +1 -1
- package/components/SideBar/types.d.ts +0 -4
- package/components/formatters/ChipStatusFormatter/ChipStatusFormatter.js +1 -1
- package/components/hook-form/RHFAutocomplete/types.d.ts +1 -1
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.js +0 -2
- package/components/hook-form/RHFAutocompleteAsync/types.d.ts +0 -1
- package/components/mui_extended/IconButton/types.d.ts +4 -1
- package/index.js +73 -77
- package/package.json +1 -1
- package/components/DynamicFilter/helpers/getRawFiltersForNetwork.d.ts +0 -14
- package/components/DynamicFilter/helpers/getRawFiltersForNetwork.js +0 -19
- package/components/DynamicSort/helpers/getRawSortsForNetwork.d.ts +0 -12
- package/components/DynamicSort/helpers/getRawSortsForNetwork.js +0 -20
package/components/Chip/Chip.js
CHANGED
|
@@ -3,6 +3,7 @@ import { useModuleSkeleton, useEnvironment } from "@m4l/core";
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { forwardRef, useMemo } from "react";
|
|
5
5
|
import { C as CHIP_CLASSES } from "./constants.js";
|
|
6
|
+
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.js";
|
|
6
7
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
7
8
|
import { I as IconStyled, S as SkeletonChipStyled, C as ChipRootStyled, T as TextChipStyled, a as IconButtonStyled } from "./slots/ChipSlots.js";
|
|
8
9
|
const Chip = forwardRef((props, ref) => {
|
|
@@ -20,6 +21,7 @@ const Chip = forwardRef((props, ref) => {
|
|
|
20
21
|
onDeleted,
|
|
21
22
|
iconButtonProps,
|
|
22
23
|
className,
|
|
24
|
+
dataTestId,
|
|
23
25
|
...others
|
|
24
26
|
} = props;
|
|
25
27
|
const { currentSize } = useComponentSize(size);
|
|
@@ -77,6 +79,7 @@ const Chip = forwardRef((props, ref) => {
|
|
|
77
79
|
ownerState: { ...ownerState },
|
|
78
80
|
className: clsx(className, CHIP_CLASSES.root),
|
|
79
81
|
ref,
|
|
82
|
+
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: dataTestId } : {},
|
|
80
83
|
...onClick ? { tabIndex: 0 } : {},
|
|
81
84
|
...others,
|
|
82
85
|
children: [
|
|
@@ -69,6 +69,10 @@ export interface ChipProps {
|
|
|
69
69
|
* If the `Chip` is focusable.
|
|
70
70
|
*/
|
|
71
71
|
focusable?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Test id for the `Chip`.
|
|
74
|
+
*/
|
|
75
|
+
dataTestId?: string;
|
|
72
76
|
}
|
|
73
77
|
/**
|
|
74
78
|
* Owner state of the `Chip` used to define internal style and behavior properties.
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { g as getMenuActionsComponentsDictionary } from "../MenuActions/dictionary.js";
|
|
2
1
|
import { g as getModalDictionary } from "../ModalDialog/dictionary.js";
|
|
3
2
|
import { g as getPagerComponentsDictionary } from "../Pager/dicctionary.js";
|
|
4
3
|
function getDataGridComponentsDictionary() {
|
|
5
|
-
return ["data_grid"].concat(getPagerComponentsDictionary()).concat(
|
|
4
|
+
return ["data_grid"].concat(getPagerComponentsDictionary()).concat(getModalDictionary());
|
|
6
5
|
}
|
|
7
6
|
const dictionary = {
|
|
8
7
|
LABEL_ACTIONS: "actions",
|
|
@@ -3,11 +3,9 @@ import { C as ColumnBooleanFormatter } from "./formatter.js";
|
|
|
3
3
|
import { useModuleDictionary, getPropertyByString } from "@m4l/core";
|
|
4
4
|
import { useState, useRef, useEffect, useMemo } from "react";
|
|
5
5
|
import { deepEqual } from "fast-equals";
|
|
6
|
-
import { g as getColumnKey } from "../../helpers/getColumnKey.js";
|
|
7
6
|
const getCustomBooleanFilter = (props, getLabel) => {
|
|
8
7
|
return (row, value) => {
|
|
9
|
-
const
|
|
10
|
-
const valueMaybeString = getPropertyByString(row, keyWiouthRow);
|
|
8
|
+
const valueMaybeString = getPropertyByString(row, props.fieldValue);
|
|
11
9
|
let fixedValue;
|
|
12
10
|
if (typeof valueMaybeString === "boolean") {
|
|
13
11
|
fixedValue = valueMaybeString;
|
|
@@ -23,9 +21,8 @@ const getCustomBooleanFilter = (props, getLabel) => {
|
|
|
23
21
|
};
|
|
24
22
|
const getCustomBooleanSort = (props, getLabel) => {
|
|
25
23
|
return (a, b) => {
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const valueMaybeStringB = getPropertyByString(b, keyWiouthRow);
|
|
24
|
+
const valueMaybeStringA = getPropertyByString(a, props.fieldValue);
|
|
25
|
+
const valueMaybeStringB = getPropertyByString(b, props.fieldValue);
|
|
29
26
|
let fixedValueA;
|
|
30
27
|
let fixedValueB;
|
|
31
28
|
if (typeof valueMaybeStringA === "boolean") {
|
package/components/DataGrid/formatters/ColumnChipStatusFormatter/ColumnChipStatusFormatter.js
CHANGED
|
@@ -4,8 +4,8 @@ import { C as ChipStatusFormatter } from "../../../formatters/ChipStatusFormatte
|
|
|
4
4
|
const ColumnChipStatusFormatter = (props) => {
|
|
5
5
|
const { uriStatus, uriLabel, component, statusesColors, fallbackColor, opacity } = props;
|
|
6
6
|
return (obProps) => {
|
|
7
|
-
const label = typeof uriLabel === "string" ? getPropertyByString(obProps, uriStatus.toString()
|
|
8
|
-
const status = getPropertyByString(obProps, uriStatus.toString()
|
|
7
|
+
const label = typeof uriLabel === "string" ? getPropertyByString(obProps, uriStatus.toString()) : uriLabel(obProps, uriStatus);
|
|
8
|
+
const status = getPropertyByString(obProps, uriStatus.toString());
|
|
9
9
|
return /* @__PURE__ */ jsx(
|
|
10
10
|
ChipStatusFormatter,
|
|
11
11
|
{
|
package/components/DataGrid/formatters/ColumnChipStatusFormatter/useColumnChipStatusFormatter.js
CHANGED
|
@@ -6,14 +6,14 @@ import { useState, useRef, useEffect, useMemo } from "react";
|
|
|
6
6
|
const getCustomChipStatusFilter = (props) => {
|
|
7
7
|
const { uriLabel } = props;
|
|
8
8
|
return (row, value) => {
|
|
9
|
-
const valueMaybeString = typeof uriLabel === "string" ? getPropertyByString(row, getColumnKey(uriLabel)
|
|
9
|
+
const valueMaybeString = typeof uriLabel === "string" ? getPropertyByString(row, getColumnKey(uriLabel)) : uriLabel(row, props.uriStatus);
|
|
10
10
|
return valueMaybeString.includes(value.toString());
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
const getCustomChipStatusSort = (props) => {
|
|
14
14
|
return (a, b) => {
|
|
15
|
-
const valueA = typeof props.uriLabel === "string" ? getPropertyByString(a, getColumnKey(props.uriLabel)
|
|
16
|
-
const valueB = typeof props.uriLabel === "string" ? getPropertyByString(b, getColumnKey(props.uriLabel)
|
|
15
|
+
const valueA = typeof props.uriLabel === "string" ? getPropertyByString(a, getColumnKey(props.uriLabel)) : props.uriLabel(a, props.uriStatus);
|
|
16
|
+
const valueB = typeof props.uriLabel === "string" ? getPropertyByString(b, getColumnKey(props.uriLabel)) : props.uriLabel(b, props.uriStatus);
|
|
17
17
|
return valueA > valueB ? 1 : valueA < valueB ? -1 : 0;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getPropertyByString } from "@m4l/core";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { g as getNullGuard } from "../../../../utils/getNullGuard.js";
|
|
5
4
|
function ColumnNestedValueFormatter(props) {
|
|
6
5
|
const { fieldValue, Component = React.Fragment } = props;
|
|
7
6
|
return (obProps) => {
|
|
8
|
-
const property =
|
|
7
|
+
const property = getPropertyByString(obProps, fieldValue);
|
|
9
8
|
const value = typeof property === "object" ? JSON.stringify(property) : property;
|
|
10
9
|
return /* @__PURE__ */ jsx(Component, { children: value });
|
|
11
10
|
};
|
|
@@ -5,6 +5,6 @@ import { ColumnNestedValueFormatterProps } from './types';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const useColumnNestedValue: <TRow>(props: ColumnNestedValueFormatterProps) => {
|
|
7
7
|
formatter: (obProps: any) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
customFilter: (row: TRow, value: string) =>
|
|
8
|
+
customFilter: (row: TRow, value: string) => boolean;
|
|
9
9
|
customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
|
|
10
10
|
};
|
|
@@ -3,11 +3,10 @@ import { useState, useRef, useEffect, useMemo } from "react";
|
|
|
3
3
|
import { deepEqual } from "fast-equals";
|
|
4
4
|
import { g as getColumnKey } from "../../helpers/getColumnKey.js";
|
|
5
5
|
import { C as ColumnNestedValueFormatter } from "./formatter.js";
|
|
6
|
-
import { g as getNullGuard } from "../../../../utils/getNullGuard.js";
|
|
7
6
|
const getCustomNestedValueFilter = (props) => {
|
|
8
7
|
return (row, value) => {
|
|
9
8
|
const keyWiouthRow = getColumnKey(props.fieldValue);
|
|
10
|
-
const property =
|
|
9
|
+
const property = getPropertyByString(row, keyWiouthRow) ?? "";
|
|
11
10
|
if (typeof property === "object") {
|
|
12
11
|
return Object.values(property).includes(value);
|
|
13
12
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { useState, useRef, useEffect, useMemo } from "react";
|
|
1
|
+
import { useState, useRef, useEffect, useMemo, useCallback } from "react";
|
|
2
2
|
import { useFormatter } from "@m4l/graphics";
|
|
3
3
|
import { getPropertyByString } from "@m4l/core";
|
|
4
4
|
import { deepEqual } from "fast-equals";
|
|
5
5
|
import { g as getFormatPrice } from "../../../formatters/PriceFormatter/PriceFormatter.js";
|
|
6
6
|
import { g as getColumnKey } from "../../helpers/getColumnKey.js";
|
|
7
7
|
import { C as ColumnPriceFormatter } from "./formatter.js";
|
|
8
|
-
const
|
|
8
|
+
const useCustomPriceFilter = (props) => {
|
|
9
9
|
const { currencyFormatter } = useFormatter();
|
|
10
|
-
|
|
10
|
+
const customFilter = useCallback((row, value) => {
|
|
11
11
|
const fieldValue = getColumnKey(props.fieldValue);
|
|
12
12
|
return getFormatPrice(row, fieldValue, currencyFormatter.code, currencyFormatter.decimalDigits).includes(value);
|
|
13
|
-
};
|
|
13
|
+
}, [props.fieldValue, currencyFormatter]);
|
|
14
|
+
return customFilter;
|
|
14
15
|
};
|
|
15
16
|
const getCustomPriceSort = (props) => {
|
|
16
17
|
return (a, b) => {
|
|
@@ -41,6 +42,7 @@ const getCustomPriceSort = (props) => {
|
|
|
41
42
|
const useColumnPrice = (props) => {
|
|
42
43
|
const [stateProps, setStateProps] = useState(props);
|
|
43
44
|
const refProps = useRef({ ...props });
|
|
45
|
+
const customFilter = useCustomPriceFilter(stateProps);
|
|
44
46
|
useEffect(() => {
|
|
45
47
|
if (!deepEqual(refProps.current, props)) {
|
|
46
48
|
refProps.current = props;
|
|
@@ -49,9 +51,9 @@ const useColumnPrice = (props) => {
|
|
|
49
51
|
}, [props]);
|
|
50
52
|
return useMemo(() => ({
|
|
51
53
|
formatter: ColumnPriceFormatter(stateProps),
|
|
52
|
-
customFilter
|
|
54
|
+
customFilter,
|
|
53
55
|
customSort: getCustomPriceSort(stateProps)
|
|
54
|
-
}), [stateProps]);
|
|
56
|
+
}), [stateProps, customFilter]);
|
|
55
57
|
};
|
|
56
58
|
export {
|
|
57
59
|
useColumnPrice as u
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { useState, useRef, useEffect, useMemo } from "react";
|
|
2
2
|
import { getPropertyByString } from "@m4l/core";
|
|
3
3
|
import { deepEqual } from "fast-equals";
|
|
4
|
-
import { g as getColumnKey } from "../../helpers/getColumnKey.js";
|
|
5
4
|
import { C as ColumnSetCheckFormatter } from "./formatter.js";
|
|
6
5
|
const getCustomFilter = (props) => {
|
|
7
6
|
return (row, value) => {
|
|
8
|
-
const
|
|
9
|
-
const valueCheck = getPropertyByString(row, keyWiouthRow);
|
|
7
|
+
const valueCheck = getPropertyByString(row, props.field);
|
|
10
8
|
return valueCheck === value;
|
|
11
9
|
};
|
|
12
10
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { getDynamicFilterComponentsDictionary } from './dictionary';
|
|
2
2
|
export * from './DynamicFilter';
|
|
3
|
-
export type {
|
|
4
|
-
export {
|
|
5
|
-
export { getRawFiltersForNetwork } from './helpers/getRawFiltersForNetwork';
|
|
3
|
+
export type { FilterField, FilterFieldApplied as FilterFieldApply, InitialFilterApplied, RawFilterFieldApply, } from './types';
|
|
4
|
+
export { getFilterGroupFieldsByName, getIsIfInDynamicFilter } from './helpers/frontEndHelpers';
|
|
@@ -17,11 +17,11 @@ declare function usePopoverFilter(): {
|
|
|
17
17
|
filterFormValue: FormFilterValue;
|
|
18
18
|
formFilter: FormFilterFieldApplied;
|
|
19
19
|
popupValidationSchema: import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ObjectSchema<{
|
|
20
|
-
[x: string]: import('yup').ObjectSchema
|
|
20
|
+
[x: string]: import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>>, any>;
|
|
21
21
|
}, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<{
|
|
22
|
-
[x: string]: import('yup').ObjectSchema
|
|
22
|
+
[x: string]: import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>>, any>;
|
|
23
23
|
}>, import('yup/lib/object').AssertsShape<{
|
|
24
|
-
[x: string]: import('yup').ObjectSchema
|
|
24
|
+
[x: string]: import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>>, any>;
|
|
25
25
|
}>> | undefined;
|
|
26
26
|
statusLoad: "initial" | "reload_values_provider" | "ready";
|
|
27
27
|
};
|
|
@@ -25,13 +25,13 @@ export type OperandsSelectAsyncArrayValues = Array<FormOperandSelectAsync>;
|
|
|
25
25
|
export type OperandsSelectArrayValues = Array<FormOperandSelect>;
|
|
26
26
|
export type FieldTypeOperator<T extends FieldType> = T extends 'boolean' ? BooleanOperator : T extends 'datetime' ? DateTimeOperator : T extends 'number' ? NumberOperator : T extends 'select' ? SelectOperator : T extends 'string' ? StringOperator : T;
|
|
27
27
|
export type FieldTypeOperand<T extends FieldType> = T extends 'boolean' ? boolean : T extends 'datetime' ? Date : T extends 'number' ? number : T extends 'string' ? string : T extends 'select' ? OperandsSelectArrayValues : T extends 'selectAsync' ? OperandsSelectAsyncArrayValues : FieldType;
|
|
28
|
-
type SelectAsyncOptions
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
getOptionId: (option:
|
|
28
|
+
type SelectAsyncOptions = Pick<RHFAutocompleteAsyncBaseProps<{
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}>, 'type' | 'endPoint' | 'getOptionLabel' | 'isOptionEqualToValue' | 'multiple' | 'autoComplete' | 'autoCapitalize' | 'parms' | 'timeout'> & {
|
|
31
|
+
getOptionId: (option: Record<string, any>) => string | number;
|
|
32
32
|
};
|
|
33
33
|
type SelectOptions = Omit<RHFSelectProps<any, true>, 'name'>;
|
|
34
|
-
export interface FieldBase<T extends FieldType = FieldType
|
|
34
|
+
export interface FieldBase<T extends FieldType = FieldType> {
|
|
35
35
|
name: string;
|
|
36
36
|
type: T;
|
|
37
37
|
multiple?: boolean;
|
|
@@ -42,10 +42,10 @@ export interface FieldBase<T extends FieldType = FieldType, TOption = any> {
|
|
|
42
42
|
defaultOperand2?: Maybe<FieldTypeOperand<T>>;
|
|
43
43
|
defaultOperandsArray?: Maybe<FieldTypeOperand<T>>;
|
|
44
44
|
selectOptions?: SelectOptions;
|
|
45
|
-
selectAsyncOptions?: SelectAsyncOptions
|
|
45
|
+
selectAsyncOptions?: SelectAsyncOptions;
|
|
46
46
|
}
|
|
47
|
-
export interface FieldWithSelectAsync<T extends 'selectAsync'
|
|
48
|
-
selectAsyncOptions: SelectAsyncOptions
|
|
47
|
+
export interface FieldWithSelectAsync<T extends 'selectAsync'> extends FieldBase<T> {
|
|
48
|
+
selectAsyncOptions: SelectAsyncOptions;
|
|
49
49
|
}
|
|
50
50
|
export interface FieldWithSelect<T extends 'select'> extends FieldBase<T> {
|
|
51
51
|
selectOptions: SelectOptions;
|
|
@@ -58,7 +58,7 @@ export interface Label<T extends FieldType = FieldType> extends FieldBase<T> {
|
|
|
58
58
|
label: string;
|
|
59
59
|
dictionaryId?: undefined;
|
|
60
60
|
}
|
|
61
|
-
export type FilterField<T extends FieldType = FieldType
|
|
61
|
+
export type FilterField<T extends FieldType = FieldType> = T extends 'selectAsync' ? FieldWithSelectAsync<T> & (FieldDictionaryId<T> | Label<T>) : T extends 'select' ? FieldWithSelect<T> & (FieldDictionaryId<T> | Label<T>) : FieldDictionaryId<T> | Label<T>;
|
|
62
62
|
export interface BaseApplyFilter<T extends FieldType = FieldType> {
|
|
63
63
|
id: number;
|
|
64
64
|
field: FilterField<T>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { getDynamicSortComponentsDictionary } from './dictionary';
|
|
2
2
|
export * from './DynamicSort';
|
|
3
|
-
export type { InitialSortApplied, RawSortFieldApply, SortField, SortFieldApplied, SortFieldType, SortOperator, } from './types';
|
|
4
3
|
export { SortCompareValues } from './helpers/frontEndHelpers';
|
|
5
|
-
export {
|
|
4
|
+
export type { InitialSortApplied, RawSortFieldApply, SortField, SortFieldApplied, SortFieldType, SortOperator, } from './types';
|
|
@@ -17,11 +17,11 @@ declare function usePopoverSort(): {
|
|
|
17
17
|
sortFormValue: import('../../types').FormSortValueBase;
|
|
18
18
|
formSort: FormSortFieldApplied;
|
|
19
19
|
popupValidationSchema: import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ObjectSchema<{
|
|
20
|
-
[x: string]: import('yup').ObjectSchema
|
|
20
|
+
[x: string]: import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>>, any>;
|
|
21
21
|
}, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<{
|
|
22
|
-
[x: string]: import('yup').ObjectSchema
|
|
22
|
+
[x: string]: import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>>, any>;
|
|
23
23
|
}>, import('yup/lib/object').AssertsShape<{
|
|
24
|
-
[x: string]: import('yup').ObjectSchema
|
|
24
|
+
[x: string]: import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>>, any>;
|
|
25
25
|
}>> | undefined;
|
|
26
26
|
statusLoad: "initial" | "reload_values_provider" | "ready";
|
|
27
27
|
};
|
|
@@ -5,7 +5,7 @@ import { u as useComponentSize } from "../../hooks/useComponentSize/useComponent
|
|
|
5
5
|
import { P as Popover } from "../mui_extended/Popover/Popover.js";
|
|
6
6
|
import { M as MenuItem } from "../mui_extended/MenuItem/MenuItem.js";
|
|
7
7
|
import { I as ICON_PATH, a as ICONS, M as MENU_ACTIONS_ } from "./constants.js";
|
|
8
|
-
import {
|
|
8
|
+
import { g as getMenuActionsDictionary, D as DICTIONARY } from "./dictionary.js";
|
|
9
9
|
import { M as MenuDivider } from "../mui_extended/MenuDivider/MenuDivider.js";
|
|
10
10
|
import { M as MenuListStyled, a as MenuLoaderStyled, R as RootStyled, I as IconButtonStyled, H as HeaderMenuActionsStyled, F as FooterMenuActionsStyled } from "./slots/MenuActionsSlots.js";
|
|
11
11
|
import { C as CircularProgress } from "../mui_extended/CircularProgress/CircularProgress.js";
|
|
@@ -74,20 +74,18 @@ function MenuActions(props) {
|
|
|
74
74
|
onOpen(true);
|
|
75
75
|
}
|
|
76
76
|
}, [onOpen]);
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (menuActions) {
|
|
81
|
-
if (typeof menuActions === "function") {
|
|
82
|
-
processedActions = menuActions(objItem);
|
|
83
|
-
} else {
|
|
84
|
-
processedActions = menuActions;
|
|
85
|
-
}
|
|
77
|
+
const finalActions = useMemo(() => {
|
|
78
|
+
if (!menuActions) {
|
|
79
|
+
return [];
|
|
86
80
|
}
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
const processedActions = typeof menuActions === "function" ? menuActions(objItem) : menuActions;
|
|
82
|
+
if (!Array.isArray(processedActions)) {
|
|
83
|
+
return [];
|
|
89
84
|
}
|
|
90
|
-
|
|
85
|
+
return processedActions.filter((action) => !!action.type);
|
|
86
|
+
}, [menuActions, objItem]);
|
|
87
|
+
const renderMenuContent = useCallback(() => {
|
|
88
|
+
if (!finalActions.length) {
|
|
91
89
|
return /* @__PURE__ */ jsx(MenuItem, { disabled: true, role: "menu-no-actions", label: getLabel(getMenuActionsDictionary(DICTIONARY.no_actions_label)) });
|
|
92
90
|
}
|
|
93
91
|
const RenderHeader = () => {
|
|
@@ -107,7 +105,7 @@ function MenuActions(props) {
|
|
|
107
105
|
case "loader":
|
|
108
106
|
return /* @__PURE__ */ jsx(MenuLoaderStyled, { size, ownerState: {}, children: /* @__PURE__ */ jsx(CircularProgress, { size }) }, `loader-${key}`);
|
|
109
107
|
case "customNode":
|
|
110
|
-
return menuAction.customNode;
|
|
108
|
+
return /* @__PURE__ */ jsx(React.Fragment, { children: menuAction.customNode }, `customNode-${key}`);
|
|
111
109
|
case "menuItem":
|
|
112
110
|
return /* @__PURE__ */ jsx(
|
|
113
111
|
MenuItem,
|
|
@@ -127,7 +125,7 @@ function MenuActions(props) {
|
|
|
127
125
|
footer && /* @__PURE__ */ jsx(RenderFooter, {}),
|
|
128
126
|
endListElement && endListElement
|
|
129
127
|
] });
|
|
130
|
-
}, [
|
|
128
|
+
}, [finalActions, header, size, footer, endListElement, getLabel, actionKey, handleClick]);
|
|
131
129
|
return /* @__PURE__ */ jsxs(RootStyled, { className, ownerState: { ownerState }, children: [
|
|
132
130
|
/* @__PURE__ */ jsx(
|
|
133
131
|
IconButtonStyled,
|
|
@@ -141,7 +139,6 @@ function MenuActions(props) {
|
|
|
141
139
|
className: iconButtonClassName,
|
|
142
140
|
selected: open,
|
|
143
141
|
disabled,
|
|
144
|
-
componentPaletteColor: "default",
|
|
145
142
|
badgeContent,
|
|
146
143
|
"aria-label": "menu-actions"
|
|
147
144
|
}
|
|
@@ -157,7 +154,7 @@ function MenuActions(props) {
|
|
|
157
154
|
...other,
|
|
158
155
|
slots: { ...slots },
|
|
159
156
|
slotProps: { paper: { ...paperProps } },
|
|
160
|
-
children: renderMenuContent()
|
|
157
|
+
children: open && renderMenuContent()
|
|
161
158
|
}
|
|
162
159
|
)
|
|
163
160
|
] });
|
|
@@ -29,7 +29,6 @@ function PagerActions(props) {
|
|
|
29
29
|
IconButton,
|
|
30
30
|
{
|
|
31
31
|
size,
|
|
32
|
-
dictionaryTooltipId: "pager.first",
|
|
33
32
|
onClick: handleFirstPageButtonClick,
|
|
34
33
|
disabled: page === 0,
|
|
35
34
|
"aria-label": "first page",
|
|
@@ -40,7 +39,6 @@ function PagerActions(props) {
|
|
|
40
39
|
IconButton,
|
|
41
40
|
{
|
|
42
41
|
size,
|
|
43
|
-
dictionaryTooltipId: "pager.previous",
|
|
44
42
|
onClick: handleBackButtonClick,
|
|
45
43
|
disabled: page === 0,
|
|
46
44
|
"aria-label": "first page",
|
|
@@ -51,7 +49,6 @@ function PagerActions(props) {
|
|
|
51
49
|
IconButton,
|
|
52
50
|
{
|
|
53
51
|
size,
|
|
54
|
-
dictionaryTooltipId: "pager.next",
|
|
55
52
|
onClick: handleNextButtonClick,
|
|
56
53
|
disabled: page >= Math.ceil(count / rowsPerPage) - 1,
|
|
57
54
|
"aria-label": "next page",
|
|
@@ -62,7 +59,6 @@ function PagerActions(props) {
|
|
|
62
59
|
IconButton,
|
|
63
60
|
{
|
|
64
61
|
size,
|
|
65
|
-
dictionaryTooltipId: "pager.last",
|
|
66
62
|
onClick: handleLastPageButtonClick,
|
|
67
63
|
disabled: page >= Math.ceil(count / rowsPerPage) - 1,
|
|
68
64
|
"aria-label": "last page",
|
|
@@ -6,10 +6,7 @@ import { memo, useMemo } from "react";
|
|
|
6
6
|
import { g as getMenuDataWithState } from "./helpers/getMenuDataWithState/index.js";
|
|
7
7
|
import { useIsMobile } from "@m4l/graphics";
|
|
8
8
|
import { g as getDataToSkeleton } from "./helpers/getDataToSkeleton/index.js";
|
|
9
|
-
import { P as PATH_ICONS } from "./constants.js";
|
|
10
|
-
import { useEnvironment } from "@m4l/core";
|
|
11
9
|
const SideBar = memo((props) => {
|
|
12
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
13
10
|
const {
|
|
14
11
|
anchored,
|
|
15
12
|
visible,
|
|
@@ -22,8 +19,7 @@ const SideBar = memo((props) => {
|
|
|
22
19
|
moduleSelectedId,
|
|
23
20
|
expandedWidth = "230px",
|
|
24
21
|
companyName,
|
|
25
|
-
companySlogan
|
|
26
|
-
urlIconPrefix = `${host_static_assets}/${environment_assets}${PATH_ICONS}`
|
|
22
|
+
companySlogan
|
|
27
23
|
} = props;
|
|
28
24
|
const menuDataWithState = useMemo(() => getMenuDataWithState({ menuData: menuData ?? getDataToSkeleton(), moduleSelectedId }), [menuData, moduleSelectedId]);
|
|
29
25
|
const isMobile = useIsMobile();
|
|
@@ -43,8 +39,7 @@ const SideBar = memo((props) => {
|
|
|
43
39
|
moduleSelectedId,
|
|
44
40
|
expandedWidth,
|
|
45
41
|
companyName,
|
|
46
|
-
companySlogan
|
|
47
|
-
urlIconPrefix
|
|
42
|
+
companySlogan
|
|
48
43
|
},
|
|
49
44
|
children: !isMobile ? /* @__PURE__ */ jsx(SideBarDesktop, {}) : /* @__PURE__ */ jsx(SideBarMobile, {})
|
|
50
45
|
}
|
|
@@ -10,9 +10,9 @@ export {
|
|
|
10
10
|
CONTAINER_BTN_ANCHORED as C,
|
|
11
11
|
ITEM_ACTIVE as I,
|
|
12
12
|
LIST_MENU_ITEM as L,
|
|
13
|
-
|
|
13
|
+
PATH_ARROW_RIGHT_ICON as P,
|
|
14
14
|
SIDEBAR_KEY_COMPONENT as S,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
ITEM_IN_TREE_ACTIVE as a,
|
|
16
|
+
PATH_ICONS as b,
|
|
17
17
|
PATH_ARROW_DOWN_ICON as c
|
|
18
18
|
};
|
|
@@ -31,8 +31,7 @@ const SideBarProvider = (props) => {
|
|
|
31
31
|
expandedWidth,
|
|
32
32
|
moduleSelectedId,
|
|
33
33
|
companyName,
|
|
34
|
-
companySlogan
|
|
35
|
-
urlIconPrefix
|
|
34
|
+
companySlogan
|
|
36
35
|
} = value;
|
|
37
36
|
return (
|
|
38
37
|
// Proporcionar el contexto con las propiedades desestructuradas
|
|
@@ -51,8 +50,7 @@ const SideBarProvider = (props) => {
|
|
|
51
50
|
moduleSelectedId,
|
|
52
51
|
expandedWidth,
|
|
53
52
|
companyName,
|
|
54
|
-
companySlogan
|
|
55
|
-
urlIconPrefix
|
|
53
|
+
companySlogan
|
|
56
54
|
},
|
|
57
55
|
children
|
|
58
56
|
}
|
|
@@ -7,7 +7,7 @@ import { C as ContentGroups } from "../ContentGroups/index.js";
|
|
|
7
7
|
import { F as FooterSidebar } from "../FooterSidebar/index.js";
|
|
8
8
|
import { H as HeaderSidebar } from "../HeaderSidebar/index.js";
|
|
9
9
|
import { a as getComponentSlotRoot } from "../../../../utils/getComponentSlotRoot.js";
|
|
10
|
-
import {
|
|
10
|
+
import { P as PATH_ARROW_RIGHT_ICON, C as CONTAINER_BTN_ANCHORED } from "../../constants.js";
|
|
11
11
|
import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
|
|
12
12
|
import { I as IconButton } from "../../../mui_extended/IconButton/IconButton.js";
|
|
13
13
|
const ContentComponent = () => {
|
package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js
CHANGED
|
@@ -9,15 +9,17 @@ import { g as getNameDataTestId } from "../../../../tests/utils.js";
|
|
|
9
9
|
import { A as ArrowIcon } from "./subcomponents/ArrowIcon/index.js";
|
|
10
10
|
import { h as ContainerMenuItemsStyled } from "../../../../slots/SideBarSlots.js";
|
|
11
11
|
import { a as getComponentSlotRoot } from "../../../../../../utils/getComponentSlotRoot.js";
|
|
12
|
-
import { I as ITEM_ACTIVE,
|
|
12
|
+
import { I as ITEM_ACTIVE, a as ITEM_IN_TREE_ACTIVE, b as PATH_ICONS, L as LIST_MENU_ITEM } from "../../../../constants.js";
|
|
13
|
+
import { useEnvironment } from "@m4l/core";
|
|
13
14
|
import { u as useComponentSize } from "../../../../../../hooks/useComponentSize/useComponentSize.js";
|
|
14
15
|
import { M as MenuItem } from "../../../../../mui_extended/MenuItem/MenuItem.js";
|
|
15
16
|
function ContainerMenuItemsMain(props) {
|
|
16
17
|
const { item, size } = props;
|
|
17
|
-
const { onMenuItemClick, onToggleVisible
|
|
18
|
+
const { onMenuItemClick, onToggleVisible } = useSideBar();
|
|
18
19
|
const [openSub, setOpenSub] = useState(props.openSubItem ?? false);
|
|
19
20
|
const hasChildren = item.children && Array.isArray(item.children) && item.children.length > 0;
|
|
20
21
|
const isMobile = useIsMobile();
|
|
22
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
21
23
|
const { currentSize } = useComponentSize(size);
|
|
22
24
|
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
23
25
|
const ownerState = {
|
|
@@ -47,7 +49,7 @@ function ContainerMenuItemsMain(props) {
|
|
|
47
49
|
className: clsx(item.active ? ITEM_ACTIVE : ITEM_IN_TREE_ACTIVE),
|
|
48
50
|
label: item.title,
|
|
49
51
|
selected: item.active || item.itemInTreeActive,
|
|
50
|
-
startIcon: `${
|
|
52
|
+
startIcon: `${host_static_assets}/${environment_assets}${PATH_ICONS}${item.iconUrl}`,
|
|
51
53
|
endIcon: hasChildren ? /* @__PURE__ */ jsx(ArrowIcon, { openState: openSub, active: item.active }) : null,
|
|
52
54
|
onClick: () => handlerClick(),
|
|
53
55
|
size: adjustedSize
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as getHeightSizeStyles } from "../../../../../../utils/getSizeStyles/getSizeStyles.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as ITEM_IN_TREE_ACTIVE, I as ITEM_ACTIVE } from "../../../../constants.js";
|
|
3
3
|
const containerMenuItemsMainStyles = {
|
|
4
4
|
/**
|
|
5
5
|
* Style aplicado al contenedor de los items del menú
|
|
@@ -68,10 +68,6 @@ export interface SideBarProps {
|
|
|
68
68
|
* Tamaño del componente, puede ser uno de los valores definidos en 'small' , 'medium'
|
|
69
69
|
*/
|
|
70
70
|
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
71
|
-
/**
|
|
72
|
-
* Prefijo de la url de los iconos
|
|
73
|
-
*/
|
|
74
|
-
urlIconPrefix?: string;
|
|
75
71
|
}
|
|
76
72
|
/**
|
|
77
73
|
* Interface que representa el estado de un elemento de menú en la barra lateral.
|
|
@@ -31,7 +31,7 @@ export interface RHFAutocompleteProps<T, Multiple extends boolean | undefined =
|
|
|
31
31
|
dataTestid?: string;
|
|
32
32
|
options: T[];
|
|
33
33
|
getOptionLabel: (option: T | AutocompleteFreeSoloValueMapping<FreeSolo>) => string;
|
|
34
|
-
isOptionEqualToValue: (
|
|
34
|
+
isOptionEqualToValue: (option: T, value: T) => boolean;
|
|
35
35
|
skeletonWidth?: string | number;
|
|
36
36
|
loading?: boolean;
|
|
37
37
|
refresh?: () => void;
|
|
@@ -7,7 +7,6 @@ function RHFAutocompleteAsync(props) {
|
|
|
7
7
|
const {
|
|
8
8
|
name,
|
|
9
9
|
endPoint,
|
|
10
|
-
responseToCamelCase,
|
|
11
10
|
label,
|
|
12
11
|
timeout = 5e3,
|
|
13
12
|
parms,
|
|
@@ -79,7 +78,6 @@ function RHFAutocompleteAsync(props) {
|
|
|
79
78
|
timeout,
|
|
80
79
|
isExternalUrl,
|
|
81
80
|
parms: { ...parms, ...filterParms },
|
|
82
|
-
responseToCamelCase,
|
|
83
81
|
isRemote
|
|
84
82
|
}).then((response) => {
|
|
85
83
|
if (cancel) {
|
|
@@ -5,7 +5,6 @@ import { RHFAutocompleteAsyncSlots } from './slots';
|
|
|
5
5
|
import { Theme } from '@mui/material';
|
|
6
6
|
export interface RHFAutocompleteAsyncBaseProps<T extends any = unknown> extends Omit<RHFAutocompleteProps<T>, 'options'> {
|
|
7
7
|
endPoint: string;
|
|
8
|
-
responseToCamelCase?: boolean;
|
|
9
8
|
timeout?: number;
|
|
10
9
|
parms?: Record<string, any>;
|
|
11
10
|
isExternalUrl?: boolean;
|
|
@@ -15,7 +15,10 @@ export type IconButtonSize = 'small' | 'medium';
|
|
|
15
15
|
export interface IconButtonProps extends Omit<IconProps, 'size' | 'color' | 'src' | 'selected' | 'enabledSelected'>, Omit<MUIIconButtonProps, 'size' | 'color' | 'disabled' | 'src'>, Pick<BadgeProps, 'badgeContent'>, Pick<TooltipProps, 'placement'> {
|
|
16
16
|
/** Define el uso de tooltip en IconButton */
|
|
17
17
|
tooltip?: string;
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated
|
|
20
|
+
* Representa la identificación del tooltip en el diccionario para que designe internamente el getLabel
|
|
21
|
+
*/
|
|
19
22
|
dictionaryTooltipId?: string;
|
|
20
23
|
/** Variante del componente, modifica la apariencia gráfica */
|
|
21
24
|
variant?: IconButtonVariants;
|
package/index.js
CHANGED
|
@@ -58,12 +58,10 @@ import { u as u12 } from "./components/DataGrid/formatters/ColumnChipStatusForma
|
|
|
58
58
|
import { D as D3 } from "./components/DragResizeWindowRND/DragResizeWindowRND.js";
|
|
59
59
|
import { d as d2 } from "./components/DragResizeWindowRND/classes/index.js";
|
|
60
60
|
import { a as a4 } from "./components/DynamicFilter/dictionary.js";
|
|
61
|
-
import {
|
|
62
|
-
import { g as g8 } from "./components/DynamicFilter/helpers/getRawFiltersForNetwork.js";
|
|
61
|
+
import { g as g7, a as a5 } from "./components/DynamicFilter/helpers/frontEndHelpers.js";
|
|
63
62
|
import { D as D4 } from "./components/DynamicFilter/DynamicFilter.js";
|
|
64
63
|
import { a as a6 } from "./components/DynamicSort/dictionary.js";
|
|
65
64
|
import { S as S2 } from "./components/DynamicSort/helpers/frontEndHelpers.js";
|
|
66
|
-
import { g as g9 } from "./components/DynamicSort/helpers/getRawSortsForNetwork.js";
|
|
67
65
|
import { D as D5 } from "./components/DynamicSort/DynamicSort.js";
|
|
68
66
|
import { R } from "./components/extended/React-Resizable/Resizable/Resizable.js";
|
|
69
67
|
import { R as R2 } from "./components/extended/React-Resizable/ResizableBox/ResizableBox.js";
|
|
@@ -80,7 +78,7 @@ import { L as L3 } from "./components/mui_extended/LinearProgress/index.js";
|
|
|
80
78
|
import { L as L4 } from "./components/mui_extended/LinkWithRoute/index.js";
|
|
81
79
|
import { L as L5 } from "./components/mui_extended/LoadingButton/LoadingButton.js";
|
|
82
80
|
import { P as P2 } from "./components/Pager/Pager.js";
|
|
83
|
-
import { g as
|
|
81
|
+
import { g as g8 } from "./components/Pager/dicctionary.js";
|
|
84
82
|
import { A as A15 } from "./components/mui_extended/Accordion/Accordion.js";
|
|
85
83
|
import { T as T3 } from "./components/mui_extended/Tooltip/Tooltip.js";
|
|
86
84
|
import { I as I2 } from "./components/mui_extended/IconButton/IconButton.js";
|
|
@@ -109,15 +107,15 @@ import { N as N2 } from "./components/mui_extended/NavLink/NavLink.js";
|
|
|
109
107
|
import { D as D6 } from "./components/mui_extended/Dialog/Dialog.js";
|
|
110
108
|
import { B as B6 } from "./components/formatters/BooleanFormatter/BooleanFormatter.js";
|
|
111
109
|
import { C as C15 } from "./components/formatters/ChipStatusFormatter/ChipStatusFormatter.js";
|
|
112
|
-
import { D as D7, g as
|
|
113
|
-
import { U, g as
|
|
114
|
-
import { P as P4, g as
|
|
115
|
-
import { C as C16, g as
|
|
110
|
+
import { D as D7, g as g9 } from "./components/formatters/DateFormatter/DateFormatter.js";
|
|
111
|
+
import { U, g as g10 } from "./components/formatters/UncertaintyFormatter/UncertaintyFormatter.js";
|
|
112
|
+
import { P as P4, g as g11 } from "./components/formatters/PointsFormatter/PointsFormatter.js";
|
|
113
|
+
import { C as C16, g as g12 } from "./components/formatters/ConcatenatedFormatter/ConcatenatedFormatter.js";
|
|
116
114
|
import { P as P5, u as u13 } from "./components/formatters/PeriodFormatter/PeriodFormatter.js";
|
|
117
|
-
import { P as P6, g as
|
|
118
|
-
import { g as
|
|
115
|
+
import { P as P6, g as g13 } from "./components/formatters/PriceFormatter/PriceFormatter.js";
|
|
116
|
+
import { g as g14 } from "./components/formatters/DistanceToNowFormatter/dictionary.js";
|
|
119
117
|
import { D as D8 } from "./components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.js";
|
|
120
|
-
import { g as
|
|
118
|
+
import { g as g15 } from "./components/formatters/dictionary.js";
|
|
121
119
|
import { G } from "./components/GridLayout/GridLayout.js";
|
|
122
120
|
import { R as R3 } from "./components/GridLayout/subcomponents/Responsive/index.js";
|
|
123
121
|
import { c as c2, d as d3, e } from "./components/GridLayout/subcomponents/Responsive/responsiveUtils.js";
|
|
@@ -126,9 +124,9 @@ import { w } from "./components/GridLayout/subcomponents/withSizeProvider/index.
|
|
|
126
124
|
import { H as H2 } from "./components/HelmetPage/index.js";
|
|
127
125
|
import { H as H3 } from "./components/HelperError/HelperError.js";
|
|
128
126
|
import { R as R4 } from "./components/hook-form/RHFAutocomplete/RHFAutocomplete.js";
|
|
129
|
-
import { g as
|
|
127
|
+
import { g as g16 } from "./components/hook-form/RHFAutocomplete/dictionary.js";
|
|
130
128
|
import { R as R5 } from "./components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.js";
|
|
131
|
-
import { g as
|
|
129
|
+
import { g as g17 } from "./components/hook-form/RHFAutocompleteAsync/dictionary.js";
|
|
132
130
|
import { R as R6 } from "./components/hook-form/RHFDateTime/RHFDateTime.js";
|
|
133
131
|
import { R as R7 } from "./components/hook-form/RHFMultiCheckbox/index.js";
|
|
134
132
|
import { R as R8 } from "./components/hook-form/RHFSelect/RHFSelect.js";
|
|
@@ -140,7 +138,7 @@ import { R as R13 } from "./components/hook-form/RHFColorPicker/RFHColorPicker.j
|
|
|
140
138
|
import { R as R14 } from "./components/hook-form/RHFCheckbox/RHFCheckbox.js";
|
|
141
139
|
import { R as R15 } from "./components/hook-form/RHFTextField/RHFTextField.js";
|
|
142
140
|
import { R as R16 } from "./components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.js";
|
|
143
|
-
import { g as
|
|
141
|
+
import { g as g18 } from "./components/hook-form/RHFPeriod/subcomponents/Period/dictionary.js";
|
|
144
142
|
import { r } from "./components/hook-form/RHFPeriod/RHFPeriod.styles.js";
|
|
145
143
|
import { R as R17 } from "./components/hook-form/RHFPeriod/RHFPeriod.js";
|
|
146
144
|
import { R as R18 } from "./components/hook-form/RHFPeriod/constants.js";
|
|
@@ -154,20 +152,20 @@ import { L as L7 } from "./components/LanguagePopover/LanguagePopover.js";
|
|
|
154
152
|
import { L as L8 } from "./components/LinearProgressIndeterminate/LinearProgressIndeterminate.js";
|
|
155
153
|
import { L as L9 } from "./components/Loadable/index.js";
|
|
156
154
|
import { L as L10 } from "./components/LoadingError/LoadingError.js";
|
|
157
|
-
import { g as
|
|
158
|
-
import {
|
|
159
|
-
import { a as
|
|
155
|
+
import { g as g19 } from "./components/LoadingError/dictionary.js";
|
|
156
|
+
import { a as a8 } from "./components/MenuActions/dictionary.js";
|
|
157
|
+
import { a as a9, M as M3 } from "./components/MenuActions/MenuActions.js";
|
|
160
158
|
import { M as M4 } from "./components/MFIsolationApp/MFIsolationApp.js";
|
|
161
159
|
import { M as M5 } from "./components/MFLoader/MFLoader.js";
|
|
162
|
-
import { g as
|
|
160
|
+
import { g as g20 } from "./components/MFLoader/dictionary.js";
|
|
163
161
|
import { N as N3 } from "./components/NoItemSelected/NoItemSelected.js";
|
|
164
|
-
import { g as
|
|
162
|
+
import { g as g21 } from "./components/NoItemSelected/dictionary.js";
|
|
165
163
|
import { O } from "./components/ObjectLogs/ObjectLogs.js";
|
|
166
|
-
import { d as d4, g as
|
|
164
|
+
import { d as d4, g as g22 } from "./components/ObjectLogs/dictionary.js";
|
|
167
165
|
import { P as P8 } from "./components/PaperForm/PaperForm.js";
|
|
168
166
|
import { P as P9 } from "./components/PDFViewer/PDFViewer.js";
|
|
169
167
|
import { u as u14 } from "./components/popups/components/PopupsProvider/hooks/usePopupsStore.js";
|
|
170
|
-
import { a as
|
|
168
|
+
import { a as a10, P as P10 } from "./components/popups/components/PopupsProvider/contexts/PopupsContext/PopupsContext.js";
|
|
171
169
|
import { P as P11 } from "./components/popups/components/PopupsViewer/PopupsViewer.js";
|
|
172
170
|
import { P as P12 } from "./components/PrintingSystem/PrintingSystem.js";
|
|
173
171
|
import { P as P13 } from "./components/PropertyValue/PropertyValue.js";
|
|
@@ -177,43 +175,43 @@ import { T as T18 } from "./components/ToastContainer/ToastContainer.js";
|
|
|
177
175
|
import { T as T19 } from "./components/ToastContainer/subcomponents/ToastMessage/ToastMessage.js";
|
|
178
176
|
import { W } from "./components/WindowBase/WindowBase.js";
|
|
179
177
|
import { u as u15 } from "./components/WindowBase/hooks/useWindowToolsMF/index.js";
|
|
180
|
-
import { a as
|
|
181
|
-
import { M as M6, W as W2, a as
|
|
178
|
+
import { a as a11, u as u16 } from "./components/WindowBase/hooks/useDynamicMFParameters/index.js";
|
|
179
|
+
import { M as M6, W as W2, a as a12 } from "./components/WindowBase/contexts/WindowToolsMFContext/WindowToolsMFContext.js";
|
|
182
180
|
import { c as c3 } from "./components/WindowBase/contexts/DynamicMFParmsContext/store.js";
|
|
183
|
-
import { D as D9, a as
|
|
181
|
+
import { D as D9, a as a13, M as M7 } from "./components/WindowBase/contexts/DynamicMFParmsContext/DynamicMFParmsContext.js";
|
|
184
182
|
import { W as W3 } from "./components/WindowConfirm/WindowConfirm.js";
|
|
185
|
-
import { a as
|
|
183
|
+
import { a as a14, g as g23 } from "./components/ModalDialog/dictionary.js";
|
|
186
184
|
import { M as M8 } from "./components/ModalDialog/ModalDialog.js";
|
|
187
185
|
import { F as F2, R as R22, u as u17 } from "./components/hook-form/RHFormContext/index.js";
|
|
188
|
-
import { g as
|
|
186
|
+
import { g as g24 } from "./components/hook-form/RHFormContext/dictionary.js";
|
|
189
187
|
import { u as u18 } from "./contexts/AppearanceComponentContext/useAppearanceComponentStore.js";
|
|
190
188
|
import { A as A16 } from "./contexts/AppearanceComponentContext/AppearanceComponentContext.js";
|
|
191
|
-
import { a as
|
|
189
|
+
import { a as a15, M as M9 } from "./contexts/ModalContext/index.js";
|
|
192
190
|
import { u as u19 } from "./hooks/useFormAddEdit/index.js";
|
|
193
191
|
import { u as u20 } from "./hooks/useModal/index.js";
|
|
194
192
|
import { u as u21 } from "./hooks/useTab/index.js";
|
|
195
|
-
import { g as
|
|
193
|
+
import { g as g25 } from "./hooks/useFormAddEdit/dictionary.js";
|
|
196
194
|
import { u as u22 } from "./hooks/useFormFocus/index.js";
|
|
197
195
|
import { u as u23 } from "./hooks/useInterval/index.js";
|
|
198
196
|
import { u as u24 } from "./hooks/useComponentSize/useComponentSize.js";
|
|
199
197
|
import { u as u25 } from "./hooks/useFormReadyForUpdate/index.js";
|
|
200
198
|
import { u as u26 } from "./hooks/useStateRef/index.js";
|
|
201
|
-
import { a as
|
|
199
|
+
import { a as a16 } from "./hooks/useSvgColor/constants.js";
|
|
202
200
|
import { u as u27 } from "./hooks/useSvgColor/useSvgColor.js";
|
|
203
201
|
import { u as u28 } from "./hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js";
|
|
204
202
|
import { u as u29 } from "./hooks/useDataGridPersistence/useDataGridPersistence.js";
|
|
205
203
|
import { c as c4 } from "./utils/capitalizeFirstLetter.js";
|
|
206
204
|
import { i as i2 } from "./utils/isValidDate.js";
|
|
207
|
-
import { g as
|
|
208
|
-
import { g as
|
|
209
|
-
import { g as
|
|
210
|
-
import { g as
|
|
211
|
-
import { a as
|
|
205
|
+
import { g as g26 } from "./utils/getComponentUtilityClass.js";
|
|
206
|
+
import { g as g27 } from "./utils/getPaletteColor.js";
|
|
207
|
+
import { g as g28 } from "./utils/getTypographyStyles.js";
|
|
208
|
+
import { g as g29 } from "./utils/getIconColor.js";
|
|
209
|
+
import { a as a17 } from "./utils/getSizeStyles/getSizeStyles.js";
|
|
212
210
|
import { O as O2 } from "./utils/ObjectQueue.js";
|
|
213
|
-
import { g as
|
|
211
|
+
import { g as g30, a as a18 } from "./utils/getComponentSlotRoot.js";
|
|
214
212
|
import { f } from "./utils/formatDistanceToNow/formatDistanteToNow.js";
|
|
215
|
-
import { g as
|
|
216
|
-
import { g as
|
|
213
|
+
import { g as g31 } from "./utils/getValidDate.js";
|
|
214
|
+
import { g as g32 } from "./utils/getNullGuard.js";
|
|
217
215
|
export {
|
|
218
216
|
A7 as AREAS_DICCTIONARY,
|
|
219
217
|
a3 as AREAS_DICTIONARY_ID,
|
|
@@ -263,7 +261,7 @@ export {
|
|
|
263
261
|
D3 as DragResizeWindowRND,
|
|
264
262
|
D4 as DynamicFilter,
|
|
265
263
|
D9 as DynamicMFParmsContext,
|
|
266
|
-
|
|
264
|
+
a13 as DynamicMFParmsProvider,
|
|
267
265
|
D5 as DynamicSort,
|
|
268
266
|
F as FixedSizeList,
|
|
269
267
|
F2 as FormProviderCustom,
|
|
@@ -289,10 +287,10 @@ export {
|
|
|
289
287
|
M4 as MFIsolationApp,
|
|
290
288
|
M5 as MFLoader,
|
|
291
289
|
M7 as MemonizedDynamicMFParmsProvider,
|
|
292
|
-
|
|
290
|
+
a9 as MemonizedMenuActions,
|
|
293
291
|
M6 as MemonizedWindowToolsMFContext,
|
|
294
292
|
M3 as MenuActions,
|
|
295
|
-
|
|
293
|
+
a15 as ModalContext,
|
|
296
294
|
M8 as ModalDialog,
|
|
297
295
|
M9 as ModalProvider,
|
|
298
296
|
M as MotionContainer,
|
|
@@ -309,7 +307,7 @@ export {
|
|
|
309
307
|
P7 as PeriodRootStyled,
|
|
310
308
|
P4 as PointsFormatter,
|
|
311
309
|
P3 as Popover,
|
|
312
|
-
|
|
310
|
+
a10 as PopupsContext,
|
|
313
311
|
P10 as PopupsProvider,
|
|
314
312
|
P11 as PopupsViewer,
|
|
315
313
|
P6 as PriceFormatter,
|
|
@@ -338,7 +336,7 @@ export {
|
|
|
338
336
|
R as Resizable,
|
|
339
337
|
R2 as ResizableBox,
|
|
340
338
|
R3 as Responsive,
|
|
341
|
-
|
|
339
|
+
a16 as SKELETON_SVG_ICON,
|
|
342
340
|
S7 as ScrollBar,
|
|
343
341
|
S as SectionCommercial,
|
|
344
342
|
S6 as SelectStyled,
|
|
@@ -372,7 +370,7 @@ export {
|
|
|
372
370
|
W as WindowBase,
|
|
373
371
|
W3 as WindowConfirm,
|
|
374
372
|
W2 as WindowToolsMFContext,
|
|
375
|
-
|
|
373
|
+
a12 as WindowToolsMFProvider,
|
|
376
374
|
c2 as addLayoutItemToBreakPointIfNoExists,
|
|
377
375
|
d3 as addLayoutItemToBreakPoints,
|
|
378
376
|
c4 as capitalizeFirstLetter,
|
|
@@ -388,43 +386,41 @@ export {
|
|
|
388
386
|
b2 as getAreasComponentsDictionary,
|
|
389
387
|
g3 as getAreasDictionary,
|
|
390
388
|
g4 as getCommonActionsDictionary,
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
389
|
+
g30 as getComponentClasses,
|
|
390
|
+
a18 as getComponentSlotRoot,
|
|
391
|
+
g26 as getComponentUtilityClass,
|
|
394
392
|
g5 as getDataGridComponentsDictionary,
|
|
395
393
|
g6 as getDataGridRowsFromSet,
|
|
396
|
-
|
|
394
|
+
g14 as getDistanceToNowFormatterComponentsDictionary,
|
|
397
395
|
a4 as getDynamicFilterComponentsDictionary,
|
|
398
396
|
a6 as getDynamicSortComponentsDictionary,
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
g31 as
|
|
425
|
-
|
|
426
|
-
g34 as getValidDate,
|
|
427
|
-
g28 as getformAddEditDictionary,
|
|
397
|
+
g7 as getFilterGroupFieldsByName,
|
|
398
|
+
g24 as getFormComponentsDictionary,
|
|
399
|
+
g12 as getFormatConcatenated,
|
|
400
|
+
g9 as getFormatDate,
|
|
401
|
+
g11 as getFormatPoints,
|
|
402
|
+
g13 as getFormatPrice,
|
|
403
|
+
g15 as getFormattersComponentsDictionary,
|
|
404
|
+
a17 as getHeightSizeStyles,
|
|
405
|
+
g29 as getIconColor,
|
|
406
|
+
a5 as getIsIfInDynamicFilter,
|
|
407
|
+
g19 as getLoadingErrorComponentsDictionary,
|
|
408
|
+
g20 as getMFLoaderComponentsDictionary,
|
|
409
|
+
a8 as getMenuActionsComponentsDictionary,
|
|
410
|
+
a14 as getModalDialogComponentsDictionary,
|
|
411
|
+
g23 as getModalDictionary,
|
|
412
|
+
g21 as getNoItemSelectedComponentsDictionary,
|
|
413
|
+
g32 as getNullGuard,
|
|
414
|
+
g22 as getObjectLogsComponentsDictionary,
|
|
415
|
+
g8 as getPagerComponentsDictionary,
|
|
416
|
+
g27 as getPaletteColor,
|
|
417
|
+
g18 as getPeriodComponetsDictionary,
|
|
418
|
+
g17 as getRHFAutocompleteAsyncComponentsDictionary,
|
|
419
|
+
g16 as getRHFAutocompleteComponentsDictionary,
|
|
420
|
+
g28 as getTypographyStyles,
|
|
421
|
+
g10 as getUncertaintyFormat,
|
|
422
|
+
g31 as getValidDate,
|
|
423
|
+
g25 as getformAddEditDictionary,
|
|
428
424
|
i as isEqualLayout,
|
|
429
425
|
k as isEqualLayouts,
|
|
430
426
|
i2 as isValidDate,
|
|
@@ -447,7 +443,7 @@ export {
|
|
|
447
443
|
u17 as useCustomForm,
|
|
448
444
|
u29 as useDataGridPersistence,
|
|
449
445
|
u28 as useDynamicFilterAndSort,
|
|
450
|
-
|
|
446
|
+
a11 as useDynamicMFParameters,
|
|
451
447
|
u16 as useDynamicMFParametersStore,
|
|
452
448
|
u19 as useFormAddEdit,
|
|
453
449
|
u22 as useFormFocus,
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { RawFilterFieldApply } from '../types';
|
|
2
|
-
type FieldNameTransform = 'none' | 'snakeCase' | 'camelCase';
|
|
3
|
-
/**
|
|
4
|
-
* Transforma los filtros de rawFilter para ser enviados a la red,
|
|
5
|
-
* depurando los campos que no son necesarios y convirtiendo los nombres de los campos a snake_case, camelCase si es necesario
|
|
6
|
-
*/
|
|
7
|
-
export declare const getRawFiltersForNetwork: (rawFilters: RawFilterFieldApply[] | undefined, fieldNameTransform?: FieldNameTransform) => {
|
|
8
|
-
n: string;
|
|
9
|
-
o: import('../types').Operator;
|
|
10
|
-
o1: import('@m4l/core').Maybe<import('../types').OperandType>;
|
|
11
|
-
o2?: import('@m4l/core').Maybe<import('../types').OperandType>;
|
|
12
|
-
oa?: import('@m4l/core').Maybe<import('../types').OperandType[]>;
|
|
13
|
-
}[];
|
|
14
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import snakeCase from "lodash-es/snakeCase";
|
|
2
|
-
import camelCase from "lodash-es/camelCase";
|
|
3
|
-
const getRawFiltersForNetwork = (rawFilters, fieldNameTransform = "none") => {
|
|
4
|
-
if (!rawFilters) {
|
|
5
|
-
return [];
|
|
6
|
-
}
|
|
7
|
-
return rawFilters.map((rawFilter) => {
|
|
8
|
-
const { ft, ...fieldObject } = rawFilter;
|
|
9
|
-
if (fieldNameTransform === "snakeCase") {
|
|
10
|
-
fieldObject.n = snakeCase(fieldObject.n);
|
|
11
|
-
} else if (fieldNameTransform === "camelCase") {
|
|
12
|
-
fieldObject.n = camelCase(fieldObject.n);
|
|
13
|
-
}
|
|
14
|
-
return fieldObject;
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
getRawFiltersForNetwork as g
|
|
19
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { RawSortFieldApply } from '../types';
|
|
2
|
-
type FieldNameTransform = 'none' | 'snakeCase' | 'camelCase';
|
|
3
|
-
/**
|
|
4
|
-
* Transforma los filtros de rawFilter para ser enviados a la red,
|
|
5
|
-
* depurando los campos que no son necesarios y convirtiendo los nombres de los campos a snake_case, camelCase si es necesario
|
|
6
|
-
*/
|
|
7
|
-
export declare const getRawSortsForNetwork: (rawSorts: RawSortFieldApply[] | undefined, fieldNameTransform?: FieldNameTransform) => {
|
|
8
|
-
n: string;
|
|
9
|
-
o: import('../types').SortOperator;
|
|
10
|
-
ft: import('../types').SortFieldType;
|
|
11
|
-
}[];
|
|
12
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import snakeCase from "lodash-es/snakeCase";
|
|
2
|
-
import camelCase from "lodash-es/camelCase";
|
|
3
|
-
const getRawSortsForNetwork = (rawSorts, fieldNameTransform = "none") => {
|
|
4
|
-
if (!rawSorts) {
|
|
5
|
-
return [];
|
|
6
|
-
}
|
|
7
|
-
const ret = rawSorts.map((rawSort) => {
|
|
8
|
-
const { ...fieldObject } = rawSort;
|
|
9
|
-
if (fieldNameTransform === "snakeCase") {
|
|
10
|
-
fieldObject.n = snakeCase(fieldObject.n);
|
|
11
|
-
} else if (fieldNameTransform === "camelCase") {
|
|
12
|
-
fieldObject.n = camelCase(fieldObject.n);
|
|
13
|
-
}
|
|
14
|
-
return fieldObject;
|
|
15
|
-
});
|
|
16
|
-
return ret;
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
getRawSortsForNetwork as g
|
|
20
|
-
};
|