@trackunit/iris-app-runtime-core 1.13.52 → 1.13.54-alpha-ae1ff73fc64.0

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/index.cjs.js CHANGED
@@ -155,7 +155,7 @@ const getCustomFieldValueToSaveFromRawValue = (customFieldDefinition, newValue)
155
155
  };
156
156
  }
157
157
  return {
158
- booleanValue: newValue ? true : false,
158
+ booleanValue: Boolean(newValue),
159
159
  __typename: "BooleanFieldValue",
160
160
  };
161
161
  }
@@ -192,7 +192,7 @@ const getCustomFieldValueToSaveFromRawValue = (customFieldDefinition, newValue)
192
192
  }
193
193
  }
194
194
  return {
195
- stringArrayValue: stringArrayValue.length ? stringArrayValue : null,
195
+ stringArrayValue: stringArrayValue.length > 0 ? stringArrayValue : null,
196
196
  __typename: "StringListFieldValue",
197
197
  };
198
198
  }
@@ -223,13 +223,13 @@ const getCustomFieldValueToSaveFromRawValue = (customFieldDefinition, newValue)
223
223
  }
224
224
  }
225
225
  return {
226
- stringArrayValue: stringArrayValue.length ? stringArrayValue : null,
226
+ stringArrayValue: stringArrayValue.length > 0 ? stringArrayValue : null,
227
227
  __typename: "DropDownFieldValue",
228
228
  };
229
229
  }
230
230
  else if (customFieldDefinition.__typename === "EmailFieldDefinition") {
231
231
  return {
232
- emailValue: newValue ? getStringValue(newValue) : null,
232
+ emailValue: typeof newValue === "string" ? getStringValue(newValue) : null,
233
233
  __typename: "EmailFieldValue",
234
234
  };
235
235
  }
@@ -247,25 +247,25 @@ const getCustomFieldValueToSaveFromRawValue = (customFieldDefinition, newValue)
247
247
  }
248
248
  else if (customFieldDefinition.__typename === "MonetaryFieldDefinition") {
249
249
  return {
250
- monetaryValue: newValue ? newValue : null,
250
+ monetaryValue: typeof newValue === "number" ? newValue : null,
251
251
  __typename: "MonetaryFieldValue",
252
252
  };
253
253
  }
254
254
  else if (customFieldDefinition.__typename === "PhoneNumberFieldDefinition") {
255
255
  return {
256
- phoneNumberValue: newValue ? getStringValue(newValue) : null,
256
+ phoneNumberValue: typeof newValue === "string" ? getStringValue(newValue) : null,
257
257
  __typename: "PhoneNumberFieldValue",
258
258
  };
259
259
  }
260
260
  else if (customFieldDefinition.__typename === "StringFieldDefinition") {
261
261
  return {
262
- stringValue: newValue ? getStringValue(newValue) : null,
262
+ stringValue: typeof newValue === "string" ? getStringValue(newValue) : null,
263
263
  __typename: "StringFieldValue",
264
264
  };
265
265
  }
266
266
  else if (customFieldDefinition.__typename === "WebAddressFieldDefinition") {
267
267
  return {
268
- webAddressValue: newValue ? getStringValue(newValue) : null,
268
+ webAddressValue: typeof newValue === "string" ? getStringValue(newValue) : null,
269
269
  __typename: "WebAddressFieldValue",
270
270
  };
271
271
  }
package/index.esm.js CHANGED
@@ -153,7 +153,7 @@ const getCustomFieldValueToSaveFromRawValue = (customFieldDefinition, newValue)
153
153
  };
154
154
  }
155
155
  return {
156
- booleanValue: newValue ? true : false,
156
+ booleanValue: Boolean(newValue),
157
157
  __typename: "BooleanFieldValue",
158
158
  };
159
159
  }
@@ -190,7 +190,7 @@ const getCustomFieldValueToSaveFromRawValue = (customFieldDefinition, newValue)
190
190
  }
191
191
  }
192
192
  return {
193
- stringArrayValue: stringArrayValue.length ? stringArrayValue : null,
193
+ stringArrayValue: stringArrayValue.length > 0 ? stringArrayValue : null,
194
194
  __typename: "StringListFieldValue",
195
195
  };
196
196
  }
@@ -221,13 +221,13 @@ const getCustomFieldValueToSaveFromRawValue = (customFieldDefinition, newValue)
221
221
  }
222
222
  }
223
223
  return {
224
- stringArrayValue: stringArrayValue.length ? stringArrayValue : null,
224
+ stringArrayValue: stringArrayValue.length > 0 ? stringArrayValue : null,
225
225
  __typename: "DropDownFieldValue",
226
226
  };
227
227
  }
228
228
  else if (customFieldDefinition.__typename === "EmailFieldDefinition") {
229
229
  return {
230
- emailValue: newValue ? getStringValue(newValue) : null,
230
+ emailValue: typeof newValue === "string" ? getStringValue(newValue) : null,
231
231
  __typename: "EmailFieldValue",
232
232
  };
233
233
  }
@@ -245,25 +245,25 @@ const getCustomFieldValueToSaveFromRawValue = (customFieldDefinition, newValue)
245
245
  }
246
246
  else if (customFieldDefinition.__typename === "MonetaryFieldDefinition") {
247
247
  return {
248
- monetaryValue: newValue ? newValue : null,
248
+ monetaryValue: typeof newValue === "number" ? newValue : null,
249
249
  __typename: "MonetaryFieldValue",
250
250
  };
251
251
  }
252
252
  else if (customFieldDefinition.__typename === "PhoneNumberFieldDefinition") {
253
253
  return {
254
- phoneNumberValue: newValue ? getStringValue(newValue) : null,
254
+ phoneNumberValue: typeof newValue === "string" ? getStringValue(newValue) : null,
255
255
  __typename: "PhoneNumberFieldValue",
256
256
  };
257
257
  }
258
258
  else if (customFieldDefinition.__typename === "StringFieldDefinition") {
259
259
  return {
260
- stringValue: newValue ? getStringValue(newValue) : null,
260
+ stringValue: typeof newValue === "string" ? getStringValue(newValue) : null,
261
261
  __typename: "StringFieldValue",
262
262
  };
263
263
  }
264
264
  else if (customFieldDefinition.__typename === "WebAddressFieldDefinition") {
265
265
  return {
266
- webAddressValue: newValue ? getStringValue(newValue) : null,
266
+ webAddressValue: typeof newValue === "string" ? getStringValue(newValue) : null,
267
267
  __typename: "WebAddressFieldValue",
268
268
  };
269
269
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-runtime-core",
3
- "version": "1.13.52",
3
+ "version": "1.13.54-alpha-ae1ff73fc64.0",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "penpal": "^6.2.2",
11
- "@trackunit/iris-app-runtime-core-api": "1.12.50"
11
+ "@trackunit/iris-app-runtime-core-api": "1.12.52-alpha-ae1ff73fc64.0"
12
12
  },
13
13
  "module": "./index.esm.js",
14
14
  "main": "./index.cjs.js",