@integry/sdk 4.7.11 → 4.7.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integry/sdk",
3
- "version": "4.7.11",
3
+ "version": "4.7.13",
4
4
  "description": "Integry SDK",
5
5
  "main": "dist/umd/index.umd.js",
6
6
  "module": "dist/esm/index.csm.js",
@@ -330,8 +330,13 @@ const ListBox = (props: ListBoxProps) => {
330
330
  if (tempFilteredItems.length === 1) {
331
331
  setEditableTextValue(tempFilteredItems[0].value);
332
332
  onChange(tempFilteredItems[0].id, true);
333
+ } else if (value) {
334
+ const item = tempFilteredItems.find((a) => a.id === value);
335
+ if (item) {
336
+ setEditableTextValue(item.value);
337
+ onChange(item.id, true);
338
+ }
333
339
  }
334
- } else {
335
340
  setSortedFilteredItems(dynamicResponseMapper(res));
336
341
  }
337
342
  // if value was selected before items were loaded, select it again
@@ -1111,6 +1111,13 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
1111
1111
  value,
1112
1112
  isRequired,
1113
1113
  });
1114
+ this.setState({ changedParentMachineName: machineName });
1115
+ this.setState((prevState) => ({
1116
+ dynamicFieldsData: {
1117
+ ...prevState.dynamicFieldsData,
1118
+ [machineName || '']: value,
1119
+ },
1120
+ }));
1114
1121
  this.props.clearChildFields({ stepId, fieldId });
1115
1122
  this.props.verifyStepValidity(Number(stepId));
1116
1123
  }
@@ -2129,6 +2136,8 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
2129
2136
  this.props.tagsTree || {},
2130
2137
  )}
2131
2138
  value=${fieldVal}
2139
+ allowWorkspaceConnectedAccounts=${!!this
2140
+ .props.onFieldChangeCallback}
2132
2141
  />
2133
2142
  </div>
2134
2143
  `;
@@ -39,6 +39,7 @@ export type DynamicFieldsProps = {
39
39
  onChangeCallback?: (val: any) => void;
40
40
  dependsOn?: string[];
41
41
  isArray?: boolean;
42
+ allowWorkspaceConnectedAccounts?: boolean;
42
43
  } & StoreType;
43
44
 
44
45
  interface DynamicDataItem {
@@ -70,6 +71,7 @@ const DynamicTypedFields = (props: DynamicFieldsProps) => {
70
71
  onChangeCallback = () => null,
71
72
  dependsOn = [],
72
73
  isArray = false,
74
+ allowWorkspaceConnectedAccounts = false,
73
75
  } = props;
74
76
 
75
77
  const [dynamicItems, setDynamicItems] = useState<DynamicDataItem[]>([]);
@@ -140,6 +142,9 @@ const DynamicTypedFields = (props: DynamicFieldsProps) => {
140
142
  const requestParams: any = {
141
143
  authorization_id: selectedAuthId,
142
144
  connected_account_id: selectedAuthId,
145
+ ...(allowWorkspaceConnectedAccounts && {
146
+ allow_workspace_connected_accounts: true,
147
+ }),
143
148
  };
144
149
  apiHandlerRef
145
150
  .callSourceFlowIntegrationInvocationUrl<