@leav/ui 0.3.6-89067e7 → 0.3.6-8cec779
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 +16 -18
- package/dist/_gqlTypes/index.js +13 -3
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/components/Explorer/DataView.d.ts +2 -1
- package/dist/components/Explorer/DataView.js +8 -33
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +2 -0
- package/dist/components/Explorer/Explorer.js +17 -8
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerTitle.js +3 -1
- package/dist/components/Explorer/ExplorerTitle.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 +8 -0
- package/dist/components/Explorer/TableCell.js +86 -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 +2 -2
- package/dist/components/Explorer/_queries/useExplorerData.js +35 -14
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +11 -3
- 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.d.ts +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.js +17 -1
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/useGetLibraryColumns.d.ts +1 -1
- package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/useGetLibraryColumns.js +6 -6
- package/dist/components/Explorer/manage-view-settings/_shared/useGetLibraryColumns.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 +89 -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/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.d.ts +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.js +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.d.ts +7 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.js +2 -1
- 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 +1 -1
- 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/{edit-settings → manage-view-settings/open-view-settings}/useOpenSettings.js +2 -2
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenSettings.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 +7 -7
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.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 +2 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +5 -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 +43 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +57 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -0
- package/dist/components/Explorer/usePrimaryActions.d.ts +1 -0
- package/dist/components/Explorer/usePrimaryActions.js +1 -0
- package/dist/components/Explorer/usePrimaryActions.js.map +1 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +2 -2
- 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 +5 -24
- 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/useGetRecordForm/useGetRecordForm.d.ts +1 -0
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
- package/dist/locales/en/shared.json +21 -9
- package/dist/locales/fr/shared.json +21 -9
- package/package.json +4 -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 -28
- 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 +0 -77
- 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.d.ts +0 -2
- 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/useEditSettings.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useOpenSettings.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 +0 -5
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js.map +0 -1
- /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/open-view-settings}/useOpenSettings.d.ts +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
|
@@ -0,0 +1,86 @@
|
|
|
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 { AttributeFormat, AttributeType } from '../../_gqlTypes';
|
|
6
|
+
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
7
|
+
import { KitAvatar, KitTag, KitTypography } from 'aristid-ds';
|
|
8
|
+
import styled from 'styled-components';
|
|
9
|
+
import { IdCard } from './IdCard';
|
|
10
|
+
import { TableTagGroup } from './TableTagGroup';
|
|
11
|
+
const isStandardValue = (v, attribute) => [AttributeType.simple, AttributeType.advanced].includes(attribute.type);
|
|
12
|
+
const isStandardValues = (values, attribute) => values.every(value => isStandardValue(value, attribute));
|
|
13
|
+
const isLinkValue = (v, attribute) => [AttributeType.simple_link, AttributeType.advanced_link].includes(attribute.type);
|
|
14
|
+
const isLinkValues = (values, attribute) => values.every(value => isLinkValue(value, attribute));
|
|
15
|
+
const isTreeValue = (v, attribute) => [AttributeType.tree].includes(attribute.type);
|
|
16
|
+
const StyledCenteringWrapper = styled.div `
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: calc(var(--general-spacing-xs) * 1px);
|
|
20
|
+
`;
|
|
21
|
+
export const TableCell = ({ values, attributeProperties }) => {
|
|
22
|
+
const { t } = useSharedTranslation();
|
|
23
|
+
if (attributeProperties.multiple_values) {
|
|
24
|
+
if (isStandardValues(values, attributeProperties)) {
|
|
25
|
+
const tags = values.map(value => {
|
|
26
|
+
switch (attributeProperties.format) {
|
|
27
|
+
case AttributeFormat.boolean:
|
|
28
|
+
return {
|
|
29
|
+
idCardProps: {
|
|
30
|
+
description: value.valuePayload ? String(t('global.yes')) : String(t('global.no'))
|
|
31
|
+
},
|
|
32
|
+
type: value.valuePayload ? 'primary' : 'neutral'
|
|
33
|
+
};
|
|
34
|
+
default:
|
|
35
|
+
const valueContent = attributeProperties.format === AttributeFormat.encrypted
|
|
36
|
+
? '●●●●●●●●●●●●'
|
|
37
|
+
: value.valuePayload;
|
|
38
|
+
return {
|
|
39
|
+
idCardProps: { description: valueContent },
|
|
40
|
+
type: 'primary'
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
return _jsx(TableTagGroup, { tags: tags });
|
|
45
|
+
}
|
|
46
|
+
else if (isLinkValues(values, attributeProperties)) {
|
|
47
|
+
return (_jsx(KitAvatar.Group, { maxCount: 5, children: values.map((value, index) => {
|
|
48
|
+
if (!isLinkValue(value, attributeProperties)) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
return (_jsx(KitAvatar, { label: String(value?.linkPayload?.whoAmI.label), src: value?.linkPayload?.whoAmI.preview?.small, color: "primary", secondaryColorInvert: true }, index));
|
|
52
|
+
}) }));
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
//TODO: handle multiple tree values
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
const value = values[0]; // Not multiple_values attribute should not have more than one value
|
|
61
|
+
if (!value) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
let content = null;
|
|
65
|
+
if (isStandardValue(value, attributeProperties)) {
|
|
66
|
+
switch (attributeProperties.format) {
|
|
67
|
+
case AttributeFormat.boolean:
|
|
68
|
+
const valueToDisplay = value.valuePayload ? t('global.yes') : t('global.no');
|
|
69
|
+
content = (_jsx(KitTag, { type: !!value.valuePayload ? 'primary' : 'neutral', idCardProps: { description: valueToDisplay } }, attributeProperties.id));
|
|
70
|
+
break;
|
|
71
|
+
default:
|
|
72
|
+
const valueContent = attributeProperties.format === AttributeFormat.encrypted ? '●●●●●●●●●●●●' : value.valuePayload;
|
|
73
|
+
content = (_jsx(KitTypography.Text, { ellipsis: { tooltip: valueContent }, children: valueContent }, attributeProperties.id));
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (isTreeValue(value, attributeProperties)) {
|
|
78
|
+
content = value.treePayload?.record.id ?? '';
|
|
79
|
+
}
|
|
80
|
+
if (isLinkValue(value, attributeProperties)) {
|
|
81
|
+
content = value.linkPayload?.whoAmI ? (_jsx(IdCard, { item: value.linkPayload?.whoAmI }, attributeProperties.id)) : null;
|
|
82
|
+
}
|
|
83
|
+
return _jsx(StyledCenteringWrapper, { children: content });
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=TableCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../src/components/Explorer/TableCell.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EACH,eAAe,EAEf,aAAa,EAKhB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAE5D,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,MAAM,eAAe,GAAG,CACpB,CAAwB,EACxB,SAAsC,EACP,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAC9G,MAAM,gBAAgB,GAAG,CACrB,MAA+B,EAC/B,SAAsC,EACA,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;AAEtG,MAAM,WAAW,GAAG,CAChB,CAAwB,EACxB,SAAsC,EACH,EAAE,CACrC,CAAC,aAAa,CAAC,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACtF,MAAM,YAAY,GAAG,CACjB,MAA+B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
|
+
// 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 { KitTag, KitTooltip } from 'aristid-ds';
|
|
6
|
+
import styled from 'styled-components';
|
|
7
|
+
const StyledTagsGroupDiv = styled.div `
|
|
8
|
+
display: flex;
|
|
9
|
+
column-gap: calc(var(--general-spacing-xxs) * 1px);
|
|
10
|
+
row-gap: calc(var(--general-spacing-xxs) * 0.5px);
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
|
|
13
|
+
& > span {
|
|
14
|
+
margin-right: var(--general-spacing-none);
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
export const TableTagGroup = ({ tags, maxTags = 3 }) => {
|
|
18
|
+
const hiddenTags = tags.slice(maxTags);
|
|
19
|
+
const visibleTags = tags.slice(0, maxTags);
|
|
20
|
+
return (_jsxs(StyledTagsGroupDiv, { children: [visibleTags.map(tag => (_jsx(KitTag, { ...tag }))), hiddenTags.length > 0 && (_jsx(KitTooltip, { overlay: hiddenTags.map((hiddenTag, index) => (_jsx("div", { children: hiddenTag.idCardProps?.description }, index))), children: _jsx(KitTag, { type: "primary", idCardProps: { description: `+${hiddenTags.length}` } }) }))] }));
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=TableTagGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableTagGroup.js","sourceRoot":"","sources":["../../../src/components/Explorer/TableTagGroup.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,YAAY,CAAC;AAG9C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;CASpC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAGrB,CAAC,EAAC,IAAI,EAAE,OAAO,GAAG,CAAC,EAAC,EAAE,EAAE;IACzB,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACvC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAE3C,OAAO,CACH,MAAC,kBAAkB,eACd,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CACpB,KAAC,MAAM,OAAK,GAAG,GAAI,CACtB,CAAC,EACD,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,CACtB,KAAC,UAAU,IACP,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1C,wBAAkB,SAAS,CAAC,WAAW,EAAE,WAAW,IAA1C,KAAK,CAA4C,CAC9D,CAAC,YAEF,KAAC,MAAM,IAAC,IAAI,EAAC,SAAS,EAAC,WAAW,EAAE,EAAC,WAAW,EAAE,IAAI,UAAU,CAAC,MAAM,EAAE,EAAC,GAAI,GACrE,CAChB,IACgB,CACxB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IExplorerData } from '../_types';
|
|
2
2
|
import { ExplorerQuery } from '../../../_gqlTypes';
|
|
3
3
|
export declare const useExplorerData: (libraryId: string, attributeIds: string[]) => {
|
|
4
|
-
data:
|
|
4
|
+
data: IExplorerData;
|
|
5
5
|
loading: boolean;
|
|
6
6
|
refetch: (variables?: Partial<import("../../../_gqlTypes").Exact<{
|
|
7
7
|
libraryId: import("../../../_gqlTypes").Scalars["ID"];
|
|
@@ -1,21 +1,42 @@
|
|
|
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 { localizedTranslation } from '@leav/utils';
|
|
1
5
|
import { useExplorerQuery } from '../../../_gqlTypes';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
import { useLang } from '../../../hooks';
|
|
7
|
+
const _mapping = (data, libraryId, availableLangs) => {
|
|
8
|
+
const attributes = data.records.list.length
|
|
9
|
+
? data.records.list[0].properties.reduce((acc, property) => {
|
|
10
|
+
acc[property.attributeId] = {
|
|
11
|
+
...property.attributeProperties,
|
|
12
|
+
label: localizedTranslation(property.attributeProperties.label, availableLangs)
|
|
13
|
+
};
|
|
14
|
+
return acc;
|
|
15
|
+
}, {})
|
|
16
|
+
: {};
|
|
17
|
+
const records = data.records.list.map(({ whoAmI, properties }) => ({
|
|
18
|
+
libraryId,
|
|
19
|
+
key: whoAmI.id, // For <KitTable /> only
|
|
20
|
+
itemId: whoAmI.id, // For <KitTable /> only
|
|
21
|
+
whoAmI: {
|
|
22
|
+
label: null,
|
|
23
|
+
subLabel: null,
|
|
24
|
+
color: null,
|
|
25
|
+
preview: null,
|
|
26
|
+
...whoAmI
|
|
27
|
+
},
|
|
28
|
+
propertiesById: properties.reduce((acc, { attributeId, values }) => ({ ...acc, [attributeId]: values }), {})
|
|
29
|
+
}));
|
|
30
|
+
return {
|
|
31
|
+
attributes,
|
|
32
|
+
records
|
|
33
|
+
};
|
|
34
|
+
};
|
|
15
35
|
export const useExplorerData = (libraryId, attributeIds) => {
|
|
36
|
+
const { lang: availableLangs } = useLang();
|
|
16
37
|
const { data, loading, refetch } = useExplorerQuery({ variables: { libraryId, attributeIds } });
|
|
17
38
|
return {
|
|
18
|
-
data: data !== undefined ? _mapping(data, libraryId) : null,
|
|
39
|
+
data: data !== undefined ? _mapping(data, libraryId, availableLangs) : null,
|
|
19
40
|
loading,
|
|
20
41
|
refetch
|
|
21
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExplorerData.js","sourceRoot":"","sources":["../../../../src/components/Explorer/_queries/useExplorerData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useExplorerData.js","sourceRoot":"","sources":["../../../../src/components/Explorer/_queries/useExplorerData.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAgB,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC,MAAM,QAAQ,GAAG,CAAC,IAAmB,EAAE,SAAiB,EAAE,cAAwB,EAAiB,EAAE;IACjG,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM;QACvC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE;YACrD,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG;gBACxB,GAAG,QAAQ,CAAC,mBAAmB;gBAC/B,KAAK,EAAE,oBAAoB,CAAC,QAAQ,CAAC,mBAAmB,CAAC,KAAK,EAAE,cAAc,CAAC;aAClF,CAAC;YAEF,OAAO,GAAG,CAAC;QACf,CAAC,EAAE,EAAE,CAAC;QACR,CAAC,CAAC,EAAE,CAAC;IAET,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAC,MAAM,EAAE,UAAU,EAAC,EAAE,EAAE,CAAC,CAAC;QAC7D,SAAS;QACT,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,wBAAwB;QACxC,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,wBAAwB;QAC3C,MAAM,EAAE;YACJ,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,IAAI;YACX,OAAO,EAAE,IAAI;YACb,GAAG,MAAM;SACZ;QACD,cAAc,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAC,WAAW,EAAE,MAAM,EAAC,EAAE,EAAE,CAAC,CAAC,EAAC,GAAG,GAAG,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,EAAC,CAAC,EAAE,EAAE,CAAC;KAC3G,CAAC,CAAC,CAAC;IAEJ,OAAO;QACH,UAAU;QACV,OAAO;KACV,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAiB,EAAE,YAAsB,EAAE,EAAE;IACzE,MAAM,EAAC,IAAI,EAAE,cAAc,EAAC,GAAG,OAAO,EAAE,CAAC;IACzC,MAAM,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAC,GAAG,gBAAgB,CAAC,EAAC,SAAS,EAAE,EAAC,SAAS,EAAE,YAAY,EAAC,EAAC,CAAC,CAAC;IAE1F,OAAO;QACH,IAAI,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI;QAC3E,OAAO;QACP,OAAO;KACV,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Override } from '@leav/utils';
|
|
2
|
+
import { AttributePropertiesFragment, PropertyValueFragment, RecordIdentityFragment } from '../../_gqlTypes';
|
|
2
3
|
import { ReactElement } from 'react';
|
|
3
|
-
export
|
|
4
|
+
export interface IExplorerData {
|
|
5
|
+
attributes: {
|
|
6
|
+
[attributeId: string]: Override<AttributePropertiesFragment, {
|
|
7
|
+
label: string;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
records: IItemData[];
|
|
11
|
+
}
|
|
4
12
|
export interface IItemData {
|
|
5
13
|
libraryId: string;
|
|
6
14
|
key: string;
|
|
7
15
|
itemId: string;
|
|
8
|
-
whoAmI:
|
|
16
|
+
whoAmI: Required<RecordIdentityFragment['whoAmI']>;
|
|
9
17
|
propertiesById: {
|
|
10
18
|
[attributeId: string]: PropertyValueFragment[];
|
|
11
19
|
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Explorer as InternalExplorer } from './Explorer';
|
|
2
|
-
import { useEditSettings } from './
|
|
3
|
-
import { EditSettingsContextProvider } from './edit-settings/EditSettingsContextProvider';
|
|
4
|
-
import { SidePanel } from './edit-settings/SidePanel';
|
|
2
|
+
import { useEditSettings, SidePanel, EditSettingsContextProvider } from './manage-view-settings';
|
|
5
3
|
type CompoundedComponent = typeof InternalExplorer & {
|
|
6
4
|
useEditSettings: typeof useEditSettings;
|
|
7
5
|
EditSettingsContextProvider: typeof EditSettingsContextProvider;
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
// This file is released under LGPL V3
|
|
3
3
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
4
|
import { Explorer as InternalExplorer } from './Explorer';
|
|
5
|
-
import { useEditSettings } from './
|
|
6
|
-
import { EditSettingsContextProvider } from './edit-settings/EditSettingsContextProvider';
|
|
7
|
-
import { SidePanel } from './edit-settings/SidePanel';
|
|
5
|
+
import { useEditSettings, SidePanel, EditSettingsContextProvider } from './manage-view-settings';
|
|
8
6
|
export const Explorer = InternalExplorer;
|
|
9
7
|
Explorer.EditSettingsContextProvider = EditSettingsContextProvider;
|
|
10
8
|
Explorer.useEditSettings = useEditSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Explorer/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,IAAI,gBAAgB,EAAC,MAAM,YAAY,CAAC;AACxD,OAAO,EAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Explorer/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,IAAI,gBAAgB,EAAC,MAAM,YAAY,CAAC;AACxD,OAAO,EAAC,eAAe,EAAE,SAAS,EAAE,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AAQ/F,MAAM,CAAC,MAAM,QAAQ,GAAG,gBAAkD,CAAC;AAC3E,QAAQ,CAAC,2BAA2B,GAAG,2BAA2B,CAAC;AACnE,QAAQ,CAAC,eAAe,GAAG,eAAe,CAAC;AAC3C,QAAQ,CAAC,iBAAiB,GAAG,SAAS,CAAC"}
|
package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.js
RENAMED
|
@@ -5,6 +5,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
import { KitTypography } from 'aristid-ds';
|
|
6
6
|
import { FaEye, FaEyeSlash } from 'react-icons/fa';
|
|
7
7
|
import styled from 'styled-components';
|
|
8
|
+
import { useSortable } from '@dnd-kit/sortable';
|
|
9
|
+
import { CSS } from '@dnd-kit/utilities';
|
|
10
|
+
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
8
11
|
const StyledValue = styled(KitTypography.Text) `
|
|
9
12
|
color: var(--general-utilities-disabled);
|
|
10
13
|
`;
|
|
@@ -55,8 +58,21 @@ const StyledFaEye = styled(FaEye) `
|
|
|
55
58
|
const StyledEyeSlash = styled(FaEyeSlash) `
|
|
56
59
|
color: var(--general-utilities-disabled);
|
|
57
60
|
`;
|
|
61
|
+
const StyledDragHandle = styled.span `
|
|
62
|
+
cursor: ${props => (props.$isDragging ? 'grabbing' : 'grab')};
|
|
63
|
+
`;
|
|
58
64
|
const StyledEmptyIcon = styled.div `
|
|
59
65
|
width: calc(var(--general-spacing-s) * 1px);
|
|
60
66
|
`;
|
|
61
|
-
export const ColumnItem = ({ dragHandler, title, disabled, visible, onVisibilityClick }) =>
|
|
67
|
+
export const ColumnItem = ({ itemId, dragHandler, title, disabled, visible, onVisibilityClick }) => {
|
|
68
|
+
const { t } = useSharedTranslation();
|
|
69
|
+
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: itemId });
|
|
70
|
+
const style = {
|
|
71
|
+
transform: CSS.Transform.toString(transform),
|
|
72
|
+
transition
|
|
73
|
+
};
|
|
74
|
+
const _handleClick = () => onVisibilityClick?.();
|
|
75
|
+
const visibilityButtonLabel = visible ? t('explorer.hide') : t('explorer.show');
|
|
76
|
+
return (_jsxs(StyledConfigurationItem, { className: disabled ? 'disabled' : '', ref: setNodeRef, style: style, children: [dragHandler ? (_jsx(StyledDragHandle, { ...attributes, ...listeners, "$isDragging": isDragging, children: dragHandler })) : (_jsx(StyledEmptyIcon, {})), _jsx(KitTypography.Text, { size: "fontSize5", ellipsis: true, className: "title", children: title }), _jsx("button", { disabled: disabled, onClick: _handleClick, title: visibilityButtonLabel, "aria-label": visibilityButtonLabel, children: visible ? _jsx(StyledFaEye, {}) : _jsx(StyledEyeSlash, {}) })] }));
|
|
77
|
+
};
|
|
62
78
|
//# sourceMappingURL=ColumnItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnItem.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/_shared/ColumnItem.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAC,KAAK,EAAE,UAAU,EAAC,MAAM,gBAAgB,CAAC;AACjD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,E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AAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;IAChF,OAAO,CACH,MAAC,uBAAuB,IAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,aACxF,WAAW,CAAC,CAAC,CAAC,CACX,KAAC,gBAAgB,OAAK,UAAU,KAAM,SAAS,iBAAe,UAAU,YACnE,WAAW,GACG,CACtB,CAAC,CAAC,CAAC,CACA,KAAC,eAAe,KAAG,CACtB,EACD,KAAC,aAAa,CAAC,IAAI,IAAC,IAAI,EAAC,WAAW,EAAC,QAAQ,QAAC,SAAS,EAAC,OAAO,YAC1D,KAAK,GACW,EACrB,iBACI,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,qBAAqB,gBAChB,qBAAqB,YAEhC,OAAO,CAAC,CAAC,CAAC,KAAC,WAAW,KAAG,CAAC,CAAC,CAAC,KAAC,cAAc,KAAG,GAC1C,IACa,CAC7B,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
2
2
|
// This file is released under LGPL V3
|
|
3
3
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
|
-
import { useGetAttributesByLibQuery } from '../../../_gqlTypes';
|
|
5
|
-
import { useLang } from '../../../hooks';
|
|
6
4
|
import { localizedTranslation } from '@leav/utils';
|
|
7
|
-
|
|
5
|
+
import { useGetAttributesByLibQuery } from '../../../../_gqlTypes';
|
|
6
|
+
import { useLang } from '../../../../hooks';
|
|
7
|
+
const _mapping = (data, availableLanguages) => data?.attributes?.list.reduce((acc, attribute) => {
|
|
8
8
|
acc[attribute.id] = {
|
|
9
9
|
...attribute,
|
|
10
|
-
label: localizedTranslation(attribute.label,
|
|
10
|
+
label: localizedTranslation(attribute.label, availableLanguages)
|
|
11
11
|
};
|
|
12
12
|
return acc;
|
|
13
13
|
}, {}) ?? {};
|
|
14
14
|
export const useGetLibraryColumns = (library) => {
|
|
15
|
-
const { lang:
|
|
15
|
+
const { lang: availableLanguages } = useLang();
|
|
16
16
|
const { data, error, loading } = useGetAttributesByLibQuery({
|
|
17
17
|
variables: {
|
|
18
18
|
library
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
|
-
const attributeDetailsById = _mapping(data,
|
|
21
|
+
const attributeDetailsById = _mapping(data, availableLanguages);
|
|
22
22
|
return { attributeDetailsById, error, loading };
|
|
23
23
|
};
|
|
24
24
|
//# sourceMappingURL=useGetLibraryColumns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGetLibraryColumns.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/_shared/useGetLibraryColumns.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAoD,0BAA0B,EAAC,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAMlC,MAAM,QAAQ,GAAG,CAAC,IAAyC,EAAE,kBAA4B,EAAgB,EAAE,CACvG,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,CAAe,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE;IAC3D,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG;QAChB,GAAG,SAAS;QACZ,KAAK,EAAE,oBAAoB,CAAC,SAAS,CAAC,KAAK,EAAE,kBAAkB,CAAC;KACnE,CAAC;IACF,OAAO,GAAG,CAAC;AACf,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;AAEjB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAe,EAAE,EAAE;IACpD,MAAM,EAAC,IAAI,EAAE,kBAAkB,EAAC,GAAG,OAAO,EAAE,CAAC;IAC7C,MAAM,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAC,GAAG,0BAA0B,CAAC;QACtD,SAAS,EAAE;YACP,OAAO;SACV;KACJ,CAAC,CAAC;IAEH,MAAM,oBAAoB,GAAG,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;IAEhE,OAAO,EAAC,oBAAoB,EAAE,KAAK,EAAE,OAAO,EAAC,CAAC;AAClD,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { ViewSettingsActionTypes } from './../store-view-settings/viewSettingsReducer';
|
|
4
|
+
import { useViewSettingsContext } from './../store-view-settings/useViewSettingsContext';
|
|
5
|
+
import { SelectVisibleAttributes } from './attributes/SelectVisibleAttributes';
|
|
6
|
+
import { SelectViewType } from './view-type/SelectViewType';
|
|
7
|
+
const StyledWrapperDiv = styled.div `
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: calc(var(--general-spacing-l) * 1px);
|
|
11
|
+
|
|
12
|
+
.ant-radio-wrapper {
|
|
13
|
+
padding: calc(var(--general-spacing-xs) * 1px);
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
export const ConfigureDisplay = ({ libraryId }) => {
|
|
17
|
+
const { view, dispatch } = useViewSettingsContext();
|
|
18
|
+
const _handleViewTypeChange = event => {
|
|
19
|
+
dispatch({
|
|
20
|
+
type: ViewSettingsActionTypes.CHANGE_VIEW_TYPE,
|
|
21
|
+
payload: {
|
|
22
|
+
viewType: event.target.value
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
return (_jsxs(StyledWrapperDiv, { children: [_jsx(SelectViewType, { value: view.viewType, onChange: _handleViewTypeChange }), view.viewType === 'table' && _jsx(SelectVisibleAttributes, { libraryId: libraryId })] }));
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=ConfigureDisplay.js.map
|
package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigureDisplay.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.tsx"],"names":[],"mappings":";AAIA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAC,uBAAuB,EAAC,MAAM,8CAA8C,CAAC;AACrF,OAAO,EAAC,sBAAsB,EAAC,MAAM,iDAAiD,CAAC;AACvF,OAAO,EAAC,uBAAuB,EAAC,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAC,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAE1D,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;CAQlC,CAAC;AAMF,MAAM,CAAC,MAAM,gBAAgB,GAA8C,CAAC,EAAC,SAAS,EAAC,EAAE,EAAE;IACvF,MAAM,EAAC,IAAI,EAAE,QAAQ,EAAC,GAAG,sBAAsB,EAAE,CAAC;IAElD,MAAM,qBAAqB,GAAgC,KAAK,CAAC,EAAE;QAC/D,QAAQ,CAAC;YACL,IAAI,EAAE,uBAAuB,CAAC,gBAAgB;YAC9C,OAAO,EAAE;gBACL,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK;aAC/B;SACJ,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,OAAO,CACH,MAAC,gBAAgB,eACb,KAAC,cAAc,IAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,qBAAqB,GAAI,EACxE,IAAI,CAAC,QAAQ,KAAK,OAAO,IAAI,KAAC,uBAAuB,IAAC,SAAS,EAAE,SAAS,GAAI,IAChE,CACtB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } 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 { useDebouncedValue } from '../../../../../hooks/useDebouncedValue/useDebouncedValue';
|
|
6
|
+
import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
7
|
+
import { KitInput, KitTypography } from 'aristid-ds';
|
|
8
|
+
import { useMemo, useState } from 'react';
|
|
9
|
+
import styled from 'styled-components';
|
|
10
|
+
import { closestCenter, DndContext, KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';
|
|
11
|
+
import { SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
12
|
+
import { FaGripLines } from 'react-icons/fa';
|
|
13
|
+
import { ColumnItem } from '../../_shared/ColumnItem';
|
|
14
|
+
import { useGetLibraryColumns } from '../../_shared/useGetLibraryColumns';
|
|
15
|
+
import { ViewSettingsActionTypes } from '../../store-view-settings/viewSettingsReducer';
|
|
16
|
+
import { useViewSettingsContext } from '../../store-view-settings/useViewSettingsContext';
|
|
17
|
+
const StyledList = styled.ul `
|
|
18
|
+
padding: 0;
|
|
19
|
+
margin: 0;
|
|
20
|
+
list-style: none;
|
|
21
|
+
color: var(--general-utilities-text-primary);
|
|
22
|
+
`;
|
|
23
|
+
const StyledDivider = styled.hr `
|
|
24
|
+
display: block;
|
|
25
|
+
height: 1px;
|
|
26
|
+
border: 0;
|
|
27
|
+
border-top: 1px solid var(--general-utilities-main-light);
|
|
28
|
+
margin: 0 calc(var(--general-spacing-s) * 1px);
|
|
29
|
+
padding: 0;
|
|
30
|
+
`;
|
|
31
|
+
export const SelectVisibleAttributes = ({ libraryId }) => {
|
|
32
|
+
const { t } = useSharedTranslation();
|
|
33
|
+
const sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
|
|
34
|
+
coordinateGetter: sortableKeyboardCoordinates
|
|
35
|
+
}));
|
|
36
|
+
const { view, dispatch } = useViewSettingsContext();
|
|
37
|
+
const { fields: orderedVisibleColumns } = view;
|
|
38
|
+
const [searchInput, setSearchInput] = useState('');
|
|
39
|
+
const debouncedSearchInput = useDebouncedValue(searchInput, 300);
|
|
40
|
+
const { attributeDetailsById } = useGetLibraryColumns(libraryId);
|
|
41
|
+
const searchFilteredColumns = useMemo(() => {
|
|
42
|
+
const columnIds = Object.keys(attributeDetailsById);
|
|
43
|
+
if (columnIds.length === 0) {
|
|
44
|
+
return {};
|
|
45
|
+
}
|
|
46
|
+
if (searchInput === '') {
|
|
47
|
+
return attributeDetailsById;
|
|
48
|
+
}
|
|
49
|
+
return columnIds.reduce((acc, columnId) => {
|
|
50
|
+
if (attributeDetailsById[columnId].label.includes(searchInput) || columnId.includes(searchInput)) {
|
|
51
|
+
acc[columnId] = attributeDetailsById[columnId];
|
|
52
|
+
}
|
|
53
|
+
return acc;
|
|
54
|
+
}, {});
|
|
55
|
+
}, [debouncedSearchInput, attributeDetailsById]);
|
|
56
|
+
const searchFilteredColumnsIds = Object.keys(searchFilteredColumns);
|
|
57
|
+
const _onSearchChanged = (event) => {
|
|
58
|
+
const shouldIgnoreInputChange = event.target.value.length < 3 && searchInput.length < 3;
|
|
59
|
+
if (shouldIgnoreInputChange) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
setSearchInput(() => {
|
|
63
|
+
if (event.target.value.length > 2) {
|
|
64
|
+
return event.target.value;
|
|
65
|
+
}
|
|
66
|
+
return '';
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
const _toggleColumnVisibility = (columnId) => () => {
|
|
70
|
+
const actionType = orderedVisibleColumns.includes(columnId)
|
|
71
|
+
? ViewSettingsActionTypes.REMOVE_FIELD
|
|
72
|
+
: ViewSettingsActionTypes.ADD_FIELD;
|
|
73
|
+
dispatch({ type: actionType, payload: { field: columnId } });
|
|
74
|
+
};
|
|
75
|
+
const _handleDragEnd = ({ active: draggedElement, over: dropTarget }) => {
|
|
76
|
+
const indexFrom = orderedVisibleColumns.indexOf(String(draggedElement.id));
|
|
77
|
+
const indexTo = orderedVisibleColumns.indexOf(String(dropTarget?.id));
|
|
78
|
+
if (!dropTarget || indexFrom === indexTo || indexTo === -1) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
dispatch({ type: ViewSettingsActionTypes.MOVE_FIELD, payload: { indexFrom, indexTo } });
|
|
82
|
+
};
|
|
83
|
+
return (_jsxs("div", { children: [_jsx(KitTypography.Title, { level: "h4", children: t('items_list.columns') }), _jsx(KitInput, { placeholder: String(t('global.search')), onChange: _onSearchChanged, allowClear: true }), _jsxs("div", { children: [_jsx(StyledList, { children: _jsx(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragEnd: _handleDragEnd, children: _jsxs(SortableContext, { items: orderedVisibleColumns, strategy: verticalListSortingStrategy, children: [_jsx(ColumnItem, { itemId: "", title: t('record_edition.whoAmI'), visible: false, disabled: true }), orderedVisibleColumns
|
|
84
|
+
.filter(columnId => searchFilteredColumnsIds.includes(columnId))
|
|
85
|
+
.map(columnId => (_jsx(ColumnItem, { itemId: attributeDetailsById[columnId].id, title: attributeDetailsById[columnId].label, visible: true, onVisibilityClick: _toggleColumnVisibility(columnId), dragHandler: _jsx(FaGripLines, {}) }, columnId)))] }) }) }), _jsx(StyledDivider, {}), _jsx(StyledList, { children: searchFilteredColumnsIds
|
|
86
|
+
.filter(columnId => !orderedVisibleColumns.includes(columnId))
|
|
87
|
+
.map(columnId => (_jsx(ColumnItem, { itemId: attributeDetailsById[columnId].id, visible: false, title: attributeDetailsById[columnId].label, onVisibilityClick: _toggleColumnVisibility(columnId) }, attributeDetailsById[columnId].id))) })] })] }));
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=SelectVisibleAttributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectVisibleAttributes.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,iBAAiB,EAAC,MAAM,+CAA+C,CAAC;AAChF,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAiC,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACxE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EACH,aAAa,EACb,UAAU,EAEV,cAAc,EACd,aAAa,EACb,SAAS,EACT,UAAU,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,eAAe,EAAE,2BAA2B,EAAE,2BAA2B,EAAC,MAAM,mBAAmB,CAAC;AAC5G,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAC,oBAAoB,EAAC,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAC,uBAAuB,EAAC,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAC,sBAAsB,EAAC,MAAM,kDAAkD,CAAC;AAExF,MAAM,UAAU,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;CAK3B,CAAC;AAEF,MAAM,aAAa,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;CAO9B,CAAC;AAMF,MAAM,CAAC,MAAM,uBAAuB,GAAqD,CAAC,EAAC,SAAS,EAAC,EAAE,EAAE;IACrG,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,OAAO,GAAG,UAAU,CACtB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qB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;6BAC7D,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CACb,KAAC,UAAU,IAEP,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC,EAAE,EACzC,OAAO,EAAE,KAAK,EACd,KAAK,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC,KAAK,EAC3C,iBAAiB,EAAE,uBAAuB,CAAC,QAAQ,CAAC,IAJ/C,oBAAoB,CAAC,QAAQ,CAAC,CAAC,EAAE,CAKxC,CACL,CAAC,GACG,IACX,IACJ,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RadioGroupProps } from 'aristid-ds/dist/Kit/DataEntry/Radio';
|
|
2
|
+
import { FunctionComponent } from 'react';
|
|
3
|
+
interface ISelectViewTypeProps {
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: RadioGroupProps['onChange'];
|
|
6
|
+
}
|
|
7
|
+
export declare const SelectViewType: FunctionComponent<ISelectViewTypeProps>;
|
|
8
|
+
export {};
|
package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } 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 { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
6
|
+
import { KitRadio, KitSpace, KitTag } from 'aristid-ds';
|
|
7
|
+
export const SelectViewType = ({ value, onChange }) => {
|
|
8
|
+
const { t } = useSharedTranslation();
|
|
9
|
+
const comingSoonTag = _jsx(KitTag, { type: "secondary", idCardProps: { description: String(t('explorer.coming-soon')) } });
|
|
10
|
+
return (_jsx(KitRadio.Group, { value: value, onChange: onChange, children: _jsxs(KitSpace, { direction: "vertical", size: 0, children: [_jsx(KitRadio, { value: "list", disabled: true, children: _jsxs(KitSpace, { children: [t('explorer.view-type-list'), " ", comingSoonTag] }) }), _jsx(KitRadio, { value: "table", children: t('explorer.view-type-table') }), _jsx(KitRadio, { value: "mosaic", disabled: true, children: _jsxs(KitSpace, { children: [t('explorer.view-type-mosaic'), " ", comingSoonTag] }) }), _jsx(KitRadio, { value: "planning", disabled: true, children: _jsxs(KitSpace, { children: [t('explorer.view-type-planning'), " ", comingSoonTag] }) })] }) }));
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=SelectViewType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectViewType.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,YAAY,CAAC;AAStD,MAAM,CAAC,MAAM,cAAc,GAA4C,CAAC,EAAC,KAAK,EAAE,QAAQ,EAAC,EAAE,EAAE;IACzF,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,aAAa,GAAG,KAAC,MAAM,IAAC,IAAI,EAAC,WAAW,EAAC,WAAW,EAAE,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,EAAC,GAAI,CAAC;IAEjH,OAAO,CACH,KAAC,QAAQ,CAAC,KAAK,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,YAC5C,MAAC,QAAQ,IAAC,SAAS,EAAC,UAAU,EAAC,IAAI,EAAE,CAAC,aAClC,KAAC,QAAQ,IAAC,KAAK,EAAC,MAAM,EAAC,QAAQ,kBAC3B,MAAC,QAAQ,eACJ,CAAC,CAAC,yBAAyB,CAAC,OAAG,aAAa,IACtC,GACJ,EACX,KAAC,QAAQ,IAAC,KAAK,EAAC,OAAO,YAAE,CAAC,CAAC,0BAA0B,CAAC,GAAY,EAClE,KAAC,QAAQ,IAAC,KAAK,EAAC,QAAQ,EAAC,QAAQ,kBAC7B,MAAC,QAAQ,eACJ,CAAC,CAAC,2BAA2B,CAAC,OAAG,aAAa,IACxC,GACJ,EACX,KAAC,QAAQ,IAAC,KAAK,EAAC,UAAU,EAAC,QAAQ,kBAC/B,MAAC,QAAQ,eACJ,CAAC,CAAC,6BAA6B,CAAC,OAAG,aAAa,IAC1C,GACJ,IACJ,GACE,CACpB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { viewSettingsReducer } from './store-view-settings/viewSettingsReducer';
|
|
2
|
+
export type { IViewSettingsState } from './store-view-settings/viewSettingsReducer';
|
|
3
|
+
export { ViewSettingsContext } from './store-view-settings/ViewSettingsContext';
|
|
4
|
+
export { viewSettingsInitialState } from './store-view-settings/viewSettingsInitialState';
|
|
5
|
+
export { useOpenSettings } from './open-view-settings/useOpenSettings';
|
|
6
|
+
export { SidePanel } from './open-view-settings/SidePanel';
|
|
7
|
+
export { useEditSettings } from './open-view-settings/useEditSettings';
|
|
8
|
+
export { EditSettingsContextProvider } from './open-view-settings/EditSettingsContextProvider';
|
|
@@ -0,0 +1,11 @@
|
|
|
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.txtexport {useViewSettingsContext} from './store-view-settings/useViewSettingsContext';
|
|
4
|
+
export { viewSettingsReducer } from './store-view-settings/viewSettingsReducer';
|
|
5
|
+
export { ViewSettingsContext } from './store-view-settings/ViewSettingsContext';
|
|
6
|
+
export { viewSettingsInitialState } from './store-view-settings/viewSettingsInitialState';
|
|
7
|
+
export { useOpenSettings } from './open-view-settings/useOpenSettings';
|
|
8
|
+
export { SidePanel } from './open-view-settings/SidePanel';
|
|
9
|
+
export { useEditSettings } from './open-view-settings/useEditSettings';
|
|
10
|
+
export { EditSettingsContextProvider } from './open-view-settings/EditSettingsContextProvider';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Explorer/manage-view-settings/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,0JAA0J;AAC1J,OAAO,EAAC,mBAAmB,EAAC,MAAM,2CAA2C,CAAC;AAE9E,OAAO,EAAC,mBAAmB,EAAC,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAC,wBAAwB,EAAC,MAAM,gDAAgD,CAAC;AAExF,OAAO,EAAC,eAAe,EAAC,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAC,SAAS,EAAC,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAC,eAAe,EAAC,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAC,2BAA2B,EAAC,MAAM,kDAAkD,CAAC"}
|
|
@@ -7,6 +7,7 @@ interface IActiveSettings {
|
|
|
7
7
|
export interface IEditSettingsContext {
|
|
8
8
|
setActiveSettings: (params: IActiveSettings) => void;
|
|
9
9
|
activeSettings: null | IActiveSettings;
|
|
10
|
+
panelElement: Element | DocumentFragment | null;
|
|
10
11
|
onClose: () => void;
|
|
11
12
|
}
|
|
12
13
|
export declare const EditSettingsContext: import("react").Context<IEditSettingsContext>;
|
package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditSettingsContext.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAY,MAAM,OAAO,CAAC;AAe/C,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAuB;IACnE,iBAAiB,EAAE,GAAG,EAAE;QACpB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;IACD,cAAc,EAAE,IAAI;IACpB,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE,GAAG,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { IEditSettingsContext } from './EditSettingsContext';
|
|
3
|
+
interface IEditSettingsContextProviderProps {
|
|
4
|
+
panelElement?: IEditSettingsContext['panelElement'];
|
|
5
|
+
}
|
|
6
|
+
export declare const EditSettingsContextProvider: FunctionComponent<IEditSettingsContextProviderProps>;
|
|
7
|
+
export {};
|