@leav/ui 0.3.6-3b21b2c → 0.3.6-3c4e933
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__mocks__/common/attribute.js +1 -0
- package/dist/__mocks__/common/attribute.js.map +1 -1
- package/dist/__mocks__/common/value.js +1 -0
- 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 +320 -68
- package/dist/_gqlTypes/index.js +167 -48
- 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 +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 +1 -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 -1
- package/dist/_utils/interleaveElement.js +1 -1
- package/dist/_utils/interleaveElement.js.map +1 -1
- 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/Explorer/DataView.d.ts +6 -1
- package/dist/components/Explorer/DataView.js +66 -18
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +7 -4
- package/dist/components/Explorer/Explorer.js +60 -24
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerTitle.d.ts +2 -0
- package/dist/components/Explorer/ExplorerTitle.js +28 -11
- package/dist/components/Explorer/ExplorerTitle.js.map +1 -1
- package/dist/components/Explorer/ExplorerToolbar.d.ts +5 -0
- package/dist/components/Explorer/ExplorerToolbar.js +45 -0
- package/dist/components/Explorer/ExplorerToolbar.js.map +1 -0
- package/dist/components/Explorer/TableCell.js +15 -6
- package/dist/components/Explorer/TableCell.js.map +1 -1
- package/dist/components/Explorer/_constants.d.ts +5 -0
- package/dist/components/Explorer/_constants.js +18 -0
- package/dist/components/Explorer/_constants.js.map +1 -0
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.d.ts +4 -0
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.js +81 -0
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.js.map +1 -0
- package/dist/components/Explorer/_queries/useExplorerData.d.ts +14 -7
- package/dist/components/Explorer/_queries/useExplorerData.js +69 -24
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +33 -2
- 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/manage-view-settings/_shared/CommonFilterItem.d.ts +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.d.ts +3 -1
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +9 -3
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +11 -4
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -1
- 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 +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +60 -6
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.d.ts +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +7 -32
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.d.ts +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +7 -32
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +6 -9
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +25 -7
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.d.ts +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +2 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +24 -6
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.d.ts +2 -1
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +45 -28
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +25 -21
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +13 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +29 -8
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +45 -29
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
- package/dist/components/Explorer/useColumnWidth.d.ts +6 -0
- package/dist/components/Explorer/useColumnWidth.js +48 -0
- package/dist/components/Explorer/useColumnWidth.js.map +1 -0
- package/dist/components/Explorer/useCreateAction.d.ts +4 -2
- package/dist/components/Explorer/useCreateAction.js +35 -2
- package/dist/components/Explorer/useCreateAction.js.map +1 -1
- package/dist/components/Explorer/useDeactivateMassAction.d.ts +27 -0
- package/dist/components/Explorer/useDeactivateMassAction.js +71 -0
- package/dist/components/Explorer/useDeactivateMassAction.js.map +1 -0
- package/dist/components/Explorer/useEditAction.js +3 -3
- package/dist/components/Explorer/useEditAction.js.map +1 -1
- package/dist/components/Explorer/useMassActions.d.ts +27 -0
- package/dist/components/Explorer/useMassActions.js +109 -0
- package/dist/components/Explorer/useMassActions.js.map +1 -0
- package/dist/components/Explorer/usePrimaryActions.js +14 -7
- package/dist/components/Explorer/usePrimaryActions.js.map +1 -1
- package/dist/components/Explorer/useRemoveAction.d.ts +23 -0
- package/dist/components/Explorer/useRemoveAction.js +109 -0
- package/dist/components/Explorer/useRemoveAction.js.map +1 -0
- package/dist/components/Explorer/useSearchInput.d.ts +10 -4
- package/dist/components/Explorer/useSearchInput.js +9 -1
- package/dist/components/Explorer/useSearchInput.js.map +1 -1
- package/dist/components/Explorer/useViewSettingsReducer.d.ts +4 -3
- package/dist/components/Explorer/useViewSettingsReducer.js +101 -35
- package/dist/components/Explorer/useViewSettingsReducer.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 +9 -17
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +4 -4
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +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/LinkField/LinkField.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js +2 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +40 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +2 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +39 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +6 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +5 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +5 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +6 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +6 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +5 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +2 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +3 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js +5 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +0 -5
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.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/RecordEdition/{EditRecordContent → EditRecordSkeleton}/EditRecordSkeleton.d.ts +1 -1
- package/dist/components/RecordEdition/{EditRecordContent → EditRecordSkeleton}/EditRecordSkeleton.js +2 -2
- package/dist/components/RecordEdition/EditRecordSkeleton/EditRecordSkeleton.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSkeleton/index.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordSkeleton/index.js +6 -0
- package/dist/components/RecordEdition/EditRecordSkeleton/index.js.map +1 -0
- package/dist/components/RecordEdition/index.d.ts +1 -0
- package/dist/components/RecordEdition/index.js +1 -0
- package/dist/components/RecordEdition/index.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/useExecuteSaveViewMutation/index.d.ts +1 -0
- package/dist/hooks/useExecuteSaveViewMutation/index.js +5 -0
- 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/locales/en/shared.json +36 -9
- package/dist/locales/fr/shared.json +38 -11
- package/dist/types/views.d.ts +4 -4
- package/package.json +2 -2
- package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.d.ts +0 -2
- package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.js +0 -37
- package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.d.ts +0 -3
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js +0 -72
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js.map +0 -1
- package/dist/components/Explorer/useDeactivateAction.d.ts +0 -12
- package/dist/components/Explorer/useDeactivateAction.js +0 -52
- package/dist/components/Explorer/useDeactivateAction.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordSkeleton.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/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.d.ts +0 -6
- package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.js.map +0 -1
package/dist/_utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/_utils/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,GAAG,EAAC,MAAM,gBAAgB,CAAC;AACnC,OAAO,EAAkB,UAAU,EAAE,sBAAsB,EAAE,IAAI,EAAe,MAAM,aAAa,CAAC;AAGpG,OAAO,EAAC,gCAAgC,EAAC,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAI1C,OAAO,EACH,aAAa,EAQhB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,kBAAkB,CAAC;AAEnC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAElB,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,OAAwC,EAAiB,EAAE,CACjG,OAAO,EAAE,MAAM,CAAC,CAAC,GAAkB,EAAE,KAAK,EAAE,EAAE;IAC1C,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG;QAChB,EAAE,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AC;IAChC,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IAC/C,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;IAEpC,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AAC/C,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const interleaveElement: <T extends unknown, U extends unknown>(insertedElement: T, sourceArray: U[]) => Array<T | U>;
|
|
1
|
+
export declare const interleaveElement: <T extends unknown, U extends unknown>(insertedElement: T, sourceArray: U[][]) => Array<T | U>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
2
2
|
// This file is released under LGPL V3
|
|
3
3
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
|
-
export const interleaveElement = (insertedElement, sourceArray) => sourceArray.flatMap(arrayElement => [insertedElement, arrayElement]).slice(1);
|
|
4
|
+
export const interleaveElement = (insertedElement, sourceArray) => sourceArray.flatMap(arrayElement => [insertedElement, ...arrayElement]).slice(1);
|
|
5
5
|
//# sourceMappingURL=interleaveElement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interleaveElement.js","sourceRoot":"","sources":["../../src/_utils/interleaveElement.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC7B,eAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"interleaveElement.js","sourceRoot":"","sources":["../../src/_utils/interleaveElement.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC7B,eAAkB,EAClB,WAAkB,EACN,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,eAAe,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { ThemeConfig } from 'antd/lib/config-provider/context';
|
|
2
|
-
import { KitApp } from 'aristid-ds';
|
|
3
|
-
import { ComponentProps } from 'react';
|
|
4
2
|
export * from './types';
|
|
5
3
|
export declare const themeVars: {
|
|
6
4
|
primaryColor: string;
|
|
@@ -24,4 +22,3 @@ export declare const themeVars: {
|
|
|
24
22
|
imageDefaultBackground: string;
|
|
25
23
|
};
|
|
26
24
|
export declare const customTheme: ThemeConfig;
|
|
27
|
-
export declare const dsTheme: ComponentProps<typeof KitApp>['customTheme'];
|
package/dist/antdTheme/index.js
CHANGED
|
@@ -5,8 +5,8 @@ export * from './types';
|
|
|
5
5
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
6
6
|
const baseTextColor = '#000000';
|
|
7
7
|
export const themeVars = {
|
|
8
|
-
primaryColor: '
|
|
9
|
-
primaryColorLighter: '
|
|
8
|
+
primaryColor: 'var(--general-colors-primary-400)',
|
|
9
|
+
primaryColorLighter: 'var(--general-colors-primary-100)',
|
|
10
10
|
defaultBg: '#ffffff',
|
|
11
11
|
invertedDefaultBg: '#000000',
|
|
12
12
|
defaultTextColor: baseTextColor,
|
|
@@ -26,55 +26,16 @@ export const themeVars = {
|
|
|
26
26
|
imageDefaultBackground: 'rgb(245, 245, 245)'
|
|
27
27
|
};
|
|
28
28
|
export const customTheme = {
|
|
29
|
-
token: {
|
|
30
|
-
colorPrimary: themeVars.primaryColor,
|
|
31
|
-
colorError: themeVars.errorColor,
|
|
32
|
-
colorBgBase: themeVars.defaultBg,
|
|
33
|
-
colorTextBase: themeVars.defaultTextColor,
|
|
34
|
-
colorBorder: themeVars.borderColor,
|
|
35
|
-
colorBorderSecondary: themeVars.borderLightColor,
|
|
36
|
-
colorSplit: themeVars.borderColor,
|
|
37
|
-
wireframe: false
|
|
38
|
-
},
|
|
39
29
|
components: {
|
|
40
30
|
Layout: {
|
|
41
31
|
headerBg: themeVars.secondaryBg,
|
|
42
32
|
controlHeight: 24 // Used by antd to compute the height of the header (2 * controlHeight)
|
|
43
33
|
},
|
|
44
|
-
Dropdown: {
|
|
45
|
-
controlItemBgHover: themeVars.activeColor,
|
|
46
|
-
colorSplit: themeVars.borderLightColor
|
|
47
|
-
},
|
|
48
34
|
Menu: {
|
|
49
35
|
colorActiveBarBorderSize: 0
|
|
50
36
|
},
|
|
51
37
|
Table: {
|
|
52
|
-
colorBgContainer: 'transparent'
|
|
53
|
-
colorFillAlter: themeVars.lightBg
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
export const dsTheme = {
|
|
58
|
-
general: {
|
|
59
|
-
colors: {
|
|
60
|
-
primary: {
|
|
61
|
-
100: '#ddf1fd',
|
|
62
|
-
200: '#98d6f8',
|
|
63
|
-
300: '#54baf4',
|
|
64
|
-
400: themeVars.primaryColor,
|
|
65
|
-
500: '#0d80c2',
|
|
66
|
-
600: '#0b6aa0',
|
|
67
|
-
700: '#08537d'
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
components: {
|
|
72
|
-
Input: {
|
|
73
|
-
colors: {
|
|
74
|
-
border: {
|
|
75
|
-
hover: customTheme.token.colorPrimary
|
|
76
|
-
}
|
|
77
|
-
}
|
|
38
|
+
colorBgContainer: 'transparent' // To avoid issues with border-radius on footer
|
|
78
39
|
}
|
|
79
40
|
}
|
|
80
41
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/antdTheme/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/antdTheme/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AAItE,cAAc,SAAS,CAAC;AAExB,sEAAsE;AACtE,MAAM,aAAa,GAAG,SAAS,CAAC;AAChC,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,YAAY,EAAE,mCAAmC;IACjD,mBAAmB,EAAE,mCAAmC;IACxD,SAAS,EAAE,SAAS;IACpB,iBAAiB,EAAE,SAAS;IAC5B,gBAAgB,EAAE,aAAa;IAC/B,wBAAwB,EAAE,SAAS;IACnC,kBAAkB,EAAE,aAAa,GAAG,IAAI;IACxC,WAAW,EAAE,SAAS;IACtB,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,SAAS;IACtB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,SAAS;IACtB,gBAAgB,EAAE,oBAAoB;IACtC,YAAY,EAAE,MAAM;IACpB,qBAAqB,EAAE,OAAO;IAC9B,2BAA2B,EAAE,SAAS;IACtC,YAAY,EAAE,4FAA4F;IAC1G,sBAAsB,EAAE,oBAAoB;CAC/C,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAgB;IACpC,UAAU,EAAE;QACR,MAAM,EAAE;YACJ,QAAQ,EAAE,SAAS,CAAC,WAAW;YAC/B,aAAa,EAAE,EAAE,CAAC,uEAAuE;SAC5F;QACD,IAAI,EAAE;YACF,wBAAwB,EAAE,CAAC;SAC9B;QACD,KAAK,EAAE;YACH,gBAAgB,EAAE,aAAa,CAAC,+CAA+C;SAClF;KACJ;CACJ,CAAC"}
|
|
@@ -7,12 +7,17 @@ interface IDataViewProps {
|
|
|
7
7
|
attributesToDisplay: string[];
|
|
8
8
|
paginationProps?: {
|
|
9
9
|
pageSizeOptions: number[];
|
|
10
|
-
|
|
10
|
+
totalCount: number;
|
|
11
11
|
currentPage: number;
|
|
12
12
|
pageSize: number;
|
|
13
13
|
setNewPage: (page: number, pageSize: number) => void;
|
|
14
14
|
setNewPageSize: (page: number, pageSize: number) => void;
|
|
15
15
|
};
|
|
16
|
+
selection: {
|
|
17
|
+
onSelectionChange: null | ((keys: string[]) => void);
|
|
18
|
+
isMassSelectionAll: boolean;
|
|
19
|
+
selectedKeys: string[];
|
|
20
|
+
};
|
|
16
21
|
}
|
|
17
22
|
export declare const DataView: FunctionComponent<IDataViewProps>;
|
|
18
23
|
export {};
|
|
@@ -3,15 +3,18 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
// This file is released under LGPL V3
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
5
|
import { cloneElement, memo } from 'react';
|
|
6
|
-
import { KitButton, KitDropDown, KitPagination,
|
|
6
|
+
import { KitButton, KitDropDown, KitPagination, KitTable, useKitTheme } from 'aristid-ds';
|
|
7
7
|
import { FaEllipsisH } from 'react-icons/fa';
|
|
8
8
|
import styled from 'styled-components';
|
|
9
|
+
import isEqual from 'lodash/isEqual';
|
|
9
10
|
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
10
11
|
import { TableCell } from './TableCell';
|
|
11
12
|
import { IdCard } from './IdCard';
|
|
12
13
|
import { defaultPaginationHeight, useTableScrollableHeight } from './useTableScrollableHeight';
|
|
13
|
-
import
|
|
14
|
+
import { useColumnWidth } from './useColumnWidth';
|
|
14
15
|
const USELESS = '';
|
|
16
|
+
const tableHeaderHeight = 56;
|
|
17
|
+
const tableHeaderMinLineHeight = 22;
|
|
15
18
|
const DataViewContainerDivStyled = styled.div `
|
|
16
19
|
flex: 1 1 min-content;
|
|
17
20
|
max-height: minmax(0, 1fr);
|
|
@@ -21,6 +24,7 @@ const DataViewContainerDivStyled = styled.div `
|
|
|
21
24
|
padding-bottom: ${defaultPaginationHeight}px;
|
|
22
25
|
position: relative;
|
|
23
26
|
}
|
|
27
|
+
|
|
24
28
|
.pagination {
|
|
25
29
|
flex: 0 0 auto;
|
|
26
30
|
justify-content: flex-end;
|
|
@@ -28,29 +32,57 @@ const DataViewContainerDivStyled = styled.div `
|
|
|
28
32
|
padding-top: calc(var(--general-spacing-xs) * 1px);
|
|
29
33
|
}
|
|
30
34
|
`;
|
|
35
|
+
const StyledActionsList = styled.div `
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
gap: calc(var(--general-spacing-xs) * 1px);
|
|
38
|
+
`;
|
|
39
|
+
// TODO: Table component should be updated fix header display
|
|
40
|
+
const StyledTable = styled(KitTable) `
|
|
41
|
+
.ant-table-thead > tr > th {
|
|
42
|
+
padding-top: calc(var(--general-spacing-xxs) * 1px) !important;
|
|
43
|
+
padding-bottom: calc(var(--general-spacing-xxs) * 1px) !important;
|
|
44
|
+
height: ${tableHeaderHeight}px;
|
|
45
|
+
|
|
46
|
+
.ant-table-cell {
|
|
47
|
+
min-height: ${tableHeaderMinLineHeight}px;
|
|
48
|
+
height: auto !important;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
31
52
|
// 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({
|
|
33
|
-
|
|
53
|
+
const arePropsEqual = (prevProps, nextProps) => isEqual({
|
|
54
|
+
attributesToDisplay: prevProps.attributesToDisplay,
|
|
55
|
+
data: prevProps.dataGroupedFilteredSorted,
|
|
56
|
+
selectedKeys: prevProps.selection.selectedKeys
|
|
57
|
+
}, {
|
|
58
|
+
attributesToDisplay: nextProps.attributesToDisplay,
|
|
59
|
+
data: nextProps.dataGroupedFilteredSorted,
|
|
60
|
+
selectedKeys: nextProps.selection.selectedKeys
|
|
61
|
+
});
|
|
62
|
+
export const DataView = memo(({ dataGroupedFilteredSorted, attributesToDisplay, attributesProperties, paginationProps, itemActions, selection: { onSelectionChange, selectedKeys, isMassSelectionAll } }) => {
|
|
34
63
|
const { t } = useSharedTranslation();
|
|
35
64
|
const { theme } = useKitTheme();
|
|
36
65
|
const { containerRef, scrollHeight } = useTableScrollableHeight(!!paginationProps);
|
|
37
|
-
const
|
|
66
|
+
const { ref, getFieldColumnWidth, columnWidth } = useColumnWidth();
|
|
67
|
+
const _getActionButtons = (actions, columnRef) => {
|
|
38
68
|
const isLessThanFourActions = actions.length < 4;
|
|
39
|
-
return isLessThanFourActions ? (_jsx(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
69
|
+
return (_jsx(StyledActionsList, { ref: columnRef, children: isLessThanFourActions ? (_jsx(_Fragment, { children: actions.map(({ label, icon, isDanger, callback, disabled }, actionIndex) => (_jsx(KitButton, { title: label, icon: icon, onClick: callback, danger: isDanger, disabled: disabled, children: label }, actionIndex))) })) : (_jsxs(_Fragment, { children: [_jsx(KitButton, { type: "tertiary", icon: actions[0].icon, onClick: actions[0].callback, title: actions[0].label, danger: actions[0].isDanger, disabled: actions[0].disabled }), _jsx(KitButton, { type: "tertiary", icon: actions[1].icon, onClick: actions[1].callback, title: actions[1].label, danger: actions[1].isDanger, disabled: actions[1].disabled }), _jsx(KitDropDown, { menu: {
|
|
70
|
+
items: actions.slice(2).map(({ callback, icon, label, isDanger, disabled }) => ({
|
|
71
|
+
key: label,
|
|
72
|
+
title: label,
|
|
73
|
+
danger: isDanger,
|
|
74
|
+
disabled,
|
|
75
|
+
label,
|
|
76
|
+
icon: icon ? cloneElement(icon, { size: '2em' }) : null, // TODO: find better tuning
|
|
77
|
+
onClick: callback
|
|
78
|
+
}))
|
|
79
|
+
}, children: _jsx(KitButton, { title: t('explorer.more-actions') ?? undefined, type: "tertiary", icon: _jsx(FaEllipsisH, {}) }) })] })) }));
|
|
49
80
|
};
|
|
50
81
|
const columns = attributesToDisplay
|
|
51
82
|
.map(attributeName => ({
|
|
52
83
|
title: attributeName === 'whoAmI' ? '' : attributesProperties[attributeName].label,
|
|
53
84
|
dataIndex: USELESS,
|
|
85
|
+
width: getFieldColumnWidth(attributesProperties[attributeName]),
|
|
54
86
|
shouldCellUpdate: (record, prevRecord) => attributeName === 'whoAmI'
|
|
55
87
|
? record.whoAmI !== prevRecord.whoAmI
|
|
56
88
|
: record.propertiesById[attributeName] !== prevRecord.propertiesById[attributeName],
|
|
@@ -63,13 +95,29 @@ export const DataView = memo(({ dataGroupedFilteredSorted, attributesToDisplay,
|
|
|
63
95
|
title: t('explorer.actions'),
|
|
64
96
|
dataIndex: USELESS,
|
|
65
97
|
shouldCellUpdate: () => false,
|
|
66
|
-
|
|
98
|
+
width: columnWidth,
|
|
99
|
+
render: (_, item, index) => _getActionButtons(itemActions.map(action => ({
|
|
67
100
|
...action,
|
|
68
101
|
callback: () => action.callback(item)
|
|
69
|
-
})))
|
|
102
|
+
})), index === 0 ? ref : null)
|
|
70
103
|
}
|
|
71
104
|
]);
|
|
105
|
+
const _rowSelection = onSelectionChange === null
|
|
106
|
+
? undefined
|
|
107
|
+
: {
|
|
108
|
+
type: 'checkbox',
|
|
109
|
+
columnTitle: ' ', // blank string to hide select all checkbox from <KitTable />
|
|
110
|
+
selectedRowKeys: selectedKeys,
|
|
111
|
+
preserveSelectedRowKeys: true,
|
|
112
|
+
// TODO: review types from antd directly
|
|
113
|
+
onChange: (selectedRowKeys, _selectedRows, _info) => onSelectionChange(selectedRowKeys),
|
|
114
|
+
getCheckboxProps: isMassSelectionAll
|
|
115
|
+
? () => ({
|
|
116
|
+
disabled: true
|
|
117
|
+
})
|
|
118
|
+
: undefined
|
|
119
|
+
};
|
|
72
120
|
// TODO: handle columns width based on attribute type/format
|
|
73
|
-
return (_jsxs(DataViewContainerDivStyled, { ref: containerRef, children: [_jsx(
|
|
121
|
+
return (_jsxs(DataViewContainerDivStyled, { ref: containerRef, children: [_jsx(StyledTable, { borderedRows: true, cellsBackgroundColor: theme.utilities.light, backgroundColor: theme.colors.primary['50'], showHeader: dataGroupedFilteredSorted.length > 0, columns: columns, tableLayout: "fixed", scroll: { y: scrollHeight, x: '100%' }, dataSource: dataGroupedFilteredSorted, pagination: false, rowSelection: _rowSelection }), paginationProps && (_jsx("div", { className: "pagination", children: _jsx(KitPagination, { showSizeChanger: true, showTotal: (total, [from, to]) => t('explorer.pagination-total-number', { from, to, count: total }), total: paginationProps.totalCount, defaultCurrent: paginationProps.currentPage, defaultPageSize: paginationProps.pageSize, pageSizeOptions: paginationProps.pageSizeOptions, onChange: paginationProps.setNewPage, onShowSizeChange: paginationProps.setNewPageSize }) }))] }));
|
|
74
122
|
}, arePropsEqual);
|
|
75
123
|
//# 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,EAAqC,IAAI,EAAY,MAAM,OAAO,CAAC;AACvF,OAAO,EAAC,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAC,MAAM,YAAY,CAAC;AAExF,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,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;AAE7F,OAAO,EAAC,cAAc,EAAC,M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
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import { DefaultViewSettings, IItemAction, IPrimaryAction } from './_types';
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { DefaultViewSettings, Entrypoint, IItemAction, IMassActions, IPrimaryAction } from './_types';
|
|
3
3
|
interface IExplorerProps {
|
|
4
|
+
entrypoint: Entrypoint;
|
|
4
5
|
noPagination?: true;
|
|
5
|
-
library: string;
|
|
6
6
|
itemActions?: IItemAction[];
|
|
7
7
|
primaryActions?: IPrimaryAction[];
|
|
8
|
+
massActions?: IMassActions[];
|
|
8
9
|
title?: string;
|
|
9
|
-
|
|
10
|
+
emptyPlaceholder?: ReactNode;
|
|
11
|
+
defaultActionsForItem?: Array<'edit' | 'remove'>;
|
|
10
12
|
defaultPrimaryActions?: Array<'create'>;
|
|
13
|
+
defaultMassActions?: Array<'deactivate'>;
|
|
11
14
|
defaultViewSettings?: DefaultViewSettings;
|
|
12
15
|
}
|
|
13
16
|
export declare const Explorer: FunctionComponent<IExplorerProps>;
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { createPortal } from 'react-dom';
|
|
3
3
|
import { KitEmpty, KitSpace, KitTypography } from 'aristid-ds';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
+
import { Loading } from '../../components/Loading';
|
|
6
|
+
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
5
7
|
import { useExplorerData } from './_queries/useExplorerData';
|
|
6
8
|
import { DataView } from './DataView';
|
|
7
|
-
import {
|
|
9
|
+
import { ExplorerTitle } from './ExplorerTitle';
|
|
10
|
+
import { ExplorerToolbar } from './ExplorerToolbar';
|
|
11
|
+
import { useRemoveAction } from './useRemoveAction';
|
|
8
12
|
import { useEditAction } from './useEditAction';
|
|
9
13
|
import { usePrimaryActionsButton } from './usePrimaryActions';
|
|
10
|
-
import { ExplorerTitle } from './ExplorerTitle';
|
|
11
14
|
import { useCreateAction } from './useCreateAction';
|
|
12
|
-
import {
|
|
15
|
+
import { useMassActions } from './useMassActions';
|
|
16
|
+
import { defaultPageSizeOptions, SidePanel, useEditSettings, useOpenViewSettings, ViewSettingsContext } from './manage-view-settings';
|
|
13
17
|
import { useSearchInput } from './useSearchInput';
|
|
14
18
|
import { usePagination } from './usePagination';
|
|
15
|
-
import { Loading } from '../Loading';
|
|
16
|
-
import { ExplorerFilterBar } from './display-view-filters/ExplorerFilterBar';
|
|
17
|
-
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
18
19
|
import { useViewSettingsReducer } from './useViewSettingsReducer';
|
|
20
|
+
import { useDeactivateMassAction } from './useDeactivateMassAction';
|
|
21
|
+
import { MASS_SELECTION_ALL } from './_constants';
|
|
19
22
|
const isNotEmpty = (union) => union.length > 0;
|
|
20
23
|
const emptyArray = [];
|
|
21
24
|
const emptyObject = {};
|
|
@@ -24,6 +27,7 @@ const ExplorerHeaderDivStyled = styled.div `
|
|
|
24
27
|
justify-content: space-between;
|
|
25
28
|
align-items: center;
|
|
26
29
|
padding-bottom: calc(var(--general-spacing-xs) * 1px);
|
|
30
|
+
padding-right: calc(var(--general-spacing-xxs) * 1px);
|
|
27
31
|
`;
|
|
28
32
|
const ExplorerPageDivStyled = styled.div `
|
|
29
33
|
display: flex;
|
|
@@ -31,13 +35,14 @@ const ExplorerPageDivStyled = styled.div `
|
|
|
31
35
|
height: 100%;
|
|
32
36
|
overflow: hidden;
|
|
33
37
|
`;
|
|
34
|
-
export const Explorer = ({
|
|
38
|
+
export const Explorer = ({ entrypoint, noPagination, itemActions = [], primaryActions = [], massActions = [], title, emptyPlaceholder, defaultActionsForItem = ['edit', 'remove'], defaultPrimaryActions = ['create'], defaultMassActions = ['deactivate'], defaultViewSettings }) => {
|
|
35
39
|
const { t } = useSharedTranslation();
|
|
36
40
|
const { panelElement } = useEditSettings();
|
|
37
|
-
const { loading: viewSettingsLoading, view, dispatch } = useViewSettingsReducer(defaultViewSettings);
|
|
41
|
+
const { loading: viewSettingsLoading, view, dispatch } = useViewSettingsReducer(entrypoint, defaultViewSettings);
|
|
38
42
|
const { currentPage, setNewPageSize, setNewPage } = usePagination(dispatch);
|
|
39
|
-
const { data, loading, refetch } = useExplorerData({
|
|
40
|
-
|
|
43
|
+
const { data, loading: loadingData, refetch } = useExplorerData({
|
|
44
|
+
entrypoint,
|
|
45
|
+
libraryId: view.libraryId,
|
|
41
46
|
attributeIds: view.attributesIds,
|
|
42
47
|
fulltextSearch: view.fulltextSearch,
|
|
43
48
|
pagination: noPagination ? null : { limit: view.pageSize, offset: view.pageSize * (currentPage - 1) },
|
|
@@ -45,28 +50,59 @@ export const Explorer = ({ library, itemActions, primaryActions, title, noPagina
|
|
|
45
50
|
filters: view.filters,
|
|
46
51
|
skip: viewSettingsLoading
|
|
47
52
|
}); // TODO: refresh when go back on page
|
|
48
|
-
const
|
|
49
|
-
|
|
53
|
+
const isMassSelectionAll = view.massSelection === MASS_SELECTION_ALL;
|
|
54
|
+
const { removeAction } = useRemoveAction({
|
|
55
|
+
isEnabled: isNotEmpty(defaultActionsForItem) && defaultActionsForItem.includes('remove'),
|
|
56
|
+
store: { view, dispatch },
|
|
57
|
+
entrypoint
|
|
50
58
|
});
|
|
51
59
|
const { editAction, editModal } = useEditAction({
|
|
52
60
|
isEnabled: isNotEmpty(defaultActionsForItem) && defaultActionsForItem.includes('edit')
|
|
53
61
|
});
|
|
54
62
|
const { createAction, createModal } = useCreateAction({
|
|
55
63
|
isEnabled: isNotEmpty(defaultPrimaryActions) && defaultPrimaryActions.includes('create'),
|
|
56
|
-
library,
|
|
64
|
+
library: view.libraryId,
|
|
65
|
+
entrypoint: view.entrypoint,
|
|
66
|
+
itemsCount: data?.totalCount ?? 0,
|
|
57
67
|
refetch
|
|
58
68
|
});
|
|
59
|
-
const
|
|
60
|
-
const {
|
|
69
|
+
const totalCount = data?.totalCount ?? 0;
|
|
70
|
+
const allVisibleKeys = data?.records.map(({ key }) => key) ?? [];
|
|
71
|
+
const { deactivateMassAction } = useDeactivateMassAction({
|
|
72
|
+
isEnabled: isNotEmpty(defaultMassActions) && defaultMassActions.includes('deactivate'),
|
|
73
|
+
store: { view, dispatch },
|
|
74
|
+
allVisibleKeys,
|
|
75
|
+
refetch
|
|
76
|
+
});
|
|
77
|
+
const { setSelectedKeys, selectAllButton } = useMassActions({
|
|
78
|
+
isEnabled: totalCount > 0 && (isNotEmpty(defaultMassActions) || isNotEmpty(massActions)),
|
|
79
|
+
store: { view, dispatch },
|
|
80
|
+
totalCount,
|
|
81
|
+
allVisibleKeys,
|
|
82
|
+
massActions: [deactivateMassAction, ...massActions].filter(Boolean)
|
|
83
|
+
});
|
|
84
|
+
const { primaryButton } = usePrimaryActionsButton([createAction, ...primaryActions].filter(Boolean));
|
|
85
|
+
const { viewSettingsButton } = useOpenViewSettings(view.libraryId);
|
|
61
86
|
const { searchInput } = useSearchInput({ view, dispatch });
|
|
62
87
|
const hasNoResults = data === null || data.totalCount === 0;
|
|
63
|
-
return (_jsxs(ViewSettingsContext.Provider, { value: { view, dispatch }, children: [_jsxs(ExplorerPageDivStyled, { children: [_jsxs(ExplorerHeaderDivStyled, { children: [_jsx(KitTypography.Title, { level: "h1", children: _jsx(ExplorerTitle, { library:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
88
|
+
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*/ }), !isMassSelectionAll && (_jsxs(KitSpace, { size: "xs", children: [searchInput, viewSettingsButton, primaryButton] }))] }), !viewSettingsLoading && (_jsx(ExplorerToolbar, { libraryId: view.libraryId, isMassSelectionAll: isMassSelectionAll, children: selectAllButton })), loadingData || viewSettingsLoading ? (_jsx(Loading, {})) : hasNoResults ? (_jsx(_Fragment, { children: emptyPlaceholder || _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'
|
|
89
|
+
? {
|
|
90
|
+
pageSizeOptions: defaultPageSizeOptions,
|
|
91
|
+
currentPage,
|
|
92
|
+
pageSize: view.pageSize,
|
|
93
|
+
setNewPageSize,
|
|
94
|
+
setNewPage,
|
|
95
|
+
totalCount
|
|
96
|
+
}
|
|
97
|
+
: undefined, itemActions: [editAction, removeAction, ...itemActions].filter(Boolean).map(action => ({
|
|
98
|
+
...action,
|
|
99
|
+
disabled: isMassSelectionAll
|
|
100
|
+
})), selection: {
|
|
101
|
+
onSelectionChange: setSelectedKeys,
|
|
102
|
+
isMassSelectionAll,
|
|
103
|
+
selectedKeys: isMassSelectionAll
|
|
104
|
+
? data?.records.map(({ whoAmI }) => whoAmI.id)
|
|
105
|
+
: view.massSelection
|
|
106
|
+
} }))] }), panelElement && createPortal(_jsx(SidePanel, {}), panelElement), editModal, createModal] }));
|
|
71
107
|
};
|
|
72
108
|
//# sourceMappingURL=Explorer.js.map
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
1
|
+
{"version":3,"file":"Explorer.js","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AAM,EAAC,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;gCAC5C,CAAC,CAAE,IAAI,CAAC,aAA0B;yBACzC,GACH,CACL,IACmB,EACvB,YAAY,IAAI,YAAY,CAAC,KAAC,SAAS,KAAG,EAAE,YAAY,CAAC,EACzD,SAAS,EACT,WAAW,IACe,CAClC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
+
import { Entrypoint } from './_types';
|
|
2
3
|
interface IExplorerTitleProps {
|
|
3
4
|
title?: string;
|
|
4
5
|
library: string;
|
|
6
|
+
entrypoint: Entrypoint;
|
|
5
7
|
}
|
|
6
8
|
export declare const ExplorerTitle: FunctionComponent<IExplorerTitleProps>;
|
|
7
9
|
export {};
|
|
@@ -3,28 +3,45 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
// This file is released under LGPL V3
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
5
|
import { localizedTranslation } from '@leav/utils';
|
|
6
|
-
import {
|
|
6
|
+
import { useExplorerLibraryDetailsQuery, useExplorerLinkAttributeQuery } from '../../_gqlTypes';
|
|
7
7
|
import useLang from '../../hooks/useLang';
|
|
8
8
|
import { AntSkeleton } from 'aristid-ds';
|
|
9
9
|
// TODO: use <h1 /> tag
|
|
10
|
-
export const ExplorerTitle = ({ title, library }) => {
|
|
11
|
-
const { data, loading, error } =
|
|
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
|
+
});
|
|
12
18
|
const { lang } = useLang();
|
|
13
19
|
if (title) {
|
|
14
20
|
return _jsx("span", { children: title });
|
|
15
21
|
}
|
|
16
|
-
if (loading) {
|
|
22
|
+
if (loading || attributeLoading) {
|
|
17
23
|
return _jsx(AntSkeleton.Input, { style: { width: 400 }, active: true });
|
|
18
24
|
}
|
|
19
25
|
// TODO: handle error and bad library ID
|
|
20
|
-
if (error) {
|
|
21
|
-
return _jsx("span", { children: error
|
|
26
|
+
if (error || attributeError) {
|
|
27
|
+
return _jsx("span", { children: error?.message ?? attributeError?.message });
|
|
22
28
|
}
|
|
23
|
-
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
|
|
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;
|
|
27
37
|
}
|
|
28
|
-
|
|
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) });
|
|
29
46
|
};
|
|
30
47
|
//# sourceMappingURL=ExplorerTitle.js.map
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"ExplorerTitle.js","sourceRoot":"","sources":["../../../src/components/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