@leav/ui 1.9.0 → 1.10.0
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/_gqlTypes/index.d.ts +291 -120
- package/dist/_gqlTypes/index.js +204 -87
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/records/createRecordMutation.js +2 -2
- package/dist/_queries/records/createRecordMutation.js.map +1 -1
- package/dist/_utils/getFiltersFromRequest.js +5 -6
- package/dist/_utils/getFiltersFromRequest.js.map +1 -1
- package/dist/_utils/index.js +3 -4
- package/dist/_utils/index.js.map +1 -1
- package/dist/_utils/typeguards.d.ts +5 -0
- package/dist/_utils/typeguards.js +6 -0
- package/dist/_utils/typeguards.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +2 -1
- package/dist/components/Explorer/Explorer.js +31 -13
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerToolbar.js +2 -1
- package/dist/components/Explorer/ExplorerToolbar.js.map +1 -1
- package/dist/components/Explorer/_queries/useExplorerCountData.d.ts +16 -0
- package/dist/components/Explorer/_queries/useExplorerCountData.js +26 -0
- package/dist/components/Explorer/_queries/useExplorerCountData.js.map +1 -0
- package/dist/components/Explorer/_queries/useExplorerData.js +18 -20
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/actions-mass/ResultsCount.d.ts +10 -0
- package/dist/components/Explorer/actions-mass/ResultsCount.js +8 -0
- package/dist/components/Explorer/actions-mass/ResultsCount.js.map +1 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditAttributeMassActionModal.js +1 -1
- package/dist/components/Explorer/actions-mass/edit-attribute/EditAttributeMassActionModal.js.map +1 -1
- package/dist/components/Explorer/actions-mass/edit-attribute/useCountValuesOccurrencesHook.d.ts +9 -2
- package/dist/components/Explorer/actions-mass/edit-attribute/useCountValuesOccurrencesHook.js +18 -4
- package/dist/components/Explorer/actions-mass/edit-attribute/useCountValuesOccurrencesHook.js.map +1 -1
- package/dist/components/Explorer/actions-mass/generate-previews/GeneratePreviewsModal.d.ts +10 -0
- package/dist/components/Explorer/actions-mass/generate-previews/GeneratePreviewsModal.js +69 -0
- package/dist/components/Explorer/actions-mass/generate-previews/GeneratePreviewsModal.js.map +1 -0
- package/dist/components/Explorer/actions-mass/generate-previews/useGetPreviewSizesData.d.ts +18 -0
- package/dist/components/Explorer/actions-mass/generate-previews/useGetPreviewSizesData.js +57 -0
- package/dist/components/Explorer/actions-mass/generate-previews/useGetPreviewSizesData.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useGeneratePreviewsMassAction.d.ts +19 -0
- package/dist/components/Explorer/actions-mass/useGeneratePreviewsMassAction.js +94 -0
- package/dist/components/Explorer/actions-mass/useGeneratePreviewsMassAction.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useMassActions.d.ts +5 -3
- package/dist/components/Explorer/actions-mass/useMassActions.js +19 -13
- package/dist/components/Explorer/actions-mass/useMassActions.js.map +1 -1
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.d.ts +3 -1
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +5 -1
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js +6 -1
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +5 -5
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js +1 -1
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -1
- package/dist/components/Explorer/useViewSettingsReducer.js +11 -8
- package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -1
- package/dist/components/Filters/_queries/treeFiltersDataQuery.d.ts +6 -0
- package/dist/components/Filters/_queries/treeFiltersDataQuery.js +54 -0
- package/dist/components/Filters/_queries/treeFiltersDataQuery.js.map +1 -0
- package/dist/components/Filters/context/useGetTreeFilters.js +24 -40
- package/dist/components/Filters/context/useGetTreeFilters.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/tree/TreeAttributeDropDown.js +1 -2
- package/dist/components/Filters/filter-items/filter-type/tree/TreeAttributeDropDown.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/tree/_queries/filterTreeDataQuery.d.ts +6 -0
- package/dist/components/Filters/filter-items/filter-type/tree/_queries/filterTreeDataQuery.js +54 -0
- package/dist/components/Filters/filter-items/filter-type/tree/_queries/filterTreeDataQuery.js.map +1 -0
- package/dist/components/Filters/filter-items/filter-type/tree/useGetTreeData.js +22 -41
- package/dist/components/Filters/filter-items/filter-type/tree/useGetTreeData.js.map +1 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +1 -0
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +3 -3
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +4 -0
- package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +1 -3
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +28 -17
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +1 -0
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +30 -18
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordPage/ErrorComponent.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordPage/ErrorComponent.js +11 -0
- package/dist/components/RecordEdition/EditRecordPage/ErrorComponent.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordPage/getInitialRecordValues.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordPage/getInitialRecordValues.js +35 -0
- package/dist/components/RecordEdition/EditRecordPage/getInitialRecordValues.js.map +1 -0
- package/dist/components/RecordEdition/_types.d.ts +1 -1
- package/dist/components/RecordEdition/_types.js.map +1 -1
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js +7 -6
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js.map +1 -1
- package/dist/components/RecordEdition/hooks/useGetSubmitButtons.d.ts +1 -1
- package/dist/components/RecordEdition/hooks/useGetSubmitButtons.js +6 -2
- package/dist/components/RecordEdition/hooks/useGetSubmitButtons.js.map +1 -1
- package/dist/components/SearchModal/SearchModal.js +28 -18
- package/dist/components/SearchModal/SearchModal.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +0 -2
- package/dist/components/SelectTreeNode/SelectTreeNode.js +2 -2
- package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +0 -2
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +60 -114
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -1
- package/dist/components/SelectTreeNode/TreeNodeTitle.d.ts +0 -1
- package/dist/components/SelectTreeNode/TreeNodeTitle.js +3 -7
- package/dist/components/SelectTreeNode/TreeNodeTitle.js.map +1 -1
- package/dist/components/SelectTreeNode/_queries/treeContentDataQuery.d.ts +6 -0
- package/dist/components/SelectTreeNode/_queries/treeContentDataQuery.js +56 -0
- package/dist/components/SelectTreeNode/_queries/treeContentDataQuery.js.map +1 -0
- package/dist/components/SelectTreeNode/_types.d.ts +0 -1
- package/dist/components/SelectTreeNode/_types.js.map +1 -1
- package/dist/components/index.d.ts +0 -3
- package/dist/components/index.js +0 -3
- package/dist/components/index.js.map +1 -1
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js +24 -22
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
- package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.js +9 -6
- package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/schema.d.ts +14 -2
- package/dist/hooks/useIFrameMessenger/schema.js +7 -1
- package/dist/hooks/useIFrameMessenger/schema.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/types.d.ts +5 -0
- package/dist/hooks/useIFrameMessenger/types.js.map +1 -1
- package/dist/hooks/useRecordsConsultationHistory/useRecordsConsultationHistory.d.ts +1 -1
- package/dist/hooks/useRecordsConsultationHistory/useRecordsConsultationHistory.js +14 -6
- package/dist/hooks/useRecordsConsultationHistory/useRecordsConsultationHistory.js.map +1 -1
- package/dist/locales/en/shared.json +14 -4
- package/dist/locales/fr/shared.json +14 -4
- package/package.json +11 -20
- package/dist/__mocks__/common/mockSearchContextProvider.d.ts +0 -6
- package/dist/__mocks__/common/mockSearchContextProvider.js +0 -10
- package/dist/__mocks__/common/mockSearchContextProvider.js.map +0 -1
- package/dist/components/AttributesSelectionList/Attribute/Attribute.d.ts +0 -3
- package/dist/components/AttributesSelectionList/Attribute/Attribute.js +0 -50
- package/dist/components/AttributesSelectionList/Attribute/Attribute.js.map +0 -1
- package/dist/components/AttributesSelectionList/Attribute/index.d.ts +0 -2
- package/dist/components/AttributesSelectionList/Attribute/index.js +0 -6
- package/dist/components/AttributesSelectionList/Attribute/index.js.map +0 -1
- package/dist/components/AttributesSelectionList/AttributesSelectionList.d.ts +0 -10
- package/dist/components/AttributesSelectionList/AttributesSelectionList.js +0 -72
- package/dist/components/AttributesSelectionList/AttributesSelectionList.js.map +0 -1
- package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/SelectedAttribute.d.ts +0 -7
- package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/SelectedAttribute.js +0 -39
- package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/SelectedAttribute.js.map +0 -1
- package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/index.d.ts +0 -2
- package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/index.js +0 -6
- package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/index.js.map +0 -1
- package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.d.ts +0 -2
- package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.js +0 -63
- package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.js.map +0 -1
- package/dist/components/AttributesSelectionList/SelectedAttributesList/index.d.ts +0 -2
- package/dist/components/AttributesSelectionList/SelectedAttributesList/index.js +0 -6
- package/dist/components/AttributesSelectionList/SelectedAttributesList/index.js.map +0 -1
- package/dist/components/AttributesSelectionList/_types.d.ts +0 -8
- package/dist/components/AttributesSelectionList/_types.js +0 -2
- package/dist/components/AttributesSelectionList/_types.js.map +0 -1
- package/dist/components/AttributesSelectionList/helpers/attributeToSelectedAttribute.d.ts +0 -3
- package/dist/components/AttributesSelectionList/helpers/attributeToSelectedAttribute.js +0 -9
- package/dist/components/AttributesSelectionList/helpers/attributeToSelectedAttribute.js.map +0 -1
- package/dist/components/AttributesSelectionList/index.d.ts +0 -2
- package/dist/components/AttributesSelectionList/index.js +0 -6
- package/dist/components/AttributesSelectionList/index.js.map +0 -1
- package/dist/components/AttributesSelectionList/reducer/__mocks__/attributesSelectionListStateContext.d.ts +0 -11
- package/dist/components/AttributesSelectionList/reducer/__mocks__/attributesSelectionListStateContext.js +0 -10
- package/dist/components/AttributesSelectionList/reducer/__mocks__/attributesSelectionListStateContext.js.map +0 -1
- package/dist/components/AttributesSelectionList/reducer/attributesSelectionListReducer.d.ts +0 -33
- package/dist/components/AttributesSelectionList/reducer/attributesSelectionListReducer.js +0 -77
- package/dist/components/AttributesSelectionList/reducer/attributesSelectionListReducer.js.map +0 -1
- package/dist/components/AttributesSelectionList/reducer/attributesSelectionListStateContext.d.ts +0 -10
- package/dist/components/AttributesSelectionList/reducer/attributesSelectionListStateContext.js +0 -8
- package/dist/components/AttributesSelectionList/reducer/attributesSelectionListStateContext.js.map +0 -1
- package/dist/components/AttributesSelectionList/sharedComponents.d.ts +0 -809
- package/dist/components/AttributesSelectionList/sharedComponents.js +0 -16
- package/dist/components/AttributesSelectionList/sharedComponents.js.map +0 -1
- package/dist/components/DeactivateRecordsModal/DeactivateRecordsModal.d.ts +0 -10
- package/dist/components/DeactivateRecordsModal/DeactivateRecordsModal.js +0 -39
- package/dist/components/DeactivateRecordsModal/DeactivateRecordsModal.js.map +0 -1
- package/dist/components/DeactivateRecordsModal/index.d.ts +0 -1
- package/dist/components/DeactivateRecordsModal/index.js +0 -5
- package/dist/components/DeactivateRecordsModal/index.js.map +0 -1
- package/dist/components/LibraryItemsList/CreateNewRecordButton/CreateNewRecordButton.d.ts +0 -13
- package/dist/components/LibraryItemsList/CreateNewRecordButton/CreateNewRecordButton.js +0 -50
- package/dist/components/LibraryItemsList/CreateNewRecordButton/CreateNewRecordButton.js.map +0 -1
- package/dist/components/LibraryItemsList/CreateNewRecordButton/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/CreateNewRecordButton/index.js +0 -6
- package/dist/components/LibraryItemsList/CreateNewRecordButton/index.js.map +0 -1
- package/dist/components/LibraryItemsList/DisplayOptions/DisplayOptions.d.ts +0 -2
- package/dist/components/LibraryItemsList/DisplayOptions/DisplayOptions.js +0 -80
- package/dist/components/LibraryItemsList/DisplayOptions/DisplayOptions.js.map +0 -1
- package/dist/components/LibraryItemsList/DisplayOptions/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/DisplayOptions/index.js +0 -6
- package/dist/components/LibraryItemsList/DisplayOptions/index.js.map +0 -1
- package/dist/components/LibraryItemsList/DisplayTypeSelector/DisplayTypeSelector.d.ts +0 -2
- package/dist/components/LibraryItemsList/DisplayTypeSelector/DisplayTypeSelector.js +0 -22
- package/dist/components/LibraryItemsList/DisplayTypeSelector/DisplayTypeSelector.js.map +0 -1
- package/dist/components/LibraryItemsList/DisplayTypeSelector/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/DisplayTypeSelector/index.js +0 -6
- package/dist/components/LibraryItemsList/DisplayTypeSelector/index.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.d.ts +0 -13
- package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js +0 -229
- package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersDropdown/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/FiltersDropdown/index.js +0 -6
- package/dist/components/LibraryItemsList/FiltersDropdown/index.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.d.ts +0 -11
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +0 -328
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/FilterAttributeCondition.d.ts +0 -7
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/FilterAttributeCondition.js +0 -90
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/FilterAttributeCondition.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/index.js +0 -6
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/index.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/BooleanFilter.d.ts +0 -3
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/BooleanFilter.js +0 -13
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/BooleanFilter.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/index.js +0 -6
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/index.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/DateBetweenFilter.d.ts +0 -3
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/DateBetweenFilter.js +0 -26
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/DateBetweenFilter.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/index.js +0 -6
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/index.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/DateFilter.d.ts +0 -3
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/DateFilter.js +0 -22
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/DateFilter.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/index.js +0 -6
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/index.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/NumericFilter.d.ts +0 -3
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/NumericFilter.js +0 -35
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/NumericFilter.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/index.js +0 -6
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/index.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/TextFilter.d.ts +0 -3
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/TextFilter.js +0 -34
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/TextFilter.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/index.js +0 -6
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/index.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/filterUtils.d.ts +0 -2
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/filterUtils.js +0 -16
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/filterUtils.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/index.js +0 -6
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/index.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/FilterDropdownButton.d.ts +0 -8
- package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/FilterDropdownButton.js +0 -11
- package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/FilterDropdownButton.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/index.js +0 -6
- package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/index.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/FilterTreeCondition.d.ts +0 -6
- package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/FilterTreeCondition.js +0 -38
- package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/FilterTreeCondition.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/index.js +0 -6
- package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/index.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/FiltersOptions.d.ts +0 -14
- package/dist/components/LibraryItemsList/FiltersPanel/FiltersOptions.js +0 -147
- package/dist/components/LibraryItemsList/FiltersPanel/FiltersOptions.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/FiltersPanel.d.ts +0 -2
- package/dist/components/LibraryItemsList/FiltersPanel/FiltersPanel.js +0 -121
- package/dist/components/LibraryItemsList/FiltersPanel/FiltersPanel.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/FiltersPanel/index.js +0 -6
- package/dist/components/LibraryItemsList/FiltersPanel/index.js.map +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/mustHideValue.d.ts +0 -3
- package/dist/components/LibraryItemsList/FiltersPanel/mustHideValue.js +0 -17
- package/dist/components/LibraryItemsList/FiltersPanel/mustHideValue.js.map +0 -1
- package/dist/components/LibraryItemsList/IconViewType/IconViewType.d.ts +0 -8
- package/dist/components/LibraryItemsList/IconViewType/IconViewType.js +0 -18
- package/dist/components/LibraryItemsList/IconViewType/IconViewType.js.map +0 -1
- package/dist/components/LibraryItemsList/IconViewType/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/IconViewType/index.js +0 -6
- package/dist/components/LibraryItemsList/IconViewType/index.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsList.d.ts +0 -14
- package/dist/components/LibraryItemsList/LibraryItemsList.js +0 -18
- package/dist/components/LibraryItemsList/LibraryItemsList.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.d.ts +0 -16
- package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js +0 -202
- package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListContent/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListContent/index.js +0 -6
- package/dist/components/LibraryItemsList/LibraryItemsListContent/index.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListEmpty/LibraryItemsListEmpty.d.ts +0 -6
- package/dist/components/LibraryItemsList/LibraryItemsListEmpty/LibraryItemsListEmpty.js +0 -32
- package/dist/components/LibraryItemsList/LibraryItemsListEmpty/LibraryItemsListEmpty.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListEmpty/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListEmpty/index.js +0 -6
- package/dist/components/LibraryItemsList/LibraryItemsListEmpty/index.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListPagination/LibraryItemsListPagination.d.ts +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListPagination/LibraryItemsListPagination.js +0 -21
- package/dist/components/LibraryItemsList/LibraryItemsListPagination/LibraryItemsListPagination.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListPagination/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListPagination/index.js +0 -6
- package/dist/components/LibraryItemsList/LibraryItemsListPagination/index.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/BodyCell.d.ts +0 -8
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/BodyCell.js +0 -56
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/BodyCell.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/index.js +0 -6
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/index.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/BodyRow.d.ts +0 -7
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/BodyRow.js +0 -54
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/BodyRow.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/index.js +0 -6
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/index.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/AllValuesCount.d.ts +0 -8
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/AllValuesCount.js +0 -66
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/AllValuesCount.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/index.js +0 -6
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/index.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/Cell.d.ts +0 -8
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/Cell.js +0 -59
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/Cell.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/CellInfos.d.ts +0 -9
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/CellInfos.js +0 -56
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/CellInfos.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/index.js +0 -6
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/index.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/CellSelection.d.ts +0 -5
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/CellSelection.js +0 -34
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/CellSelection.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/index.js +0 -6
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/index.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/ElementsToDisplay/RichTextDisplay.d.ts +0 -5
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/ElementsToDisplay/RichTextDisplay.js +0 -23
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/ElementsToDisplay/RichTextDisplay.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.d.ts +0 -3
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js +0 -80
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/index.js +0 -6
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/index.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/index.js +0 -6
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/index.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.d.ts +0 -12
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.js +0 -11
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/types.d.ts +0 -12
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/types.js +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/types.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/utils.d.ts +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/utils.js +0 -40
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/utils.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.d.ts +0 -6
- package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.js +0 -81
- package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/index.js +0 -6
- package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/index.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.d.ts +0 -9
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js +0 -142
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/index.js +0 -6
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/index.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Table.d.ts +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Table.js +0 -232
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Table.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/index.js +0 -6
- package/dist/components/LibraryItemsList/LibraryItemsListTable/index.js.map +0 -1
- package/dist/components/LibraryItemsList/MenuItemList/MenuItemList.d.ts +0 -9
- package/dist/components/LibraryItemsList/MenuItemList/MenuItemList.js +0 -27
- package/dist/components/LibraryItemsList/MenuItemList/MenuItemList.js.map +0 -1
- package/dist/components/LibraryItemsList/MenuItemList/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/MenuItemList/index.js +0 -6
- package/dist/components/LibraryItemsList/MenuItemList/index.js.map +0 -1
- package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/ActionsMenu.d.ts +0 -2
- package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/ActionsMenu.js +0 -62
- package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/ActionsMenu.js.map +0 -1
- package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/index.js +0 -6
- package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/index.js.map +0 -1
- package/dist/components/LibraryItemsList/MenuItemListSelected/MenuItemListSelected.d.ts +0 -5
- package/dist/components/LibraryItemsList/MenuItemListSelected/MenuItemListSelected.js +0 -139
- package/dist/components/LibraryItemsList/MenuItemListSelected/MenuItemListSelected.js.map +0 -1
- package/dist/components/LibraryItemsList/MenuItemListSelected/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/MenuItemListSelected/index.js +0 -6
- package/dist/components/LibraryItemsList/MenuItemListSelected/index.js.map +0 -1
- package/dist/components/LibraryItemsList/MenuSelection/MenuSelection.d.ts +0 -2
- package/dist/components/LibraryItemsList/MenuSelection/MenuSelection.js +0 -58
- package/dist/components/LibraryItemsList/MenuSelection/MenuSelection.js.map +0 -1
- package/dist/components/LibraryItemsList/MenuSelection/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/MenuSelection/index.js +0 -6
- package/dist/components/LibraryItemsList/MenuSelection/index.js.map +0 -1
- package/dist/components/LibraryItemsList/MenuView/MenuView.d.ts +0 -6
- package/dist/components/LibraryItemsList/MenuView/MenuView.js +0 -162
- package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +0 -1
- package/dist/components/LibraryItemsList/MenuView/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/MenuView/index.js +0 -6
- package/dist/components/LibraryItemsList/MenuView/index.js.map +0 -1
- package/dist/components/LibraryItemsList/SearchItems/SearchItems.d.ts +0 -2
- package/dist/components/LibraryItemsList/SearchItems/SearchItems.js +0 -21
- package/dist/components/LibraryItemsList/SearchItems/SearchItems.js.map +0 -1
- package/dist/components/LibraryItemsList/SearchItems/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/SearchItems/index.js +0 -6
- package/dist/components/LibraryItemsList/SearchItems/index.js.map +0 -1
- package/dist/components/LibraryItemsList/Sidebar/Sidebar.d.ts +0 -2
- package/dist/components/LibraryItemsList/Sidebar/Sidebar.js +0 -58
- package/dist/components/LibraryItemsList/Sidebar/Sidebar.js.map +0 -1
- package/dist/components/LibraryItemsList/Sidebar/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/Sidebar/index.js +0 -6
- package/dist/components/LibraryItemsList/Sidebar/index.js.map +0 -1
- package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.d.ts +0 -6
- package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.js +0 -199
- package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.js.map +0 -1
- package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/index.js +0 -6
- package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/index.js.map +0 -1
- package/dist/components/LibraryItemsList/TileDisplay/TileDisplay.d.ts +0 -2
- package/dist/components/LibraryItemsList/TileDisplay/TileDisplay.js +0 -50
- package/dist/components/LibraryItemsList/TileDisplay/TileDisplay.js.map +0 -1
- package/dist/components/LibraryItemsList/TileDisplay/helpers/getItemPreviewSize.d.ts +0 -3
- package/dist/components/LibraryItemsList/TileDisplay/helpers/getItemPreviewSize.js +0 -11
- package/dist/components/LibraryItemsList/TileDisplay/helpers/getItemPreviewSize.js.map +0 -1
- package/dist/components/LibraryItemsList/TileDisplay/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/TileDisplay/index.js +0 -6
- package/dist/components/LibraryItemsList/TileDisplay/index.js.map +0 -1
- package/dist/components/LibraryItemsList/VersionsPanel/VersionsPanel.d.ts +0 -2
- package/dist/components/LibraryItemsList/VersionsPanel/VersionsPanel.js +0 -66
- package/dist/components/LibraryItemsList/VersionsPanel/VersionsPanel.js.map +0 -1
- package/dist/components/LibraryItemsList/VersionsPanel/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/VersionsPanel/index.js +0 -6
- package/dist/components/LibraryItemsList/VersionsPanel/index.js.map +0 -1
- package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.d.ts +0 -9
- package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js +0 -85
- package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js.map +0 -1
- package/dist/components/LibraryItemsList/ViewPanel/EditView/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/ViewPanel/EditView/index.js +0 -6
- package/dist/components/LibraryItemsList/ViewPanel/EditView/index.js.map +0 -1
- package/dist/components/LibraryItemsList/ViewPanel/View/View.d.ts +0 -7
- package/dist/components/LibraryItemsList/ViewPanel/View/View.js +0 -152
- package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +0 -1
- package/dist/components/LibraryItemsList/ViewPanel/View/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/ViewPanel/View/index.js +0 -6
- package/dist/components/LibraryItemsList/ViewPanel/View/index.js.map +0 -1
- package/dist/components/LibraryItemsList/ViewPanel/ViewPanel.d.ts +0 -2
- package/dist/components/LibraryItemsList/ViewPanel/ViewPanel.js +0 -209
- package/dist/components/LibraryItemsList/ViewPanel/ViewPanel.js.map +0 -1
- package/dist/components/LibraryItemsList/ViewPanel/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/ViewPanel/index.js +0 -6
- package/dist/components/LibraryItemsList/ViewPanel/index.js.map +0 -1
- package/dist/components/LibraryItemsList/constants.d.ts +0 -12
- package/dist/components/LibraryItemsList/constants.js +0 -19
- package/dist/components/LibraryItemsList/constants.js.map +0 -1
- package/dist/components/LibraryItemsList/helpers/defaultFilterConditionByAttributeFormat.d.ts +0 -3
- package/dist/components/LibraryItemsList/helpers/defaultFilterConditionByAttributeFormat.js +0 -21
- package/dist/components/LibraryItemsList/helpers/defaultFilterConditionByAttributeFormat.js.map +0 -1
- package/dist/components/LibraryItemsList/helpers/displayTypeToPreviewSize.d.ts +0 -3
- package/dist/components/LibraryItemsList/helpers/displayTypeToPreviewSize.js +0 -18
- package/dist/components/LibraryItemsList/helpers/displayTypeToPreviewSize.js.map +0 -1
- package/dist/components/LibraryItemsList/helpers/extractAttributesFromLibrary.d.ts +0 -4
- package/dist/components/LibraryItemsList/helpers/extractAttributesFromLibrary.js +0 -64
- package/dist/components/LibraryItemsList/helpers/extractAttributesFromLibrary.js.map +0 -1
- package/dist/components/LibraryItemsList/helpers/getFieldFromKey.d.ts +0 -5
- package/dist/components/LibraryItemsList/helpers/getFieldFromKey.js +0 -40
- package/dist/components/LibraryItemsList/helpers/getFieldFromKey.js.map +0 -1
- package/dist/components/LibraryItemsList/helpers/getFieldsFromView.d.ts +0 -6
- package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js +0 -10
- package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js.map +0 -1
- package/dist/components/LibraryItemsList/helpers/getFieldsKeyFromAttribute.d.ts +0 -2
- package/dist/components/LibraryItemsList/helpers/getFieldsKeyFromAttribute.js +0 -13
- package/dist/components/LibraryItemsList/helpers/getFieldsKeyFromAttribute.js.map +0 -1
- package/dist/components/LibraryItemsList/helpers/getSortFieldByAttributeType.d.ts +0 -2
- package/dist/components/LibraryItemsList/helpers/getSortFieldByAttributeType.js +0 -18
- package/dist/components/LibraryItemsList/helpers/getSortFieldByAttributeType.js.map +0 -1
- package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.d.ts +0 -8
- package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js +0 -99
- package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js.map +0 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.d.ts +0 -82
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.js +0 -2
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.js.map +0 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/index.js +0 -6
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/index.js.map +0 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchContext.d.ts +0 -7
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchContext.js +0 -7
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchContext.js.map +0 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.d.ts +0 -121
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +0 -228
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js.map +0 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/useSearchReducer.d.ts +0 -5
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/useSearchReducer.js +0 -8
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/useSearchReducer.js.map +0 -1
- package/dist/components/LibraryItemsList/hooks/useUpdateViewsOrderMutation.d.ts +0 -7
- package/dist/components/LibraryItemsList/hooks/useUpdateViewsOrderMutation.js +0 -40
- package/dist/components/LibraryItemsList/hooks/useUpdateViewsOrderMutation.js.map +0 -1
- package/dist/components/LibraryItemsList/index.d.ts +0 -1
- package/dist/components/LibraryItemsList/index.js +0 -5
- package/dist/components/LibraryItemsList/index.js.map +0 -1
- package/dist/components/LibraryItemsList/manageItems.d.ts +0 -11
- package/dist/components/LibraryItemsList/manageItems.js +0 -98
- package/dist/components/LibraryItemsList/manageItems.js.map +0 -1
- package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.d.ts +0 -7
- package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.js +0 -38
- package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.js.map +0 -1
- package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/index.d.ts +0 -2
- package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/index.js +0 -6
- package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/index.js.map +0 -1
- package/dist/components/LibraryItemsList/shared/SelectCellsBtn.d.ts +0 -12
- package/dist/components/LibraryItemsList/shared/SelectCellsBtn.js +0 -29
- package/dist/components/LibraryItemsList/shared/SelectCellsBtn.js.map +0 -1
- package/dist/components/LibraryItemsList/shared/sharedUtils.d.ts +0 -4
- package/dist/components/LibraryItemsList/shared/sharedUtils.js +0 -9
- package/dist/components/LibraryItemsList/shared/sharedUtils.js.map +0 -1
|
@@ -1,162 +0,0 @@
|
|
|
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 { AppstoreFilled, FilterOutlined, MenuOutlined, PlusOutlined, SaveFilled } from '@ant-design/icons';
|
|
6
|
-
import { localizedTranslation, objectToNameValueArray } from '@leav/utils';
|
|
7
|
-
import { Badge, Button, Dropdown, Space, Tooltip } from 'antd';
|
|
8
|
-
import styled from 'styled-components';
|
|
9
|
-
import useSearchReducer from '../../../components/LibraryItemsList/hooks/useSearchReducer';
|
|
10
|
-
import { SearchActionTypes } from '../../../components/LibraryItemsList/hooks/useSearchReducer/searchReducer';
|
|
11
|
-
import useExecuteSaveViewMutation from '../../../hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation';
|
|
12
|
-
import useLang from '../../../hooks/useLang';
|
|
13
|
-
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
14
|
-
import { SidebarContentType } from '../../../types/search';
|
|
15
|
-
import { ViewTypes } from '../../../_gqlTypes';
|
|
16
|
-
import { prepareView } from '../../../_utils';
|
|
17
|
-
import { getRequestFromFilters } from '../../../_utils/getRequestFromFilter';
|
|
18
|
-
import { PREFIX_USER_VIEWS_ORDER_KEY } from '../../../constants';
|
|
19
|
-
import { useUser } from '../../../hooks/useUser/useUser';
|
|
20
|
-
import { defaultView } from '../constants';
|
|
21
|
-
import FiltersDropdown from '../FiltersDropdown';
|
|
22
|
-
import useUpdateViewsOrderMutation from '../hooks/useUpdateViewsOrderMutation';
|
|
23
|
-
import IconViewType from '../IconViewType';
|
|
24
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
25
|
-
import { faUndo, faLayerGroup } from '@fortawesome/free-solid-svg-icons';
|
|
26
|
-
const ViewButton = styled(Button) `
|
|
27
|
-
&& {
|
|
28
|
-
display: flex;
|
|
29
|
-
align-items: center;
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
32
|
-
const ViewLabel = styled.span `
|
|
33
|
-
width: 180px;
|
|
34
|
-
overflow: hidden;
|
|
35
|
-
text-overflow: ellipsis;
|
|
36
|
-
whitespace: nowrap;
|
|
37
|
-
`;
|
|
38
|
-
function MenuView({ library }) {
|
|
39
|
-
const { t } = useSharedTranslation();
|
|
40
|
-
const { lang, defaultLang } = useLang();
|
|
41
|
-
const { state: searchState, dispatch: searchDispatch } = useSearchReducer();
|
|
42
|
-
const { userData } = useUser();
|
|
43
|
-
const { saveView: addView } = useExecuteSaveViewMutation();
|
|
44
|
-
const { updateViewsOrder } = useUpdateViewsOrderMutation(library.id);
|
|
45
|
-
const _toggleShowView = () => {
|
|
46
|
-
const visible = !searchState.sideBar.visible || searchState.sideBar.type !== SidebarContentType.VIEW;
|
|
47
|
-
searchDispatch({
|
|
48
|
-
type: SearchActionTypes.SET_SIDEBAR,
|
|
49
|
-
sidebarType: SidebarContentType.VIEW,
|
|
50
|
-
visible,
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
const _toggleShowFilters = () => {
|
|
54
|
-
const visible = !searchState.sideBar.visible || searchState.sideBar.type !== SidebarContentType.FILTERS;
|
|
55
|
-
searchDispatch({
|
|
56
|
-
type: SearchActionTypes.SET_SIDEBAR,
|
|
57
|
-
sidebarType: SidebarContentType.FILTERS,
|
|
58
|
-
visible,
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
const _toggleShowVersions = () => {
|
|
62
|
-
const visible = !searchState.sideBar.visible || searchState.sideBar.type !== SidebarContentType.FILTERS;
|
|
63
|
-
searchDispatch({
|
|
64
|
-
type: SearchActionTypes.SET_SIDEBAR,
|
|
65
|
-
sidebarType: SidebarContentType.VERSIONS,
|
|
66
|
-
visible,
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
const _resetView = () => {
|
|
70
|
-
searchDispatch({
|
|
71
|
-
type: SearchActionTypes.CHANGE_VIEW,
|
|
72
|
-
view: searchState.view.current,
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
const _getNewViewFromSearchState = () => ({
|
|
76
|
-
library: library.id,
|
|
77
|
-
label: {
|
|
78
|
-
[defaultLang]: t('view.add-view.title', { lng: defaultLang }),
|
|
79
|
-
},
|
|
80
|
-
display: searchState.display,
|
|
81
|
-
shared: false,
|
|
82
|
-
sort: searchState.sort,
|
|
83
|
-
filters: getRequestFromFilters(searchState.filters),
|
|
84
|
-
valuesVersions: searchState.valuesVersions
|
|
85
|
-
? objectToNameValueArray(searchState.valuesVersions)
|
|
86
|
-
.map(version => ({
|
|
87
|
-
treeId: version?.name ?? null,
|
|
88
|
-
treeNode: version?.value?.id ?? null,
|
|
89
|
-
}))
|
|
90
|
-
.filter(v => v.treeId !== null && v.treeNode !== null)
|
|
91
|
-
: null,
|
|
92
|
-
attributes: searchState.fields?.map(f => f.key) ?? [],
|
|
93
|
-
});
|
|
94
|
-
const _saveView = async () => {
|
|
95
|
-
if (searchState.view.current.id !== defaultView.id) {
|
|
96
|
-
// save view in backend
|
|
97
|
-
await addView({
|
|
98
|
-
view: {
|
|
99
|
-
..._getNewViewFromSearchState(),
|
|
100
|
-
id: searchState.view.current.id,
|
|
101
|
-
label: searchState.view.current.label,
|
|
102
|
-
description: searchState.view.current.description,
|
|
103
|
-
shared: searchState.view.current.shared,
|
|
104
|
-
color: searchState.view.current.color,
|
|
105
|
-
sort: searchState.sort ?? null,
|
|
106
|
-
},
|
|
107
|
-
});
|
|
108
|
-
searchDispatch({
|
|
109
|
-
type: SearchActionTypes.SET_VIEW_SYNC,
|
|
110
|
-
sync: true,
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
const _handleAddView = async (viewType) => {
|
|
115
|
-
const newView = {
|
|
116
|
-
..._getNewViewFromSearchState(),
|
|
117
|
-
display: { ...searchState.display, type: viewType },
|
|
118
|
-
};
|
|
119
|
-
// save view in backend
|
|
120
|
-
const newViewRes = await addView({
|
|
121
|
-
view: newView,
|
|
122
|
-
});
|
|
123
|
-
await updateViewsOrder({
|
|
124
|
-
key: PREFIX_USER_VIEWS_ORDER_KEY + newView.library,
|
|
125
|
-
value: [...searchState.userViewsOrder, newViewRes.data.saveView.id],
|
|
126
|
-
global: false,
|
|
127
|
-
});
|
|
128
|
-
searchDispatch({
|
|
129
|
-
type: SearchActionTypes.CHANGE_VIEW,
|
|
130
|
-
view: prepareView(newViewRes.data.saveView, searchState.attributes, searchState.library.id, userData?.userId),
|
|
131
|
-
});
|
|
132
|
-
};
|
|
133
|
-
const menu = {
|
|
134
|
-
items: [
|
|
135
|
-
{
|
|
136
|
-
key: 'add-group',
|
|
137
|
-
type: 'group',
|
|
138
|
-
label: t('view.add-view.title'),
|
|
139
|
-
children: [
|
|
140
|
-
{
|
|
141
|
-
key: 'list',
|
|
142
|
-
onClick: () => _handleAddView(ViewTypes.list),
|
|
143
|
-
icon: _jsx(MenuOutlined, {}),
|
|
144
|
-
label: t('view.type-list'),
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
key: 'cards',
|
|
148
|
-
onClick: () => _handleAddView(ViewTypes.cards),
|
|
149
|
-
icon: _jsx(AppstoreFilled, {}),
|
|
150
|
-
label: t('view.type-cards'),
|
|
151
|
-
},
|
|
152
|
-
],
|
|
153
|
-
},
|
|
154
|
-
],
|
|
155
|
-
};
|
|
156
|
-
return (_jsxs(Space, { size: "large", children: [_jsxs(Button.Group, { children: [_jsx(Tooltip, { title: localizedTranslation(searchState.view.current?.label, lang) || t('select-view.default-view'), children: _jsx(ViewButton, { icon: _jsx(IconViewType, { style: { marginRight: '8px' }, type: searchState.view.current.display.type }), "data-testid": "dropdown-view-options", onClick: _toggleShowView, children: _jsx(ViewLabel, { children: localizedTranslation(searchState.view.current?.label, lang) ||
|
|
157
|
-
t('select-view.default-view') }) }) }), _jsx(Button, { disabled: searchState.view.sync, icon: _jsx(FontAwesomeIcon, { icon: faUndo }), onClick: _resetView, style: { paddingTop: '6px' } }), _jsx(Button, { icon: _jsx(SaveFilled, {}), onClick: _saveView, disabled: searchState.view.sync ||
|
|
158
|
-
searchState.view.current?.id === defaultView.id ||
|
|
159
|
-
!searchState.view.current.owner }), _jsx(Dropdown, { menu: menu, trigger: ['click'], children: _jsx(Button, { icon: _jsx(PlusOutlined, {}) }) })] }), _jsx(Badge, { dot: !!searchState.filters.length, children: _jsxs(Button.Group, { children: [_jsx(Button, { onClick: _toggleShowFilters, icon: _jsx(FilterOutlined, {}), children: t('filters.filters') }), _jsx(FiltersDropdown, { libraryId: library.id, button: _jsx(Button, { icon: _jsx(PlusOutlined, {}), type: "default" }), attributes: library.attributes, trees: library.linkedTrees, libraries: [] })] }) }), _jsx(Button, { onClick: _toggleShowVersions, icon: _jsx(FontAwesomeIcon, { icon: faLayerGroup }), style: { paddingTop: '5px' } })] }));
|
|
160
|
-
}
|
|
161
|
-
export default MenuView;
|
|
162
|
-
//# sourceMappingURL=MenuView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MenuView.js","sourceRoot":"","sources":["../../../../src/components/LibraryItemsList/MenuView/MenuView.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AACzG,OAAO,EAAC,oBAAoB,EAAE,sBAAsB,EAAC,MAAM,aAAa,CAAC;AACzE,OAAO,EAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAkB,KAAK,EAAE,OAAO,EAAC,MAAM,MAAM,CAAC;AAC7E,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,gBAAgB,MAAM,wDAAwD,CAAC;AACtF,OAAO,EAAC,iBAAiB,EAAC,MAAM,sEAAsE,CAAC;AACvG,OAAO,0BAA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AAK,EAAC,GAC5B,EACF,KAAC,MAAM,IACH,IAAI,EAAE,KAAC,UAAU,KAAG,EACpB,OAAO,EAAE,SAAS,EAClB,QAAQ,EACJ,WAAW,CAAC,IAAI,CAAC,IAAI;4BACrB,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,WAAW,CAAC,EAAE;4BAC/C,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,GAErC,EACF,KAAC,QAAQ,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,OAAO,CAAC,YACpC,KAAC,MAAM,IAAC,IAAI,EAAE,KAAC,YAAY,KAAG,GAAW,GAClC,IACA,EACf,KAAC,KAAK,IAAC,GAAG,EAAE,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,YACpC,MAAC,MAAM,CAAC,KAAK,eACT,KAAC,MAAM,IAAC,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAE,KAAC,cAAc,KAAG,YACxD,CAAC,CAAC,iBAAiB,CAAC,GAChB,EACT,KAAC,eAAe,IACZ,SAAS,EAAE,OAAO,CAAC,EAAE,EACrB,MAAM,EAAE,KAAC,MAAM,IAAC,IAAI,EAAE,KAAC,YAAY,KAAG,EAAE,IAAI,EAAC,SAAS,GAAG,EACzD,UAAU,EAAE,OAAO,CAAC,UAAU,EAC9B,KAAK,EAAE,OAAO,CAAC,WAAW,EAC1B,SAAS,EAAE,EAAE,GACf,IACS,GACX,EACR,KAAC,MAAM,IACH,OAAO,EAAE,mBAAmB,EAC5B,IAAI,EAAE,KAAC,eAAe,IAAC,IAAI,EAAE,YAAY,GAAI,EAC7C,KAAK,EAAE,EAAC,UAAU,EAAE,KAAK,EAAC,GAC5B,IACE,CACX,CAAC;AACN,CAAC;AAED,eAAe,QAAQ,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {AppstoreFilled, FilterOutlined, MenuOutlined, PlusOutlined, SaveFilled} from '@ant-design/icons';\nimport {localizedTranslation, objectToNameValueArray} from '@leav/utils';\nimport {Badge, Button, Dropdown, type MenuProps, Space, Tooltip} from 'antd';\nimport styled from 'styled-components';\nimport useSearchReducer from '_ui/components/LibraryItemsList/hooks/useSearchReducer';\nimport {SearchActionTypes} from '_ui/components/LibraryItemsList/hooks/useSearchReducer/searchReducer';\nimport useExecuteSaveViewMutation from '_ui/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation';\nimport useLang from '_ui/hooks/useLang';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {SidebarContentType} from '_ui/types/search';\nimport {type ViewInput, ViewTypes} from '_ui/_gqlTypes';\nimport {type ILibraryDetailExtended} from '_ui/_queries/libraries/getLibraryDetailExtendQuery';\nimport {prepareView} from '_ui/_utils';\nimport {getRequestFromFilters} from '_ui/_utils/getRequestFromFilter';\nimport {PREFIX_USER_VIEWS_ORDER_KEY} from '../../../constants';\nimport {useUser} from '../../../hooks/useUser/useUser';\nimport {defaultView} from '../constants';\nimport FiltersDropdown from '../FiltersDropdown';\nimport useUpdateViewsOrderMutation from '../hooks/useUpdateViewsOrderMutation';\nimport IconViewType from '../IconViewType';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faUndo, faLayerGroup} from '@fortawesome/free-solid-svg-icons';\n\ninterface IMenuViewProps {\n library: ILibraryDetailExtended;\n}\n\nconst ViewButton = styled(Button)`\n && {\n display: flex;\n align-items: center;\n }\n`;\n\nconst ViewLabel = styled.span`\n width: 180px;\n overflow: hidden;\n text-overflow: ellipsis;\n whitespace: nowrap;\n`;\n\nfunction MenuView({library}: IMenuViewProps): JSX.Element {\n const {t} = useSharedTranslation();\n const {lang, defaultLang} = useLang();\n\n const {state: searchState, dispatch: searchDispatch} = useSearchReducer();\n const {userData} = useUser();\n\n const {saveView: addView} = useExecuteSaveViewMutation();\n const {updateViewsOrder} = useUpdateViewsOrderMutation(library.id);\n\n const _toggleShowView = () => {\n const visible = !searchState.sideBar.visible || searchState.sideBar.type !== SidebarContentType.VIEW;\n searchDispatch({\n type: SearchActionTypes.SET_SIDEBAR,\n sidebarType: SidebarContentType.VIEW,\n visible,\n });\n };\n\n const _toggleShowFilters = () => {\n const visible = !searchState.sideBar.visible || searchState.sideBar.type !== SidebarContentType.FILTERS;\n searchDispatch({\n type: SearchActionTypes.SET_SIDEBAR,\n sidebarType: SidebarContentType.FILTERS,\n visible,\n });\n };\n\n const _toggleShowVersions = () => {\n const visible = !searchState.sideBar.visible || searchState.sideBar.type !== SidebarContentType.FILTERS;\n searchDispatch({\n type: SearchActionTypes.SET_SIDEBAR,\n sidebarType: SidebarContentType.VERSIONS,\n visible,\n });\n };\n\n const _resetView = () => {\n searchDispatch({\n type: SearchActionTypes.CHANGE_VIEW,\n view: searchState.view.current,\n });\n };\n\n const _getNewViewFromSearchState = (): ViewInput => ({\n library: library.id,\n label: {\n [defaultLang]: t('view.add-view.title', {lng: defaultLang}),\n },\n display: searchState.display,\n shared: false,\n sort: searchState.sort,\n filters: getRequestFromFilters(searchState.filters),\n valuesVersions: searchState.valuesVersions\n ? objectToNameValueArray(searchState.valuesVersions)\n .map(version => ({\n treeId: version?.name ?? null,\n treeNode: version?.value?.id ?? null,\n }))\n .filter(v => v.treeId !== null && v.treeNode !== null)\n : null,\n attributes: searchState.fields?.map(f => f.key) ?? [],\n });\n\n const _saveView = async () => {\n if (searchState.view.current.id !== defaultView.id) {\n // save view in backend\n await addView({\n view: {\n ..._getNewViewFromSearchState(),\n id: searchState.view.current.id,\n label: searchState.view.current.label,\n description: searchState.view.current.description,\n shared: searchState.view.current.shared,\n color: searchState.view.current.color,\n sort: searchState.sort ?? null,\n },\n });\n\n searchDispatch({\n type: SearchActionTypes.SET_VIEW_SYNC,\n sync: true,\n });\n }\n };\n\n const _handleAddView = async (viewType: ViewTypes) => {\n const newView: ViewInput = {\n ..._getNewViewFromSearchState(),\n display: {...searchState.display, type: viewType},\n };\n\n // save view in backend\n const newViewRes = await addView({\n view: newView,\n });\n\n await updateViewsOrder({\n key: PREFIX_USER_VIEWS_ORDER_KEY + newView.library,\n value: [...searchState.userViewsOrder, newViewRes.data.saveView.id],\n global: false,\n });\n\n searchDispatch({\n type: SearchActionTypes.CHANGE_VIEW,\n view: prepareView(\n newViewRes.data.saveView,\n searchState.attributes,\n searchState.library.id,\n userData?.userId,\n ),\n });\n };\n\n const menu: MenuProps = {\n items: [\n {\n key: 'add-group',\n type: 'group',\n label: t('view.add-view.title'),\n children: [\n {\n key: 'list',\n onClick: () => _handleAddView(ViewTypes.list),\n icon: <MenuOutlined />,\n label: t('view.type-list'),\n },\n {\n key: 'cards',\n onClick: () => _handleAddView(ViewTypes.cards),\n icon: <AppstoreFilled />,\n label: t('view.type-cards'),\n },\n ],\n },\n ],\n };\n\n return (\n <Space size=\"large\">\n <Button.Group>\n <Tooltip\n title={localizedTranslation(searchState.view.current?.label, lang) || t('select-view.default-view')}\n >\n <ViewButton\n icon={\n <IconViewType style={{marginRight: '8px'}} type={searchState.view.current.display.type} />\n }\n data-testid=\"dropdown-view-options\"\n onClick={_toggleShowView}\n >\n <ViewLabel>\n {localizedTranslation(searchState.view.current?.label, lang) ||\n t('select-view.default-view')}\n </ViewLabel>\n </ViewButton>\n </Tooltip>\n <Button\n disabled={searchState.view.sync}\n icon={<FontAwesomeIcon icon={faUndo} />}\n onClick={_resetView}\n style={{paddingTop: '6px'}}\n />\n <Button\n icon={<SaveFilled />}\n onClick={_saveView}\n disabled={\n searchState.view.sync ||\n searchState.view.current?.id === defaultView.id ||\n !searchState.view.current.owner\n }\n />\n <Dropdown menu={menu} trigger={['click']}>\n <Button icon={<PlusOutlined />}></Button>\n </Dropdown>\n </Button.Group>\n <Badge dot={!!searchState.filters.length}>\n <Button.Group>\n <Button onClick={_toggleShowFilters} icon={<FilterOutlined />}>\n {t('filters.filters')}\n </Button>\n <FiltersDropdown\n libraryId={library.id}\n button={<Button icon={<PlusOutlined />} type=\"default\" />}\n attributes={library.attributes}\n trees={library.linkedTrees}\n libraries={[]}\n />\n </Button.Group>\n </Badge>\n <Button\n onClick={_toggleShowVersions}\n icon={<FontAwesomeIcon icon={faLayerGroup} />}\n style={{paddingTop: '5px'}}\n />\n </Space>\n );\n}\n\nexport default MenuView;\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
2
|
-
// This file is released under LGPL V3
|
|
3
|
-
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
|
-
import MenuView from './MenuView';
|
|
5
|
-
export default MenuView;
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/LibraryItemsList/MenuView/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,eAAe,QAAQ,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport MenuView from './MenuView';\n\nexport default MenuView;\n"]}
|
|
@@ -1,21 +0,0 @@
|
|
|
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 { Input } from 'antd';
|
|
6
|
-
import useSearchReducer from '../../../components/LibraryItemsList/hooks/useSearchReducer';
|
|
7
|
-
import { SearchActionTypes } from '../../../components/LibraryItemsList/hooks/useSearchReducer/searchReducer';
|
|
8
|
-
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
9
|
-
function SearchItems() {
|
|
10
|
-
const { state: searchState, dispatch: searchDispatch } = useSearchReducer();
|
|
11
|
-
const { t } = useSharedTranslation();
|
|
12
|
-
const handleChange = (event) => {
|
|
13
|
-
searchDispatch({ type: SearchActionTypes.SET_FULLTEXT, fullText: event.target.value });
|
|
14
|
-
};
|
|
15
|
-
const handleEnter = e => {
|
|
16
|
-
searchDispatch({ type: SearchActionTypes.APPLY_FILTERS });
|
|
17
|
-
};
|
|
18
|
-
return (_jsx(Input.Search, { style: { maxWidth: 500, minWidth: 250 }, placeholder: t('search.placeholder'), value: searchState.fullText, onChange: handleChange, onPressEnter: handleEnter, onSearch: handleEnter, loading: searchState.loading, allowClear: true }));
|
|
19
|
-
}
|
|
20
|
-
export default SearchItems;
|
|
21
|
-
//# sourceMappingURL=SearchItems.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchItems.js","sourceRoot":"","sources":["../../../../src/components/LibraryItemsList/SearchItems/SearchItems.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,KAAK,EAAC,MAAM,MAAM,CAAC;AAE3B,OAAO,gBAAgB,MAAM,wDAAwD,CAAC;AACtF,OAAO,EAAC,iBAAiB,EAAC,MAAM,sEAAsE,CAAC;AACvG,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,SAAS,WAAW;IAChB,MAAM,EAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAC,GAAG,gBAAgB,EAAE,CAAC;IAE1E,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,YAAY,GAAG,CAAC,KAA0C,EAAE,EAAE;QAChE,cAAc,CAAC,EAAC,IAAI,EAAE,iBAAiB,CAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAC,CAAC,CAAC;IACzF,CAAC,CAAC;IAEF,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE;QACpB,cAAc,CAAC,EAAC,IAAI,EAAE,iBAAiB,CAAC,aAAa,EAAC,CAAC,CAAC;IAC5D,CAAC,CAAC;IAEF,OAAO,CACH,KAAC,KAAK,CAAC,MAAM,IACT,KAAK,EAAE,EAAC,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAC,EACrC,WAAW,EAAE,CAAC,CAAC,oBAAoB,CAAC,EACpC,KAAK,EAAE,WAAW,CAAC,QAAQ,EAC3B,QAAQ,EAAE,YAAY,EACtB,YAAY,EAAE,WAAW,EACzB,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,WAAW,CAAC,OAAO,EAC5B,UAAU,SACZ,CACL,CAAC;AACN,CAAC;AAED,eAAe,WAAW,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {Input} from 'antd';\nimport React from 'react';\nimport useSearchReducer from '_ui/components/LibraryItemsList/hooks/useSearchReducer';\nimport {SearchActionTypes} from '_ui/components/LibraryItemsList/hooks/useSearchReducer/searchReducer';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\n\nfunction SearchItems(): JSX.Element {\n const {state: searchState, dispatch: searchDispatch} = useSearchReducer();\n\n const {t} = useSharedTranslation();\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n searchDispatch({type: SearchActionTypes.SET_FULLTEXT, fullText: event.target.value});\n };\n\n const handleEnter = e => {\n searchDispatch({type: SearchActionTypes.APPLY_FILTERS});\n };\n\n return (\n <Input.Search\n style={{maxWidth: 500, minWidth: 250}}\n placeholder={t('search.placeholder')}\n value={searchState.fullText}\n onChange={handleChange}\n onPressEnter={handleEnter}\n onSearch={handleEnter}\n loading={searchState.loading}\n allowClear\n />\n );\n}\n\nexport default SearchItems;\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
2
|
-
// This file is released under LGPL V3
|
|
3
|
-
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
|
-
import SearchItems from './SearchItems';
|
|
5
|
-
export default SearchItems;
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/LibraryItemsList/SearchItems/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,eAAe,WAAW,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport SearchItems from './SearchItems';\n\nexport default SearchItems;\n"]}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
|
-
// This file is released under LGPL V3
|
|
4
|
-
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
-
import styled from 'styled-components';
|
|
6
|
-
import { SidebarContentType } from '../../../types/search';
|
|
7
|
-
import FiltersPanel from '../FiltersPanel';
|
|
8
|
-
import useSearchReducer from '../hooks/useSearchReducer';
|
|
9
|
-
import VersionsPanel from '../VersionsPanel';
|
|
10
|
-
import ViewPanel from '../ViewPanel';
|
|
11
|
-
const Wrapper = styled.div `
|
|
12
|
-
grid-area: side;
|
|
13
|
-
display: ${({ $visible }) => ($visible ? 'flex' : 'none')};
|
|
14
|
-
position: relative;
|
|
15
|
-
height: calc(100vh - 7rem);
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
|
|
18
|
-
&.wrapped-filter-open {
|
|
19
|
-
animation-name: filter-animation-open;
|
|
20
|
-
animation-duration: 1s;
|
|
21
|
-
animation-timing-function: ease;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@keyframes filter-animation-open {
|
|
25
|
-
from {
|
|
26
|
-
opacity: 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
to {
|
|
30
|
-
opacity: 1;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&.wrapped-filter-close {
|
|
35
|
-
animation-name: filter-animation-close;
|
|
36
|
-
animation-duration: 1s;
|
|
37
|
-
animation-timing-function: ease-out;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@keyframes filter-animation-close {
|
|
41
|
-
from {
|
|
42
|
-
/* transform: translate(0); */
|
|
43
|
-
opacity: 1;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
to {
|
|
47
|
-
/* transform: translate(-50rem); */
|
|
48
|
-
opacity: 0;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
`;
|
|
52
|
-
function Sidebar() {
|
|
53
|
-
const { state } = useSearchReducer();
|
|
54
|
-
const { visible, type } = state.sideBar;
|
|
55
|
-
return (_jsxs(Wrapper, { "$visible": visible, className: visible ? 'wrapped-filter-open' : 'wrapped-filter-close', children: [visible && type === SidebarContentType.FILTERS && _jsx(FiltersPanel, {}), visible && type === SidebarContentType.VIEW && _jsx(ViewPanel, {}), visible && type === SidebarContentType.VERSIONS && _jsx(VersionsPanel, {})] }));
|
|
56
|
-
}
|
|
57
|
-
export default Sidebar;
|
|
58
|
-
//# sourceMappingURL=Sidebar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../../../../src/components/LibraryItemsList/Sidebar/Sidebar.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,MAAwB,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AACpD,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,SAAS,MAAM,cAAc,CAAC;AAOrC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAe;;eAE1B,CAAC,EAAC,QAAQ,EAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsC1D,CAAC;AAEF,SAAS,OAAO;IACZ,MAAM,EAAC,KAAK,EAAC,GAAG,gBAAgB,EAAE,CAAC;IACnC,MAAM,EAAC,OAAO,EAAE,IAAI,EAAC,GAAG,KAAK,CAAC,OAAO,CAAC;IAEtC,OAAO,CACH,MAAC,OAAO,gBAAW,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,sBAAsB,aAC1F,OAAO,IAAI,IAAI,KAAK,kBAAkB,CAAC,OAAO,IAAI,KAAC,YAAY,KAAG,EAClE,OAAO,IAAI,IAAI,KAAK,kBAAkB,CAAC,IAAI,IAAI,KAAC,SAAS,KAAG,EAC5D,OAAO,IAAI,IAAI,KAAK,kBAAkB,CAAC,QAAQ,IAAI,KAAC,aAAa,KAAG,IAC/D,CACb,CAAC;AACN,CAAC;AAED,eAAe,OAAO,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport styled, {type CSSObject} from 'styled-components';\nimport {SidebarContentType} from '_ui/types/search';\nimport FiltersPanel from '../FiltersPanel';\nimport useSearchReducer from '../hooks/useSearchReducer';\nimport VersionsPanel from '../VersionsPanel';\nimport ViewPanel from '../ViewPanel';\n\ninterface IWrapperProps {\n $visible: boolean;\n style?: CSSObject;\n}\n\nconst Wrapper = styled.div<IWrapperProps>`\n grid-area: side;\n display: ${({$visible}) => ($visible ? 'flex' : 'none')};\n position: relative;\n height: calc(100vh - 7rem);\n overflow: hidden;\n\n &.wrapped-filter-open {\n animation-name: filter-animation-open;\n animation-duration: 1s;\n animation-timing-function: ease;\n }\n\n @keyframes filter-animation-open {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n }\n\n &.wrapped-filter-close {\n animation-name: filter-animation-close;\n animation-duration: 1s;\n animation-timing-function: ease-out;\n }\n\n @keyframes filter-animation-close {\n from {\n /* transform: translate(0); */\n opacity: 1;\n }\n\n to {\n /* transform: translate(-50rem); */\n opacity: 0;\n }\n }\n`;\n\nfunction Sidebar(): JSX.Element {\n const {state} = useSearchReducer();\n const {visible, type} = state.sideBar;\n\n return (\n <Wrapper $visible={visible} className={visible ? 'wrapped-filter-open' : 'wrapped-filter-close'}>\n {visible && type === SidebarContentType.FILTERS && <FiltersPanel />}\n {visible && type === SidebarContentType.VIEW && <ViewPanel />}\n {visible && type === SidebarContentType.VERSIONS && <VersionsPanel />}\n </Wrapper>\n );\n}\n\nexport default Sidebar;\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
2
|
-
// This file is released under LGPL V3
|
|
3
|
-
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
|
-
import Sidebar from './Sidebar';
|
|
5
|
-
export default Sidebar;
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/LibraryItemsList/Sidebar/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,eAAe,OAAO,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport Sidebar from './Sidebar';\n\nexport default Sidebar;\n"]}
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } 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 { CheckCircleFilled, CheckOutlined } from '@ant-design/icons';
|
|
6
|
-
import { Button, Card, Space, Tooltip } from 'antd';
|
|
7
|
-
import Paragraph from 'antd/lib/typography/Paragraph';
|
|
8
|
-
import { useEffect, useState } from 'react';
|
|
9
|
-
import styled from 'styled-components';
|
|
10
|
-
import { themeVars } from '../../../../antdTheme';
|
|
11
|
-
import { EntityPreview } from '../../../../components';
|
|
12
|
-
import useSearchReducer from '../../../../components/LibraryItemsList/hooks/useSearchReducer';
|
|
13
|
-
import DeactivateRecordBtn from '../../../../components/LibraryItemsList/shared/DeactivateRecordBtn';
|
|
14
|
-
import SelectCellsBtn from '../../../../components/LibraryItemsList/shared/SelectCellsBtn';
|
|
15
|
-
import EditRecordBtn from '../../../../components/RecordEdition/EditRecordBtn';
|
|
16
|
-
import { EditRecordModal } from '../../../../components/RecordEdition/EditRecordModal';
|
|
17
|
-
import { PreviewSize } from '../../../../constants';
|
|
18
|
-
import useLang from '../../../../hooks/useLang';
|
|
19
|
-
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
20
|
-
import { stopEvent } from '../../../../_utils';
|
|
21
|
-
import { displayTypeToPreviewSize } from '../../helpers/displayTypeToPreviewSize';
|
|
22
|
-
import { SearchActionTypes } from '../../hooks/useSearchReducer/searchReducer';
|
|
23
|
-
import getItemPreviewSize from '../helpers/getItemPreviewSize';
|
|
24
|
-
import { SelectCellsBtnType } from '../../../../components/LibraryItemsList/shared/sharedUtils';
|
|
25
|
-
const buttonsColor = '#333333';
|
|
26
|
-
// Using 8 digit hexadecimal notation to add transparency
|
|
27
|
-
const hoverBackgroundColor = `${themeVars.activeColor}AA`;
|
|
28
|
-
const selectedBackgroundColor = `${themeVars.activeColor}DF`;
|
|
29
|
-
const Item = styled(Card) `
|
|
30
|
-
&& {
|
|
31
|
-
width: ${p => p.$previewSize};
|
|
32
|
-
margin: 0.5em;
|
|
33
|
-
outline: 2px solid transparent;
|
|
34
|
-
|
|
35
|
-
& .ant-card-cover {
|
|
36
|
-
width: ${p => p.$previewSize};
|
|
37
|
-
height: ${p => p.$previewSize};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&:hover {
|
|
41
|
-
outline-color: ${themeVars.primaryColor};
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
`;
|
|
45
|
-
const ImageWrapper = styled.div `
|
|
46
|
-
position: relative;
|
|
47
|
-
border-bottom: 1px solid ${themeVars.borderLightColor};
|
|
48
|
-
`;
|
|
49
|
-
const ActionsWrapper = styled.div `
|
|
50
|
-
display: flex;
|
|
51
|
-
position: absolute;
|
|
52
|
-
top: 0;
|
|
53
|
-
left: 0;
|
|
54
|
-
right: 0;
|
|
55
|
-
bottom: 0;
|
|
56
|
-
|
|
57
|
-
justify-content: center;
|
|
58
|
-
|
|
59
|
-
&:hover {
|
|
60
|
-
.actions {
|
|
61
|
-
animation: show-actions 300ms ease;
|
|
62
|
-
opacity: 1;
|
|
63
|
-
background: ${hoverBackgroundColor};
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
@keyframes show-actions {
|
|
68
|
-
from {
|
|
69
|
-
opacity: 0;
|
|
70
|
-
background: none;
|
|
71
|
-
}
|
|
72
|
-
to {
|
|
73
|
-
opacity: 1;
|
|
74
|
-
background: ${hoverBackgroundColor};
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
`;
|
|
78
|
-
const Selection = styled.div `
|
|
79
|
-
position: absolute;
|
|
80
|
-
width: 100%;
|
|
81
|
-
height: 100%;
|
|
82
|
-
cursor: pointer;
|
|
83
|
-
|
|
84
|
-
display: flex;
|
|
85
|
-
align-items: center;
|
|
86
|
-
justify-content: center;
|
|
87
|
-
background: ${p => (p.checked ? selectedBackgroundColor : 'none')};
|
|
88
|
-
|
|
89
|
-
&:hover {
|
|
90
|
-
background: ${p => (p.checked ? selectedBackgroundColor : hoverBackgroundColor)};
|
|
91
|
-
}
|
|
92
|
-
`;
|
|
93
|
-
const SelectionActions = styled(Space) `
|
|
94
|
-
&& {
|
|
95
|
-
display: none;
|
|
96
|
-
position: absolute;
|
|
97
|
-
top: 1em;
|
|
98
|
-
}
|
|
99
|
-
${Selection}:hover & {
|
|
100
|
-
display: inherit;
|
|
101
|
-
}
|
|
102
|
-
button {
|
|
103
|
-
color: ${buttonsColor};
|
|
104
|
-
border-color: ${buttonsColor};
|
|
105
|
-
}
|
|
106
|
-
`;
|
|
107
|
-
const Actions = styled.div `
|
|
108
|
-
position: absolute;
|
|
109
|
-
display: grid;
|
|
110
|
-
grid-template-columns: 1fr 1fr;
|
|
111
|
-
opacity: 0;
|
|
112
|
-
width: 100%;
|
|
113
|
-
height: 100%;
|
|
114
|
-
grid-gap: 1rem;
|
|
115
|
-
|
|
116
|
-
justify-items: center;
|
|
117
|
-
align-items: center;
|
|
118
|
-
justify-content: center;
|
|
119
|
-
|
|
120
|
-
border-radius: 0.25rem 0.25rem 0 0;
|
|
121
|
-
|
|
122
|
-
button {
|
|
123
|
-
color: ${buttonsColor};
|
|
124
|
-
border-color: ${buttonsColor}66;
|
|
125
|
-
|
|
126
|
-
// Arrange buttons, depending on their position on the grid
|
|
127
|
-
&:nth-child(1) {
|
|
128
|
-
justify-self: end;
|
|
129
|
-
align-self: end;
|
|
130
|
-
}
|
|
131
|
-
&:nth-child(2) {
|
|
132
|
-
justify-self: start;
|
|
133
|
-
align-self: end;
|
|
134
|
-
}
|
|
135
|
-
&:nth-child(3) {
|
|
136
|
-
justify-self: end;
|
|
137
|
-
align-self: start;
|
|
138
|
-
}
|
|
139
|
-
&:nth-child(4) {
|
|
140
|
-
justify-self: start;
|
|
141
|
-
align-self: start;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
`;
|
|
145
|
-
const CheckedIconWrapper = styled.div `
|
|
146
|
-
font-size: 3em;
|
|
147
|
-
color: ${themeVars.primaryColor};
|
|
148
|
-
`;
|
|
149
|
-
function ItemTileDisplay({ item }) {
|
|
150
|
-
const { t } = useSharedTranslation();
|
|
151
|
-
const { state: searchState, dispatch: searchDispatch } = useSearchReducer();
|
|
152
|
-
const canDeleteRecord = searchState.library.permissions.delete_record;
|
|
153
|
-
const [editRecord, setEditRecord] = useState(false);
|
|
154
|
-
const previewSize = displayTypeToPreviewSize(searchState.display.size);
|
|
155
|
-
const { lang } = useLang();
|
|
156
|
-
const [isSelected, setIsSelect] = useState(!!searchState.selection.selected.some(elementSelected => elementSelected.id === item.whoAmI.id && elementSelected.library === item.whoAmI.library.id));
|
|
157
|
-
const mustShowTransparency = searchState.showTransparency;
|
|
158
|
-
const isAllSelected = searchState.selection.allSelected;
|
|
159
|
-
const selectedToggle = (e) => {
|
|
160
|
-
e.stopPropagation();
|
|
161
|
-
e.preventDefault();
|
|
162
|
-
setIsSelect(!isSelected);
|
|
163
|
-
const newSelected = {
|
|
164
|
-
id: item.whoAmI.id,
|
|
165
|
-
library: item.whoAmI.library.id,
|
|
166
|
-
label: item.whoAmI.label,
|
|
167
|
-
};
|
|
168
|
-
searchDispatch({
|
|
169
|
-
type: SearchActionTypes.TOGGLE_RECORD_SELECTION,
|
|
170
|
-
record: newSelected,
|
|
171
|
-
});
|
|
172
|
-
};
|
|
173
|
-
useEffect(() => {
|
|
174
|
-
setIsSelect(searchState.selection.selected.some(elementSelected => elementSelected.id === item.whoAmI.id && elementSelected.library === item.whoAmI.library.id));
|
|
175
|
-
}, [searchState.selection, item, searchState]);
|
|
176
|
-
const _handleClose = () => {
|
|
177
|
-
setEditRecord(false);
|
|
178
|
-
};
|
|
179
|
-
const _handleSelect = e => {
|
|
180
|
-
stopEvent(e);
|
|
181
|
-
selectedToggle(e);
|
|
182
|
-
};
|
|
183
|
-
const isChecked = isSelected || isAllSelected;
|
|
184
|
-
const isSelectActive = searchState.selection.selected.length || searchState.selection.allSelected;
|
|
185
|
-
const itemPreviewSize = getItemPreviewSize(previewSize);
|
|
186
|
-
return (_jsxs(_Fragment, { children: [editRecord && (_jsx(EditRecordModal, { open: editRecord, record: item.whoAmI, library: item.whoAmI.library.id, onClose: _handleClose })), _jsx(Item, { "$previewSize": itemPreviewSize, size: "small", onClick: selectedToggle, onDoubleClick: () => setEditRecord(true), cover: _jsxs(ImageWrapper, { children: [_jsx(EntityPreview, { label: item.whoAmI.label || item.whoAmI.id, image: String(item.whoAmI.preview?.[previewSize] ?? ''), tile: true, style: {
|
|
187
|
-
width: itemPreviewSize,
|
|
188
|
-
height: itemPreviewSize,
|
|
189
|
-
}, placeholderStyle: {
|
|
190
|
-
width: itemPreviewSize,
|
|
191
|
-
height: itemPreviewSize,
|
|
192
|
-
}, imageStyle: {
|
|
193
|
-
background: mustShowTransparency ? themeVars.checkerBoard : 'transparent',
|
|
194
|
-
} }), _jsx(ActionsWrapper, { children: isChecked || isSelectActive ? (_jsxs(Selection, { checked: isChecked, children: [_jsxs(SelectionActions, { children: [_jsx(SelectCellsBtn, { selectionType: SelectCellsBtnType.ONLY, text: t('items-list-row.select-only'), record: item.whoAmI, size: "small" }), _jsx(SelectCellsBtn, { selectionType: SelectCellsBtnType.ALL, text: t('items-list-row.select-all'), record: item.whoAmI, size: "small" })] }), isChecked && (_jsx(CheckedIconWrapper, { className: "checked-icon", children: _jsx(CheckCircleFilled, {}) }))] })) : (_jsxs(Actions, { className: "actions", children: [_jsx(Tooltip, { title: t('global.select'), children: _jsx(Button, { shape: "circle", icon: _jsx(CheckOutlined, {}), onClick: _handleSelect }) }, "select"), _jsx(Tooltip, { title: t('global.edit'), children: _jsx(EditRecordBtn, { shape: "circle", record: item.whoAmI, valuesVersion: searchState.valuesVersions }) }, "edit"), canDeleteRecord ? (_jsx(Tooltip, { title: t('global.delete'), children: _jsx(DeactivateRecordBtn, { record: item.whoAmI }) }, "delete")) : (
|
|
195
|
-
// Keep this empty div for styling purpose
|
|
196
|
-
_jsx("div", {}))] })) })] }), children: _jsx(Card.Meta, { title: _jsx(Paragraph, { ellipsis: { rows: 1, tooltip: true }, style: { marginBottom: 0, fontSize: previewSize === PreviewSize.SMALL ? '.8em' : '1em' }, children: item.whoAmI.label || item.whoAmI.id }) }) })] }));
|
|
197
|
-
}
|
|
198
|
-
export default ItemTileDisplay;
|
|
199
|
-
//# sourceMappingURL=ItemTileDisplay.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ItemTileDisplay.js","sourceRoot":"","sources":["../../../../../src/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,iBAAiB,EAAE,aAAa,EAAC,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAC,MAAM,MAAM,CAAC;AAClD,OAAO,SAAS,MAAM,+BAA+B,CAAC;AACtD,OAAc,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACjD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AACxC,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,gBA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,IACN,YAGnB,KAAC,IAAI,CAAC,IAAI,IACN,KAAK,EACD,KAAC,SAAS,IACN,QAAQ,EAAE,EAAC,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAC,EAClC,KAAK,EAAE,EAAC,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,KAAK,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,EAAC,YAErF,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,GAC5B,GAElB,GACC,IACR,CACN,CAAC;AACN,CAAC;AAED,eAAe,eAAe,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {CheckCircleFilled, CheckOutlined} from '@ant-design/icons';\nimport {Button, Card, Space, Tooltip} from 'antd';\nimport Paragraph from 'antd/lib/typography/Paragraph';\nimport React, {useEffect, useState} from 'react';\nimport styled from 'styled-components';\nimport {themeVars} from '_ui/antdTheme';\nimport {EntityPreview} from '_ui/components';\nimport useSearchReducer from '_ui/components/LibraryItemsList/hooks/useSearchReducer';\nimport DeactivateRecordBtn from '_ui/components/LibraryItemsList/shared/DeactivateRecordBtn';\nimport SelectCellsBtn from '_ui/components/LibraryItemsList/shared/SelectCellsBtn';\nimport EditRecordBtn from '_ui/components/RecordEdition/EditRecordBtn';\nimport {EditRecordModal} from '_ui/components/RecordEdition/EditRecordModal';\nimport {PreviewSize} from '_ui/constants';\nimport useLang from '_ui/hooks/useLang';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {type IItem, type ISelectedRecord} from '_ui/types/search';\nimport {stopEvent} from '_ui/_utils';\nimport {displayTypeToPreviewSize} from '../../helpers/displayTypeToPreviewSize';\nimport {SearchActionTypes} from '../../hooks/useSearchReducer/searchReducer';\nimport getItemPreviewSize from '../helpers/getItemPreviewSize';\nimport {SelectCellsBtnType} from '_ui/components/LibraryItemsList/shared/sharedUtils';\n\nconst buttonsColor = '#333333';\n\n// Using 8 digit hexadecimal notation to add transparency\nconst hoverBackgroundColor = `${themeVars.activeColor}AA`;\nconst selectedBackgroundColor = `${themeVars.activeColor}DF`;\n\nconst Item = styled(Card)<{$previewSize: string}>`\n && {\n width: ${p => p.$previewSize};\n margin: 0.5em;\n outline: 2px solid transparent;\n\n & .ant-card-cover {\n width: ${p => p.$previewSize};\n height: ${p => p.$previewSize};\n }\n\n &:hover {\n outline-color: ${themeVars.primaryColor};\n }\n }\n`;\n\nconst ImageWrapper = styled.div`\n position: relative;\n border-bottom: 1px solid ${themeVars.borderLightColor};\n`;\n\nconst ActionsWrapper = styled.div`\n display: flex;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n justify-content: center;\n\n &:hover {\n .actions {\n animation: show-actions 300ms ease;\n opacity: 1;\n background: ${hoverBackgroundColor};\n }\n }\n\n @keyframes show-actions {\n from {\n opacity: 0;\n background: none;\n }\n to {\n opacity: 1;\n background: ${hoverBackgroundColor};\n }\n }\n`;\n\nconst Selection = styled.div<{checked: boolean}>`\n position: absolute;\n width: 100%;\n height: 100%;\n cursor: pointer;\n\n display: flex;\n align-items: center;\n justify-content: center;\n background: ${p => (p.checked ? selectedBackgroundColor : 'none')};\n\n &:hover {\n background: ${p => (p.checked ? selectedBackgroundColor : hoverBackgroundColor)};\n }\n`;\n\nconst SelectionActions = styled(Space)`\n && {\n display: none;\n position: absolute;\n top: 1em;\n }\n ${Selection}:hover & {\n display: inherit;\n }\n button {\n color: ${buttonsColor};\n border-color: ${buttonsColor};\n }\n`;\n\nconst Actions = styled.div`\n position: absolute;\n display: grid;\n grid-template-columns: 1fr 1fr;\n opacity: 0;\n width: 100%;\n height: 100%;\n grid-gap: 1rem;\n\n justify-items: center;\n align-items: center;\n justify-content: center;\n\n border-radius: 0.25rem 0.25rem 0 0;\n\n button {\n color: ${buttonsColor};\n border-color: ${buttonsColor}66;\n\n // Arrange buttons, depending on their position on the grid\n &:nth-child(1) {\n justify-self: end;\n align-self: end;\n }\n &:nth-child(2) {\n justify-self: start;\n align-self: end;\n }\n &:nth-child(3) {\n justify-self: end;\n align-self: start;\n }\n &:nth-child(4) {\n justify-self: start;\n align-self: start;\n }\n }\n`;\n\nconst CheckedIconWrapper = styled.div`\n font-size: 3em;\n color: ${themeVars.primaryColor};\n`;\n\ninterface IItemTileDisplayProps {\n item: IItem;\n}\n\nfunction ItemTileDisplay({item}: IItemTileDisplayProps): JSX.Element {\n const {t} = useSharedTranslation();\n const {state: searchState, dispatch: searchDispatch} = useSearchReducer();\n\n const canDeleteRecord = searchState.library.permissions.delete_record;\n\n const [editRecord, setEditRecord] = useState<boolean>(false);\n const previewSize: PreviewSize = displayTypeToPreviewSize(searchState.display.size);\n\n const {lang} = useLang();\n const [isSelected, setIsSelect] = useState<boolean>(\n !!searchState.selection.selected.some(\n elementSelected =>\n elementSelected.id === item.whoAmI.id && elementSelected.library === item.whoAmI.library.id,\n ),\n );\n\n const mustShowTransparency = searchState.showTransparency;\n\n const isAllSelected = searchState.selection.allSelected;\n\n const selectedToggle = (e: React.MouseEvent) => {\n e.stopPropagation();\n e.preventDefault();\n\n setIsSelect(!isSelected);\n\n const newSelected: ISelectedRecord = {\n id: item.whoAmI.id,\n library: item.whoAmI.library.id,\n label: item.whoAmI.label,\n };\n\n searchDispatch({\n type: SearchActionTypes.TOGGLE_RECORD_SELECTION,\n record: newSelected,\n });\n };\n\n useEffect(() => {\n setIsSelect(\n searchState.selection.selected.some(\n elementSelected =>\n elementSelected.id === item.whoAmI.id && elementSelected.library === item.whoAmI.library.id,\n ),\n );\n }, [searchState.selection, item, searchState]);\n\n const _handleClose = () => {\n setEditRecord(false);\n };\n\n const _handleSelect = e => {\n stopEvent(e);\n selectedToggle(e);\n };\n\n const isChecked = isSelected || isAllSelected;\n\n const isSelectActive = searchState.selection.selected.length || searchState.selection.allSelected;\n\n const itemPreviewSize = getItemPreviewSize(previewSize);\n\n return (\n <>\n {editRecord && (\n <EditRecordModal\n open={editRecord}\n record={item.whoAmI}\n library={item.whoAmI.library.id}\n onClose={_handleClose}\n />\n )}\n <Item\n $previewSize={itemPreviewSize}\n size=\"small\"\n onClick={selectedToggle}\n onDoubleClick={() => setEditRecord(true)}\n cover={\n <ImageWrapper>\n <EntityPreview\n label={item.whoAmI.label || item.whoAmI.id}\n image={String(item.whoAmI.preview?.[previewSize] ?? '')}\n tile={true}\n style={{\n width: itemPreviewSize,\n height: itemPreviewSize,\n }}\n placeholderStyle={{\n width: itemPreviewSize,\n height: itemPreviewSize,\n }}\n imageStyle={{\n background: mustShowTransparency ? themeVars.checkerBoard : 'transparent',\n }}\n />\n <ActionsWrapper>\n {isChecked || isSelectActive ? (\n <Selection checked={isChecked}>\n <SelectionActions>\n <SelectCellsBtn\n selectionType={SelectCellsBtnType.ONLY}\n text={t('items-list-row.select-only')}\n record={item.whoAmI}\n size=\"small\"\n />\n <SelectCellsBtn\n selectionType={SelectCellsBtnType.ALL}\n text={t('items-list-row.select-all')}\n record={item.whoAmI}\n size=\"small\"\n />\n </SelectionActions>\n {isChecked && (\n <CheckedIconWrapper className=\"checked-icon\">\n <CheckCircleFilled />\n </CheckedIconWrapper>\n )}\n </Selection>\n ) : (\n <Actions className=\"actions\">\n <Tooltip title={t('global.select')} key=\"select\">\n <Button shape=\"circle\" icon={<CheckOutlined />} onClick={_handleSelect} />\n </Tooltip>\n <Tooltip title={t('global.edit')} key=\"edit\">\n <EditRecordBtn\n shape=\"circle\"\n record={item.whoAmI}\n valuesVersion={searchState.valuesVersions}\n />\n </Tooltip>\n {canDeleteRecord ? (\n <Tooltip title={t('global.delete')} key=\"delete\">\n <DeactivateRecordBtn record={item.whoAmI} />\n </Tooltip>\n ) : (\n // Keep this empty div for styling purpose\n <div></div>\n )}\n </Actions>\n )}\n </ActionsWrapper>\n </ImageWrapper>\n }\n >\n <Card.Meta\n title={\n <Paragraph\n ellipsis={{rows: 1, tooltip: true}}\n style={{marginBottom: 0, fontSize: previewSize === PreviewSize.SMALL ? '.8em' : '1em'}}\n >\n {item.whoAmI.label || item.whoAmI.id}\n </Paragraph>\n }\n />\n </Item>\n </>\n );\n}\n\nexport default ItemTileDisplay;\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
2
|
-
// This file is released under LGPL V3
|
|
3
|
-
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
|
-
import ItemTileDisplay from './ItemTileDisplay';
|
|
5
|
-
export default ItemTileDisplay;
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/LibraryItemsList/TileDisplay/ItemTileDisplay/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,eAAe,eAAe,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport ItemTileDisplay from './ItemTileDisplay';\n\nexport default ItemTileDisplay;\n"]}
|