@leav/ui 0.3.6-dd8d51c → 0.3.6-df40eff
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.js +2 -2
- package/dist/__mocks__/common/form.js.map +1 -1
- package/dist/_gqlTypes/index.d.ts +88 -0
- package/dist/_gqlTypes/index.js +41 -0
- 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/components/Explorer/DataView.d.ts +2 -1
- package/dist/components/Explorer/DataView.js +8 -26
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +6 -4
- package/dist/components/Explorer/Explorer.js +30 -9
- 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/TableCell.d.ts +7 -0
- package/dist/components/Explorer/TableCell.js +40 -0
- package/dist/components/Explorer/TableCell.js.map +1 -0
- package/dist/components/Explorer/_queries/useExplorerData.d.ts +11 -0
- package/dist/components/Explorer/_queries/useExplorerData.js +42 -0
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -0
- package/dist/components/Explorer/{types.d.ts → _types.d.ts} +11 -0
- package/dist/components/Explorer/_types.js +2 -0
- package/dist/components/Explorer/_types.js.map +1 -0
- package/dist/components/Explorer/edit-settings/ColumnItem.d.ts +12 -0
- package/dist/components/Explorer/edit-settings/ColumnItem.js +78 -0
- package/dist/components/Explorer/edit-settings/ColumnItem.js.map +1 -0
- package/dist/components/Explorer/edit-settings/DisplayMode.d.ts +6 -0
- package/dist/components/Explorer/edit-settings/DisplayMode.js +34 -0
- package/dist/components/Explorer/edit-settings/DisplayMode.js.map +1 -0
- package/dist/components/Explorer/edit-settings/DisplayModeTable.d.ts +6 -0
- package/dist/components/Explorer/edit-settings/DisplayModeTable.js +89 -0
- package/dist/components/Explorer/edit-settings/DisplayModeTable.js.map +1 -0
- package/dist/components/Explorer/edit-settings/EditSettingsContext.d.ts +14 -0
- package/dist/components/Explorer/edit-settings/EditSettingsContext.js +15 -0
- package/dist/components/Explorer/edit-settings/EditSettingsContext.js.map +1 -0
- package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.d.ts +7 -0
- package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.js +17 -0
- package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.js.map +1 -0
- package/dist/components/Explorer/edit-settings/SettingItem.d.ts +9 -0
- package/dist/components/Explorer/edit-settings/SettingItem.js +55 -0
- package/dist/components/Explorer/edit-settings/SettingItem.js.map +1 -0
- package/dist/components/Explorer/edit-settings/SettingsPanel.d.ts +7 -0
- package/dist/components/Explorer/edit-settings/SettingsPanel.js +53 -0
- package/dist/components/Explorer/edit-settings/SettingsPanel.js.map +1 -0
- package/dist/components/Explorer/edit-settings/SidePanel.d.ts +2 -0
- package/dist/components/Explorer/edit-settings/SidePanel.js +19 -0
- package/dist/components/Explorer/edit-settings/SidePanel.js.map +1 -0
- package/dist/components/Explorer/edit-settings/ViewSetingsContext.d.ts +7 -0
- package/dist/components/Explorer/edit-settings/ViewSetingsContext.js +15 -0
- package/dist/components/Explorer/edit-settings/ViewSetingsContext.js.map +1 -0
- package/dist/components/Explorer/edit-settings/useEditSettings.d.ts +1 -0
- package/dist/components/Explorer/edit-settings/useEditSettings.js +7 -0
- package/dist/components/Explorer/edit-settings/useEditSettings.js.map +1 -0
- package/dist/components/Explorer/edit-settings/useGetLibraryColumns.d.ts +10 -0
- package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js +24 -0
- package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js.map +1 -0
- package/dist/components/Explorer/edit-settings/useOpenSettings.d.ts +1 -0
- package/dist/components/Explorer/edit-settings/useOpenSettings.js +19 -0
- package/dist/components/Explorer/edit-settings/useOpenSettings.js.map +1 -0
- package/dist/components/Explorer/edit-settings/useViewSettingsContext.d.ts +4 -0
- package/dist/components/Explorer/edit-settings/useViewSettingsContext.js +7 -0
- package/dist/components/Explorer/edit-settings/useViewSettingsContext.js.map +1 -0
- package/dist/components/Explorer/edit-settings/viewSettingsReducer.d.ts +43 -0
- package/dist/components/Explorer/edit-settings/viewSettingsReducer.js +58 -0
- package/dist/components/Explorer/edit-settings/viewSettingsReducer.js.map +1 -0
- package/dist/components/Explorer/index.d.ts +11 -1
- package/dist/components/Explorer/index.js +8 -1
- package/dist/components/Explorer/index.js.map +1 -1
- 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 +2 -2
- package/dist/components/Explorer/useEditAction.js.map +1 -1
- package/dist/components/Explorer/usePrimaryActions.d.ts +20 -0
- package/dist/components/Explorer/usePrimaryActions.js +29 -0
- package/dist/components/Explorer/usePrimaryActions.js.map +1 -0
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +1 -1
- 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 +2 -2
- package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.js +3 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.js.map +1 -1
- 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/StandardField/StandardFieldValue/DSBooleanWrapper.js +3 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +3 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +3 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +3 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +3 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +3 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +3 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.d.ts +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js +39 -29
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js +5 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.d.ts +3 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js +145 -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 +17 -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/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/locales/en/shared.json +21 -3
- package/dist/locales/fr/shared.json +21 -3
- package/package.json +4 -2
- 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
|
@@ -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 './ColumnItem';
|
|
14
|
+
import { useGetLibraryColumns } from './useGetLibraryColumns';
|
|
15
|
+
import { ViewSettingsActionTypes } from '../edit-settings/viewSettingsReducer';
|
|
16
|
+
import { useViewSettingsContext } from './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 DisplayModeTable = ({ library }) => {
|
|
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(library);
|
|
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=DisplayModeTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DisplayModeTable.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/DisplayModeTable.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,cAAc,CAAC;AACxC,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAC,uBAAuB,EAAC,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAC;AAEhE,MAAM,UAAU,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;CAK3B,CAAC;AAEF,MAAM,aAAa,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;CAO9B,CAAC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,WAAW,KAAG,IALvB,QAAQ,CAMf,CACL,CAAC,IACQ,GACT,GACJ,EACb,KAAC,aAAa,KAAG,EACjB,KAAC,UAAU,cACN,wBAAwB;6BACpB,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,qBAAqB,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,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface IActiveSettings {
|
|
3
|
+
content: ReactNode;
|
|
4
|
+
title: string;
|
|
5
|
+
onClickLeftButton?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface IEditSettingsContext {
|
|
8
|
+
setActiveSettings: (params: IActiveSettings) => void;
|
|
9
|
+
activeSettings: null | IActiveSettings;
|
|
10
|
+
panelElement: Element | DocumentFragment | null;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const EditSettingsContext: import("react").Context<IEditSettingsContext>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
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 { createContext } from 'react';
|
|
5
|
+
export const EditSettingsContext = createContext({
|
|
6
|
+
setActiveSettings: () => {
|
|
7
|
+
throw new Error('Not implemented');
|
|
8
|
+
},
|
|
9
|
+
activeSettings: null,
|
|
10
|
+
panelElement: null,
|
|
11
|
+
onClose: () => {
|
|
12
|
+
throw new Error('Not implemented');
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=EditSettingsContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditSettingsContext.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-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 {};
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { useState } from 'react';
|
|
6
|
+
import { EditSettingsContext } from './EditSettingsContext';
|
|
7
|
+
export const EditSettingsContextProvider = ({ children, panelElement }) => {
|
|
8
|
+
const [activeSettings, setActiveSettings] = useState(null);
|
|
9
|
+
const onClose = () => setActiveSettings(null);
|
|
10
|
+
return (_jsx(EditSettingsContext.Provider, { value: {
|
|
11
|
+
activeSettings,
|
|
12
|
+
setActiveSettings,
|
|
13
|
+
panelElement: panelElement ?? null,
|
|
14
|
+
onClose
|
|
15
|
+
}, children: children }));
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=EditSettingsContextProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditSettingsContextProvider.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/EditSettingsContextProvider.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoB,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,EAAC,mBAAmB,EAAuB,MAAM,uBAAuB,CAAC;AAMhF,MAAM,CAAC,MAAM,2BAA2B,GAAyD,CAAC,EAC9F,QAAQ,EACR,YAAY,EACf,EAAE,EAAE;IACD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAyC,IAAI,CAAC,CAAC;IACnG,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAE9C,OAAO,CACH,KAAC,mBAAmB,CAAC,QAAQ,IACzB,KAAK,EAAE;YACH,cAAc;YACd,iBAAiB;YACjB,YAAY,EAAE,YAAY,IAAI,IAAI;YAClC,OAAO;SACV,YAEA,QAAQ,GACkB,CAClC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 { KitTypography } from 'aristid-ds';
|
|
6
|
+
import { FaChevronRight } from 'react-icons/fa';
|
|
7
|
+
import styled from 'styled-components';
|
|
8
|
+
const StyledValue = styled(KitTypography.Text) `
|
|
9
|
+
color: var(--general-utilities-disabled);
|
|
10
|
+
`;
|
|
11
|
+
const StyledConfigurationItem = styled.li `
|
|
12
|
+
list-style: none;
|
|
13
|
+
|
|
14
|
+
&:first-child {
|
|
15
|
+
margin-top: calc(var(--general-spacing-xs) * 1px);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
> button {
|
|
19
|
+
color: var(--general-utilities-text-primary);
|
|
20
|
+
border: none;
|
|
21
|
+
background: transparent;
|
|
22
|
+
display: flex;
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 40px;
|
|
25
|
+
align-items: center;
|
|
26
|
+
padding: 0 calc(var(--general-spacing-xs) * 1px);
|
|
27
|
+
gap: calc(var(--general-spacing-xs) * 1px);
|
|
28
|
+
border-radius: calc(var(--general-spacing-xs) * 1px);
|
|
29
|
+
text-align: left;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
|
|
32
|
+
&:hover {
|
|
33
|
+
background: var(--general-utilities-main-light);
|
|
34
|
+
|
|
35
|
+
${StyledValue} {
|
|
36
|
+
color: var(--general-utilities-text-primary);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.title {
|
|
41
|
+
flex: 1 1 auto;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.value {
|
|
45
|
+
flex: 0 1 auto;
|
|
46
|
+
text-align: right;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
> svg {
|
|
50
|
+
flex: 0 0 calc(var(--general-spacing-s) * 1px);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
export const SettingItem = ({ icon, title, value = '', onClick }) => (_jsx(StyledConfigurationItem, { children: _jsxs("button", { onClick: onClick, children: [icon, _jsx(KitTypography.Text, { size: "fontSize5", ellipsis: true, className: "title", children: title }), _jsx(StyledValue, { size: "fontSize5", ellipsis: true, className: "value", children: value }), _jsx(FaChevronRight, {})] }) }));
|
|
55
|
+
//# sourceMappingURL=SettingItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingItem.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/SettingItem.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAC;AAC9C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;;CAE7C,CAAC;AAEF,MAAM,uBAAuB,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;cAwB3B,WAAW;;;;;;;;;;;;;;;;;;CAkBxB,CAAC;AASF,MAAM,CAAC,MAAM,WAAW,GAAyC,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,KAAK,GAAG,EAAE,EAAE,OAAO,EAAC,EAAE,EAAE,CAAC,CACrG,KAAC,uBAAuB,cACpB,kBAAQ,OAAO,EAAE,OAAO,aACnB,IAAI,EACL,KAAC,aAAa,CAAC,IAAI,IAAC,IAAI,EAAC,WAAW,EAAC,QAAQ,QAAC,SAAS,EAAC,OAAO,YAC1D,KAAK,GACW,EACrB,KAAC,WAAW,IAAC,IAAI,EAAC,WAAW,EAAC,QAAQ,QAAC,SAAS,EAAC,OAAO,YACnD,KAAK,GACI,EACd,KAAC,cAAc,KAAG,IACb,GACa,CAC7B,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 styled from 'styled-components';
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
import { KitTypography } from 'aristid-ds';
|
|
8
|
+
import { FaFilter, FaList, FaSortAlphaDown } from 'react-icons/fa';
|
|
9
|
+
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
10
|
+
import { DisplayMode } from './DisplayMode';
|
|
11
|
+
import { SettingItem } from './SettingItem';
|
|
12
|
+
import { useEditSettings } from './useEditSettings';
|
|
13
|
+
const ContentWrapperStyledDiv = styled.div `
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: calc(var(--general-spacing-s) * 1px);
|
|
17
|
+
`;
|
|
18
|
+
const ConfigurationStyledMenu = styled.menu `
|
|
19
|
+
padding: 0;
|
|
20
|
+
`;
|
|
21
|
+
export const SettingsPanel = ({ library }) => {
|
|
22
|
+
const { t } = useSharedTranslation();
|
|
23
|
+
const { setActiveSettings, activeSettings } = useEditSettings();
|
|
24
|
+
const [currentPage, setCurrentPage] = useState('view-configuration');
|
|
25
|
+
const _goToAdvancedSettingsPage = (page) => {
|
|
26
|
+
if (!activeSettings) {
|
|
27
|
+
throw Error('Should not be able to change side pane page if there is no side panel!');
|
|
28
|
+
}
|
|
29
|
+
const _changePanelPage = ({ pageName, title, onClickLeftButton }) => {
|
|
30
|
+
setCurrentPage(pageName);
|
|
31
|
+
setActiveSettings({
|
|
32
|
+
...activeSettings,
|
|
33
|
+
title,
|
|
34
|
+
onClickLeftButton
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
_changePanelPage({
|
|
38
|
+
pageName: page,
|
|
39
|
+
title: t(`explorer.${page}`),
|
|
40
|
+
onClickLeftButton: () => {
|
|
41
|
+
const rootPanel = { pageName: 'view-configuration', title: t('explorer.settings') };
|
|
42
|
+
_changePanelPage(rootPanel);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
// TODO: look for MemoryRouter
|
|
47
|
+
return (_jsxs(ContentWrapperStyledDiv, { children: [currentPage === 'view-configuration' && (_jsxs("nav", { children: [_jsx(KitTypography.Title, { level: "h4", children: t('explorer.view-configuration') }), _jsxs(ConfigurationStyledMenu, { children: [_jsx(SettingItem, { icon: _jsx(FaList, {}), title: t('explorer.display-mode'), onClick: () => _goToAdvancedSettingsPage('display-mode') }), _jsx(SettingItem, { icon: _jsx(FaFilter, {}), title: t('explorer.filters'), onClick: () => {
|
|
48
|
+
/* TODO: not implemented yet */
|
|
49
|
+
} }), _jsx(SettingItem, { icon: _jsx(FaSortAlphaDown, {}), title: t('explorer.sort'), onClick: () => {
|
|
50
|
+
/* TODO: not implemented yet */
|
|
51
|
+
} })] })] })), currentPage === 'display-mode' && _jsx(DisplayMode, { library: library })] }));
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=SettingsPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsPanel.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/SettingsPanel.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAoB,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,C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AW,KAAK,oBAAoB,IAAI,CACrC,0BACI,KAAC,aAAa,CAAC,KAAK,IAAC,KAAK,EAAC,IAAI,YAAE,CAAC,CAAC,6BAA6B,CAAC,GAAuB,EACxF,MAAC,uBAAuB,eACpB,KAAC,WAAW,IACR,IAAI,EAAE,KAAC,MAAM,KAAG,EAChB,KAAK,EAAE,CAAC,CAAC,uBAAuB,CAAC,EACjC,OAAO,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,cAAc,CAAC,GAC1D,EACF,KAAC,WAAW,IACR,IAAI,EAAE,KAAC,QAAQ,KAAG,EAClB,KAAK,EAAE,CAAC,CAAC,kBAAkB,CAAC,EAC5B,OAAO,EAAE,GAAG,EAAE;oCACV,+BAA+B;gCACnC,CAAC,GACH,EACF,KAAC,WAAW,IACR,IAAI,EAAE,KAAC,eAAe,KAAG,EACzB,KAAK,EAAE,CAAC,CAAC,eAAe,CAAC,EACzB,OAAO,EAAE,GAAG,EAAE;oCACV,+BAA+B;gCACnC,CAAC,GACH,IACoB,IACxB,CACT,EACA,WAAW,KAAK,cAAc,IAAI,KAAC,WAAW,IAAC,OAAO,EAAE,OAAO,GAAI,IAC9C,CAC7B,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { KitSidePanel } from 'aristid-ds';
|
|
3
|
+
import { useEditSettings } from './useEditSettings';
|
|
4
|
+
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
5
|
+
export const SidePanel = () => {
|
|
6
|
+
const { t } = useSharedTranslation();
|
|
7
|
+
const { activeSettings, onClose } = useEditSettings();
|
|
8
|
+
if (!activeSettings) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
// TODO: handle transition opening/closing on floating prop true
|
|
12
|
+
const makeA11yBackButton = {
|
|
13
|
+
title: String(t('explorer.back')) /* TODO: avoid transform null to 'null' */
|
|
14
|
+
};
|
|
15
|
+
return (_jsx(KitSidePanel, { style: { zIndex: '10000' }, initialOpen: true, floating: true, closable: true, idCardProps: { title: activeSettings.title }, leftActionProps: activeSettings.onClickLeftButton
|
|
16
|
+
? { onClick: activeSettings.onClickLeftButton, ...makeA11yBackButton }
|
|
17
|
+
: undefined, onClose: onClose, children: activeSettings.content }));
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=SidePanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidePanel.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/SidePanel.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AACxC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,MAAM,CAAC,MAAM,SAAS,GAAsB,GAAG,EAAE;IAC7C,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,EAAC,cAAc,EAAE,OAAO,EAAC,GAAG,eAAe,EAAE,CAAC;IAEpD,IAAI,CAAC,cAAc,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,gEAAgE;IAEhE,MAAM,kBAAkB,GAA4C;QAChE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,0CAA0C;KAC/E,CAAC;IAEF,OAAO,CACH,KAAC,YAAY,IACT,KAAK,EAAE,EAAC,MAAM,EAAE,OAAO,EAAC,EACxB,WAAW,QACX,QAAQ,QACR,QAAQ,QACR,WAAW,EAAE,EAAC,KAAK,EAAE,cAAc,CAAC,KAAK,EAAC,EAC1C,eAAe,EACX,cAAc,CAAC,iBAAiB;YAC5B,CAAC,CAAC,EAAC,OAAO,EAAE,cAAc,CAAC,iBAAiB,EAAE,GAAG,kBAAkB,EAAC;YACpE,CAAC,CAAC,SAAS,EAEnB,OAAO,EAAE,OAAO,YAEf,cAAc,CAAC,OAAO,GACZ,CAClB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
import { IViewSettingsState, IViewSettingsAction } from './viewSettingsReducer';
|
|
3
|
+
export declare const viewSettingsInitialState: IViewSettingsState;
|
|
4
|
+
export declare const ViewSettingsContext: import("react").Context<{
|
|
5
|
+
view: IViewSettingsState;
|
|
6
|
+
dispatch: Dispatch<IViewSettingsAction>;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,15 @@
|
|
|
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 { createContext } from 'react';
|
|
5
|
+
export const viewSettingsInitialState = {
|
|
6
|
+
displayMode: 'table',
|
|
7
|
+
fields: []
|
|
8
|
+
};
|
|
9
|
+
export const ViewSettingsContext = createContext({
|
|
10
|
+
view: null,
|
|
11
|
+
dispatch: () => {
|
|
12
|
+
throw new Error('useViewSettingsContext must be used inside a <ViewSettingsContext.Provider />');
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=ViewSetingsContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewSetingsContext.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/ViewSetingsContext.tsx"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAW,MAAM,OAAO,CAAC;AAG9C,MAAM,CAAC,MAAM,wBAAwB,GAAuB;IACxD,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,EAAE;CACb,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAG7C;IACC,IAAI,EAAE,IAAW;IACjB,QAAQ,EAAE,GAAG,EAAE;QACX,MAAM,IAAI,KAAK,CAAC,+EAA+E,CAAC,CAAC;IACrG,CAAC;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useEditSettings: () => import("./EditSettingsContext").IEditSettingsContext;
|
|
@@ -0,0 +1,7 @@
|
|
|
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 { useContext } from 'react';
|
|
5
|
+
import { EditSettingsContext } from './EditSettingsContext';
|
|
6
|
+
export const useEditSettings = () => useContext(EditSettingsContext);
|
|
7
|
+
//# sourceMappingURL=useEditSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEditSettings.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/useEditSettings.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,UAAU,EAAC,MAAM,OAAO,CAAC;AACjC,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AttributeDetailsFragment } from '../../../_gqlTypes';
|
|
2
|
+
interface IColumnsById {
|
|
3
|
+
[attributeId: string]: AttributeDetailsFragment;
|
|
4
|
+
}
|
|
5
|
+
export declare const useGetLibraryColumns: (library: string) => {
|
|
6
|
+
attributeDetailsById: IColumnsById;
|
|
7
|
+
error: import("@apollo/client").ApolloError;
|
|
8
|
+
loading: boolean;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { useGetAttributesByLibQuery } from '../../../_gqlTypes';
|
|
5
|
+
import { useLang } from '../../../hooks';
|
|
6
|
+
import { localizedTranslation } from '@leav/utils';
|
|
7
|
+
const _mapping = (data, availableLangs) => data?.attributes?.list.reduce((acc, attribute) => {
|
|
8
|
+
acc[attribute.id] = {
|
|
9
|
+
...attribute,
|
|
10
|
+
label: localizedTranslation(attribute.label, availableLangs)
|
|
11
|
+
};
|
|
12
|
+
return acc;
|
|
13
|
+
}, {}) ?? {};
|
|
14
|
+
export const useGetLibraryColumns = (library) => {
|
|
15
|
+
const { lang: availableLangs } = useLang();
|
|
16
|
+
const { data, error, loading } = useGetAttributesByLibQuery({
|
|
17
|
+
variables: {
|
|
18
|
+
library
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
const attributeDetailsById = _mapping(data, availableLangs);
|
|
22
|
+
return { attributeDetailsById, error, loading };
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=useGetLibraryColumns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGetLibraryColumns.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/useGetLibraryColumns.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoD,0BAA0B,EAAC,MAAM,oBAAoB,CAAC;AACjH,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAMjD,MAAM,QAAQ,GAAG,CAAC,IAAyC,EAAE,cAAwB,EAAgB,EAAE,CACnG,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE;IAC7C,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG;QAChB,GAAG,SAAS;QACZ,KAAK,EAAE,oBAAoB,CAAC,SAAS,CAAC,KAAK,EAAE,cAAc,CAAC;KAC/D,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,cAAc,EAAC,GAAG,OAAO,EAAE,CAAC;IACzC,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,cAAc,CAAC,CAAC;IAE5D,OAAO,EAAC,oBAAoB,EAAE,KAAK,EAAE,OAAO,EAAC,CAAC;AAClD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useOpenSettings: (library: string) => JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
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 { KitButton } from 'aristid-ds';
|
|
6
|
+
import { FaSlidersH } from 'react-icons/fa';
|
|
7
|
+
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
8
|
+
import { SettingsPanel } from './SettingsPanel';
|
|
9
|
+
import { useEditSettings } from './useEditSettings';
|
|
10
|
+
export const useOpenSettings = (library) => {
|
|
11
|
+
const { setActiveSettings } = useEditSettings();
|
|
12
|
+
const { t } = useSharedTranslation();
|
|
13
|
+
const _openSettingsPanel = () => setActiveSettings({
|
|
14
|
+
content: _jsx(SettingsPanel, { library: library }),
|
|
15
|
+
title: t('explorer.settings')
|
|
16
|
+
});
|
|
17
|
+
return (_jsx(KitButton, { type: "tertiary", color: "neutral", icon: _jsx(FaSlidersH, {}), onClick: _openSettingsPanel, title: String(t('explorer.settings')) /* TODO: avoid transform null to 'null' */ }));
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=useOpenSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOpenSettings.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/useOpenSettings.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAe,EAAE,EAAE;IAC/C,MAAM,EAAC,iBAAiB,EAAC,GAAG,eAAe,EAAE,CAAC;IAC9C,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,kBAAkB,GAAG,GAAG,EAAE,CAC5B,iBAAiB,CAAC;QACd,OAAO,EAAE,KAAC,aAAa,IAAC,OAAO,EAAE,OAAO,GAAI;QAC5C,KAAK,EAAE,CAAC,CAAC,mBAAmB,CAAC;KAChC,CAAC,CAAC;IAEP,OAAO,CACH,KAAC,SAAS,IACN,IAAI,EAAC,UAAU,EACf,KAAK,EAAC,SAAS,EACf,IAAI,EAAE,KAAC,UAAU,KAAG,EACpB,OAAO,EAAE,kBAAkB,EAC3B,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,0CAA0C,GAClF,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
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 { useContext } from 'react';
|
|
5
|
+
import { ViewSettingsContext } from './ViewSetingsContext';
|
|
6
|
+
export const useViewSettingsContext = () => useContext(ViewSettingsContext);
|
|
7
|
+
//# sourceMappingURL=useViewSettingsContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useViewSettingsContext.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/useViewSettingsContext.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,UAAU,EAAC,MAAM,OAAO,CAAC;AACjC,OAAO,EAAC,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AAEzD,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export type DisplayMode = 'table' | 'list' | 'timeline' | 'mosaic';
|
|
2
|
+
export declare const ViewSettingsActionTypes: {
|
|
3
|
+
readonly ADD_FIELD: "ADD_FIELD";
|
|
4
|
+
readonly REMOVE_FIELD: "REMOVE_FIELD";
|
|
5
|
+
readonly MOVE_FIELD: "MOVE_FIELD";
|
|
6
|
+
readonly RESET_FIELDS: "RESET_FIELDS";
|
|
7
|
+
readonly CHANGE_DISPLAY_MODE: "CHANGE_DISPLAY_MODE";
|
|
8
|
+
};
|
|
9
|
+
export interface IViewSettingsState {
|
|
10
|
+
displayMode: DisplayMode;
|
|
11
|
+
fields: string[];
|
|
12
|
+
}
|
|
13
|
+
interface IViewSettingsActionAddField {
|
|
14
|
+
type: typeof ViewSettingsActionTypes.ADD_FIELD;
|
|
15
|
+
payload: {
|
|
16
|
+
field: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
interface IViewSettingsActionRemoveField {
|
|
20
|
+
type: typeof ViewSettingsActionTypes.REMOVE_FIELD;
|
|
21
|
+
payload: {
|
|
22
|
+
field: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
interface IViewSettingsActionMoveField {
|
|
26
|
+
type: typeof ViewSettingsActionTypes.MOVE_FIELD;
|
|
27
|
+
payload: {
|
|
28
|
+
indexFrom: number;
|
|
29
|
+
indexTo: number;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
interface IViewSettingsActionChangeDisplayMode {
|
|
33
|
+
type: typeof ViewSettingsActionTypes.CHANGE_DISPLAY_MODE;
|
|
34
|
+
payload: {
|
|
35
|
+
displayMode: DisplayMode;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
interface IViewSettingsActionResetFields {
|
|
39
|
+
type: typeof ViewSettingsActionTypes.RESET_FIELDS;
|
|
40
|
+
}
|
|
41
|
+
export type IViewSettingsAction = IViewSettingsActionResetFields | IViewSettingsActionAddField | IViewSettingsActionRemoveField | IViewSettingsActionMoveField | IViewSettingsActionChangeDisplayMode;
|
|
42
|
+
declare const ViewSettingsReducer: (state: IViewSettingsState, action: IViewSettingsAction) => IViewSettingsState;
|
|
43
|
+
export default ViewSettingsReducer;
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
export const ViewSettingsActionTypes = {
|
|
5
|
+
ADD_FIELD: 'ADD_FIELD',
|
|
6
|
+
REMOVE_FIELD: 'REMOVE_FIELD',
|
|
7
|
+
MOVE_FIELD: 'MOVE_FIELD',
|
|
8
|
+
RESET_FIELDS: 'RESET_FIELDS',
|
|
9
|
+
CHANGE_DISPLAY_MODE: 'CHANGE_DISPLAY_MODE'
|
|
10
|
+
};
|
|
11
|
+
const addField = (state, payload) => ({
|
|
12
|
+
...state,
|
|
13
|
+
fields: [...state.fields, payload.field]
|
|
14
|
+
});
|
|
15
|
+
const removeField = (state, payload) => ({
|
|
16
|
+
...state,
|
|
17
|
+
fields: state.fields.filter(field => field !== payload.field)
|
|
18
|
+
});
|
|
19
|
+
const moveField = (state, payload) => {
|
|
20
|
+
const newFields = [...state.fields];
|
|
21
|
+
const [fieldToMove] = newFields.splice(payload.indexFrom, 1);
|
|
22
|
+
newFields.splice(payload.indexTo, 0, fieldToMove);
|
|
23
|
+
return {
|
|
24
|
+
...state,
|
|
25
|
+
fields: newFields
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
const resetFields = state => ({
|
|
29
|
+
...state,
|
|
30
|
+
fields: []
|
|
31
|
+
});
|
|
32
|
+
const changeDisplayMode = (state, payload) => ({
|
|
33
|
+
...state,
|
|
34
|
+
displayMode: payload.displayMode
|
|
35
|
+
});
|
|
36
|
+
const ViewSettingsReducer = (state, action) => {
|
|
37
|
+
switch (action.type) {
|
|
38
|
+
case ViewSettingsActionTypes.ADD_FIELD: {
|
|
39
|
+
return addField(state, action.payload);
|
|
40
|
+
}
|
|
41
|
+
case ViewSettingsActionTypes.REMOVE_FIELD: {
|
|
42
|
+
return removeField(state, action.payload);
|
|
43
|
+
}
|
|
44
|
+
case ViewSettingsActionTypes.MOVE_FIELD: {
|
|
45
|
+
return moveField(state, action.payload);
|
|
46
|
+
}
|
|
47
|
+
case ViewSettingsActionTypes.RESET_FIELDS: {
|
|
48
|
+
return resetFields(state);
|
|
49
|
+
}
|
|
50
|
+
case ViewSettingsActionTypes.CHANGE_DISPLAY_MODE: {
|
|
51
|
+
return changeDisplayMode(state, action.payload);
|
|
52
|
+
}
|
|
53
|
+
default:
|
|
54
|
+
return state;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
export default ViewSettingsReducer;
|
|
58
|
+
//# sourceMappingURL=viewSettingsReducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewSettingsReducer.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/viewSettingsReducer.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AAItE,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACnC,SAAS,EAAE,WAAW;IACtB,YAAY,EAAE,cAAc;IAC5B,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,cAAc;IAC5B,mBAAmB,EAAE,qBAAqB;CACpC,CAAC;AAsCX,MAAM,QAAQ,GAAoD,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IACnF,GAAG,KAAK;IACR,MAAM,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC;CAC3C,CAAC,CAAC;AAEH,MAAM,WAAW,GAAuD,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IACzF,GAAG,KAAK;IACR,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,KAAK,OAAO,CAAC,KAAK,CAAC;CAChE,CAAC,CAAC;AAEH,MAAM,SAAS,GAAqD,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACnF,MAAM,SAAS,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAC7D,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC;IAClD,OAAO;QACH,GAAG,KAAK;QACR,MAAM,EAAE,SAAS;KACpB,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,WAAW,GAAY,KAAK,CAAC,EAAE,CAAC,CAAC;IACnC,GAAG,KAAK;IACR,MAAM,EAAE,EAAE;CACb,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAA6D,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IACrG,GAAG,KAAK;IACR,WAAW,EAAE,OAAO,CAAC,WAAW;CACnC,CAAC,CAAC;AASH,MAAM,mBAAmB,GAAG,CAAC,KAAyB,EAAE,MAA2B,EAAsB,EAAE;IACvG,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,uBAAuB,CAAC,SAAS,CAAC,CAAC,CAAC;YACrC,OAAO,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC;QACD,KAAK,uBAAuB,CAAC,YAAY,CAAC,CAAC,CAAC;YACxC,OAAO,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC9C,CAAC;QACD,KAAK,uBAAuB,CAAC,UAAU,CAAC,CAAC,CAAC;YACtC,OAAO,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC5C,CAAC;QACD,KAAK,uBAAuB,CAAC,YAAY,CAAC,CAAC,CAAC;YACxC,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC9B,CAAC;QACD,KAAK,uBAAuB,CAAC,mBAAmB,CAAC,CAAC,CAAC;YAC/C,OAAO,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QACpD,CAAC;QACD;YACI,OAAO,KAAK,CAAC;IACrB,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { Explorer as InternalExplorer } from './Explorer';
|
|
2
|
+
import { useEditSettings } from './edit-settings/useEditSettings';
|
|
3
|
+
import { EditSettingsContextProvider } from './edit-settings/EditSettingsContextProvider';
|
|
4
|
+
import { SidePanel } from './edit-settings/SidePanel';
|
|
5
|
+
type CompoundedComponent = typeof InternalExplorer & {
|
|
6
|
+
useEditSettings: typeof useEditSettings;
|
|
7
|
+
EditSettingsContextProvider: typeof EditSettingsContextProvider;
|
|
8
|
+
SettingsSidePanel: typeof SidePanel;
|
|
9
|
+
};
|
|
10
|
+
export declare const Explorer: CompoundedComponent;
|
|
11
|
+
export {};
|
|
@@ -1,5 +1,12 @@
|
|
|
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
|
-
|
|
4
|
+
import { Explorer as InternalExplorer } from './Explorer';
|
|
5
|
+
import { useEditSettings } from './edit-settings/useEditSettings';
|
|
6
|
+
import { EditSettingsContextProvider } from './edit-settings/EditSettingsContextProvider';
|
|
7
|
+
import { SidePanel } from './edit-settings/SidePanel';
|
|
8
|
+
export const Explorer = InternalExplorer;
|
|
9
|
+
Explorer.EditSettingsContextProvider = EditSettingsContextProvider;
|
|
10
|
+
Explorer.useEditSettings = useEditSettings;
|
|
11
|
+
Explorer.SettingsSidePanel = SidePanel;
|
|
5
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Explorer/index.
|
|
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,EAAC,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAC,2BAA2B,EAAC,MAAM,6CAA6C,CAAC;AACxF,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAQpD,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"}
|