@trackunit/iris-app-runtime-core 0.3.220 → 0.3.221
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 +31 -0
- package/index.esm.js +31 -0
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -131,6 +131,37 @@ const getCustomFieldValueToSaveFromRawValue = (customFieldDefinition, newValue)
|
|
|
131
131
|
type: "DATE",
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
+
else if (customFieldDefinition.type === "STRING_LIST") {
|
|
135
|
+
if (newValue === null) {
|
|
136
|
+
return {
|
|
137
|
+
stringArrayValue: null,
|
|
138
|
+
type: "STRING_LIST",
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
const stringArrayValue = [];
|
|
142
|
+
if (Array.isArray(newValue)) {
|
|
143
|
+
newValue.forEach(item => {
|
|
144
|
+
if (typeof item === "string") {
|
|
145
|
+
stringArrayValue.push(item);
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
stringArrayValue.push(item.value);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
if (typeof newValue === "string") {
|
|
154
|
+
stringArrayValue.push(newValue);
|
|
155
|
+
}
|
|
156
|
+
else if (typeof newValue === "object") {
|
|
157
|
+
stringArrayValue.push(newValue.value);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return {
|
|
161
|
+
stringArrayValue: stringArrayValue.length ? stringArrayValue : null,
|
|
162
|
+
type: "STRING_LIST",
|
|
163
|
+
};
|
|
164
|
+
}
|
|
134
165
|
else if (customFieldDefinition.type === "DROPDOWN") {
|
|
135
166
|
if (newValue === null) {
|
|
136
167
|
return {
|
package/index.esm.js
CHANGED
|
@@ -129,6 +129,37 @@ const getCustomFieldValueToSaveFromRawValue = (customFieldDefinition, newValue)
|
|
|
129
129
|
type: "DATE",
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
+
else if (customFieldDefinition.type === "STRING_LIST") {
|
|
133
|
+
if (newValue === null) {
|
|
134
|
+
return {
|
|
135
|
+
stringArrayValue: null,
|
|
136
|
+
type: "STRING_LIST",
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
const stringArrayValue = [];
|
|
140
|
+
if (Array.isArray(newValue)) {
|
|
141
|
+
newValue.forEach(item => {
|
|
142
|
+
if (typeof item === "string") {
|
|
143
|
+
stringArrayValue.push(item);
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
stringArrayValue.push(item.value);
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
if (typeof newValue === "string") {
|
|
152
|
+
stringArrayValue.push(newValue);
|
|
153
|
+
}
|
|
154
|
+
else if (typeof newValue === "object") {
|
|
155
|
+
stringArrayValue.push(newValue.value);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
stringArrayValue: stringArrayValue.length ? stringArrayValue : null,
|
|
160
|
+
type: "STRING_LIST",
|
|
161
|
+
};
|
|
162
|
+
}
|
|
132
163
|
else if (customFieldDefinition.type === "DROPDOWN") {
|
|
133
164
|
if (newValue === null) {
|
|
134
165
|
return {
|