@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
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { useRef } from 'react';
|
|
6
|
+
import { closeKitSnackBar, KitButton, KitSpace, AntModal } from 'aristid-ds';
|
|
7
|
+
import styled from 'styled-components';
|
|
8
|
+
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
9
|
+
import { useExplorerLinkAttributeQuery } from '../../../_gqlTypes';
|
|
10
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
11
|
+
import { faXmark } from '@fortawesome/free-solid-svg-icons';
|
|
12
|
+
import { Explorer } from '../Explorer';
|
|
13
|
+
import { useLinkMassAction } from './useLinkMassAction';
|
|
14
|
+
import { useViewSettingsContext } from '../manage-view-settings/store-view-settings/useViewSettingsContext';
|
|
15
|
+
import { EditSettingsContextProvider } from '../manage-view-settings';
|
|
16
|
+
const modalMaxWidth = 1200;
|
|
17
|
+
// TODO: use KitModal instead for explorer first
|
|
18
|
+
const StyledModal = styled(AntModal) `
|
|
19
|
+
&& {
|
|
20
|
+
width: 90vw;
|
|
21
|
+
max-width: ${modalMaxWidth}px;
|
|
22
|
+
|
|
23
|
+
.ant-modal-body {
|
|
24
|
+
height: 80vh;
|
|
25
|
+
overflow-y: auto;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ant-modal-content {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
padding: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ant-modal-footer {
|
|
36
|
+
flex: 0 0 auto;
|
|
37
|
+
margin-top: 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
const ModalMainStyledDiv = styled.div `
|
|
42
|
+
padding: calc(var(--general-spacing-m) * 1px);
|
|
43
|
+
height: 100%;
|
|
44
|
+
position: relative;
|
|
45
|
+
`;
|
|
46
|
+
const ModalFooterStyledDiv = styled.div `
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: flex-end;
|
|
49
|
+
padding: calc(var(--general-spacing-xs) * 1px) calc(var(--general-spacing-s) * 1px);
|
|
50
|
+
border-top: 1px solid var(--general-utilities-border);
|
|
51
|
+
`;
|
|
52
|
+
export const LinkModal = ({ open, onLink, onClose }) => {
|
|
53
|
+
const { t } = useSharedTranslation();
|
|
54
|
+
const explorerContainerRef = useRef(null);
|
|
55
|
+
const { view, dispatch } = useViewSettingsContext();
|
|
56
|
+
const { data: attributeData } = useExplorerLinkAttributeQuery({
|
|
57
|
+
skip: view.entrypoint.type !== 'link',
|
|
58
|
+
variables: {
|
|
59
|
+
id: view.entrypoint.linkAttributeId
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
const isMultiple = attributeData?.attributes?.list?.[0]?.multiple_values;
|
|
63
|
+
const { addLinkMassAction } = useLinkMassAction({
|
|
64
|
+
isEnabled: true,
|
|
65
|
+
store: { view, dispatch },
|
|
66
|
+
linkAttributeId: view.entrypoint.linkAttributeId,
|
|
67
|
+
libraryId: view.libraryId,
|
|
68
|
+
onLink,
|
|
69
|
+
closeModal: onClose
|
|
70
|
+
});
|
|
71
|
+
const _handleClose = () => {
|
|
72
|
+
closeKitSnackBar();
|
|
73
|
+
onClose();
|
|
74
|
+
};
|
|
75
|
+
const _closeButtonLabel = String(t('global.close'));
|
|
76
|
+
const _footer = (_jsx(ModalFooterStyledDiv, { children: _jsx(KitSpace, { children: _jsx(KitButton, { "aria-label": _closeButtonLabel, icon: _jsx(FontAwesomeIcon, { icon: faXmark }), onClick: _handleClose, children: _closeButtonLabel }, "close") }) }));
|
|
77
|
+
return (_jsx(StyledModal, { open: open, onCancel: _handleClose, destroyOnClose: true, closable: false, cancelText: t('global.cancel'), width: "90vw", centered: true, footer: _footer, children: _jsx(ModalMainStyledDiv, { ref: explorerContainerRef, children: _jsx(EditSettingsContextProvider, { panelElement: () => explorerContainerRef.current ?? document.body, children: _jsx(Explorer, { entrypoint: {
|
|
78
|
+
type: 'library',
|
|
79
|
+
libraryId: view.libraryId
|
|
80
|
+
}, selectionMode: isMultiple ? 'multiple' : 'simple', hideSelectAllAction: !isMultiple && view.entrypoint.type === 'link', primaryActions: [], defaultActionsForItem: [], defaultMassActions: [], massActions: addLinkMassAction ? [addLinkMassAction] : [], itemActions: [], defaultPrimaryActions: [] }) }) }) }));
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=LinkModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkModal.js","sourceRoot":"","sources":["../../../../src/components/Explorer/link-item/LinkModal.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoC,MAAM,EAAC,MAAM,OAAO,CAAC;AAChE,OAAO,EAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC3E,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,6BAA6B,EAAC,MAAM,eAAe,CAAC;AAE5D,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,OAAO,EAAC,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAErC,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,sBAAsB,EAAC,MAAM,oEAAoE,CAAC;AAC1G,OAAO,EAAC,2BAA2B,EAAC,MAAM,yBAAyB,CAAC;AAQpE,MAAM,aAAa,GAAG,IAAI,CAAC;AAE3B,gDAAgD;AAChD,MAAM,W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
|
+
import { ISubmitMultipleResult } from '../../../components/RecordEdition/EditRecordContent/_types';
|
|
3
|
+
import { FeatureHook } from '../_types';
|
|
4
|
+
import { IViewSettingsAction, IViewSettingsState } from '../manage-view-settings';
|
|
5
|
+
/**
|
|
6
|
+
* Hook used to link records
|
|
7
|
+
*
|
|
8
|
+
* @param isEnabled - whether the action is present
|
|
9
|
+
* @param view - represent the current view
|
|
10
|
+
* @param dispatch - method to change the current view
|
|
11
|
+
* @param libraryId - concerned library
|
|
12
|
+
* @param linkAttributeId - attribute that represent the link
|
|
13
|
+
* @param onLink - callback to let outside world know about linking feedback
|
|
14
|
+
* @param closeModal - callback to close the link modal
|
|
15
|
+
*/
|
|
16
|
+
export declare const useLinkMassAction: ({ isEnabled, store: { view, dispatch }, libraryId, linkAttributeId, onLink, closeModal }: FeatureHook<{
|
|
17
|
+
store: {
|
|
18
|
+
view: IViewSettingsState;
|
|
19
|
+
dispatch: Dispatch<IViewSettingsAction>;
|
|
20
|
+
};
|
|
21
|
+
libraryId: string;
|
|
22
|
+
linkAttributeId: string;
|
|
23
|
+
onLink?: (saveValuesResult: ISubmitMultipleResult) => void;
|
|
24
|
+
closeModal: () => void;
|
|
25
|
+
}>) => {
|
|
26
|
+
addLinkMassAction: {
|
|
27
|
+
label: string;
|
|
28
|
+
icon: JSX.Element;
|
|
29
|
+
callback: (massSelectionFilter: import("../../../_gqlTypes").RecordFilterInput[]) => Promise<void>;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { useMemo } from 'react';
|
|
6
|
+
import { FaPlus } from 'react-icons/fa';
|
|
7
|
+
import { useExplorerSelectionIdsLazyQuery } from '../../../_gqlTypes';
|
|
8
|
+
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
9
|
+
import useSaveValueBatchMutation from '../../../components/RecordEdition/EditRecordContent/hooks/useExecuteSaveValueBatchMutation';
|
|
10
|
+
/**
|
|
11
|
+
* Hook used to link records
|
|
12
|
+
*
|
|
13
|
+
* @param isEnabled - whether the action is present
|
|
14
|
+
* @param view - represent the current view
|
|
15
|
+
* @param dispatch - method to change the current view
|
|
16
|
+
* @param libraryId - concerned library
|
|
17
|
+
* @param linkAttributeId - attribute that represent the link
|
|
18
|
+
* @param onLink - callback to let outside world know about linking feedback
|
|
19
|
+
* @param closeModal - callback to close the link modal
|
|
20
|
+
*/
|
|
21
|
+
export const useLinkMassAction = ({ isEnabled, store: { view, dispatch }, libraryId, linkAttributeId, onLink, closeModal }) => {
|
|
22
|
+
const { t } = useSharedTranslation();
|
|
23
|
+
const { saveValues } = useSaveValueBatchMutation();
|
|
24
|
+
const [fetch] = useExplorerSelectionIdsLazyQuery({
|
|
25
|
+
fetchPolicy: 'no-cache',
|
|
26
|
+
onCompleted: async (data) => {
|
|
27
|
+
const entrypoint = view.entrypoint;
|
|
28
|
+
const values = data.records.list.map(({ id }) => ({
|
|
29
|
+
attribute: linkAttributeId,
|
|
30
|
+
idValue: null,
|
|
31
|
+
value: id
|
|
32
|
+
}));
|
|
33
|
+
const saveValuesResult = await saveValues({
|
|
34
|
+
id: entrypoint.parentRecordId,
|
|
35
|
+
library: {
|
|
36
|
+
id: entrypoint.parentLibraryId
|
|
37
|
+
}
|
|
38
|
+
}, values);
|
|
39
|
+
onLink?.(saveValuesResult);
|
|
40
|
+
closeModal();
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const _addLinkMassAction = useMemo(() => ({
|
|
44
|
+
label: t('explorer.massAction.add-link'),
|
|
45
|
+
icon: _jsx(FaPlus, {}),
|
|
46
|
+
callback: async (massSelectionFilter) => {
|
|
47
|
+
await fetch({
|
|
48
|
+
variables: {
|
|
49
|
+
libraryId,
|
|
50
|
+
filters: massSelectionFilter
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}), [t, fetch, view.massSelection, dispatch, libraryId]);
|
|
55
|
+
return {
|
|
56
|
+
addLinkMassAction: isEnabled ? _addLinkMassAction : null
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=useLinkMassAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLinkMassAction.js","sourceRoot":"","sources":["../../../../src/components/Explorer/link-item/useLinkMassAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAW,OAAO,EAAC,MAAM,OAAO,CAAC;AACxC,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,gCAAgC,EAAC,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,yBAAyB,MAAM,uFAAuF,CAAC;AAK9H;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAC9B,SAAS,EACT,KAAK,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,EACvB,SAAS,EACT,eAAe,EACf,MAAM,EACN,UAAU,EAUZ,EAAE,EAAE;IACF,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,EAAC,UAAU,EAAC,GAAG,yBAAyB,EAAE,CAAC;IAEjD,MAAM,CAAC,KAAK,CAAC,GAAG,gCAAgC,CAAC;QAC7C,WAAW,EAAE,UAAU;QACvB,WAAW,EAAE,KAAK,EAAC,IAAI,EAAC,EAAE;YACtB,MAAM,UAAU,GAAG,IAAI,CAAC,UAA6B,CAAC;YACtD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAE,CAAC,CAAC;gBAC5C,SAAS,EAAE,eAAe;gBAC1B,OAAO,EAAE,IAAI;gBACb,KAAK,EAAE,EAAE;aACZ,CAAC,CAAC,CAAC;YAEJ,MAAM,gBAAgB,GAAG,MAAM,UAAU,CACrC;gBACI,EAAE,EAAE,UAAU,CAAC,cAAc;gBAC7B,OAAO,EAAE;oBACL,EAAE,EAAE,UAAU,CAAC,eAAe;iBACjC;aACJ,EACD,MAAM,CACT,CAAC;YACF,MAAM,EAAE,CAAC,gBAAgB,CAAC,CAAC;YAC3B,UAAU,EAAE,CAAC;QACjB,CAAC;KACJ,CAAC,CAAC;IAEH,MAAM,kBAAkB,GAAG,OAAO,CAC9B,GAAG,EAAE,CACD,CAAC;QACG,KAAK,EAAE,CAAC,CAAC,8BAA8B,CAAC;QACxC,IAAI,EAAE,KAAC,MAAM,KAAG;QAChB,QAAQ,EAAE,KAAK,EAAC,mBAAmB,EAAC,EAAE;YAClC,MAAM,KAAK,CAAC;gBACR,SAAS,EAAE;oBACP,SAAS;oBACT,OAAO,EAAE,mBAAmB;iBAC/B;aACJ,CAAC,CAAC;QACP,CAAC;KACJ,CAAwB,EAC7B,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,EAAE,SAAS,CAAC,CACtD,CAAC;IAEF,OAAO;QACH,iBAAiB,EAAE,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI;KAC3D,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { KitTypography } from 'aristid-ds';
|
|
4
|
+
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
5
|
+
import { useViewSettingsContext } from '../manage-view-settings/store-view-settings/useViewSettingsContext';
|
|
6
|
+
import { localizedTranslation } from '@leav/utils';
|
|
7
|
+
import { useLang } from '../../../hooks';
|
|
8
|
+
import { FaCheck } from 'react-icons/fa';
|
|
9
|
+
import { ViewActionsButtons } from '../manage-view-settings/save-view/ViewActionsButtons';
|
|
10
|
+
import { useLoadView } from '../useLoadView';
|
|
11
|
+
const StyledListUlContainer = styled.div `
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
`;
|
|
15
|
+
const ContentWrapperStyledDiv = styled.div `
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
justify-content: space-between;
|
|
19
|
+
height: 100%;
|
|
20
|
+
`;
|
|
21
|
+
const StyledListUl = styled.ul `
|
|
22
|
+
padding: calc(var(--general-spacing-s) * 1px) 0;
|
|
23
|
+
margin: 0 0 calc(var(--general-spacing-xs) * 1px) 0;
|
|
24
|
+
list-style: none;
|
|
25
|
+
color: var(--general-utilities-text-primary);
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
gap: calc(var(--general-spacing-xs) * 1px);
|
|
29
|
+
`;
|
|
30
|
+
const StyleViewItemLi = styled.li `
|
|
31
|
+
display: flex;
|
|
32
|
+
justify-content: space-between;
|
|
33
|
+
align-items: center;
|
|
34
|
+
padding: calc(var(--general-spacing-xxs) * 1px) calc(var(--general-spacing-xs) * 1px);
|
|
35
|
+
border: 1px solid transparent;
|
|
36
|
+
border-radius: calc(var(--general-border-radius-s) * 1px);
|
|
37
|
+
height: calc(var(--general-spacing-l) * 1px);
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
|
|
40
|
+
&:hover {
|
|
41
|
+
border-color: var(--general-utilities-main-default);
|
|
42
|
+
background-color: var(--general-utilities-light);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.check {
|
|
46
|
+
color: var(--general-utilities-main-default);
|
|
47
|
+
margin-left: calc(var(--general-spacing-xs) * 1px);
|
|
48
|
+
font-size: calc(var(--general-typography-fontSize5) * 1px);
|
|
49
|
+
flex: 0 0 auto;
|
|
50
|
+
display: none;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.selected {
|
|
54
|
+
background: var(--general-utilities-main-light);
|
|
55
|
+
|
|
56
|
+
.check {
|
|
57
|
+
display: inline-block;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
export const SavedViews = () => {
|
|
62
|
+
const { t } = useSharedTranslation();
|
|
63
|
+
const { view } = useViewSettingsContext();
|
|
64
|
+
const { availableLangs } = useLang();
|
|
65
|
+
const { loadView } = useLoadView();
|
|
66
|
+
const sharedViews = view.savedViews.filter(viewItem => viewItem.shared);
|
|
67
|
+
const myViews = view.savedViews.filter(viewItem => !viewItem.shared);
|
|
68
|
+
const _getViewClassName = (viewId) => (view.viewId === viewId ? 'selected' : '');
|
|
69
|
+
const _handleViewClick = (id) => () => {
|
|
70
|
+
loadView(id);
|
|
71
|
+
};
|
|
72
|
+
return (_jsxs(ContentWrapperStyledDiv, { children: [_jsxs(StyledListUlContainer, { children: [_jsx(KitTypography.Title, { level: "h4", children: t('explorer.my-views') }), _jsxs(StyledListUl, { "aria-label": t('explorer.my-views'), children: [_jsxs(StyleViewItemLi, { className: _getViewClassName(null), onClick: _handleViewClick(null), "aria-label": t('explorer.default-view'), children: [_jsx(KitTypography.Text, { size: "fontSize5", weight: "medium", ellipsis: true, children: t('explorer.default-view') }), _jsx(FaCheck, { className: "check" })] }), myViews.map(viewItem => (_jsxs(StyleViewItemLi, { className: _getViewClassName(viewItem.id), onClick: _handleViewClick(viewItem.id), "aria-label": localizedTranslation(viewItem.label, availableLangs), children: [_jsx(KitTypography.Text, { size: "fontSize5", weight: "medium", ellipsis: true, children: localizedTranslation(viewItem.label, availableLangs) }), _jsx(FaCheck, { className: "check" })] }, viewItem.id)))] }), _jsx(KitTypography.Title, { level: "h4", children: t('explorer.shared-views') }), sharedViews.length === 0 ? (_jsx(KitTypography.Text, { size: "fontSize5", children: t('explorer.no-shared-views') })) : (_jsx(StyledListUl, { "aria-label": t('explorer.shared-view'), children: sharedViews.map(viewItem => (_jsxs(StyleViewItemLi, { className: _getViewClassName(viewItem.id), onClick: _handleViewClick(viewItem.id), "aria-label": localizedTranslation(viewItem.label, availableLangs), children: [_jsx(KitTypography.Text, { size: "fontSize5", weight: "medium", ellipsis: true, children: localizedTranslation(viewItem.label, availableLangs) }), _jsx(FaCheck, { className: "check" })] }, viewItem.id))) }))] }), _jsx(ViewActionsButtons, {})] }));
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=SavedViews.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SavedViews.js","sourceRoot":"","sources":["../../../../src/components/Explorer/list-saved-views/SavedViews.tsx"],"names":[],"mappings":";AAIA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,sBAAsB,EAAC,MAAM,oEAAoE,CAAC;AAC1G,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,kBAAkB,EAAC,MAAM,sDAAsD,CAAC;AACxF,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGvC,CAAC;AAEF,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAKzC,CAAC;AAEF,MAAM,YAAY,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;CAQ7B,CAAC;AAEF,MAAM,eAAe,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BhC,CAA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AC,QAAQ,EAAC,QAAQ,kBACxD,oBAAoB,CAAC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,GACpC,EACrB,KAAC,OAAO,IAAC,SAAS,EAAC,OAAO,GAAG,KARxB,QAAQ,CAAC,EAAE,CASF,CACrB,CAAC,GACS,CAClB,IACmB,EACxB,KAAC,kBAAkB,KAAG,IACA,CAC7B,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -2,10 +2,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { FilterDropDown } from '../filter-items/filter-type/FilterDropDown';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { KitFilter } from 'aristid-ds';
|
|
5
|
+
import { nullValueConditions } from '../../conditionsHelper';
|
|
5
6
|
const FilterStyled = styled(KitFilter) `
|
|
6
7
|
flex: 0 0 auto;
|
|
7
8
|
`;
|
|
8
|
-
|
|
9
|
+
const getFilterValue = filter => {
|
|
10
|
+
if (nullValueConditions.includes(filter.condition)) {
|
|
11
|
+
return [filter.condition];
|
|
12
|
+
}
|
|
13
|
+
return filter.value ? [filter.value] : [];
|
|
14
|
+
};
|
|
15
|
+
export const CommonFilterItem = ({ filter, disabled }) => (_jsx(FilterStyled, { expandable: true, disabled: disabled, label: filter.attribute.label, values: getFilterValue(filter), dropDownProps: {
|
|
9
16
|
placement: 'bottomLeft',
|
|
10
17
|
dropdownRender: () => _jsx(FilterDropDown, { filter: filter })
|
|
11
18
|
} }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommonFilterItem.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/_shared/CommonFilterItem.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,cAAc,EAAC,MAAM,4CAA4C,CAAC;AAC1E,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"CommonFilterItem.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/_shared/CommonFilterItem.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,cAAc,EAAC,MAAM,4CAA4C,CAAC;AAC1E,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AAErC,OAAO,EAAC,mBAAmB,EAAC,MAAM,wBAAwB,CAAC;AAE3D,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;;CAErC,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,EAAE;IAC5B,IAAI,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;QACjD,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC9B,CAAC;IACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAoE,CAAC,EAC9F,MAAM,EACN,QAAQ,EACX,EAAE,EAAE,CAAC,CACF,KAAC,YAAY,IACT,UAAU,QACV,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,EAC7B,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,EAC9B,aAAa,EAAE;QACX,SAAS,EAAE,YAAY;QACvB,cAAc,EAAE,GAAG,EAAE,CAAC,KAAC,cAAc,IAAC,MAAM,EAAE,MAAM,GAAI;KAC3D,GACH,CACL,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ExplorerAttributesQuery, ExplorerLinkAttributeQuery, GetViewsListQuery, LinkAttributeDetailsFragment, ViewDetailsFilterFragment } from '../../../../_gqlTypes';
|
|
2
|
+
import { ExplorerFilter, ValidFieldFilter, ValidFieldFilterThrough, validFilter } from '../../_types';
|
|
3
|
+
export declare const _isValidFieldFilter: (filter: ViewDetailsFilterFragment | ExplorerFilter) => filter is ValidFieldFilter;
|
|
4
|
+
export declare const _isValidFieldFilterThrough: (filter: ValidFieldFilter | ValidFieldFilterThrough) => filter is ValidFieldFilterThrough;
|
|
5
|
+
export declare const _isLinkAttributeDetails: (linkAttributeData: NonNullable<ExplorerLinkAttributeQuery["attributes"]>["list"][number]) => linkAttributeData is LinkAttributeDetailsFragment & {
|
|
6
|
+
id: string;
|
|
7
|
+
multiple_values: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type validFiltersArgument = GetViewsListQuery['views']['list'][number]['filters'] | ExplorerFilter[];
|
|
10
|
+
export type ExplorerAttributesById = Record<string, NonNullable<ExplorerAttributesQuery['attributes']>['list'][number]>;
|
|
11
|
+
export declare const useTransformFilters: () => {
|
|
12
|
+
toValidFilters: (filters: validFiltersArgument) => validFilter[];
|
|
13
|
+
toExplorerFilters: ({ filters, attributesDataById }: {
|
|
14
|
+
filters: validFilter[];
|
|
15
|
+
attributesDataById: ExplorerAttributesById;
|
|
16
|
+
}) => ExplorerFilter[];
|
|
17
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { ThroughConditionFilter } from '../../../../types';
|
|
2
|
+
import { isLinkAttribute, isStandardAttribute } from '../../../../_utils/attributeType';
|
|
3
|
+
import { localizedTranslation } from '@leav/utils';
|
|
4
|
+
import { useLang } from '../../../../hooks';
|
|
5
|
+
import { v4 as uuid } from 'uuid';
|
|
6
|
+
export const _isValidFieldFilter = (filter) => !!filter.field;
|
|
7
|
+
export const _isValidFieldFilterThrough = (filter) => filter.condition === ThroughConditionFilter.THROUGH && !!filter.subCondition && !!filter.subField;
|
|
8
|
+
export const _isLinkAttributeDetails = (linkAttributeData) => 'linked_library' in linkAttributeData;
|
|
9
|
+
export const useTransformFilters = () => {
|
|
10
|
+
const { lang } = useLang();
|
|
11
|
+
const toValidFilters = (filters) => (filters ?? []).reduce((acc, filter) => {
|
|
12
|
+
if (!_isValidFieldFilter(filter)) {
|
|
13
|
+
return acc;
|
|
14
|
+
}
|
|
15
|
+
const _isThroughFilter = filter.field.includes('.');
|
|
16
|
+
if (_isThroughFilter) {
|
|
17
|
+
const [field, subField] = filter.field.split('.');
|
|
18
|
+
const throughFilter = {
|
|
19
|
+
field,
|
|
20
|
+
subField,
|
|
21
|
+
value: filter.value ?? null,
|
|
22
|
+
condition: ThroughConditionFilter.THROUGH,
|
|
23
|
+
subCondition: filter.condition
|
|
24
|
+
};
|
|
25
|
+
acc.push(throughFilter);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
acc.push(filter);
|
|
29
|
+
}
|
|
30
|
+
return acc;
|
|
31
|
+
}, []);
|
|
32
|
+
const toExplorerFilters = ({ filters, attributesDataById }) => (filters ?? []).reduce((acc, filter) => {
|
|
33
|
+
if (!attributesDataById[filter.field]) {
|
|
34
|
+
console.warn(`Attribute ${filter.field} from defaultViewSettings or user view not found in database.`);
|
|
35
|
+
return acc;
|
|
36
|
+
}
|
|
37
|
+
const filterAttributeBase = {
|
|
38
|
+
label: localizedTranslation(attributesDataById[filter.field].label, lang),
|
|
39
|
+
type: attributesDataById[filter.field].type
|
|
40
|
+
};
|
|
41
|
+
// filter is standardFilter
|
|
42
|
+
if (isStandardAttribute(filterAttributeBase.type)) {
|
|
43
|
+
const newFilter = {
|
|
44
|
+
field: filter.field,
|
|
45
|
+
value: filter.value ?? null,
|
|
46
|
+
id: uuid(),
|
|
47
|
+
condition: filter.condition ?? null,
|
|
48
|
+
attribute: {
|
|
49
|
+
...filterAttributeBase,
|
|
50
|
+
format: attributesDataById[filter.field].format
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
acc.push(newFilter);
|
|
54
|
+
}
|
|
55
|
+
if (isLinkAttribute(filterAttributeBase.type)) {
|
|
56
|
+
const attributeData = attributesDataById[filter.field];
|
|
57
|
+
if (_isValidFieldFilterThrough(filter)) {
|
|
58
|
+
const newFilter = {
|
|
59
|
+
field: filter.field,
|
|
60
|
+
value: filter.value ?? null,
|
|
61
|
+
id: uuid(),
|
|
62
|
+
condition: filter.condition,
|
|
63
|
+
attribute: {
|
|
64
|
+
...filterAttributeBase,
|
|
65
|
+
linkedLibrary: attributeData.linked_library
|
|
66
|
+
},
|
|
67
|
+
subCondition: filter.subCondition ?? null,
|
|
68
|
+
subField: filter.subField
|
|
69
|
+
};
|
|
70
|
+
acc.push(newFilter);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
const newFilter = {
|
|
74
|
+
field: filter.field,
|
|
75
|
+
value: filter.value ?? null,
|
|
76
|
+
id: uuid(),
|
|
77
|
+
condition: filter.condition,
|
|
78
|
+
attribute: {
|
|
79
|
+
...filterAttributeBase,
|
|
80
|
+
linkedLibrary: attributeData.linked_library
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
acc.push(newFilter);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return acc;
|
|
87
|
+
}, []);
|
|
88
|
+
return {
|
|
89
|
+
toValidFilters,
|
|
90
|
+
toExplorerFilters
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=useTransformFilters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTransformFilters.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/_shared/useTransformFilters.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAC;AACjD,OAAO,EAAC,eAAe,EAAE,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,EAAE,IAAI,IAAI,EAAC,MAAM,MAAM,CAAC;AAEhC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAAkD,EAA8B,EAAE,CAClH,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AE,CAAC;gBACrC,MAAM,SAAS,GAA2B;oBACtC,KAAK,EAAE,MAAM,CAAC,KAAK;oBACnB,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,IAAI;oBAC3B,EAAE,EAAE,IAAI,EAAE;oBACV,SAAS,EAAE,MAAM,CAAC,SAAS;oBAC3B,SAAS,EAAE;wBACP,GAAG,mBAAmB;wBACtB,aAAa,EAAE,aAAa,CAAC,cAAe;qBAC/C;oBACD,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,IAAI;oBACzC,QAAQ,EAAE,MAAM,CAAC,QAAQ;iBAC5B,CAAC;gBACF,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACxB,CAAC;iBAAM,CAAC;gBACJ,MAAM,SAAS,GAAwB;oBACnC,KAAK,EAAE,MAAM,CAAC,KAAK;oBACnB,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,IAAI;oBAC3B,EAAE,EAAE,IAAI,EAAE;oBACV,SAAS,EAAE,MAAM,CAAC,SAAS;oBAC3B,SAAS,EAAE;wBACP,GAAG,mBAAmB;wBACtB,aAAa,EAAE,aAAa,CAAC,cAAe;qBAC/C;iBACJ,CAAC;gBACF,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACxB,CAAC;QACL,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC,EAAE,EAAE,CAAC,CAAC;IAEX,OAAO;QACH,cAAc;QACd,iBAAiB;KACpB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -29,9 +29,8 @@ export const SelectVisibleAttributes = ({ libraryId }) => {
|
|
|
29
29
|
const sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
|
|
30
30
|
coordinateGetter: sortableKeyboardCoordinates
|
|
31
31
|
}));
|
|
32
|
-
const { view, dispatch } = useViewSettingsContext();
|
|
33
32
|
// TODO: make naming great again
|
|
34
|
-
const { attributesIds: orderedVisibleColumns } =
|
|
33
|
+
const { view: { attributesIds: orderedVisibleColumns }, dispatch } = useViewSettingsContext();
|
|
35
34
|
const { attributeDetailsById, searchFilteredColumnsIds, onSearchChanged } = useAttributeDetailsData(libraryId);
|
|
36
35
|
const _toggleColumnVisibility = (columnId) => () => {
|
|
37
36
|
const actionType = orderedVisibleColumns.includes(columnId)
|
|
@@ -1 +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,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAEnD,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,uBAAuB,EAAC,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAC,sBAAsB,EAAC,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAC,uBAAuB,EAAC,MAAM,uCAAuC,CAAC;AAE9E,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGjC,CAAC;AAEF,MAAM,UAAU,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;CAK3B,CAAC;AAEF,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAC5C,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAMhD,MAAM,CAAC,MAAM,uBAAuB,GAAqD,CAAC,EAAC,SAAS,EAAC,EAAE,EAAE;IACrG,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,OAAO,GAAG,UAAU,CACtB,SAAS,CAAC,aAAa,CAAC,EACxB,SAAS,CAAC,cAAc,EAAE;QACtB,gBAAgB,EAAE,2BAA2B;KAChD,CAAC,CACL,CAAC;IAEF,MAAM,
|
|
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,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAEnD,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,uBAAuB,EAAC,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAC,sBAAsB,EAAC,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAC,uBAAuB,EAAC,MAAM,uCAAuC,CAAC;AAE9E,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGjC,CAAC;AAEF,MAAM,UAAU,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;CAK3B,CAAC;AAEF,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAC5C,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAMh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,GACJ,EACb,KAAC,eAAe,IAAC,EAAE,EAAE,kBAAkB,YAAG,CAAC,CAAC,4BAA4B,CAAC,GAAmB,EAC5F,KAAC,UAAU,uBAAkB,kBAAkB,YAC1C,wBAAwB;qBACpB,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,qBAAqB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;qBAC7D,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,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { KitSelect } from 'aristid-ds';
|
|
3
3
|
import { AttributeConditionFilter } from '../../../../../types';
|
|
4
4
|
import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
5
|
-
export const BooleanAttributeDropDown = ({ filter, onFilterChange }) => {
|
|
5
|
+
export const BooleanAttributeDropDown = ({ filter, onFilterChange, selectDropDownRef }) => {
|
|
6
6
|
const { t } = useSharedTranslation();
|
|
7
7
|
const _onSelectionChanged = value => {
|
|
8
8
|
onFilterChange({ ...filter, condition: AttributeConditionFilter.EQUAL, value });
|
|
@@ -17,6 +17,6 @@ export const BooleanAttributeDropDown = ({ filter, onFilterChange }) => {
|
|
|
17
17
|
value: 'false'
|
|
18
18
|
}
|
|
19
19
|
];
|
|
20
|
-
return (_jsx(KitSelect, { options: valuesOptions, onChange: _onSelectionChanged, value: filter.value, placeholder: t('filters.equal') }));
|
|
20
|
+
return (_jsx(KitSelect, { options: valuesOptions, onChange: _onSelectionChanged, value: filter.value, getPopupContainer: () => selectDropDownRef?.current ?? document.body, placeholder: t('filters.equal') }));
|
|
21
21
|
};
|
|
22
22
|
//# sourceMappingURL=BooleanAttributeDropdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanAttributeDropdown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAC;AACnD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAGpE,MAAM,CAAC,MAAM,wBAAwB,GAAoD,CAAC,
|
|
1
|
+
{"version":3,"file":"BooleanAttributeDropdown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAC;AACnD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAGpE,MAAM,CAAC,MAAM,wBAAwB,GAAoD,CAAC,EACtF,MAAM,EACN,cAAc,EACd,iBAAiB,EACpB,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,mBAAmB,GAAiD,KAAK,CAAC,EAAE;QAC9E,cAAc,CAAC,EAAC,GAAG,MAAM,EAAE,SAAS,EAAE,wBAAwB,CAAC,KAAK,EAAE,KAAK,EAAC,CAAC,CAAC;IAClF,CAAC,CAAC;IAEF,MAAM,aAAa,GAAG;QAClB;YACI,KAAK,EAAE,CAAC,CAAC,eAAe,CAAC;YACzB,KAAK,EAAE,MAAM;SAChB;QACD;YACI,KAAK,EAAE,CAAC,CAAC,gBAAgB,CAAC;YAC1B,KAAK,EAAE,OAAO;SACjB;KACJ,CAAC;IAEF,OAAO,CACH,KAAC,SAAS,IACN,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,mBAAmB,EAC7B,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,iBAAiB,EAAE,GAAG,EAAE,CAAC,iBAAiB,EAAE,OAAO,IAAI,QAAQ,CAAC,IAAI,EACpE,WAAW,EAAE,CAAC,CAAC,eAAe,CAAC,GACjC,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { KitSelect } from 'aristid-ds';
|
|
3
3
|
import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
4
4
|
import { useConditionsOptionsByType } from './useConditionOptionsByType';
|
|
5
|
-
export const ColorAttributeDropDown = ({ filter, onFilterChange }) => {
|
|
5
|
+
export const ColorAttributeDropDown = ({ filter, onFilterChange, selectDropDownRef }) => {
|
|
6
6
|
const { t } = useSharedTranslation();
|
|
7
7
|
const { conditionOptionsByType } = useConditionsOptionsByType(filter);
|
|
8
8
|
const _onConditionChanged = condition => onFilterChange({ ...filter, condition });
|
|
9
|
-
return (_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, placeholder: t('explorer.select-condition') }));
|
|
9
|
+
return (_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, getPopupContainer: () => selectDropDownRef?.current ?? document.body, placeholder: t('explorer.select-condition') }));
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=ColorAttributeDropDown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,CAAC,MAAM,sBAAsB,GAAoD,CAAC,
|
|
1
|
+
{"version":3,"file":"ColorAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,CAAC,MAAM,sBAAsB,GAAoD,CAAC,EACpF,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,OAAO,CACH,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,EACpE,WAAW,EAAE,CAAC,CAAC,2BAA2B,CAAC,GAC7C,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -24,7 +24,7 @@ const DatePickerDropdowncontainerStyledDiv = styled.div `
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
`;
|
|
27
|
-
export const DateAttributeDropDown = ({ filter, onFilterChange }) => {
|
|
27
|
+
export const DateAttributeDropDown = ({ filter, onFilterChange, selectDropDownRef }) => {
|
|
28
28
|
const datePickerRef = useRef(null);
|
|
29
29
|
const { conditionOptionsByType } = useConditionsOptionsByType(filter);
|
|
30
30
|
const _onConditionChanged = condition => {
|
|
@@ -61,6 +61,6 @@ export const DateAttributeDropDown = ({ filter, onFilterChange }) => {
|
|
|
61
61
|
const [dateFrom, dateTo] = dates.split(dateValuesSeparator).map(date => dayjs.unix(Number(date)));
|
|
62
62
|
return [dateFrom, dateTo];
|
|
63
63
|
};
|
|
64
|
-
return (_jsxs(_Fragment, { children: [_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition }), showDatePicker && (_jsxs(DatePickerContainerStyledDiv, { children: [filter.condition === AttributeConditionFilter.BETWEEN ? (_jsx(KitDatePicker.RangePicker, { open: true, getPopupContainer: () => datePickerRef.current ?? document.body, value: filter.value ? getDateRangeValue(filter.value) : null, onChange: _onDateRangeChanged })) : (_jsx(KitDatePicker, { open: true, getPopupContainer: () => datePickerRef.current ?? document.body, value: filter.value ? dayjs.unix(Number(filter.value)) : null, onChange: _onDateChanged })), _jsx(DatePickerDropdowncontainerStyledDiv, { ref: datePickerRef })] }))] }));
|
|
64
|
+
return (_jsxs(_Fragment, { children: [_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, getPopupContainer: () => selectDropDownRef?.current ?? document.body }), showDatePicker && (_jsxs(DatePickerContainerStyledDiv, { children: [filter.condition === AttributeConditionFilter.BETWEEN ? (_jsx(KitDatePicker.RangePicker, { open: true, getPopupContainer: () => datePickerRef.current ?? document.body, value: filter.value ? getDateRangeValue(filter.value) : null, onChange: _onDateRangeChanged })) : (_jsx(KitDatePicker, { open: true, getPopupContainer: () => datePickerRef.current ?? document.body, value: filter.value ? dayjs.unix(Number(filter.value)) : null, onChange: _onDateChanged })), _jsx(DatePickerDropdowncontainerStyledDiv, { ref: datePickerRef })] }))] }));
|
|
65
65
|
};
|
|
66
66
|
//# sourceMappingURL=DateAttributeDropDown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoC,MAAM,EAAC,MAAM,OAAO,CAAC;AAChE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,aAAa,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AACpD,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAC,mBAAmB,EAAC,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAC,mBAAmB,EAAC,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,4BAA4B,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAI9C,CAAC;AAEF,MAAM,oCAAoC,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;CAQtD,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAoD,CAAC,
|
|
1
|
+
{"version":3,"file":"DateAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoC,MAAM,EAAC,MAAM,OAAO,CAAC;AAChE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,aAAa,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AACpD,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,C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,CAAC,IAAI,GACtE,EACD,cAAc,IAAI,CACf,MAAC,4BAA4B,eACxB,MAAM,CAAC,SAAS,KAAK,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAAC,CACrD,KAAC,aAAa,CAAC,WAAW,IACtB,IAAI,QACJ,iBAAiB,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,EAC/D,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAC5D,QAAQ,EAAE,mBAAmB,GAC/B,CACL,CAAC,CAAC,CAAC,CACA,KAAC,aAAa,IACV,IAAI,QACJ,iBAAiB,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,EAC/D,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAC7D,QAAQ,EAAE,cAAc,GAC1B,CACL,EACD,KAAC,oCAAoC,IAAC,GAAG,EAAE,aAAa,GAAI,IACjC,CAClC,IACF,CACN,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { KitSelect } from 'aristid-ds';
|
|
3
3
|
import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
4
4
|
import { useConditionsOptionsByType } from './useConditionOptionsByType';
|
|
5
|
-
export const DateRangeAttributeDropDown = ({ filter, onFilterChange }) => {
|
|
5
|
+
export const DateRangeAttributeDropDown = ({ filter, onFilterChange, selectDropDownRef }) => {
|
|
6
6
|
const { t } = useSharedTranslation();
|
|
7
7
|
const { conditionOptionsByType } = useConditionsOptionsByType(filter);
|
|
8
8
|
const _onConditionChanged = condition => onFilterChange({ ...filter, condition });
|
|
9
|
-
return (_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, placeholder: t('explorer.select-condition') }));
|
|
9
|
+
return (_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, getPopupContainer: () => selectDropDownRef?.current ?? document.body, placeholder: t('explorer.select-condition') }));
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=DateRangeAttributeDropDown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangeAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,CAAC,MAAM,0BAA0B,GAAoD,CAAC,EACxF,MAAM,EACN,cAAc,
|
|
1
|
+
{"version":3,"file":"DateRangeAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,CAAC,MAAM,0BAA0B,GAAoD,CAAC,EACxF,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,OAAO,CACH,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,EACpE,WAAW,EAAE,CAAC,CAAC,2BAA2B,CAAC,GAC7C,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { KitSelect } from 'aristid-ds';
|
|
3
3
|
import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
4
4
|
import { useConditionsOptionsByType } from './useConditionOptionsByType';
|
|
5
|
-
export const EncryptedAttributeDropDown = ({ filter, onFilterChange }) => {
|
|
5
|
+
export const EncryptedAttributeDropDown = ({ filter, onFilterChange, selectDropDownRef }) => {
|
|
6
6
|
const { t } = useSharedTranslation();
|
|
7
7
|
const { conditionOptionsByType } = useConditionsOptionsByType(filter);
|
|
8
8
|
const _onConditionChanged = condition => onFilterChange({ ...filter, condition });
|
|
9
|
-
return (_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, placeholder: t('explorer.select-condition') }));
|
|
9
|
+
return (_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, getPopupContainer: () => selectDropDownRef?.current ?? document.body, placeholder: t('explorer.select-condition') }));
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=EncryptedAttributeDropDown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EncryptedAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,CAAC,MAAM,0BAA0B,GAAoD,CAAC,EACxF,MAAM,EACN,cAAc,
|
|
1
|
+
{"version":3,"file":"EncryptedAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,CAAC,MAAM,0BAA0B,GAAoD,CAAC,EACxF,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,OAAO,CACH,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,EACpE,WAAW,EAAE,CAAC,CAAC,2BAA2B,CAAC,GAC7C,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { KitSelect } from 'aristid-ds';
|
|
3
3
|
import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
4
4
|
import { useConditionsOptionsByType } from './useConditionOptionsByType';
|
|
5
|
-
export const ExtendedAttributeDropDown = ({ filter, onFilterChange }) => {
|
|
5
|
+
export const ExtendedAttributeDropDown = ({ filter, onFilterChange, selectDropDownRef }) => {
|
|
6
6
|
const { t } = useSharedTranslation();
|
|
7
7
|
const { conditionOptionsByType } = useConditionsOptionsByType(filter);
|
|
8
8
|
const _onConditionChanged = condition => onFilterChange({ ...filter, condition });
|
|
9
|
-
return (_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, placeholder: t('explorer.select-condition') }));
|
|
9
|
+
return (_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, getPopupContainer: () => selectDropDownRef?.current ?? document.body, placeholder: t('explorer.select-condition') }));
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=ExtendedAttributeDropDown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtendedAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,CAAC,MAAM,yBAAyB,GAAoD,CAAC,EACvF,MAAM,EACN,cAAc,
|
|
1
|
+
{"version":3,"file":"ExtendedAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,CAAC,MAAM,yBAAyB,GAAoD,CAAC,EACvF,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,OAAO,CACH,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,EACpE,WAAW,EAAE,CAAC,CAAC,2BAA2B,CAAC,GAC7C,CACL,CAAC;AACN,CAAC,CAAC"}
|