@leav/ui 0.3.6-e0c1773 → 0.3.6-e275df8
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 +0 -1
- package/dist/__mocks__/common/attribute.js.map +1 -1
- package/dist/_gqlTypes/index.d.ts +92 -12
- package/dist/_gqlTypes/index.js +77 -7
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/attributes/attributeDetailsFragment.js +0 -1
- package/dist/_queries/attributes/attributeDetailsFragment.js.map +1 -1
- package/dist/_queries/records/createRecordMutation.js +2 -3
- package/dist/_queries/records/createRecordMutation.js.map +1 -1
- package/dist/_queries/records/recordFormAttributeFragment.js +1 -0
- package/dist/_queries/records/recordFormAttributeFragment.js.map +1 -1
- package/dist/_utils/index.js +1 -1
- package/dist/_utils/index.js.map +1 -1
- package/dist/components/CreateDirectory/CreateDirectory.js +0 -2
- package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
- package/dist/components/EditApplication/EditApplicationInfo/EditApplicationInfoForm/EditApplicationInfoForm.js.map +1 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfo.js +0 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfo.js.map +1 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/EditAttributeInfoForm.js +2 -5
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/EditAttributeInfoForm.js.map +1 -1
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/EditTreeInfoForm.d.ts +1 -1
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/EditTreeInfoForm.js.map +1 -1
- package/dist/components/Explorer/DataView.d.ts +6 -3
- package/dist/components/Explorer/DataView.js +21 -11
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +36 -2
- package/dist/components/Explorer/Explorer.js +72 -31
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerToolbar.d.ts +2 -1
- package/dist/components/Explorer/ExplorerToolbar.js +19 -11
- package/dist/components/Explorer/ExplorerToolbar.js.map +1 -1
- package/dist/components/Explorer/TableCell.js +4 -4
- package/dist/components/Explorer/TableCell.js.map +1 -1
- package/dist/components/Explorer/_queries/useExplorerData.d.ts +1 -0
- package/dist/components/Explorer/_queries/useExplorerData.js +9 -1
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +26 -9
- package/dist/components/Explorer/_types.js.map +1 -1
- package/dist/components/Explorer/{useEditAction.d.ts → actions-item/useEditItemAction.d.ts} +7 -4
- package/dist/components/Explorer/{useEditAction.js → actions-item/useEditItemAction.js} +9 -8
- package/dist/components/Explorer/actions-item/useEditItemAction.js.map +1 -0
- package/dist/components/Explorer/{useRemoveAction.d.ts → actions-item/useRemoveItemAction.d.ts} +5 -4
- package/dist/components/Explorer/{useRemoveAction.js → actions-item/useRemoveItemAction.js} +17 -13
- package/dist/components/Explorer/actions-item/useRemoveItemAction.js.map +1 -0
- package/dist/components/Explorer/{useDeactivateMassAction.d.ts → actions-mass/useDeactivateMassAction.d.ts} +5 -4
- package/dist/components/Explorer/{useDeactivateMassAction.js → actions-mass/useDeactivateMassAction.js} +6 -5
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useDeleteLinkValues.d.ts +19 -0
- package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js +85 -0
- package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js.map +1 -0
- package/dist/components/Explorer/{useMassActions.d.ts → actions-mass/useMassActions.d.ts} +2 -3
- package/dist/components/Explorer/{useMassActions.js → actions-mass/useMassActions.js} +8 -8
- package/dist/components/Explorer/actions-mass/useMassActions.js.map +1 -0
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.d.ts +31 -0
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +114 -0
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -0
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.d.ts +20 -0
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js +39 -0
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js.map +1 -0
- package/dist/components/Explorer/actions-primary/usePrimaryActions.d.ts +17 -0
- package/dist/components/Explorer/actions-primary/usePrimaryActions.js +27 -0
- package/dist/components/Explorer/actions-primary/usePrimaryActions.js.map +1 -0
- package/dist/components/Explorer/link-item/LinkModal.d.ts +9 -0
- package/dist/components/Explorer/link-item/LinkModal.js +82 -0
- package/dist/components/Explorer/link-item/LinkModal.js.map +1 -0
- package/dist/components/Explorer/link-item/useLinkMassAction.d.ts +31 -0
- package/dist/components/Explorer/link-item/useLinkMassAction.js +59 -0
- package/dist/components/Explorer/link-item/useLinkMassAction.js.map +1 -0
- package/dist/components/Explorer/list-saved-views/SavedViews.d.ts +2 -0
- package/dist/components/Explorer/list-saved-views/SavedViews.js +74 -0
- package/dist/components/Explorer/list-saved-views/SavedViews.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +8 -1
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.d.ts +17 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js +93 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +1 -2
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +6 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.d.ts +2 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js +4 -3
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.js +4 -4
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.d.ts +3 -3
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js +2 -2
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.d.ts +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js +2 -2
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js +3 -3
- package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +9 -2
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +34 -7
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +9 -50
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/SaveViewModal.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/save-view/SaveViewModal.js +44 -0
- package/dist/components/Explorer/manage-view-settings/save-view/SaveViewModal.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/ViewActionsButtons.d.ts +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/ViewActionsButtons.js +22 -0
- package/dist/components/Explorer/manage-view-settings/save-view/ViewActionsButtons.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js +24 -0
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js +52 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js +20 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useShareView.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js +64 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js +62 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +7 -9
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +10 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +18 -5
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +63 -14
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
- package/dist/components/Explorer/useColumnWidth.d.ts +2 -0
- package/dist/components/Explorer/useColumnWidth.js +3 -2
- package/dist/components/Explorer/useColumnWidth.js.map +1 -1
- package/dist/components/Explorer/useLoadView.d.ts +3 -0
- package/dist/components/Explorer/useLoadView.js +81 -0
- package/dist/components/Explorer/useLoadView.js.map +1 -0
- package/dist/components/Explorer/useSearchInput.js +2 -1
- package/dist/components/Explorer/useSearchInput.js.map +1 -1
- package/dist/components/Explorer/useViewSettingsReducer.js +33 -112
- package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -1
- package/dist/components/ImportModal/ImportModalSelectFileStep/ImportModalSelectFileStep.js +1 -2
- package/dist/components/ImportModal/ImportModalSelectFileStep/ImportModalSelectFileStep.js.map +1 -1
- package/dist/components/LibraryItemsList/DisplayOptions/DisplayOptions.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js +2 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js.map +1 -1
- package/dist/components/LibraryItemsList/MenuView/MenuView.js +1 -1
- package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +1 -0
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +28 -24
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.d.ts +3 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +8 -5
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +7 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.d.ts +5 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.js +28 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useExecuteSaveValueBatchMutation.js +3 -8
- package/dist/components/RecordEdition/EditRecordContent/hooks/useExecuteSaveValueBatchMutation.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +7 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +4 -6
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +1 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +2 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +3 -2
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +3 -2
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.js +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +8 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +7 -9
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js +29 -14
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +2 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -1
- package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js +2 -1
- package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js.map +1 -1
- package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.d.ts +1 -1
- package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.js +2 -2
- package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.js.map +1 -1
- package/dist/locales/en/shared.json +23 -4
- package/dist/locales/fr/shared.json +25 -6
- package/package.json +5 -5
- package/dist/components/Explorer/useCreateAction.d.ts +0 -21
- package/dist/components/Explorer/useCreateAction.js +0 -73
- package/dist/components/Explorer/useCreateAction.js.map +0 -1
- package/dist/components/Explorer/useDeactivateMassAction.js.map +0 -1
- package/dist/components/Explorer/useEditAction.js.map +0 -1
- package/dist/components/Explorer/useMassActions.js.map +0 -1
- package/dist/components/Explorer/usePrimaryActions.d.ts +0 -12
- package/dist/components/Explorer/usePrimaryActions.js +0 -28
- package/dist/components/Explorer/usePrimaryActions.js.map +0 -1
- package/dist/components/Explorer/useRemoveAction.js.map +0 -1
package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
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 { useRef } from 'react';
|
|
2
6
|
import { FaClock, FaTrash } from 'react-icons/fa';
|
|
3
7
|
import styled from 'styled-components';
|
|
4
8
|
import { KitDivider, KitButton } from 'aristid-ds';
|
|
@@ -14,6 +18,7 @@ const FilterDropDownStyledDiv = styled.div `
|
|
|
14
18
|
export const FilterDropDown = ({ filter }) => {
|
|
15
19
|
const { t } = useSharedTranslation();
|
|
16
20
|
const { dispatch } = useViewSettingsContext();
|
|
21
|
+
const selectDropDownRef = useRef(null);
|
|
17
22
|
const onFilterChange = (filterData) => dispatch({
|
|
18
23
|
type: ViewSettingsActionTypes.CHANGE_FILTER_CONFIG,
|
|
19
24
|
payload: filterData
|
|
@@ -30,6 +35,6 @@ export const FilterDropDown = ({ filter }) => {
|
|
|
30
35
|
id: filter.id
|
|
31
36
|
}
|
|
32
37
|
});
|
|
33
|
-
return (_jsxs(FilterDropDownStyledDiv, { children: [_jsx(FilterDropdownContent, { filter: filter, onFilterChange: onFilterChange }), _jsx(KitDivider, { noMargin: true }), _jsx(KitButton, { type: "
|
|
38
|
+
return (_jsxs(FilterDropDownStyledDiv, { children: [_jsx(FilterDropdownContent, { filter: filter, onFilterChange: onFilterChange, selectDropDownRef: selectDropDownRef }), _jsx("div", { ref: selectDropDownRef }), _jsx(KitDivider, { noMargin: true }), _jsx(KitButton, { type: "action", icon: _jsx(FaClock, {}), onClick: _onResetFilter, children: t('explorer.reset-filter') }), _jsx(KitButton, { type: "action", icon: _jsx(FaTrash, {}), onClick: _onDeleteFilter, children: t('global.delete') })] }));
|
|
34
39
|
};
|
|
35
40
|
//# sourceMappingURL=FilterDropDown.js.map
|
package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"FilterDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoC,MAAM,EAAC,MAAM,OAAO,CAAC;AAChE,OAAO,EAAC,OAAO,EAAE,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AAEjD,OAAO,EAAC,uBAAuB,EAAC,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAC,sBAAsB,EAAC,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAE9D,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIzC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAA4C,CAAC,EAAC,MAAM,EAAC,EAAE,EAAE;IAChF,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,QAAQ,EAAC,GAAG,sBAAsB,EAAE,CAAC;IAC5C,MAAM,iBAAiB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEvD,MAAM,cAAc,GAAmE,CACnF,UAA0B,EAC5B,EAAE,CACA,QAAQ,CAAC;QACL,IAAI,EAAE,uBAAuB,CAAC,oBAAoB;QAClD,OAAO,EAAE,UAAU;KACtB,CAAC,CAAC;IAEP,MAAM,cAAc,GAAgD,GAAG,EAAE,CACrE,QAAQ,CAAC;QACL,IAAI,EAAE,uBAAuB,CAAC,YAAY;QAC1C,OAAO,EAAE;YACL,EAAE,EAAE,MAAM,CAAC,EAAE;SAChB;KACJ,CAAC,CAAC;IAEP,MAAM,eAAe,GAAgD,GAAG,EAAE,CACtE,QAAQ,CAAC;QACL,IAAI,EAAE,uBAAuB,CAAC,aAAa;QAC3C,OAAO,EAAE;YACL,EAAE,EAAE,MAAM,CAAC,EAAE;SAChB;KACJ,CAAC,CAAC;IAEP,OAAO,CACH,MAAC,uBAAuB,eACpB,KAAC,qBAAqB,IAClB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,GACtC,EACF,cAAK,GAAG,EAAE,iBAAiB,GAAI,EAC/B,KAAC,UAAU,IAAC,QAAQ,SAAG,EACvB,KAAC,SAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAE,KAAC,OAAO,KAAG,EAAE,OAAO,EAAE,cAAc,YAC9D,CAAC,CAAC,uBAAuB,CAAC,GACnB,EACZ,KAAC,SAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAE,KAAC,OAAO,KAAG,EAAE,OAAO,EAAE,eAAe,YAC/D,CAAC,CAAC,eAAe,CAAC,GACX,IACU,CAC7B,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
1
|
+
import { FunctionComponent, RefObject } from 'react';
|
|
2
2
|
import { ExplorerFilter } from '../../../_types';
|
|
3
3
|
export declare const FilterDropdownContent: FunctionComponent<{
|
|
4
4
|
filter: ExplorerFilter;
|
|
5
5
|
onFilterChange: (filterData: ExplorerFilter) => void;
|
|
6
|
+
selectDropDownRef?: RefObject<HTMLDivElement>;
|
|
6
7
|
removeThroughCondition?: boolean;
|
|
7
8
|
}>;
|
|
@@ -13,11 +13,12 @@ import { LinkAttributeDropDown } from './LinkAttributeDropdown';
|
|
|
13
13
|
import { NumericAttributeDropDown } from './NumericAttributeDropDown';
|
|
14
14
|
import { TextAttributeDropDown } from './TextAttributeDropDown';
|
|
15
15
|
import { isExplorerFilterLink, isExplorerFilterThrough, isExplorerFilterStandard } from '../../../_types';
|
|
16
|
-
export const FilterDropdownContent = ({ filter, onFilterChange, removeThroughCondition = false }) => {
|
|
16
|
+
export const FilterDropdownContent = ({ filter, onFilterChange, selectDropDownRef, removeThroughCondition = false }) => {
|
|
17
17
|
if (isExplorerFilterStandard(filter)) {
|
|
18
18
|
const commonDropDownProps = {
|
|
19
19
|
filter,
|
|
20
|
-
onFilterChange
|
|
20
|
+
onFilterChange,
|
|
21
|
+
selectDropDownRef
|
|
21
22
|
};
|
|
22
23
|
const standardFormatDropdown = {
|
|
23
24
|
[AttributeFormat.text]: _jsx(TextAttributeDropDown, { ...commonDropDownProps }),
|
|
@@ -33,7 +34,7 @@ export const FilterDropdownContent = ({ filter, onFilterChange, removeThroughCon
|
|
|
33
34
|
return standardFormatDropdown[filter.attribute.format ?? AttributeFormat.text];
|
|
34
35
|
}
|
|
35
36
|
if (isExplorerFilterLink(filter) || isExplorerFilterThrough(filter)) {
|
|
36
|
-
return (_jsx(LinkAttributeDropDown, { filter: filter, onFilterChange: onFilterChange, removeThroughCondition: removeThroughCondition }));
|
|
37
|
+
return (_jsx(LinkAttributeDropDown, { filter: filter, onFilterChange: onFilterChange, removeThroughCondition: removeThroughCondition, selectDropDownRef: selectDropDownRef }));
|
|
37
38
|
}
|
|
38
39
|
return _jsx(_Fragment, {});
|
|
39
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterDropdownContent.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,0BAA0B,EAAC,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAC,0BAA0B,EAAC,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAC,yBAAyB,EAAC,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAiB,oBAAoB,EAAE,uBAAuB,EAAE,wBAAwB,EAAC,MAAM,iBAAiB,CAAC;AAExH,MAAM,CAAC,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"FilterDropdownContent.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,0BAA0B,EAAC,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAC,0BAA0B,EAAC,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAC,yBAAyB,EAAC,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAC,qBAAqB,EA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MAAM,CAAC,SAAS,CAAC,MAAM,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;IACnF,CAAC;IAED,IAAI,oBAAoB,CAAC,MAAM,CAAC,IAAI,uBAAuB,CAAC,MAAM,CAAC,EAAE,CAAC;QAClE,OAAO,CACH,KAAC,qBAAqB,IAClB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,cAAc,EAC9B,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,GACtC,CACL,CAAC;IACN,CAAC;IAED,OAAO,mBAAK,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -16,7 +16,7 @@ import { FilterDropdownContent } from './FilterDropdownContent';
|
|
|
16
16
|
const InputStyled = styled(KitInput) `
|
|
17
17
|
width: 100%;
|
|
18
18
|
`;
|
|
19
|
-
export const LinkAttributeDropDown = ({ filter, onFilterChange, removeThroughCondition = false }) => {
|
|
19
|
+
export const LinkAttributeDropDown = ({ filter, onFilterChange, selectDropDownRef, removeThroughCondition = false }) => {
|
|
20
20
|
const { t } = useSharedTranslation();
|
|
21
21
|
const { lang } = useLang();
|
|
22
22
|
const { conditionOptionsByType } = useConditionsOptionsByType(filter);
|
|
@@ -41,7 +41,7 @@ export const LinkAttributeDropDown = ({ filter, onFilterChange, removeThroughCon
|
|
|
41
41
|
useEffect(() => {
|
|
42
42
|
if (filter.condition === ThroughConditionFilter.THROUGH && filter.attribute.linkedLibrary?.id) {
|
|
43
43
|
getLibraryAttributes({
|
|
44
|
-
variables: {
|
|
44
|
+
variables: { libraryId: filter.attribute.linkedLibrary.id }
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
}, [filter.condition, filter.attribute, getLibraryAttributes]);
|
|
@@ -65,7 +65,7 @@ export const LinkAttributeDropDown = ({ filter, onFilterChange, removeThroughCon
|
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
67
|
const linkedAttribute = libraryLinkAttributes.find(attribute => attribute.id === selectedSubField);
|
|
68
|
-
return (_jsxs(_Fragment, { children: [_jsx(KitSelect, { options: availableConditionsOptions, onChange: _onConditionChanged, value: filter.condition, "aria-label": String(t('explorer.filter-link-condition')) }), showSearch && (_jsx(InputStyled, { placeholder: String(t('explorer.type-a-value')), value: filter.value ?? undefined, onChange: _onInputChanged })), filter.condition === AttributeConditionFilter.THROUGH && (_jsxs(_Fragment, { children: [_jsx(KitSelect, { options: linkAttributesOptions, onChange: _onSubFieldAttributeChange, value: libraryAttributesLoading ? null : selectedSubField, placeholder: libraryAttributesLoading ? t('global.loading') : null, loading: libraryAttributesLoading, "aria-label": String(t('explorer.filter-link-attribute')) }), selectedSubField && linkedAttribute && (_jsx(FilterDropdownContent, { removeThroughCondition: true, filter: {
|
|
68
|
+
return (_jsxs(_Fragment, { children: [_jsx(KitSelect, { options: availableConditionsOptions, onChange: _onConditionChanged, value: filter.condition, getPopupContainer: () => selectDropDownRef?.current ?? document.body, "aria-label": String(t('explorer.filter-link-condition')) }), showSearch && (_jsx(InputStyled, { placeholder: String(t('explorer.type-a-value')), value: filter.value ?? undefined, onChange: _onInputChanged })), filter.condition === AttributeConditionFilter.THROUGH && (_jsxs(_Fragment, { children: [_jsx(KitSelect, { options: linkAttributesOptions, onChange: _onSubFieldAttributeChange, value: libraryAttributesLoading ? null : selectedSubField, placeholder: libraryAttributesLoading ? t('global.loading') : null, loading: libraryAttributesLoading, getPopupContainer: () => selectDropDownRef?.current ?? document.body, "aria-label": String(t('explorer.filter-link-attribute')) }), selectedSubField && linkedAttribute && (_jsx(FilterDropdownContent, { removeThroughCondition: true, filter: {
|
|
69
69
|
id: filter.id,
|
|
70
70
|
field: selectedSubField,
|
|
71
71
|
attribute: {
|
|
@@ -74,6 +74,6 @@ export const LinkAttributeDropDown = ({ filter, onFilterChange, removeThroughCon
|
|
|
74
74
|
},
|
|
75
75
|
condition: filter.subCondition,
|
|
76
76
|
value: filter.value
|
|
77
|
-
}, onFilterChange: _handleThroughFilterChange }))] }))] }));
|
|
77
|
+
}, onFilterChange: _handleThroughFilterChange, selectDropDownRef: selectDropDownRef }))] }))] }));
|
|
78
78
|
};
|
|
79
79
|
//# sourceMappingURL=LinkAttributeDropdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkAttributeDropdown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAyC,uBAAuB,EAAC,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAC,wBAAwB,EAAE,sBAAsB,EAAC,MAAM,WAAW,CAAC;AAC3E,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,gCAAgC,EAAC,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAG9D,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;;CAEnC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAwD,CAAC,EACvF,MAAM,EACN,cAAc,EACd,sBAAsB,GAAG,KAAK,EACjC,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,IAAI,EAAC,GAAG,OAAO,EAAE,CAAC;IAEzB,MAAM,EAAC,sBAAsB,EAAC,GAAG,0BAA0B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C,CAAC;IACpG,CAAC,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,MAAM,CAAC,SAAS,KAAK,sBAAsB,CAAC,OAAO,IAAI,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,EAAE,EAAE,CAAC;YAC5F,oBAAoB,CAAC;gBACjB,SAAS,EAAE,EAAC,
|
|
1
|
+
{"version":3,"file":"LinkAttributeDropdown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAyC,uBAAuB,EAAC,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAC,wBAAwB,EAAE,sBAAsB,EAAC,MAAM,WAAW,CAAC;AAC3E,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,gCAAgC,EAAC,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAG9D,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;;CAEnC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAwD,CAAC,EACvF,MAAM,EACN,cAAc,EACd,iBAAiB,EACjB,sBAAsB,GAAG,KAAK,EACjC,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAA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AE,gBAAgB;4BACvB,SAAS,EAAE;gCACP,GAAG,eAAe;gCAClB,KAAK,EAAE,oBAAoB,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE;6BACjE;4BACD,SAAS,EAAE,MAAM,CAAC,YAAY;4BAC9B,KAAK,EAAE,MAAM,CAAC,KAAK;yBACtB,EACD,cAAc,EAAE,0BAA0B,EAC1C,iBAAiB,EAAE,iBAAiB,GACtC,CACL,IACF,CACN,IACF,CACN,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -7,13 +7,13 @@ import { useConditionsOptionsByType } from './useConditionOptionsByType';
|
|
|
7
7
|
const InputNumberStyled = styled(KitInputNumber) `
|
|
8
8
|
width: 100%;
|
|
9
9
|
`;
|
|
10
|
-
export const NumericAttributeDropDown = ({ filter, onFilterChange }) => {
|
|
10
|
+
export const NumericAttributeDropDown = ({ filter, onFilterChange, selectDropDownRef }) => {
|
|
11
11
|
const { t } = useSharedTranslation();
|
|
12
12
|
const { conditionOptionsByType } = useConditionsOptionsByType(filter);
|
|
13
13
|
const _onConditionChanged = condition => onFilterChange({ ...filter, condition });
|
|
14
14
|
const _onInputChanged = value => onFilterChange({ ...filter, value: value === null ? null : String(value) });
|
|
15
15
|
const showInput = filter.condition !== AttributeConditionFilter.IS_EMPTY &&
|
|
16
16
|
filter.condition !== AttributeConditionFilter.IS_NOT_EMPTY;
|
|
17
|
-
return (_jsxs(_Fragment, { children: [_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition }), showInput && (_jsx(InputNumberStyled, { placeholder: String(t('explorer.type-a-value')), value: filter.value, onChange: _onInputChanged }))] }));
|
|
17
|
+
return (_jsxs(_Fragment, { children: [_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, getPopupContainer: () => selectDropDownRef?.current ?? document.body }), showInput && (_jsx(InputNumberStyled, { placeholder: String(t('explorer.type-a-value')), value: filter.value, onChange: _onInputChanged }))] }));
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=NumericAttributeDropDown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumericAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,cAAc,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AACrD,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAC;AACnD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,iBAAiB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;;CAE/C,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAoD,CAAC,
|
|
1
|
+
{"version":3,"file":"NumericAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,cAAc,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AACrD,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAC;AACnD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,iBAAiB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;;CAE/C,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAoD,CAAC,EACtF,MAAM,EACN,cAAc,EACd,iBAAiB,EACpB,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,EAAC,sBAAsB,EAAC,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAEpE,MAAM,mBAAmB,GAAiD,SAAS,CAAC,EAAE,CAClF,cAAc,CAAC,EAAC,GAAG,MAAM,EAAE,SAAS,EAAC,CAAC,CAAC;IAE3C,MAAM,eAAe,GAAsD,KAAK,CAAC,EAAE,CAC/E,cAAc,CAAC,EAAC,GAAG,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC,CAAC,CAAC;IAE9E,MAAM,SAAS,GACX,MAAM,CAAC,SAAS,KAAK,wBAAwB,CAAC,QAAQ;QACtD,MAAM,CAAC,SAAS,KAAK,wBAAwB,CAAC,YAAY,CAAC;IAE/D,OAAO,CACH,8BACI,KAAC,SAAS,IACN,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,mBAAmB,EAC7B,KAAK,EAAE,MAAM,CAAC,SAAS,EACvB,iBAAiB,EAAE,GAAG,EAAE,CAAC,iBAAiB,EAAE,OAAO,IAAI,QAAQ,CAAC,IAAI,GACtE,EACD,SAAS,IAAI,CACV,KAAC,iBAAiB,IACd,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,EAC/C,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,QAAQ,EAAE,eAAe,GAC3B,CACL,IACF,CACN,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { useConditionsOptionsByType } from './useConditionOptionsByType';
|
|
|
7
7
|
const InputStyled = styled(KitInput) `
|
|
8
8
|
width: 100%;
|
|
9
9
|
`;
|
|
10
|
-
export const TextAttributeDropDown = ({ filter, onFilterChange }) => {
|
|
10
|
+
export const TextAttributeDropDown = ({ filter, onFilterChange, selectDropDownRef }) => {
|
|
11
11
|
const { t } = useSharedTranslation();
|
|
12
12
|
const { conditionOptionsByType } = useConditionsOptionsByType(filter);
|
|
13
13
|
const _onConditionChanged = condition => {
|
|
@@ -23,6 +23,6 @@ export const TextAttributeDropDown = ({ filter, onFilterChange }) => {
|
|
|
23
23
|
};
|
|
24
24
|
const showSearch = filter.condition !== AttributeConditionFilter.IS_EMPTY &&
|
|
25
25
|
filter.condition !== AttributeConditionFilter.IS_NOT_EMPTY;
|
|
26
|
-
return (_jsxs(_Fragment, { children: [_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, "aria-label": String(t('explorer.filter-condition')) }), showSearch && (_jsx(InputStyled, { placeholder: String(t('explorer.type-a-value')), value: filter.value ?? undefined, onChange: _onInputChanged }))] }));
|
|
26
|
+
return (_jsxs(_Fragment, { children: [_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, getPopupContainer: () => selectDropDownRef?.current ?? document.body, "aria-label": String(t('explorer.filter-condition')) }), showSearch && (_jsx(InputStyled, { placeholder: String(t('explorer.type-a-value')), value: filter.value ?? undefined, onChange: _onInputChanged }))] }));
|
|
27
27
|
};
|
|
28
28
|
//# sourceMappingURL=TextAttributeDropDown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAC;AACnD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;;CAEnC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAoD,CAAC,
|
|
1
|
+
{"version":3,"file":"TextAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAC;AACnD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;;CAEnC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAoD,CAAC,EACnF,MAAM,EACN,cAAc,EACd,iBAAiB,EACpB,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,EAAC,sBAAsB,EAAC,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAEpE,MAAM,mBAAmB,GAAiD,SAAS,CAAC,EAAE;QAClF,cAAc,CAAC,EAAC,GAAG,MAAM,EAAE,SAAS,EAAC,CAAC,CAAC;IAC3C,CAAC,CAAC;IAEF,kBAAkB;IAClB,MAAM,eAAe,GAAgD,KAAK,CAAC,EAAE;QACzE,MAAM,uBAAuB,GACzB,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;QAC9F,IAAI,uBAAuB,EAAE,CAAC;YAC1B,OAAO;QACX,CAAC;QACD,cAAc,CAAC,EAAC,GAAG,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAC,CAAC,CAAC;IACpG,CAAC,CAAC;IAEF,MAAM,UAAU,GACZ,MAAM,CAAC,SAAS,KAAK,wBAAwB,CAAC,QAAQ;QACtD,MAAM,CAAC,SAAS,KAAK,wBAAwB,CAAC,YAAY,CAAC;IAE/D,OAAO,CACH,8BACI,KAAC,SAAS,IACN,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,mBAAmB,EAC7B,KAAK,EAAE,MAAM,CAAC,SAAS,EACvB,iBAAiB,EAAE,GAAG,EAAE,CAAC,iBAAiB,EAAE,OAAO,IAAI,QAAQ,CAAC,IAAI,gBACxD,MAAM,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,GACpD,EACD,UAAU,IAAI,CACX,KAAC,WAAW,IACR,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,EAC/C,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,SAAS,EAChC,QAAQ,EAAE,eAAe,GAC3B,CACL,IACF,CACN,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
1
2
|
import { IExplorerFilterStandard, IExplorerFilterLink, IExplorerFilterThrough } from '../../../_types';
|
|
2
3
|
export interface IFilterChildrenDropDownProps {
|
|
3
4
|
filter: IExplorerFilterStandard;
|
|
4
5
|
onFilterChange: (filterData: IExplorerFilterStandard) => void;
|
|
6
|
+
selectDropDownRef?: RefObject<HTMLDivElement>;
|
|
5
7
|
}
|
|
6
8
|
export interface IFilterChildrenLinkDropDownProps {
|
|
7
9
|
filter: IExplorerFilterLink | IExplorerFilterThrough;
|
|
8
10
|
onFilterChange: (filterData: IExplorerFilterLink | IExplorerFilterThrough) => void;
|
|
9
11
|
removeThroughCondition: boolean;
|
|
12
|
+
selectDropDownRef?: RefObject<HTMLDivElement>;
|
|
10
13
|
}
|
package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.d.ts
CHANGED
|
@@ -4,12 +4,12 @@ interface IActiveSettings {
|
|
|
4
4
|
title: string;
|
|
5
5
|
onClickLeftButton?: () => void;
|
|
6
6
|
}
|
|
7
|
-
export type SettingsPanelPages = 'router-menu' | 'configure-display' | 'sort-items' | 'filter-items';
|
|
7
|
+
export type SettingsPanelPages = 'router-menu' | 'configure-display' | 'sort-items' | 'filter-items' | 'my-views';
|
|
8
8
|
export interface IEditSettingsContext {
|
|
9
9
|
setActiveSettings: (params: IActiveSettings) => void;
|
|
10
10
|
activeSettings: null | IActiveSettings;
|
|
11
|
-
panelElement: Element | DocumentFragment | null;
|
|
12
|
-
|
|
11
|
+
panelElement: (() => Element | DocumentFragment) | null;
|
|
12
|
+
closeSettingsPanel: () => void;
|
|
13
13
|
}
|
|
14
14
|
export declare const EditSettingsContext: import("react").Context<IEditSettingsContext>;
|
|
15
15
|
export {};
|
package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js
CHANGED
|
@@ -8,8 +8,8 @@ export const EditSettingsContext = createContext({
|
|
|
8
8
|
},
|
|
9
9
|
activeSettings: null,
|
|
10
10
|
panelElement: null,
|
|
11
|
-
|
|
12
|
-
throw new Error('
|
|
11
|
+
closeSettingsPanel: () => {
|
|
12
|
+
throw new Error('Element must be wrapped into EditSettingsContextProvider');
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
//# sourceMappingURL=EditSettingsContext.js.map
|
package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map
CHANGED
|
@@ -1 +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;AAiB/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,
|
|
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;AAiB/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,kBAAkB,EAAE,GAAG,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAChF,CAAC;CACJ,CAAC,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { FunctionComponent } from 'react';
|
|
|
2
2
|
import { IEditSettingsContext } from './EditSettingsContext';
|
|
3
3
|
interface IEditSettingsContextProviderProps {
|
|
4
4
|
panelElement?: IEditSettingsContext['panelElement'];
|
|
5
|
+
children: React.ReactNode;
|
|
5
6
|
}
|
|
6
7
|
export declare const EditSettingsContextProvider: FunctionComponent<IEditSettingsContextProviderProps>;
|
|
7
8
|
export {};
|
|
@@ -6,12 +6,12 @@ import { useState } from 'react';
|
|
|
6
6
|
import { EditSettingsContext } from './EditSettingsContext';
|
|
7
7
|
export const EditSettingsContextProvider = ({ children, panelElement }) => {
|
|
8
8
|
const [activeSettings, setActiveSettings] = useState(null);
|
|
9
|
-
const
|
|
9
|
+
const closeSettingsPanel = () => setActiveSettings(null);
|
|
10
10
|
return (_jsx(EditSettingsContext.Provider, { value: {
|
|
11
11
|
activeSettings,
|
|
12
12
|
setActiveSettings,
|
|
13
13
|
panelElement: panelElement ?? null,
|
|
14
|
-
|
|
14
|
+
closeSettingsPanel
|
|
15
15
|
}, children: children }));
|
|
16
16
|
};
|
|
17
17
|
//# sourceMappingURL=EditSettingsContextProvider.js.map
|
|
@@ -1 +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;
|
|
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;AAOhF,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,kBAAkB,GAAG,GAAG,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAEzD,OAAO,CACH,KAAC,mBAAmB,CAAC,QAAQ,IACzB,KAAK,EAAE;YACH,cAAc;YACd,iBAAiB;YACjB,YAAY,EAAE,YAAY,IAAI,IAAI;YAClC,kBAAkB;SACrB,YAEA,QAAQ,GACkB,CAClC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { useEditSettings } from './useEditSettings';
|
|
|
4
4
|
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
5
5
|
export const SidePanel = () => {
|
|
6
6
|
const { t } = useSharedTranslation();
|
|
7
|
-
const { activeSettings,
|
|
7
|
+
const { activeSettings, closeSettingsPanel } = useEditSettings();
|
|
8
8
|
if (!activeSettings) {
|
|
9
9
|
return null;
|
|
10
10
|
}
|
|
@@ -12,8 +12,8 @@ export const SidePanel = () => {
|
|
|
12
12
|
const makeA11yBackButton = {
|
|
13
13
|
title: String(t('explorer.back')) /* TODO: avoid transform null to 'null' */
|
|
14
14
|
};
|
|
15
|
-
return (_jsx(KitSidePanel, { initialOpen: true, floating: true, closable: true, closeOnEsc: true,
|
|
15
|
+
return (_jsx(KitSidePanel, { initialOpen: true, floating: true, closable: true, closeOnEsc: true, idCardProps: { title: activeSettings.title }, leftActionProps: activeSettings.onClickLeftButton
|
|
16
16
|
? { onClick: activeSettings.onClickLeftButton, ...makeA11yBackButton }
|
|
17
|
-
: undefined, onClose:
|
|
17
|
+
: undefined, onClose: closeSettingsPanel, children: activeSettings.content }));
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=SidePanel.js.map
|
|
@@ -1 +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,
|
|
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,kBAAkB,EAAC,GAAG,eAAe,EAAE,CAAC;IAE/D,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,WAAW,QACX,QAAQ,QACR,QAAQ,QACR,UAAU,QACV,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,kBAAkB,YAE1B,cAAc,CAAC,OAAO,GACZ,CAClB,CAAC;AACN,CAAC,CAAC"}
|
package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { SettingsPanelPages } from './EditSettingsContext';
|
|
2
|
-
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { IViewSettingsState } from '../store-view-settings/viewSettingsReducer';
|
|
4
|
+
import { FeatureHook } from '../../_types';
|
|
5
|
+
export declare const useOpenViewSettings: ({ view, isEnabled }: FeatureHook<{
|
|
6
|
+
view: IViewSettingsState;
|
|
7
|
+
}>) => {
|
|
3
8
|
openSettingsPanel: (pageName?: SettingsPanelPages) => void;
|
|
4
|
-
viewSettingsButton:
|
|
9
|
+
viewSettingsButton: ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
10
|
+
viewListButton: ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
11
|
+
viewName: string;
|
|
5
12
|
};
|
package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js
CHANGED
|
@@ -1,20 +1,39 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
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 { KitButton } from 'aristid-ds';
|
|
6
|
-
import { FaSlidersH } from 'react-icons/fa';
|
|
5
|
+
import { KitButton, KitTag } from 'aristid-ds';
|
|
6
|
+
import { FaBars, FaSlidersH } from 'react-icons/fa';
|
|
7
7
|
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
8
8
|
import { SettingsPanel } from '../router-menu/SettingsPanel';
|
|
9
9
|
import { useEditSettings } from './useEditSettings';
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
import { localizedTranslation } from '@leav/utils';
|
|
11
|
+
import { useLang } from '../../../../hooks';
|
|
12
|
+
import { useEffect, useState } from 'react';
|
|
13
|
+
import styled from 'styled-components';
|
|
14
|
+
import { MASS_SELECTION_ALL } from '../../_constants';
|
|
15
|
+
const ModifiedStyledKitTag = styled(KitTag) `
|
|
16
|
+
margin: 0;
|
|
17
|
+
`;
|
|
18
|
+
export const useOpenViewSettings = ({ view, isEnabled = true }) => {
|
|
19
|
+
const { activeSettings, setActiveSettings, closeSettingsPanel } = useEditSettings();
|
|
20
|
+
const [button, setButton] = useState(null);
|
|
21
|
+
const [viewListButton, setViewListButton] = useState(null);
|
|
12
22
|
const { t } = useSharedTranslation();
|
|
23
|
+
const { lang } = useLang();
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (!isEnabled) {
|
|
26
|
+
closeSettingsPanel();
|
|
27
|
+
}
|
|
28
|
+
return () => {
|
|
29
|
+
closeSettingsPanel();
|
|
30
|
+
};
|
|
31
|
+
}, [isEnabled]);
|
|
13
32
|
const rootPanel = { pageName: 'router-menu', title: t('explorer.settings') };
|
|
14
33
|
const _changePanelPage = ({ pageName, title, onClickLeftButton }) => {
|
|
15
34
|
setActiveSettings({
|
|
16
35
|
...activeSettings,
|
|
17
|
-
content: _jsx(SettingsPanel, { library:
|
|
36
|
+
content: _jsx(SettingsPanel, { library: view.libraryId, page: pageName }),
|
|
18
37
|
title,
|
|
19
38
|
onClickLeftButton
|
|
20
39
|
});
|
|
@@ -31,9 +50,17 @@ export const useOpenViewSettings = (library) => {
|
|
|
31
50
|
}
|
|
32
51
|
_changePanelPage(chanelPageParams);
|
|
33
52
|
};
|
|
53
|
+
const viewName = localizedTranslation(view?.viewLabels ?? {}, lang);
|
|
54
|
+
const isMassSelectionAll = view.massSelection === MASS_SELECTION_ALL;
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
setButton(_jsx(KitButton, { type: "secondary", icon: _jsx(FaSlidersH, {}), onClick: () => _openSettingsPanel(), disabled: isMassSelectionAll, title: String(t('explorer.settings')) /* TODO: avoid transform null to 'null' */ }));
|
|
57
|
+
setViewListButton(_jsxs(KitButton, { type: "secondary", icon: _jsx(FaBars, {}), onClick: () => _openSettingsPanel('my-views'), disabled: isMassSelectionAll, title: String(t('explorer.manage-views')) /* TODO: avoid transform null to 'null' */, children: [viewName === '' ? t('explorer.manage-views') : viewName, view.viewModified && (_jsx(ModifiedStyledKitTag, { type: "error", idCardProps: { description: String(t('explorer.modified')) } }))] }));
|
|
58
|
+
}, [view.viewModified, viewName, isMassSelectionAll]);
|
|
34
59
|
return {
|
|
35
60
|
openSettingsPanel: _openSettingsPanel,
|
|
36
|
-
viewSettingsButton:
|
|
61
|
+
viewSettingsButton: button,
|
|
62
|
+
viewListButton,
|
|
63
|
+
viewName: viewName === '' ? t('explorer.default-view') : viewName
|
|
37
64
|
};
|
|
38
65
|
};
|
|
39
66
|
//# sourceMappingURL=useOpenViewSettings.js.map
|
package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOpenViewSettings.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"useOpenViewSettings.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAE,MAAM,EAAC,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAe,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAExD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAC,k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,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,EAAC,GAAI,CACpG,IACO,CACf,CAAC;IACN,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAEtD,OAAO;QACH,iBAAiB,EAAE,kBAAkB;QACrC,kBAAkB,EAAE,MAAM;QAC1B,cAAc;QACd,QAAQ,EAAE,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,QAAQ;KACpE,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -3,75 +3,34 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
// This file is released under LGPL V3
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
5
|
import styled from 'styled-components';
|
|
6
|
-
import {
|
|
7
|
-
import { FaFilter, FaList,
|
|
6
|
+
import { KitInput, KitTypography } from 'aristid-ds';
|
|
7
|
+
import { FaFilter, FaList, FaSortAlphaDown } from 'react-icons/fa';
|
|
8
8
|
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
9
9
|
import { ConfigureDisplay } from '../configure-display/ConfigureDisplay';
|
|
10
10
|
import { SortItems } from '../sort-items/SortItems';
|
|
11
11
|
import { SettingItem } from './SettingItem';
|
|
12
12
|
import { FilterItems } from '../filter-items/FilterItems';
|
|
13
13
|
import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
|
|
14
|
-
import useExecuteSaveViewMutation from '../../../../hooks/useExecuteSaveViewMutation';
|
|
15
|
-
import { useLang } from '../../../../hooks';
|
|
16
|
-
import { mapViewTypeFromExplorerToLegacy } from '../../_constants';
|
|
17
|
-
import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
|
|
18
14
|
import { useOpenViewSettings } from '../open-view-settings/useOpenViewSettings';
|
|
19
|
-
import {
|
|
15
|
+
import { SavedViews } from '../../list-saved-views/SavedViews';
|
|
16
|
+
import { ViewActionsButtons } from '../save-view/ViewActionsButtons';
|
|
20
17
|
const ContentWrapperStyledDiv = styled.div `
|
|
21
18
|
display: flex;
|
|
22
19
|
flex-direction: column;
|
|
23
|
-
gap: calc(var(--general-spacing-s) * 1px);
|
|
24
20
|
justify-content: space-between;
|
|
25
21
|
height: 100%;
|
|
26
22
|
`;
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
justify-content: center;
|
|
30
|
-
gap: calc(var(--general-spacing-xs) * 1px);
|
|
31
|
-
padding: calc(var(--general-spacing-xxs) * 1px) 0;
|
|
23
|
+
const ViewNameStyledKitInput = styled(KitInput) `
|
|
24
|
+
margin-bottom: calc(var(--general-spacing-s) * 1px);
|
|
32
25
|
`;
|
|
33
26
|
const ConfigurationStyledMenu = styled.menu `
|
|
34
27
|
padding: 0;
|
|
35
28
|
`;
|
|
36
29
|
export const SettingsPanel = ({ library, page = 'router-menu' }) => {
|
|
37
30
|
const { t } = useSharedTranslation();
|
|
38
|
-
const {
|
|
39
|
-
const { openSettingsPanel } = useOpenViewSettings(
|
|
40
|
-
const { view, dispatch } = useViewSettingsContext();
|
|
41
|
-
const { saveView } = useExecuteSaveViewMutation();
|
|
42
|
-
const _handleSaveView = () => {
|
|
43
|
-
saveView({
|
|
44
|
-
view: {
|
|
45
|
-
id: view.viewId,
|
|
46
|
-
library,
|
|
47
|
-
shared: false,
|
|
48
|
-
display: {
|
|
49
|
-
type: mapViewTypeFromExplorerToLegacy[view.viewType]
|
|
50
|
-
},
|
|
51
|
-
filters: view.filters.map(filter => isExplorerFilterThrough(filter)
|
|
52
|
-
? {
|
|
53
|
-
field: `${filter.field}.${filter.subField}`,
|
|
54
|
-
value: filter.value,
|
|
55
|
-
condition: filter.subCondition
|
|
56
|
-
}
|
|
57
|
-
: {
|
|
58
|
-
field: filter.field,
|
|
59
|
-
value: filter.value,
|
|
60
|
-
condition: filter.condition
|
|
61
|
-
}),
|
|
62
|
-
sort: view.sort.map(({ field: attributeId, order }) => ({ field: attributeId, order })),
|
|
63
|
-
attributes: view.attributesIds,
|
|
64
|
-
label: {
|
|
65
|
-
//TODO: add a better label when view management is more advanced
|
|
66
|
-
[defaultLang]: 'user view'
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
const _handleReinitView = () => {
|
|
72
|
-
dispatch({ type: ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS });
|
|
73
|
-
};
|
|
31
|
+
const { view } = useViewSettingsContext();
|
|
32
|
+
const { openSettingsPanel, viewName } = useOpenViewSettings({ view, isEnabled: true });
|
|
74
33
|
// TODO: look for MemoryRouter
|
|
75
|
-
return (_jsxs(ContentWrapperStyledDiv, { children: [page === 'router-menu' && (_jsxs(_Fragment, { children: [_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: () => openSettingsPanel('configure-display') }), view.entrypoint.type === 'library' && (_jsxs(_Fragment, { children: [_jsx(SettingItem, { icon: _jsx(FaFilter, {}), title: t('explorer.filters'), value: String(t('explorer.active-items-number', { count: view.filters.length })), onClick: () => openSettingsPanel('filter-items') }), _jsx(SettingItem, { icon: _jsx(FaSortAlphaDown, {}), title: t('explorer.sort-items'), onClick: () => openSettingsPanel('sort-items') })] }))] })] }),
|
|
34
|
+
return (_jsxs(ContentWrapperStyledDiv, { children: [page === 'router-menu' && (_jsxs(_Fragment, { children: [_jsxs("nav", { children: [_jsx(ViewNameStyledKitInput, { disabled: true, value: viewName }), _jsx(KitTypography.Title, { level: "h4", children: t('explorer.router-menu') }), _jsxs(ConfigurationStyledMenu, { children: [_jsx(SettingItem, { icon: _jsx(FaList, {}), title: t('explorer.configure-display'), onClick: () => openSettingsPanel('configure-display') }), view.entrypoint.type === 'library' && (_jsxs(_Fragment, { children: [_jsx(SettingItem, { icon: _jsx(FaFilter, {}), title: t('explorer.filters'), value: String(t('explorer.active-items-number', { count: view.filters.length })), onClick: () => openSettingsPanel('filter-items') }), _jsx(SettingItem, { icon: _jsx(FaSortAlphaDown, {}), title: t('explorer.sort-items'), onClick: () => openSettingsPanel('sort-items') })] }))] })] }), _jsx(ViewActionsButtons, {})] })), page === 'configure-display' && _jsx(ConfigureDisplay, { libraryId: library }), page === 'sort-items' && _jsx(SortItems, { libraryId: library }), page === 'filter-items' && _jsx(FilterItems, { libraryId: library }), page === 'my-views' && _jsx(SavedViews, {})] }));
|
|
76
35
|
};
|
|
77
36
|
//# sourceMappingURL=SettingsPanel.js.map
|
|
@@ -1 +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;AAEvC,OAAO,EAAC,
|
|
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;AAEvC,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC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AC,GACvD,EACD,IAAI,CAAC,UAAU,CAAC,IAAI,KAAK,SAAS,IAAI,CACnC,8BACI,KAAC,WAAW,IACR,IAAI,EAAE,KAAC,QAAQ,KAAG,EAClB,KAAK,EAAE,CAAC,CAAC,kBAAkB,CAAC,EAC5B,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,8BAA8B,EAAE,EAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAC,CAAC,CAAC,EAC9E,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,cAAc,CAAC,GAClD,EACF,KAAC,WAAW,IACR,IAAI,EAAE,KAAC,eAAe,KAAG,EACzB,KAAK,EAAE,CAAC,CAAC,qBAAqB,CAAC,EAC/B,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,YAAY,CAAC,GAChD,IACH,CACN,IACqB,IACxB,EACN,KAAC,kBAAkB,KAAG,IACvB,CACN,EACA,IAAI,KAAK,mBAAmB,IAAI,KAAC,gBAAgB,IAAC,SAAS,EAAE,OAAO,GAAI,EACxE,IAAI,KAAK,YAAY,IAAI,KAAC,SAAS,IAAC,SAAS,EAAE,OAAO,GAAI,EAC1D,IAAI,KAAK,cAAc,IAAI,KAAC,WAAW,IAAC,SAAS,EAAE,OAAO,GAAI,EAC9D,IAAI,KAAK,UAAU,IAAI,KAAC,UAAU,KAAG,IAChB,CAC7B,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FaTimes, FaSave } from 'react-icons/fa';
|
|
3
|
+
import { KitModal, KitButton, AntForm, KitInputWrapper, KitInput } from 'aristid-ds';
|
|
4
|
+
import { useLang } from '../../../../hooks';
|
|
5
|
+
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
6
|
+
import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
|
|
7
|
+
const sortWithDefaultAtFirst = defaultLang => (a, b) => (b === defaultLang ? 1 : 0) - (a === defaultLang ? 1 : 0);
|
|
8
|
+
export const SaveViewModal = ({ isOpen, onSave, onClose }) => {
|
|
9
|
+
const { t } = useSharedTranslation();
|
|
10
|
+
const { defaultLang, availableLangs } = useLang();
|
|
11
|
+
const { view } = useViewSettingsContext();
|
|
12
|
+
const [form] = AntForm.useForm();
|
|
13
|
+
const _toggleModal = () => {
|
|
14
|
+
if (isOpen) {
|
|
15
|
+
form.resetFields();
|
|
16
|
+
}
|
|
17
|
+
onClose();
|
|
18
|
+
};
|
|
19
|
+
const _handleSaveView = () => {
|
|
20
|
+
form.validateFields();
|
|
21
|
+
const hasError = form.getFieldsError().some(field => field.errors.length > 0);
|
|
22
|
+
const hasOnlyEmptyField = Object.entries(form.getFieldsValue()).some(([language, value]) => language === defaultLang && !value);
|
|
23
|
+
if (hasError || hasOnlyEmptyField) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
onSave(form.getFieldsValue());
|
|
27
|
+
onClose();
|
|
28
|
+
};
|
|
29
|
+
const _onCheck = () => {
|
|
30
|
+
form.validateFields();
|
|
31
|
+
};
|
|
32
|
+
const _preventCloseSettingsPanel = e => e.stopPropagation();
|
|
33
|
+
return (_jsx(KitModal
|
|
34
|
+
// TODO: remove appElement and put in the test : "KitModal.setAppElement(document.body) once exposed"
|
|
35
|
+
, {
|
|
36
|
+
// TODO: remove appElement and put in the test : "KitModal.setAppElement(document.body) once exposed"
|
|
37
|
+
appElement: document.body, title: t('explorer.save-view-as'), showCloseIcon: false, close: _toggleModal, isOpen: isOpen, footer: _jsxs(_Fragment, { children: [_jsx(KitButton, { type: "secondary", onClick: _toggleModal, icon: _jsx(FaTimes, {}), children: t('global.close') }), _jsx(KitButton, { type: "primary", onClick: _handleSaveView, icon: _jsx(FaSave, {}), children: t('global.save') })] }), children: _jsx(AntForm, { name: "label", form: form, initialValues: view.viewId ? view.viewLabels : {}, children: _jsx(KitInputWrapper, { label: String(t('explorer.view-name')), children: [...availableLangs].sort(sortWithDefaultAtFirst(defaultLang)).map(lang => (_jsx(AntForm.Item, { name: lang, rules: [
|
|
38
|
+
{
|
|
39
|
+
required: lang === defaultLang,
|
|
40
|
+
message: String(t('errors.standard_field_required'))
|
|
41
|
+
}
|
|
42
|
+
], children: _jsx(KitInput, { label: lang, required: lang === defaultLang, onMouseDown: _preventCloseSettingsPanel, onBlur: _onCheck }) }, lang))) }) }) }));
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=SaveViewModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SaveViewModal.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/save-view/SaveViewModal.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,OAAO,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AACnF,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,sBAAsB,EAAC,MAAM,+CAA+C,CAAC;AAQrF,MAAM,sBAAsB,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAElH,MAAM,CAAC,MAAM,aAAa,GAAsC,CAAC,EAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAC,EAAE,EAAE;IAC1F,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,M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