@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,209 +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 { faAngleLeft } from '@fortawesome/free-solid-svg-icons';
|
|
6
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
7
|
-
import { localizedTranslation } from '@leav/utils';
|
|
8
|
-
import { Badge, Button, Input } from 'antd';
|
|
9
|
-
import { useState } from 'react';
|
|
10
|
-
import { DndContext, closestCenter } from '@dnd-kit/core';
|
|
11
|
-
import { SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
12
|
-
import styled from 'styled-components';
|
|
13
|
-
import { themeVars } from '../../../antdTheme';
|
|
14
|
-
import { ErrorDisplay } from '../../../components/ErrorDisplay';
|
|
15
|
-
import useSearchReducer from '../../../components/LibraryItemsList/hooks/useSearchReducer';
|
|
16
|
-
import { SearchActionTypes } from '../../../components/LibraryItemsList/hooks/useSearchReducer/searchReducer';
|
|
17
|
-
import { Loading } from '../../../components/Loading';
|
|
18
|
-
import { PREFIX_SHARED_VIEWS_ORDER_KEY, PREFIX_USER_VIEWS_ORDER_KEY } from '../../../constants';
|
|
19
|
-
import { useLang } from '../../../hooks';
|
|
20
|
-
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
21
|
-
import { useUser } from '../../../hooks/useUser/useUser';
|
|
22
|
-
import { useGetUserDataQuery, useGetViewsListQuery } from '../../../_gqlTypes';
|
|
23
|
-
import { prepareView } from '../../../_utils';
|
|
24
|
-
import useUpdateViewsOrderMutation from '../hooks/useUpdateViewsOrderMutation';
|
|
25
|
-
import EditView from './EditView';
|
|
26
|
-
import View from './View';
|
|
27
|
-
const Wrapper = styled.div `
|
|
28
|
-
width: 100%;
|
|
29
|
-
display: flex;
|
|
30
|
-
flex-flow: column nowrap;
|
|
31
|
-
border-right: ${themeVars.borderLightColor} 1px solid;
|
|
32
|
-
overflow-y: auto;
|
|
33
|
-
`;
|
|
34
|
-
const Header = styled.div `
|
|
35
|
-
width: 100%;
|
|
36
|
-
background-color: ${themeVars.headerBg};
|
|
37
|
-
display: grid;
|
|
38
|
-
grid-template-columns: repeat(2, auto);
|
|
39
|
-
justify-content: space-between;
|
|
40
|
-
padding: 0.3rem 0.3rem 0.3rem 1rem;
|
|
41
|
-
font-weight: 700;
|
|
42
|
-
border-bottom: 1px solid ${themeVars.borderLightColor};
|
|
43
|
-
|
|
44
|
-
& > * {
|
|
45
|
-
:first-of-type {
|
|
46
|
-
display: grid;
|
|
47
|
-
column-gap: 8px;
|
|
48
|
-
grid-template-columns: repeat(3, auto);
|
|
49
|
-
align-items: center;
|
|
50
|
-
justify-items: center;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
:last-of-type {
|
|
54
|
-
display: grid;
|
|
55
|
-
align-items: center;
|
|
56
|
-
justify-content: flex-end;
|
|
57
|
-
column-gap: 8px;
|
|
58
|
-
grid-template-columns: repeat(2, auto);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
`;
|
|
62
|
-
const SubHeader = styled.div `
|
|
63
|
-
width: 100%;
|
|
64
|
-
border-top: ${themeVars.activeColor} 1px solid;
|
|
65
|
-
border-bottom: ${themeVars.activeColor} 1px solid;
|
|
66
|
-
padding: 0.3rem;
|
|
67
|
-
padding-left: 1rem;
|
|
68
|
-
font-weight: 700;
|
|
69
|
-
font-size: 14px;
|
|
70
|
-
`;
|
|
71
|
-
const Views = styled.div `
|
|
72
|
-
width: 100%;
|
|
73
|
-
`;
|
|
74
|
-
const SearchWrapper = styled.div `
|
|
75
|
-
margin: 1rem;
|
|
76
|
-
`;
|
|
77
|
-
const CustomBadge = styled(Badge) `
|
|
78
|
-
margin-left: 8px;
|
|
79
|
-
&& > * {
|
|
80
|
-
background-color: ${themeVars.borderLightColor};
|
|
81
|
-
color: ${themeVars.defaultTextColor};
|
|
82
|
-
}
|
|
83
|
-
`;
|
|
84
|
-
const _sortViewFunction = (referenceOrder) => (viewA, viewB) => {
|
|
85
|
-
const orderA = referenceOrder.indexOf(viewA.id);
|
|
86
|
-
const orderB = referenceOrder.indexOf(viewB.id);
|
|
87
|
-
const isAOrdered = orderA !== -1;
|
|
88
|
-
const isBOrdered = orderB !== -1;
|
|
89
|
-
if (isAOrdered && isBOrdered) {
|
|
90
|
-
return orderA - orderB;
|
|
91
|
-
}
|
|
92
|
-
else if (isAOrdered && !isBOrdered) {
|
|
93
|
-
return -1;
|
|
94
|
-
}
|
|
95
|
-
else if (!isAOrdered && isBOrdered) {
|
|
96
|
-
return 1;
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
return Number(viewA.id) - Number(viewB.id);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
function ViewPanel() {
|
|
103
|
-
const { t } = useSharedTranslation();
|
|
104
|
-
const { userData } = useUser();
|
|
105
|
-
const { lang } = useLang();
|
|
106
|
-
const [search, setSearch] = useState('');
|
|
107
|
-
const { state: searchState, dispatch: searchDispatch } = useSearchReducer();
|
|
108
|
-
const [editView, setEditView] = useState(false);
|
|
109
|
-
const { updateViewsOrder } = useUpdateViewsOrderMutation(searchState.library.id);
|
|
110
|
-
const getViewsList = useGetViewsListQuery({
|
|
111
|
-
variables: {
|
|
112
|
-
libraryId: searchState?.library?.id || '',
|
|
113
|
-
},
|
|
114
|
-
});
|
|
115
|
-
const getOrderDataQuery = useGetUserDataQuery({
|
|
116
|
-
variables: {
|
|
117
|
-
keys: [
|
|
118
|
-
PREFIX_USER_VIEWS_ORDER_KEY + searchState.library.id,
|
|
119
|
-
PREFIX_SHARED_VIEWS_ORDER_KEY + searchState.library.id,
|
|
120
|
-
],
|
|
121
|
-
},
|
|
122
|
-
onCompleted: d => {
|
|
123
|
-
searchDispatch({
|
|
124
|
-
type: SearchActionTypes.SET_USER_VIEWS_ORDER,
|
|
125
|
-
userViewsOrder: d.userData?.data[PREFIX_USER_VIEWS_ORDER_KEY + searchState.library.id] || [],
|
|
126
|
-
});
|
|
127
|
-
searchDispatch({
|
|
128
|
-
type: SearchActionTypes.SET_SHARED_VIEWS_ORDER,
|
|
129
|
-
sharedViewsOrder: d.userData?.data[PREFIX_SHARED_VIEWS_ORDER_KEY + searchState.library.id] || [],
|
|
130
|
-
});
|
|
131
|
-
},
|
|
132
|
-
});
|
|
133
|
-
if (getViewsList.loading) {
|
|
134
|
-
return _jsx(Loading, {});
|
|
135
|
-
}
|
|
136
|
-
const _handleSearchSubmit = (value) => {
|
|
137
|
-
setSearch(value);
|
|
138
|
-
};
|
|
139
|
-
const { sharedViews, userViews } = getViewsList.data?.views.list.reduce((acc, view) => {
|
|
140
|
-
const v = prepareView(view, searchState.attributes, searchState.library.id, userData?.userId);
|
|
141
|
-
if (search && !localizedTranslation(v.label, lang).toUpperCase().includes(search.toUpperCase())) {
|
|
142
|
-
return acc;
|
|
143
|
-
}
|
|
144
|
-
if (v.shared) {
|
|
145
|
-
return { ...acc, sharedViews: [...acc.sharedViews, v] };
|
|
146
|
-
}
|
|
147
|
-
return { ...acc, userViews: [...acc.userViews, v] };
|
|
148
|
-
}, { sharedViews: [], userViews: [] }) ?? { sharedViews: [], userViews: [] };
|
|
149
|
-
if (getViewsList.error || getOrderDataQuery.error) {
|
|
150
|
-
return _jsx(ErrorDisplay, { message: (getViewsList.error || getOrderDataQuery.error).message });
|
|
151
|
-
}
|
|
152
|
-
if (!sharedViews || !userViews) {
|
|
153
|
-
return _jsx(ErrorDisplay, { message: t('error.error_occurred') });
|
|
154
|
-
}
|
|
155
|
-
const _showModal = (view) => {
|
|
156
|
-
setEditView(view);
|
|
157
|
-
};
|
|
158
|
-
const _closeModal = () => {
|
|
159
|
-
setEditView(false);
|
|
160
|
-
};
|
|
161
|
-
const handleDragEnd = async (event) => {
|
|
162
|
-
const { active, over } = event;
|
|
163
|
-
if (!over || active.id === over.id) {
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
let viewsList = userViews;
|
|
167
|
-
let keyToUpdate = PREFIX_USER_VIEWS_ORDER_KEY + searchState.library.id;
|
|
168
|
-
let orderType = 'userViewsOrder';
|
|
169
|
-
if (sharedViews.some(v => v.id === active.id)) {
|
|
170
|
-
viewsList = sharedViews;
|
|
171
|
-
keyToUpdate = PREFIX_SHARED_VIEWS_ORDER_KEY + searchState.library.id;
|
|
172
|
-
orderType = 'sharedViewsOrder';
|
|
173
|
-
}
|
|
174
|
-
const ids = viewsList.map(v => v.id);
|
|
175
|
-
const oldIndex = ids.indexOf(active.id);
|
|
176
|
-
const newIndex = ids.indexOf(over.id);
|
|
177
|
-
if (oldIndex === -1 || newIndex === -1) {
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
const newOrder = [...ids];
|
|
181
|
-
newOrder.splice(oldIndex, 1);
|
|
182
|
-
newOrder.splice(newIndex, 0, active.id);
|
|
183
|
-
if (orderType === 'userViewsOrder') {
|
|
184
|
-
searchDispatch({
|
|
185
|
-
type: SearchActionTypes.SET_USER_VIEWS_ORDER,
|
|
186
|
-
userViewsOrder: newOrder,
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
searchDispatch({
|
|
191
|
-
type: SearchActionTypes.SET_SHARED_VIEWS_ORDER,
|
|
192
|
-
sharedViewsOrder: newOrder,
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
await updateViewsOrder({
|
|
196
|
-
key: keyToUpdate,
|
|
197
|
-
value: newOrder,
|
|
198
|
-
global: false,
|
|
199
|
-
});
|
|
200
|
-
};
|
|
201
|
-
userViews.sort(_sortViewFunction(searchState.userViewsOrder));
|
|
202
|
-
sharedViews.sort(_sortViewFunction(searchState.sharedViewsOrder));
|
|
203
|
-
const handleHide = () => {
|
|
204
|
-
searchDispatch({ type: SearchActionTypes.TOGGLE_SIDEBAR });
|
|
205
|
-
};
|
|
206
|
-
return (_jsxs(Wrapper, { children: [editView && (_jsx(EditView, { view: editView, visible: !!editView, onClose: _closeModal, libraryId: searchState.library.id })), _jsxs(Header, { children: [_jsx("span", { children: t('view.views') }), _jsx(Button, { onClick: handleHide, icon: _jsx(FontAwesomeIcon, { icon: faAngleLeft }) })] }), _jsx(SearchWrapper, { children: _jsx(Input.Search, { placeholder: t('view.search'), onSearch: _handleSearchSubmit }) }), _jsxs(DndContext, { collisionDetection: closestCenter, onDragEnd: handleDragEnd, children: [_jsx(SubHeader, { children: t('view.shared-views') }), _jsx(SortableContext, { items: sharedViews.map(v => v.id), strategy: verticalListSortingStrategy, children: _jsx(Views, { children: sharedViews.map(view => (_jsx(View, { view: view, onEdit: () => _showModal(view) }, view.id))) }) }), _jsxs(SubHeader, { children: [t('view.my-views'), _jsx(CustomBadge, { count: userViews.length })] }), _jsx(SortableContext, { items: userViews.map(v => v.id), strategy: verticalListSortingStrategy, children: _jsx(Views, { children: userViews.map(view => (_jsx(View, { view: view, onEdit: () => _showModal(view) }, view.id))) }) })] })] }));
|
|
207
|
-
}
|
|
208
|
-
export default ViewPanel;
|
|
209
|
-
//# sourceMappingURL=ViewPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ViewPanel.js","sourceRoot":"","sources":["../../../../src/components/LibraryItemsList/ViewPanel/ViewPanel.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,WAAW,EAAC,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAC,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,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ions 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 {faAngleLeft} from '@fortawesome/free-solid-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {localizedTranslation} from '@leav/utils';\nimport {Badge, Button, Input} from 'antd';\nimport {useState} from 'react';\nimport {DndContext, closestCenter} from '@dnd-kit/core';\nimport {SortableContext, verticalListSortingStrategy} from '@dnd-kit/sortable';\nimport styled from 'styled-components';\nimport {themeVars} from '_ui/antdTheme';\nimport {ErrorDisplay} from '_ui/components/ErrorDisplay';\nimport useSearchReducer from '_ui/components/LibraryItemsList/hooks/useSearchReducer';\nimport {SearchActionTypes} from '_ui/components/LibraryItemsList/hooks/useSearchReducer/searchReducer';\nimport {Loading} from '_ui/components/Loading';\nimport {PREFIX_SHARED_VIEWS_ORDER_KEY, PREFIX_USER_VIEWS_ORDER_KEY} from '_ui/constants';\nimport {useLang} from '_ui/hooks';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {useUser} from '_ui/hooks/useUser/useUser';\nimport {type IView} from '_ui/types/views';\nimport {useGetUserDataQuery, useGetViewsListQuery} from '_ui/_gqlTypes';\nimport {prepareView} from '_ui/_utils';\nimport useUpdateViewsOrderMutation from '../hooks/useUpdateViewsOrderMutation';\nimport EditView from './EditView';\nimport View from './View';\n\nconst Wrapper = styled.div`\n width: 100%;\n display: flex;\n flex-flow: column nowrap;\n border-right: ${themeVars.borderLightColor} 1px solid;\n overflow-y: auto;\n`;\n\nconst Header = styled.div`\n width: 100%;\n background-color: ${themeVars.headerBg};\n display: grid;\n grid-template-columns: repeat(2, auto);\n justify-content: space-between;\n padding: 0.3rem 0.3rem 0.3rem 1rem;\n font-weight: 700;\n border-bottom: 1px solid ${themeVars.borderLightColor};\n\n & > * {\n :first-of-type {\n display: grid;\n column-gap: 8px;\n grid-template-columns: repeat(3, auto);\n align-items: center;\n justify-items: center;\n }\n\n :last-of-type {\n display: grid;\n align-items: center;\n justify-content: flex-end;\n column-gap: 8px;\n grid-template-columns: repeat(2, auto);\n }\n }\n`;\n\nconst SubHeader = styled.div`\n width: 100%;\n border-top: ${themeVars.activeColor} 1px solid;\n border-bottom: ${themeVars.activeColor} 1px solid;\n padding: 0.3rem;\n padding-left: 1rem;\n font-weight: 700;\n font-size: 14px;\n`;\n\nconst Views = styled.div`\n width: 100%;\n`;\n\nconst SearchWrapper = styled.div`\n margin: 1rem;\n`;\n\nconst CustomBadge = styled(Badge)`\n margin-left: 8px;\n && > * {\n background-color: ${themeVars.borderLightColor};\n color: ${themeVars.defaultTextColor};\n }\n`;\n\nconst _sortViewFunction = (referenceOrder: string[]) => (viewA: IView, viewB: IView) => {\n const orderA = referenceOrder.indexOf(viewA.id);\n const orderB = referenceOrder.indexOf(viewB.id);\n const isAOrdered = orderA !== -1;\n const isBOrdered = orderB !== -1;\n\n if (isAOrdered && isBOrdered) {\n return orderA - orderB;\n } else if (isAOrdered && !isBOrdered) {\n return -1;\n } else if (!isAOrdered && isBOrdered) {\n return 1;\n } else {\n return Number(viewA.id) - Number(viewB.id);\n }\n};\n\nfunction ViewPanel(): JSX.Element {\n const {t} = useSharedTranslation();\n const {userData} = useUser();\n const {lang} = useLang();\n const [search, setSearch] = useState('');\n const {state: searchState, dispatch: searchDispatch} = useSearchReducer();\n const [editView, setEditView] = useState<IView | false>(false);\n\n const {updateViewsOrder} = useUpdateViewsOrderMutation(searchState.library.id);\n\n const getViewsList = useGetViewsListQuery({\n variables: {\n libraryId: searchState?.library?.id || '',\n },\n });\n\n const getOrderDataQuery = useGetUserDataQuery({\n variables: {\n keys: [\n PREFIX_USER_VIEWS_ORDER_KEY + searchState.library.id,\n PREFIX_SHARED_VIEWS_ORDER_KEY + searchState.library.id,\n ],\n },\n onCompleted: d => {\n searchDispatch({\n type: SearchActionTypes.SET_USER_VIEWS_ORDER,\n userViewsOrder: d.userData?.data[PREFIX_USER_VIEWS_ORDER_KEY + searchState.library.id] || [],\n });\n searchDispatch({\n type: SearchActionTypes.SET_SHARED_VIEWS_ORDER,\n sharedViewsOrder: d.userData?.data[PREFIX_SHARED_VIEWS_ORDER_KEY + searchState.library.id] || [],\n });\n },\n });\n\n if (getViewsList.loading) {\n return <Loading />;\n }\n\n const _handleSearchSubmit = (value: string) => {\n setSearch(value);\n };\n\n const {sharedViews, userViews}: {sharedViews: IView[]; userViews: IView[]} = getViewsList.data?.views.list.reduce(\n (acc, view) => {\n const v: IView = prepareView(view, searchState.attributes, searchState.library.id, userData?.userId);\n\n if (search && !localizedTranslation(v.label, lang).toUpperCase().includes(search.toUpperCase())) {\n return acc;\n }\n\n if (v.shared) {\n return {...acc, sharedViews: [...acc.sharedViews, v]};\n }\n\n return {...acc, userViews: [...acc.userViews, v]};\n },\n {sharedViews: [], userViews: []},\n ) ?? {sharedViews: [], userViews: []};\n\n if (getViewsList.error || getOrderDataQuery.error) {\n return <ErrorDisplay message={(getViewsList.error || getOrderDataQuery.error).message} />;\n }\n\n if (!sharedViews || !userViews) {\n return <ErrorDisplay message={t('error.error_occurred')} />;\n }\n\n const _showModal = (view: IView) => {\n setEditView(view);\n };\n\n const _closeModal = () => {\n setEditView(false);\n };\n\n const handleDragEnd = async event => {\n const {active, over} = event;\n if (!over || active.id === over.id) {\n return;\n }\n\n let viewsList = userViews;\n let keyToUpdate = PREFIX_USER_VIEWS_ORDER_KEY + searchState.library.id;\n let orderType = 'userViewsOrder';\n if (sharedViews.some(v => v.id === active.id)) {\n viewsList = sharedViews;\n keyToUpdate = PREFIX_SHARED_VIEWS_ORDER_KEY + searchState.library.id;\n orderType = 'sharedViewsOrder';\n }\n\n const ids = viewsList.map(v => v.id);\n const oldIndex = ids.indexOf(active.id);\n const newIndex = ids.indexOf(over.id);\n if (oldIndex === -1 || newIndex === -1) {\n return;\n }\n\n const newOrder = [...ids];\n newOrder.splice(oldIndex, 1);\n newOrder.splice(newIndex, 0, active.id);\n\n if (orderType === 'userViewsOrder') {\n searchDispatch({\n type: SearchActionTypes.SET_USER_VIEWS_ORDER,\n userViewsOrder: newOrder,\n });\n } else {\n searchDispatch({\n type: SearchActionTypes.SET_SHARED_VIEWS_ORDER,\n sharedViewsOrder: newOrder,\n });\n }\n\n await updateViewsOrder({\n key: keyToUpdate,\n value: newOrder,\n global: false,\n });\n };\n\n userViews.sort(_sortViewFunction(searchState.userViewsOrder));\n sharedViews.sort(_sortViewFunction(searchState.sharedViewsOrder));\n\n const handleHide = () => {\n searchDispatch({type: SearchActionTypes.TOGGLE_SIDEBAR});\n };\n\n return (\n <Wrapper>\n {editView && (\n <EditView\n view={editView}\n visible={!!editView}\n onClose={_closeModal}\n libraryId={searchState.library.id}\n />\n )}\n <Header>\n <span>{t('view.views')}</span>\n <Button onClick={handleHide} icon={<FontAwesomeIcon icon={faAngleLeft} />}></Button>\n </Header>\n <SearchWrapper>\n <Input.Search placeholder={t('view.search')} onSearch={_handleSearchSubmit} />\n </SearchWrapper>\n\n <DndContext collisionDetection={closestCenter} onDragEnd={handleDragEnd}>\n <SubHeader>{t('view.shared-views')}</SubHeader>\n <SortableContext items={sharedViews.map(v => v.id)} strategy={verticalListSortingStrategy}>\n <Views>\n {sharedViews.map(view => (\n <View key={view.id} view={view} onEdit={() => _showModal(view)} />\n ))}\n </Views>\n </SortableContext>\n <SubHeader>\n {t('view.my-views')}\n <CustomBadge count={userViews.length} />\n </SubHeader>\n <SortableContext items={userViews.map(v => v.id)} strategy={verticalListSortingStrategy}>\n <Views>\n {userViews.map(view => (\n <View key={view.id} view={view} onEdit={() => _showModal(view)} />\n ))}\n </Views>\n </SortableContext>\n </DndContext>\n </Wrapper>\n );\n}\n\nexport default ViewPanel;\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 ViewPanel from './ViewPanel';
|
|
5
|
-
export default ViewPanel;
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/LibraryItemsList/ViewPanel/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,eAAe,SAAS,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 ViewPanel from './ViewPanel';\n\nexport default ViewPanel;\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type IView } from '../../types/views';
|
|
2
|
-
import { AttributeFormat } from '../../_gqlTypes';
|
|
3
|
-
export declare const INFOS_COLUMN_WIDTH = "350px";
|
|
4
|
-
export declare const selectionColumn = "selection-column";
|
|
5
|
-
export declare const infosCol = "infos";
|
|
6
|
-
export declare const initialColumnsLimit = 5;
|
|
7
|
-
export declare const viewSettingsField = "fields";
|
|
8
|
-
export declare const attributeExtendedKey = "extended";
|
|
9
|
-
export declare const defaultView: IView;
|
|
10
|
-
export declare const formatNotUsingCondition: AttributeFormat[];
|
|
11
|
-
export declare const defaultLinkAttributeFilterFormat = AttributeFormat.text;
|
|
12
|
-
export declare const getSelectedViewKey: (libraryId: string) => string;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { AttributeFormat, ViewSizes, ViewTypes } from '../../_gqlTypes';
|
|
2
|
-
export const INFOS_COLUMN_WIDTH = '350px';
|
|
3
|
-
export const selectionColumn = 'selection-column';
|
|
4
|
-
export const infosCol = 'infos';
|
|
5
|
-
export const initialColumnsLimit = 5;
|
|
6
|
-
export const viewSettingsField = 'fields';
|
|
7
|
-
export const attributeExtendedKey = 'extended';
|
|
8
|
-
export const defaultView = {
|
|
9
|
-
id: 'default-view',
|
|
10
|
-
label: { fr: 'Vue par défaut', en: 'Default view' },
|
|
11
|
-
owner: true,
|
|
12
|
-
display: { type: ViewTypes.list, size: ViewSizes.MEDIUM },
|
|
13
|
-
shared: false,
|
|
14
|
-
filters: [],
|
|
15
|
-
};
|
|
16
|
-
export const formatNotUsingCondition = [AttributeFormat.boolean];
|
|
17
|
-
export const defaultLinkAttributeFilterFormat = AttributeFormat.text;
|
|
18
|
-
export const getSelectedViewKey = (libraryId) => `selected_view_${libraryId}`;
|
|
19
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/LibraryItemsList/constants.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,eAAe,EAAE,SAAS,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AAEpE,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAC1C,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAClD,MAAM,CAAC,MAAM,QAAQ,GAAG,OAAO,CAAC;AAChC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AACrC,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAC1C,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,CAAC;AAE/C,MAAM,CAAC,MAAM,WAAW,GAAU;IAC9B,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,EAAC,EAAE,EAAE,gBAAgB,EAAE,EAAE,EAAE,cAAc,EAAC;IACjD,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,EAAC,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAC;IACvD,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,EAAE;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;AAEjE,MAAM,CAAC,MAAM,gCAAgC,GAAG,eAAe,CAAC,IAAI,CAAC;AAErE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAE,EAAE,CAAC,iBAAiB,SAAS,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 {type IView} from '_ui/types/views';\nimport {AttributeFormat, ViewSizes, ViewTypes} from '_ui/_gqlTypes';\n\nexport const INFOS_COLUMN_WIDTH = '350px';\nexport const selectionColumn = 'selection-column';\nexport const infosCol = 'infos';\nexport const initialColumnsLimit = 5;\nexport const viewSettingsField = 'fields';\nexport const attributeExtendedKey = 'extended';\n\nexport const defaultView: IView = {\n id: 'default-view',\n label: {fr: 'Vue par défaut', en: 'Default view'},\n owner: true,\n display: {type: ViewTypes.list, size: ViewSizes.MEDIUM},\n shared: false,\n filters: [],\n};\n\nexport const formatNotUsingCondition = [AttributeFormat.boolean];\n\nexport const defaultLinkAttributeFilterFormat = AttributeFormat.text;\n\nexport const getSelectedViewKey = (libraryId: string) => `selected_view_${libraryId}`;\n"]}
|
|
@@ -1,21 +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 { AttributeConditionFilter } from '../../../types/search';
|
|
5
|
-
import { AttributeFormat } from '../../../_gqlTypes';
|
|
6
|
-
export const defaultFilterConditionByAttributeFormat = (format) => {
|
|
7
|
-
switch (format) {
|
|
8
|
-
case AttributeFormat.boolean:
|
|
9
|
-
case AttributeFormat.date:
|
|
10
|
-
case AttributeFormat.numeric:
|
|
11
|
-
return AttributeConditionFilter.EQUAL;
|
|
12
|
-
case AttributeFormat.encrypted:
|
|
13
|
-
return AttributeConditionFilter.IS_EMPTY;
|
|
14
|
-
case AttributeFormat.text:
|
|
15
|
-
case AttributeFormat.date_range:
|
|
16
|
-
case AttributeFormat.extended:
|
|
17
|
-
default:
|
|
18
|
-
return AttributeConditionFilter.CONTAINS;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=defaultFilterConditionByAttributeFormat.js.map
|
package/dist/components/LibraryItemsList/helpers/defaultFilterConditionByAttributeFormat.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaultFilterConditionByAttributeFormat.js","sourceRoot":"","sources":["../../../../src/components/LibraryItemsList/helpers/defaultFilterConditionByAttributeFormat.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,wBAAwB,EAA8B,MAAM,kBAAkB,CAAC;AACvF,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAE9C,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,MAAuB,EAA0B,EAAE;IACvG,QAAQ,MAAM,EAAE,CAAC;QACb,KAAK,eAAe,CAAC,OAAO,CAAC;QAC7B,KAAK,eAAe,CAAC,IAAI,CAAC;QAC1B,KAAK,eAAe,CAAC,OAAO;YACxB,OAAO,wBAAwB,CAAC,KAAK,CAAC;QAC1C,KAAK,eAAe,CAAC,SAAS;YAC1B,OAAO,wBAAwB,CAAC,QAAQ,CAAC;QAC7C,KAAK,eAAe,CAAC,IAAI,CAAC;QAC1B,KAAK,eAAe,CAAC,UAAU,CAAC;QAChC,KAAK,eAAe,CAAC,QAAQ,CAAC;QAC9B;YACI,OAAO,wBAAwB,CAAC,QAAQ,CAAC;IACjD,CAAC;AACL,CAAC,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 {AttributeConditionFilter, type AttributeConditionType} from '_ui/types/search';\nimport {AttributeFormat} from '_ui/_gqlTypes';\n\nexport const defaultFilterConditionByAttributeFormat = (format: AttributeFormat): AttributeConditionType => {\n switch (format) {\n case AttributeFormat.boolean:\n case AttributeFormat.date:\n case AttributeFormat.numeric:\n return AttributeConditionFilter.EQUAL;\n case AttributeFormat.encrypted:\n return AttributeConditionFilter.IS_EMPTY;\n case AttributeFormat.text:\n case AttributeFormat.date_range:\n case AttributeFormat.extended:\n default:\n return AttributeConditionFilter.CONTAINS;\n }\n};\n"]}
|
|
@@ -1,18 +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 { PreviewSize } from '../../../constants';
|
|
5
|
-
import { ViewSizes } from '../../../_gqlTypes';
|
|
6
|
-
export const displayTypeToPreviewSize = (displayType) => {
|
|
7
|
-
switch (displayType) {
|
|
8
|
-
case ViewSizes.SMALL:
|
|
9
|
-
return PreviewSize.SMALL;
|
|
10
|
-
case ViewSizes.MEDIUM:
|
|
11
|
-
return PreviewSize.MEDIUM;
|
|
12
|
-
case ViewSizes.BIG:
|
|
13
|
-
return PreviewSize.BIG;
|
|
14
|
-
default:
|
|
15
|
-
return PreviewSize.SMALL;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=displayTypeToPreviewSize.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"displayTypeToPreviewSize.js","sourceRoot":"","sources":["../../../../src/components/LibraryItemsList/helpers/displayTypeToPreviewSize.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,WAAsB,EAAE,EAAE;IAC/D,QAAQ,WAAW,EAAE,CAAC;QAClB,KAAK,SAAS,CAAC,KAAK;YAChB,OAAO,WAAW,CAAC,KAAK,CAAC;QAC7B,KAAK,SAAS,CAAC,MAAM;YACjB,OAAO,WAAW,CAAC,MAAM,CAAC;QAC9B,KAAK,SAAS,CAAC,GAAG;YACd,OAAO,WAAW,CAAC,GAAG,CAAC;QAC3B;YACI,OAAO,WAAW,CAAC,KAAK,CAAC;IACjC,CAAC;AACL,CAAC,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 {PreviewSize} from '_ui/constants';\nimport {ViewSizes} from '_ui/_gqlTypes';\n\nexport const displayTypeToPreviewSize = (displayType: ViewSizes) => {\n switch (displayType) {\n case ViewSizes.SMALL:\n return PreviewSize.SMALL;\n case ViewSizes.MEDIUM:\n return PreviewSize.MEDIUM;\n case ViewSizes.BIG:\n return PreviewSize.BIG;\n default:\n return PreviewSize.SMALL;\n }\n};\n"]}
|
|
@@ -1,64 +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 { isTypeLink } from '@leav/utils';
|
|
5
|
-
import { AttributeFormat, AttributeType } from '../../../_gqlTypes';
|
|
6
|
-
export default (library) => library.attributes.reduce((acc, attribute) => {
|
|
7
|
-
if ((attribute.format === null ||
|
|
8
|
-
(attribute.format && Object.values(AttributeFormat).includes(attribute.format))) &&
|
|
9
|
-
attribute.type &&
|
|
10
|
-
Object.values(AttributeType).includes(attribute.type)) {
|
|
11
|
-
const newAttributes = [
|
|
12
|
-
{
|
|
13
|
-
id: attribute.id,
|
|
14
|
-
type: attribute.type,
|
|
15
|
-
format: attribute.format,
|
|
16
|
-
label: attribute.label,
|
|
17
|
-
isLink: isTypeLink(attribute.type),
|
|
18
|
-
isMultiple: attribute.multiple_values,
|
|
19
|
-
linkedLibrary: attribute.linked_library,
|
|
20
|
-
linkedTree: attribute.linked_tree,
|
|
21
|
-
library: library.id,
|
|
22
|
-
embedded_fields: attribute.embedded_fields,
|
|
23
|
-
},
|
|
24
|
-
];
|
|
25
|
-
// case attribute is a linked attribute
|
|
26
|
-
if ((attribute.type === AttributeType.simple_link || attribute.type === AttributeType.advanced_link) &&
|
|
27
|
-
attribute.linked_library) {
|
|
28
|
-
const linkedLibraryId = attribute.linked_library.id;
|
|
29
|
-
const newLinkedAttributes = attribute.linked_library.attributes.map(linkedAttribute => ({
|
|
30
|
-
id: linkedAttribute.id,
|
|
31
|
-
type: linkedAttribute.type,
|
|
32
|
-
format: linkedAttribute.format,
|
|
33
|
-
label: linkedAttribute.label,
|
|
34
|
-
isLink: isTypeLink(linkedAttribute.type),
|
|
35
|
-
isMultiple: linkedAttribute.multiple_values,
|
|
36
|
-
linkedLibrary: attribute.linked_library,
|
|
37
|
-
linkedTree: attribute.linked_tree,
|
|
38
|
-
library: linkedLibraryId,
|
|
39
|
-
}));
|
|
40
|
-
newAttributes.push(...newLinkedAttributes);
|
|
41
|
-
}
|
|
42
|
-
if (attribute.type === AttributeType.tree &&
|
|
43
|
-
attribute.linked_tree) {
|
|
44
|
-
const newLinkedAttributes = attribute.linked_tree.libraries
|
|
45
|
-
.map(linkedTreeLibrary => {
|
|
46
|
-
const linkedLibraryId = linkedTreeLibrary.library.id;
|
|
47
|
-
return linkedTreeLibrary.library.attributes.map(linkedAttribute => ({
|
|
48
|
-
id: linkedAttribute.id,
|
|
49
|
-
type: linkedAttribute.type,
|
|
50
|
-
format: linkedAttribute.format,
|
|
51
|
-
label: linkedAttribute.label,
|
|
52
|
-
isLink: isTypeLink(linkedAttribute.type),
|
|
53
|
-
isMultiple: linkedAttribute.multiple_values,
|
|
54
|
-
library: linkedLibraryId,
|
|
55
|
-
}));
|
|
56
|
-
})
|
|
57
|
-
.flat();
|
|
58
|
-
newAttributes.push(...newLinkedAttributes);
|
|
59
|
-
}
|
|
60
|
-
return [...acc, ...newAttributes];
|
|
61
|
-
}
|
|
62
|
-
return acc;
|
|
63
|
-
}, []);
|
|
64
|
-
//# sourceMappingURL=extractAttributesFromLibrary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extractAttributesFromLibrary.js","sourceRoot":"","sources":["../../../../src/components/LibraryItemsList/helpers/extractAttributesFromLibrary.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAC,eAAe,EAAE,aAAa,EAAC,MAAM,eAAe,CAAC;AAQ7D,eAAe,CAAC,OAA+B,EAAgB,EAAE,CAC7D,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,GAAiB,EAAE,SAAS,EAAE,EAAE;IACvD,IACI,CAAC,SAAS,CAAC,MAAM,KAAK,IAAI;QACtB,CAAC,SAAS,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;QACpF,SAAS,CAAC,IAAI;QACd,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,EACvD,CAAC;QACC,MAAM,aAAa,GAAiB;YAChC;gBACI,EAAE,EAAE,SAAS,CAAC,EAAE;gBAChB,IAAI,EAAE,SAAS,CAAC,IAAI;gBACpB,MAAM,EAAE,SAAS,CAAC,MAAM;gBACxB,KAAK,EAAE,SAAS,CAAC,KAAK;gBACtB,MAAM,EAAE,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC;gBAClC,UA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OAAO,iBAAiB,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;oBAChE,EAAE,EAAE,eAAe,CAAC,EAAE;oBACtB,IAAI,EAAE,eAAe,CAAC,IAAI;oBAC1B,MAAM,EAAE,eAAe,CAAC,MAAM;oBAC9B,KAAK,EAAE,eAAe,CAAC,KAAK;oBAC5B,MAAM,EAAE,UAAU,CAAC,eAAe,CAAC,IAAI,CAAC;oBACxC,UAAU,EAAE,eAAe,CAAC,eAAe;oBAC3C,OAAO,EAAE,eAAe;iBAC3B,CAAC,CAAC,CAAC;YACR,CAAC,CAAC;iBACD,IAAI,EAAE,CAAC;YAEZ,aAAa,CAAC,IAAI,CAAC,GAAG,mBAAmB,CAAC,CAAC;QAC/C,CAAC;QAED,OAAO,CAAC,GAAG,GAAG,EAAE,GAAG,aAAa,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,GAAG,CAAC;AACf,CAAC,EAAE,EAAE,CAAC,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 {isTypeLink} from '@leav/utils';\nimport {type IAttribute} from '_ui/types/search';\nimport {AttributeFormat, AttributeType} from '_ui/_gqlTypes';\nimport {\n type ILibraryDetailExtended,\n type ILibraryDetailExtendedAttributeLink,\n type ILibraryDetailExtendedAttributeStandard,\n type ILibraryDetailExtendedAttributeTree,\n} from '_ui/_queries/libraries/getLibraryDetailExtendQuery';\n\nexport default (library: ILibraryDetailExtended): IAttribute[] =>\n library.attributes.reduce((acc: IAttribute[], attribute) => {\n if (\n (attribute.format === null ||\n (attribute.format && Object.values(AttributeFormat).includes(attribute.format))) &&\n attribute.type &&\n Object.values(AttributeType).includes(attribute.type)\n ) {\n const newAttributes: IAttribute[] = [\n {\n id: attribute.id,\n type: attribute.type,\n format: attribute.format,\n label: attribute.label,\n isLink: isTypeLink(attribute.type),\n isMultiple: attribute.multiple_values,\n linkedLibrary: (attribute as ILibraryDetailExtendedAttributeLink).linked_library,\n linkedTree: (attribute as ILibraryDetailExtendedAttributeTree).linked_tree,\n library: library.id,\n embedded_fields: (attribute as ILibraryDetailExtendedAttributeStandard).embedded_fields,\n },\n ];\n\n // case attribute is a linked attribute\n if (\n (attribute.type === AttributeType.simple_link || attribute.type === AttributeType.advanced_link) &&\n (attribute as ILibraryDetailExtendedAttributeLink).linked_library\n ) {\n const linkedLibraryId = (attribute as ILibraryDetailExtendedAttributeLink).linked_library.id;\n const newLinkedAttributes: IAttribute[] = (\n attribute as ILibraryDetailExtendedAttributeLink\n ).linked_library.attributes.map(linkedAttribute => ({\n id: linkedAttribute.id,\n type: linkedAttribute.type,\n format: linkedAttribute.format,\n label: linkedAttribute.label,\n isLink: isTypeLink(linkedAttribute.type),\n isMultiple: linkedAttribute.multiple_values,\n linkedLibrary: (attribute as ILibraryDetailExtendedAttributeLink).linked_library,\n linkedTree: (attribute as ILibraryDetailExtendedAttributeTree).linked_tree,\n library: linkedLibraryId,\n }));\n\n newAttributes.push(...newLinkedAttributes);\n }\n\n if (\n attribute.type === AttributeType.tree &&\n (attribute as ILibraryDetailExtendedAttributeTree).linked_tree\n ) {\n const newLinkedAttributes: IAttribute[] = (\n attribute as ILibraryDetailExtendedAttributeTree\n ).linked_tree.libraries\n .map(linkedTreeLibrary => {\n const linkedLibraryId = linkedTreeLibrary.library.id;\n return linkedTreeLibrary.library.attributes.map(linkedAttribute => ({\n id: linkedAttribute.id,\n type: linkedAttribute.type,\n format: linkedAttribute.format,\n label: linkedAttribute.label,\n isLink: isTypeLink(linkedAttribute.type),\n isMultiple: linkedAttribute.multiple_values,\n library: linkedLibraryId,\n }));\n })\n .flat();\n\n newAttributes.push(...newLinkedAttributes);\n }\n\n return [...acc, ...newAttributes];\n }\n\n return acc;\n }, []);\n"]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type ILang } from '../../../types/misc';
|
|
2
|
-
import { type IAttribute, type IField } from '../../../types/search';
|
|
3
|
-
import { type ILibraryDetailExtended } from '../../../_queries/libraries/getLibraryDetailExtendQuery';
|
|
4
|
-
declare const _default: (fieldKey: string, library: ILibraryDetailExtended, attributes: IAttribute[], lang: ILang) => IField;
|
|
5
|
-
export default _default;
|
|
@@ -1,40 +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 { localizedTranslation } from '@leav/utils';
|
|
5
|
-
import { getAttributeFromKey } from '../../../_utils';
|
|
6
|
-
export default (fieldKey, library, attributes, lang) => {
|
|
7
|
-
let parentAttributeData;
|
|
8
|
-
const splitKey = fieldKey.split('.');
|
|
9
|
-
const attribute = getAttributeFromKey(fieldKey, library.id, attributes);
|
|
10
|
-
let recordLibrary = null;
|
|
11
|
-
// For attributes through tree attribute, key is [parent attribute].[record library].[attribute]
|
|
12
|
-
if (splitKey.length === 3) {
|
|
13
|
-
const parentAttributeId = splitKey[0];
|
|
14
|
-
const parentAttribute = attributes.find(att => parentAttributeId === att.id && library.id === att.library);
|
|
15
|
-
if (parentAttribute) {
|
|
16
|
-
parentAttributeData = {
|
|
17
|
-
id: parentAttribute.id,
|
|
18
|
-
type: parentAttribute.type,
|
|
19
|
-
};
|
|
20
|
-
recordLibrary = splitKey[1];
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
if (!attribute) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
const label = typeof attribute.label === 'string' ? attribute.label : localizedTranslation(attribute.label, lang);
|
|
27
|
-
const field = {
|
|
28
|
-
key: fieldKey,
|
|
29
|
-
id: attribute.id,
|
|
30
|
-
library: attribute.library,
|
|
31
|
-
label,
|
|
32
|
-
format: attribute.format,
|
|
33
|
-
type: attribute.type,
|
|
34
|
-
multipleValues: attribute.isMultiple,
|
|
35
|
-
parentAttributeData,
|
|
36
|
-
recordLibrary,
|
|
37
|
-
};
|
|
38
|
-
return field;
|
|
39
|
-
};
|
|
40
|
-
//# sourceMappingURL=getFieldFromKey.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getFieldFromKey.js","sourceRoot":"","sources":["../../../../src/components/LibraryItemsList/helpers/getFieldFromKey.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAIjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,YAAY,CAAC;AAE/C,eAAe,CAAC,QAAgB,EAAE,OAA+B,EAAE,UAAwB,EAAE,IAAW,EAAU,EAAE;IAChH,IAAI,mBAAqD,CAAC;IAC1D,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrC,MAAM,SAAS,GAAG,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;IACxE,IAAI,aAAa,GAAG,IAAI,CAAC;IAEzB,gGAAgG;IAChG,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,iBAAiB,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QACtC,MAAM,eAAe,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,iBAAiB,KAAK,GAAG,CAAC,EAAE,IAAI,OAAO,CAAC,EAAE,KAAK,GAAG,CAAC,OAAO,CAAC,CAAC;QAE3G,IAAI,eAAe,EAAE,CAAC;YAClB,mBAAmB,GAAG;gBAClB,EAAE,EAAE,eAAe,CAAC,EAAE;gBACtB,IAAI,EAAE,eAAe,CAAC,IAAI;aAC7B,CAAC;YAEF,aAAa,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAChC,CAAC;IACL,CAAC;IAED,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,KAAK,GAAG,OAAO,SAAS,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,oBAAoB,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAElH,MAAM,KAAK,GAAW;QAClB,GAAG,EAAE,QAAQ;QACb,EAAE,EAAE,SAAS,CAAC,EAAE;QAChB,OAAO,EAAE,SAAS,CAAC,OAAO;QAC1B,KAAK;QACL,MAAM,EAAE,SAAS,CAAC,MAAM;QACxB,IAAI,EAAE,SAAS,CAAC,IAAI;QACpB,cAAc,EAAE,SAAS,CAAC,UAAU;QACpC,mBAAmB;QACnB,aAAa;KAChB,CAAC;IAEF,OAAO,KAAK,CAAC;AACjB,CAAC,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 {localizedTranslation} from '@leav/utils';\nimport {type ILang} from '_ui/types/misc';\nimport {type IAttribute, type IField, type IParentAttributeData} from '_ui/types/search';\nimport {type ILibraryDetailExtended} from '_ui/_queries/libraries/getLibraryDetailExtendQuery';\nimport {getAttributeFromKey} from '_ui/_utils';\n\nexport default (fieldKey: string, library: ILibraryDetailExtended, attributes: IAttribute[], lang: ILang): IField => {\n let parentAttributeData: IParentAttributeData | undefined;\n const splitKey = fieldKey.split('.');\n const attribute = getAttributeFromKey(fieldKey, library.id, attributes);\n let recordLibrary = null;\n\n // For attributes through tree attribute, key is [parent attribute].[record library].[attribute]\n if (splitKey.length === 3) {\n const parentAttributeId = splitKey[0];\n const parentAttribute = attributes.find(att => parentAttributeId === att.id && library.id === att.library);\n\n if (parentAttribute) {\n parentAttributeData = {\n id: parentAttribute.id,\n type: parentAttribute.type,\n };\n\n recordLibrary = splitKey[1];\n }\n }\n\n if (!attribute) {\n return null;\n }\n\n const label = typeof attribute.label === 'string' ? attribute.label : localizedTranslation(attribute.label, lang);\n\n const field: IField = {\n key: fieldKey,\n id: attribute.id,\n library: attribute.library,\n label,\n format: attribute.format,\n type: attribute.type,\n multipleValues: attribute.isMultiple,\n parentAttributeData,\n recordLibrary,\n };\n\n return field;\n};\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type ILang } from '../../../types/misc';
|
|
2
|
-
import { type IField } from '../../../types/search';
|
|
3
|
-
import { type IView } from '../../../types/views';
|
|
4
|
-
import { type ILibraryDetailExtended } from '../../../_queries/libraries/getLibraryDetailExtendQuery';
|
|
5
|
-
declare const _default: (view: IView, library: ILibraryDetailExtended, lang: ILang) => IField[];
|
|
6
|
-
export default _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import extractAttributesFromLibrary from './extractAttributesFromLibrary';
|
|
2
|
-
import getFieldFromKey from './getFieldFromKey';
|
|
3
|
-
export default (view, library, lang) => {
|
|
4
|
-
const defaultAttributes = extractAttributesFromLibrary(library);
|
|
5
|
-
return (view.attributes ?? []).reduce((acc, fieldKey) => {
|
|
6
|
-
const field = getFieldFromKey(fieldKey, library, defaultAttributes, lang);
|
|
7
|
-
return field ? [...acc, field] : acc;
|
|
8
|
-
}, []);
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=getFieldsFromView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getFieldsFromView.js","sourceRoot":"","sources":["../../../../src/components/LibraryItemsList/helpers/getFieldsFromView.ts"],"names":[],"mappings":"AAOA,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;AAC1E,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,eAAe,CAAC,IAAW,EAAE,OAA+B,EAAE,IAAW,EAAY,EAAE;IACnF,MAAM,iBAAiB,GAAG,4BAA4B,CAAC,OAAO,CAAC,CAAC;IAEhE,OAAO,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE;QACpD,MAAM,KAAK,GAAG,eAAe,CAAC,QAAQ,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAC;QAC1E,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IACzC,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC,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 {type ILang} from '_ui/types/misc';\nimport {type IField} from '_ui/types/search';\nimport {type IView} from '_ui/types/views';\nimport {type ILibraryDetailExtended} from '_ui/_queries/libraries/getLibraryDetailExtendQuery';\nimport extractAttributesFromLibrary from './extractAttributesFromLibrary';\nimport getFieldFromKey from './getFieldFromKey';\n\nexport default (view: IView, library: ILibraryDetailExtended, lang: ILang): IField[] => {\n const defaultAttributes = extractAttributesFromLibrary(library);\n\n return (view.attributes ?? []).reduce((acc, fieldKey) => {\n const field = getFieldFromKey(fieldKey, library, defaultAttributes, lang);\n return field ? [...acc, field] : acc;\n }, []);\n};\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AttributeFormat, AttributeType } from '../../../_gqlTypes';
|
|
2
|
-
export const getFieldsKeyFromAttribute = (attribute) => {
|
|
3
|
-
if (attribute?.format === AttributeFormat.extended && attribute.path) {
|
|
4
|
-
return `${attribute.path}`;
|
|
5
|
-
}
|
|
6
|
-
else if (attribute.parentAttributeData) {
|
|
7
|
-
return attribute.parentAttributeData.type === AttributeType.tree
|
|
8
|
-
? `${attribute.parentAttributeData.id}.${attribute.library}.${attribute.id}`
|
|
9
|
-
: `${attribute.parentAttributeData.id}.${attribute.id}`;
|
|
10
|
-
}
|
|
11
|
-
return `${attribute.id}`;
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=getFieldsKeyFromAttribute.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getFieldsKeyFromAttribute.js","sourceRoot":"","sources":["../../../../src/components/LibraryItemsList/helpers/getFieldsKeyFromAttribute.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,eAAe,EAAE,aAAa,EAAC,MAAM,eAAe,CAAC;AAE7D,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,SAA6B,EAAE,EAAE;IACvE,IAAI,SAAS,EAAE,MAAM,KAAK,eAAe,CAAC,QAAQ,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC;QACnE,OAAO,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;IAC/B,CAAC;SAAM,IAAI,SAAS,CAAC,mBAAmB,EAAE,CAAC;QACvC,OAAO,SAAS,CAAC,mBAAmB,CAAC,IAAI,KAAK,aAAa,CAAC,IAAI;YAC5D,CAAC,CAAC,GAAG,SAAS,CAAC,mBAAmB,CAAC,EAAE,IAAI,SAAS,CAAC,OAAO,IAAI,SAAS,CAAC,EAAE,EAAE;YAC5E,CAAC,CAAC,GAAG,SAAS,CAAC,mBAAmB,CAAC,EAAE,IAAI,SAAS,CAAC,EAAE,EAAE,CAAC;IAChE,CAAC;IAED,OAAO,GAAG,SAAS,CAAC,EAAE,EAAE,CAAC;AAC7B,CAAC,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 {type ISelectedAttribute} from '_ui/types/attributes';\nimport {AttributeFormat, AttributeType} from '_ui/_gqlTypes';\n\nexport const getFieldsKeyFromAttribute = (attribute: ISelectedAttribute) => {\n if (attribute?.format === AttributeFormat.extended && attribute.path) {\n return `${attribute.path}`;\n } else if (attribute.parentAttributeData) {\n return attribute.parentAttributeData.type === AttributeType.tree\n ? `${attribute.parentAttributeData.id}.${attribute.library}.${attribute.id}`\n : `${attribute.parentAttributeData.id}.${attribute.id}`;\n }\n\n return `${attribute.id}`;\n};\n"]}
|
|
@@ -1,18 +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 { AttributeType } from '../../../_gqlTypes';
|
|
5
|
-
import { infosCol } from '../constants';
|
|
6
|
-
export const getSortFieldByAttributeType = (attributeId, type) => {
|
|
7
|
-
attributeId = infosCol === attributeId ? 'id' : attributeId;
|
|
8
|
-
switch (type) {
|
|
9
|
-
case AttributeType.tree:
|
|
10
|
-
case AttributeType.simple_link:
|
|
11
|
-
const subFieldByDefault = 'id';
|
|
12
|
-
return `${attributeId}.${subFieldByDefault}`;
|
|
13
|
-
case AttributeType.advanced_link:
|
|
14
|
-
default:
|
|
15
|
-
return attributeId;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=getSortFieldByAttributeType.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getSortFieldByAttributeType.js","sourceRoot":"","sources":["../../../../src/components/LibraryItemsList/helpers/getSortFieldByAttributeType.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AAEtC,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,WAAmB,EAAE,IAAmB,EAAE,EAAE;IACpF,WAAW,GAAG,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC;IAE5D,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,aAAa,CAAC,IAAI,CAAC;QACxB,KAAK,aAAa,CAAC,WAAW;YAC1B,MAAM,iBAAiB,GAAG,IAAI,CAAC;YAC/B,OAAO,GAAG,WAAW,IAAI,iBAAiB,EAAE,CAAC;QACjD,KAAK,aAAa,CAAC,aAAa,CAAC;QACjC;YACI,OAAO,WAAW,CAAC;IAC3B,CAAC;AACL,CAAC,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 {AttributeType} from '_ui/_gqlTypes';\nimport {infosCol} from '../constants';\n\nexport const getSortFieldByAttributeType = (attributeId: string, type: AttributeType) => {\n attributeId = infosCol === attributeId ? 'id' : attributeId;\n\n switch (type) {\n case AttributeType.tree:\n case AttributeType.simple_link:\n const subFieldByDefault = 'id';\n return `${attributeId}.${subFieldByDefault}`;\n case AttributeType.advanced_link:\n default:\n return attributeId;\n }\n};\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type IView } from '../../../../types/views';
|
|
2
|
-
import { type ILibraryDetailExtended } from '../../../../_queries/libraries/getLibraryDetailExtendQuery';
|
|
3
|
-
declare const useLibraryView: (library: ILibraryDetailExtended) => {
|
|
4
|
-
loading: boolean;
|
|
5
|
-
error: Error;
|
|
6
|
-
view: IView;
|
|
7
|
-
};
|
|
8
|
-
export default useLibraryView;
|