@xuda.io/runtime-bundle 1.0.1317 → 1.0.1319
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.
|
@@ -28151,6 +28151,40 @@ func.UI.teleport_garbage_collector = function (SESSION_ID = Object.keys(SESSION_
|
|
|
28151
28151
|
});
|
|
28152
28152
|
};
|
|
28153
28153
|
|
|
28154
|
+
func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_name) {
|
|
28155
|
+
let elm_nodes = [];
|
|
28156
|
+
const iterate_progUi = function (node) {
|
|
28157
|
+
for (let item of node) {
|
|
28158
|
+
if (!tag_name || item.tagName === tag_name) {
|
|
28159
|
+
if (prop) {
|
|
28160
|
+
if (!_.isEmpty(item.attributes)) {
|
|
28161
|
+
for (const [attr, val] of Object.entries(item.attributes)) {
|
|
28162
|
+
if (attr === `xu-exp:${prop}` || attr === prop) {
|
|
28163
|
+
// found = val.includes('@' + field_id);
|
|
28164
|
+
if (val.includes('@' + field_id)) {
|
|
28165
|
+
elm_nodes.push(item);
|
|
28166
|
+
break;
|
|
28167
|
+
}
|
|
28168
|
+
}
|
|
28169
|
+
}
|
|
28170
|
+
}
|
|
28171
|
+
} else {
|
|
28172
|
+
if (tag_name) {
|
|
28173
|
+
elm_nodes.push(item);
|
|
28174
|
+
}
|
|
28175
|
+
}
|
|
28176
|
+
}
|
|
28177
|
+
// if (elm_node) break;
|
|
28178
|
+
|
|
28179
|
+
if (item.children) {
|
|
28180
|
+
iterate_progUi(item.children);
|
|
28181
|
+
}
|
|
28182
|
+
}
|
|
28183
|
+
};
|
|
28184
|
+
iterate_progUi(progUi);
|
|
28185
|
+
return elm_nodes;
|
|
28186
|
+
};
|
|
28187
|
+
|
|
28154
28188
|
func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
28155
28189
|
let ret;
|
|
28156
28190
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
@@ -28226,20 +28260,20 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
|
28226
28260
|
return createProxy(obj);
|
|
28227
28261
|
}
|
|
28228
28262
|
|
|
28229
|
-
const watchedDs = createWatchedObject({ _ref: _ds }, async (change) => {
|
|
28230
|
-
|
|
28231
|
-
|
|
28232
|
-
|
|
28233
|
-
|
|
28234
|
-
|
|
28235
|
-
|
|
28236
|
-
|
|
28237
|
-
|
|
28238
|
-
|
|
28239
|
-
|
|
28240
|
-
|
|
28241
|
-
|
|
28242
|
-
});
|
|
28263
|
+
// const watchedDs = createWatchedObject({ _ref: _ds }, async (change) => {
|
|
28264
|
+
// // console.log('Change detected:', change);
|
|
28265
|
+
// const { path, newValue } = change;
|
|
28266
|
+
// try {
|
|
28267
|
+
// const datasource_changes = {
|
|
28268
|
+
// [dsSessionP]: {
|
|
28269
|
+
// ['datasource_main']: {
|
|
28270
|
+
// watcher: { path, newValue },
|
|
28271
|
+
// },
|
|
28272
|
+
// },
|
|
28273
|
+
// };
|
|
28274
|
+
// await func.datasource.update(SESSION_ID, datasource_changes);
|
|
28275
|
+
// } catch (error) {}
|
|
28276
|
+
// });
|
|
28243
28277
|
|
|
28244
28278
|
//////////////
|
|
28245
28279
|
|
|
@@ -28268,40 +28302,6 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
|
28268
28302
|
|
|
28269
28303
|
return ret;
|
|
28270
28304
|
};
|
|
28271
|
-
|
|
28272
|
-
func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_name) {
|
|
28273
|
-
let elm_nodes = [];
|
|
28274
|
-
const iterate_progUi = function (node) {
|
|
28275
|
-
for (let item of node) {
|
|
28276
|
-
if (!tag_name || item.tagName === tag_name) {
|
|
28277
|
-
if (prop) {
|
|
28278
|
-
if (!_.isEmpty(item.attributes)) {
|
|
28279
|
-
for (const [attr, val] of Object.entries(item.attributes)) {
|
|
28280
|
-
if (attr === `xu-exp:${prop}` || attr === prop) {
|
|
28281
|
-
// found = val.includes('@' + field_id);
|
|
28282
|
-
if (val.includes('@' + field_id)) {
|
|
28283
|
-
elm_nodes.push(item);
|
|
28284
|
-
break;
|
|
28285
|
-
}
|
|
28286
|
-
}
|
|
28287
|
-
}
|
|
28288
|
-
}
|
|
28289
|
-
} else {
|
|
28290
|
-
if (tag_name) {
|
|
28291
|
-
elm_nodes.push(item);
|
|
28292
|
-
}
|
|
28293
|
-
}
|
|
28294
|
-
}
|
|
28295
|
-
// if (elm_node) break;
|
|
28296
|
-
|
|
28297
|
-
if (item.children) {
|
|
28298
|
-
iterate_progUi(item.children);
|
|
28299
|
-
}
|
|
28300
|
-
}
|
|
28301
|
-
};
|
|
28302
|
-
iterate_progUi(progUi);
|
|
28303
|
-
return elm_nodes;
|
|
28304
|
-
};
|
|
28305
28305
|
func.datasource = {};
|
|
28306
28306
|
func.datasource.create = async function (
|
|
28307
28307
|
SESSION_ID,
|
|
@@ -42582,9 +42582,13 @@ func.index.set_ds_0_proxy = function (SESSION_ID) {
|
|
|
42582
42582
|
|
|
42583
42583
|
const watchedDs = createWatchedObject({ _ref: _ds }, async (change) => {
|
|
42584
42584
|
// console.log('Change detected:', change);
|
|
42585
|
-
const { path, newValue } = change;
|
|
42585
|
+
const { path, newValue, oldValue } = change;
|
|
42586
|
+
|
|
42586
42587
|
try {
|
|
42588
|
+
if (_.isEqual(newValue, oldValue)) return;
|
|
42589
|
+
|
|
42587
42590
|
if (change.path.includes('data_system.SYS_GLOBAL_OBJ_REFS')) {
|
|
42591
|
+
const ref_id = str.split('SYS_GLOBAL_OBJ_REFS.')[1].split('.')[0];
|
|
42588
42592
|
// const datasource_changes = {
|
|
42589
42593
|
// [dsSessionP]: {
|
|
42590
42594
|
// ['datasource_main']: {
|