@leav/ui 0.3.6-032b1da → 0.3.6-04ab99a
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/attribute.js +2 -1
- package/dist/__mocks__/common/attribute.js.map +1 -1
- package/dist/__mocks__/common/form.d.ts +10 -5
- package/dist/__mocks__/common/form.js +2 -2
- package/dist/__mocks__/common/form.js.map +1 -1
- package/dist/__mocks__/common/record.d.ts +13 -2
- package/dist/__mocks__/common/record.js.map +1 -1
- package/dist/_gqlTypes/index.d.ts +248 -18
- package/dist/_gqlTypes/index.js +98 -5
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/records/getRecordFormQuery.js +2 -0
- package/dist/_queries/records/getRecordFormQuery.js.map +1 -1
- package/dist/_queries/records/getRecordPropertiesQuery.js +2 -0
- package/dist/_queries/records/getRecordPropertiesQuery.js.map +1 -1
- package/dist/_queries/records/recordFormAttributeFragment.js +2 -0
- package/dist/_queries/records/recordFormAttributeFragment.js.map +1 -1
- package/dist/_utils/index.d.ts +2 -0
- package/dist/_utils/index.js +4 -0
- package/dist/_utils/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 +10 -1
- package/dist/components/Explorer/DataView.js +32 -34
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +9 -4
- package/dist/components/Explorer/Explorer.js +47 -10
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerTitle.d.ts +7 -0
- package/dist/components/Explorer/ExplorerTitle.js +30 -0
- package/dist/components/Explorer/ExplorerTitle.js.map +1 -0
- 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 +8 -0
- package/dist/components/Explorer/TableCell.js +110 -0
- package/dist/components/Explorer/TableCell.js.map +1 -0
- 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 +24 -0
- package/dist/components/Explorer/_queries/useExplorerData.js +55 -0
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -0
- package/dist/components/Explorer/_types.d.ts +35 -0
- package/dist/components/Explorer/_types.js +2 -0
- package/dist/components/Explorer/_types.js.map +1 -0
- package/dist/components/Explorer/index.d.ts +9 -1
- package/dist/components/Explorer/index.js +6 -1
- package/dist/components/Explorer/index.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.d.ts +12 -0
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js +77 -0
- 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/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +58 -0
- 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.d.ts +14 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js +15 -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.d.ts +7 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js +17 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.d.ts +2 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js +19 -0
- 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.d.ts +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useEditSettings.js +7 -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/manage-view-settings/open-view-settings/useOpenViewSettings.js +21 -0
- 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.d.ts +9 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js +55 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.d.ts +7 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +52 -0
- 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/manage-view-settings/store-view-settings/ViewSettingsContext.d.ts +6 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js +11 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js +7 -0
- 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 +3 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +8 -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 +87 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +100 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -0
- package/dist/components/Explorer/{useCreateMainAction.d.ts → useCreateAction.d.ts} +3 -3
- package/dist/components/Explorer/{useCreateMainAction.js → useCreateAction.js} +11 -7
- package/dist/components/Explorer/useCreateAction.js.map +1 -0
- package/dist/components/Explorer/useDeactivateAction.d.ts +1 -1
- package/dist/components/Explorer/useDeactivateAction.js +1 -1
- package/dist/components/Explorer/useDeactivateAction.js.map +1 -1
- package/dist/components/Explorer/useEditAction.d.ts +1 -1
- package/dist/components/Explorer/useEditAction.js +3 -2
- package/dist/components/Explorer/useEditAction.js.map +1 -1
- package/dist/components/Explorer/usePagination.d.ts +7 -0
- package/dist/components/Explorer/usePagination.js +25 -0
- package/dist/components/Explorer/usePagination.js.map +1 -0
- package/dist/components/Explorer/usePrimaryActions.d.ts +12 -0
- package/dist/components/Explorer/usePrimaryActions.js +21 -0
- package/dist/components/Explorer/usePrimaryActions.js.map +1 -0
- package/dist/components/Explorer/useTableScrollableHeight.d.ts +5 -0
- package/dist/components/Explorer/useTableScrollableHeight.js +15 -0
- package/dist/components/Explorer/useTableScrollableHeight.js.map +1 -0
- 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 +23 -5
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +6 -6
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +34 -31
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.d.ts +121 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.js +31 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +2 -2
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +3 -9
- 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 +9 -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 +21 -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 +21 -37
- 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 +11 -76
- 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 +25 -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 +38 -49
- 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 +26 -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 +4 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js +119 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +12 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.js +2 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.js.map +1 -0
- 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/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- 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 +40 -4
- package/dist/locales/fr/shared.json +40 -4
- package/package.json +5 -2
- package/dist/components/Explorer/types.d.ts +0 -21
- package/dist/components/Explorer/types.js +0 -2
- package/dist/components/Explorer/types.js.map +0 -1
- package/dist/components/Explorer/useCreateMainAction.js.map +0 -1
- package/dist/components/Explorer/useExplorerData.d.ts +0 -11
- package/dist/components/Explorer/useExplorerData.js +0 -23
- package/dist/components/Explorer/useExplorerData.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 -80
- 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 -137
- 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
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import { IStandardFieldReducerState } from '../../../reducers/standardFieldReducer/standardFieldReducer';
|
|
3
|
-
import { IProvidedByAntFormItem } from '../../../../../../components/RecordEdition/EditRecordContent/_types';
|
|
4
2
|
import { IKitSwitch } from 'aristid-ds/dist/Kit/DataEntry/Switch/types';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
handleSubmit: (value: string, id?: string) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const DSBooleanWrapper: FunctionComponent<IDSBooleanWrapperProps>;
|
|
10
|
-
export {};
|
|
3
|
+
import { IStandFieldValueContentProps } from './_types';
|
|
4
|
+
export declare const DSBooleanWrapper: FunctionComponent<IStandFieldValueContentProps<IKitSwitch>>;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
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
|
-
import {
|
|
6
|
-
import { Form } from 'antd';
|
|
5
|
+
import { KitSwitch, KitTypography } from 'aristid-ds';
|
|
7
6
|
import styled from 'styled-components';
|
|
8
7
|
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
9
|
-
import { useLang } from '../../../../../../hooks';
|
|
10
|
-
import { localizedTranslation } from '@leav/utils';
|
|
11
8
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
12
9
|
import { faCircleXmark } from '@fortawesome/free-solid-svg-icons';
|
|
13
10
|
const KitTypographyTextStyled = styled(KitTypography.Text) `
|
|
@@ -22,10 +19,11 @@ const FontAwesomeIconStyled = styled(FontAwesomeIcon) `
|
|
|
22
19
|
cursor: pointer;
|
|
23
20
|
`;
|
|
24
21
|
const _getBooleanValueAsStringForTranslation = (value) => (value ? 'global.yes' : 'global.no');
|
|
25
|
-
export const DSBooleanWrapper = ({ value, onChange, state, handleSubmit }) => {
|
|
22
|
+
export const DSBooleanWrapper = ({ value, onChange, state, attribute, handleSubmit }) => {
|
|
23
|
+
if (!onChange) {
|
|
24
|
+
throw Error('DSBooleanWrapper should be used inside a antd Form.Item');
|
|
25
|
+
}
|
|
26
26
|
const { t } = useSharedTranslation();
|
|
27
|
-
const { errors } = Form.Item.useStatus();
|
|
28
|
-
const { lang: availableLang } = useLang();
|
|
29
27
|
const _resetToInheritedOrCalculatedValue = () => {
|
|
30
28
|
if (state.isInheritedValue) {
|
|
31
29
|
onChange(state.inheritedValue.raw_value, undefined);
|
|
@@ -33,26 +31,12 @@ export const DSBooleanWrapper = ({ value, onChange, state, handleSubmit }) => {
|
|
|
33
31
|
else if (state.isCalculatedValue) {
|
|
34
32
|
onChange(state.calculatedValue.raw_value, undefined);
|
|
35
33
|
}
|
|
36
|
-
handleSubmit(
|
|
34
|
+
handleSubmit(null, state.attribute.id);
|
|
37
35
|
};
|
|
38
36
|
const _handleOnChange = (checked, event) => {
|
|
39
|
-
handleSubmit(String(checked), state.attribute.id);
|
|
40
37
|
onChange(checked, event);
|
|
38
|
+
handleSubmit(String(checked), state.attribute.id);
|
|
41
39
|
};
|
|
42
|
-
|
|
43
|
-
if (state.isInheritedOverrideValue) {
|
|
44
|
-
return t('record_edition.inherited_input_helper', {
|
|
45
|
-
inheritedValue: t(_getBooleanValueAsStringForTranslation(state.inheritedValue.raw_value))
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
else if (state.isCalculatedOverrideValue) {
|
|
49
|
-
return t('record_edition.calculated_input_helper', {
|
|
50
|
-
calculatedValue: t(_getBooleanValueAsStringForTranslation(state.calculatedValue.raw_value))
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
return undefined;
|
|
54
|
-
};
|
|
55
|
-
const label = localizedTranslation(state.formElement.settings.label, availableLang);
|
|
56
|
-
return (_jsxs(KitInputWrapper, { label: label, helper: _getHelper(), status: errors.length > 0 ? 'error' : undefined, disabled: state.isReadOnly, children: [_jsxs("label", { children: [_jsx(KitSwitch, { checked: value, disabled: state.isReadOnly, onChange: _handleOnChange }), _jsx(KitTypographyTextStyled, { size: "fontSize5", weight: "medium", "$shouldHighlightColor": state.isInheritedNotOverrideValue || state.isCalculatedNotOverrideValue, children: t(_getBooleanValueAsStringForTranslation(value)) })] }), (state.isInheritedOverrideValue || state.isCalculatedOverrideValue) && (_jsx("span", { role: "button", onClick: _resetToInheritedOrCalculatedValue, children: _jsx(FontAwesomeIconStyled, { "aria-label": "clear", icon: faCircleXmark }) }))] }));
|
|
40
|
+
return (_jsxs(_Fragment, { children: [_jsxs("label", { children: [_jsx(KitSwitch, { id: attribute.id, checked: value, disabled: state.isReadOnly, onChange: _handleOnChange }), _jsx(KitTypographyTextStyled, { size: "fontSize5", weight: "medium", "$shouldHighlightColor": state.isInheritedNotOverrideValue || state.isCalculatedNotOverrideValue, children: t(_getBooleanValueAsStringForTranslation(value)) })] }), (state.isInheritedOverrideValue || state.isCalculatedOverrideValue) && (_jsx("span", { role: "button", onClick: _resetToInheritedOrCalculatedValue, children: _jsx(FontAwesomeIconStyled, { "aria-label": "clear", icon: faCircleXmark }) }))] }));
|
|
57
41
|
};
|
|
58
42
|
//# sourceMappingURL=DSBooleanWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSBooleanWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"DSBooleanWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAEpD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,aAAa,EAAC,MAAM,mCAAmC,CAAC;AAGhE,MAAM,uBAAuB,GAAG,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAkC;;;aAG/E,CAAC,EAAC,qBAAqB,EAAC,EAAE,EAAE,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,SAAS,CAAC;CAClH,CAAC;AAEF,MAAM,qBAAqB,GAAG,MAAM,CAAC,eAAe,CAAC,CAAA;;;;;CAKpD,CAAC;AAEF,MAAM,sCAAsC,GAAG,CAAC,KAAc,EAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;AAEhH,MAAM,CAAC,MAAM,gBAAgB,GAAgE,CAAC,EAC1F,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EACT,YAAY,EACf,EAAE,EAAE;IACD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC3E,CAAC;IAED,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,kCAAkC,GAAG,GAAG,EAAE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2
|
-
import { IStandardFieldReducerState, IStandardFieldValue } from '../../../reducers/standardFieldReducer/standardFieldReducer';
|
|
3
|
-
import { IProvidedByAntFormItem } from '../../../../../../components/RecordEdition/EditRecordContent/_types';
|
|
4
|
-
import { RecordFormAttributeFragment } from '../../../../../../_gqlTypes';
|
|
5
2
|
import { KitColorPickerProps } from 'aristid-ds/dist/Kit/DataEntry/ColorPicker/types';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
attribute: RecordFormAttributeFragment;
|
|
9
|
-
fieldValue: IStandardFieldValue;
|
|
10
|
-
handleSubmit: (value: string, id?: string) => void;
|
|
11
|
-
handleBlur: () => void;
|
|
12
|
-
shouldShowValueDetailsButton?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const DSColorPickerWrapper: FunctionComponent<IDSColorPickerWrapperProps>;
|
|
15
|
-
export {};
|
|
3
|
+
import { IStandFieldValueContentProps } from './_types';
|
|
4
|
+
export declare const DSColorPickerWrapper: FunctionComponent<IStandFieldValueContentProps<KitColorPickerProps>>;
|
|
@@ -3,13 +3,14 @@ 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 { KitColorPicker } from 'aristid-ds';
|
|
6
|
-
import {
|
|
6
|
+
import { useState } from 'react';
|
|
7
7
|
import styled from 'styled-components';
|
|
8
|
-
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
9
8
|
import { useLang } from '../../../../../../hooks';
|
|
10
9
|
import { localizedTranslation } from '@leav/utils';
|
|
11
|
-
import { useValueDetailsButton } from '../../../shared/ValueDetailsBtn/useValueDetailsButton';
|
|
12
10
|
const KitColorPickerStyled = styled(KitColorPicker) `
|
|
11
|
+
width: 100%;
|
|
12
|
+
justify-content: start; //TODO: Remove when the component is fixed in DS
|
|
13
|
+
|
|
13
14
|
.ant-color-picker-trigger-text {
|
|
14
15
|
color: ${({ $shouldHighlightColor }) => $shouldHighlightColor ? 'var(--general-colors-primary-400)' : 'var(--general-utilities-text-primary)'};
|
|
15
16
|
|
|
@@ -18,30 +19,27 @@ const KitColorPickerStyled = styled(KitColorPicker) `
|
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
`;
|
|
21
|
-
export const DSColorPickerWrapper = ({ value,
|
|
22
|
-
|
|
22
|
+
export const DSColorPickerWrapper = ({ value, presentationValue, onChange, state, attribute, handleSubmit }) => {
|
|
23
|
+
if (!onChange) {
|
|
24
|
+
throw Error('DSColorPickerWrapper should be used inside a antd Form.Item');
|
|
25
|
+
}
|
|
23
26
|
const { lang: availableLang } = useLang();
|
|
24
27
|
const [hasChanged, setHasChanged] = useState(false);
|
|
28
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
25
29
|
const [currentColor, setCurrentColor] = useState();
|
|
26
30
|
const [currentHex, setCurrentHex] = useState(value ?? '');
|
|
27
|
-
const
|
|
28
|
-
const { onValueDetailsButtonClick } = useValueDetailsButton({
|
|
29
|
-
value: fieldValue?.value,
|
|
30
|
-
attribute
|
|
31
|
-
});
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
if (fieldValue.isEditing) {
|
|
34
|
-
colorPickerRef.current.focus();
|
|
35
|
-
}
|
|
36
|
-
}, [fieldValue.isEditing]);
|
|
37
|
-
const _handleOnOpenChange = (open) => {
|
|
31
|
+
const _handleOnOpenChange = async (open) => {
|
|
38
32
|
if (!open) {
|
|
39
33
|
if (!hasChanged) {
|
|
40
|
-
|
|
34
|
+
setIsFocused(false);
|
|
41
35
|
return;
|
|
42
36
|
}
|
|
43
|
-
handleSubmit(currentColor.toHex(), state.attribute.id);
|
|
44
37
|
onChange(currentColor, currentHex);
|
|
38
|
+
setIsFocused(false);
|
|
39
|
+
await handleSubmit(currentColor.toHex(), state.attribute.id);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
setIsFocused(true);
|
|
45
43
|
}
|
|
46
44
|
};
|
|
47
45
|
const _handleOnChange = (color, hex) => {
|
|
@@ -50,7 +48,7 @@ export const DSColorPickerWrapper = ({ value, state, attribute, fieldValue, onCh
|
|
|
50
48
|
setCurrentColor(color);
|
|
51
49
|
onChange(color, hex);
|
|
52
50
|
};
|
|
53
|
-
const _handleOnClear = () => {
|
|
51
|
+
const _handleOnClear = async () => {
|
|
54
52
|
setHasChanged(false);
|
|
55
53
|
if (state.isInheritedValue) {
|
|
56
54
|
onChange(undefined, state.inheritedValue.raw_value);
|
|
@@ -58,19 +56,11 @@ export const DSColorPickerWrapper = ({ value, state, attribute, fieldValue, onCh
|
|
|
58
56
|
else if (state.isCalculatedValue) {
|
|
59
57
|
onChange(undefined, state.calculatedValue.raw_value);
|
|
60
58
|
}
|
|
61
|
-
onChange(null,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const _getHelper = () => {
|
|
65
|
-
if (state.isInheritedOverrideValue) {
|
|
66
|
-
return t('record_edition.inherited_input_helper', { inheritedValue: state.inheritedValue.raw_value });
|
|
67
|
-
}
|
|
68
|
-
else if (state.isCalculatedOverrideValue) {
|
|
69
|
-
return t('record_edition.calculated_input_helper', { calculatedValue: state.calculatedValue.raw_value });
|
|
70
|
-
}
|
|
71
|
-
return;
|
|
59
|
+
onChange(null, null);
|
|
60
|
+
setIsFocused(false);
|
|
61
|
+
await handleSubmit(null, state.attribute.id);
|
|
72
62
|
};
|
|
73
63
|
const label = localizedTranslation(state.formElement.settings.label, availableLang);
|
|
74
|
-
return (_jsx(KitColorPickerStyled, {
|
|
64
|
+
return (_jsx(KitColorPickerStyled, { id: attribute.id, "data-testid": attribute.id, value: currentHex, showText: isFocused || !presentationValue ? true : () => `${presentationValue}`, "aria-label": label, disabled: state.isReadOnly, disabledAlpha: true, allowClear: !state.isInheritedNotOverrideValue && !state.isCalculatedNotOverrideValue, onOpenChange: _handleOnOpenChange, onChange: _handleOnChange, onClear: _handleOnClear, "$shouldHighlightColor": !hasChanged && (state.isInheritedNotOverrideValue || state.isCalculatedNotOverrideValue) }));
|
|
75
65
|
};
|
|
76
66
|
//# sourceMappingURL=DSColorPickerWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSColorPickerWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAoB,
|
|
1
|
+
{"version":3,"file":"DSColorPickerWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAoB,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAIjD,MAAM,oBAAoB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAkC;;;;;iBAKpE,CAAC,EAAC,qBAAqB,EAAC,EAAE,EAAE,CACjC,qBAAqB,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,uCAAuC;;;;;;CAMhH,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;IAC/E,CAAC;IAED,MAAM,EAAC,IAAI,E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AC,SAAS,CAAC,CAAC;QACxD,CAAC;aAAM,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YACjC,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QACzD,CAAC;QAED,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACrB,YAAY,CAAC,KAAK,CAAC,CAAC;QACpB,MAAM,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACjD,CAAC,CAAC;IAEF,MAAM,KAAK,GAAG,oBAAoB,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAEpF,OAAO,CACH,KAAC,oBAAoB,IACjB,EAAE,EAAE,SAAS,CAAC,EAAE,iBACH,SAAS,CAAC,EAAE,EACzB,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,SAAS,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,iBAAiB,EAAE,gBACnE,KAAK,EACjB,QAAQ,EAAE,KAAK,CAAC,UAAU,EAC1B,aAAa,QACb,UAAU,EAAE,CAAC,KAAK,CAAC,2BAA2B,IAAI,CAAC,KAAK,CAAC,4BAA4B,EACrF,YAAY,EAAE,mBAAmB,EACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,cAAc,2BAEnB,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,2BAA2B,IAAI,KAAK,CAAC,4BAA4B,CAAC,GAE9F,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 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,70 +3,54 @@ 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 { setDateToUTCNoon } from '../../../../../../_utils';
|
|
10
11
|
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
12
|
const KitDatePickerStyled = styled(KitDatePicker) `
|
|
13
|
+
width: 100%;
|
|
15
14
|
color: ${({ $shouldHighlightColor }) => ($shouldHighlightColor ? 'var(--general-colors-primary-400)' : 'initial')};
|
|
16
15
|
`;
|
|
17
|
-
export const DSDatePickerWrapper = ({ value,
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
export const DSDatePickerWrapper = ({ value, presentationValue, onChange, state, attribute, handleSubmit }) => {
|
|
17
|
+
if (!onChange) {
|
|
18
|
+
throw Error('DSDatePickerWrapper should be used inside a antd Form.Item');
|
|
19
|
+
}
|
|
20
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
20
21
|
const { errors } = Form.Item.useStatus();
|
|
21
|
-
const {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
});
|
|
25
|
-
const inputRef = useRef(null);
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
if (fieldValue.isEditing && inputRef.current) {
|
|
28
|
-
inputRef.current.nativeElement.click(); // To automatically open the date picker
|
|
29
|
-
}
|
|
30
|
-
}, [fieldValue.isEditing]);
|
|
31
|
-
const _resetToInheritedOrCalculatedValue = () => {
|
|
22
|
+
const { t } = useSharedTranslation();
|
|
23
|
+
const isErrors = errors.length > 0;
|
|
24
|
+
const _resetToInheritedOrCalculatedValue = async () => {
|
|
32
25
|
if (state.isInheritedValue) {
|
|
33
26
|
onChange(dayjs.unix(Number(state.inheritedValue.raw_value)), state.inheritedValue.raw_value);
|
|
34
27
|
}
|
|
35
28
|
else if (state.isCalculatedValue) {
|
|
36
29
|
onChange(dayjs.unix(Number(state.calculatedValue.raw_value)), state.calculatedValue.raw_value);
|
|
37
30
|
}
|
|
38
|
-
handleSubmit(
|
|
31
|
+
await handleSubmit(null, state.attribute.id);
|
|
39
32
|
};
|
|
40
|
-
const
|
|
33
|
+
const _handleFocus = () => setIsFocused(true);
|
|
34
|
+
const _handleBlur = () => setIsFocused(false);
|
|
35
|
+
const _handleDateChange = async (datePickerDate, ...antOnChangeParams) => {
|
|
41
36
|
if ((state.isInheritedValue || state.isCalculatedValue) && datePickerDate === null) {
|
|
42
37
|
_resetToInheritedOrCalculatedValue();
|
|
43
38
|
return;
|
|
44
39
|
}
|
|
40
|
+
if (!!datePickerDate) {
|
|
41
|
+
datePickerDate = setDateToUTCNoon(datePickerDate);
|
|
42
|
+
}
|
|
45
43
|
onChange(datePickerDate, ...antOnChangeParams);
|
|
46
44
|
// TODO : validate form with await form.validateFields(state.attribute.id)
|
|
47
45
|
if (state.formElement.settings.required && datePickerDate === null) {
|
|
48
46
|
return;
|
|
49
47
|
}
|
|
50
|
-
let dateToSave =
|
|
48
|
+
let dateToSave = '';
|
|
51
49
|
if (!!datePickerDate) {
|
|
52
50
|
dateToSave = String(datePickerDate.unix());
|
|
53
51
|
}
|
|
54
|
-
handleSubmit(dateToSave, state.attribute.id);
|
|
55
|
-
};
|
|
56
|
-
const _getHelper = () => {
|
|
57
|
-
if (state.isInheritedOverrideValue) {
|
|
58
|
-
return t('record_edition.inherited_input_helper', {
|
|
59
|
-
inheritedValue: state.inheritedValue.value
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
else if (state.isCalculatedOverrideValue) {
|
|
63
|
-
return t('record_edition.calculated_input_helper', {
|
|
64
|
-
calculatedValue: state.calculatedValue.value
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
return;
|
|
52
|
+
await handleSubmit(dateToSave, state.attribute.id);
|
|
68
53
|
};
|
|
69
|
-
|
|
70
|
-
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') }));
|
|
71
55
|
};
|
|
72
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,EAC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AY,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,91 +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
|
-
|
|
12
|
-
|
|
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;
|
|
5
|
+
export const DSInputEncryptedWrapper = ({ value, onChange, state, attribute, handleSubmit }) => {
|
|
6
|
+
if (!onChange) {
|
|
7
|
+
throw Error('DSInputEncryptedWrapper should be used inside a antd Form.Item');
|
|
20
8
|
}
|
|
21
|
-
`;
|
|
22
|
-
export const DSInputEncryptedWrapper = ({ value, onChange, state, attribute, fieldValue, handleSubmit, handleBlur, shouldShowValueDetailsButton = false }) => {
|
|
23
|
-
const { t } = useSharedTranslation();
|
|
24
9
|
const { errors } = Form.Item.useStatus();
|
|
25
|
-
const {
|
|
26
|
-
|
|
27
|
-
attribute
|
|
28
|
-
});
|
|
29
|
-
const [hasChanged, setHasChanged] = useState(false);
|
|
30
|
-
const { lang: availableLang } = useLang();
|
|
31
|
-
const inputRef = useRef(null);
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
if (fieldValue.isEditing && inputRef.current) {
|
|
34
|
-
inputRef.current.focus();
|
|
35
|
-
}
|
|
36
|
-
}, [fieldValue.isEditing]);
|
|
37
|
-
const _resetToInheritedOrCalculatedValue = () => {
|
|
38
|
-
setHasChanged(false);
|
|
39
|
-
if (state.isInheritedValue) {
|
|
40
|
-
onChange(state.inheritedValue.raw_value);
|
|
41
|
-
}
|
|
42
|
-
else if (state.isCalculatedValue) {
|
|
43
|
-
onChange(state.calculatedValue.raw_value);
|
|
44
|
-
}
|
|
45
|
-
handleSubmit('', state.attribute.id);
|
|
46
|
-
};
|
|
10
|
+
const { t } = useSharedTranslation();
|
|
11
|
+
const isErrors = errors.length > 0;
|
|
47
12
|
const _handleOnBlur = (event) => {
|
|
48
|
-
if (!hasChanged) {
|
|
49
|
-
handleBlur();
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
13
|
const valueToSubmit = event.target.value;
|
|
53
|
-
|
|
54
|
-
_resetToInheritedOrCalculatedValue();
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
if (!state.isInheritedValue && !state.isCalculatedValue) {
|
|
58
|
-
handleSubmit(valueToSubmit, state.attribute.id);
|
|
59
|
-
}
|
|
14
|
+
handleSubmit(valueToSubmit, attribute.id);
|
|
60
15
|
onChange(event);
|
|
61
16
|
};
|
|
62
|
-
const _handleOnChange = (event) => {
|
|
63
|
-
setHasChanged(true);
|
|
17
|
+
const _handleOnChange = async (event) => {
|
|
64
18
|
const inputValue = event.target.value;
|
|
65
|
-
if ((state.isInheritedValue || state.isCalculatedValue) && inputValue === '' && event.type === 'click') {
|
|
66
|
-
_resetToInheritedOrCalculatedValue();
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
19
|
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
|
-
});
|
|
20
|
+
if (inputValue === '' && event.type === 'click') {
|
|
21
|
+
await handleSubmit(null, attribute.id);
|
|
81
22
|
}
|
|
82
|
-
return;
|
|
83
23
|
};
|
|
84
|
-
|
|
85
|
-
return (_jsx(KitInputPasswordStyled
|
|
86
|
-
// @ts-expect-error - ref is not a valid prop for Input.Password but works at runtime
|
|
87
|
-
, {
|
|
88
|
-
// @ts-expect-error - ref is not a valid prop for Input.Password but works at runtime
|
|
89
|
-
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 }));
|
|
90
25
|
};
|
|
91
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,CAA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Aa,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>>;
|