@gridsuite/commons-ui 0.82.0 → 0.84.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 +1 -1
- package/dist/components/authentication/AuthenticationRouter.js +1 -1
- package/dist/components/authentication/Login.js +1 -5
- package/dist/components/authentication/authenticationType.d.ts +3 -3
- package/dist/components/authentication/utils/authService.d.ts +3 -3
- package/dist/components/cardErrorBoundary/CardErrorBoundary.d.ts +1 -1
- package/dist/components/checkBoxList/checkBoxList.type.d.ts +7 -8
- package/dist/components/contingencyList/criteriaBased/CriteriaBasedForm.d.ts +1 -1
- package/dist/components/contingencyList/criteriaBased/criteriaBasedUtils.d.ts +3 -3
- package/dist/components/customAGGrid/customAggrid.d.ts +1 -1
- package/dist/components/customAGGrid/customAggrid.js +1 -2
- package/dist/components/customAGGrid/customAggrid.style.d.ts +2 -2
- package/dist/components/dialogs/customMuiDialog/CustomMuiDialog.d.ts +2 -2
- package/dist/components/dialogs/modifyElementSelection/ModifyElementSelection.d.ts +1 -1
- package/dist/components/directoryItemSelector/DirectoryItemSelector.d.ts +2 -2
- package/dist/components/elementSearch/elementItem/EquipmentItem.d.ts +2 -2
- package/dist/components/elementSearch/elementSearchInput/ElementSearchInput.d.ts +1 -1
- package/dist/components/elementSearch/tagRenderer/TagRenderer.d.ts +1 -1
- package/dist/components/filter/FilterCreationDialog.d.ts +1 -1
- package/dist/components/filter/FilterCreationDialog.js +1 -1
- package/dist/components/filter/HeaderFilterForm.d.ts +2 -2
- package/dist/components/filter/expert/ExpertFilterForm.js +2 -3
- package/dist/components/filter/expert/expertFilter.type.d.ts +2 -2
- package/dist/components/filter/expert/expertFilterConstants.d.ts +2 -2
- package/dist/components/filter/expert/expertFilterConstants.js +1 -1
- package/dist/components/filter/expert/expertFilterUtils.d.ts +3 -75
- package/dist/components/filter/expert/expertFilterUtils.js +3 -4
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.d.ts +3 -3
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.js +2 -1
- package/dist/components/filter/filter.type.d.ts +4 -4
- package/dist/components/filter/utils/filterFormUtils.d.ts +1 -1
- package/dist/components/inputs/reactHookForm/agGridTable/CustomAgGridTable.js +2 -7
- package/dist/components/inputs/reactHookForm/agGridTable/csvUploader/CsvUploader.js +1 -2
- package/dist/components/inputs/reactHookForm/autocompleteInputs/AutocompleteInput.d.ts +1 -1
- package/dist/components/inputs/reactHookForm/autocompleteInputs/AutocompleteInput.js +1 -1
- package/dist/components/inputs/reactHookForm/numbers/RangeInput.d.ts +2 -3
- package/dist/components/inputs/reactHookForm/numbers/SliderInput.d.ts +2 -2
- package/dist/components/inputs/reactHookForm/numbers/SliderInput.js +26 -3
- package/dist/components/inputs/reactHookForm/provider/CustomFormProvider.d.ts +2 -2
- package/dist/components/inputs/reactHookForm/provider/CustomFormProvider.js +1 -5
- package/dist/components/inputs/reactHookForm/selectInputs/SelectInput.d.ts +1 -1
- package/dist/components/inputs/reactHookForm/text/ExpandingTextField.d.ts +1 -1
- package/dist/components/inputs/reactHookForm/text/TextInput.d.ts +3 -3
- package/dist/components/inputs/reactHookForm/text/TextInput.js +2 -2
- package/dist/components/inputs/reactHookForm/text/UniqueNameInput.d.ts +2 -2
- package/dist/components/inputs/reactHookForm/utils/TextFieldWithAdornment.d.ts +1 -1
- package/dist/components/inputs/reactQueryBuilder/AutocompleteWithFavorites.js +1 -1
- package/dist/components/inputs/reactQueryBuilder/CustomReactQueryBuilder.js +1 -1
- package/dist/components/inputs/reactQueryBuilder/PropertyValueEditor.d.ts +1 -1
- package/dist/components/inputs/reactQueryBuilder/compositeRuleEditor/GroupValueEditor.d.ts +1 -1
- package/dist/components/inputs/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.d.ts +1 -1
- package/dist/components/notifications/contexts/NotificationsContext.d.ts +0 -1
- package/dist/components/notifications/hooks/useListenerManager.d.ts +1 -1
- package/dist/components/notifications/hooks/useNotificationsListener.d.ts +3 -3
- package/dist/components/overflowableText/OverflowableText.d.ts +4 -4
- package/dist/components/topBar/AboutDialog.js +1 -1
- package/dist/components/topBar/GridLogo.d.ts +1 -1
- package/dist/components/topBar/TopBar.d.ts +7 -7
- package/dist/components/topBar/TopBar.js +1 -5
- package/dist/components/topBar/UserInformationDialog.js +1 -2
- package/dist/components/topBar/UserSettingsDialog.d.ts +1 -1
- package/dist/components/topBar/UserSettingsDialog.js +17 -14
- package/dist/components/treeViewFinder/TreeViewFinder.d.ts +3 -3
- package/dist/components/treeViewFinder/TreeViewFinder.js +2 -3
- package/dist/hooks/useIntlRef.d.ts +1 -2
- package/dist/hooks/useLocalizedCountries.js +1 -1
- package/dist/hooks/useModificationLabelComputer.d.ts +1 -1
- package/dist/hooks/useModificationLabelComputer.js +8 -10
- package/dist/hooks/usePredefinedProperties.d.ts +2 -2
- package/dist/services/directory.d.ts +1 -1
- package/dist/services/explore.d.ts +2 -2
- package/dist/translations/en/topBarEn.js +1 -1
- package/dist/translations/fr/topBarFr.js +1 -1
- package/dist/utils/mapper/getFileIcon.d.ts +1 -1
- package/dist/utils/types/metadata.d.ts +1 -1
- package/dist/utils/types/types.d.ts +1 -1
- package/package.json +70 -76
package/dist/_mocks_/svg.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SVGProps } from 'react';
|
|
2
2
|
|
|
3
|
-
declare const SvgrMock: import('react').ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & import(
|
|
3
|
+
declare const SvgrMock: import('react').ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
4
4
|
export default SvgrMock;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Grid } from "@mui/material";
|
|
3
3
|
import { useCallback } from "react";
|
|
4
|
-
import { Routes, Route, Navigate } from "react-router
|
|
4
|
+
import { Routes, Route, Navigate } from "react-router";
|
|
5
5
|
import { Login } from "./Login.js";
|
|
6
6
|
import AuthenticationRouterErrorDisplay from "./AuthenticationRouterErrorDisplay.js";
|
|
7
7
|
import { SignInCallbackHandler } from "./SignInCallbackHandler.js";
|
|
@@ -16,11 +16,7 @@ const styles = {
|
|
|
16
16
|
submit: (theme) => ({
|
|
17
17
|
margin: theme.spacing(3, 0, 2),
|
|
18
18
|
borderRadius: "30px"
|
|
19
|
-
})
|
|
20
|
-
logo: {
|
|
21
|
-
width: 64,
|
|
22
|
-
height: 64
|
|
23
|
-
}
|
|
19
|
+
})
|
|
24
20
|
};
|
|
25
21
|
function Login({ onLoginClick, disabled }) {
|
|
26
22
|
return /* @__PURE__ */ jsxs(Container, { component: "main", maxWidth: "xs", children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AuthenticationActions } from '../../redux/actions/authActions';
|
|
2
|
-
import { NavigateFunction, Location } from 'react-router-dom';
|
|
3
|
-
import { Dispatch } from 'react';
|
|
4
1
|
import { UserManager } from 'oidc-client';
|
|
2
|
+
import { Dispatch } from 'react';
|
|
3
|
+
import { Location, NavigateFunction } from 'react-router';
|
|
4
|
+
import { AuthenticationActions } from '../../redux/actions/authActions';
|
|
5
5
|
|
|
6
6
|
export type AuthenticationRouterErrorState = {
|
|
7
7
|
userName?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AuthenticationActions } from '../../../redux/actions/authActions';
|
|
2
|
-
import { Log, User, UserManager } from 'oidc-client';
|
|
3
|
-
import { Location, NavigateFunction } from 'react-router-dom';
|
|
4
1
|
import { Dispatch } from 'react';
|
|
2
|
+
import { Location, NavigateFunction } from 'react-router';
|
|
3
|
+
import { Log, User, UserManager } from 'oidc-client';
|
|
4
|
+
import { AuthenticationActions } from '../../../redux/actions/authActions';
|
|
5
5
|
|
|
6
6
|
type UserValidationFunc = (user: User) => Promise<boolean>;
|
|
7
7
|
type IdpSettingsGetter = () => Promise<IdpSettings>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SxProps } from '@mui/system';
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
3
2
|
import { DraggableProvided, DragStart, DropResult } from 'react-beautiful-dnd';
|
|
4
|
-
import {
|
|
3
|
+
import { SxProps, Theme } from '@mui/material';
|
|
5
4
|
|
|
6
5
|
export type CheckBoxListItemSx = {
|
|
7
6
|
checkBoxIcon?: SxProps<Theme>;
|
|
@@ -21,9 +20,9 @@ type CheckBoxListItemSxProps<T> = CheckBoxListSx & {
|
|
|
21
20
|
export interface CheckBoxListItemProps<T> {
|
|
22
21
|
item: T;
|
|
23
22
|
sx?: CheckBoxListItemSx;
|
|
24
|
-
label:
|
|
23
|
+
label: ReactNode;
|
|
25
24
|
onClick: () => void;
|
|
26
|
-
secondaryAction?: (item: T, hover: string) =>
|
|
25
|
+
secondaryAction?: (item: T, hover: string) => ReactElement | null;
|
|
27
26
|
getItemId: (item: T) => string;
|
|
28
27
|
disabled?: boolean;
|
|
29
28
|
divider?: boolean;
|
|
@@ -40,8 +39,8 @@ export interface CheckBoxListItemsProps<T> {
|
|
|
40
39
|
selectedItems: T[];
|
|
41
40
|
onSelectionChange?: (selectedItems: T[]) => void;
|
|
42
41
|
getItemId: (item: T) => string;
|
|
43
|
-
getItemLabel?: (item: T) =>
|
|
44
|
-
secondaryAction?: (item: T, hover: boolean) =>
|
|
42
|
+
getItemLabel?: (item: T) => ReactNode;
|
|
43
|
+
secondaryAction?: (item: T, hover: boolean) => ReactElement | null;
|
|
45
44
|
isDisabled?: (item: T) => boolean;
|
|
46
45
|
addSelectAllCheckbox?: boolean;
|
|
47
46
|
selectAllCheckBoxLabel?: string;
|
|
@@ -58,7 +57,7 @@ export interface CheckboxListProps<T> extends CheckBoxListItemsProps<T> {
|
|
|
58
57
|
}
|
|
59
58
|
export interface ClickableCheckBoxItemProps {
|
|
60
59
|
sx?: CheckBoxListItemSx;
|
|
61
|
-
label:
|
|
60
|
+
label: ReactNode;
|
|
62
61
|
onClick: () => void;
|
|
63
62
|
disabled?: boolean;
|
|
64
63
|
checked: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RangeInputData } from '../../inputs/reactHookForm/numbers/RangeInput';
|
|
2
|
-
import { default as yup } from '../../../utils/yupConfig';
|
|
3
|
-
import { FieldConstants } from '../../../utils/constants/fieldConstants';
|
|
4
1
|
import { ObjectSchema } from 'yup';
|
|
2
|
+
import { FieldConstants } from '../../../utils/constants/fieldConstants';
|
|
3
|
+
import { default as yup } from '../../../utils/yupConfig';
|
|
4
|
+
import { RangeInputData } from '../../inputs/reactHookForm/numbers/RangeInput';
|
|
5
5
|
|
|
6
6
|
export type CriteriaBasedData = {
|
|
7
7
|
[FieldConstants.COUNTRIES]?: string[];
|
|
@@ -4,8 +4,7 @@ import { AgGridReact } from "ag-grid-react";
|
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import "ag-grid-community/styles/ag-grid.css";
|
|
6
6
|
import "ag-grid-community/styles/ag-theme-alpine.css";
|
|
7
|
-
import { Box } from "@mui/
|
|
8
|
-
import { useTheme } from "@mui/material";
|
|
7
|
+
import { useTheme, Box } from "@mui/material";
|
|
9
8
|
import { mergeSx } from "../../utils/styles.js";
|
|
10
9
|
import { CUSTOM_AGGRID_THEME, styles } from "./customAggrid.style.js";
|
|
11
10
|
const onColumnResized = (params) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Theme } from '@mui/material';
|
|
2
|
+
import { SystemStyleObject } from '@mui/system';
|
|
3
3
|
|
|
4
4
|
export declare const CUSTOM_AGGRID_THEME = "custom-aggrid-theme";
|
|
5
5
|
export declare const styles: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ObjectSchema } from 'yup';
|
|
2
|
-
import { FieldErrors, FieldValues, SubmitHandler, UseFormReturn } from 'react-hook-form';
|
|
3
1
|
import { MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { FieldErrors, FieldValues, SubmitHandler, UseFormReturn } from 'react-hook-form';
|
|
3
|
+
import { ObjectSchema } from 'yup';
|
|
4
4
|
|
|
5
5
|
export interface CustomMuiDialogProps<T extends FieldValues = FieldValues> {
|
|
6
6
|
open: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ElementAttributes } from '../../utils';
|
|
2
|
-
import { TreeViewFinderProps } from '../treeViewFinder/TreeViewFinder';
|
|
3
1
|
import { UUID } from 'crypto';
|
|
2
|
+
import { TreeViewFinderProps } from '../treeViewFinder/TreeViewFinder';
|
|
3
|
+
import { ElementAttributes } from '../../utils';
|
|
4
4
|
|
|
5
5
|
export interface DirectoryItemSelectorProps extends TreeViewFinderProps {
|
|
6
6
|
types: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TagRenderer } from '../tagRenderer/TagRenderer';
|
|
2
|
-
import { EquipmentInfos } from '../../../utils/types/equipmentType';
|
|
3
1
|
import { SxProps, Theme } from '@mui/material';
|
|
2
|
+
import { EquipmentInfos } from '../../../utils/types/equipmentType';
|
|
3
|
+
import { TagRenderer } from '../tagRenderer/TagRenderer';
|
|
4
4
|
|
|
5
5
|
export interface EquipmentItemProps {
|
|
6
6
|
inputValue: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
1
|
import { AutocompleteProps, AutocompleteRenderInputParams } from '@mui/material';
|
|
2
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
export type RenderElementProps<T> = HTMLAttributes<HTMLLIElement> & {
|
|
5
5
|
element: T;
|
|
@@ -9,7 +9,7 @@ import { getExplicitNamingFilterEmptyFormData, explicitNamingFilterSchema } from
|
|
|
9
9
|
import { FieldConstants } from "../../utils/constants/fieldConstants.js";
|
|
10
10
|
import "../../utils/yupConfig.js";
|
|
11
11
|
import { FilterForm } from "./FilterForm.js";
|
|
12
|
-
import {
|
|
12
|
+
import { expertFilterSchema, getExpertFilterEmptyFormData } from "./expert/ExpertFilterForm.js";
|
|
13
13
|
import { FilterType } from "./constants/FilterConstants.js";
|
|
14
14
|
import { MAX_CHAR_DESCRIPTION } from "../../utils/constants/uiConstants.js";
|
|
15
15
|
import { EXPERT_FILTER_QUERY } from "./expert/expertFilterConstants.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { default as yup } from '../../utils/yupConfig';
|
|
2
|
-
import { ElementExistsType } from '../../utils/types/elementType';
|
|
3
1
|
import { UUID } from 'crypto';
|
|
2
|
+
import { ElementExistsType } from '../../utils/types/elementType';
|
|
3
|
+
import { default as yup } from '../../utils/yupConfig';
|
|
4
4
|
|
|
5
5
|
export interface FilterFormProps {
|
|
6
6
|
creation?: boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import '../../../assets/ExpertFilterForm.css';
|
|
2
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
2
|
import { useCallback, useMemo } from "react";
|
|
4
3
|
import { formatQuery } from "react-querybuilder";
|
|
@@ -7,7 +6,7 @@ import * as yup from "yup";
|
|
|
7
6
|
import { v4 } from "uuid";
|
|
8
7
|
import { Box } from "@mui/material";
|
|
9
8
|
import { testQuery } from "./expertFilterUtils.js";
|
|
10
|
-
import { EXPERT_FILTER_QUERY,
|
|
9
|
+
import { EXPERT_FILTER_QUERY, OPERATOR_OPTIONS, RULES, EXPERT_FILTER_EQUIPMENTS, COMBINATOR_OPTIONS, EXPERT_FILTER_FIELDS } from "./expertFilterConstants.js";
|
|
11
10
|
import { FieldConstants } from "../../../utils/constants/fieldConstants.js";
|
|
12
11
|
import { InputWithPopupConfirmation } from "../../inputs/reactHookForm/selectInputs/InputWithPopupConfirmation.js";
|
|
13
12
|
import { SelectInput } from "../../inputs/reactHookForm/selectInputs/SelectInput.js";
|
|
@@ -38,7 +37,7 @@ yup.setLocale({
|
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
39
|
});
|
|
41
|
-
function isSupportedEquipmentType(equipmentType) {
|
|
40
|
+
import '../../../assets/ExpertFilterForm.css';function isSupportedEquipmentType(equipmentType) {
|
|
42
41
|
return Object.values(EXPERT_FILTER_EQUIPMENTS).map((equipments) => equipments.id).includes(equipmentType);
|
|
43
42
|
}
|
|
44
43
|
const rqbQuerySchemaValidator = (schema) => schema.test(RULES.EMPTY_GROUP, RULES.EMPTY_GROUP, (query) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FieldType } from '../../../utils/types/fieldType';
|
|
2
|
-
import { UUID } from 'crypto';
|
|
3
1
|
import { FullField } from 'react-querybuilder';
|
|
2
|
+
import { UUID } from 'crypto';
|
|
3
|
+
import { FieldType } from '../../../utils/types/fieldType';
|
|
4
4
|
|
|
5
5
|
export declare enum OperatorType {
|
|
6
6
|
EQUALS = "EQUALS",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FieldType } from '../../../utils/types/fieldType';
|
|
2
|
-
import { CombinatorType, DataType, OperatorType } from './expertFilter.type';
|
|
3
1
|
import { Field } from 'react-querybuilder';
|
|
2
|
+
import { CombinatorType, DataType, OperatorType } from './expertFilter.type';
|
|
3
|
+
import { FieldType } from '../../../utils/types/fieldType';
|
|
4
4
|
|
|
5
5
|
export declare enum RULES {
|
|
6
6
|
EMPTY_RULE = "emptyRule",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OperatorType, CombinatorType, DataType } from "./expertFilter.type.js";
|
|
2
2
|
import { FieldType } from "../../../utils/types/fieldType.js";
|
|
3
|
-
import { KILO_VOLT,
|
|
3
|
+
import { KILO_AMPERE, KILO_VOLT, MICRO_SIEMENS, SIEMENS, MEGA_VAR, MEGA_WATT, OHM, MEGA_VOLT_AMPERE } from "../../../utils/constants/unitsConstants.js";
|
|
4
4
|
var RULES = /* @__PURE__ */ ((RULES2) => {
|
|
5
5
|
RULES2["EMPTY_RULE"] = "emptyRule";
|
|
6
6
|
RULES2["EMPTY_GROUP"] = "emptyGroup";
|
|
@@ -1,83 +1,11 @@
|
|
|
1
|
-
import { RuleGroupTypeExport } from './expertFilter.type';
|
|
2
|
-
import { IntlShape } from 'react-intl';
|
|
3
1
|
import { QueryValidator, RuleGroupType, RuleGroupTypeAny } from 'react-querybuilder';
|
|
2
|
+
import { IntlShape } from 'react-intl';
|
|
3
|
+
import { RuleGroupTypeExport } from './expertFilter.type';
|
|
4
4
|
|
|
5
5
|
export declare const getOperators: (fieldName: string, intl: IntlShape) => {
|
|
6
6
|
name: string;
|
|
7
7
|
label: string;
|
|
8
|
-
}[]
|
|
9
|
-
readonly name: "=";
|
|
10
|
-
readonly value: "=";
|
|
11
|
-
readonly label: "=";
|
|
12
|
-
} | {
|
|
13
|
-
readonly name: "!=";
|
|
14
|
-
readonly value: "!=";
|
|
15
|
-
readonly label: "!=";
|
|
16
|
-
} | {
|
|
17
|
-
readonly name: "<";
|
|
18
|
-
readonly value: "<";
|
|
19
|
-
readonly label: "<";
|
|
20
|
-
} | {
|
|
21
|
-
readonly name: ">";
|
|
22
|
-
readonly value: ">";
|
|
23
|
-
readonly label: ">";
|
|
24
|
-
} | {
|
|
25
|
-
readonly name: "<=";
|
|
26
|
-
readonly value: "<=";
|
|
27
|
-
readonly label: "<=";
|
|
28
|
-
} | {
|
|
29
|
-
readonly name: ">=";
|
|
30
|
-
readonly value: ">=";
|
|
31
|
-
readonly label: ">=";
|
|
32
|
-
} | {
|
|
33
|
-
readonly name: "contains";
|
|
34
|
-
readonly value: "contains";
|
|
35
|
-
readonly label: "contains";
|
|
36
|
-
} | {
|
|
37
|
-
readonly name: "beginsWith";
|
|
38
|
-
readonly value: "beginsWith";
|
|
39
|
-
readonly label: "begins with";
|
|
40
|
-
} | {
|
|
41
|
-
readonly name: "endsWith";
|
|
42
|
-
readonly value: "endsWith";
|
|
43
|
-
readonly label: "ends with";
|
|
44
|
-
} | {
|
|
45
|
-
readonly name: "doesNotContain";
|
|
46
|
-
readonly value: "doesNotContain";
|
|
47
|
-
readonly label: "does not contain";
|
|
48
|
-
} | {
|
|
49
|
-
readonly name: "doesNotBeginWith";
|
|
50
|
-
readonly value: "doesNotBeginWith";
|
|
51
|
-
readonly label: "does not begin with";
|
|
52
|
-
} | {
|
|
53
|
-
readonly name: "doesNotEndWith";
|
|
54
|
-
readonly value: "doesNotEndWith";
|
|
55
|
-
readonly label: "does not end with";
|
|
56
|
-
} | {
|
|
57
|
-
readonly name: "null";
|
|
58
|
-
readonly value: "null";
|
|
59
|
-
readonly label: "is null";
|
|
60
|
-
} | {
|
|
61
|
-
readonly name: "notNull";
|
|
62
|
-
readonly value: "notNull";
|
|
63
|
-
readonly label: "is not null";
|
|
64
|
-
} | {
|
|
65
|
-
readonly name: "in";
|
|
66
|
-
readonly value: "in";
|
|
67
|
-
readonly label: "in";
|
|
68
|
-
} | {
|
|
69
|
-
readonly name: "notIn";
|
|
70
|
-
readonly value: "notIn";
|
|
71
|
-
readonly label: "not in";
|
|
72
|
-
} | {
|
|
73
|
-
readonly name: "between";
|
|
74
|
-
readonly value: "between";
|
|
75
|
-
readonly label: "between";
|
|
76
|
-
} | {
|
|
77
|
-
readonly name: "notBetween";
|
|
78
|
-
readonly value: "notBetween";
|
|
79
|
-
readonly label: "not between";
|
|
80
|
-
})[];
|
|
8
|
+
}[];
|
|
81
9
|
export declare function exportExpertRules(query: RuleGroupType): RuleGroupTypeExport;
|
|
82
10
|
export declare function importExpertRules(query: RuleGroupTypeExport): RuleGroupType;
|
|
83
11
|
export declare function countRules(query: RuleGroupTypeAny): number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defaultOperators, getParentPath, findPath, remove } from "react-querybuilder";
|
|
2
2
|
import { validate } from "uuid";
|
|
3
3
|
import { DataType } from "./expertFilter.type.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { OPERATOR_OPTIONS, RULES, FIELDS_OPTIONS } from "./expertFilterConstants.js";
|
|
5
|
+
import { isBlankOrEmpty, convertOutputValue, convertInputValue } from "../../../utils/conversionUtils.js";
|
|
6
6
|
import { FieldType } from "../../../utils/types/fieldType.js";
|
|
7
7
|
const searchTree = (tree, key, value) => {
|
|
8
8
|
const stack = Object.values(tree);
|
|
@@ -334,8 +334,7 @@ const queryValidator = (query) => {
|
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
ruleGroup.rules.forEach((rule) => {
|
|
337
|
-
if (typeof rule === "string")
|
|
338
|
-
;
|
|
337
|
+
if (typeof rule === "string") ;
|
|
339
338
|
else if ("rules" in rule) {
|
|
340
339
|
validateGroup(rule);
|
|
341
340
|
} else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DISTRIBUTION_KEY } from '../constants/FilterConstants';
|
|
2
|
-
import { default as yup } from '../../../utils/yupConfig';
|
|
3
|
-
import { FieldConstants } from '../../../utils/constants/fieldConstants';
|
|
4
1
|
import { UUID } from 'crypto';
|
|
2
|
+
import { FieldConstants } from '../../../utils/constants/fieldConstants';
|
|
3
|
+
import { default as yup } from '../../../utils/yupConfig';
|
|
4
|
+
import { DISTRIBUTION_KEY } from '../constants/FilterConstants';
|
|
5
5
|
|
|
6
6
|
export declare const explicitNamingFilterSchema: {
|
|
7
7
|
filterEquipmentsAttributes: yup.ArraySchema<{
|
|
@@ -94,6 +94,7 @@ function ExplicitNamingFilterForm({ sourceFilterForExplicitNamingConversion }) {
|
|
|
94
94
|
field: FieldConstants.EQUIPMENT_ID,
|
|
95
95
|
editable: true,
|
|
96
96
|
singleClickEdit: true,
|
|
97
|
+
flex: 1,
|
|
97
98
|
valueParser: (params) => {
|
|
98
99
|
var _a;
|
|
99
100
|
return ((_a = params.newValue) == null ? void 0 : _a.trim()) ?? null;
|
|
@@ -107,7 +108,7 @@ function ExplicitNamingFilterForm({ sourceFilterForExplicitNamingConversion }) {
|
|
|
107
108
|
editable: true,
|
|
108
109
|
singleClickEdit: true,
|
|
109
110
|
cellEditor: NumericEditor,
|
|
110
|
-
|
|
111
|
+
flex: 1
|
|
111
112
|
});
|
|
112
113
|
}
|
|
113
114
|
return newColumnDefs;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FILTER_EQUIPMENTS_ATTRIBUTES } from './explicitNaming/ExplicitNamingFilterConstants';
|
|
2
|
-
import { EXPERT_FILTER_QUERY } from './expert/expertFilterConstants';
|
|
3
|
-
import { RuleGroupTypeExport } from './expert/expertFilter.type';
|
|
4
|
-
import { ElementExistsType, FieldConstants } from '../../utils';
|
|
5
1
|
import { UUID } from 'crypto';
|
|
2
|
+
import { ElementExistsType, FieldConstants } from '../../utils';
|
|
3
|
+
import { RuleGroupTypeExport } from './expert/expertFilter.type';
|
|
4
|
+
import { EXPERT_FILTER_QUERY } from './expert/expertFilterConstants';
|
|
5
|
+
import { FILTER_EQUIPMENTS_ATTRIBUTES } from './explicitNaming/ExplicitNamingFilterConstants';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Represent an item/object in directories.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useCallback, useEffect } from "react";
|
|
3
3
|
import { useFormContext, useFieldArray } from "react-hook-form";
|
|
4
|
-
import { AgGridReact } from "ag-grid-react";
|
|
5
4
|
import "ag-grid-community/styles/ag-grid.css";
|
|
6
5
|
import "ag-grid-community/styles/ag-theme-alpine.css";
|
|
7
6
|
import { useTheme, Box } from "@mui/material";
|
|
8
7
|
import { useIntl } from "react-intl";
|
|
9
8
|
import { BottomRightButtons } from "./BottomRightButtons.js";
|
|
10
9
|
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
10
|
+
import { CustomAGGrid } from "../../../customAGGrid/customAggrid.js";
|
|
11
11
|
const style = (customProps) => ({
|
|
12
12
|
grid: (theme) => ({
|
|
13
13
|
width: "auto",
|
|
@@ -136,11 +136,6 @@ function CustomAgGridTable({
|
|
|
136
136
|
append(makeDefaultRowData());
|
|
137
137
|
setNewRowAdded(true);
|
|
138
138
|
};
|
|
139
|
-
useEffect(() => {
|
|
140
|
-
if (gridApi) {
|
|
141
|
-
gridApi.api.sizeColumnsToFit();
|
|
142
|
-
}
|
|
143
|
-
}, [columnDefs, gridApi]);
|
|
144
139
|
const intl = useIntl();
|
|
145
140
|
const getLocaleText = useCallback(
|
|
146
141
|
(params) => {
|
|
@@ -176,7 +171,7 @@ function CustomAgGridTable({
|
|
|
176
171
|
}, []);
|
|
177
172
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
178
173
|
/* @__PURE__ */ jsx(Box, { className: theme.aggrid.theme, sx: style(cssProps).grid, children: /* @__PURE__ */ jsx(
|
|
179
|
-
|
|
174
|
+
CustomAGGrid,
|
|
180
175
|
{
|
|
181
176
|
rowData,
|
|
182
177
|
onGridReady,
|
|
@@ -3,7 +3,7 @@ import Dialog from "@mui/material/Dialog";
|
|
|
3
3
|
import DialogTitle from "@mui/material/DialogTitle";
|
|
4
4
|
import DialogContent from "@mui/material/DialogContent";
|
|
5
5
|
import DialogActions from "@mui/material/DialogActions";
|
|
6
|
-
import { useCSVReader } from "react-papaparse";
|
|
6
|
+
import { useCSVReader, RECORD_SEP, UNIT_SEP } from "react-papaparse";
|
|
7
7
|
import Button from "@mui/material/Button";
|
|
8
8
|
import React, { useState, useMemo } from "react";
|
|
9
9
|
import Grid from "@mui/material/Grid";
|
|
@@ -12,7 +12,6 @@ import CsvDownloader from "react-csv-downloader";
|
|
|
12
12
|
import Alert from "@mui/material/Alert";
|
|
13
13
|
import { DialogContentText } from "@mui/material";
|
|
14
14
|
import { useWatch } from "react-hook-form";
|
|
15
|
-
import { RECORD_SEP, UNIT_SEP } from "papaparse";
|
|
16
15
|
import { FieldConstants } from "../../../../../utils/constants/fieldConstants.js";
|
|
17
16
|
import { CancelButton } from "../../utils/CancelButton.js";
|
|
18
17
|
function CsvUploader({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Option } from '../../../../utils/types/types';
|
|
2
1
|
import { AutocompleteProps, TextFieldProps } from '@mui/material';
|
|
2
|
+
import { Option } from '../../../../utils/types/types';
|
|
3
3
|
|
|
4
4
|
export interface AutocompleteInputProps extends Omit<AutocompleteProps<Option, boolean | undefined, boolean | undefined, boolean | undefined>, 'value' | 'onChange' | 'renderInput'> {
|
|
5
5
|
name: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Autocomplete, TextField } from "@mui/material";
|
|
3
3
|
import { useController } from "react-hook-form";
|
|
4
|
-
import {
|
|
4
|
+
import { identity, genHelperError, genHelperPreviousValue, isFieldRequired } from "../utils/functions.js";
|
|
5
5
|
import { FieldLabel } from "../utils/FieldLabel.js";
|
|
6
6
|
import { useCustomFormContext } from "../provider/useCustomFormContext.js";
|
|
7
7
|
function AutocompleteInput({
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { FieldConstants } from '../../../../utils/constants/fieldConstants';
|
|
2
|
-
import { default as yup } from '../../../../utils/yupConfig';
|
|
3
1
|
import { ObjectSchema } from 'yup';
|
|
2
|
+
import { FieldConstants } from '../../../../utils/constants/fieldConstants';
|
|
4
3
|
|
|
5
4
|
export declare const RangeType: {
|
|
6
5
|
readonly EQUALITY: {
|
|
@@ -34,7 +33,7 @@ export type RangeInputData = {
|
|
|
34
33
|
[FieldConstants.VALUE_2]: number | null;
|
|
35
34
|
};
|
|
36
35
|
export declare const DEFAULT_RANGE_VALUE: RangeInputData;
|
|
37
|
-
export declare function getRangeInputSchema<TName extends string>(name: TName): Record<TName, ObjectSchema<RangeInputData
|
|
36
|
+
export declare function getRangeInputSchema<TName extends string>(name: TName): Record<TName, ObjectSchema<RangeInputData>>;
|
|
38
37
|
interface RangeInputProps {
|
|
39
38
|
name: string;
|
|
40
39
|
label: string;
|
|
@@ -2,6 +2,6 @@ import { SliderProps } from '@mui/material';
|
|
|
2
2
|
|
|
3
3
|
export interface SliderInputProps extends SliderProps {
|
|
4
4
|
name: string;
|
|
5
|
-
onValueChanged
|
|
5
|
+
onValueChanged?: (value: number | number[]) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare function SliderInput({ name, min, max, step, size, onValueChanged }: SliderInputProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function SliderInput({ name, min, max, step, size, marks, valueLabelDisplay, valueLabelFormat, onValueChanged, }: SliderInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,15 +2,38 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Slider } from "@mui/material";
|
|
3
3
|
import { useController } from "react-hook-form";
|
|
4
4
|
import { identity } from "../utils/functions.js";
|
|
5
|
-
function SliderInput({
|
|
5
|
+
function SliderInput({
|
|
6
|
+
name,
|
|
7
|
+
min,
|
|
8
|
+
max,
|
|
9
|
+
step,
|
|
10
|
+
size = "small",
|
|
11
|
+
marks,
|
|
12
|
+
valueLabelDisplay,
|
|
13
|
+
valueLabelFormat,
|
|
14
|
+
onValueChanged = identity
|
|
15
|
+
}) {
|
|
6
16
|
const {
|
|
7
17
|
field: { onChange, value }
|
|
8
18
|
} = useController({ name });
|
|
9
19
|
const handleValueChange = (event, newValue, activeThumb) => {
|
|
10
|
-
onValueChanged(newValue);
|
|
20
|
+
onValueChanged == null ? void 0 : onValueChanged(newValue);
|
|
11
21
|
onChange(newValue);
|
|
12
22
|
};
|
|
13
|
-
return /* @__PURE__ */ jsx(
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
Slider,
|
|
25
|
+
{
|
|
26
|
+
size,
|
|
27
|
+
min,
|
|
28
|
+
max,
|
|
29
|
+
step,
|
|
30
|
+
value,
|
|
31
|
+
onChange: handleValueChange,
|
|
32
|
+
marks,
|
|
33
|
+
valueLabelDisplay,
|
|
34
|
+
valueLabelFormat
|
|
35
|
+
}
|
|
36
|
+
);
|
|
14
37
|
}
|
|
15
38
|
export {
|
|
16
39
|
SliderInput
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ObjectSchema } from 'yup';
|
|
2
|
-
import { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
3
1
|
import { default as React, PropsWithChildren } from 'react';
|
|
2
|
+
import { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
3
|
+
import { ObjectSchema } from 'yup';
|
|
4
4
|
|
|
5
5
|
type CustomFormContextProps<TFieldValues extends FieldValues = FieldValues> = {
|
|
6
6
|
removeOptional?: boolean;
|
|
@@ -14,11 +14,7 @@ function CustomFormProvider(props) {
|
|
|
14
14
|
CustomFormContext.Provider,
|
|
15
15
|
{
|
|
16
16
|
value: React.useMemo(
|
|
17
|
-
() => ({
|
|
18
|
-
validationSchema,
|
|
19
|
-
removeOptional,
|
|
20
|
-
language
|
|
21
|
-
}),
|
|
17
|
+
() => ({ validationSchema, removeOptional, language }),
|
|
22
18
|
[validationSchema, removeOptional, language]
|
|
23
19
|
),
|
|
24
20
|
children
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Option } from '../../../../utils/types/types';
|
|
2
1
|
import { AutocompleteInputProps } from '../autocompleteInputs/AutocompleteInput';
|
|
2
|
+
import { Option } from '../../../../utils/types/types';
|
|
3
3
|
|
|
4
4
|
export interface SelectInputProps extends Omit<AutocompleteInputProps, 'outputTransform' | 'inputTransform' | 'readOnly' | 'getOptionLabel'> {
|
|
5
5
|
options: Option[];
|