@leav/ui 0.3.6-8883a63 → 0.3.6-8bbbdf7
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 +1 -0
- package/dist/__mocks__/common/form.js +18 -2
- package/dist/__mocks__/common/form.js.map +1 -1
- package/dist/components/Explorer/Explorer.js +5 -1
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +89 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.d.ts +10 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +33 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js +100 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.d.ts +1 -1
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +4 -3
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +5 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +35 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +49 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
- package/dist/components/ExportModal/ExportModal.js +2 -2
- package/dist/components/ExportModal/ExportModal.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 +3 -16
- package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.d.ts +2 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +11 -7
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +86 -269
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +8 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +22 -19
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +11 -16
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +10 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +16 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +19 -20
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +13 -12
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +11 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +21 -400
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js +8 -8
- 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 +0 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +8 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.d.ts +42 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js +55 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.d.ts +12 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +31 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -0
- package/dist/locales/en/shared.json +12 -2
- package/dist/locales/fr/shared.json +12 -2
- package/package.json +2 -2
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js +0 -6
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +0 -138
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +0 -361
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.d.ts +0 -7
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js +0 -9
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js +0 -7
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js +0 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js +0 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js +0 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js +0 -19
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js +0 -32
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js +0 -51
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js +0 -26
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js.map +0 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export const computeInheritedFlags = (fieldValues) => {
|
|
2
|
+
const inheritedValue = fieldValues.find(fieldValue => fieldValue.isInherited);
|
|
3
|
+
const overrideValue = fieldValues.find(fieldValue => !fieldValue.isInherited && !fieldValue.isCalculated);
|
|
4
|
+
if (inheritedValue === undefined) {
|
|
5
|
+
return {
|
|
6
|
+
inheritedValue: null,
|
|
7
|
+
isInheritedValue: false,
|
|
8
|
+
isInheritedOverrideValue: false,
|
|
9
|
+
isInheritedNotOverrideValue: false
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
const isInheritedValue = true;
|
|
13
|
+
if (!overrideValue || overrideValue.payload === null) {
|
|
14
|
+
return {
|
|
15
|
+
inheritedValue,
|
|
16
|
+
isInheritedValue,
|
|
17
|
+
isInheritedNotOverrideValue: true,
|
|
18
|
+
isInheritedOverrideValue: false
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
inheritedValue,
|
|
23
|
+
isInheritedValue,
|
|
24
|
+
isInheritedNotOverrideValue: false,
|
|
25
|
+
isInheritedOverrideValue: true
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export const computeCalculatedFlags = (fieldValues) => {
|
|
29
|
+
const calculatedValue = fieldValues.find(fieldValue => fieldValue.isCalculated);
|
|
30
|
+
const overrideValue = fieldValues.find(fieldValue => !fieldValue.isCalculated && !fieldValue.isInherited);
|
|
31
|
+
if (calculatedValue === undefined) {
|
|
32
|
+
return {
|
|
33
|
+
calculatedValue: null,
|
|
34
|
+
isCalculatedValue: false,
|
|
35
|
+
isCalculatedOverrideValue: false,
|
|
36
|
+
isCalculatedNotOverrideValue: false
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
const isCalculatedValue = true;
|
|
40
|
+
if (!overrideValue || overrideValue.payload === null) {
|
|
41
|
+
return {
|
|
42
|
+
calculatedValue,
|
|
43
|
+
isCalculatedValue,
|
|
44
|
+
isCalculatedNotOverrideValue: true,
|
|
45
|
+
isCalculatedOverrideValue: false
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
calculatedValue,
|
|
50
|
+
isCalculatedValue,
|
|
51
|
+
isCalculatedNotOverrideValue: false,
|
|
52
|
+
isCalculatedOverrideValue: true
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=calculatedInheritedFlags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculatedInheritedFlags.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.ts"],"names":[],"mappings":"AA4BA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,WAAmD,EAAkB,EAAE;IACzG,MAAM,cAAc,GAAG,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAC9E,MAAM,aAAa,GAAG,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,WAAW,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAE1G,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO;YACH,cAAc,EAAE,IAAI;YACpB,gBAAgB,EAAE,KAAK;YACvB,wBAAwB,EAAE,KAAK;YAC/B,2BAA2B,EAAE,KAAK;SACrC,CAAC;IACN,CAAC;IAED,MAAM,gBAAgB,GAAG,IAAI,CAAC;IAE9B,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;QACnD,OAAO;YACH,cAAc;YACd,gBAAgB;YAChB,2BAA2B,EAAE,IAAI;YACjC,wBAAwB,EAAE,KAAK;SAClC,CAAC;IACN,CAAC;IAED,OAAO;QACH,cAAc;QACd,gBAAgB;QAChB,2BAA2B,EAAE,KAAK;QAClC,wBAAwB,EAAE,IAAI;KACjC,CAAC;AACN,CAAC,CAAC;AAyBF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,WAAmD,EAAmB,EAAE;IAC3G,MAAM,eAAe,GAAG,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAChF,MAAM,aAAa,GAAG,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,YAAY,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAE1G,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO;YACH,eAAe,EAAE,IAAI;YACrB,iBAAiB,EAAE,KAAK;YACxB,yBAAyB,EAAE,KAAK;YAChC,4BAA4B,EAAE,KAAK;SACtC,CAAC;IACN,CAAC;IAED,MAAM,iBAAiB,GAAG,IAAI,CAAC;IAE/B,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;QACnD,OAAO;YACH,eAAe;YACf,iBAAiB;YACjB,4BAA4B,EAAE,IAAI;YAClC,yBAAyB,EAAE,KAAK;SACnC,CAAC;IACN,CAAC;IAED,OAAO;QACH,eAAe;QACf,iBAAiB;QACjB,4BAA4B,EAAE,KAAK;QACnC,yBAAyB,EAAE,IAAI;KAClC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AttributeFormat, ValueDetailsValueFragment } from '../../../../../_gqlTypes';
|
|
2
|
+
import { RecordFormElementsValueStandardValue } from '../../../../../hooks/useGetRecordForm';
|
|
3
|
+
interface IUseGetPresentationValues {
|
|
4
|
+
presentationValues: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare const useGetPresentationValues: ({ values, format, calculatedValue, inheritedValue }: {
|
|
7
|
+
values: ValueDetailsValueFragment[];
|
|
8
|
+
format: AttributeFormat;
|
|
9
|
+
calculatedValue: RecordFormElementsValueStandardValue;
|
|
10
|
+
inheritedValue: RecordFormElementsValueStandardValue;
|
|
11
|
+
}) => IUseGetPresentationValues;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
2
|
+
// This file is released under LGPL V3
|
|
3
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
|
+
import { AttributeFormat } from '../../../../../_gqlTypes';
|
|
5
|
+
import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
6
|
+
const _isDateRangeValue = (value) => !!value && typeof value === 'object' && 'from' in value && 'to' in value;
|
|
7
|
+
export const useGetPresentationValues = ({ values, format, calculatedValue, inheritedValue }) => {
|
|
8
|
+
const { t } = useSharedTranslation();
|
|
9
|
+
const presentationValues = values.map(value => {
|
|
10
|
+
let presentationValue = value.payload || calculatedValue?.payload || inheritedValue?.payload || '';
|
|
11
|
+
switch (format) {
|
|
12
|
+
case AttributeFormat.date_range:
|
|
13
|
+
if (_isDateRangeValue(presentationValue)) {
|
|
14
|
+
const { from, to } = presentationValue;
|
|
15
|
+
presentationValue = t('record_edition.date_range_value', { from, to });
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
presentationValue = '';
|
|
19
|
+
}
|
|
20
|
+
break;
|
|
21
|
+
case AttributeFormat.color:
|
|
22
|
+
if (presentationValue) {
|
|
23
|
+
presentationValue = '#' + presentationValue;
|
|
24
|
+
}
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
return presentationValue;
|
|
28
|
+
});
|
|
29
|
+
return { presentationValues };
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=useGetPresentationValues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGetPresentationValues.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.tsx"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,eAAe,EAA4B,MAAM,eAAe,CAAC;AAEzE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,MAAM,iBAAiB,GAAG,CAAC,KAAU,EAAuC,EAAE,CAC1E,CAAC,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC;AAM7E,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACrC,MAAM,EACN,MAAM,EACN,eAAe,EACf,cAAc,EAMjB,EAA6B,EAAE;IAC5B,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QAC1C,IAAI,iBAAiB,GAAG,KAAK,CAAC,OAAO,IAAI,eAAe,EAAE,OAAO,IAAI,cAAc,EAAE,OAAO,IAAI,EAAE,CAAC;QAEnG,QAAQ,MAAM,EAAE,CAAC;YACb,KAAK,eAAe,CAAC,UAAU;gBAC3B,IAAI,iBAAiB,CAAC,iBAAiB,CAAC,EAAE,CAAC;oBACvC,MAAM,EAAC,IAAI,EAAE,EAAE,EAAC,GAAG,iBAAiB,CAAC;oBACrC,iBAAiB,GAAG,CAAC,CAAC,iCAAiC,EAAE,EAAC,IAAI,EAAE,EAAE,EAAC,CAAC,CAAC;gBACzE,CAAC;qBAAM,CAAC;oBACJ,iBAAiB,GAAG,EAAE,CAAC;gBAC3B,CAAC;gBACD,MAAM;YACV,KAAK,eAAe,CAAC,KAAK;gBACtB,IAAI,iBAAiB,EAAE,CAAC;oBACpB,iBAAiB,GAAG,GAAG,GAAG,iBAAiB,CAAC;gBAChD,CAAC;gBACD,MAAM;QACd,CAAC;QAED,OAAO,iBAAiB,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,OAAO,EAAC,kBAAkB,EAAC,CAAC;AAChC,CAAC,CAAC"}
|
|
@@ -402,6 +402,7 @@
|
|
|
402
402
|
"link_created_at": "Linked at",
|
|
403
403
|
"add_value": "Add value",
|
|
404
404
|
"add_value_link": "Add link",
|
|
405
|
+
"delete_value": "Delete value",
|
|
405
406
|
"delete_value_confirm": "Do you really want to delete this value?",
|
|
406
407
|
"whoAmI": "Information",
|
|
407
408
|
"no_value": "No value",
|
|
@@ -464,6 +465,7 @@
|
|
|
464
465
|
"select_this_value": "Select this value",
|
|
465
466
|
"select_option": "Select option ",
|
|
466
467
|
"create_and_select_option": "Create and select option ",
|
|
468
|
+
"please_select_value_before_adding": "Please select a value before adding a new one",
|
|
467
469
|
"placeholder": {
|
|
468
470
|
"record_select": "Select a record",
|
|
469
471
|
"enter_a_text": "Enter a text",
|
|
@@ -472,7 +474,8 @@
|
|
|
472
474
|
"enter_a_number": "Enter a number",
|
|
473
475
|
"enter_a_password": "Enter a password",
|
|
474
476
|
"start_date": "Start date",
|
|
475
|
-
"end_date": "End date"
|
|
477
|
+
"end_date": "End date",
|
|
478
|
+
"select_an_option": "Select an option"
|
|
476
479
|
}
|
|
477
480
|
},
|
|
478
481
|
"record_summary": {
|
|
@@ -624,16 +627,23 @@
|
|
|
624
627
|
"view-type-planning": "Planning",
|
|
625
628
|
"filters": "Filters",
|
|
626
629
|
"sort-items": "Sort",
|
|
630
|
+
"filter-items": "Filter",
|
|
627
631
|
"sort-ascending": "Ascending",
|
|
628
632
|
"sort-descending": "Descending",
|
|
629
633
|
"sort-list": {
|
|
630
634
|
"active": "Active sorts",
|
|
631
635
|
"inactive": "Inactive sorts"
|
|
632
636
|
},
|
|
637
|
+
"filter-list": {
|
|
638
|
+
"active": "Active filters",
|
|
639
|
+
"inactive": "Inactive filters"
|
|
640
|
+
},
|
|
633
641
|
"available-attributes": "Other available attributes",
|
|
634
642
|
"coming-soon": "Coming soon",
|
|
635
643
|
"show": "Show",
|
|
636
644
|
"hide": "Hide",
|
|
637
|
-
"pagination-total-number": "{{from, number}} - {{to, number}} of {{total, number}} items"
|
|
645
|
+
"pagination-total-number": "{{from, number}} - {{to, number}} of {{total, number}} items",
|
|
646
|
+
"active-items-number": "{{count, number}} active",
|
|
647
|
+
"active-items-number_zero": "None"
|
|
638
648
|
}
|
|
639
649
|
}
|
|
@@ -402,6 +402,7 @@
|
|
|
402
402
|
"link_created_at": "Lié le",
|
|
403
403
|
"add_value": "Ajouter une valeur",
|
|
404
404
|
"add_value_link": "Ajouter une liaison",
|
|
405
|
+
"delete_value": "Supprimer cette valeur",
|
|
405
406
|
"delete_value_confirm": "Êtes-vous sûr de vouloir supprimer cette valeur?",
|
|
406
407
|
"whoAmI": "Informations",
|
|
407
408
|
"no_value": "Pas de valeur",
|
|
@@ -464,6 +465,7 @@
|
|
|
464
465
|
"select_this_value": "Sélectionner cette valeur",
|
|
465
466
|
"select_option": "Sélectionner l’option ",
|
|
466
467
|
"create_and_select_option": "Créer et sélectionner l’option ",
|
|
468
|
+
"please_select_value_before_adding": "Veuillez sélectionner une valeur avant d'en ajouter une nouvelle",
|
|
467
469
|
"placeholder": {
|
|
468
470
|
"record_select": "Sélectionnez un élément",
|
|
469
471
|
"enter_a_text": "Saisir un texte",
|
|
@@ -472,7 +474,8 @@
|
|
|
472
474
|
"enter_a_number": "Saisir un nombre",
|
|
473
475
|
"enter_a_password": "Saisir un mot de passe",
|
|
474
476
|
"start_date": "Date de début",
|
|
475
|
-
"end_date": "Date de fin"
|
|
477
|
+
"end_date": "Date de fin",
|
|
478
|
+
"select_an_option": "Sélectionner une option"
|
|
476
479
|
}
|
|
477
480
|
},
|
|
478
481
|
"record_summary": {
|
|
@@ -624,16 +627,23 @@
|
|
|
624
627
|
"view-type-planning": "Planning",
|
|
625
628
|
"filters": "Filtrer",
|
|
626
629
|
"sort-items": "Trier",
|
|
630
|
+
"filter-items": "Filtrer",
|
|
627
631
|
"sort-list": {
|
|
628
632
|
"active": "Tris actifs",
|
|
629
633
|
"inactive": "Tris inactifs"
|
|
630
634
|
},
|
|
635
|
+
"filter-list": {
|
|
636
|
+
"active": "Filtres actifs",
|
|
637
|
+
"inactive": "Filtres inactifs"
|
|
638
|
+
},
|
|
631
639
|
"sort-ascending": "Ascendant",
|
|
632
640
|
"sort-descending": "Descendant",
|
|
633
641
|
"available-attributes": "Autres propriétés disponibles",
|
|
634
642
|
"coming-soon": "À venir",
|
|
635
643
|
"show": "Afficher",
|
|
636
644
|
"hide": "Masquer",
|
|
637
|
-
"pagination-total-number": "{{from, number}} - {{to, number}} de {{total, number}} éléments"
|
|
645
|
+
"pagination-total-number": "{{from, number}} - {{to, number}} de {{total, number}} éléments",
|
|
646
|
+
"active-items-number": "{{count, number}} actifs",
|
|
647
|
+
"active-items-number_zero": "Aucun"
|
|
638
648
|
}
|
|
639
649
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leav/ui",
|
|
3
|
-
"version": "0.3.6-
|
|
3
|
+
"version": "0.3.6-8bbbdf7",
|
|
4
4
|
"description": "Shared React components and hooks",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepublishOnly": "yarn build",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@ant-design/icons": ">=5.2",
|
|
52
52
|
"@apollo/client": ">=3.8.1",
|
|
53
53
|
"antd": "5.15.3",
|
|
54
|
-
"aristid-ds": "11.0.0-
|
|
54
|
+
"aristid-ds": "11.0.0-54bd35b",
|
|
55
55
|
"dayjs": "^1.11.10",
|
|
56
56
|
"i18next": "22.5",
|
|
57
57
|
"react": "18.2.0",
|
package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
2
|
-
// This file is released under LGPL V3
|
|
3
|
-
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
|
-
import standardFieldReducer from './standardFieldReducer';
|
|
5
|
-
export default standardFieldReducer;
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { AnyPrimitive, IDateRangeValue, IKeyValue } from '@leav/utils';
|
|
2
|
-
import { VersionFieldScope, FormElement, ICommonFieldsReducerState, StandardValueTypes } from '../../../../../components/RecordEdition/EditRecordContent/_types';
|
|
3
|
-
import { RecordFormElementsValueStandardValue } from '../../../../../hooks/useGetRecordForm/useGetRecordForm';
|
|
4
|
-
import { IRecordIdentityWhoAmI } from '../../../../../types/records';
|
|
5
|
-
import { IValueVersion } from '../../../../../types/values';
|
|
6
|
-
import { RecordFormAttributeStandardAttributeFragment, ValueDetailsValueFragment } from '../../../../../_gqlTypes';
|
|
7
|
-
import { IRecordPropertyStandard } from '../../../../../_queries/records/getRecordPropertiesQuery';
|
|
8
|
-
export type IdValue = string | null;
|
|
9
|
-
export declare const newValueId = "__new__";
|
|
10
|
-
export declare enum StandardFieldValueState {
|
|
11
|
-
PRISTINE = "PRISTINE",
|
|
12
|
-
DIRTY = "DIRTY"
|
|
13
|
-
}
|
|
14
|
-
export type StandardFieldReducerValues = IKeyValue<IStandardFieldValue>;
|
|
15
|
-
export interface IStandardFieldValue {
|
|
16
|
-
idValue: IdValue;
|
|
17
|
-
index: number;
|
|
18
|
-
value: IRecordPropertyStandard | null;
|
|
19
|
-
displayValue: StandardValueTypes;
|
|
20
|
-
editingValue: StandardValueTypes;
|
|
21
|
-
originRawValue: StandardValueTypes;
|
|
22
|
-
isEditing: boolean;
|
|
23
|
-
error?: string;
|
|
24
|
-
isErrorDisplayed: boolean;
|
|
25
|
-
state: StandardFieldValueState;
|
|
26
|
-
}
|
|
27
|
-
interface IInheritedNotOverride {
|
|
28
|
-
isInheritedValue: true;
|
|
29
|
-
isInheritedOverrideValue: false;
|
|
30
|
-
isInheritedNotOverrideValue: true;
|
|
31
|
-
inheritedValue: RecordFormElementsValueStandardValue;
|
|
32
|
-
}
|
|
33
|
-
interface IInheritedOverride {
|
|
34
|
-
isInheritedValue: true;
|
|
35
|
-
isInheritedOverrideValue: true;
|
|
36
|
-
isInheritedNotOverrideValue: false;
|
|
37
|
-
inheritedValue: RecordFormElementsValueStandardValue;
|
|
38
|
-
}
|
|
39
|
-
interface INotInherited {
|
|
40
|
-
isInheritedValue: false;
|
|
41
|
-
isInheritedOverrideValue: false;
|
|
42
|
-
isInheritedNotOverrideValue: false;
|
|
43
|
-
inheritedValue: null;
|
|
44
|
-
}
|
|
45
|
-
export type InheritedFlags = INotInherited | IInheritedOverride | IInheritedNotOverride;
|
|
46
|
-
interface ICalculatedNotOverride {
|
|
47
|
-
isCalculatedValue: true;
|
|
48
|
-
isCalculatedOverrideValue: false;
|
|
49
|
-
isCalculatedNotOverrideValue: true;
|
|
50
|
-
calculatedValue: RecordFormElementsValueStandardValue;
|
|
51
|
-
}
|
|
52
|
-
interface ICalculatedOverride {
|
|
53
|
-
isCalculatedValue: true;
|
|
54
|
-
isCalculatedOverrideValue: true;
|
|
55
|
-
isCalculatedNotOverrideValue: false;
|
|
56
|
-
calculatedValue: RecordFormElementsValueStandardValue;
|
|
57
|
-
}
|
|
58
|
-
interface INotCalculated {
|
|
59
|
-
isCalculatedValue: false;
|
|
60
|
-
isCalculatedOverrideValue: false;
|
|
61
|
-
isCalculatedNotOverrideValue: false;
|
|
62
|
-
calculatedValue: null;
|
|
63
|
-
}
|
|
64
|
-
export type CalculatedFlags = INotCalculated | ICalculatedOverride | ICalculatedNotOverride;
|
|
65
|
-
export type IStandardFieldReducerState = ICommonFieldsReducerState<StandardFieldReducerValues, RecordFormAttributeStandardAttributeFragment> & {
|
|
66
|
-
metadataEdit: boolean;
|
|
67
|
-
} & InheritedFlags & CalculatedFlags;
|
|
68
|
-
export declare enum StandardFieldReducerActionsTypes {
|
|
69
|
-
ADD_VALUE = "ADD_VALUE",
|
|
70
|
-
CHANGE_VALUE = "CHANGE_VALUE",
|
|
71
|
-
FOCUS_FIELD = "FOCUS_FIELD",
|
|
72
|
-
SET_ERROR = "SET_ERROR",
|
|
73
|
-
SET_ERROR_DISPLAY = "SET_ERROR_DISPLAY",
|
|
74
|
-
UNEDIT_FIELD = "UNEDIT_FIELD",
|
|
75
|
-
CLOSE_ERROR = "CLOSE_ERROR",
|
|
76
|
-
CLEAR_ERROR = "CLEAR_ERROR",
|
|
77
|
-
UPDATE_AFTER_SUBMIT = "UPDATE_AFTER_SUBMIT",
|
|
78
|
-
UPDATE_AFTER_DELETE = "UPDATE_AFTER_DELETE",
|
|
79
|
-
CANCEL_EDITING = "CANCEL_EDITING",
|
|
80
|
-
CHANGE_VERSION_SCOPE = "CHANGE_VERSION_SCOPE",
|
|
81
|
-
REFRESH_VALUES = "REFRESH_VALUES"
|
|
82
|
-
}
|
|
83
|
-
export declare const virginValue: IStandardFieldValue;
|
|
84
|
-
export type StandardFieldReducerValueActions = {
|
|
85
|
-
type: StandardFieldReducerActionsTypes.ADD_VALUE;
|
|
86
|
-
idValue?: IdValue;
|
|
87
|
-
} | {
|
|
88
|
-
type: StandardFieldReducerActionsTypes.CHANGE_VALUE;
|
|
89
|
-
idValue: IdValue;
|
|
90
|
-
value: AnyPrimitive | IDateRangeValue;
|
|
91
|
-
} | {
|
|
92
|
-
type: StandardFieldReducerActionsTypes.FOCUS_FIELD;
|
|
93
|
-
idValue: IdValue;
|
|
94
|
-
} | {
|
|
95
|
-
type: StandardFieldReducerActionsTypes.SET_ERROR;
|
|
96
|
-
idValue: IdValue;
|
|
97
|
-
error: string;
|
|
98
|
-
} | {
|
|
99
|
-
type: StandardFieldReducerActionsTypes.UNEDIT_FIELD;
|
|
100
|
-
idValue: IdValue;
|
|
101
|
-
} | {
|
|
102
|
-
type: StandardFieldReducerActionsTypes.SET_ERROR_DISPLAY;
|
|
103
|
-
idValue: IdValue;
|
|
104
|
-
displayError: boolean;
|
|
105
|
-
} | {
|
|
106
|
-
type: StandardFieldReducerActionsTypes.CLEAR_ERROR;
|
|
107
|
-
idValue: IdValue;
|
|
108
|
-
} | {
|
|
109
|
-
type: StandardFieldReducerActionsTypes.UPDATE_AFTER_SUBMIT;
|
|
110
|
-
idValue: IdValue;
|
|
111
|
-
newValue: ValueDetailsValueFragment;
|
|
112
|
-
} | {
|
|
113
|
-
type: StandardFieldReducerActionsTypes.UPDATE_AFTER_DELETE;
|
|
114
|
-
idValue?: IdValue;
|
|
115
|
-
allDeleted?: boolean;
|
|
116
|
-
} | {
|
|
117
|
-
type: StandardFieldReducerActionsTypes.CANCEL_EDITING;
|
|
118
|
-
idValue: IdValue;
|
|
119
|
-
};
|
|
120
|
-
export type StandardFieldReducerFieldActions = {
|
|
121
|
-
type: StandardFieldReducerActionsTypes.CHANGE_VERSION_SCOPE;
|
|
122
|
-
scope: VersionFieldScope;
|
|
123
|
-
} | {
|
|
124
|
-
type: StandardFieldReducerActionsTypes.REFRESH_VALUES;
|
|
125
|
-
values: RecordFormElementsValueStandardValue[];
|
|
126
|
-
formVersion: IValueVersion;
|
|
127
|
-
};
|
|
128
|
-
export type StandardFieldReducerAction = StandardFieldReducerValueActions | StandardFieldReducerFieldActions;
|
|
129
|
-
export type StandardFieldDispatchFunc = (action: StandardFieldReducerAction) => void;
|
|
130
|
-
export declare const computeInitialState: (params: {
|
|
131
|
-
element: FormElement<unknown>;
|
|
132
|
-
record: IRecordIdentityWhoAmI;
|
|
133
|
-
isRecordReadOnly: boolean;
|
|
134
|
-
metadataEdit: boolean;
|
|
135
|
-
formVersion: IValueVersion;
|
|
136
|
-
}) => IStandardFieldReducerState;
|
|
137
|
-
declare const standardFieldReducer: (state: IStandardFieldReducerState, action: StandardFieldReducerAction) => IStandardFieldReducerState;
|
|
138
|
-
export default standardFieldReducer;
|