@xuda.io/runtime-bundle 1.0.1330 → 1.0.1332
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/js/xuda-runtime-slim.js
CHANGED
|
@@ -9180,7 +9180,22 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
|
9180
9180
|
if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
|
|
9181
9181
|
SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
|
|
9182
9182
|
}
|
|
9183
|
-
SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
|
|
9183
|
+
// SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
|
|
9184
|
+
|
|
9185
|
+
function deepUpdateObject(a, b) {
|
|
9186
|
+
for (let key in b) {
|
|
9187
|
+
if (b.hasOwnProperty(key)) {
|
|
9188
|
+
if (typeof b[key] === 'object' && b[key] !== null && !Array.isArray(b[key]) && a[key] && typeof a[key] === 'object') {
|
|
9189
|
+
deepUpdateObject(a[key], b[key]);
|
|
9190
|
+
} else {
|
|
9191
|
+
a[key] = b[key];
|
|
9192
|
+
}
|
|
9193
|
+
}
|
|
9194
|
+
}
|
|
9195
|
+
return a;
|
|
9196
|
+
}
|
|
9197
|
+
deepUpdateObject(SYS_GLOBAL_OBJ_REFS[ref_field_id], obj);
|
|
9198
|
+
|
|
9184
9199
|
ret = true;
|
|
9185
9200
|
}
|
|
9186
9201
|
|
|
@@ -20066,7 +20081,7 @@ func.index.set_ds_0_proxy = function (SESSION_ID) {
|
|
|
20066
20081
|
// Notify of change
|
|
20067
20082
|
// if (oldValue !== value) {
|
|
20068
20083
|
if (!_.isEqual(value, oldValue)) {
|
|
20069
|
-
currentPath.shift();
|
|
20084
|
+
if (currentPath[0] == '_ref') currentPath.shift();
|
|
20070
20085
|
onChange({
|
|
20071
20086
|
path: currentPath.join('.'),
|
|
20072
20087
|
oldValue,
|
|
@@ -9181,7 +9181,22 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
|
9181
9181
|
if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
|
|
9182
9182
|
SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
|
|
9183
9183
|
}
|
|
9184
|
-
SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
|
|
9184
|
+
// SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
|
|
9185
|
+
|
|
9186
|
+
function deepUpdateObject(a, b) {
|
|
9187
|
+
for (let key in b) {
|
|
9188
|
+
if (b.hasOwnProperty(key)) {
|
|
9189
|
+
if (typeof b[key] === 'object' && b[key] !== null && !Array.isArray(b[key]) && a[key] && typeof a[key] === 'object') {
|
|
9190
|
+
deepUpdateObject(a[key], b[key]);
|
|
9191
|
+
} else {
|
|
9192
|
+
a[key] = b[key];
|
|
9193
|
+
}
|
|
9194
|
+
}
|
|
9195
|
+
}
|
|
9196
|
+
return a;
|
|
9197
|
+
}
|
|
9198
|
+
deepUpdateObject(SYS_GLOBAL_OBJ_REFS[ref_field_id], obj);
|
|
9199
|
+
|
|
9185
9200
|
ret = true;
|
|
9186
9201
|
}
|
|
9187
9202
|
|
|
@@ -20067,7 +20082,7 @@ func.index.set_ds_0_proxy = function (SESSION_ID) {
|
|
|
20067
20082
|
// Notify of change
|
|
20068
20083
|
// if (oldValue !== value) {
|
|
20069
20084
|
if (!_.isEqual(value, oldValue)) {
|
|
20070
|
-
currentPath.shift();
|
|
20085
|
+
if (currentPath[0] == '_ref') currentPath.shift();
|
|
20071
20086
|
onChange({
|
|
20072
20087
|
path: currentPath.join('.'),
|
|
20073
20088
|
oldValue,
|