@leav/ui 0.3.6-df40eff → 0.3.6-eb6ea58
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__/common/form.d.ts +10 -5
- package/dist/__mocks__/common/record.d.ts +13 -2
- package/dist/__mocks__/common/record.js.map +1 -1
- package/dist/_gqlTypes/index.d.ts +20 -36
- package/dist/_gqlTypes/index.js +16 -8
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/components/EditApplication/EditApplication.js +2 -2
- package/dist/components/EditApplication/EditApplication.js.map +1 -1
- package/dist/components/EditApplication/_types.d.ts +2 -2
- package/dist/components/Explorer/DataView.d.ts +1 -1
- package/dist/components/Explorer/DataView.js +8 -14
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +2 -0
- package/dist/components/Explorer/Explorer.js +14 -19
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/IdCard.d.ts +7 -0
- package/dist/components/Explorer/IdCard.js +15 -0
- package/dist/components/Explorer/IdCard.js.map +1 -0
- package/dist/components/Explorer/TableCell.d.ts +2 -1
- package/dist/components/Explorer/TableCell.js +80 -20
- package/dist/components/Explorer/TableCell.js.map +1 -1
- package/dist/components/Explorer/TableTagGroup.d.ts +6 -0
- package/dist/components/Explorer/TableTagGroup.js +22 -0
- package/dist/components/Explorer/TableTagGroup.js.map +1 -0
- package/dist/components/Explorer/_queries/useExplorerData.d.ts +10 -2
- package/dist/components/Explorer/_queries/useExplorerData.js +20 -9
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +6 -4
- package/dist/components/Explorer/index.d.ts +1 -3
- package/dist/components/Explorer/index.js +1 -3
- package/dist/components/Explorer/index.js.map +1 -1
- package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.js +1 -2
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.d.ts +11 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +61 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.d.ts +6 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js +28 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.d.ts +6 -0
- package/dist/components/Explorer/{edit-settings/DisplayModeTable.js → manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js} +15 -46
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js +12 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/index.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/index.js +11 -0
- package/dist/components/Explorer/manage-view-settings/index.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.js +2 -2
- package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useEditSettings.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +3 -0
- package/dist/components/Explorer/{edit-settings/useOpenSettings.js → manage-view-settings/open-view-settings/useOpenViewSettings.js} +7 -5
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingsPanel.d.ts +1 -1
- package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingsPanel.js +8 -9
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +109 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.d.ts +10 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +32 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -0
- package/dist/components/Explorer/{edit-settings/ViewSetingsContext.d.ts → manage-view-settings/store-view-settings/ViewSettingsContext.d.ts} +1 -2
- package/dist/components/Explorer/{edit-settings/ViewSetingsContext.js → manage-view-settings/store-view-settings/ViewSettingsContext.js} +1 -5
- package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/store-view-settings}/useViewSettingsContext.js +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +2 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +6 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +79 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +92 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -0
- package/dist/components/Explorer/usePrimaryActions.d.ts +1 -9
- package/dist/components/Explorer/usePrimaryActions.js +4 -12
- package/dist/components/Explorer/usePrimaryActions.js.map +1 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +5 -5
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +1 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +4 -4
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +34 -31
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.d.ts +4 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js +25 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +2 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +191 -35
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.d.ts +2 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +6 -25
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.d.ts +2 -13
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +18 -31
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +15 -38
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +9 -77
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +20 -43
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +22 -45
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +32 -50
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +23 -46
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +6 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +61 -19
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.d.ts +3 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js +17 -43
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +3 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +9 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js +2 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js.map +1 -0
- package/dist/hooks/useDebouncedValue/index.d.ts +1 -0
- package/dist/{components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler → hooks/useDebouncedValue}/index.js +1 -1
- package/dist/hooks/useDebouncedValue/index.js.map +1 -0
- package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -0
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
- package/dist/locales/en/shared.json +26 -9
- package/dist/locales/fr/shared.json +26 -9
- package/package.json +2 -2
- package/dist/components/Explorer/edit-settings/ColumnItem.js.map +0 -1
- package/dist/components/Explorer/edit-settings/DisplayMode.d.ts +0 -6
- package/dist/components/Explorer/edit-settings/DisplayMode.js +0 -34
- package/dist/components/Explorer/edit-settings/DisplayMode.js.map +0 -1
- package/dist/components/Explorer/edit-settings/DisplayModeTable.d.ts +0 -6
- package/dist/components/Explorer/edit-settings/DisplayModeTable.js.map +0 -1
- package/dist/components/Explorer/edit-settings/EditSettingsContext.js.map +0 -1
- package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.js.map +0 -1
- package/dist/components/Explorer/edit-settings/SettingItem.js.map +0 -1
- package/dist/components/Explorer/edit-settings/SettingsPanel.js.map +0 -1
- package/dist/components/Explorer/edit-settings/SidePanel.js.map +0 -1
- package/dist/components/Explorer/edit-settings/ViewSetingsContext.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useEditSettings.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useGetLibraryColumns.d.ts +0 -10
- package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js +0 -24
- package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useOpenSettings.d.ts +0 -1
- package/dist/components/Explorer/edit-settings/useOpenSettings.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useViewSettingsContext.js.map +0 -1
- package/dist/components/Explorer/edit-settings/viewSettingsReducer.d.ts +0 -43
- package/dist/components/Explorer/edit-settings/viewSettingsReducer.js +0 -58
- package/dist/components/Explorer/edit-settings/viewSettingsReducer.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.d.ts +0 -13
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js +0 -90
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.d.ts +0 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js +0 -45
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.d.ts +0 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js +0 -141
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js.map +0 -1
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.d.ts +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.d.ts +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.js +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.d.ts +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.js +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.d.ts +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.d.ts +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.js +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.d.ts +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.js +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/store-view-settings}/useViewSettingsContext.d.ts +0 -0
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { RecordFormAttributeFragment } from '../../../../../../_gqlTypes';
|
|
6
|
-
interface IDSDatePickerWrapperProps extends IProvidedByAntFormItem<DatePickerProps> {
|
|
7
|
-
state: IStandardFieldReducerState;
|
|
8
|
-
attribute: RecordFormAttributeFragment;
|
|
9
|
-
fieldValue: IStandardFieldValue;
|
|
10
|
-
handleSubmit: (value: StandardValueTypes, id?: string) => void;
|
|
11
|
-
handleBlur: () => void;
|
|
12
|
-
shouldShowValueDetailsButton?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const DSDatePickerWrapper: FunctionComponent<IDSDatePickerWrapperProps>;
|
|
15
|
-
export {};
|
|
2
|
+
import { IStandFieldValueContentProps } from './_types';
|
|
3
|
+
import { IKitDatePicker } from 'aristid-ds/dist/Kit/DataEntry/DatePicker/types';
|
|
4
|
+
export declare const DSDatePickerWrapper: FunctionComponent<IStandFieldValueContentProps<IKitDatePicker>>;
|
|
@@ -3,45 +3,36 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
// This file is released under LGPL V3
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
5
|
import { KitDatePicker } from 'aristid-ds';
|
|
6
|
-
import {
|
|
6
|
+
import { useState } from 'react';
|
|
7
7
|
import { Form } from 'antd';
|
|
8
8
|
import dayjs from 'dayjs';
|
|
9
9
|
import styled from 'styled-components';
|
|
10
|
-
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
11
|
-
import { useValueDetailsButton } from '../../../../../../components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton';
|
|
12
|
-
import { useLang } from '../../../../../../hooks';
|
|
13
|
-
import { localizedTranslation } from '@leav/utils';
|
|
14
10
|
import { setDateToUTCNoon } from '../../../../../../_utils';
|
|
11
|
+
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
15
12
|
const KitDatePickerStyled = styled(KitDatePicker) `
|
|
13
|
+
width: 100%;
|
|
16
14
|
color: ${({ $shouldHighlightColor }) => ($shouldHighlightColor ? 'var(--general-colors-primary-400)' : 'initial')};
|
|
17
15
|
`;
|
|
18
|
-
export const DSDatePickerWrapper = ({ value,
|
|
16
|
+
export const DSDatePickerWrapper = ({ value, presentationValue, onChange, state, attribute, handleSubmit }) => {
|
|
19
17
|
if (!onChange) {
|
|
20
18
|
throw Error('DSDatePickerWrapper should be used inside a antd Form.Item');
|
|
21
19
|
}
|
|
22
|
-
const
|
|
23
|
-
const { lang: availableLangs } = useLang();
|
|
20
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
24
21
|
const { errors } = Form.Item.useStatus();
|
|
25
|
-
const {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
});
|
|
29
|
-
const inputRef = useRef(null);
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
if (fieldValue.isEditing && inputRef.current) {
|
|
32
|
-
inputRef.current.nativeElement.click(); // To automatically open the date picker
|
|
33
|
-
}
|
|
34
|
-
}, [fieldValue.isEditing]);
|
|
35
|
-
const _resetToInheritedOrCalculatedValue = () => {
|
|
22
|
+
const { t } = useSharedTranslation();
|
|
23
|
+
const isErrors = errors.length > 0;
|
|
24
|
+
const _resetToInheritedOrCalculatedValue = async () => {
|
|
36
25
|
if (state.isInheritedValue) {
|
|
37
26
|
onChange(dayjs.unix(Number(state.inheritedValue.raw_value)), state.inheritedValue.raw_value);
|
|
38
27
|
}
|
|
39
28
|
else if (state.isCalculatedValue) {
|
|
40
29
|
onChange(dayjs.unix(Number(state.calculatedValue.raw_value)), state.calculatedValue.raw_value);
|
|
41
30
|
}
|
|
42
|
-
handleSubmit(
|
|
31
|
+
await handleSubmit(null, state.attribute.id);
|
|
43
32
|
};
|
|
44
|
-
const
|
|
33
|
+
const _handleFocus = () => setIsFocused(true);
|
|
34
|
+
const _handleBlur = () => setIsFocused(false);
|
|
35
|
+
const _handleDateChange = async (datePickerDate, ...antOnChangeParams) => {
|
|
45
36
|
if ((state.isInheritedValue || state.isCalculatedValue) && datePickerDate === null) {
|
|
46
37
|
_resetToInheritedOrCalculatedValue();
|
|
47
38
|
return;
|
|
@@ -54,26 +45,12 @@ export const DSDatePickerWrapper = ({ value, onChange, handleBlur, state, attrib
|
|
|
54
45
|
if (state.formElement.settings.required && datePickerDate === null) {
|
|
55
46
|
return;
|
|
56
47
|
}
|
|
57
|
-
let dateToSave =
|
|
48
|
+
let dateToSave = '';
|
|
58
49
|
if (!!datePickerDate) {
|
|
59
50
|
dateToSave = String(datePickerDate.unix());
|
|
60
51
|
}
|
|
61
|
-
handleSubmit(dateToSave, state.attribute.id);
|
|
62
|
-
};
|
|
63
|
-
const _getHelper = () => {
|
|
64
|
-
if (state.isInheritedOverrideValue) {
|
|
65
|
-
return t('record_edition.inherited_input_helper', {
|
|
66
|
-
inheritedValue: state.inheritedValue.value
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
else if (state.isCalculatedOverrideValue) {
|
|
70
|
-
return t('record_edition.calculated_input_helper', {
|
|
71
|
-
calculatedValue: state.calculatedValue.value
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
return;
|
|
52
|
+
await handleSubmit(dateToSave, state.attribute.id);
|
|
75
53
|
};
|
|
76
|
-
|
|
77
|
-
return (_jsx(KitDatePickerStyled, { ref: inputRef, value: value, onChange: _handleDateChange, label: label, required: state.formElement.settings.required, disabled: state.isReadOnly, allowClear: !state.isInheritedNotOverrideValue && !state.isCalculatedNotOverrideValue, status: errors.length > 0 ? 'error' : undefined, onInfoClick: shouldShowValueDetailsButton ? onValueDetailsButtonClick : null, helper: _getHelper(), onBlur: handleBlur, "$shouldHighlightColor": state.isInheritedNotOverrideValue || state.isCalculatedNotOverrideValue }));
|
|
54
|
+
return (_jsx(KitDatePickerStyled, { id: attribute.id, value: value, format: isFocused || isErrors || !presentationValue ? undefined : () => presentationValue, disabled: state.isReadOnly, allowClear: !state.isInheritedNotOverrideValue && !state.isCalculatedNotOverrideValue, helper: isErrors ? String(errors[0]) : undefined, status: isErrors ? 'error' : undefined, onChange: _handleDateChange, onFocus: _handleFocus, onBlur: _handleBlur, "$shouldHighlightColor": state.isInheritedNotOverrideValue || state.isCalculatedNotOverrideValue, placeholder: t('record_edition.placeholder.enter_a_date') }));
|
|
78
55
|
};
|
|
79
56
|
//# sourceMappingURL=DSDatePickerWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSDatePickerWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAoB,
|
|
1
|
+
{"version":3,"file":"DSDatePickerWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAoB,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,gBAAgB,EAAC,MAAM,YAAY,CAAC;AAG5C,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,MAAM,mBAAmB,GAAG,MAAM,CAAC,aAAa,CAAC,CAAkC;;aAEtE,CAAC,EAAC,qBAAqB,EAAC,EAAE,EAAE,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,SAAS,CAAC;CAClH,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAoE,CAAC,EACjG,KAAK,EACL,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,SAAS,EACT,YAAY,EACf,EAAE,EAAE;IACD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAC9E,CAAC;IAED,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,EAAC,MAAM,EAAC,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;IACvC,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,QAAQ,GAAG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YACjE,OAAO;QACX,CAAC;QAED,IAAI,UAAU,GAAG,EAAE,CAAC;QACpB,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,UAAU,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC;QAC/C,CAAC;QAED,MAAM,YAAY,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACvD,CAAC,CAAC;IAEF,OAAO,CACH,KAAC,mBAAmB,IAChB,EAAE,EAAE,SAAS,CAAC,EAAE,EAChB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,SAAS,IAAI,QAAQ,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,iBAAiB,EACzF,QAAQ,EAAE,KAAK,CAAC,UAAU,EAC1B,UAAU,EAAE,CAAC,KAAK,CAAC,2BAA2B,IAAI,CAAC,KAAK,CAAC,4BAA4B,EACrF,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAChD,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EACtC,QAAQ,EAAE,iBAAiB,EAC3B,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,WAAW,2BACI,KAAK,CAAC,2BAA2B,IAAI,KAAK,CAAC,4BAA4B,EAC9F,WAAW,EAAE,CAAC,CAAC,yCAAyC,CAAC,GAC3D,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { RecordFormAttributeFragment } from '../../../../../../_gqlTypes';
|
|
6
|
-
interface IDSInputEncryptedWrapper extends IProvidedByAntFormItem<InputProps> {
|
|
7
|
-
state: IStandardFieldReducerState;
|
|
8
|
-
attribute: RecordFormAttributeFragment;
|
|
9
|
-
fieldValue: IStandardFieldValue;
|
|
10
|
-
handleSubmit: (value: string, id?: string) => void;
|
|
11
|
-
handleBlur: () => void;
|
|
12
|
-
shouldShowValueDetailsButton?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const DSInputEncryptedWrapper: FunctionComponent<IDSInputEncryptedWrapper>;
|
|
15
|
-
export {};
|
|
2
|
+
import { IStandFieldValueContentProps } from './_types';
|
|
3
|
+
import { IKitPassword } from 'aristid-ds/dist/Kit/DataEntry/Input/types';
|
|
4
|
+
export declare const DSInputEncryptedWrapper: FunctionComponent<IStandFieldValueContentProps<IKitPassword>>;
|
|
@@ -1,94 +1,26 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
|
-
// This file is released under LGPL V3
|
|
4
|
-
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
-
import { KitInput } from 'aristid-ds';
|
|
6
|
-
import { useEffect, useRef, useState } from 'react';
|
|
7
2
|
import { Form } from 'antd';
|
|
8
|
-
import
|
|
3
|
+
import { KitInput } from 'aristid-ds';
|
|
9
4
|
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
10
|
-
|
|
11
|
-
import { useLang } from '../../../../../../hooks';
|
|
12
|
-
import { localizedTranslation } from '@leav/utils';
|
|
13
|
-
const KitInputPasswordStyled = styled(KitInput.Password) `
|
|
14
|
-
color: ${({ $shouldHighlightColor }) => ($shouldHighlightColor ? 'var(--general-colors-primary-400)' : 'initial')};
|
|
15
|
-
|
|
16
|
-
.kit-input-wrapper-helper {
|
|
17
|
-
white-space: nowrap;
|
|
18
|
-
text-overflow: ellipsis;
|
|
19
|
-
overflow: hidden;
|
|
20
|
-
}
|
|
21
|
-
`;
|
|
22
|
-
export const DSInputEncryptedWrapper = ({ value, onChange, state, attribute, fieldValue, handleSubmit, handleBlur, shouldShowValueDetailsButton = false }) => {
|
|
5
|
+
export const DSInputEncryptedWrapper = ({ value, onChange, state, attribute, handleSubmit }) => {
|
|
23
6
|
if (!onChange) {
|
|
24
7
|
throw Error('DSInputEncryptedWrapper should be used inside a antd Form.Item');
|
|
25
8
|
}
|
|
26
|
-
const { t } = useSharedTranslation();
|
|
27
9
|
const { errors } = Form.Item.useStatus();
|
|
28
|
-
const {
|
|
29
|
-
|
|
30
|
-
attribute
|
|
31
|
-
});
|
|
32
|
-
const [hasChanged, setHasChanged] = useState(false);
|
|
33
|
-
const { lang: availableLang } = useLang();
|
|
34
|
-
const inputRef = useRef(null);
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
if (fieldValue.isEditing && inputRef.current) {
|
|
37
|
-
inputRef.current.focus();
|
|
38
|
-
}
|
|
39
|
-
}, [fieldValue.isEditing]);
|
|
40
|
-
const _resetToInheritedOrCalculatedValue = () => {
|
|
41
|
-
setHasChanged(false);
|
|
42
|
-
if (state.isInheritedValue) {
|
|
43
|
-
onChange(state.inheritedValue.raw_value);
|
|
44
|
-
}
|
|
45
|
-
else if (state.isCalculatedValue) {
|
|
46
|
-
onChange(state.calculatedValue.raw_value);
|
|
47
|
-
}
|
|
48
|
-
handleSubmit('', state.attribute.id);
|
|
49
|
-
};
|
|
10
|
+
const { t } = useSharedTranslation();
|
|
11
|
+
const isErrors = errors.length > 0;
|
|
50
12
|
const _handleOnBlur = (event) => {
|
|
51
|
-
if (!hasChanged) {
|
|
52
|
-
handleBlur();
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
13
|
const valueToSubmit = event.target.value;
|
|
56
|
-
|
|
57
|
-
_resetToInheritedOrCalculatedValue();
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
if (!state.isInheritedValue && !state.isCalculatedValue) {
|
|
61
|
-
handleSubmit(valueToSubmit, state.attribute.id);
|
|
62
|
-
}
|
|
14
|
+
handleSubmit(valueToSubmit, attribute.id);
|
|
63
15
|
onChange(event);
|
|
64
16
|
};
|
|
65
|
-
const _handleOnChange = (event) => {
|
|
66
|
-
setHasChanged(true);
|
|
17
|
+
const _handleOnChange = async (event) => {
|
|
67
18
|
const inputValue = event.target.value;
|
|
68
|
-
if ((state.isInheritedValue || state.isCalculatedValue) && inputValue === '' && event.type === 'click') {
|
|
69
|
-
_resetToInheritedOrCalculatedValue();
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
19
|
onChange(event);
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (state.isInheritedOverrideValue) {
|
|
76
|
-
return t('record_edition.inherited_input_helper', {
|
|
77
|
-
inheritedValue: state.inheritedValue.raw_value
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
else if (state.isCalculatedOverrideValue) {
|
|
81
|
-
return t('record_edition.calculated_input_helper', {
|
|
82
|
-
calculatedValue: state.calculatedValue.raw_value
|
|
83
|
-
});
|
|
20
|
+
if (inputValue === '' && event.type === 'click') {
|
|
21
|
+
await handleSubmit(null, attribute.id);
|
|
84
22
|
}
|
|
85
|
-
return;
|
|
86
23
|
};
|
|
87
|
-
|
|
88
|
-
return (_jsx(KitInputPasswordStyled
|
|
89
|
-
// @ts-expect-error - ref is not a valid prop for Input.Password but works at runtime
|
|
90
|
-
, {
|
|
91
|
-
// @ts-expect-error - ref is not a valid prop for Input.Password but works at runtime
|
|
92
|
-
ref: inputRef, autoComplete: "new-password", "data-testid": "kit-input-password", label: label, required: state.formElement.settings.required, status: errors.length > 0 ? 'error' : undefined, onInfoClick: shouldShowValueDetailsButton ? onValueDetailsButtonClick : null, helper: _getHelper(), value: value, disabled: state.isReadOnly, allowClear: !state.isInheritedNotOverrideValue && !state.isCalculatedNotOverrideValue, onBlur: _handleOnBlur, onChange: _handleOnChange, "$shouldHighlightColor": !hasChanged && (state.isInheritedNotOverrideValue || state.isCalculatedNotOverrideValue) }));
|
|
24
|
+
return (_jsx(KitInput.Password, { id: attribute.id, autoComplete: "new-password", "data-testid": "kit-input-password", helper: isErrors ? String(errors[0]) : undefined, status: isErrors ? 'error' : undefined, value: value, placeholder: t('record_edition.placeholder.enter_a_password'), disabled: state.isReadOnly, allowClear: true, onChange: _handleOnChange, onBlur: _handleOnBlur }));
|
|
93
25
|
};
|
|
94
26
|
//# sourceMappingURL=DSInputEncryptedWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSInputEncryptedWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DSInputEncryptedWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAG1B,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,MAAM,CAAC,MAAM,uBAAuB,GAAkE,CAAC,EACnG,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EACT,YAAY,EACf,EAAE,EAAE;IACD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,KAAK,CAAC,gEAAgE,CAAC,CAAC;IAClF,CAAC;IAED,MAAM,EAAC,MAAM,EAAC,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;IACvC,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IAEnC,MAAM,aAAa,GAAG,CAAC,KAAmC,EAAE,EAAE;QAC1D,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;QACzC,YAAY,CAAC,aAAa,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;QAE1C,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,KAAK,EAAE,KAAoC,EAAE,EAAE;QACnE,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;QACtC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChB,IAAI,UAAU,KAAK,EAAE,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAC9C,MAAM,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;QAC3C,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,CACH,KAAC,QAAQ,CAAC,QAAQ,IACd,EAAE,EAAE,SAAS,CAAC,EAAE,EAChB,YAAY,EAAC,cAAc,iBACf,oBAAoB,EAChC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAChD,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EACtC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,CAAC,CAAC,6CAA6C,CAAC,EAC7D,QAAQ,EAAE,KAAK,CAAC,UAAU,EAC1B,UAAU,QACV,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,aAAa,GACvB,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { RecordFormAttributeFragment } from '../../../../../../_gqlTypes';
|
|
6
|
-
interface IDSInputWrapperProps extends IProvidedByAntFormItem<InputNumberProps> {
|
|
7
|
-
state: IStandardFieldReducerState;
|
|
8
|
-
attribute: RecordFormAttributeFragment;
|
|
9
|
-
fieldValue: IStandardFieldValue;
|
|
10
|
-
handleSubmit: (value: string, id?: string) => void;
|
|
11
|
-
handleBlur: () => void;
|
|
12
|
-
shouldShowValueDetailsButton?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const DSInputNumberWrapper: FunctionComponent<IDSInputWrapperProps>;
|
|
15
|
-
export {};
|
|
2
|
+
import { IStandFieldValueContentProps } from './_types';
|
|
3
|
+
import { KitInputNumberProps } from 'aristid-ds/dist/Kit/DataEntry/InputNumber/types';
|
|
4
|
+
export declare const DSInputNumberWrapper: FunctionComponent<IStandFieldValueContentProps<KitInputNumberProps>>;
|
|
@@ -3,79 +3,56 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
// This file is released under LGPL V3
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
5
|
import { KitInputNumber } from 'aristid-ds';
|
|
6
|
-
import {
|
|
6
|
+
import { useRef, useState } from 'react';
|
|
7
7
|
import { Form } from 'antd';
|
|
8
|
-
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
9
8
|
import styled from 'styled-components';
|
|
10
|
-
import {
|
|
11
|
-
import { localizedTranslation } from '@leav/utils';
|
|
12
|
-
import { useLang } from '../../../../../../hooks';
|
|
9
|
+
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
13
10
|
const KitInputNumberStyled = styled(KitInputNumber) `
|
|
11
|
+
width: 100%;
|
|
14
12
|
.ant-input-number-input-wrap .ant-input-number-input {
|
|
15
13
|
color: ${({ $shouldHighlightColor }) => $shouldHighlightColor ? 'var(--general-colors-primary-400)' : 'initial'};
|
|
16
14
|
}
|
|
17
15
|
`;
|
|
18
|
-
export const DSInputNumberWrapper = ({ value, onChange, state, attribute,
|
|
16
|
+
export const DSInputNumberWrapper = ({ value, presentationValue, onChange, state, attribute, handleSubmit }) => {
|
|
19
17
|
if (!onChange) {
|
|
20
18
|
throw Error('DSInputNumberWrapper should be used inside a antd Form.Item');
|
|
21
19
|
}
|
|
22
|
-
const { t } = useSharedTranslation();
|
|
23
|
-
const { lang } = useLang();
|
|
24
|
-
const { errors } = Form.Item.useStatus();
|
|
25
|
-
const { onValueDetailsButtonClick } = useValueDetailsButton({
|
|
26
|
-
value: fieldValue?.value,
|
|
27
|
-
attribute
|
|
28
|
-
});
|
|
29
20
|
const [hasChanged, setHasChanged] = useState(false);
|
|
21
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
30
22
|
const inputRef = useRef(null);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}, [fieldValue.isEditing]);
|
|
36
|
-
const _resetToInheritedOrCalculatedValue = () => {
|
|
23
|
+
const { errors } = Form.Item.useStatus();
|
|
24
|
+
const { t } = useSharedTranslation();
|
|
25
|
+
const isErrors = errors.length > 0;
|
|
26
|
+
const _resetToInheritedOrCalculatedValue = async () => {
|
|
37
27
|
setHasChanged(false);
|
|
38
28
|
if (state.isInheritedValue) {
|
|
39
|
-
onChange(state.inheritedValue.
|
|
29
|
+
onChange(state.inheritedValue.raw_payload);
|
|
40
30
|
}
|
|
41
31
|
else if (state.isCalculatedValue) {
|
|
42
|
-
onChange(state.calculatedValue.
|
|
32
|
+
onChange(state.calculatedValue.raw_payload);
|
|
43
33
|
}
|
|
44
|
-
handleSubmit(
|
|
34
|
+
await handleSubmit(null, state.attribute.id);
|
|
45
35
|
};
|
|
46
|
-
const
|
|
36
|
+
const _handleFocus = () => setIsFocused(true);
|
|
37
|
+
const _handleOnBlur = async (event) => {
|
|
38
|
+
const valueToSubmit = event.target.value;
|
|
47
39
|
if (!hasChanged) {
|
|
48
|
-
|
|
40
|
+
onChange(valueToSubmit);
|
|
41
|
+
setIsFocused(false);
|
|
49
42
|
return;
|
|
50
43
|
}
|
|
51
|
-
const valueToSubmit = event.target.value;
|
|
52
44
|
if (valueToSubmit === '' && (state.isInheritedValue || state.isCalculatedValue)) {
|
|
53
45
|
_resetToInheritedOrCalculatedValue();
|
|
54
46
|
return;
|
|
55
47
|
}
|
|
56
|
-
if (hasChanged || (!state.isInheritedValue && !state.isCalculatedValue)) {
|
|
57
|
-
handleSubmit(valueToSubmit, state.attribute.id);
|
|
58
|
-
}
|
|
59
48
|
onChange(valueToSubmit);
|
|
49
|
+
setIsFocused(false);
|
|
50
|
+
await handleSubmit(valueToSubmit, state.attribute.id);
|
|
60
51
|
};
|
|
61
52
|
const _handleOnChange = inputValue => {
|
|
62
53
|
setHasChanged(true);
|
|
63
54
|
onChange(inputValue);
|
|
64
55
|
};
|
|
65
|
-
|
|
66
|
-
if (state.isInheritedOverrideValue) {
|
|
67
|
-
return t('record_edition.inherited_input_helper', {
|
|
68
|
-
inheritedValue: state.inheritedValue.raw_value
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
else if (state.isCalculatedOverrideValue) {
|
|
72
|
-
return t('record_edition.calculated_input_helper', {
|
|
73
|
-
calculatedValue: state.calculatedValue.raw_value
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
return;
|
|
77
|
-
};
|
|
78
|
-
const label = localizedTranslation(state.formElement.settings.label, lang);
|
|
79
|
-
return (_jsx(KitInputNumberStyled, { ref: inputRef, required: state.formElement.settings.required, label: label, onInfoClick: shouldShowValueDetailsButton ? onValueDetailsButtonClick : null, status: errors.length > 0 ? 'error' : undefined, helper: _getHelper(), value: value, onChange: _handleOnChange, disabled: state.isReadOnly, onBlur: _handleOnBlur, "$shouldHighlightColor": !hasChanged && (state.isInheritedNotOverrideValue || state.isCalculatedNotOverrideValue) }));
|
|
56
|
+
return (_jsx(KitInputNumberStyled, { ref: inputRef, id: attribute.id, helper: isErrors ? String(errors[0]) : undefined, status: isErrors ? 'error' : undefined, value: value, formatter: v => (isFocused || isErrors || !presentationValue ? `${v}` : `${presentationValue}`), disabled: state.isReadOnly, onChange: _handleOnChange, onFocus: _handleFocus, onBlur: _handleOnBlur, "$shouldHighlightColor": !hasChanged && (state.isInheritedNotOverrideValue || state.isCalculatedNotOverrideValue), placeholder: t('record_edition.placeholder.enter_a_number') }));
|
|
80
57
|
};
|
|
81
58
|
//# sourceMappingURL=DSInputNumberWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSInputNumberWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAuD,
|
|
1
|
+
{"version":3,"file":"DSInputNumberWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAuD,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC7F,OAAO,EAAC,IAAI,EAAS,MAAM,MAAM,CAAC;AAClC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,MAAM,oBAAoB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAkC;;;iBAGpE,CAAC,EAAC,qBAAqB,EAAC,EAAE,EAAE,CACjC,qBAAqB,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,SAAS;;CAElF,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAyE,CAAC,EACvG,KAAK,EACL,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,SAAS,EACT,YAAY,EACf,EAAE,EAAE;IACD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,KAAK,CAAC,6DAA6D,CAAC,CAAC;I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|
-
|
|
5
|
-
import { RecordFormAttributeFragment } from '../../../../../../_gqlTypes';
|
|
6
|
-
interface IDSInputWrapperProps extends IProvidedByAntFormItem<InputProps> {
|
|
7
|
-
state: IStandardFieldReducerState;
|
|
8
|
-
attribute: RecordFormAttributeFragment;
|
|
9
|
-
fieldValue: IStandardFieldValue;
|
|
10
|
-
handleSubmit: (value: string, id?: string) => void;
|
|
11
|
-
handleBlur: () => void;
|
|
12
|
-
shouldShowValueDetailsButton?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const DSInputWrapper: FunctionComponent<IDSInputWrapperProps>;
|
|
15
|
-
export {};
|
|
2
|
+
import { IStandFieldValueContentProps } from './_types';
|
|
3
|
+
import { IKitInput } from 'aristid-ds/dist/Kit/DataEntry/Input/types';
|
|
4
|
+
export declare const DSInputWrapper: FunctionComponent<IStandFieldValueContentProps<IKitInput>>;
|
|
@@ -3,47 +3,38 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
// This file is released under LGPL V3
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
5
|
import { KitInput } from 'aristid-ds';
|
|
6
|
-
import {
|
|
6
|
+
import { useState } from 'react';
|
|
7
7
|
import { Form } from 'antd';
|
|
8
8
|
import styled from 'styled-components';
|
|
9
9
|
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
10
|
-
import { useValueDetailsButton } from '../../../../../../components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton';
|
|
11
|
-
import { useLang } from '../../../../../../hooks';
|
|
12
|
-
import { localizedTranslation } from '@leav/utils';
|
|
13
10
|
const KitInputStyled = styled(KitInput) `
|
|
14
11
|
color: ${({ $shouldHighlightColor }) => ($shouldHighlightColor ? 'var(--general-colors-primary-400)' : 'initial')};
|
|
15
12
|
`;
|
|
16
|
-
export const DSInputWrapper = ({ value, onChange, state, attribute,
|
|
13
|
+
export const DSInputWrapper = ({ value, presentationValue, onChange, state, attribute, handleSubmit }) => {
|
|
17
14
|
if (!onChange) {
|
|
18
15
|
throw Error('DSInputWrapper should be used inside a antd Form.Item');
|
|
19
16
|
}
|
|
20
|
-
const { t } = useSharedTranslation();
|
|
21
|
-
const { errors } = Form.Item.useStatus();
|
|
22
|
-
const { onValueDetailsButtonClick } = useValueDetailsButton({
|
|
23
|
-
value: fieldValue?.value,
|
|
24
|
-
attribute
|
|
25
|
-
});
|
|
26
17
|
const [hasChanged, setHasChanged] = useState(false);
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}, [fieldValue.isEditing]);
|
|
34
|
-
const _resetToInheritedOrCalculatedValue = () => {
|
|
18
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
19
|
+
const { errors } = Form.Item.useStatus();
|
|
20
|
+
const { t } = useSharedTranslation();
|
|
21
|
+
const isErrors = errors.length > 0;
|
|
22
|
+
const valueToDisplay = isFocused || isErrors ? value : presentationValue;
|
|
23
|
+
const _resetToInheritedOrCalculatedValue = async () => {
|
|
35
24
|
setHasChanged(false);
|
|
36
25
|
if (state.isInheritedValue) {
|
|
37
|
-
onChange(state.inheritedValue.
|
|
26
|
+
onChange(state.inheritedValue.raw_payload);
|
|
38
27
|
}
|
|
39
28
|
else if (state.isCalculatedValue) {
|
|
40
|
-
onChange(state.calculatedValue.
|
|
29
|
+
onChange(state.calculatedValue.raw_payload);
|
|
41
30
|
}
|
|
42
|
-
handleSubmit(
|
|
31
|
+
await handleSubmit(null, state.attribute.id);
|
|
43
32
|
};
|
|
44
|
-
const
|
|
33
|
+
const _handleFocus = () => setIsFocused(true);
|
|
34
|
+
const _handleOnBlur = async (event) => {
|
|
45
35
|
if (!hasChanged) {
|
|
46
|
-
|
|
36
|
+
onChange(event);
|
|
37
|
+
setIsFocused(false);
|
|
47
38
|
return;
|
|
48
39
|
}
|
|
49
40
|
const valueToSubmit = event.target.value;
|
|
@@ -51,37 +42,23 @@ export const DSInputWrapper = ({ value, onChange, state, attribute, fieldValue,
|
|
|
51
42
|
_resetToInheritedOrCalculatedValue();
|
|
52
43
|
return;
|
|
53
44
|
}
|
|
54
|
-
if (hasChanged || (!state.isInheritedValue && !state.isCalculatedValue)) {
|
|
55
|
-
handleSubmit(valueToSubmit, state.attribute.id);
|
|
56
|
-
}
|
|
57
45
|
onChange(event);
|
|
46
|
+
setIsFocused(false);
|
|
47
|
+
await handleSubmit(valueToSubmit, state.attribute.id);
|
|
58
48
|
};
|
|
59
|
-
|
|
49
|
+
// TODO remove this function to use onClear Prop when ant is updated to 5.20+ (and other inputs too)
|
|
50
|
+
const _handleOnChange = async (event) => {
|
|
60
51
|
setHasChanged(true);
|
|
61
52
|
const inputValue = event.target.value;
|
|
62
53
|
if ((state.isInheritedValue || state.isCalculatedValue) && inputValue === '' && event.type === 'click') {
|
|
63
54
|
_resetToInheritedOrCalculatedValue();
|
|
64
55
|
return;
|
|
65
56
|
}
|
|
66
|
-
if (inputValue === '' && event.type === 'click') {
|
|
67
|
-
handleSubmit(inputValue, state.attribute.id);
|
|
68
|
-
}
|
|
69
57
|
onChange(event);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (state.isInheritedOverrideValue) {
|
|
73
|
-
return t('record_edition.inherited_input_helper', {
|
|
74
|
-
inheritedValue: state.inheritedValue.raw_value
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
else if (state.isCalculatedOverrideValue) {
|
|
78
|
-
return t('record_edition.calculated_input_helper', {
|
|
79
|
-
calculatedValue: state.calculatedValue.raw_value
|
|
80
|
-
});
|
|
58
|
+
if (inputValue === '' && event.type === 'click') {
|
|
59
|
+
await handleSubmit(inputValue, state.attribute.id);
|
|
81
60
|
}
|
|
82
|
-
return;
|
|
83
61
|
};
|
|
84
|
-
|
|
85
|
-
return (_jsx(KitInputStyled, { ref: inputRef, required: state.formElement.settings.required, label: label, onInfoClick: shouldShowValueDetailsButton ? onValueDetailsButtonClick : null, status: errors.length > 0 ? 'error' : undefined, helper: _getHelper(), value: value, disabled: state.isReadOnly, allowClear: !state.isInheritedNotOverrideValue && !state.isCalculatedNotOverrideValue, onBlur: _handleOnBlur, onChange: _handleOnChange, "$shouldHighlightColor": !hasChanged && (state.isInheritedNotOverrideValue || state.isCalculatedNotOverrideValue) }));
|
|
62
|
+
return (_jsx(KitInputStyled, { id: attribute.id, disabled: state.isReadOnly, helper: isErrors ? String(errors[0]) : undefined, status: isErrors ? 'error' : undefined, value: valueToDisplay, allowClear: !state.isInheritedNotOverrideValue && !state.isCalculatedNotOverrideValue, onChange: _handleOnChange, onFocus: _handleFocus, onBlur: _handleOnBlur, "$shouldHighlightColor": !hasChanged && (state.isInheritedNotOverrideValue || state.isCalculatedNotOverrideValue), placeholder: t('record_edition.placeholder.enter_a_text') }));
|
|
86
63
|
};
|
|
87
64
|
//# sourceMappingURL=DSInputWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSInputWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAA6C,
|
|
1
|
+
{"version":3,"file":"DSInputWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAA6C,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAC,oB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AU,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QACvD,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,CACH,KAAC,cAAc,IACX,EAAE,EAAE,SAAS,CAAC,EAAE,EAChB,QAAQ,EAAE,KAAK,CAAC,UAAU,EAC1B,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAChD,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EACtC,KAAK,EAAE,cAAc,EACrB,UAAU,EAAE,CAAC,KAAK,CAAC,2BAA2B,IAAI,CAAC,KAAK,CAAC,4BAA4B,EACrF,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,aAAa,2BAEjB,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,2BAA2B,IAAI,KAAK,CAAC,4BAA4B,CAAC,EAE5F,WAAW,EAAE,CAAC,CAAC,yCAAyC,CAAC,GAC3D,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { RecordFormAttributeFragment } from '../../../../../../_gqlTypes';
|
|
6
|
-
interface IDSRangePickerWrapperProps extends IProvidedByAntFormItem<RangePickerProps> {
|
|
7
|
-
state: IStandardFieldReducerState;
|
|
8
|
-
attribute: RecordFormAttributeFragment;
|
|
9
|
-
fieldValue: IStandardFieldValue;
|
|
10
|
-
handleSubmit: (value: StandardValueTypes, id?: string) => void;
|
|
11
|
-
handleBlur: () => void;
|
|
12
|
-
shouldShowValueDetailsButton?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const DSRangePickerWrapper: FunctionComponent<IDSRangePickerWrapperProps>;
|
|
15
|
-
export {};
|
|
2
|
+
import { IStandFieldValueContentProps } from './_types';
|
|
3
|
+
import { IKitRangePicker } from 'aristid-ds/dist/Kit/DataEntry/DatePicker/types';
|
|
4
|
+
export declare const DSRangePickerWrapper: FunctionComponent<IStandFieldValueContentProps<IKitRangePicker>>;
|