@integry/sdk 4.6.50 → 4.6.52
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/.vscode/launch.json +2 -2
- package/dist/esm/index.csm.js +1 -1
- package/dist/umd/index.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/MultipurposeField/Dropdown/index.tsx +2 -0
- package/src/components/MultipurposeField/TagMenu/index.ts +0 -5
- package/src/components/form/FunctionField/index.ts +1 -1
- package/src/features/common/DynamicTypedField/index.ts +16 -2
package/package.json
CHANGED
|
@@ -775,6 +775,8 @@ const ListBox = (props: ListBoxProps) => {
|
|
|
775
775
|
const params = new URLSearchParams();
|
|
776
776
|
params.append(props.serverSideSearchParamName || '', searchTerm);
|
|
777
777
|
params.append('include', 'meta');
|
|
778
|
+
params.append('include_private', 'true');
|
|
779
|
+
params.append('page_size', '20');
|
|
778
780
|
|
|
779
781
|
const response = await props.apiHandler.callDynamicDataEndpoint<
|
|
780
782
|
{
|
|
@@ -292,11 +292,6 @@ const FieldDropdown = (props: FieldMenuProps) => {
|
|
|
292
292
|
onOptionClick(option);
|
|
293
293
|
}}
|
|
294
294
|
ref=${menuItemRefs.current[i]}
|
|
295
|
-
data-hint=${`${
|
|
296
|
-
isContentOverflowing(menuItemRefs.current[i])
|
|
297
|
-
? option.value
|
|
298
|
-
: ''
|
|
299
|
-
}`}
|
|
300
295
|
>
|
|
301
296
|
${option.icon &&
|
|
302
297
|
html`<img
|
|
@@ -630,7 +630,7 @@ const FunctionField = (props: FunctionFieldProps) => {
|
|
|
630
630
|
onChange=${handleFunctionSelect}
|
|
631
631
|
isDynamic=${true}
|
|
632
632
|
endpointUrl=${FUNCTIONS_LIST_URL}
|
|
633
|
-
endpointData=${`{"include": "meta"}`}
|
|
633
|
+
endpointData=${`{"include": "meta", "include_private": true, "page_size": 20}`}
|
|
634
634
|
apiHandler=${props.apiHandler}
|
|
635
635
|
optionKeyPath=${`name`}
|
|
636
636
|
valueKeyPath=${`meta.ui.title`}
|
|
@@ -78,6 +78,20 @@ const DynamicTypedFields = (props: DynamicFieldsProps) => {
|
|
|
78
78
|
const isReadOnly = context?.isReadOnly;
|
|
79
79
|
const apiHandlerRef = context?.apiHandler || props.apiHandler;
|
|
80
80
|
|
|
81
|
+
const resolveValue = (path: string, item: any): any => {
|
|
82
|
+
// If the path contains template tags, process it
|
|
83
|
+
if (/{([^}]+)}/.test(path)) {
|
|
84
|
+
return path.replace(/{([^}]+)}/g, (_, placeholder) => {
|
|
85
|
+
const keys = placeholder.split('.');
|
|
86
|
+
return keys.reduce((acc: any, key: any) => acc && acc[key], item) || '';
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Otherwise, treat it as a plain property path
|
|
91
|
+
const keys = path.split('.');
|
|
92
|
+
return keys.reduce((acc: any, key) => acc && acc[key], item);
|
|
93
|
+
};
|
|
94
|
+
|
|
81
95
|
const fetchDynamicFields = async () => {
|
|
82
96
|
if (sourceFlowIntegrataionInvocationUrl && selectedAuthId) {
|
|
83
97
|
setLoading(true);
|
|
@@ -106,8 +120,8 @@ const DynamicTypedFields = (props: DynamicFieldsProps) => {
|
|
|
106
120
|
|
|
107
121
|
if (idKeyPath && titleKeyPath) {
|
|
108
122
|
transformedItems = res.output.map((item: any) => ({
|
|
109
|
-
id:
|
|
110
|
-
title:
|
|
123
|
+
id: resolveValue(idKeyPath, item), // Use idKeyPath to access the ID
|
|
124
|
+
title: resolveValue(titleKeyPath, item), // Use titleKeyPath to access the title
|
|
111
125
|
type: 'TEXTFIELD', // Use typeKeyPath to access the type
|
|
112
126
|
}));
|
|
113
127
|
} else {
|