@integry/sdk 4.7.0 → 4.7.2

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.0",
3
+ "version": "4.7.2",
4
4
  "description": "Integry SDK",
5
5
  "main": "dist/umd/index.umd.js",
6
6
  "module": "dist/esm/index.csm.js",
@@ -219,6 +219,8 @@ const MultipurposeField = (props: MultipurposeFieldProps) => {
219
219
  newValue = newValue.replace(tag.text, `{${tag.value}}`);
220
220
  });
221
221
  newValue = newValue.trim();
222
+ // remove zero width space
223
+ newValue = newValue.replace(/\u200B/g, '');
222
224
  if (removeWhitespace(newValue).length === 0) {
223
225
  el.value = '';
224
226
  newValue = '';
@@ -166,7 +166,11 @@ const ObjectField = (props: ObjectFieldProps) => {
166
166
 
167
167
  useEffect(() => {
168
168
  let objectValueCopy = objectValue;
169
- if (typeof objectValue === 'string' && objectValue.length > 0) {
169
+ if (
170
+ typeof objectValue === 'string' &&
171
+ objectValue.length > 0 &&
172
+ field.type !== 'TEXTAREA'
173
+ ) {
170
174
  // if default value was sent as a strinfiyed object
171
175
  objectValueCopy = JSON.parse(objectValue);
172
176
  }
@@ -187,12 +191,19 @@ const ObjectField = (props: ObjectFieldProps) => {
187
191
  dataType: string,
188
192
  machine_name?: string,
189
193
  ) => {
190
- const updatedObjectArray = [...objectArray];
194
+ const updatedObjectArray =
195
+ field.type === 'TEXTAREA' ? value : [...objectArray];
191
196
  const updatedObjectArrayKey = (isFlow && machine_name) || fieldId;
192
- updatedObjectArray[index][updatedObjectArrayKey] = value;
197
+ if (field.type !== 'TEXTAREA') {
198
+ updatedObjectArray[index][updatedObjectArrayKey] = value;
199
+ }
193
200
 
194
201
  // Update the state with the modified object array
195
- setObjectArray(updatedObjectArray);
202
+ if (field.type === 'TEXTAREA') {
203
+ setObjectArray([updatedObjectArray]);
204
+ } else {
205
+ setObjectArray(updatedObjectArray);
206
+ }
196
207
 
197
208
  // Optionally trigger the parent change handler
198
209
  if (isArray) {