@gridsuite/commons-ui 0.56.0 → 0.58.0
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/dist/_mocks_/svg.d.ts +4 -0
- package/dist/_mocks_/svg.js +8 -0
- package/dist/chunks/{criteria-based-filter-edition-dialog.DxqH-mLe.js → criteria-based-filter-edition-dialog.CbhgOSRk.js} +140 -111
- package/dist/chunks/{filter-properties.GRon8-ML.js → filter-properties.B7-q_yPf.js} +4 -4
- package/dist/components/DirectoryItemSelector/directory-item-selector.js +2 -1
- package/dist/components/ElementSearchDialog/element-search-dialog.d.ts +18 -15
- package/dist/components/ElementSearchDialog/element-search-dialog.js +28 -65
- package/dist/components/ElementSearchDialog/equipment-item.js +4 -3
- package/dist/components/OverflowableText/overflowable-text.js +39 -9
- package/dist/components/TopBar/TopBar.js +371 -429
- package/dist/components/TreeViewFinder/TreeViewFinder.js +1 -1
- package/dist/components/TreeViewFinder/index.d.ts +7 -0
- package/dist/components/dialogs/custom-mui-dialog.d.ts +2 -1
- package/dist/components/dialogs/custom-mui-dialog.js +6 -4
- package/dist/components/dialogs/description-modification-dialog.js +2 -2
- package/dist/components/dialogs/modify-element-selection.d.ts +14 -0
- package/dist/components/dialogs/modify-element-selection.js +108 -0
- package/dist/components/dialogs/popup-confirmation-dialog.js +1 -1
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.d.ts +1 -2
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.js +4 -4
- package/dist/components/filter/criteria-based/criteria-based-filter-form.js +5 -3
- package/dist/components/filter/criteria-based/criteria-based-filter-utils.d.ts +12 -6
- package/dist/components/filter/criteria-based/criteria-based-filter-utils.js +44 -4
- package/dist/components/filter/criteria-based/criteria-based-form.d.ts +2 -0
- package/dist/components/filter/criteria-based/criteria-based-form.js +6 -6
- package/dist/components/filter/criteria-based/filter-free-properties.js +5 -5
- package/dist/components/filter/criteria-based/filter-properties.js +3 -3
- package/dist/components/filter/criteria-based/filter-property.js +3 -3
- package/dist/components/filter/{constants → expert}/expert-filter-constants.d.ts +5 -0
- package/dist/components/filter/{constants → expert}/expert-filter-constants.js +12 -6
- package/dist/components/filter/expert/expert-filter-edition-dialog.d.ts +3 -3
- package/dist/components/filter/expert/expert-filter-edition-dialog.js +5 -6
- package/dist/components/filter/expert/expert-filter-form.js +5 -5
- package/dist/components/filter/expert/expert-filter-utils.d.ts +73 -1
- package/dist/components/filter/expert/expert-filter-utils.js +8 -6
- package/dist/components/filter/expert/expert-filter.type.d.ts +1 -0
- package/dist/components/filter/expert/expert-filter.type.js +1 -0
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.d.ts +0 -2
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.js +4 -4
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.d.ts +10 -2
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.js +12 -8
- package/dist/components/filter/filter-context.d.ts +1 -0
- package/dist/components/filter/filter-context.js +2 -1
- package/dist/components/filter/filter-creation-dialog.d.ts +5 -2
- package/dist/components/filter/filter-creation-dialog.js +3 -3
- package/dist/components/filter/filter-form.d.ts +4 -0
- package/dist/components/filter/filter-form.js +6 -5
- package/dist/components/filter/utils/filter-api.d.ts +5 -0
- package/dist/components/filter/utils/{filters-utils.js → filter-api.js} +16 -10
- package/dist/components/filter/utils/filter-form-utils.d.ts +17 -0
- package/dist/components/filter/utils/{criteria-based-utils.js → filter-form-utils.js} +5 -45
- package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/bottom-right-buttons.js +1 -1
- package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/csv-uploader/csv-uploader.js +23 -23
- package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/custom-ag-grid-table.js +2 -2
- package/dist/components/{react-hook-form → inputs/react-hook-form/autocomplete-inputs}/autocomplete-input.d.ts +3 -3
- package/dist/components/{react-hook-form → inputs/react-hook-form/autocomplete-inputs}/autocomplete-input.js +4 -4
- package/dist/components/{react-hook-form → inputs/react-hook-form}/autocomplete-inputs/multiple-autocomplete-input.js +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/directory-items-input.js +5 -5
- package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/integer-input.d.ts +3 -3
- package/dist/components/{react-hook-form → inputs/react-hook-form}/provider/custom-form-provider.js +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/range-input.d.ts +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/range-input.js +2 -2
- package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/countries-input.d.ts +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/countries-input.js +2 -3
- package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/input-with-popup-confirmation.js +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/select-input.d.ts +2 -2
- package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/select-input.js +4 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/text-input.d.ts +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/unique-name-input.d.ts +2 -2
- package/dist/components/{react-hook-form → inputs/react-hook-form}/unique-name-input.js +2 -2
- package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/text-field-with-adornment.d.ts +1 -1
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/combinator-selector.js +1 -1
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/country-value-editor.js +1 -1
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/custom-react-query-builder.js +3 -3
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/element-value-editor.js +22 -22
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/property-value-editor.js +3 -3
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/remove-button.js +2 -2
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/use-convert-value.js +1 -1
- package/dist/components/inputs/react-query-builder/value-editor.js +18 -0
- package/dist/components/inputs/select-clearable.js +1 -1
- package/dist/components/translations/filter-en.d.ts +22 -0
- package/dist/components/translations/filter-en.js +23 -0
- package/dist/components/translations/filter-fr.d.ts +22 -0
- package/dist/components/translations/filter-fr.js +23 -0
- package/dist/hooks/useDebounce.d.ts +1 -1
- package/dist/hooks/useSnackMessage.d.ts +4 -7
- package/dist/hooks/useSnackMessage.js +36 -43
- package/dist/index.d.ts +53 -39
- package/dist/index.js +129 -116
- package/dist/redux/commonStore.d.ts +15 -0
- package/dist/redux/commonStore.js +11 -0
- package/dist/services/explore.d.ts +4 -0
- package/dist/services/explore.js +34 -0
- package/dist/services/study.d.ts +3 -0
- package/dist/services/study.js +16 -0
- package/dist/services/utils.d.ts +8 -0
- package/dist/services/utils.js +58 -0
- package/dist/utils/AuthService.js +1 -1
- package/dist/utils/types.d.ts +1 -1
- package/package.json +9 -9
- package/dist/components/filter/utils/criteria-based-utils.d.ts +0 -28
- package/dist/components/filter/utils/filters-utils.d.ts +0 -5
- package/dist/components/react-query-builder-inputs/value-editor.js +0 -18
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/ExpandingTextField.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/ExpandingTextField.js +0 -0
- /package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/bottom-right-buttons.d.ts +0 -0
- /package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/cell-editors/numericEditor.d.ts +0 -0
- /package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/cell-editors/numericEditor.js +0 -0
- /package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/csv-uploader/csv-uploader.d.ts +0 -0
- /package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/custom-ag-grid-table.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/autocomplete-inputs/multiple-autocomplete-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/booleans/boolean-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/booleans/boolean-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/booleans/checkbox-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/booleans/checkbox-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/booleans/switch-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/booleans/switch-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/directory-items-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/error-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/error-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/field-error-alert.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/field-error-alert.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/mid-form-error.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/mid-form-error.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/float-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/float-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/integer-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/utils.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/utils.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/provider/custom-form-provider.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/provider/use-custom-form-context.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/provider/use-custom-form-context.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/radio-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/radio-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/raw-read-only-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/raw-read-only-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/input-with-popup-confirmation.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/mui-select-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/mui-select-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/slider-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/slider-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/text-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/cancel-button.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/cancel-button.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/field-label.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/field-label.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/functions.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/functions.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/submit-button.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/submit-button.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/text-field-with-adornment.js +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/add-button.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/add-button.js +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/combinator-selector.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/country-value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/custom-react-query-builder.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/element-value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/property-value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/remove-button.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/text-value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/text-value-editor.js +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/translated-value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/translated-value-editor.js +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/use-convert-value.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/use-valid.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/use-valid.js +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/value-selector.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/value-selector.js +0 -0
- /package/dist/{utils → redux}/actions.d.ts +0 -0
- /package/dist/{utils → redux}/actions.js +0 -0
- /package/dist/{components/filter/constants → utils}/equipment-types.d.ts +0 -0
- /package/dist/{components/filter/constants → utils}/equipment-types.js +0 -0
- /package/dist/{components/filter/constants → utils}/field-constants.d.ts +0 -0
- /package/dist/{components/filter/constants → utils}/field-constants.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { useWatch, useFieldArray } from "react-hook-form";
|
|
4
|
-
import AutocompleteInput from "
|
|
4
|
+
import AutocompleteInput from "./autocomplete-input.js";
|
|
5
5
|
const MultipleAutocompleteInput = ({ name, ...props }) => {
|
|
6
6
|
const [unsavedInput, setUnsavedInput] = useState("");
|
|
7
7
|
const watchAutocompleteValues = useWatch({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { FormControl, Chip, Grid, Tooltip, IconButton } from "@mui/material";
|
|
3
|
-
import { OverflowableText } from "
|
|
3
|
+
import { OverflowableText } from "../../OverflowableText/overflowable-text.js";
|
|
4
4
|
import FieldLabel from "./utils/field-label.js";
|
|
5
5
|
import FolderIcon from "@mui/icons-material/Folder";
|
|
6
6
|
import { useState, useMemo, useContext, useCallback } from "react";
|
|
@@ -8,13 +8,13 @@ import { useFieldArray, useController } from "react-hook-form";
|
|
|
8
8
|
import { useIntl } from "react-intl";
|
|
9
9
|
import MidFormError from "./error-management/mid-form-error.js";
|
|
10
10
|
import { RawReadOnlyInput } from "./raw-read-only-input.js";
|
|
11
|
-
import { mergeSx } from "
|
|
12
|
-
import DirectoryItemSelector from "
|
|
11
|
+
import { mergeSx } from "../../../utils/styles.js";
|
|
12
|
+
import DirectoryItemSelector from "../../DirectoryItemSelector/directory-item-selector.js";
|
|
13
13
|
import { useCustomFormContext } from "./provider/use-custom-form-context.js";
|
|
14
14
|
import { isFieldRequired } from "./utils/functions.js";
|
|
15
15
|
import ErrorInput from "./error-management/error-input.js";
|
|
16
|
-
import { useSnackMessage } from "
|
|
17
|
-
import { FilterContext } from "
|
|
16
|
+
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
17
|
+
import { FilterContext } from "../../filter/filter-context.js";
|
|
18
18
|
const NAME = "name";
|
|
19
19
|
const styles = {
|
|
20
20
|
formDirectoryElements1: {
|
package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/integer-input.d.ts
RENAMED
|
@@ -11,10 +11,10 @@ declare namespace IntegerInput {
|
|
|
11
11
|
text: string;
|
|
12
12
|
} | null | undefined> | undefined;
|
|
13
13
|
customAdornment?: import('react').Validator<import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
14
|
-
outputTransform?: import('react').Validator<((value: string) => import("
|
|
15
|
-
inputTransform?: import('react').Validator<((value: import("
|
|
14
|
+
outputTransform?: import('react').Validator<((value: string) => import("../../../../utils/types").Input | null) | null | undefined> | undefined;
|
|
15
|
+
inputTransform?: import('react').Validator<((value: import("../../../../utils/types").Input) => string) | null | undefined> | undefined;
|
|
16
16
|
acceptValue?: import('react').Validator<((value: string) => boolean) | null | undefined> | undefined;
|
|
17
|
-
previousValue?: import('react').Validator<import("
|
|
17
|
+
previousValue?: import('react').Validator<import("../../../../utils/types").Input | null | undefined> | undefined;
|
|
18
18
|
clearable?: import('react').Validator<boolean | null | undefined> | undefined;
|
|
19
19
|
formProps?: import('react').Validator<Omit<import("@mui/material").TextFieldProps | import("../utils/text-field-with-adornment").TextFieldWithAdornmentProps, "onChange" | "value" | "InputProps" | "inputProps" | "inputRef"> | null | undefined> | undefined;
|
|
20
20
|
};
|
package/dist/components/{react-hook-form → inputs/react-hook-form}/provider/custom-form-provider.js
RENAMED
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createContext } from "react";
|
|
3
3
|
import { FormProvider } from "react-hook-form";
|
|
4
4
|
import * as yup from "yup";
|
|
5
|
-
import { getSystemLanguage } from "
|
|
5
|
+
import { getSystemLanguage } from "../../../../hooks/localized-countries-hook.js";
|
|
6
6
|
const CustomFormContext = createContext({
|
|
7
7
|
removeOptional: false,
|
|
8
8
|
validationSchema: yup.object(),
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useWatch } from "react-hook-form";
|
|
3
3
|
import FloatInput from "./numbers/float-input.js";
|
|
4
|
-
import "
|
|
4
|
+
import "../../../utils/yup-config.js";
|
|
5
5
|
import { FormattedMessage } from "react-intl";
|
|
6
6
|
import { useMemo } from "react";
|
|
7
7
|
import InputLabel from "@mui/material/InputLabel";
|
|
8
8
|
import { Grid } from "@mui/material";
|
|
9
9
|
import FormControl from "@mui/material/FormControl";
|
|
10
10
|
import MuiSelectInput from "./select-inputs/mui-select-input.js";
|
|
11
|
-
import { FieldConstants } from "
|
|
11
|
+
import { FieldConstants } from "../../../utils/field-constants.js";
|
|
12
12
|
import * as yup from "yup";
|
|
13
13
|
const style = {
|
|
14
14
|
inputLegend: (theme) => ({
|
package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/countries-input.js
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Chip } from "@mui/material";
|
|
3
|
-
import AutocompleteInput from "../autocomplete-input.js";
|
|
4
|
-
import { useLocalizedCountries } from "
|
|
3
|
+
import AutocompleteInput from "../autocomplete-inputs/autocomplete-input.js";
|
|
4
|
+
import { useLocalizedCountries } from "../../../../hooks/localized-countries-hook.js";
|
|
5
5
|
import { useCustomFormContext } from "../provider/use-custom-form-context.js";
|
|
6
6
|
const CountriesInput = ({
|
|
7
7
|
name,
|
|
@@ -31,6 +31,5 @@ const CountriesInput = ({
|
|
|
31
31
|
);
|
|
32
32
|
};
|
|
33
33
|
export {
|
|
34
|
-
CountriesInput,
|
|
35
34
|
CountriesInput as default
|
|
36
35
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useController } from "react-hook-form";
|
|
3
3
|
import { useState } from "react";
|
|
4
|
-
import PopupConfirmationDialog from "
|
|
4
|
+
import PopupConfirmationDialog from "../../../dialogs/popup-confirmation-dialog.js";
|
|
5
5
|
const InputWithPopupConfirmation = ({
|
|
6
6
|
Input,
|
|
7
7
|
name,
|
package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/select-input.d.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Option } from '
|
|
1
|
+
import { Option } from '../../../../utils/types.ts';
|
|
2
2
|
import { FunctionComponent } from 'react';
|
|
3
|
-
import { AutocompleteInputProps } from '../autocomplete-input';
|
|
3
|
+
import { AutocompleteInputProps } from '../autocomplete-inputs/autocomplete-input';
|
|
4
4
|
|
|
5
5
|
export interface SelectInputProps extends Omit<AutocompleteInputProps, 'outputTransform' | 'inputTransform' | 'readOnly' | 'getOptionLabel'> {
|
|
6
6
|
options: Option[];
|
package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/select-input.js
RENAMED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import AutocompleteInput from "../autocomplete-input.js";
|
|
2
|
+
import AutocompleteInput from "../autocomplete-inputs/autocomplete-input.js";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
const SelectInput = (props) => {
|
|
5
5
|
const intl = useIntl();
|
|
6
6
|
const inputTransform = (value) => {
|
|
7
|
+
if (value === null) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
7
10
|
if (typeof value === "string") {
|
|
8
11
|
return props.options.find(
|
|
9
12
|
(option) => typeof option !== "string" && (option == null ? void 0 : option.id) === value
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Input } from '
|
|
1
|
+
import { Input } from '../../../utils/types.ts';
|
|
2
2
|
import { TextFieldWithAdornmentProps } from './utils/text-field-with-adornment';
|
|
3
3
|
import { TextFieldProps } from '@mui/material';
|
|
4
4
|
import { FunctionComponent, ReactElement } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { elementExistsType } from '
|
|
1
|
+
import { elementExistsType } from '../../filter/criteria-based/criteria-based-filter-edition-dialog';
|
|
2
2
|
import { UUID } from 'crypto';
|
|
3
|
-
import { ElementType } from '
|
|
3
|
+
import { ElementType } from '../../../utils/ElementType.ts';
|
|
4
4
|
import { TextFieldProps } from '@mui/material';
|
|
5
5
|
import { FunctionComponent } from 'react';
|
|
6
6
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect } from "react";
|
|
3
|
-
import { useDebounce } from "
|
|
3
|
+
import { useDebounce } from "../../../hooks/useDebounce.js";
|
|
4
4
|
import { FormattedMessage } from "react-intl";
|
|
5
5
|
import { InputAdornment } from "@mui/material";
|
|
6
6
|
import CheckIcon from "@mui/icons-material/Check";
|
|
7
7
|
import { useController, useFormContext } from "react-hook-form";
|
|
8
8
|
import CircularProgress from "@mui/material/CircularProgress";
|
|
9
9
|
import TextField from "@mui/material/TextField";
|
|
10
|
-
import { FieldConstants } from "
|
|
10
|
+
import { FieldConstants } from "../../../utils/field-constants.js";
|
|
11
11
|
const UniqueNameInput = ({
|
|
12
12
|
name,
|
|
13
13
|
label,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useCallback } from "react";
|
|
3
|
-
import PopupConfirmationDialog from "
|
|
3
|
+
import PopupConfirmationDialog from "../../dialogs/popup-confirmation-dialog.js";
|
|
4
4
|
import { MaterialValueSelector } from "@react-querybuilder/material";
|
|
5
5
|
const CombinatorSelector = (props) => {
|
|
6
6
|
const [tempCombinator, setTempCombinator] = useState(props.value);
|
|
@@ -3,7 +3,7 @@ import { MaterialValueEditor } from "@react-querybuilder/material";
|
|
|
3
3
|
import { Autocomplete, TextField } from "@mui/material";
|
|
4
4
|
import useConvertValue from "./use-convert-value.js";
|
|
5
5
|
import useValid from "./use-valid.js";
|
|
6
|
-
import { useLocalizedCountries } from "
|
|
6
|
+
import { useLocalizedCountries } from "../../../hooks/localized-countries-hook.js";
|
|
7
7
|
import { useCustomFormContext } from "../react-hook-form/provider/use-custom-form-context.js";
|
|
8
8
|
import { useMemo } from "react";
|
|
9
9
|
const CountryValueEditor = (props) => {
|
|
@@ -7,15 +7,15 @@ import "@react-querybuilder/material";
|
|
|
7
7
|
import "react-querybuilder";
|
|
8
8
|
import "react-intl";
|
|
9
9
|
import "react-hook-form";
|
|
10
|
-
import { j } from "
|
|
10
|
+
import { j } from "../../../chunks/criteria-based-filter-edition-dialog.CbhgOSRk.js";
|
|
11
11
|
import "./combinator-selector.js";
|
|
12
12
|
import "./add-button.js";
|
|
13
13
|
import "./value-selector.js";
|
|
14
14
|
import "react";
|
|
15
|
-
import "
|
|
15
|
+
import "../../filter/expert/expert-filter-constants.js";
|
|
16
16
|
import "../react-hook-form/error-management/error-input.js";
|
|
17
17
|
import "../react-hook-form/error-management/field-error-alert.js";
|
|
18
|
-
import "
|
|
18
|
+
import "../../filter/expert/expert-filter-utils.js";
|
|
19
19
|
export {
|
|
20
20
|
j as default
|
|
21
21
|
};
|
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "uuid";
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
4
|
+
import "../../TreeViewFinder/TreeViewFinder.js";
|
|
5
|
+
import "../../TopBar/TopBar.js";
|
|
6
|
+
import "../../TopBar/GridLogo.js";
|
|
7
|
+
import "../../TopBar/AboutDialog.js";
|
|
8
|
+
import "../../SnackbarProvider/SnackbarProvider.js";
|
|
9
9
|
import "react-router-dom";
|
|
10
|
-
import "
|
|
10
|
+
import "../../../utils/AuthService.js";
|
|
11
11
|
import "@mui/material";
|
|
12
12
|
import "@mui/icons-material";
|
|
13
13
|
import "react-intl";
|
|
14
|
-
import "
|
|
15
|
-
import "
|
|
16
|
-
import "
|
|
17
|
-
import "
|
|
14
|
+
import "../../MuiVirtualizedTable/MuiVirtualizedTable.js";
|
|
15
|
+
import "../../ReportViewer/report-item.js";
|
|
16
|
+
import "../../ReportViewer/log-table.js";
|
|
17
|
+
import "../../ReportViewer/report-tree-view-context.js";
|
|
18
18
|
import "@mui/x-tree-view";
|
|
19
|
-
import "
|
|
20
|
-
import "
|
|
21
|
-
import "../ElementSearchDialog/tag-renderer.js";
|
|
19
|
+
import "../../OverflowableText/overflowable-text.js";
|
|
20
|
+
import "../../ElementSearchDialog/tag-renderer.js";
|
|
22
21
|
import "../react-hook-form/utils/submit-button.js";
|
|
23
22
|
import "../react-hook-form/utils/cancel-button.js";
|
|
24
23
|
import "../react-hook-form/provider/custom-form-provider.js";
|
|
25
|
-
import "
|
|
24
|
+
import "../../dialogs/description-modification-dialog.js";
|
|
26
25
|
import "react-hook-form";
|
|
26
|
+
import "../../filter/filter-context.js";
|
|
27
|
+
import "notistack";
|
|
27
28
|
import "yup";
|
|
28
29
|
import "../react-hook-form/provider/use-custom-form-context.js";
|
|
29
|
-
import "
|
|
30
|
-
import "
|
|
31
|
-
import { i } from "../../chunks/criteria-based-filter-edition-dialog.DxqH-mLe.js";
|
|
30
|
+
import "../../dialogs/popup-confirmation-dialog.js";
|
|
31
|
+
import { i } from "../../../chunks/criteria-based-filter-edition-dialog.CbhgOSRk.js";
|
|
32
32
|
import "ag-grid-react";
|
|
33
33
|
import "ag-grid-community/styles/ag-grid.css";
|
|
34
34
|
import "ag-grid-community/styles/ag-theme-alpine.css";
|
|
35
35
|
import "autosuggest-highlight/match";
|
|
36
36
|
import "autosuggest-highlight/parse";
|
|
37
37
|
import "clsx";
|
|
38
|
-
import "
|
|
39
|
-
import "notistack";
|
|
38
|
+
import "../../CardErrorBoundary/card-error-boundary.js";
|
|
40
39
|
import "../react-hook-form/slider-input.js";
|
|
41
40
|
import "../react-hook-form/numbers/integer-input.js";
|
|
42
41
|
import "../react-hook-form/booleans/checkbox-input.js";
|
|
43
42
|
import "../react-hook-form/booleans/switch-input.js";
|
|
44
43
|
import "../react-hook-form/directory-items-input.js";
|
|
45
|
-
import "
|
|
44
|
+
import "../../../chunks/filter-properties.B7-q_yPf.js";
|
|
46
45
|
import "@mui/icons-material/Delete";
|
|
47
46
|
import "@mui/material/IconButton";
|
|
48
47
|
import "@mui/material/Grid";
|
|
49
|
-
import "
|
|
48
|
+
import "../../../utils/yup-config.js";
|
|
50
49
|
import "../react-hook-form/range-input.js";
|
|
50
|
+
import "../../filter/expert/expert-filter-utils.js";
|
|
51
51
|
import "../react-hook-form/select-inputs/mui-select-input.js";
|
|
52
52
|
import "localized-countries";
|
|
53
53
|
import "localized-countries/data/fr";
|
|
@@ -63,7 +63,7 @@ import "@mui/material/Alert";
|
|
|
63
63
|
import "@mui/icons-material/Check";
|
|
64
64
|
import "@mui/material/CircularProgress";
|
|
65
65
|
import "@mui/material/TextField";
|
|
66
|
-
import "
|
|
66
|
+
import "../../filter/utils/filter-form-utils.js";
|
|
67
67
|
export {
|
|
68
68
|
i as default
|
|
69
69
|
};
|
|
@@ -4,9 +4,9 @@ import Grid from "@mui/material/Grid";
|
|
|
4
4
|
import { Autocomplete, TextField, Select, MenuItem } from "@mui/material";
|
|
5
5
|
import useValid from "./use-valid.js";
|
|
6
6
|
import { useIntl } from "react-intl";
|
|
7
|
-
import { FieldConstants } from "
|
|
8
|
-
import { OPERATOR_OPTIONS } from "
|
|
9
|
-
import { usePredefinedProperties } from "
|
|
7
|
+
import { FieldConstants } from "../../../utils/field-constants.js";
|
|
8
|
+
import { OPERATOR_OPTIONS } from "../../filter/expert/expert-filter-constants.js";
|
|
9
|
+
import { usePredefinedProperties } from "../../../hooks/predefined-properties-hook.js";
|
|
10
10
|
const PROPERTY_VALUE_OPERATORS = [OPERATOR_OPTIONS.IN];
|
|
11
11
|
const PropertyValueEditor = (props) => {
|
|
12
12
|
const { equipmentType, valueEditorProps } = props;
|
package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/remove-button.js
RENAMED
|
@@ -2,8 +2,8 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "@mui/material/IconButton";
|
|
3
3
|
import "@mui/icons-material/Delete";
|
|
4
4
|
import "react-hook-form";
|
|
5
|
-
import { h } from "
|
|
6
|
-
import "
|
|
5
|
+
import { h } from "../../../chunks/criteria-based-filter-edition-dialog.CbhgOSRk.js";
|
|
6
|
+
import "../../filter/expert/expert-filter-utils.js";
|
|
7
7
|
export {
|
|
8
8
|
h as default
|
|
9
9
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "@react-querybuilder/material";
|
|
4
|
+
import "./country-value-editor.js";
|
|
5
|
+
import "./translated-value-editor.js";
|
|
6
|
+
import "./text-value-editor.js";
|
|
7
|
+
import "@mui/material/Box";
|
|
8
|
+
import "react-hook-form";
|
|
9
|
+
import "../../../utils/field-constants.js";
|
|
10
|
+
import "../../filter/expert/expert-filter.type.js";
|
|
11
|
+
import "../../../utils/equipment-types.js";
|
|
12
|
+
import { V } from "../../../chunks/criteria-based-filter-edition-dialog.CbhgOSRk.js";
|
|
13
|
+
import "../../../utils/ElementType.js";
|
|
14
|
+
import "./property-value-editor.js";
|
|
15
|
+
import "../../filter/constants/filter-constants.js";
|
|
16
|
+
export {
|
|
17
|
+
V as default
|
|
18
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useIntl } from "react-intl";
|
|
3
3
|
import { Autocomplete, TextField } from "@mui/material";
|
|
4
|
-
import FieldLabel from "
|
|
4
|
+
import FieldLabel from "./react-hook-form/utils/field-label.js";
|
|
5
5
|
const SelectClearable = (props) => {
|
|
6
6
|
const { value, onChange, label, ...otherProps } = props;
|
|
7
7
|
const intl = useIntl();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export default filter_en;
|
|
2
|
+
declare namespace filter_en {
|
|
3
|
+
export let OR: string;
|
|
4
|
+
export let AND: string;
|
|
5
|
+
export let rule: string;
|
|
6
|
+
export let subGroup: string;
|
|
7
|
+
export let is: string;
|
|
8
|
+
export let contains: string;
|
|
9
|
+
export let beginsWith: string;
|
|
10
|
+
export let endsWith: string;
|
|
11
|
+
export let exists: string;
|
|
12
|
+
export let not_exists: string;
|
|
13
|
+
export let between: string;
|
|
14
|
+
let _in: string;
|
|
15
|
+
export { _in as in };
|
|
16
|
+
export let isPartOf: string;
|
|
17
|
+
export let isNotPartOf: string;
|
|
18
|
+
export let emptyRule: string;
|
|
19
|
+
export let incorrectRule: string;
|
|
20
|
+
export let betweenRule: string;
|
|
21
|
+
export let emptyGroup: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const filter_en = {
|
|
2
|
+
OR: "OR",
|
|
3
|
+
AND: "AND",
|
|
4
|
+
rule: "rule",
|
|
5
|
+
subGroup: "subgroup",
|
|
6
|
+
is: "is",
|
|
7
|
+
contains: "contains",
|
|
8
|
+
beginsWith: "begins with",
|
|
9
|
+
endsWith: "ends with",
|
|
10
|
+
exists: "exists",
|
|
11
|
+
not_exists: "not exists",
|
|
12
|
+
between: "between",
|
|
13
|
+
in: "in",
|
|
14
|
+
isPartOf: "is part of",
|
|
15
|
+
isNotPartOf: "is not part of",
|
|
16
|
+
emptyRule: "Filter contains an empty field",
|
|
17
|
+
incorrectRule: "Filter contains an incorrect field",
|
|
18
|
+
betweenRule: "Left value of 'between' rule have to be lower than the right value",
|
|
19
|
+
emptyGroup: "Filter contains an empty group. Consider removing it or adding rules to this group"
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
filter_en as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export default filter_fr;
|
|
2
|
+
declare namespace filter_fr {
|
|
3
|
+
export let OR: string;
|
|
4
|
+
export let AND: string;
|
|
5
|
+
export let rule: string;
|
|
6
|
+
export let subGroup: string;
|
|
7
|
+
export let is: string;
|
|
8
|
+
export let contains: string;
|
|
9
|
+
export let beginsWith: string;
|
|
10
|
+
export let endsWith: string;
|
|
11
|
+
export let exists: string;
|
|
12
|
+
export let not_exists: string;
|
|
13
|
+
export let between: string;
|
|
14
|
+
let _in: string;
|
|
15
|
+
export { _in as in };
|
|
16
|
+
export let isPartOf: string;
|
|
17
|
+
export let isNotPartOf: string;
|
|
18
|
+
export let emptyRule: string;
|
|
19
|
+
export let incorrectRule: string;
|
|
20
|
+
export let betweenRule: string;
|
|
21
|
+
export let emptyGroup: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const filter_fr = {
|
|
2
|
+
OR: "OU",
|
|
3
|
+
AND: "ET",
|
|
4
|
+
rule: "règle",
|
|
5
|
+
subGroup: "sous-groupe",
|
|
6
|
+
is: "est",
|
|
7
|
+
contains: "contient",
|
|
8
|
+
beginsWith: "commence par",
|
|
9
|
+
endsWith: "finit par",
|
|
10
|
+
exists: "existe",
|
|
11
|
+
not_exists: "n'existe pas",
|
|
12
|
+
between: "entre",
|
|
13
|
+
in: "dans",
|
|
14
|
+
isPartOf: "fait partie de",
|
|
15
|
+
isNotPartOf: "ne fait pas partie de",
|
|
16
|
+
emptyRule: "Le filtre contient un champ vide",
|
|
17
|
+
incorrectRule: "Le filtre contient un champ incorrect",
|
|
18
|
+
betweenRule: "La valeur de gauche d'une règle 'entre' doit être inférieure à la valeur de droite",
|
|
19
|
+
emptyGroup: "Le filtre contient un groupe vide. Supprimez le ou ajoutez des règles à ce groupe"
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
filter_fr as default
|
|
23
|
+
};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
5
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
6
|
*/
|
|
7
|
-
export declare const useDebounce:
|
|
7
|
+
export declare const useDebounce: <T extends (...args: any[]) => any>(func: T, delay?: number) => T & import('@mui/utils/debounce').Cancelable;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
-
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
-
*/
|
|
7
|
-
interface SnackInputs {
|
|
1
|
+
import { OptionsObject, closeSnackbar } from 'notistack';
|
|
2
|
+
|
|
3
|
+
interface SnackInputs extends Omit<OptionsObject, 'variant' | 'style'> {
|
|
8
4
|
messageTxt?: string;
|
|
9
5
|
messageId?: string;
|
|
10
6
|
messageValues?: {
|
|
@@ -18,6 +14,7 @@ export interface UseSnackMessageReturn {
|
|
|
18
14
|
snackError: (snackInputs: SnackInputs) => void;
|
|
19
15
|
snackWarning: (snackInputs: SnackInputs) => void;
|
|
20
16
|
snackInfo: (snackInputs: SnackInputs) => void;
|
|
17
|
+
closeSnackbar: typeof closeSnackbar;
|
|
21
18
|
}
|
|
22
19
|
export declare function useSnackMessage(): UseSnackMessageReturn;
|
|
23
20
|
export {};
|
|
@@ -3,49 +3,34 @@ import { useSnackbar } from "notistack";
|
|
|
3
3
|
import { useIntlRef } from "./useIntlRef.js";
|
|
4
4
|
function useSnackMessage() {
|
|
5
5
|
const intlRef = useIntlRef();
|
|
6
|
-
const { enqueueSnackbar } = useSnackbar();
|
|
7
|
-
const
|
|
8
|
-
(snackInputs) =>
|
|
6
|
+
const { enqueueSnackbar, closeSnackbar: closeSnackbar2 } = useSnackbar();
|
|
7
|
+
const enqueue = useCallback(
|
|
8
|
+
(snackInputs, variant) => {
|
|
9
|
+
const message = makeMessage(intlRef, snackInputs);
|
|
10
|
+
if (message === null) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
return enqueueSnackbar(message, {
|
|
14
|
+
...snackInputs,
|
|
15
|
+
variant,
|
|
16
|
+
style: { whiteSpace: "pre-line" }
|
|
17
|
+
});
|
|
18
|
+
},
|
|
9
19
|
[enqueueSnackbar, intlRef]
|
|
10
20
|
);
|
|
21
|
+
const snackError = useCallback(
|
|
22
|
+
(snackInputs) => enqueue(snackInputs, "error"),
|
|
23
|
+
[enqueue]
|
|
24
|
+
);
|
|
11
25
|
const snackWarning = useCallback(
|
|
12
|
-
(snackInputs) =>
|
|
13
|
-
|
|
14
|
-
intlRef,
|
|
15
|
-
enqueueSnackbar,
|
|
16
|
-
"warning",
|
|
17
|
-
true
|
|
18
|
-
),
|
|
19
|
-
[enqueueSnackbar, intlRef]
|
|
26
|
+
(snackInputs) => enqueue(snackInputs, "warning"),
|
|
27
|
+
[enqueue]
|
|
20
28
|
);
|
|
21
29
|
const snackInfo = useCallback(
|
|
22
|
-
(snackInputs) =>
|
|
23
|
-
[
|
|
24
|
-
);
|
|
25
|
-
return { snackError, snackInfo, snackWarning };
|
|
26
|
-
}
|
|
27
|
-
function makeSnackbar(snackInputs, intlRef, enqueueSnackbar, level, persistent) {
|
|
28
|
-
const message = checkAndTranslateIfNecessary(
|
|
29
|
-
intlRef,
|
|
30
|
-
snackInputs.messageTxt,
|
|
31
|
-
snackInputs.messageId,
|
|
32
|
-
snackInputs.messageValues
|
|
33
|
-
);
|
|
34
|
-
const header = checkAndTranslateIfNecessary(
|
|
35
|
-
intlRef,
|
|
36
|
-
snackInputs.headerTxt,
|
|
37
|
-
snackInputs.headerId,
|
|
38
|
-
snackInputs.headerValues
|
|
30
|
+
(snackInputs) => enqueue(snackInputs, "info"),
|
|
31
|
+
[enqueue]
|
|
39
32
|
);
|
|
40
|
-
|
|
41
|
-
displayMessageWithSnackbar(
|
|
42
|
-
message,
|
|
43
|
-
header,
|
|
44
|
-
enqueueSnackbar,
|
|
45
|
-
level,
|
|
46
|
-
persistent
|
|
47
|
-
);
|
|
48
|
-
}
|
|
33
|
+
return { snackError, snackInfo, snackWarning, closeSnackbar: closeSnackbar2 };
|
|
49
34
|
}
|
|
50
35
|
function checkAndTranslateIfNecessary(intlRef, txt, id, values) {
|
|
51
36
|
checkInputs(txt, id, values);
|
|
@@ -61,7 +46,19 @@ function checkInputs(txt, id, values) {
|
|
|
61
46
|
console.warn("Snack inputs should be [*Txt] OR [*Id, *Values]");
|
|
62
47
|
}
|
|
63
48
|
}
|
|
64
|
-
function
|
|
49
|
+
function makeMessage(intlRef, snackInputs) {
|
|
50
|
+
const message = checkAndTranslateIfNecessary(
|
|
51
|
+
intlRef,
|
|
52
|
+
snackInputs.messageTxt,
|
|
53
|
+
snackInputs.messageId,
|
|
54
|
+
snackInputs.messageValues
|
|
55
|
+
);
|
|
56
|
+
const header = checkAndTranslateIfNecessary(
|
|
57
|
+
intlRef,
|
|
58
|
+
snackInputs.headerTxt,
|
|
59
|
+
snackInputs.headerId,
|
|
60
|
+
snackInputs.headerValues
|
|
61
|
+
);
|
|
65
62
|
let fullMessage = "";
|
|
66
63
|
if (header) {
|
|
67
64
|
fullMessage += header;
|
|
@@ -72,11 +69,7 @@ function displayMessageWithSnackbar(message, header, enqueueSnackbar, level, per
|
|
|
72
69
|
}
|
|
73
70
|
fullMessage += message;
|
|
74
71
|
}
|
|
75
|
-
|
|
76
|
-
variant: level,
|
|
77
|
-
persist: persistent,
|
|
78
|
-
style: { whiteSpace: "pre-line" }
|
|
79
|
-
});
|
|
72
|
+
return fullMessage;
|
|
80
73
|
}
|
|
81
74
|
export {
|
|
82
75
|
useSnackMessage
|