@leav/ui 1.6.0 → 1.7.0-13483399
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/README.md +13 -12
- package/dist/__mocks__/common/library.d.ts +1 -0
- package/dist/__mocks__/react-i18next.d.ts +1 -1
- package/dist/_gqlTypes/index.d.ts +1046 -687
- package/dist/_gqlTypes/index.js +188 -43
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/attributes/attributeDetailsFragment.js +5 -0
- package/dist/_queries/attributes/attributeDetailsFragment.js.map +1 -1
- package/dist/_queries/libraries/libraryDetailsFragment.js +1 -0
- package/dist/_queries/libraries/libraryDetailsFragment.js.map +1 -1
- package/dist/_queries/trees/treeNodeChildrenQuery.js +2 -0
- package/dist/_queries/trees/treeNodeChildrenQuery.js.map +1 -1
- package/dist/_queries/views/viewDetailsFragment.js +1 -0
- package/dist/_queries/views/viewDetailsFragment.js.map +1 -1
- package/dist/components/AttributePicker/AttributesList/AttributesList.js +3 -7
- package/dist/components/AttributePicker/AttributesList/AttributesList.js.map +1 -1
- package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.js +20 -12
- package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.js.map +1 -1
- package/dist/components/AttributesSelectionList/reducer/__mocks__/attributesSelectionListStateContext.d.ts +1 -1
- package/dist/components/AttributesSelectionList/sharedComponents.d.ts +159 -153
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/AttributesList.js +3 -7
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/AttributesList.js.map +1 -1
- package/dist/components/Explorer/DataView.d.ts +2 -0
- package/dist/components/Explorer/DataView.js +6 -3
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +2 -0
- package/dist/components/Explorer/Explorer.js +7 -5
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerFiltersAndSorts.js +1 -1
- package/dist/components/Explorer/ExplorerFiltersAndSorts.js.map +1 -1
- package/dist/components/Explorer/TableCell.js +15 -23
- package/dist/components/Explorer/TableCell.js.map +1 -1
- package/dist/components/Explorer/TableNameCell.js +3 -2
- package/dist/components/Explorer/TableNameCell.js.map +1 -1
- package/dist/components/Explorer/_queries/useExplorerData.d.ts +7 -7
- package/dist/components/Explorer/_queries/useExplorerData.js +19 -7
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/actions-item/useEditStatusItemAction.js +3 -2
- package/dist/components/Explorer/actions-item/useEditStatusItemAction.js.map +1 -1
- package/dist/components/Explorer/actions-item/useReplaceItemAction.d.ts +2 -1
- package/dist/components/Explorer/actions-item/useReplaceItemAction.js +5 -4
- package/dist/components/Explorer/actions-item/useReplaceItemAction.js.map +1 -1
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValueLine.d.ts +2 -4
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValueLine.js +18 -16
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValueLine.js.map +1 -1
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValuesMapping.js +2 -2
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValuesMapping.js.map +1 -1
- package/dist/components/Explorer/actions-mass/edit-attribute/useListEditableAttributeHook.js +9 -1
- package/dist/components/Explorer/actions-mass/edit-attribute/useListEditableAttributeHook.js.map +1 -1
- package/dist/components/Explorer/actions-mass/edit-attribute/useListTreeAttributeValuesHook.d.ts +10 -3
- package/dist/components/Explorer/actions-mass/edit-attribute/useListTreeAttributeValuesHook.js +16 -6
- package/dist/components/Explorer/actions-mass/edit-attribute/useListTreeAttributeValuesHook.js.map +1 -1
- package/dist/components/Explorer/actions-mass/export/ExportProfileSelectionModal.d.ts +10 -0
- package/dist/components/Explorer/actions-mass/export/ExportProfileSelectionModal.js +46 -0
- package/dist/components/Explorer/actions-mass/export/ExportProfileSelectionModal.js.map +1 -0
- package/dist/components/Explorer/actions-mass/export/content/NoProfiles.d.ts +1 -0
- package/dist/components/Explorer/actions-mass/export/content/NoProfiles.js +17 -0
- package/dist/components/Explorer/actions-mass/export/content/NoProfiles.js.map +1 -0
- package/dist/components/Explorer/actions-mass/export/content/ProfilesSelection.d.ts +8 -0
- package/dist/components/Explorer/actions-mass/export/content/ProfilesSelection.js +49 -0
- package/dist/components/Explorer/actions-mass/export/content/ProfilesSelection.js.map +1 -0
- package/dist/components/Explorer/actions-mass/export/useGetLibraryExportProfiles.d.ts +27 -0
- package/dist/components/Explorer/actions-mass/export/useGetLibraryExportProfiles.js +48 -0
- package/dist/components/Explorer/actions-mass/export/useGetLibraryExportProfiles.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js +3 -2
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js.map +1 -1
- package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js +3 -2
- package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js.map +1 -1
- package/dist/components/Explorer/actions-mass/useEditAttributeMassAction.js +3 -2
- package/dist/components/Explorer/actions-mass/useEditAttributeMassAction.js.map +1 -1
- package/dist/components/Explorer/actions-mass/useExportMassAction.d.ts +7 -4
- package/dist/components/Explorer/actions-mass/useExportMassAction.js +80 -73
- package/dist/components/Explorer/actions-mass/useExportMassAction.js.map +1 -1
- package/dist/components/Explorer/actions-mass/useMassActions.js +3 -2
- package/dist/components/Explorer/actions-mass/useMassActions.js.map +1 -1
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +3 -2
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -1
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.d.ts +2 -1
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js +5 -4
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js.map +1 -1
- package/dist/components/Explorer/link-item/LinkModal.d.ts +1 -0
- package/dist/components/Explorer/link-item/LinkModal.js +2 -2
- package/dist/components/Explorer/link-item/LinkModal.js.map +1 -1
- package/dist/components/Explorer/list-saved-views/SavedViews.js +4 -3
- package/dist/components/Explorer/list-saved-views/SavedViews.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js +5 -8
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +3 -2
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js +2 -2
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +7 -6
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +3 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +5 -4
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js +3 -2
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +3 -2
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/LabelViewFormModal.js +3 -2
- package/dist/components/Explorer/manage-view-settings/save-view/LabelViewFormModal.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js +3 -0
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js +3 -2
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useDeleteView.js +4 -3
- package/dist/components/Explorer/manage-view-settings/save-view/useDeleteView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useEditLabelView.js +3 -2
- package/dist/components/Explorer/manage-view-settings/save-view/useEditLabelView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js +3 -2
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js +3 -2
- package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js +3 -2
- package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +7 -6
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +3 -2
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
- package/dist/components/Explorer/useSearchInput.js +6 -2
- package/dist/components/Explorer/useSearchInput.js.map +1 -1
- package/dist/components/Filters/FiltersProvider.d.ts +2 -2
- package/dist/components/Filters/FiltersProvider.js.map +1 -1
- package/dist/components/Filters/_types.d.ts +3 -0
- package/dist/components/Filters/_types.js.map +1 -1
- package/dist/components/Filters/context/filtersReducer.js +7 -4
- package/dist/components/Filters/context/filtersReducer.js.map +1 -1
- package/dist/components/Filters/filter-items/CommonFilterItem.d.ts +1 -0
- package/dist/components/Filters/filter-items/CommonFilterItem.js +28 -8
- package/dist/components/Filters/filter-items/CommonFilterItem.js.map +1 -1
- package/dist/components/Filters/filter-items/EmptyValueCheckbox.d.ts +8 -0
- package/dist/components/Filters/filter-items/EmptyValueCheckbox.js +16 -0
- package/dist/components/Filters/filter-items/EmptyValueCheckbox.js.map +1 -0
- package/dist/components/Filters/filter-items/filter-type/BooleanAttributeDropdown.js +23 -9
- package/dist/components/Filters/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/ColorAttributeDropDown.js +9 -8
- package/dist/components/Filters/filter-items/filter-type/ColorAttributeDropDown.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/FilterDropDown.js +4 -3
- package/dist/components/Filters/filter-items/filter-type/FilterDropDown.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/FilterDropdownContent.js +1 -1
- package/dist/components/Filters/filter-items/filter-type/FilterDropdownContent.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/FilterValueListDropDown.d.ts +0 -1
- package/dist/components/Filters/filter-items/filter-type/FilterValueListDropDown.js +17 -23
- package/dist/components/Filters/filter-items/filter-type/FilterValueListDropDown.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/TreeAttributeDropDown.js +10 -12
- package/dist/components/Filters/filter-items/filter-type/TreeAttributeDropDown.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/useConditionOptionsByType.js +3 -13
- package/dist/components/Filters/filter-items/filter-type/useConditionOptionsByType.js.map +1 -1
- package/dist/components/Filters/index.d.ts +1 -0
- package/dist/components/Filters/index.js +1 -0
- package/dist/components/Filters/index.js.map +1 -1
- package/dist/components/Filters/prepareFiltersForRequest.js +36 -3
- package/dist/components/Filters/prepareFiltersForRequest.js.map +1 -1
- package/dist/components/Filters/useFilters.d.ts +5 -0
- package/dist/components/Filters/useTransformFilters.js +4 -0
- package/dist/components/Filters/useTransformFilters.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.d.ts +1 -3
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +6 -2
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/FiltersOptions.js +1 -8
- package/dist/components/LibraryItemsList/FiltersPanel/FiltersOptions.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/FiltersPanel.js +15 -17
- package/dist/components/LibraryItemsList/FiltersPanel/FiltersPanel.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.js +0 -6
- package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.js.map +1 -1
- package/dist/components/LibraryItemsList/MenuView/MenuView.js +4 -4
- package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
- package/dist/components/LibraryItemsList/ViewPanel/View/View.d.ts +1 -3
- package/dist/components/LibraryItemsList/ViewPanel/View/View.js +9 -4
- package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +1 -1
- package/dist/components/LibraryItemsList/ViewPanel/ViewPanel.js +36 -14
- package/dist/components/LibraryItemsList/ViewPanel/ViewPanel.js.map +1 -1
- package/dist/components/Notifications/hooks/useNotificationSubscription.js +3 -2
- package/dist/components/Notifications/hooks/useNotificationSubscription.js.map +1 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +1 -0
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +3 -3
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +2 -0
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/__mocks__/useDeleteValueMutation.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/__mocks__/useSaveValueMutation.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionBtn/ValuesVersionBtn.js +5 -20
- package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionBtn/ValuesVersionBtn.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.d.ts +1 -11
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +8 -95
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/_types.d.ts +8 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/_types.js +2 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/_types.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/explorer/LinkFieldExplorer.d.ts +6 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/explorer/LinkFieldExplorer.js +77 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/explorer/LinkFieldExplorer.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record → explorer/link-record}/useExplorerLinkRecords.d.ts +5 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record → explorer/link-record}/useExplorerLinkRecords.js +3 -10
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/explorer/link-record/useExplorerLinkRecords.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record → explorer/link-record}/useLinkRecords.d.ts +5 -6
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/explorer/link-record/useLinkRecords.js +98 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/explorer/link-record/useLinkRecords.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/{ExplorerWrapper.d.ts → InputExtraAlignLeft.d.ts} +54 -52
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record/ActionButton.js → shared/InputExtraAlignLeft.js} +4 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/InputExtraAlignLeft.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/InputWrapper.d.ts +3 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/InputWrapper.js +31 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/InputWrapper.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/Wrapper.d.ts +3 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/Wrapper.js +8 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/Wrapper.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/LinkFieldTags.d.ts +3 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/LinkFieldTags.js +57 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/LinkFieldTags.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/link-record/useLinkRecord.d.ts +16 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/link-record/useLinkRecord.js +85 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/link-record/useLinkRecord.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/unlink-record/useUnlinkRecord.d.ts +19 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/unlink-record/useUnlinkRecord.js +43 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/unlink-record/useUnlinkRecord.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/unlink-all-records/useUnlinkAllRecords.d.ts +16 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/unlink-all-records/useUnlinkAllRecords.js +27 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/unlink-all-records/useUnlinkAllRecords.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +4 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +2 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +9 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeFieldWrapper.d.ts +53 -51
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeItem.js +3 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeItem.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.d.ts +2 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js +4 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.d.ts +3 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/ComputeIndicator.js +3 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/ComputeIndicator.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +1 -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/RecordSummary/RecordInformations/RecordInformations.js +3 -2
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js +4 -3
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesVersions/ValuesVersions.js +3 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesVersions/ValuesVersions.js.map +1 -1
- package/dist/components/RecordEdition/hooks/useGetSubmitButtons.js +2 -2
- package/dist/components/RecordEdition/hooks/useGetSubmitButtons.js.map +1 -1
- package/dist/components/RecordHistory/RecordHistoryLogEntry.js +10 -2
- package/dist/components/RecordHistory/RecordHistoryLogEntry.js.map +1 -1
- package/dist/components/RecordHistory/_queries/recordHistoryQuery.d.ts +7 -0
- package/dist/components/RecordHistory/_queries/recordHistoryQuery.js +64 -0
- package/dist/components/RecordHistory/_queries/recordHistoryQuery.js.map +1 -0
- package/dist/components/RecordHistory/hooks/useFetchRecordHistory.js +5 -2
- package/dist/components/RecordHistory/hooks/useFetchRecordHistory.js.map +1 -1
- package/dist/components/RecordHistory/utils/extendedAttribute.d.ts +11 -0
- package/dist/components/RecordHistory/utils/extendedAttribute.js +40 -0
- package/dist/components/RecordHistory/utils/extendedAttribute.js.map +1 -0
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.d.ts +1 -0
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js +7 -7
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +2 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.js +3 -3
- package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +2 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +6 -2
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -1
- package/dist/components/SelectTreeNode/TreeNodeTitle.js +5 -4
- package/dist/components/SelectTreeNode/TreeNodeTitle.js.map +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/messageHandlers.d.ts +3 -1
- package/dist/hooks/useIFrameMessenger/messageHandlers.js +16 -0
- package/dist/hooks/useIFrameMessenger/messageHandlers.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/schema.d.ts +6 -3
- package/dist/hooks/useIFrameMessenger/schema.js +2 -1
- package/dist/hooks/useIFrameMessenger/schema.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/types.d.ts +32 -2
- package/dist/hooks/useIFrameMessenger/types.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.d.ts +2 -0
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js +16 -2
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js.map +1 -1
- package/dist/hooks/useIFrameMessengerClient/iFrameMessengerClientContext.d.ts +2 -0
- package/dist/hooks/useIFrameMessengerClient/useIFrameMessengerClient.d.ts +2 -0
- package/dist/locales/en/shared.json +20 -4
- package/dist/locales/fr/shared.json +20 -4
- package/dist/types/records.d.ts +1 -0
- package/dist/types/records.js.map +1 -1
- package/package.json +40 -42
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useExplorerLinkRecords.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js +0 -100
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/ExplorerWrapper.js +0 -13
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/ExplorerWrapper.js.map +0 -1
|
@@ -2,10 +2,11 @@ export declare const TextAttribute: import("styled-components").IStyledComponent
|
|
|
2
2
|
ref?: import("react").LegacyRef<HTMLSpanElement>;
|
|
3
3
|
key?: import("react").Key | null | undefined;
|
|
4
4
|
defaultChecked?: boolean | undefined;
|
|
5
|
-
defaultValue?: string | number |
|
|
5
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
6
6
|
suppressContentEditableWarning?: boolean | undefined;
|
|
7
7
|
suppressHydrationWarning?: boolean | undefined;
|
|
8
8
|
accessKey?: string | undefined;
|
|
9
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
9
10
|
autoFocus?: boolean | undefined;
|
|
10
11
|
className?: string | undefined;
|
|
11
12
|
contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
|
|
@@ -36,7 +37,6 @@ export declare const TextAttribute: import("styled-components").IStyledComponent
|
|
|
36
37
|
rev?: string | undefined;
|
|
37
38
|
typeof?: string | undefined;
|
|
38
39
|
vocab?: string | undefined;
|
|
39
|
-
autoCapitalize?: string | undefined;
|
|
40
40
|
autoCorrect?: string | undefined;
|
|
41
41
|
autoSave?: string | undefined;
|
|
42
42
|
color?: string | undefined;
|
|
@@ -50,55 +50,57 @@ export declare const TextAttribute: import("styled-components").IStyledComponent
|
|
|
50
50
|
unselectable?: "on" | "off" | undefined;
|
|
51
51
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
52
52
|
is?: string | undefined;
|
|
53
|
+
exportparts?: string | undefined;
|
|
54
|
+
part?: string | undefined;
|
|
53
55
|
children?: import("react").ReactNode;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
56
|
+
"aria-activedescendant"?: string | undefined;
|
|
57
|
+
"aria-atomic"?: boolean | "false" | "true" | undefined;
|
|
58
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
59
|
+
"aria-busy"?: boolean | "false" | "true" | undefined;
|
|
60
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
61
|
+
"aria-colcount"?: number | undefined;
|
|
62
|
+
"aria-colindex"?: number | undefined;
|
|
63
|
+
"aria-colspan"?: number | undefined;
|
|
64
|
+
"aria-controls"?: string | undefined;
|
|
65
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
66
|
+
"aria-describedby"?: string | undefined;
|
|
67
|
+
"aria-details"?: string | undefined;
|
|
68
|
+
"aria-disabled"?: boolean | "false" | "true" | undefined;
|
|
69
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
70
|
+
"aria-errormessage"?: string | undefined;
|
|
71
|
+
"aria-expanded"?: boolean | "false" | "true" | undefined;
|
|
72
|
+
"aria-flowto"?: string | undefined;
|
|
73
|
+
"aria-grabbed"?: boolean | "false" | "true" | undefined;
|
|
74
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
75
|
+
"aria-hidden"?: boolean | "false" | "true" | undefined;
|
|
76
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
77
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
78
|
+
"aria-label"?: string | undefined;
|
|
79
|
+
"aria-labelledby"?: string | undefined;
|
|
80
|
+
"aria-level"?: number | undefined;
|
|
81
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
82
|
+
"aria-modal"?: boolean | "false" | "true" | undefined;
|
|
83
|
+
"aria-multiline"?: boolean | "false" | "true" | undefined;
|
|
84
|
+
"aria-multiselectable"?: boolean | "false" | "true" | undefined;
|
|
85
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
86
|
+
"aria-owns"?: string | undefined;
|
|
87
|
+
"aria-placeholder"?: string | undefined;
|
|
88
|
+
"aria-posinset"?: number | undefined;
|
|
89
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
90
|
+
"aria-readonly"?: boolean | "false" | "true" | undefined;
|
|
91
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
92
|
+
"aria-required"?: boolean | "false" | "true" | undefined;
|
|
93
|
+
"aria-roledescription"?: string | undefined;
|
|
94
|
+
"aria-rowcount"?: number | undefined;
|
|
95
|
+
"aria-rowindex"?: number | undefined;
|
|
96
|
+
"aria-rowspan"?: number | undefined;
|
|
97
|
+
"aria-selected"?: boolean | "false" | "true" | undefined;
|
|
98
|
+
"aria-setsize"?: number | undefined;
|
|
99
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
100
|
+
"aria-valuemax"?: number | undefined;
|
|
101
|
+
"aria-valuemin"?: number | undefined;
|
|
102
|
+
"aria-valuenow"?: number | undefined;
|
|
103
|
+
"aria-valuetext"?: string | undefined;
|
|
102
104
|
dangerouslySetInnerHTML?: {
|
|
103
105
|
__html: string | TrustedHTML;
|
|
104
106
|
} | undefined;
|
|
@@ -120,7 +122,7 @@ export declare const TextAttribute: import("styled-components").IStyledComponent
|
|
|
120
122
|
onBlurCapture?: import("react").FocusEventHandler<HTMLSpanElement>;
|
|
121
123
|
onChange?: import("react").FormEventHandler<HTMLSpanElement>;
|
|
122
124
|
onChangeCapture?: import("react").FormEventHandler<HTMLSpanElement>;
|
|
123
|
-
onBeforeInput?: import("react").
|
|
125
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLSpanElement>;
|
|
124
126
|
onBeforeInputCapture?: import("react").FormEventHandler<HTMLSpanElement>;
|
|
125
127
|
onInput?: import("react").FormEventHandler<HTMLSpanElement>;
|
|
126
128
|
onInputCapture?: import("react").FormEventHandler<HTMLSpanElement>;
|
|
@@ -267,10 +269,11 @@ export declare const SmallText: import("styled-components").IStyledComponent<"we
|
|
|
267
269
|
ref?: import("react").LegacyRef<HTMLSpanElement>;
|
|
268
270
|
key?: import("react").Key | null | undefined;
|
|
269
271
|
defaultChecked?: boolean | undefined;
|
|
270
|
-
defaultValue?: string | number |
|
|
272
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
271
273
|
suppressContentEditableWarning?: boolean | undefined;
|
|
272
274
|
suppressHydrationWarning?: boolean | undefined;
|
|
273
275
|
accessKey?: string | undefined;
|
|
276
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
274
277
|
autoFocus?: boolean | undefined;
|
|
275
278
|
className?: string | undefined;
|
|
276
279
|
contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
|
|
@@ -301,7 +304,6 @@ export declare const SmallText: import("styled-components").IStyledComponent<"we
|
|
|
301
304
|
rev?: string | undefined;
|
|
302
305
|
typeof?: string | undefined;
|
|
303
306
|
vocab?: string | undefined;
|
|
304
|
-
autoCapitalize?: string | undefined;
|
|
305
307
|
autoCorrect?: string | undefined;
|
|
306
308
|
autoSave?: string | undefined;
|
|
307
309
|
color?: string | undefined;
|
|
@@ -315,55 +317,57 @@ export declare const SmallText: import("styled-components").IStyledComponent<"we
|
|
|
315
317
|
unselectable?: "on" | "off" | undefined;
|
|
316
318
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
317
319
|
is?: string | undefined;
|
|
320
|
+
exportparts?: string | undefined;
|
|
321
|
+
part?: string | undefined;
|
|
318
322
|
children?: import("react").ReactNode;
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
323
|
+
"aria-activedescendant"?: string | undefined;
|
|
324
|
+
"aria-atomic"?: boolean | "false" | "true" | undefined;
|
|
325
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
326
|
+
"aria-busy"?: boolean | "false" | "true" | undefined;
|
|
327
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
328
|
+
"aria-colcount"?: number | undefined;
|
|
329
|
+
"aria-colindex"?: number | undefined;
|
|
330
|
+
"aria-colspan"?: number | undefined;
|
|
331
|
+
"aria-controls"?: string | undefined;
|
|
332
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
333
|
+
"aria-describedby"?: string | undefined;
|
|
334
|
+
"aria-details"?: string | undefined;
|
|
335
|
+
"aria-disabled"?: boolean | "false" | "true" | undefined;
|
|
336
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
337
|
+
"aria-errormessage"?: string | undefined;
|
|
338
|
+
"aria-expanded"?: boolean | "false" | "true" | undefined;
|
|
339
|
+
"aria-flowto"?: string | undefined;
|
|
340
|
+
"aria-grabbed"?: boolean | "false" | "true" | undefined;
|
|
341
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
342
|
+
"aria-hidden"?: boolean | "false" | "true" | undefined;
|
|
343
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
344
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
345
|
+
"aria-label"?: string | undefined;
|
|
346
|
+
"aria-labelledby"?: string | undefined;
|
|
347
|
+
"aria-level"?: number | undefined;
|
|
348
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
349
|
+
"aria-modal"?: boolean | "false" | "true" | undefined;
|
|
350
|
+
"aria-multiline"?: boolean | "false" | "true" | undefined;
|
|
351
|
+
"aria-multiselectable"?: boolean | "false" | "true" | undefined;
|
|
352
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
353
|
+
"aria-owns"?: string | undefined;
|
|
354
|
+
"aria-placeholder"?: string | undefined;
|
|
355
|
+
"aria-posinset"?: number | undefined;
|
|
356
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
357
|
+
"aria-readonly"?: boolean | "false" | "true" | undefined;
|
|
358
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
359
|
+
"aria-required"?: boolean | "false" | "true" | undefined;
|
|
360
|
+
"aria-roledescription"?: string | undefined;
|
|
361
|
+
"aria-rowcount"?: number | undefined;
|
|
362
|
+
"aria-rowindex"?: number | undefined;
|
|
363
|
+
"aria-rowspan"?: number | undefined;
|
|
364
|
+
"aria-selected"?: boolean | "false" | "true" | undefined;
|
|
365
|
+
"aria-setsize"?: number | undefined;
|
|
366
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
367
|
+
"aria-valuemax"?: number | undefined;
|
|
368
|
+
"aria-valuemin"?: number | undefined;
|
|
369
|
+
"aria-valuenow"?: number | undefined;
|
|
370
|
+
"aria-valuetext"?: string | undefined;
|
|
367
371
|
dangerouslySetInnerHTML?: {
|
|
368
372
|
__html: string | TrustedHTML;
|
|
369
373
|
} | undefined;
|
|
@@ -385,7 +389,7 @@ export declare const SmallText: import("styled-components").IStyledComponent<"we
|
|
|
385
389
|
onBlurCapture?: import("react").FocusEventHandler<HTMLSpanElement>;
|
|
386
390
|
onChange?: import("react").FormEventHandler<HTMLSpanElement>;
|
|
387
391
|
onChangeCapture?: import("react").FormEventHandler<HTMLSpanElement>;
|
|
388
|
-
onBeforeInput?: import("react").
|
|
392
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLSpanElement>;
|
|
389
393
|
onBeforeInputCapture?: import("react").FormEventHandler<HTMLSpanElement>;
|
|
390
394
|
onInput?: import("react").FormEventHandler<HTMLSpanElement>;
|
|
391
395
|
onInputCapture?: import("react").FormEventHandler<HTMLSpanElement>;
|
|
@@ -540,10 +544,11 @@ export declare const CustomForm: import("styled-components").IStyledComponent<"w
|
|
|
540
544
|
noValidate?: boolean | undefined;
|
|
541
545
|
target?: string | undefined;
|
|
542
546
|
defaultChecked?: boolean | undefined;
|
|
543
|
-
defaultValue?: string | number |
|
|
547
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
544
548
|
suppressContentEditableWarning?: boolean | undefined;
|
|
545
549
|
suppressHydrationWarning?: boolean | undefined;
|
|
546
550
|
accessKey?: string | undefined;
|
|
551
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
547
552
|
autoFocus?: boolean | undefined;
|
|
548
553
|
className?: string | undefined;
|
|
549
554
|
contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
|
|
@@ -574,7 +579,6 @@ export declare const CustomForm: import("styled-components").IStyledComponent<"w
|
|
|
574
579
|
rev?: string | undefined;
|
|
575
580
|
typeof?: string | undefined;
|
|
576
581
|
vocab?: string | undefined;
|
|
577
|
-
autoCapitalize?: string | undefined;
|
|
578
582
|
autoCorrect?: string | undefined;
|
|
579
583
|
autoSave?: string | undefined;
|
|
580
584
|
color?: string | undefined;
|
|
@@ -588,55 +592,57 @@ export declare const CustomForm: import("styled-components").IStyledComponent<"w
|
|
|
588
592
|
unselectable?: "on" | "off" | undefined;
|
|
589
593
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
590
594
|
is?: string | undefined;
|
|
595
|
+
exportparts?: string | undefined;
|
|
596
|
+
part?: string | undefined;
|
|
591
597
|
children?: import("react").ReactNode;
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
598
|
+
"aria-activedescendant"?: string | undefined;
|
|
599
|
+
"aria-atomic"?: boolean | "false" | "true" | undefined;
|
|
600
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
601
|
+
"aria-busy"?: boolean | "false" | "true" | undefined;
|
|
602
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
603
|
+
"aria-colcount"?: number | undefined;
|
|
604
|
+
"aria-colindex"?: number | undefined;
|
|
605
|
+
"aria-colspan"?: number | undefined;
|
|
606
|
+
"aria-controls"?: string | undefined;
|
|
607
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
608
|
+
"aria-describedby"?: string | undefined;
|
|
609
|
+
"aria-details"?: string | undefined;
|
|
610
|
+
"aria-disabled"?: boolean | "false" | "true" | undefined;
|
|
611
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
612
|
+
"aria-errormessage"?: string | undefined;
|
|
613
|
+
"aria-expanded"?: boolean | "false" | "true" | undefined;
|
|
614
|
+
"aria-flowto"?: string | undefined;
|
|
615
|
+
"aria-grabbed"?: boolean | "false" | "true" | undefined;
|
|
616
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
617
|
+
"aria-hidden"?: boolean | "false" | "true" | undefined;
|
|
618
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
619
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
620
|
+
"aria-label"?: string | undefined;
|
|
621
|
+
"aria-labelledby"?: string | undefined;
|
|
622
|
+
"aria-level"?: number | undefined;
|
|
623
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
624
|
+
"aria-modal"?: boolean | "false" | "true" | undefined;
|
|
625
|
+
"aria-multiline"?: boolean | "false" | "true" | undefined;
|
|
626
|
+
"aria-multiselectable"?: boolean | "false" | "true" | undefined;
|
|
627
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
628
|
+
"aria-owns"?: string | undefined;
|
|
629
|
+
"aria-placeholder"?: string | undefined;
|
|
630
|
+
"aria-posinset"?: number | undefined;
|
|
631
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
632
|
+
"aria-readonly"?: boolean | "false" | "true" | undefined;
|
|
633
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
634
|
+
"aria-required"?: boolean | "false" | "true" | undefined;
|
|
635
|
+
"aria-roledescription"?: string | undefined;
|
|
636
|
+
"aria-rowcount"?: number | undefined;
|
|
637
|
+
"aria-rowindex"?: number | undefined;
|
|
638
|
+
"aria-rowspan"?: number | undefined;
|
|
639
|
+
"aria-selected"?: boolean | "false" | "true" | undefined;
|
|
640
|
+
"aria-setsize"?: number | undefined;
|
|
641
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
642
|
+
"aria-valuemax"?: number | undefined;
|
|
643
|
+
"aria-valuemin"?: number | undefined;
|
|
644
|
+
"aria-valuenow"?: number | undefined;
|
|
645
|
+
"aria-valuetext"?: string | undefined;
|
|
640
646
|
dangerouslySetInnerHTML?: {
|
|
641
647
|
__html: string | TrustedHTML;
|
|
642
648
|
} | undefined;
|
|
@@ -658,7 +664,7 @@ export declare const CustomForm: import("styled-components").IStyledComponent<"w
|
|
|
658
664
|
onBlurCapture?: import("react").FocusEventHandler<HTMLFormElement>;
|
|
659
665
|
onChange?: import("react").FormEventHandler<HTMLFormElement>;
|
|
660
666
|
onChangeCapture?: import("react").FormEventHandler<HTMLFormElement>;
|
|
661
|
-
onBeforeInput?: import("react").
|
|
667
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLFormElement>;
|
|
662
668
|
onBeforeInputCapture?: import("react").FormEventHandler<HTMLFormElement>;
|
|
663
669
|
onInput?: import("react").FormEventHandler<HTMLFormElement>;
|
|
664
670
|
onInputCapture?: import("react").FormEventHandler<HTMLFormElement>;
|
|
@@ -5,7 +5,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
import { PlusOutlined, SearchOutlined } from '@ant-design/icons';
|
|
6
6
|
import { localizedTranslation } from '@leav/utils';
|
|
7
7
|
import { Table } from 'antd';
|
|
8
|
-
import { KitButton, KitInput, KitTag } from 'aristid-ds';
|
|
8
|
+
import { KitButton, KitIdCard, KitInput, KitTag } from 'aristid-ds';
|
|
9
9
|
import { useEffect, useRef, useState } from 'react';
|
|
10
10
|
import styled from 'styled-components';
|
|
11
11
|
import { defaultPaginationPageSize, tagColorByAttributeFormat, tagColorByAttributeType } from '../../../../../constants';
|
|
@@ -111,9 +111,7 @@ function AttributesList({ library, readOnly, onDeleteAttribute, onAddAttributes
|
|
|
111
111
|
render: (type) => (_jsx(KitTag, { style: {
|
|
112
112
|
borderColor: tagColorByAttributeType[type][0],
|
|
113
113
|
backgroundColor: tagColorByAttributeType[type][1],
|
|
114
|
-
},
|
|
115
|
-
description: t(`attributes.type_${type}`),
|
|
116
|
-
} })),
|
|
114
|
+
}, children: _jsx(KitIdCard, { description: t(`attributes.type_${type}`) }) })),
|
|
117
115
|
filters: Object.values(AttributeType).map(type => ({
|
|
118
116
|
text: t(`attributes.type_${type}`),
|
|
119
117
|
value: type,
|
|
@@ -133,9 +131,7 @@ function AttributesList({ library, readOnly, onDeleteAttribute, onAddAttributes
|
|
|
133
131
|
render: (format) => format ? (_jsx(KitTag, { style: {
|
|
134
132
|
borderColor: tagColorByAttributeFormat[format][0],
|
|
135
133
|
backgroundColor: tagColorByAttributeFormat[format][1],
|
|
136
|
-
},
|
|
137
|
-
description: t(`attributes.format_${format}`),
|
|
138
|
-
} })) : null,
|
|
134
|
+
}, children: _jsx(KitIdCard, { description: t(`attributes.format_${format}`) }) })) : null,
|
|
139
135
|
filters: Object.values(AttributeFormat).map(format => ({
|
|
140
136
|
text: t(`attributes.format_${format}`),
|
|
141
137
|
value: format,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttributesList.js","sourceRoot":"","sources":["../../../../../../src/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/AttributesList.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,YAAY,EAAE,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,oBAAoB,EAAgB,MAAM,aAAa,CAAC;AAChE,OAAO,EAAC,KAAK,EAAoD,MAAM,MAAM,CAAC;AAE9E,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,YAAY,CAAC;AACvD,OAAO,EAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,yBAAyB,EAAE,yBAAyB,EAAE,uBAAuB,EAAC,MAAM,0BAA0B,CAAC;AACvH,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAC,oBAAoB,EAAC,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EACH,eAAe,EACf,wBAAwB,EACxB,aAAa,EAIb,SAAS,EACT,qBAAqB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,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EAAC,EACjC,KAAK,EAAE,GAAG,EAAE,CAAC,WAAW,EACxB,QAAQ,EAAE,aAAa,GACzB,EACD,uBAAuB,IAAI,CACxB,KAAC,eAAe,IACZ,QAAQ,QACR,OAAO,EAAE,6BAA6B,EACtC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,uBAAuB,EAC7B,WAAW,EAAE,EAAC,iBAAiB,EAAE,CAAC,OAAO,CAAC,EAAC,GAC7C,CACL,IACK,CACb,CAAC;AACN,CAAC;AAED,eAAe,cAAc,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {PlusOutlined, SearchOutlined} from '@ant-design/icons';\nimport {localizedTranslation, type Override} from '@leav/utils';\nimport {Table, type TableColumnsType, type TablePaginationConfig} from 'antd';\nimport {type FilterValue, type SorterResult} from 'antd/es/table/interface';\nimport {KitButton, KitInput, KitTag} from 'aristid-ds';\nimport {useEffect, useRef, useState} from 'react';\nimport styled from 'styled-components';\nimport {defaultPaginationPageSize, tagColorByAttributeFormat, tagColorByAttributeType} from '../../../../../constants';\nimport {useLang} from '../../../../../hooks';\nimport {useSharedTranslation} from '../../../../../hooks/useSharedTranslation';\nimport {\n AttributeFormat,\n AttributesSortableFields,\n AttributeType,\n type GetAttributesQuery,\n type GetAttributesQueryVariables,\n type LibraryAttributesFragment,\n SortOrder,\n useGetAttributesQuery,\n} from '../../../../../_gqlTypes';\nimport {AttributePicker} from '../../../../AttributePicker';\nimport {AttributeCell} from './AttributeCell';\nimport {DeleteButton} from './DeleteButton';\n\ninterface IAttributesListProps {\n readOnly: boolean;\n library: string;\n onDeleteAttribute: (attribute: LibraryAttributesFragment) => Promise<void>;\n onAddAttributes: (attributes: string[]) => Promise<void>;\n}\n\nconst HeaderWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 0.5rem;\n\n .kit-input-wrapper {\n flex-grow: 1;\n }\n`;\n\n// To fix a cosmetic issue with the table header (see https://github.com/ant-design/ant-design/issues/41975)\nconst Wrapper = styled.div`\n && .ant-table-header {\n border-radius: 0;\n }\n`;\n\nexport type AttributeListType = Override<GetAttributesQuery['attributes']['list'][number], {label: string}> & {\n key: string;\n};\n\nfunction AttributesList({library, readOnly, onDeleteAttribute, onAddAttributes}: IAttributesListProps): JSX.Element {\n const {t} = useSharedTranslation();\n const {lang} = useLang();\n const [isAddAttributeModalOpen, setIsAddAttributeModalOpen] = useState(false);\n\n const inputRef = useRef<HTMLInputElement>(null);\n\n const [pageSize, setPageSize] = useState(defaultPaginationPageSize);\n const [currentPage, setCurrentPage] = useState(1);\n const [sort, setSort] = useState<GetAttributesQueryVariables['sort']>();\n const [filters, setFilters] = useState<GetAttributesQueryVariables['filters']>({});\n const [tableData, setTableData] = useState<AttributeListType[]>([]);\n\n const {loading, error, data, refetch} = useGetAttributesQuery({\n variables: {\n pagination: {\n limit: pageSize,\n offset: (currentPage - 1) * pageSize,\n },\n sort,\n filters: {\n ...filters,\n libraries: [library],\n },\n },\n });\n\n const _handleSubmitAddAttribute = async (selectedAttributes: string[]) => {\n await onAddAttributes(selectedAttributes);\n refetch();\n };\n\n const _handleDeleteAttribute = (attribute: LibraryAttributesFragment) => async () => {\n await onDeleteAttribute(attribute);\n refetch();\n };\n\n const _handleClickNewAttribute = () => {\n setIsAddAttributeModalOpen(true);\n };\n\n const _handleCloseAddAttributeModal = () => setIsAddAttributeModalOpen(false);\n\n const _handleChange = (\n pagination: TablePaginationConfig,\n filter: Record<string, FilterValue | null>,\n sorter: SorterResult<AttributeListType> | Array<SorterResult<AttributeListType>>,\n ) => {\n setCurrentPage(pagination.current);\n setPageSize(pagination.pageSize);\n\n const relevantSorter = Array.isArray(sorter) ? sorter[0] : sorter;\n if (relevantSorter.column && relevantSorter.order) {\n const newSort = {\n field: AttributesSortableFields[relevantSorter.columnKey],\n order: relevantSorter.order === 'ascend' ? SortOrder.asc : SortOrder.desc,\n };\n setSort(newSort);\n }\n\n const newFilters: GetAttributesQueryVariables['filters'] = {};\n for (const [field, filterValue] of Object.entries(filter)) {\n if (filterValue) {\n newFilters[field] = filterValue;\n }\n }\n setFilters(newFilters);\n };\n\n const _handleSearchSubmit = (e: React.SyntheticEvent<HTMLInputElement>) => {\n setFilters({\n ...filters,\n label: `%${e.currentTarget.value}%`,\n });\n };\n\n const _handleSearchChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n // Handle clearing input only. Submitting input is otherwise handled by \"onPressEnter\"\n if (!e.currentTarget.value) {\n _handleSearchSubmit(e);\n }\n };\n\n const columns: TableColumnsType<AttributeListType> = [\n {\n title: t('attributes.attribute'),\n key: 'label',\n render: (_, attribute) => <AttributeCell attribute={attribute} />,\n },\n {\n title: t('attributes.type'),\n dataIndex: 'type',\n key: 'type',\n width: '150px',\n render: (type: AttributeType) => (\n <KitTag\n style={{\n borderColor: tagColorByAttributeType[type][0],\n backgroundColor: tagColorByAttributeType[type][1],\n }}\n idCardProps={{\n description: t(`attributes.type_${type}`),\n }}\n />\n ),\n filters: Object.values(AttributeType).map(type => ({\n text: t(`attributes.type_${type}`),\n value: type,\n })),\n onFilter: (value, record) => record.type === value,\n sorter: (a, b) => {\n const aTypeLabel = t(`attributes.type_${a.type}`);\n const bTypeLabel = t(`attributes.type_${b.type}`);\n\n return aTypeLabel.localeCompare(bTypeLabel);\n },\n },\n {\n title: t('attributes.format'),\n dataIndex: 'format',\n key: 'format',\n width: '150px',\n render: (format: AttributeFormat) =>\n format ? (\n <KitTag\n style={{\n borderColor: tagColorByAttributeFormat[format][0],\n backgroundColor: tagColorByAttributeFormat[format][1],\n }}\n idCardProps={{\n description: t(`attributes.format_${format}`),\n }}\n />\n ) : null,\n filters: Object.values(AttributeFormat).map(format => ({\n text: t(`attributes.format_${format}`),\n value: format,\n })),\n onFilter: (value, record) => record.format === value,\n sorter: (a, b) => {\n const aFormatLabel = t(`attributes.format_${a.format}`);\n const bFormatLabel = t(`attributes.format_${b.format}`);\n\n return aFormatLabel.localeCompare(bFormatLabel);\n },\n },\n {\n key: 'delete',\n title: <span></span>,\n dataIndex: 'id',\n width: '50px',\n align: 'center',\n render: (_, attribute) => (\n <DeleteButton readOnly={readOnly} attribute={attribute} onDelete={_handleDeleteAttribute(attribute)} />\n ),\n },\n ];\n\n useEffect(() => {\n // To avoid temporary display of \"no data\" when pagination changes\n if (loading || !data) {\n return;\n }\n\n const newTableData = data?.attributes?.list\n ? [...data.attributes.list].map(attribute => ({\n ...attribute,\n key: attribute.id,\n label: localizedTranslation(attribute.label, lang),\n }))\n : [];\n\n setTableData(newTableData);\n }, [loading, data]);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }, [inputRef]);\n\n const tableHeader = (\n <HeaderWrapper>\n <KitInput\n onPressEnter={_handleSearchSubmit}\n onChange={_handleSearchChange}\n placeholder={t('global.search') + '...'}\n allowClear\n suffix={<SearchOutlined />}\n // @ts-ignore - ref is a valid prop\n ref={inputRef}\n />\n {!readOnly && (\n <KitButton type=\"primary\" icon={<PlusOutlined />} onClick={_handleClickNewAttribute}>\n {t('attributes.add_attribute')}\n </KitButton>\n )}\n </HeaderWrapper>\n );\n\n return (\n <Wrapper>\n <Table\n loading={loading}\n size=\"middle\"\n columns={columns}\n dataSource={tableData}\n bordered\n pagination={{\n position: ['bottomCenter'],\n pageSize,\n current: currentPage,\n total: data?.attributes?.totalCount ?? 0,\n showTotal: total => t('global.total_count', {total}),\n }}\n scroll={{y: 'calc(95vh - 26rem)'}}\n title={() => tableHeader}\n onChange={_handleChange}\n />\n {isAddAttributeModalOpen && (\n <AttributePicker\n multiple\n onClose={_handleCloseAddAttributeModal}\n onSubmit={_handleSubmitAddAttribute}\n open={isAddAttributeModalOpen}\n baseFilters={{librariesExcluded: [library]}}\n />\n )}\n </Wrapper>\n );\n}\n\nexport default AttributesList;\n"]}
|
|
1
|
+
{"version":3,"file":"AttributesList.js","sourceRoot":"","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7B,WAAW,EAAE,CAAC,CAAC,eAAe,CAAC,GAAG,KAAK,EACvC,UAAU,QACV,MAAM,EAAE,KAAC,cAAc,KAAG;gBAC1B,mCAAmC;gBACnC,GAAG,EAAE,QAAQ,GACf,EACD,CAAC,QAAQ,IAAI,CACV,KAAC,SAAS,IAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAE,KAAC,YAAY,KAAG,EAAE,OAAO,EAAE,wBAAwB,YAC9E,CAAC,CAAC,0BAA0B,CAAC,GACtB,CACf,IACW,CACnB,CAAC;IAEF,OAAO,CACH,MAAC,OAAO,eACJ,KAAC,KAAK,IACF,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,SAAS,EACrB,QAAQ,QACR,UAAU,EAAE;oBACR,QAAQ,EAAE,CAAC,cAAc,CAAC;oBAC1B,QAAQ;oBACR,OAAO,EAAE,WAAW;oBACpB,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,IAAI,CAAC;oBACxC,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,oBAAoB,EAAE,EAAC,KAAK,EAAC,CAAC;iBACvD,EACD,MAAM,EAAE,EAAC,CAAC,EAAE,oBAAoB,EAAC,EACjC,KAAK,EAAE,GAAG,EAAE,CAAC,WAAW,EACxB,QAAQ,EAAE,aAAa,GACzB,EACD,uBAAuB,IAAI,CACxB,KAAC,eAAe,IACZ,QAAQ,QACR,OAAO,EAAE,6BAA6B,EACtC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,uBAAuB,EAC7B,WAAW,EAAE,EAAC,iBAAiB,EAAE,CAAC,OAAO,CAAC,EAAC,GAC7C,CACL,IACK,CACb,CAAC;AACN,CAAC;AAED,eAAe,cAAc,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {PlusOutlined, SearchOutlined} from '@ant-design/icons';\nimport {localizedTranslation, type Override} from '@leav/utils';\nimport {Table, type TableColumnsType, type TablePaginationConfig} from 'antd';\nimport {type FilterValue, type SorterResult} from 'antd/es/table/interface';\nimport {KitButton, KitIdCard, KitInput, KitTag} from 'aristid-ds';\nimport {useEffect, useRef, useState} from 'react';\nimport styled from 'styled-components';\nimport {defaultPaginationPageSize, tagColorByAttributeFormat, tagColorByAttributeType} from '../../../../../constants';\nimport {useLang} from '../../../../../hooks';\nimport {useSharedTranslation} from '../../../../../hooks/useSharedTranslation';\nimport {\n AttributeFormat,\n AttributesSortableFields,\n AttributeType,\n type GetAttributesQuery,\n type GetAttributesQueryVariables,\n type LibraryAttributesFragment,\n SortOrder,\n useGetAttributesQuery,\n} from '../../../../../_gqlTypes';\nimport {AttributePicker} from '../../../../AttributePicker';\nimport {AttributeCell} from './AttributeCell';\nimport {DeleteButton} from './DeleteButton';\n\ninterface IAttributesListProps {\n readOnly: boolean;\n library: string;\n onDeleteAttribute: (attribute: LibraryAttributesFragment) => Promise<void>;\n onAddAttributes: (attributes: string[]) => Promise<void>;\n}\n\nconst HeaderWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 0.5rem;\n\n .kit-input-wrapper {\n flex-grow: 1;\n }\n`;\n\n// To fix a cosmetic issue with the table header (see https://github.com/ant-design/ant-design/issues/41975)\nconst Wrapper = styled.div`\n && .ant-table-header {\n border-radius: 0;\n }\n`;\n\nexport type AttributeListType = Override<GetAttributesQuery['attributes']['list'][number], {label: string}> & {\n key: string;\n};\n\nfunction AttributesList({library, readOnly, onDeleteAttribute, onAddAttributes}: IAttributesListProps): JSX.Element {\n const {t} = useSharedTranslation();\n const {lang} = useLang();\n const [isAddAttributeModalOpen, setIsAddAttributeModalOpen] = useState(false);\n\n const inputRef = useRef<HTMLInputElement>(null);\n\n const [pageSize, setPageSize] = useState(defaultPaginationPageSize);\n const [currentPage, setCurrentPage] = useState(1);\n const [sort, setSort] = useState<GetAttributesQueryVariables['sort']>();\n const [filters, setFilters] = useState<GetAttributesQueryVariables['filters']>({});\n const [tableData, setTableData] = useState<AttributeListType[]>([]);\n\n const {loading, error, data, refetch} = useGetAttributesQuery({\n variables: {\n pagination: {\n limit: pageSize,\n offset: (currentPage - 1) * pageSize,\n },\n sort,\n filters: {\n ...filters,\n libraries: [library],\n },\n },\n });\n\n const _handleSubmitAddAttribute = async (selectedAttributes: string[]) => {\n await onAddAttributes(selectedAttributes);\n refetch();\n };\n\n const _handleDeleteAttribute = (attribute: LibraryAttributesFragment) => async () => {\n await onDeleteAttribute(attribute);\n refetch();\n };\n\n const _handleClickNewAttribute = () => {\n setIsAddAttributeModalOpen(true);\n };\n\n const _handleCloseAddAttributeModal = () => setIsAddAttributeModalOpen(false);\n\n const _handleChange = (\n pagination: TablePaginationConfig,\n filter: Record<string, FilterValue | null>,\n sorter: SorterResult<AttributeListType> | Array<SorterResult<AttributeListType>>,\n ) => {\n setCurrentPage(pagination.current);\n setPageSize(pagination.pageSize);\n\n const relevantSorter = Array.isArray(sorter) ? sorter[0] : sorter;\n if (relevantSorter.column && relevantSorter.order) {\n const newSort = {\n field: AttributesSortableFields[relevantSorter.columnKey],\n order: relevantSorter.order === 'ascend' ? SortOrder.asc : SortOrder.desc,\n };\n setSort(newSort);\n }\n\n const newFilters: GetAttributesQueryVariables['filters'] = {};\n for (const [field, filterValue] of Object.entries(filter)) {\n if (filterValue) {\n newFilters[field] = filterValue;\n }\n }\n setFilters(newFilters);\n };\n\n const _handleSearchSubmit = (e: React.SyntheticEvent<HTMLInputElement>) => {\n setFilters({\n ...filters,\n label: `%${e.currentTarget.value}%`,\n });\n };\n\n const _handleSearchChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n // Handle clearing input only. Submitting input is otherwise handled by \"onPressEnter\"\n if (!e.currentTarget.value) {\n _handleSearchSubmit(e);\n }\n };\n\n const columns: TableColumnsType<AttributeListType> = [\n {\n title: t('attributes.attribute'),\n key: 'label',\n render: (_, attribute) => <AttributeCell attribute={attribute} />,\n },\n {\n title: t('attributes.type'),\n dataIndex: 'type',\n key: 'type',\n width: '150px',\n render: (type: AttributeType) => (\n <KitTag\n style={{\n borderColor: tagColorByAttributeType[type][0],\n backgroundColor: tagColorByAttributeType[type][1],\n }}\n >\n <KitIdCard description={t(`attributes.type_${type}`)} />\n </KitTag>\n ),\n filters: Object.values(AttributeType).map(type => ({\n text: t(`attributes.type_${type}`),\n value: type,\n })),\n onFilter: (value, record) => record.type === value,\n sorter: (a, b) => {\n const aTypeLabel = t(`attributes.type_${a.type}`);\n const bTypeLabel = t(`attributes.type_${b.type}`);\n\n return aTypeLabel.localeCompare(bTypeLabel);\n },\n },\n {\n title: t('attributes.format'),\n dataIndex: 'format',\n key: 'format',\n width: '150px',\n render: (format: AttributeFormat) =>\n format ? (\n <KitTag\n style={{\n borderColor: tagColorByAttributeFormat[format][0],\n backgroundColor: tagColorByAttributeFormat[format][1],\n }}\n >\n <KitIdCard description={t(`attributes.format_${format}`)} />\n </KitTag>\n ) : null,\n filters: Object.values(AttributeFormat).map(format => ({\n text: t(`attributes.format_${format}`),\n value: format,\n })),\n onFilter: (value, record) => record.format === value,\n sorter: (a, b) => {\n const aFormatLabel = t(`attributes.format_${a.format}`);\n const bFormatLabel = t(`attributes.format_${b.format}`);\n\n return aFormatLabel.localeCompare(bFormatLabel);\n },\n },\n {\n key: 'delete',\n title: <span></span>,\n dataIndex: 'id',\n width: '50px',\n align: 'center',\n render: (_, attribute) => (\n <DeleteButton readOnly={readOnly} attribute={attribute} onDelete={_handleDeleteAttribute(attribute)} />\n ),\n },\n ];\n\n useEffect(() => {\n // To avoid temporary display of \"no data\" when pagination changes\n if (loading || !data) {\n return;\n }\n\n const newTableData = data?.attributes?.list\n ? [...data.attributes.list].map(attribute => ({\n ...attribute,\n key: attribute.id,\n label: localizedTranslation(attribute.label, lang),\n }))\n : [];\n\n setTableData(newTableData);\n }, [loading, data]);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }, [inputRef]);\n\n const tableHeader = (\n <HeaderWrapper>\n <KitInput\n onPressEnter={_handleSearchSubmit}\n onChange={_handleSearchChange}\n placeholder={t('global.search') + '...'}\n allowClear\n suffix={<SearchOutlined />}\n // @ts-ignore - ref is a valid prop\n ref={inputRef}\n />\n {!readOnly && (\n <KitButton type=\"primary\" icon={<PlusOutlined />} onClick={_handleClickNewAttribute}>\n {t('attributes.add_attribute')}\n </KitButton>\n )}\n </HeaderWrapper>\n );\n\n return (\n <Wrapper>\n <Table\n loading={loading}\n size=\"middle\"\n columns={columns}\n dataSource={tableData}\n bordered\n pagination={{\n position: ['bottomCenter'],\n pageSize,\n current: currentPage,\n total: data?.attributes?.totalCount ?? 0,\n showTotal: total => t('global.total_count', {total}),\n }}\n scroll={{y: 'calc(95vh - 26rem)'}}\n title={() => tableHeader}\n onChange={_handleChange}\n />\n {isAddAttributeModalOpen && (\n <AttributePicker\n multiple\n onClose={_handleCloseAddAttributeModal}\n onSubmit={_handleSubmitAddAttribute}\n open={isAddAttributeModalOpen}\n baseFilters={{librariesExcluded: [library]}}\n />\n )}\n </Wrapper>\n );\n}\n\nexport default AttributesList;\n"]}
|
|
@@ -18,7 +18,6 @@ const tableRowHeight = 56;
|
|
|
18
18
|
const tableHeaderMinLineHeight = 22;
|
|
19
19
|
const DataViewContainerDivStyled = styled.div `
|
|
20
20
|
flex: 1 1 min-content;
|
|
21
|
-
max-height: minmax(0, 1fr);
|
|
22
21
|
overflow: hidden;
|
|
23
22
|
|
|
24
23
|
&.headless {
|
|
@@ -80,13 +79,14 @@ const arePropsEqual = (prevProps, nextProps) => isEqual({
|
|
|
80
79
|
data: nextProps.dataGroupedFilteredSorted,
|
|
81
80
|
selectedKeys: nextProps.selection.selectedKeys,
|
|
82
81
|
});
|
|
83
|
-
export const DataView = memo(({ dataGroupedFilteredSorted, attributesToDisplay, attributesProperties, paginationProps, itemActions, selection: { onSelectItem, onSelectionChange, selectedKeys, isMassSelectionAll, mode }, hideTableHeader = false, }) => {
|
|
82
|
+
export const DataView = memo(({ dataGroupedFilteredSorted, attributesToDisplay, attributesProperties, paginationProps, itemActions, selection: { onSelectItem, onSelectionChange, selectedKeys, isMassSelectionAll, mode }, hideTableHeader = false, useSmallHeaderSize = false, tableBodyHeight, }) => {
|
|
84
83
|
const { t } = useSharedTranslation();
|
|
85
84
|
const { containerRef, scrollHeight } = useTableScrollableHeight(!!paginationProps);
|
|
86
85
|
const { getFieldColumnWidth } = useColumnWidth();
|
|
87
86
|
const columns = attributesToDisplay.map(attributeName => ({
|
|
88
87
|
title: attributeName === WHO_AM_I_COLUMN ? t('explorer.name') : attributesProperties[attributeName].label,
|
|
89
88
|
dataIndex: USELESS,
|
|
89
|
+
ellipsis: useSmallHeaderSize,
|
|
90
90
|
width: getFieldColumnWidth(attributesProperties[attributeName]),
|
|
91
91
|
shouldCellUpdate: (record, prevRecord) => isMassSelectionAll ||
|
|
92
92
|
(attributeName === WHO_AM_I_COLUMN
|
|
@@ -120,7 +120,10 @@ export const DataView = memo(({ dataGroupedFilteredSorted, attributesToDisplay,
|
|
|
120
120
|
// TODO: handle columns width based on attribute type/format
|
|
121
121
|
return (_jsxs(DataViewContainerDivStyled, { ref: containerRef, className: cn({ headless: hideTableHeader }), children: [_jsx(StyledTable, { className: cn({
|
|
122
122
|
'row-clickable': itemActionToUseOnRowClick,
|
|
123
|
-
}), showHeader: dataGroupedFilteredSorted.length > 0 && !hideTableHeader,
|
|
123
|
+
}), showHeader: dataGroupedFilteredSorted.length > 0 && !hideTableHeader, headerLineSize: useSmallHeaderSize ? 's' : undefined, columns: columns, tableLayout: "fixed", scroll: {
|
|
124
|
+
y: tableBodyHeight ?? (hideTableHeader ? '100%' : scrollHeight),
|
|
125
|
+
x: '100%',
|
|
126
|
+
}, dataSource: dataGroupedFilteredSorted, pagination: false, rowSelection: _rowSelection, onRow: (item) => ({
|
|
124
127
|
onClick: () => itemActionToUseOnRowClick?.callback(item),
|
|
125
128
|
}) }), paginationProps && (_jsx("div", { className: "pagination", children: _jsx(KitPagination, { "aria-label": "pagination", 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 }) }))] }));
|
|
126
129
|
}, arePropsEqual);
|