@leav/ui 0.3.6-c939f2f → 0.3.6-cc1031e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__mocks__/common/attribute.d.ts +1 -0
- package/dist/__mocks__/common/attribute.js +9 -1
- package/dist/__mocks__/common/attribute.js.map +1 -1
- package/dist/__mocks__/common/form.d.ts +11 -5
- package/dist/__mocks__/common/form.js +18 -2
- package/dist/__mocks__/common/form.js.map +1 -1
- package/dist/__mocks__/common/record.d.ts +13 -2
- package/dist/__mocks__/common/record.js.map +1 -1
- package/dist/__mocks__/common/value.js +3 -1
- package/dist/__mocks__/common/value.js.map +1 -1
- package/dist/__mocks__/common/view.js +7 -5
- package/dist/__mocks__/common/view.js.map +1 -1
- package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js +1 -1
- package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js.map +1 -1
- package/dist/__mocks__/mockQuery/mockGetViewListQuery.js +2 -1
- package/dist/__mocks__/mockQuery/mockGetViewListQuery.js.map +1 -1
- package/dist/_gqlTypes/index.d.ts +462 -77
- package/dist/_gqlTypes/index.js +1274 -1055
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/libraries/getLibraryDetailExtendQuery.d.ts +3 -4
- package/dist/_queries/libraries/getLibraryDetailExtendQuery.js +2 -3
- package/dist/_queries/libraries/getLibraryDetailExtendQuery.js.map +1 -1
- package/dist/_queries/records/getRecordColumnsValues.d.ts +5 -3
- package/dist/_queries/records/getRecordColumnsValues.js +4 -1
- package/dist/_queries/records/getRecordColumnsValues.js.map +1 -1
- package/dist/_queries/records/getRecordsFromLibraryQuery.js +1 -0
- package/dist/_queries/records/getRecordsFromLibraryQuery.js.map +1 -1
- package/dist/_queries/records/recordFormAttributeFragment.js +2 -0
- package/dist/_queries/records/recordFormAttributeFragment.js.map +1 -1
- package/dist/_queries/views/saveViewMutation.js +1 -1
- package/dist/_queries/views/viewDetailsFragment.js +14 -11
- package/dist/_queries/views/viewDetailsFragment.js.map +1 -1
- package/dist/_utils/index.js +5 -2
- package/dist/_utils/index.js.map +1 -1
- package/dist/_utils/interleaveElement.d.ts +1 -0
- package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js → _utils/interleaveElement.js} +2 -6
- package/dist/_utils/interleaveElement.js.map +1 -0
- package/dist/antdTheme/index.d.ts +0 -3
- package/dist/antdTheme/index.js +3 -42
- package/dist/antdTheme/index.js.map +1 -1
- package/dist/components/CreateDirectory/CreateDirectory.js +1 -1
- package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
- package/dist/components/EditApplication/EditApplication.js +2 -2
- package/dist/components/EditApplication/EditApplication.js.map +1 -1
- package/dist/components/EditApplication/_types.d.ts +2 -2
- package/dist/components/Explorer/DataView.d.ts +10 -1
- package/dist/components/Explorer/DataView.js +37 -36
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +9 -5
- package/dist/components/Explorer/Explorer.js +61 -17
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerTitle.d.ts +9 -0
- package/dist/components/Explorer/ExplorerTitle.js +47 -0
- package/dist/components/Explorer/ExplorerTitle.js.map +1 -0
- package/dist/components/Explorer/IdCard.d.ts +7 -0
- package/dist/components/Explorer/IdCard.js +15 -0
- package/dist/components/Explorer/IdCard.js.map +1 -0
- package/dist/components/Explorer/TableCell.d.ts +8 -0
- package/dist/components/Explorer/TableCell.js +144 -0
- package/dist/components/Explorer/TableCell.js.map +1 -0
- package/dist/components/Explorer/TableTagGroup.d.ts +7 -0
- package/dist/components/Explorer/TableTagGroup.js +30 -0
- package/dist/components/Explorer/TableTagGroup.js.map +1 -0
- package/dist/components/Explorer/_constants.d.ts +4 -0
- package/dist/components/Explorer/_constants.js +17 -0
- package/dist/components/Explorer/_constants.js.map +1 -0
- package/dist/components/Explorer/_queries/useExplorerData.d.ts +31 -7
- package/dist/components/Explorer/_queries/useExplorerData.js +199 -19
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +63 -3
- package/dist/components/Explorer/conditionsHelper.d.ts +2 -0
- package/dist/components/Explorer/conditionsHelper.js +16 -0
- package/dist/components/Explorer/conditionsHelper.js.map +1 -0
- package/dist/components/Explorer/display-view-filters/ExplorerToolBar.d.ts +4 -0
- package/dist/components/Explorer/display-view-filters/ExplorerToolBar.js +47 -0
- package/dist/components/Explorer/display-view-filters/ExplorerToolBar.js.map +1 -0
- package/dist/components/Explorer/index.d.ts +1 -3
- package/dist/components/Explorer/index.js +1 -3
- package/dist/components/Explorer/index.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.d.ts +12 -0
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js +85 -0
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +5 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +12 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.d.ts +11 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +61 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.d.ts +6 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js +28 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.d.ts +6 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +56 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js +12 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +78 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.d.ts +9 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +33 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js +22 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js +66 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +71 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.d.ts +10 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js +75 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +19 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +28 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +100 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/index.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/index.js +11 -0
- package/dist/components/Explorer/manage-view-settings/index.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.d.ts +2 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.js +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.d.ts +7 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.js +2 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.js +2 -2
- package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useEditSettings.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +5 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +39 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.d.ts +4 -2
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +70 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +109 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.d.ts +10 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +32 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.d.ts +6 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js +11 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.d.ts +4 -0
- package/dist/components/{RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js → Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js} +3 -3
- package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +24 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +145 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +199 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -0
- package/dist/components/Explorer/{useCreateMainAction.d.ts → useCreateAction.d.ts} +5 -3
- package/dist/components/Explorer/useCreateAction.js +73 -0
- package/dist/components/Explorer/useCreateAction.js.map +1 -0
- package/dist/components/Explorer/useEditAction.js +9 -7
- package/dist/components/Explorer/useEditAction.js.map +1 -1
- package/dist/components/Explorer/usePagination.d.ts +7 -0
- package/dist/components/Explorer/usePagination.js +25 -0
- package/dist/components/Explorer/usePagination.js.map +1 -0
- package/dist/components/Explorer/usePrimaryActions.d.ts +12 -0
- package/dist/components/Explorer/usePrimaryActions.js +28 -0
- package/dist/components/Explorer/usePrimaryActions.js.map +1 -0
- package/dist/components/Explorer/useRemoveAction.d.ts +12 -0
- package/dist/components/Explorer/useRemoveAction.js +90 -0
- package/dist/components/Explorer/useRemoveAction.js.map +1 -0
- package/dist/components/Explorer/useSearchInput.d.ts +10 -0
- package/dist/components/Explorer/useSearchInput.js +31 -0
- package/dist/components/Explorer/useSearchInput.js.map +1 -0
- package/dist/components/Explorer/useTableScrollableHeight.d.ts +5 -0
- package/dist/components/Explorer/useTableScrollableHeight.js +15 -0
- package/dist/components/Explorer/useTableScrollableHeight.js.map +1 -0
- package/dist/components/Explorer/useViewSettingsReducer.d.ts +8 -0
- package/dist/components/Explorer/useViewSettingsReducer.js +126 -0
- package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -0
- package/dist/components/ExportModal/ExportModal.js +2 -2
- package/dist/components/ExportModal/ExportModal.js.map +1 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +5 -5
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +2 -2
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js +7 -11
- package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js +7 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js +7 -5
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js.map +1 -1
- package/dist/components/LibraryItemsList/MenuView/MenuView.js +4 -9
- package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
- package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js +2 -3
- package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js.map +1 -1
- package/dist/components/LibraryItemsList/ViewPanel/View/View.js +3 -3
- package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +1 -1
- package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js +4 -9
- package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js.map +1 -1
- package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js +7 -5
- package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js.map +1 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.d.ts +1 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.d.ts +1 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +25 -33
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js.map +1 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +1 -0
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +10 -18
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +16 -3
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +10 -21
- package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.d.ts +5 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +44 -34
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.d.ts +3 -1
- package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js +8 -2
- package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +3 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +2 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +2 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.d.ts +6 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js +18 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.d.ts +4 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js +25 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +5 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +178 -186
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.d.ts +2 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +11 -30
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.d.ts +2 -13
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +73 -45
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +35 -46
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +11 -76
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +32 -49
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +38 -54
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +51 -63
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +33 -53
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +17 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +67 -401
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.d.ts +4 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/{MonoValueSelect.js → DSListSelect.js} +48 -52
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +2 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +16 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js +2 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.d.ts +42 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js +55 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.d.ts +12 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +32 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +10 -4
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +2 -2
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.d.ts +4 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +36 -3
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.d.ts +4 -7
- package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js +6 -8
- package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.d.ts +9 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js +42 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.d.ts +6 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js +35 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.d.ts +2 -281
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +25 -56
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js +1 -13
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +4 -7
- package/dist/components/SelectTreeNode/SelectTreeNode.js +17 -135
- package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +16 -0
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +131 -0
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -0
- package/dist/components/SelectTreeNode/index.d.ts +1 -1
- package/dist/components/SelectTreeNode/index.js +1 -1
- package/dist/components/SelectTreeNode/index.js.map +1 -1
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.d.ts +4 -7
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js +10 -10
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js.map +1 -1
- package/dist/components/SelectTreeNodeModal/index.d.ts +1 -2
- package/dist/components/SelectTreeNodeModal/index.js +1 -2
- package/dist/components/SelectTreeNodeModal/index.js.map +1 -1
- package/dist/components/UploadFiles/UploadFiles.js +1 -1
- package/dist/components/UploadFiles/UploadFiles.js.map +1 -1
- package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js +2 -2
- package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js.map +1 -1
- package/dist/constants.d.ts +3 -0
- package/dist/constants.js +3 -0
- package/dist/constants.js.map +1 -1
- package/dist/hooks/useDebouncedValue/index.d.ts +1 -0
- package/dist/{components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler → hooks/useDebouncedValue}/index.js +1 -1
- package/dist/hooks/useDebouncedValue/index.js.map +1 -0
- package/dist/hooks/useExecuteSaveViewMutation/index.d.ts +1 -0
- package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer → hooks/useExecuteSaveViewMutation}/index.js +1 -2
- package/dist/hooks/useExecuteSaveViewMutation/index.js.map +1 -0
- package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.d.ts +6 -0
- package/dist/hooks/{useExecuteAddViewMutation/useExecuteAddViewMutation.js → useExecuteSaveViewMutation/useExecuteSaveViewMutation.js} +6 -6
- package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js.map +1 -0
- package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -0
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
- package/dist/locales/en/shared.json +71 -10
- package/dist/locales/fr/shared.json +71 -10
- package/dist/types/views.d.ts +4 -4
- package/package.json +7 -2
- package/dist/components/Explorer/edit-settings/DisplayMode.d.ts +0 -2
- package/dist/components/Explorer/edit-settings/DisplayMode.js +0 -10
- package/dist/components/Explorer/edit-settings/DisplayMode.js.map +0 -1
- package/dist/components/Explorer/edit-settings/EditSettingsContext.js.map +0 -1
- package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.d.ts +0 -2
- package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.js.map +0 -1
- package/dist/components/Explorer/edit-settings/SettingItem.js.map +0 -1
- package/dist/components/Explorer/edit-settings/SettingsPanel.d.ts +0 -3
- package/dist/components/Explorer/edit-settings/SettingsPanel.js +0 -53
- package/dist/components/Explorer/edit-settings/SettingsPanel.js.map +0 -1
- package/dist/components/Explorer/edit-settings/SidePanel.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useEditSettings.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useOpenSettings.d.ts +0 -1
- package/dist/components/Explorer/edit-settings/useOpenSettings.js +0 -19
- package/dist/components/Explorer/edit-settings/useOpenSettings.js.map +0 -1
- package/dist/components/Explorer/useCreateMainAction.js +0 -36
- package/dist/components/Explorer/useCreateMainAction.js.map +0 -1
- package/dist/components/Explorer/useDeactivateAction.d.ts +0 -12
- package/dist/components/Explorer/useDeactivateAction.js +0 -51
- package/dist/components/Explorer/useDeactivateAction.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +0 -138
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +0 -361
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.d.ts +0 -7
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.d.ts +0 -8
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js +0 -23
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js +0 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js +0 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js +0 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js +0 -19
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js +0 -32
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js +0 -51
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js +0 -26
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.d.ts +0 -13
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js +0 -90
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.d.ts +0 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js +0 -45
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.d.ts +0 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js +0 -141
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +0 -1
- package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.d.ts +0 -6
- package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.js.map +0 -1
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.d.ts +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.d.ts +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.js +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.js +0 -0
|
@@ -2,24 +2,41 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
3
|
// This file is released under LGPL V3
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
-
import { cloneElement } from 'react';
|
|
6
|
-
import { KitButton, KitDropDown,
|
|
5
|
+
import { cloneElement, memo } from 'react';
|
|
6
|
+
import { KitButton, KitDropDown, KitPagination, KitSpace, KitTable, useKitTheme } from 'aristid-ds';
|
|
7
7
|
import { FaEllipsisH } from 'react-icons/fa';
|
|
8
|
+
import styled from 'styled-components';
|
|
8
9
|
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
9
|
-
import {
|
|
10
|
+
import { TableCell } from './TableCell';
|
|
11
|
+
import { IdCard } from './IdCard';
|
|
12
|
+
import { defaultPaginationHeight, useTableScrollableHeight } from './useTableScrollableHeight';
|
|
13
|
+
import isEqual from 'lodash/isEqual';
|
|
10
14
|
const USELESS = '';
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
const DataViewContainerDivStyled = styled.div `
|
|
16
|
+
flex: 1 1 min-content;
|
|
17
|
+
max-height: minmax(0, 1fr);
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
|
|
20
|
+
.kit-table {
|
|
21
|
+
padding-bottom: ${defaultPaginationHeight}px;
|
|
22
|
+
position: relative;
|
|
15
23
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
24
|
+
.pagination {
|
|
25
|
+
flex: 0 0 auto;
|
|
26
|
+
justify-content: flex-end;
|
|
27
|
+
display: flex;
|
|
28
|
+
padding-top: calc(var(--general-spacing-xs) * 1px);
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
// TODO: tests will fail if we don't check attributeToDisplay because we have a render with no attributes but data is present. We should check why there's this behavior
|
|
32
|
+
const arePropsEqual = (prevProps, nextProps) => isEqual({ attributesToDisplay: prevProps.attributesToDisplay, data: prevProps.dataGroupedFilteredSorted }, { attributesToDisplay: nextProps.attributesToDisplay, data: nextProps.dataGroupedFilteredSorted });
|
|
33
|
+
export const DataView = memo(({ dataGroupedFilteredSorted, attributesToDisplay, attributesProperties, paginationProps, itemActions }) => {
|
|
19
34
|
const { t } = useSharedTranslation();
|
|
35
|
+
const { theme } = useKitTheme();
|
|
36
|
+
const { containerRef, scrollHeight } = useTableScrollableHeight(!!paginationProps);
|
|
20
37
|
const _getActionButtons = (actions) => {
|
|
21
38
|
const isLessThanFourActions = actions.length < 4;
|
|
22
|
-
return isLessThanFourActions ? (_jsx(KitSpace, { children: actions.map(({ label, icon, isDanger, callback }) => (_jsx(KitButton, { title: label, icon: icon, onClick: callback, danger: isDanger, children: label }))) })) : (_jsxs(_Fragment, { children: [_jsx(KitButton, { type: "tertiary", icon: actions[0].icon, onClick: actions[0].callback, title: actions[0].label, danger: actions[0].isDanger }), _jsx(KitButton, { type: "tertiary", icon: actions[1].icon, onClick: actions[1].callback, title: actions[1].label, danger: actions[1].isDanger }), _jsx(KitDropDown, { menu: {
|
|
39
|
+
return isLessThanFourActions ? (_jsx(KitSpace, { children: actions.map(({ label, icon, isDanger, callback }, index) => (_jsx(KitButton, { title: label, icon: icon, onClick: callback, danger: isDanger, children: label }, index))) })) : (_jsxs(_Fragment, { children: [_jsx(KitButton, { type: "tertiary", icon: actions[0].icon, onClick: actions[0].callback, title: actions[0].label, danger: actions[0].isDanger }), _jsx(KitButton, { type: "tertiary", icon: actions[1].icon, onClick: actions[1].callback, title: actions[1].label, danger: actions[1].isDanger }), _jsx(KitDropDown, { menu: {
|
|
23
40
|
items: actions.slice(2).map(({ callback, icon, label, isDanger }) => ({
|
|
24
41
|
key: label,
|
|
25
42
|
title: label,
|
|
@@ -30,45 +47,29 @@ export const DataView = ({ dataGroupedFilteredSorted, attributesToDisplay, itemA
|
|
|
30
47
|
}))
|
|
31
48
|
}, children: _jsx(KitButton, { title: t('explorer.more-actions') ?? undefined, type: "tertiary", icon: _jsx(FaEllipsisH, {}) }) })] }));
|
|
32
49
|
};
|
|
33
|
-
const renderCell = (propertiesById, attributeName) => {
|
|
34
|
-
// TODO: handle inherited and calculated values
|
|
35
|
-
const isLinkValue = (v) => [AttributeType.simple_link, AttributeType.advanced_link].includes(v.attribute.type);
|
|
36
|
-
const isTreeValue = (v) => [AttributeType.tree].includes(v.attribute.type);
|
|
37
|
-
const isStandardValue = (v) => [AttributeType.simple, AttributeType.advanced].includes(v.attribute.type);
|
|
38
|
-
const defaultValue = '';
|
|
39
|
-
return propertiesById[attributeName]
|
|
40
|
-
.map(value => {
|
|
41
|
-
if (isStandardValue(value)) {
|
|
42
|
-
return value.valuePayload;
|
|
43
|
-
}
|
|
44
|
-
if (isTreeValue(value)) {
|
|
45
|
-
return value.treePayload?.record.id ?? defaultValue;
|
|
46
|
-
}
|
|
47
|
-
if (isLinkValue(value)) {
|
|
48
|
-
return value.linkPayload?.id ?? defaultValue;
|
|
49
|
-
}
|
|
50
|
-
})
|
|
51
|
-
.join(', ');
|
|
52
|
-
};
|
|
53
50
|
const columns = attributesToDisplay
|
|
54
51
|
.map(attributeName => ({
|
|
55
|
-
title: attributeName,
|
|
52
|
+
title: attributeName === 'whoAmI' ? '' : attributesProperties[attributeName].label,
|
|
56
53
|
dataIndex: USELESS,
|
|
57
|
-
|
|
54
|
+
shouldCellUpdate: (record, prevRecord) => attributeName === 'whoAmI'
|
|
55
|
+
? record.whoAmI !== prevRecord.whoAmI
|
|
56
|
+
: record.propertiesById[attributeName] !== prevRecord.propertiesById[attributeName],
|
|
57
|
+
render: (_, { whoAmI, propertiesById }) => attributeName === 'whoAmI' ? (_jsx(IdCard, { item: whoAmI })) : (_jsx(TableCell, { attributeProperties: attributesProperties[attributeName], values: propertiesById[attributeName] }))
|
|
58
58
|
}))
|
|
59
59
|
.concat(itemActions.length === 0
|
|
60
60
|
? []
|
|
61
61
|
: [
|
|
62
62
|
{
|
|
63
63
|
title: t('explorer.actions'),
|
|
64
|
-
fixed: 'right',
|
|
65
64
|
dataIndex: USELESS,
|
|
65
|
+
shouldCellUpdate: () => false,
|
|
66
66
|
render: (_, item) => _getActionButtons(itemActions.map(action => ({
|
|
67
67
|
...action,
|
|
68
68
|
callback: () => action.callback(item)
|
|
69
69
|
})))
|
|
70
70
|
}
|
|
71
71
|
]);
|
|
72
|
-
|
|
73
|
-
};
|
|
72
|
+
// TODO: handle columns width based on attribute type/format
|
|
73
|
+
return (_jsxs(DataViewContainerDivStyled, { ref: containerRef, children: [_jsx(KitTable, { borderedRows: true, cellsBackgroundColor: theme.utilities.light, backgroundColor: theme.colors.primary['50'], showHeader: dataGroupedFilteredSorted.length > 0, columns: columns, scroll: { y: scrollHeight }, dataSource: dataGroupedFilteredSorted, tableLayout: "fixed", pagination: false }), paginationProps && (_jsx("div", { className: "pagination", children: _jsx(KitPagination, { showSizeChanger: true, showTotal: (total, [from, to]) => t('explorer.pagination-total-number', { from, to, total }), total: paginationProps?.totalItems, defaultCurrent: paginationProps?.currentPage, defaultPageSize: paginationProps?.pageSize, pageSizeOptions: paginationProps?.pageSizeOptions, onChange: paginationProps?.setNewPage, onShowSizeChange: paginationProps?.setNewPageSize }) }))] }));
|
|
74
|
+
}, arePropsEqual);
|
|
74
75
|
//# sourceMappingURL=DataView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataView.js","sourceRoot":"","sources":["../../../src/components/Explorer/DataView.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"DataView.js","sourceRoot":"","sources":["../../../src/components/Explorer/DataView.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,YAAY,EAAqB,IAAI,EAAY,MAAM,OAAO,CAAC;AACvE,OAAO,EAAC,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAC,MAAM,YAAY,CAAC;AAElG,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,uBAAuB,EAAE,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;AAC7F,OA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ACxC,CAAC,CAAC,CACN;aACR;SACJ,CACV,CAAC;IAEN,4DAA4D;IAC5D,OAAO,CACH,MAAC,0BAA0B,IAAC,GAAG,EAAE,YAAY,aACzC,KAAC,QAAQ,IACL,YAAY,QACZ,oBAAoB,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,EAC3C,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAC3C,UAAU,EAAE,yBAAyB,CAAC,MAAM,GAAG,CAAC,EAChD,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,EAAC,CAAC,EAAE,YAAY,EAAC,EACzB,UAAU,EAAE,yBAAyB,EACrC,WAAW,EAAC,OAAO,EACnB,UAAU,EAAE,KAAK,GACnB,EACD,eAAe,IAAI,CAChB,cAAK,SAAS,EAAC,YAAY,YACvB,KAAC,aAAa,IACV,eAAe,QACf,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,kCAAkC,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,CAAC,EAC1F,KAAK,EAAE,eAAe,EAAE,UAAU,EAClC,cAAc,EAAE,eAAe,EAAE,WAAW,EAC5C,eAAe,EAAE,eAAe,EAAE,QAAQ,EAC1C,eAAe,EAAE,eAAe,EAAE,eAAe,EACjD,QAAQ,EAAE,eAAe,EAAE,UAAU,EACrC,gBAAgB,EAAE,eAAe,EAAE,cAAc,GACnD,GACA,CACT,IACwB,CAChC,CAAC;AACN,CAAC,EACD,aAAa,CAChB,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import { IItemAction } from './_types';
|
|
2
|
+
import { DefaultViewSettings, Entrypoint, IItemAction, IPrimaryAction } from './_types';
|
|
3
3
|
interface IExplorerProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
entrypoint: Entrypoint;
|
|
5
|
+
noPagination?: true;
|
|
6
|
+
itemActions?: IItemAction[];
|
|
7
|
+
primaryActions?: IPrimaryAction[];
|
|
8
|
+
title?: string;
|
|
9
|
+
defaultActionsForItem?: Array<'edit' | 'remove'>;
|
|
10
|
+
defaultPrimaryActions?: Array<'create'>;
|
|
11
|
+
defaultViewSettings?: DefaultViewSettings;
|
|
8
12
|
}
|
|
9
13
|
export declare const Explorer: FunctionComponent<IExplorerProps>;
|
|
10
14
|
export {};
|
|
@@ -1,34 +1,78 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createPortal } from 'react-dom';
|
|
3
|
+
import { KitEmpty, KitSpace, KitTypography } from 'aristid-ds';
|
|
3
4
|
import styled from 'styled-components';
|
|
4
|
-
import { DataView } from './DataView';
|
|
5
|
-
import { useOpenSettings } from './edit-settings/useOpenSettings';
|
|
6
5
|
import { useExplorerData } from './_queries/useExplorerData';
|
|
7
|
-
import {
|
|
6
|
+
import { DataView } from './DataView';
|
|
7
|
+
import { useRemoveAction } from './useRemoveAction';
|
|
8
8
|
import { useEditAction } from './useEditAction';
|
|
9
|
-
import {
|
|
9
|
+
import { usePrimaryActionsButton } from './usePrimaryActions';
|
|
10
|
+
import { ExplorerTitle } from './ExplorerTitle';
|
|
11
|
+
import { useCreateAction } from './useCreateAction';
|
|
12
|
+
import { defaultPageSizeOptions, SidePanel, useEditSettings, useOpenViewSettings, ViewSettingsContext } from './manage-view-settings';
|
|
13
|
+
import { useSearchInput } from './useSearchInput';
|
|
14
|
+
import { usePagination } from './usePagination';
|
|
15
|
+
import { Loading } from '../Loading';
|
|
16
|
+
import { ExplorerToolBar } from './display-view-filters/ExplorerToolBar';
|
|
17
|
+
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
18
|
+
import { useViewSettingsReducer } from './useViewSettingsReducer';
|
|
10
19
|
const isNotEmpty = (union) => union.length > 0;
|
|
20
|
+
const emptyArray = [];
|
|
21
|
+
const emptyObject = {};
|
|
11
22
|
const ExplorerHeaderDivStyled = styled.div `
|
|
12
23
|
display: flex;
|
|
13
24
|
justify-content: space-between;
|
|
14
25
|
align-items: center;
|
|
15
26
|
padding-bottom: calc(var(--general-spacing-xs) * 1px);
|
|
27
|
+
padding-right: calc(var(--general-spacing-xxs) * 1px);
|
|
16
28
|
`;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
29
|
+
const ExplorerPageDivStyled = styled.div `
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
height: 100%;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
`;
|
|
35
|
+
export const Explorer = ({ entrypoint, itemActions, primaryActions, title, noPagination, defaultActionsForItem = ['edit', 'remove'], defaultPrimaryActions = ['create'], defaultViewSettings }) => {
|
|
36
|
+
const { t } = useSharedTranslation();
|
|
37
|
+
const { panelElement } = useEditSettings();
|
|
38
|
+
const { loading: viewSettingsLoading, view, dispatch } = useViewSettingsReducer(entrypoint, defaultViewSettings);
|
|
39
|
+
const { currentPage, setNewPageSize, setNewPage } = usePagination(dispatch);
|
|
40
|
+
const { data, loading: loadingData, refetch } = useExplorerData({
|
|
41
|
+
entrypoint,
|
|
42
|
+
libraryId: view.libraryId,
|
|
43
|
+
attributeIds: view.attributesIds,
|
|
44
|
+
fulltextSearch: view.fulltextSearch,
|
|
45
|
+
pagination: noPagination ? null : { limit: view.pageSize, offset: view.pageSize * (currentPage - 1) },
|
|
46
|
+
sorts: view.sort,
|
|
47
|
+
filters: view.filters,
|
|
48
|
+
skip: viewSettingsLoading
|
|
49
|
+
}); // TODO: refresh when go back on page
|
|
50
|
+
const { removeAction } = useRemoveAction({
|
|
51
|
+
isEnabled: isNotEmpty(defaultActionsForItem) && defaultActionsForItem.includes('remove')
|
|
52
|
+
}, entrypoint);
|
|
23
53
|
const { editAction, editModal } = useEditAction({
|
|
24
54
|
isEnabled: isNotEmpty(defaultActionsForItem) && defaultActionsForItem.includes('edit')
|
|
25
55
|
});
|
|
26
|
-
const {
|
|
27
|
-
isEnabled: isNotEmpty(
|
|
28
|
-
library,
|
|
56
|
+
const { createAction, createModal } = useCreateAction({
|
|
57
|
+
isEnabled: isNotEmpty(defaultPrimaryActions) && defaultPrimaryActions.includes('create'),
|
|
58
|
+
library: view.libraryId,
|
|
59
|
+
entrypoint: view.entrypoint,
|
|
60
|
+
itemsCount: data?.totalCount ?? 0,
|
|
29
61
|
refetch
|
|
30
62
|
});
|
|
31
|
-
const
|
|
32
|
-
|
|
63
|
+
const { primaryButton } = usePrimaryActionsButton([createAction, ...(primaryActions ?? [])].filter(Boolean));
|
|
64
|
+
const { viewSettingsButton } = useOpenViewSettings(view.libraryId);
|
|
65
|
+
const { searchInput } = useSearchInput({ view, dispatch });
|
|
66
|
+
const hasNoResults = data === null || data.totalCount === 0;
|
|
67
|
+
return (_jsxs(ViewSettingsContext.Provider, { value: { view, dispatch }, children: [_jsxs(ExplorerPageDivStyled, { children: [_jsxs(ExplorerHeaderDivStyled, { children: [_jsx(KitTypography.Title, { level: "h1", children: !viewSettingsLoading && (_jsx(ExplorerTitle, { library: view.libraryId, title: title, entrypoint: entrypoint })) /*TODO: manage loading*/ }), _jsxs(KitSpace, { size: "xs", children: [searchInput, viewSettingsButton, primaryButton] })] }), !viewSettingsLoading && _jsx(ExplorerToolBar, { libraryId: view.libraryId }), loadingData || viewSettingsLoading ? (_jsx(Loading, {})) : hasNoResults ? (_jsx(KitEmpty, { title: t('explorer.empty-data') })) : (_jsx(DataView, { dataGroupedFilteredSorted: data?.records ?? emptyArray, attributesProperties: data?.attributes ?? emptyObject, attributesToDisplay: ['whoAmI', ...view.attributesIds], paginationProps: entrypoint.type === 'library'
|
|
68
|
+
? {
|
|
69
|
+
pageSizeOptions: defaultPageSizeOptions,
|
|
70
|
+
currentPage,
|
|
71
|
+
pageSize: view.pageSize,
|
|
72
|
+
setNewPageSize,
|
|
73
|
+
setNewPage,
|
|
74
|
+
totalItems: data?.totalCount ?? 0
|
|
75
|
+
}
|
|
76
|
+
: undefined, itemActions: [editAction, removeAction, ...(itemActions ?? emptyArray)].filter(Boolean) }))] }), panelElement && createPortal(_jsx(SidePanel, {}), panelElement), editModal, createModal] }));
|
|
33
77
|
};
|
|
34
78
|
//# sourceMappingURL=Explorer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Explorer.js","sourceRoot":"","sources":["../../../src/components/Explorer/Explorer.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Explorer.js","sourceRoot":"","sources":["../../../src/components/Explorer/Explorer.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAC7D,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAC,eAAe,EAAC,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,uBAAuB,EAAC,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EACH,sBAAsB,EACtB,SAAS,EACT,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAA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BAAsB;gCACvC,WAAW;gCACX,QAAQ,EAAE,IAAI,CAAC,QAAQ;gCACvB,cAAc;gCACd,UAAU;gCACV,UAAU,EAAE,IAAI,EAAE,UAAU,IAAI,CAAC;6BACpC;4BACH,CAAC,CAAC,SAAS,EAEnB,WAAW,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,GAAG,CAAC,WAAW,IAAI,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GACzF,CACL,IACmB,EACvB,YAAY,IAAI,YAAY,CAAC,KAAC,SAAS,KAAG,EAAE,YAAY,CAAC,EACzD,SAAS,EACT,WAAW,IACe,CAClC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { Entrypoint } from './_types';
|
|
3
|
+
interface IExplorerTitleProps {
|
|
4
|
+
title?: string;
|
|
5
|
+
library: string;
|
|
6
|
+
entrypoint: Entrypoint;
|
|
7
|
+
}
|
|
8
|
+
export declare const ExplorerTitle: FunctionComponent<IExplorerTitleProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { localizedTranslation } from '@leav/utils';
|
|
6
|
+
import { useExplorerLibraryDetailsQuery, useExplorerLinkAttributeQuery } from '../../_gqlTypes';
|
|
7
|
+
import useLang from '../../hooks/useLang';
|
|
8
|
+
import { AntSkeleton } from 'aristid-ds';
|
|
9
|
+
// TODO: use <h1 /> tag
|
|
10
|
+
export const ExplorerTitle = ({ title, library, entrypoint }) => {
|
|
11
|
+
const { data, loading, error } = useExplorerLibraryDetailsQuery({ variables: { libraryId: library }, skip: !!title });
|
|
12
|
+
const { data: attributeData, loading: attributeLoading, error: attributeError } = useExplorerLinkAttributeQuery({
|
|
13
|
+
skip: !!title || entrypoint.type !== 'link',
|
|
14
|
+
variables: {
|
|
15
|
+
id: entrypoint.linkAttributeId
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
const { lang } = useLang();
|
|
19
|
+
if (title) {
|
|
20
|
+
return _jsx("span", { children: title });
|
|
21
|
+
}
|
|
22
|
+
if (loading || attributeLoading) {
|
|
23
|
+
return _jsx(AntSkeleton.Input, { style: { width: 400 }, active: true });
|
|
24
|
+
}
|
|
25
|
+
// TODO: handle error and bad library ID
|
|
26
|
+
if (error || attributeError) {
|
|
27
|
+
return _jsx("span", { children: error?.message ?? attributeError?.message });
|
|
28
|
+
}
|
|
29
|
+
let label;
|
|
30
|
+
if (entrypoint.type === 'library') {
|
|
31
|
+
const libraryData = data?.libraries?.list[0];
|
|
32
|
+
if (!libraryData) {
|
|
33
|
+
// TODO: make it i18n
|
|
34
|
+
return _jsx("span", { children: "Unknown library" });
|
|
35
|
+
}
|
|
36
|
+
label = libraryData.label;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
const linkAttributeData = attributeData?.attributes?.list[0];
|
|
40
|
+
if (!linkAttributeData) {
|
|
41
|
+
return _jsx("span", { children: "Unknown link attribute" });
|
|
42
|
+
}
|
|
43
|
+
label = 'label' in linkAttributeData ? linkAttributeData.label : null;
|
|
44
|
+
}
|
|
45
|
+
return _jsx("span", { children: localizedTranslation(label, lang) });
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=ExplorerTitle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExplorerTitle.js","sourceRoot":"","sources":["../../../src/components/Explorer/ExplorerTitle.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,8BAA8B,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EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAE7C,IAAI,CAAC,WAAW,EAAE,CAAC;YACf,qBAAqB;YACrB,OAAO,6CAA4B,CAAC;QACxC,CAAC;QAED,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;IAC9B,CAAC;SAAM,CAAC;QACJ,MAAM,iBAAiB,GAAG,aAAa,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAE7D,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACrB,OAAO,oDAAmC,CAAC;QAC/C,CAAC;QAED,KAAK,GAAG,OAAO,IAAI,iBAAiB,CAAC,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1E,CAAC;IAED,OAAO,yBAAO,oBAAoB,CAAC,KAAK,EAAE,IAAI,CAAC,GAAQ,CAAC;AAC5D,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { KitIdCard } from 'aristid-ds';
|
|
6
|
+
export const IdCard = ({ item }) => {
|
|
7
|
+
const { id, label, library, preview, subLabel } = item;
|
|
8
|
+
const itemLabel = label ?? id;
|
|
9
|
+
const avatarProps = { label: itemLabel };
|
|
10
|
+
if (preview) {
|
|
11
|
+
avatarProps.src = preview.small;
|
|
12
|
+
}
|
|
13
|
+
return _jsx(KitIdCard, { avatarProps: avatarProps, title: label ?? id, description: subLabel ?? library.id });
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=IdCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdCard.js","sourceRoot":"","sources":["../../../src/components/Explorer/IdCard.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AASrC,MAAM,CAAC,MAAM,MAAM,GAAoC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAE;IAC9D,MAAM,EAAC,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAC,GAAG,IAAI,CAAC;IACrD,MAAM,SAAS,GAAG,KAAK,IAAI,EAAE,CAAC;IAC9B,MAAM,WAAW,GAAe,EAAC,KAAK,EAAE,SAAS,EAAC,CAAC;IAEnD,IAAI,OAAO,EAAE,CAAC;QACV,WAAW,CAAC,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC;IACpC,CAAC;IAED,OAAO,KAAC,SAAS,IAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,EAAE,WAAW,EAAE,QAAQ,IAAI,OAAO,CAAC,EAAE,GAAI,CAAC;AAC5G,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { AttributePropertiesFragment, PropertyValueFragment } from '../../_gqlTypes';
|
|
3
|
+
interface ITableCellProps {
|
|
4
|
+
values: PropertyValueFragment[];
|
|
5
|
+
attributeProperties: AttributePropertiesFragment;
|
|
6
|
+
}
|
|
7
|
+
export declare const TableCell: FunctionComponent<ITableCellProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { useCallback } from 'react';
|
|
6
|
+
import { AttributeFormat, AttributeType } from '../../_gqlTypes';
|
|
7
|
+
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
8
|
+
import { FaArrowRight, FaCalendar, FaListAlt } from 'react-icons/fa';
|
|
9
|
+
import DOMPurify from 'dompurify';
|
|
10
|
+
import { KitAvatar, KitSpace, KitTag, KitTypography } from 'aristid-ds';
|
|
11
|
+
import styled from 'styled-components';
|
|
12
|
+
import { IdCard } from './IdCard';
|
|
13
|
+
import { multiColorTagAvatarClassName, TableTagGroup } from './TableTagGroup';
|
|
14
|
+
import { ColorFactory } from 'antd/lib/color-picker/color';
|
|
15
|
+
const isStandardValue = (v, attribute) => [AttributeType.simple, AttributeType.advanced].includes(attribute.type);
|
|
16
|
+
const isStandardValues = (values, attribute) => values.every(value => isStandardValue(value, attribute));
|
|
17
|
+
const isLinkValue = (v, attribute) => [AttributeType.simple_link, AttributeType.advanced_link].includes(attribute.type);
|
|
18
|
+
const isLinkValues = (values, attribute) => values.every(value => isLinkValue(value, attribute));
|
|
19
|
+
const isTreeValue = (v, attribute) => [AttributeType.tree].includes(attribute.type);
|
|
20
|
+
const isDateRangeValue = (v) => 'from' in v && 'to' in v;
|
|
21
|
+
const StyledCenteringWrapper = styled.div `
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: calc(var(--general-spacing-xs) * 1px);
|
|
25
|
+
`;
|
|
26
|
+
const StyledColorChip = styled.div `
|
|
27
|
+
height: calc(var(--general-spacing-s) * 1px);
|
|
28
|
+
width: calc(var(--general-spacing-s) * 1px);
|
|
29
|
+
border-radius: calc(var(--general-border-radius-xs) * 1px);
|
|
30
|
+
background-color: ${props => props.$colorTextContent};
|
|
31
|
+
`;
|
|
32
|
+
const StyledFaListAlt = styled(FaListAlt) `
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
`;
|
|
35
|
+
const StyledFaCalendar = styled(FaCalendar) `
|
|
36
|
+
flex-shrink: 0;
|
|
37
|
+
`;
|
|
38
|
+
export const TableCell = ({ values, attributeProperties }) => {
|
|
39
|
+
const { t } = useSharedTranslation();
|
|
40
|
+
const _getDateRangeValueContent = useCallback((value) => {
|
|
41
|
+
if (!isDateRangeValue(value)) {
|
|
42
|
+
return t('explorer.invalid-value');
|
|
43
|
+
}
|
|
44
|
+
return (_jsxs(KitSpace, { size: "xxs", children: [_jsx(StyledFaCalendar, {}), value.from, " ", _jsx(FaArrowRight, {}), " ", value.to] }));
|
|
45
|
+
}, []);
|
|
46
|
+
if (attributeProperties.multiple_values) {
|
|
47
|
+
if (isStandardValues(values, attributeProperties)) {
|
|
48
|
+
const tags = values.map(value => {
|
|
49
|
+
switch (attributeProperties.format) {
|
|
50
|
+
case AttributeFormat.boolean:
|
|
51
|
+
return {
|
|
52
|
+
idCardProps: {
|
|
53
|
+
description: value.valuePayload ? String(t('global.yes')) : String(t('global.no'))
|
|
54
|
+
},
|
|
55
|
+
type: value.valuePayload ? 'primary' : 'neutral'
|
|
56
|
+
};
|
|
57
|
+
case AttributeFormat.color:
|
|
58
|
+
const color = new ColorFactory(value.valueRawPayload);
|
|
59
|
+
return {
|
|
60
|
+
idCardProps: {
|
|
61
|
+
description: value.valuePayload,
|
|
62
|
+
avatarProps: {
|
|
63
|
+
color: color.toHexString(),
|
|
64
|
+
shape: 'square',
|
|
65
|
+
className: multiColorTagAvatarClassName
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
case AttributeFormat.date_range:
|
|
70
|
+
return {
|
|
71
|
+
idCardProps: {
|
|
72
|
+
description: _getDateRangeValueContent(value.valuePayload)
|
|
73
|
+
},
|
|
74
|
+
type: 'primary'
|
|
75
|
+
};
|
|
76
|
+
default:
|
|
77
|
+
const valueContent = attributeProperties.format === AttributeFormat.encrypted
|
|
78
|
+
? '●●●●●●●●●●●●'
|
|
79
|
+
: value.valuePayload;
|
|
80
|
+
return {
|
|
81
|
+
idCardProps: { description: valueContent },
|
|
82
|
+
type: 'primary'
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
return _jsx(TableTagGroup, { tags: tags });
|
|
87
|
+
}
|
|
88
|
+
else if (isLinkValues(values, attributeProperties)) {
|
|
89
|
+
return (_jsx(KitAvatar.Group, { maxCount: 5, children: values.map((value, index) => {
|
|
90
|
+
if (!isLinkValue(value, attributeProperties)) {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
return (_jsx(KitAvatar, { label: String(value?.linkPayload?.whoAmI.label), src: value?.linkPayload?.whoAmI.preview?.small, color: "primary", secondaryColorInvert: true }, index));
|
|
94
|
+
}) }));
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
// TODO: handle multiple tree values
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
const value = values[0]; // Not multiple_values attribute should not have more than one value
|
|
103
|
+
if (!value) {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
let content = null;
|
|
107
|
+
if (isStandardValue(value, attributeProperties)) {
|
|
108
|
+
if (value.valuePayload === null) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
switch (attributeProperties.format) {
|
|
112
|
+
case AttributeFormat.boolean:
|
|
113
|
+
const valueToDisplay = value.valuePayload ? t('global.yes') : t('global.no');
|
|
114
|
+
content = (_jsx(KitTag, { type: !!value.valuePayload ? 'primary' : 'neutral', idCardProps: { description: valueToDisplay } }, attributeProperties.id));
|
|
115
|
+
break;
|
|
116
|
+
case AttributeFormat.rich_text:
|
|
117
|
+
const tmp = document.createElement('div');
|
|
118
|
+
tmp.innerHTML = DOMPurify.sanitize(value.valuePayload);
|
|
119
|
+
const textContent = tmp.textContent;
|
|
120
|
+
content = (_jsxs(_Fragment, { children: [_jsx(StyledFaListAlt, {}), _jsx(KitTypography.Text, { ellipsis: { tooltip: textContent }, children: textContent }, attributeProperties.id)] }));
|
|
121
|
+
break;
|
|
122
|
+
case AttributeFormat.color:
|
|
123
|
+
const color = new ColorFactory(value.valueRawPayload);
|
|
124
|
+
content = (_jsxs(_Fragment, { children: [_jsx(StyledColorChip, { "$colorTextContent": color.toHexString() }), _jsx(KitTypography.Text, { ellipsis: { tooltip: value.valuePayload }, children: value.valuePayload }, attributeProperties.id)] }));
|
|
125
|
+
break;
|
|
126
|
+
case AttributeFormat.date_range:
|
|
127
|
+
content = _getDateRangeValueContent(value.valuePayload);
|
|
128
|
+
break;
|
|
129
|
+
default:
|
|
130
|
+
const valueContent = attributeProperties.format === AttributeFormat.encrypted ? '●●●●●●●●●●●●' : value.valuePayload;
|
|
131
|
+
content = (_jsx(KitTypography.Text, { ellipsis: { tooltip: valueContent }, children: valueContent }, attributeProperties.id));
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (isTreeValue(value, attributeProperties)) {
|
|
136
|
+
content = value.treePayload?.record.id ?? '';
|
|
137
|
+
}
|
|
138
|
+
if (isLinkValue(value, attributeProperties)) {
|
|
139
|
+
content = value.linkPayload?.whoAmI ? (_jsx(IdCard, { item: value.linkPayload?.whoAmI }, attributeProperties.id)) : null;
|
|
140
|
+
}
|
|
141
|
+
return _jsx(StyledCenteringWrapper, { children: content });
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
//# sourceMappingURL=TableCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../src/components/Explorer/TableCell.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAA+B,WAAW,EAAC,MAAM,OAAO,CAAC;AAChE,OAAO,EACH,eAAe,EAEf,aAAa,EAKhB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,YAAY,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACnE,OAAO,SAAS,MAAM,WAAW,CAAC;AACl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C;QAED,IAAI,WAAW,CAAC,KAAK,EAAE,mBAAmB,CAAC,EAAE,CAAC;YAC1C,OAAO,GAAG,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC;QACjD,CAAC;QAED,IAAI,WAAW,CAAC,KAAK,EAAE,mBAAmB,CAAC,EAAE,CAAC;YAC1C,OAAO,GAAG,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,CAClC,KAAC,MAAM,IAA8B,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,MAAM,IAAvD,mBAAmB,CAAC,EAAE,CAAqC,CAC3E,CAAC,CAAC,CAAC,IAAI,CAAC;QACb,CAAC;QAED,OAAO,KAAC,sBAAsB,cAAE,OAAO,GAA0B,CAAC;IACtE,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IKitTag } from 'aristid-ds/dist/Kit/DataDisplay/Tag/types';
|
|
2
|
+
import { FunctionComponent } from 'react';
|
|
3
|
+
export declare const multiColorTagAvatarClassName = "multi-color-tag-avatar";
|
|
4
|
+
export declare const TableTagGroup: FunctionComponent<{
|
|
5
|
+
tags: IKitTag[];
|
|
6
|
+
maxTags?: number;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { KitTag, KitTooltip } from 'aristid-ds';
|
|
6
|
+
import styled from 'styled-components';
|
|
7
|
+
export const multiColorTagAvatarClassName = 'multi-color-tag-avatar';
|
|
8
|
+
const StyledTagsGroupDiv = styled.div `
|
|
9
|
+
display: flex;
|
|
10
|
+
column-gap: calc(var(--general-spacing-xxs) * 1px);
|
|
11
|
+
row-gap: calc(var(--general-spacing-xxs) * 0.5px);
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
|
|
14
|
+
& > span {
|
|
15
|
+
margin-right: var(--general-spacing-none);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// TODO: wait DS to allow better customization on avatar
|
|
19
|
+
&&& .${multiColorTagAvatarClassName} {
|
|
20
|
+
height: calc(var(--general-spacing-s) * 1px);
|
|
21
|
+
width: calc(var(--general-spacing-s) * 1px);
|
|
22
|
+
border-radius: calc(var(--general-border-radius-xs) * 1px);
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
export const TableTagGroup = ({ tags, maxTags = 3 }) => {
|
|
26
|
+
const hiddenTags = tags.slice(maxTags);
|
|
27
|
+
const visibleTags = tags.slice(0, maxTags);
|
|
28
|
+
return (_jsxs(StyledTagsGroupDiv, { children: [visibleTags.map((tag, index) => (_jsx(KitTag, { ...tag }, index))), hiddenTags.length > 0 && (_jsx(KitTooltip, { overlay: hiddenTags.map((hiddenTag, index) => (_jsx("div", { children: hiddenTag.idCardProps?.description }, index))), children: _jsx(KitTag, { type: "primary", idCardProps: { description: `+${hiddenTags.length}` } }) }))] }));
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=TableTagGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableTagGroup.js","sourceRoot":"","sources":["../../../src/components/Explorer/TableTagGroup.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,YAAY,CAAC;AAG9C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,MAAM,4BAA4B,GAAG,wBAAwB,CAAC;AAErE,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;WAW1B,4BAA4B;;;;;CAKtC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAGrB,CAAC,EAAC,IAAI,EAAE,OAAO,GAAG,CAAC,EAAC,EAAE,EAAE;IACzB,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACvC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAE3C,OAAO,CACH,MAAC,kBAAkB,eACd,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAC7B,KAAC,MAAM,OAAiB,GAAG,IAAd,KAAK,CAAa,CAClC,CAAC,EACD,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,CACtB,KAAC,UAAU,IACP,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1C,wBAAkB,SAAS,CAAC,WAAW,EAAE,WAAW,IAA1C,KAAK,CAA4C,CAC9D,CAAC,YAEF,KAAC,MAAM,IAAC,IAAI,EAAC,SAAS,EAAC,WAAW,EAAE,EAAC,WAAW,EAAE,IAAI,UAAU,CAAC,MAAM,EAAE,EAAC,GAAI,GACrE,CAChB,IACgB,CACxB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ViewTypes } from '../../_gqlTypes';
|
|
2
|
+
import { ViewType } from './manage-view-settings/store-view-settings/viewSettingsReducer';
|
|
3
|
+
export declare const mapViewTypeFromExplorerToLegacy: Record<ViewType, ViewTypes>;
|
|
4
|
+
export declare const mapViewTypeFromLegacyToExplorer: Record<ViewTypes, ViewType>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { ViewTypes } from '../../_gqlTypes';
|
|
5
|
+
//TODO: this mapping is here for backward compatibility. When the old explorer is removed, we should updates types on the backend and remove this mapping
|
|
6
|
+
export const mapViewTypeFromExplorerToLegacy = {
|
|
7
|
+
table: ViewTypes.list,
|
|
8
|
+
mosaic: ViewTypes.cards,
|
|
9
|
+
timeline: ViewTypes.timeline,
|
|
10
|
+
list: ViewTypes.list
|
|
11
|
+
};
|
|
12
|
+
export const mapViewTypeFromLegacyToExplorer = {
|
|
13
|
+
[ViewTypes.list]: 'table',
|
|
14
|
+
[ViewTypes.cards]: 'mosaic',
|
|
15
|
+
[ViewTypes.timeline]: 'timeline'
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=_constants.js.map
|