From 1dc8da2e21fe36c0b4b50f04203c92489b308adb Mon Sep 17 00:00:00 2001 From: Aniket Katkar Date: Sat, 8 Feb 2025 09:04:42 +0530 Subject: [PATCH] Minor: OSS requirements for the custom property automation action (#19507) * Fix the return type for the custom property API function * Break down the EditTableTypePropertyModal.tsx component * Fix the custom property inputs for date-time type properties * auto lint formatting changes * Add the autoFocus prop for DataAssetAsyncSelectList * Fix and add the unit tests for new code (cherry picked from commit 638e988dc697bb77538b74b3aab562031066ae05) --- .../DataAssetAsyncSelectList.interface.ts | 1 + .../DataAssetAsyncSelectList.tsx | 3 +- .../AdvanceSearchProvider.component.tsx | 24 +-- .../CustomPropertyTable/PropertyValue.tsx | 15 +- .../EditTableTypePropertyModal.interface.ts | 24 +++ .../EditTableTypePropertyModal.test.tsx | 95 ++++++++++++ .../EditTableTypePropertyModal.tsx | 123 ++-------------- .../TableTypePropertyEditTable.interface.ts | 22 +++ .../TableTypePropertyEditTable.test.tsx | 60 ++++++++ .../TableTypePropertyEditTable.tsx | 131 +++++++++++++++++ .../DomainSelectableTree.tsx | 18 ++- .../src/constants/CustomProperty.constants.ts | 23 +++ .../ui/src/rest/metadataTypeAPI.interface.ts | 25 ++++ .../resources/ui/src/rest/metadataTypeAPI.ts | 3 +- .../ui/src/utils/AdvancedSearchClassBase.ts | 13 +- .../ui/src/utils/CustomProperty.utils.test.ts | 139 +++++++++++++++++- .../ui/src/utils/CustomProperty.utils.ts | 38 +++++ 17 files changed, 609 insertions(+), 148 deletions(-) create mode 100644 openmetadata-ui/src/main/resources/ui/src/components/common/CustomPropertyTable/TableTypeProperty/EditTableTypePropertyModal.interface.ts create mode 100644 openmetadata-ui/src/main/resources/ui/src/components/common/CustomPropertyTable/TableTypeProperty/EditTableTypePropertyModal.test.tsx create mode 100644 openmetadata-ui/src/main/resources/ui/src/components/common/CustomPropertyTable/TableTypeProperty/TableTypePropertyEditTable.interface.ts create mode 100644 openmetadata-ui/src/main/resources/ui/src/components/common/CustomPropertyTable/TableTypeProperty/TableTypePropertyEditTable.test.tsx create mode 100644 openmetadata-ui/src/main/resources/ui/src/components/common/CustomPropertyTable/TableTypeProperty/TableTypePropertyEditTable.tsx create mode 100644 openmetadata-ui/src/main/resources/ui/src/rest/metadataTypeAPI.interface.ts diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetAsyncSelectList/DataAssetAsyncSelectList.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetAsyncSelectList/DataAssetAsyncSelectList.interface.ts index d24ea97dbfe..5d69fbf2412 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetAsyncSelectList/DataAssetAsyncSelectList.interface.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetAsyncSelectList/DataAssetAsyncSelectList.interface.ts @@ -27,6 +27,7 @@ export interface FetchOptionsResponse { export interface DataAssetAsyncSelectListProps { mode?: 'multiple'; + autoFocus?: boolean; id?: string; className?: string; placeholder?: string; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetAsyncSelectList/DataAssetAsyncSelectList.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetAsyncSelectList/DataAssetAsyncSelectList.tsx index e2872eacdcb..5b029e749de 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetAsyncSelectList/DataAssetAsyncSelectList.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetAsyncSelectList/DataAssetAsyncSelectList.tsx @@ -36,6 +36,7 @@ import { const DataAssetAsyncSelectList: FC = ({ mode, + autoFocus = true, onChange, debounceTimeout = 800, initialOptions, @@ -242,8 +243,8 @@ const DataAssetAsyncSelectList: FC = ({ return (