@xuda.io/runtime-bundle 1.0.1342 → 1.0.1344
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-bundle.js +130 -114
- package/js/xuda-runtime-bundle.min.js +2 -2
- package/js/xuda-runtime-slim.js +130 -114
- package/js/xuda-runtime-slim.min.es.js +130 -114
- package/js/xuda-runtime-slim.min.js +2 -2
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -9069,7 +9069,6 @@ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_
|
|
|
9069
9069
|
};
|
|
9070
9070
|
|
|
9071
9071
|
func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
9072
|
-
return;
|
|
9073
9072
|
let ret;
|
|
9074
9073
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
9075
9074
|
let _ds_0 = _session.DS_GLB[0];
|
|
@@ -9205,136 +9204,136 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
|
9205
9204
|
return ret;
|
|
9206
9205
|
};
|
|
9207
9206
|
|
|
9208
|
-
func.UI.create_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
9209
|
-
|
|
9210
|
-
|
|
9211
|
-
|
|
9207
|
+
// func.UI.create_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
9208
|
+
// let ret;
|
|
9209
|
+
// const _session = SESSION_OBJ[SESSION_ID];
|
|
9210
|
+
// let _ds_0 = _session.DS_GLB[0];
|
|
9212
9211
|
|
|
9213
|
-
|
|
9214
|
-
|
|
9212
|
+
// function createWatchedObject(obj, onChange) {
|
|
9213
|
+
// const watchers = new WeakMap();
|
|
9215
9214
|
|
|
9216
|
-
|
|
9217
|
-
|
|
9218
|
-
|
|
9219
|
-
|
|
9215
|
+
// function createProxy(target, path = []) {
|
|
9216
|
+
// if (watchers.has(target)) {
|
|
9217
|
+
// return watchers.get(target);
|
|
9218
|
+
// }
|
|
9220
9219
|
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9220
|
+
// const proxy = new Proxy(target, {
|
|
9221
|
+
// set(obj, prop, value) {
|
|
9222
|
+
// const oldValue = obj[prop];
|
|
9223
|
+
// let currentPath = [...path, prop];
|
|
9225
9224
|
|
|
9226
|
-
|
|
9227
|
-
|
|
9225
|
+
// // Set the new value
|
|
9226
|
+
// obj[prop] = value;
|
|
9228
9227
|
|
|
9229
|
-
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9228
|
+
// // If the new value is an object, make it observable too
|
|
9229
|
+
// if (typeof value === 'object' && value !== null) {
|
|
9230
|
+
// obj[prop] = createProxy(value, currentPath);
|
|
9231
|
+
// }
|
|
9233
9232
|
|
|
9234
|
-
|
|
9235
|
-
|
|
9236
|
-
|
|
9237
|
-
|
|
9238
|
-
|
|
9239
|
-
|
|
9240
|
-
|
|
9241
|
-
|
|
9242
|
-
|
|
9243
|
-
|
|
9244
|
-
|
|
9245
|
-
|
|
9233
|
+
// // Notify of change
|
|
9234
|
+
// // if (oldValue !== value) {
|
|
9235
|
+
// if (!_.isEqual(value, oldValue)) {
|
|
9236
|
+
// currentPath.shift();
|
|
9237
|
+
// onChange({
|
|
9238
|
+
// path: currentPath.join('.'),
|
|
9239
|
+
// oldValue,
|
|
9240
|
+
// newValue: value,
|
|
9241
|
+
// type: 'set',
|
|
9242
|
+
// timestamp: Date.now(),
|
|
9243
|
+
// });
|
|
9244
|
+
// }
|
|
9246
9245
|
|
|
9247
|
-
|
|
9248
|
-
|
|
9246
|
+
// return true;
|
|
9247
|
+
// },
|
|
9249
9248
|
|
|
9250
|
-
|
|
9251
|
-
|
|
9252
|
-
|
|
9249
|
+
// deleteProperty(obj, prop) {
|
|
9250
|
+
// const oldValue = obj[prop];
|
|
9251
|
+
// const currentPath = [...path, prop];
|
|
9253
9252
|
|
|
9254
|
-
|
|
9253
|
+
// delete obj[prop];
|
|
9255
9254
|
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
|
|
9255
|
+
// onChange({
|
|
9256
|
+
// path: currentPath.join('.'),
|
|
9257
|
+
// oldValue,
|
|
9258
|
+
// newValue: undefined,
|
|
9259
|
+
// type: 'delete',
|
|
9260
|
+
// timestamp: Date.now(),
|
|
9261
|
+
// });
|
|
9263
9262
|
|
|
9264
|
-
|
|
9265
|
-
|
|
9266
|
-
|
|
9263
|
+
// return true;
|
|
9264
|
+
// },
|
|
9265
|
+
// });
|
|
9267
9266
|
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9272
|
-
|
|
9273
|
-
|
|
9267
|
+
// // Make nested objects observable
|
|
9268
|
+
// for (const [key, value] of Object.entries(target)) {
|
|
9269
|
+
// if (typeof value === 'object' && value !== null) {
|
|
9270
|
+
// target[key] = createProxy(value, [...path, key]);
|
|
9271
|
+
// }
|
|
9272
|
+
// }
|
|
9274
9273
|
|
|
9275
|
-
|
|
9276
|
-
|
|
9277
|
-
|
|
9274
|
+
// watchers.set(target, proxy);
|
|
9275
|
+
// return proxy;
|
|
9276
|
+
// }
|
|
9278
9277
|
|
|
9279
|
-
|
|
9280
|
-
|
|
9278
|
+
// return createProxy(obj);
|
|
9279
|
+
// }
|
|
9281
9280
|
|
|
9282
|
-
|
|
9281
|
+
// let _ds = _session.DS_GLB[dsSessionP];
|
|
9283
9282
|
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
|
|
9283
|
+
// // const watchedDs = createWatchedObject({ _ref: _ds }, async (change) => {
|
|
9284
|
+
// // // console.log('Change detected:', change);
|
|
9285
|
+
// // const { path, newValue, oldValue } = change;
|
|
9287
9286
|
|
|
9288
|
-
|
|
9287
|
+
// // });
|
|
9289
9288
|
|
|
9290
|
-
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9289
|
+
// const createBasicProxy = (target) => {
|
|
9290
|
+
// return new Proxy(target, {
|
|
9291
|
+
// // Intercept property access
|
|
9292
|
+
// get(obj, prop) {
|
|
9293
|
+
// console.log(`Getting property: ${String(prop)}`);
|
|
9294
|
+
// return prop in obj ? obj[prop] : `Property ${String(prop)} not found`;
|
|
9295
|
+
// },
|
|
9297
9296
|
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9297
|
+
// // Intercept property assignment
|
|
9298
|
+
// set(obj, prop, value) {
|
|
9299
|
+
// console.log(`Setting property: ${String(prop)} to ${value}`);
|
|
9300
|
+
// obj[prop] = value;
|
|
9301
|
+
// return true; // indicates success
|
|
9302
|
+
// },
|
|
9304
9303
|
|
|
9305
|
-
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
|
|
9310
|
-
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
|
|
9322
|
-
|
|
9323
|
-
|
|
9324
|
-
|
|
9304
|
+
// // Intercept property deletion
|
|
9305
|
+
// deleteProperty(obj, prop) {
|
|
9306
|
+
// console.log(`Deleting property: ${String(prop)}`);
|
|
9307
|
+
// if (prop in obj) {
|
|
9308
|
+
// delete obj[prop];
|
|
9309
|
+
// return true;
|
|
9310
|
+
// }
|
|
9311
|
+
// return false;
|
|
9312
|
+
// },
|
|
9313
|
+
// });
|
|
9314
|
+
// };
|
|
9315
|
+
// const p = createBasicProxy(_ds);
|
|
9316
|
+
// // let obj = { ds: watchedDs._ref, data: {}, props: _ds.in_parameters || {} };
|
|
9317
|
+
// let obj = { ds: {}, data: {}, props: _ds.in_parameters || {} };
|
|
9318
|
+
// try {
|
|
9319
|
+
// const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
9320
|
+
// obj.data = _ds?.data_feed?.rows?.[row_idx];
|
|
9321
|
+
// } catch (error) {
|
|
9322
|
+
// // error normal if find_ROWID_idx fail
|
|
9323
|
+
// }
|
|
9325
9324
|
|
|
9326
|
-
|
|
9325
|
+
// let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
|
|
9327
9326
|
|
|
9328
|
-
|
|
9329
|
-
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9327
|
+
// if ($elm) {
|
|
9328
|
+
// const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
|
|
9329
|
+
// obj.attributes = attributes;
|
|
9330
|
+
// obj.xu_ui_id = $elm.attr('xu-ui-id');
|
|
9331
|
+
// }
|
|
9333
9332
|
|
|
9334
|
-
|
|
9333
|
+
// SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
|
|
9335
9334
|
|
|
9336
|
-
|
|
9337
|
-
};
|
|
9335
|
+
// return ret;
|
|
9336
|
+
// };
|
|
9338
9337
|
func.events = {};
|
|
9339
9338
|
func.events.validate = async function (SESSION_ID, triggerP, dsSessionP, eventIdP, sourceP, argumentsP, return_validation_onlyP) {
|
|
9340
9339
|
var _session = SESSION_OBJ[SESSION_ID];
|
|
@@ -20273,17 +20272,13 @@ func.index.set_ds_0_proxy = function (SESSION_ID) {
|
|
|
20273
20272
|
const fx = _session?.watchers?.[path];
|
|
20274
20273
|
fx(change);
|
|
20275
20274
|
}
|
|
20276
|
-
|
|
20277
|
-
|
|
20278
|
-
const ref_id = change.path.split('
|
|
20275
|
+
|
|
20276
|
+
///////////////////////
|
|
20277
|
+
const ref_id = change.path.split('.')[0];
|
|
20279
20278
|
if (!ref_id) return;
|
|
20280
20279
|
const _ref = SESSION_OBJ[SESSION_ID].DS_GLB[0].data_system.SYS_GLOBAL_OBJ_REFS[ref_id];
|
|
20281
|
-
|
|
20282
20280
|
if (!_ref) return;
|
|
20283
|
-
const prefix_path = `data_system.SYS_GLOBAL_OBJ_REFS.${ref_id}.ds`;
|
|
20284
|
-
if (!change.path.includes(prefix_path)) return;
|
|
20285
20281
|
const _ds = _ref.ds;
|
|
20286
|
-
|
|
20287
20282
|
const datasource_changes = {
|
|
20288
20283
|
[_ds.dsSession]: {
|
|
20289
20284
|
['datasource_main']: {
|
|
@@ -20292,6 +20287,27 @@ func.index.set_ds_0_proxy = function (SESSION_ID) {
|
|
|
20292
20287
|
},
|
|
20293
20288
|
};
|
|
20294
20289
|
await func.datasource.update(SESSION_ID, datasource_changes);
|
|
20290
|
+
///////////////////
|
|
20291
|
+
|
|
20292
|
+
return;
|
|
20293
|
+
// if (!change.path.includes('data_system.SYS_GLOBAL_OBJ_REFS')) return;
|
|
20294
|
+
// const ref_id = change.path.split('SYS_GLOBAL_OBJ_REFS.')[1].split('.')[0];
|
|
20295
|
+
// if (!ref_id) return;
|
|
20296
|
+
// const _ref = SESSION_OBJ[SESSION_ID].DS_GLB[0].data_system.SYS_GLOBAL_OBJ_REFS[ref_id];
|
|
20297
|
+
|
|
20298
|
+
// if (!_ref) return;
|
|
20299
|
+
// const prefix_path = `data_system.SYS_GLOBAL_OBJ_REFS.${ref_id}.ds`;
|
|
20300
|
+
// if (!change.path.includes(prefix_path)) return;
|
|
20301
|
+
// const _ds = _ref.ds;
|
|
20302
|
+
|
|
20303
|
+
// const datasource_changes = {
|
|
20304
|
+
// [_ds.dsSession]: {
|
|
20305
|
+
// ['datasource_main']: {
|
|
20306
|
+
// watcher: { path: path.replace(prefix_path + '.', ''), newValue },
|
|
20307
|
+
// },
|
|
20308
|
+
// },
|
|
20309
|
+
// };
|
|
20310
|
+
// await func.datasource.update(SESSION_ID, datasource_changes);
|
|
20295
20311
|
} catch (error) {}
|
|
20296
20312
|
});
|
|
20297
20313
|
|
|
@@ -9070,7 +9070,6 @@ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_
|
|
|
9070
9070
|
};
|
|
9071
9071
|
|
|
9072
9072
|
func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
9073
|
-
return;
|
|
9074
9073
|
let ret;
|
|
9075
9074
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
9076
9075
|
let _ds_0 = _session.DS_GLB[0];
|
|
@@ -9206,136 +9205,136 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
|
9206
9205
|
return ret;
|
|
9207
9206
|
};
|
|
9208
9207
|
|
|
9209
|
-
func.UI.create_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
9210
|
-
|
|
9211
|
-
|
|
9212
|
-
|
|
9208
|
+
// func.UI.create_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
9209
|
+
// let ret;
|
|
9210
|
+
// const _session = SESSION_OBJ[SESSION_ID];
|
|
9211
|
+
// let _ds_0 = _session.DS_GLB[0];
|
|
9213
9212
|
|
|
9214
|
-
|
|
9215
|
-
|
|
9213
|
+
// function createWatchedObject(obj, onChange) {
|
|
9214
|
+
// const watchers = new WeakMap();
|
|
9216
9215
|
|
|
9217
|
-
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
|
|
9216
|
+
// function createProxy(target, path = []) {
|
|
9217
|
+
// if (watchers.has(target)) {
|
|
9218
|
+
// return watchers.get(target);
|
|
9219
|
+
// }
|
|
9221
9220
|
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9225
|
-
|
|
9221
|
+
// const proxy = new Proxy(target, {
|
|
9222
|
+
// set(obj, prop, value) {
|
|
9223
|
+
// const oldValue = obj[prop];
|
|
9224
|
+
// let currentPath = [...path, prop];
|
|
9226
9225
|
|
|
9227
|
-
|
|
9228
|
-
|
|
9226
|
+
// // Set the new value
|
|
9227
|
+
// obj[prop] = value;
|
|
9229
9228
|
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9229
|
+
// // If the new value is an object, make it observable too
|
|
9230
|
+
// if (typeof value === 'object' && value !== null) {
|
|
9231
|
+
// obj[prop] = createProxy(value, currentPath);
|
|
9232
|
+
// }
|
|
9234
9233
|
|
|
9235
|
-
|
|
9236
|
-
|
|
9237
|
-
|
|
9238
|
-
|
|
9239
|
-
|
|
9240
|
-
|
|
9241
|
-
|
|
9242
|
-
|
|
9243
|
-
|
|
9244
|
-
|
|
9245
|
-
|
|
9246
|
-
|
|
9234
|
+
// // Notify of change
|
|
9235
|
+
// // if (oldValue !== value) {
|
|
9236
|
+
// if (!_.isEqual(value, oldValue)) {
|
|
9237
|
+
// currentPath.shift();
|
|
9238
|
+
// onChange({
|
|
9239
|
+
// path: currentPath.join('.'),
|
|
9240
|
+
// oldValue,
|
|
9241
|
+
// newValue: value,
|
|
9242
|
+
// type: 'set',
|
|
9243
|
+
// timestamp: Date.now(),
|
|
9244
|
+
// });
|
|
9245
|
+
// }
|
|
9247
9246
|
|
|
9248
|
-
|
|
9249
|
-
|
|
9247
|
+
// return true;
|
|
9248
|
+
// },
|
|
9250
9249
|
|
|
9251
|
-
|
|
9252
|
-
|
|
9253
|
-
|
|
9250
|
+
// deleteProperty(obj, prop) {
|
|
9251
|
+
// const oldValue = obj[prop];
|
|
9252
|
+
// const currentPath = [...path, prop];
|
|
9254
9253
|
|
|
9255
|
-
|
|
9254
|
+
// delete obj[prop];
|
|
9256
9255
|
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
|
|
9263
|
-
|
|
9256
|
+
// onChange({
|
|
9257
|
+
// path: currentPath.join('.'),
|
|
9258
|
+
// oldValue,
|
|
9259
|
+
// newValue: undefined,
|
|
9260
|
+
// type: 'delete',
|
|
9261
|
+
// timestamp: Date.now(),
|
|
9262
|
+
// });
|
|
9264
9263
|
|
|
9265
|
-
|
|
9266
|
-
|
|
9267
|
-
|
|
9264
|
+
// return true;
|
|
9265
|
+
// },
|
|
9266
|
+
// });
|
|
9268
9267
|
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9272
|
-
|
|
9273
|
-
|
|
9274
|
-
|
|
9268
|
+
// // Make nested objects observable
|
|
9269
|
+
// for (const [key, value] of Object.entries(target)) {
|
|
9270
|
+
// if (typeof value === 'object' && value !== null) {
|
|
9271
|
+
// target[key] = createProxy(value, [...path, key]);
|
|
9272
|
+
// }
|
|
9273
|
+
// }
|
|
9275
9274
|
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
|
|
9275
|
+
// watchers.set(target, proxy);
|
|
9276
|
+
// return proxy;
|
|
9277
|
+
// }
|
|
9279
9278
|
|
|
9280
|
-
|
|
9281
|
-
|
|
9279
|
+
// return createProxy(obj);
|
|
9280
|
+
// }
|
|
9282
9281
|
|
|
9283
|
-
|
|
9282
|
+
// let _ds = _session.DS_GLB[dsSessionP];
|
|
9284
9283
|
|
|
9285
|
-
|
|
9286
|
-
|
|
9287
|
-
|
|
9284
|
+
// // const watchedDs = createWatchedObject({ _ref: _ds }, async (change) => {
|
|
9285
|
+
// // // console.log('Change detected:', change);
|
|
9286
|
+
// // const { path, newValue, oldValue } = change;
|
|
9288
9287
|
|
|
9289
|
-
|
|
9288
|
+
// // });
|
|
9290
9289
|
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
|
|
9290
|
+
// const createBasicProxy = (target) => {
|
|
9291
|
+
// return new Proxy(target, {
|
|
9292
|
+
// // Intercept property access
|
|
9293
|
+
// get(obj, prop) {
|
|
9294
|
+
// console.log(`Getting property: ${String(prop)}`);
|
|
9295
|
+
// return prop in obj ? obj[prop] : `Property ${String(prop)} not found`;
|
|
9296
|
+
// },
|
|
9298
9297
|
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9298
|
+
// // Intercept property assignment
|
|
9299
|
+
// set(obj, prop, value) {
|
|
9300
|
+
// console.log(`Setting property: ${String(prop)} to ${value}`);
|
|
9301
|
+
// obj[prop] = value;
|
|
9302
|
+
// return true; // indicates success
|
|
9303
|
+
// },
|
|
9305
9304
|
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
|
|
9310
|
-
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
|
|
9322
|
-
|
|
9323
|
-
|
|
9324
|
-
|
|
9325
|
-
|
|
9305
|
+
// // Intercept property deletion
|
|
9306
|
+
// deleteProperty(obj, prop) {
|
|
9307
|
+
// console.log(`Deleting property: ${String(prop)}`);
|
|
9308
|
+
// if (prop in obj) {
|
|
9309
|
+
// delete obj[prop];
|
|
9310
|
+
// return true;
|
|
9311
|
+
// }
|
|
9312
|
+
// return false;
|
|
9313
|
+
// },
|
|
9314
|
+
// });
|
|
9315
|
+
// };
|
|
9316
|
+
// const p = createBasicProxy(_ds);
|
|
9317
|
+
// // let obj = { ds: watchedDs._ref, data: {}, props: _ds.in_parameters || {} };
|
|
9318
|
+
// let obj = { ds: {}, data: {}, props: _ds.in_parameters || {} };
|
|
9319
|
+
// try {
|
|
9320
|
+
// const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
9321
|
+
// obj.data = _ds?.data_feed?.rows?.[row_idx];
|
|
9322
|
+
// } catch (error) {
|
|
9323
|
+
// // error normal if find_ROWID_idx fail
|
|
9324
|
+
// }
|
|
9326
9325
|
|
|
9327
|
-
|
|
9326
|
+
// let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
|
|
9328
9327
|
|
|
9329
|
-
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
|
|
9328
|
+
// if ($elm) {
|
|
9329
|
+
// const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
|
|
9330
|
+
// obj.attributes = attributes;
|
|
9331
|
+
// obj.xu_ui_id = $elm.attr('xu-ui-id');
|
|
9332
|
+
// }
|
|
9334
9333
|
|
|
9335
|
-
|
|
9334
|
+
// SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
|
|
9336
9335
|
|
|
9337
|
-
|
|
9338
|
-
};
|
|
9336
|
+
// return ret;
|
|
9337
|
+
// };
|
|
9339
9338
|
func.UI.screen = {};
|
|
9340
9339
|
func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callingDataSource_objP, $callingContainerP, triggerIdP, rowIdP, jobNoP, is_panelP, parameters_obj_inP, source_functionP, call_screen_propertiesP, refreshed_ds, parameters_raw_obj) {
|
|
9341
9340
|
if (!prog_id) return console.error('program is empty');
|
|
@@ -20274,17 +20273,13 @@ func.index.set_ds_0_proxy = function (SESSION_ID) {
|
|
|
20274
20273
|
const fx = _session?.watchers?.[path];
|
|
20275
20274
|
fx(change);
|
|
20276
20275
|
}
|
|
20277
|
-
|
|
20278
|
-
|
|
20279
|
-
const ref_id = change.path.split('
|
|
20276
|
+
|
|
20277
|
+
///////////////////////
|
|
20278
|
+
const ref_id = change.path.split('.')[0];
|
|
20280
20279
|
if (!ref_id) return;
|
|
20281
20280
|
const _ref = SESSION_OBJ[SESSION_ID].DS_GLB[0].data_system.SYS_GLOBAL_OBJ_REFS[ref_id];
|
|
20282
|
-
|
|
20283
20281
|
if (!_ref) return;
|
|
20284
|
-
const prefix_path = `data_system.SYS_GLOBAL_OBJ_REFS.${ref_id}.ds`;
|
|
20285
|
-
if (!change.path.includes(prefix_path)) return;
|
|
20286
20282
|
const _ds = _ref.ds;
|
|
20287
|
-
|
|
20288
20283
|
const datasource_changes = {
|
|
20289
20284
|
[_ds.dsSession]: {
|
|
20290
20285
|
['datasource_main']: {
|
|
@@ -20293,6 +20288,27 @@ func.index.set_ds_0_proxy = function (SESSION_ID) {
|
|
|
20293
20288
|
},
|
|
20294
20289
|
};
|
|
20295
20290
|
await func.datasource.update(SESSION_ID, datasource_changes);
|
|
20291
|
+
///////////////////
|
|
20292
|
+
|
|
20293
|
+
return;
|
|
20294
|
+
// if (!change.path.includes('data_system.SYS_GLOBAL_OBJ_REFS')) return;
|
|
20295
|
+
// const ref_id = change.path.split('SYS_GLOBAL_OBJ_REFS.')[1].split('.')[0];
|
|
20296
|
+
// if (!ref_id) return;
|
|
20297
|
+
// const _ref = SESSION_OBJ[SESSION_ID].DS_GLB[0].data_system.SYS_GLOBAL_OBJ_REFS[ref_id];
|
|
20298
|
+
|
|
20299
|
+
// if (!_ref) return;
|
|
20300
|
+
// const prefix_path = `data_system.SYS_GLOBAL_OBJ_REFS.${ref_id}.ds`;
|
|
20301
|
+
// if (!change.path.includes(prefix_path)) return;
|
|
20302
|
+
// const _ds = _ref.ds;
|
|
20303
|
+
|
|
20304
|
+
// const datasource_changes = {
|
|
20305
|
+
// [_ds.dsSession]: {
|
|
20306
|
+
// ['datasource_main']: {
|
|
20307
|
+
// watcher: { path: path.replace(prefix_path + '.', ''), newValue },
|
|
20308
|
+
// },
|
|
20309
|
+
// },
|
|
20310
|
+
// };
|
|
20311
|
+
// await func.datasource.update(SESSION_ID, datasource_changes);
|
|
20296
20312
|
} catch (error) {}
|
|
20297
20313
|
});
|
|
20298
20314
|
|