@leav/ui 0.3.6-4d50dfd → 0.3.6-5d358de
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 -24
- package/dist/_gqlTypes/index.js +13 -4
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/components/Explorer/DataView.d.ts +1 -1
- package/dist/components/Explorer/DataView.js +8 -34
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +2 -0
- package/dist/components/Explorer/Explorer.js +13 -8
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/IdCard.d.ts +7 -0
- package/dist/components/Explorer/IdCard.js +15 -0
- package/dist/components/Explorer/IdCard.js.map +1 -0
- package/dist/components/Explorer/TableCell.d.ts +8 -0
- package/dist/components/Explorer/TableCell.js +41 -0
- package/dist/components/Explorer/TableCell.js.map +1 -0
- package/dist/components/Explorer/_queries/useExplorerData.js +9 -7
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +6 -4
- package/dist/components/Explorer/index.d.ts +1 -5
- package/dist/components/Explorer/index.js +1 -5
- 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/{edit-settings/DisplayModeTable.js → manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js} +26 -13
- 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/{edit-settings/ViewSetingsContext.d.ts → manage-view-settings/store-view-settings/ViewSettingsContext.d.ts} +1 -2
- package/dist/components/Explorer/{edit-settings/ViewSetingsContext.js → manage-view-settings/store-view-settings/ViewSettingsContext.js} +2 -6
- package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/store-view-settings}/useViewSettingsContext.js +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +2 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +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/{edit-settings → manage-view-settings/store-view-settings}/viewSettingsReducer.js +18 -14
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -0
- package/dist/locales/en/shared.json +9 -7
- package/dist/locales/fr/shared.json +9 -7
- package/package.json +3 -1
- package/dist/components/Explorer/edit-settings/ColumnItem.js.map +0 -1
- package/dist/components/Explorer/edit-settings/DisplayMode.d.ts +0 -6
- package/dist/components/Explorer/edit-settings/DisplayMode.js +0 -34
- package/dist/components/Explorer/edit-settings/DisplayMode.js.map +0 -1
- package/dist/components/Explorer/edit-settings/DisplayModeTable.d.ts +0 -6
- package/dist/components/Explorer/edit-settings/DisplayModeTable.js.map +0 -1
- package/dist/components/Explorer/edit-settings/EditSettingsContext.js.map +0 -1
- package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.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/ViewSetingsContext.js.map +0 -1
- package/dist/components/Explorer/edit-settings/ViewSetingsContextProvider.d.ts +0 -2
- package/dist/components/Explorer/edit-settings/ViewSetingsContextProvider.js +0 -12
- package/dist/components/Explorer/edit-settings/ViewSetingsContextProvider.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/Explorer/edit-settings/useViewSettingsContext.js.map +0 -1
- package/dist/components/Explorer/edit-settings/viewSettingsReducer.d.ts +0 -42
- package/dist/components/Explorer/edit-settings/viewSettingsReducer.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
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/store-view-settings}/useViewSettingsContext.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,C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ils';
|
|
2
|
+
import { AttributePropertiesFragment, PropertyValueFragment, RecordIdentityFragment } from '../../_gqlTypes';
|
|
2
3
|
import { ReactElement } from 'react';
|
|
3
|
-
export type ItemWhoAmI = Required<RecordIdentityFragment['whoAmI']>;
|
|
4
4
|
export interface IExplorerData {
|
|
5
5
|
attributes: {
|
|
6
|
-
[attributeId: string]:
|
|
6
|
+
[attributeId: string]: Override<AttributePropertiesFragment, {
|
|
7
|
+
label: string;
|
|
8
|
+
}>;
|
|
7
9
|
};
|
|
8
10
|
records: IItemData[];
|
|
9
11
|
}
|
|
@@ -11,7 +13,7 @@ export interface IItemData {
|
|
|
11
13
|
libraryId: string;
|
|
12
14
|
key: string;
|
|
13
15
|
itemId: string;
|
|
14
|
-
whoAmI:
|
|
16
|
+
whoAmI: Required<RecordIdentityFragment['whoAmI']>;
|
|
15
17
|
propertiesById: {
|
|
16
18
|
[attributeId: string]: PropertyValueFragment[];
|
|
17
19
|
};
|
|
@@ -1,12 +1,8 @@
|
|
|
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';
|
|
5
|
-
import { ViewSettingsContextProvider } from './edit-settings/ViewSetingsContextProvider';
|
|
2
|
+
import { useEditSettings, SidePanel, EditSettingsContextProvider } from './manage-view-settings';
|
|
6
3
|
type CompoundedComponent = typeof InternalExplorer & {
|
|
7
4
|
useEditSettings: typeof useEditSettings;
|
|
8
5
|
EditSettingsContextProvider: typeof EditSettingsContextProvider;
|
|
9
|
-
ViewSettingsContextProvider: typeof ViewSettingsContextProvider;
|
|
10
6
|
SettingsSidePanel: typeof SidePanel;
|
|
11
7
|
};
|
|
12
8
|
export declare const Explorer: CompoundedComponent;
|
|
@@ -2,13 +2,9 @@
|
|
|
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';
|
|
8
|
-
import { ViewSettingsContextProvider } from './edit-settings/ViewSetingsContextProvider';
|
|
5
|
+
import { useEditSettings, SidePanel, EditSettingsContextProvider } from './manage-view-settings';
|
|
9
6
|
export const Explorer = InternalExplorer;
|
|
10
7
|
Explorer.EditSettingsContextProvider = EditSettingsContextProvider;
|
|
11
|
-
Explorer.ViewSettingsContextProvider = ViewSettingsContextProvider;
|
|
12
8
|
Explorer.useEditSettings = useEditSettings;
|
|
13
9
|
Explorer.SettingsSidePanel = SidePanel;
|
|
14
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -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,EAAC,GAAG,EAAC,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,MAAM,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;;CAE7C,CAAC;AAEF,MAAM,uBAAuB,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;;;;;;;;;UAmB/B,WAAW;;;;;;;;;;;;;;;;;;;;;CAqBpB,CAAC;AAEF,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;;CAEhC,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;;CAExC,CAAC;AAEF,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAwB;cAC9C,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,C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Q,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"}
|
|
@@ -2,16 +2,18 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
3
|
// This file is released under LGPL V3
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
-
import { useDebouncedValue } from '
|
|
6
|
-
import { useSharedTranslation } from '
|
|
5
|
+
import { useDebouncedValue } from '../../../../../hooks/useDebouncedValue/useDebouncedValue';
|
|
6
|
+
import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
7
7
|
import { KitInput, KitTypography } from 'aristid-ds';
|
|
8
8
|
import { useMemo, useState } from 'react';
|
|
9
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';
|
|
10
12
|
import { FaGripLines } from 'react-icons/fa';
|
|
11
|
-
import { ColumnItem } from '
|
|
12
|
-
import { useGetLibraryColumns } from '
|
|
13
|
-
import { ViewSettingsActionTypes } from '
|
|
14
|
-
import { useViewSettingsContext } from '
|
|
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';
|
|
15
17
|
const StyledList = styled.ul `
|
|
16
18
|
padding: 0;
|
|
17
19
|
margin: 0;
|
|
@@ -26,13 +28,16 @@ const StyledDivider = styled.hr `
|
|
|
26
28
|
margin: 0 calc(var(--general-spacing-s) * 1px);
|
|
27
29
|
padding: 0;
|
|
28
30
|
`;
|
|
29
|
-
export const
|
|
31
|
+
export const SelectVisibleAttributes = ({ libraryId }) => {
|
|
30
32
|
const { t } = useSharedTranslation();
|
|
33
|
+
const sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
|
|
34
|
+
coordinateGetter: sortableKeyboardCoordinates
|
|
35
|
+
}));
|
|
31
36
|
const { view, dispatch } = useViewSettingsContext();
|
|
32
37
|
const { fields: orderedVisibleColumns } = view;
|
|
33
38
|
const [searchInput, setSearchInput] = useState('');
|
|
34
39
|
const debouncedSearchInput = useDebouncedValue(searchInput, 300);
|
|
35
|
-
const { attributeDetailsById } = useGetLibraryColumns(
|
|
40
|
+
const { attributeDetailsById } = useGetLibraryColumns(libraryId);
|
|
36
41
|
const searchFilteredColumns = useMemo(() => {
|
|
37
42
|
const columnIds = Object.keys(attributeDetailsById);
|
|
38
43
|
if (columnIds.length === 0) {
|
|
@@ -67,10 +72,18 @@ export const DisplayModeTable = ({ library }) => {
|
|
|
67
72
|
: ViewSettingsActionTypes.ADD_FIELD;
|
|
68
73
|
dispatch({ type: actionType, payload: { field: columnId } });
|
|
69
74
|
};
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
|
73
86
|
.filter(columnId => !orderedVisibleColumns.includes(columnId))
|
|
74
|
-
.map(columnId => (_jsx(ColumnItem, { visible: false, title: attributeDetailsById[columnId].label, onVisibilityClick: _toggleColumnVisibility(columnId) }, attributeDetailsById[columnId].id))) })] })] }));
|
|
87
|
+
.map(columnId => (_jsx(ColumnItem, { itemId: attributeDetailsById[columnId].id, visible: false, title: attributeDetailsById[columnId].label, onVisibilityClick: _toggleColumnVisibility(columnId) }, attributeDetailsById[columnId].id))) })] })] }));
|
|
75
88
|
};
|
|
76
|
-
//# sourceMappingURL=
|
|
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,MA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B,EAAE,uBAAuB,CAAC,QAAQ,CAAC,EACpD,WAAW,EAAE,KAAC,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,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 {};
|
|
@@ -4,12 +4,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
5
|
import { useState } from 'react';
|
|
6
6
|
import { EditSettingsContext } from './EditSettingsContext';
|
|
7
|
-
export const EditSettingsContextProvider = ({ children }) => {
|
|
7
|
+
export const EditSettingsContextProvider = ({ children, panelElement }) => {
|
|
8
8
|
const [activeSettings, setActiveSettings] = useState(null);
|
|
9
9
|
const onClose = () => setActiveSettings(null);
|
|
10
10
|
return (_jsx(EditSettingsContext.Provider, { value: {
|
|
11
11
|
activeSettings,
|
|
12
12
|
setActiveSettings,
|
|
13
|
+
panelElement: panelElement ?? null,
|
|
13
14
|
onClose
|
|
14
15
|
}, children: children }));
|
|
15
16
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditSettingsContextProvider.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/open-view-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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { KitSidePanel } from 'aristid-ds';
|
|
3
3
|
import { useEditSettings } from './useEditSettings';
|
|
4
|
-
import { useSharedTranslation } from '
|
|
4
|
+
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
5
5
|
export const SidePanel = () => {
|
|
6
6
|
const { t } = useSharedTranslation();
|
|
7
7
|
const { activeSettings, onClose } = useEditSettings();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidePanel.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/open-view-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"}
|
package/dist/components/Explorer/manage-view-settings/open-view-settings/useEditSettings.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEditSettings.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/open-view-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"}
|
|
@@ -4,8 +4,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
5
|
import { KitButton } from 'aristid-ds';
|
|
6
6
|
import { FaSlidersH } from 'react-icons/fa';
|
|
7
|
-
import { useSharedTranslation } from '
|
|
8
|
-
import { SettingsPanel } from '
|
|
7
|
+
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
8
|
+
import { SettingsPanel } from '../router-menu/SettingsPanel';
|
|
9
9
|
import { useEditSettings } from './useEditSettings';
|
|
10
10
|
export const useOpenSettings = (library) => {
|
|
11
11
|
const { setActiveSettings } = useEditSettings();
|
package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenSettings.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOpenSettings.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/open-view-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,8BAA8B,CAAC;AAC3D,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 @@
|
|
|
1
|
+
{"version":3,"file":"SettingItem.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/router-menu/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"}
|
package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingsPanel.js
RENAMED
|
@@ -6,10 +6,10 @@ import styled from 'styled-components';
|
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
import { KitTypography } from 'aristid-ds';
|
|
8
8
|
import { FaFilter, FaList, FaSortAlphaDown } from 'react-icons/fa';
|
|
9
|
-
import { useSharedTranslation } from '
|
|
10
|
-
import {
|
|
9
|
+
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
10
|
+
import { useEditSettings } from '../open-view-settings/useEditSettings';
|
|
11
|
+
import { ConfigureDisplay } from '../configure-display/ConfigureDisplay';
|
|
11
12
|
import { SettingItem } from './SettingItem';
|
|
12
|
-
import { useEditSettings } from './useEditSettings';
|
|
13
13
|
const ContentWrapperStyledDiv = styled.div `
|
|
14
14
|
display: flex;
|
|
15
15
|
flex-direction: column;
|
|
@@ -21,7 +21,7 @@ const ConfigurationStyledMenu = styled.menu `
|
|
|
21
21
|
export const SettingsPanel = ({ library }) => {
|
|
22
22
|
const { t } = useSharedTranslation();
|
|
23
23
|
const { setActiveSettings, activeSettings } = useEditSettings();
|
|
24
|
-
const [currentPage, setCurrentPage] = useState('
|
|
24
|
+
const [currentPage, setCurrentPage] = useState('router-menu');
|
|
25
25
|
const _goToAdvancedSettingsPage = (page) => {
|
|
26
26
|
if (!activeSettings) {
|
|
27
27
|
throw Error('Should not be able to change side pane page if there is no side panel!');
|
|
@@ -38,16 +38,16 @@ export const SettingsPanel = ({ library }) => {
|
|
|
38
38
|
pageName: page,
|
|
39
39
|
title: t(`explorer.${page}`),
|
|
40
40
|
onClickLeftButton: () => {
|
|
41
|
-
const rootPanel = { pageName: '
|
|
41
|
+
const rootPanel = { pageName: 'router-menu', title: t('explorer.settings') };
|
|
42
42
|
_changePanelPage(rootPanel);
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
};
|
|
46
46
|
// TODO: look for MemoryRouter
|
|
47
|
-
return (_jsxs(ContentWrapperStyledDiv, { children: [currentPage === '
|
|
47
|
+
return (_jsxs(ContentWrapperStyledDiv, { children: [currentPage === 'router-menu' && (_jsxs("nav", { children: [_jsx(KitTypography.Title, { level: "h4", children: t('explorer.router-menu') }), _jsxs(ConfigurationStyledMenu, { children: [_jsx(SettingItem, { icon: _jsx(FaList, {}), title: t('explorer.configure-display'), onClick: () => _goToAdvancedSettingsPage('configure-display') }), _jsx(SettingItem, { icon: _jsx(FaFilter, {}), title: t('explorer.filters'), onClick: () => {
|
|
48
48
|
/* TODO: not implemented yet */
|
|
49
49
|
} }), _jsx(SettingItem, { icon: _jsx(FaSortAlphaDown, {}), title: t('explorer.sort'), onClick: () => {
|
|
50
50
|
/* TODO: not implemented yet */
|
|
51
|
-
} })] })] })), currentPage === 'display
|
|
51
|
+
} })] })] })), currentPage === 'configure-display' && _jsx(ConfigureDisplay, { libraryId: library })] }));
|
|
52
52
|
};
|
|
53
53
|
//# sourceMappingURL=SettingsPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsPanel.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/router-menu/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,e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AC,mBAAmB,CAAC,EAAU,CAAC;gBACpF,gBAAgB,CAAC,SAAS,CAAC,CAAC;YAChC,CAAC;SACJ,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,8BAA8B;IAE9B,OAAO,CACH,MAAC,uBAAuB,eACnB,WAAW,KAAK,aAAa,IAAI,CAC9B,0BACI,KAAC,aAAa,CAAC,KAAK,IAAC,KAAK,EAAC,IAAI,YAAE,CAAC,CAAC,sBAAsB,CAAC,GAAuB,EACjF,MAAC,uBAAuB,eACpB,KAAC,WAAW,IACR,IAAI,EAAE,KAAC,MAAM,KAAG,EAChB,KAAK,EAAE,CAAC,CAAC,4BAA4B,CAAC,EACtC,OAAO,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,mBAAmB,CAAC,GAC/D,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,mBAAmB,IAAI,KAAC,gBAAgB,IAAC,SAAS,EAAE,OAAO,GAAI,IAC1D,CAC7B,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Dispatch } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare const viewSettingsInitialState: IViewSettingsState;
|
|
2
|
+
import { IViewSettingsAction, IViewSettingsState } from './viewSettingsReducer';
|
|
4
3
|
export declare const ViewSettingsContext: import("react").Context<{
|
|
5
4
|
view: IViewSettingsState;
|
|
6
5
|
dispatch: Dispatch<IViewSettingsAction>;
|
|
@@ -2,14 +2,10 @@
|
|
|
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 { createContext } from 'react';
|
|
5
|
-
export const viewSettingsInitialState = {
|
|
6
|
-
displayMode: 'table',
|
|
7
|
-
fields: []
|
|
8
|
-
};
|
|
9
5
|
export const ViewSettingsContext = createContext({
|
|
10
6
|
view: null,
|
|
11
7
|
dispatch: () => {
|
|
12
|
-
throw new Error('useViewSettingsContext must be used inside a <
|
|
8
|
+
throw new Error('useViewSettingsContext must be used inside a <ViewSettingsContext.Provider />');
|
|
13
9
|
}
|
|
14
10
|
});
|
|
15
|
-
//# sourceMappingURL=
|
|
11
|
+
//# sourceMappingURL=ViewSettingsContext.js.map
|
package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewSettingsContext.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.tsx"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAW,MAAM,OAAO,CAAC;AAG9C,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"}
|
|
@@ -2,6 +2,6 @@
|
|
|
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 { useContext } from 'react';
|
|
5
|
-
import { ViewSettingsContext } from './
|
|
5
|
+
import { ViewSettingsContext } from './ViewSettingsContext';
|
|
6
6
|
export const useViewSettingsContext = () => useContext(ViewSettingsContext);
|
|
7
7
|
//# sourceMappingURL=useViewSettingsContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useViewSettingsContext.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/store-view-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,uBAAuB,CAAC;AAE1D,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewSettingsInitialState.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,wBAAwB,GAAuB;IACxD,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,EAAE;CACb,CAAC"}
|