From b22fc333006198517d7812ddfbd46bd1611f1eeb Mon Sep 17 00:00:00 2001 From: Joris Mancini Date: Thu, 3 Oct 2024 15:49:39 +0200 Subject: [PATCH] fix: some exports Signed-off-by: Joris Mancini --- src/components/filter/expert/ExpertFilterForm.tsx | 10 ++++++++-- src/components/filter/expert/expertFilterConstants.ts | 2 +- src/components/inputs/reactHookForm/utils/index.ts | 2 ++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/filter/expert/ExpertFilterForm.tsx b/src/components/filter/expert/ExpertFilterForm.tsx index 2d721e0bd..3cbdb8c36 100644 --- a/src/components/filter/expert/ExpertFilterForm.tsx +++ b/src/components/filter/expert/ExpertFilterForm.tsx @@ -16,7 +16,13 @@ import * as yup from 'yup'; import { v4 as uuid4 } from 'uuid'; import { useIntl } from 'react-intl'; import { testQuery } from './expertFilterUtils'; -import { COMBINATOR_OPTIONS, EXPERT_FILTER_EQUIPMENTS, fields, OPERATOR_OPTIONS, RULES } from './expertFilterConstants'; +import { + COMBINATOR_OPTIONS, + EXPERT_FILTER_EQUIPMENTS, + EXPERT_FILTER_FIELDS, + OPERATOR_OPTIONS, + RULES, +} from './expertFilterConstants'; import { FieldType } from './expertFilter.type'; import { FieldConstants } from '../../../utils/constants/fieldConstants'; @@ -110,7 +116,7 @@ export function ExpertFilterForm() { }); const translatedFields = useMemo(() => { - return fields[watchEquipmentType]?.map((field) => { + return EXPERT_FILTER_FIELDS[watchEquipmentType]?.map((field) => { return { ...field, label: intl.formatMessage({ id: field.label }), diff --git a/src/components/filter/expert/expertFilterConstants.ts b/src/components/filter/expert/expertFilterConstants.ts index 30c41ddca..6b89c117a 100644 --- a/src/components/filter/expert/expertFilterConstants.ts +++ b/src/components/filter/expert/expertFilterConstants.ts @@ -1043,7 +1043,7 @@ export const FIELDS_OPTIONS = { }, }; -export const fields: Record = { +export const EXPERT_FILTER_FIELDS: Record = { SUBSTATION: [FIELDS_OPTIONS.ID, FIELDS_OPTIONS.NAME, FIELDS_OPTIONS.COUNTRY, FIELDS_OPTIONS.PROPERTY], VOLTAGE_LEVEL: [ FIELDS_OPTIONS.ID, diff --git a/src/components/inputs/reactHookForm/utils/index.ts b/src/components/inputs/reactHookForm/utils/index.ts index 51b4ba823..c805a4a85 100644 --- a/src/components/inputs/reactHookForm/utils/index.ts +++ b/src/components/inputs/reactHookForm/utils/index.ts @@ -4,6 +4,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +export * from './CancelButton'; export * from './FieldLabel'; export * from './SubmitButton'; export * from './TextFieldWithAdornment';