@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.
@@ -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
- let ret;
9210
- const _session = SESSION_OBJ[SESSION_ID];
9211
- let _ds_0 = _session.DS_GLB[0];
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
- function createWatchedObject(obj, onChange) {
9214
- const watchers = new WeakMap();
9212
+ // function createWatchedObject(obj, onChange) {
9213
+ // const watchers = new WeakMap();
9215
9214
 
9216
- function createProxy(target, path = []) {
9217
- if (watchers.has(target)) {
9218
- return watchers.get(target);
9219
- }
9215
+ // function createProxy(target, path = []) {
9216
+ // if (watchers.has(target)) {
9217
+ // return watchers.get(target);
9218
+ // }
9220
9219
 
9221
- const proxy = new Proxy(target, {
9222
- set(obj, prop, value) {
9223
- const oldValue = obj[prop];
9224
- let currentPath = [...path, prop];
9220
+ // const proxy = new Proxy(target, {
9221
+ // set(obj, prop, value) {
9222
+ // const oldValue = obj[prop];
9223
+ // let currentPath = [...path, prop];
9225
9224
 
9226
- // Set the new value
9227
- obj[prop] = value;
9225
+ // // Set the new value
9226
+ // obj[prop] = value;
9228
9227
 
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
- }
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
- // 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
- }
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
- return true;
9248
- },
9246
+ // return true;
9247
+ // },
9249
9248
 
9250
- deleteProperty(obj, prop) {
9251
- const oldValue = obj[prop];
9252
- const currentPath = [...path, prop];
9249
+ // deleteProperty(obj, prop) {
9250
+ // const oldValue = obj[prop];
9251
+ // const currentPath = [...path, prop];
9253
9252
 
9254
- delete obj[prop];
9253
+ // delete obj[prop];
9255
9254
 
9256
- onChange({
9257
- path: currentPath.join('.'),
9258
- oldValue,
9259
- newValue: undefined,
9260
- type: 'delete',
9261
- timestamp: Date.now(),
9262
- });
9255
+ // onChange({
9256
+ // path: currentPath.join('.'),
9257
+ // oldValue,
9258
+ // newValue: undefined,
9259
+ // type: 'delete',
9260
+ // timestamp: Date.now(),
9261
+ // });
9263
9262
 
9264
- return true;
9265
- },
9266
- });
9263
+ // return true;
9264
+ // },
9265
+ // });
9267
9266
 
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
- }
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
- watchers.set(target, proxy);
9276
- return proxy;
9277
- }
9274
+ // watchers.set(target, proxy);
9275
+ // return proxy;
9276
+ // }
9278
9277
 
9279
- return createProxy(obj);
9280
- }
9278
+ // return createProxy(obj);
9279
+ // }
9281
9280
 
9282
- let _ds = _session.DS_GLB[dsSessionP];
9281
+ // let _ds = _session.DS_GLB[dsSessionP];
9283
9282
 
9284
- // const watchedDs = createWatchedObject({ _ref: _ds }, async (change) => {
9285
- // // console.log('Change detected:', change);
9286
- // const { path, newValue, oldValue } = change;
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
- 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
- },
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
- // 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
- },
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
- // 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
- }
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
- let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
9325
+ // let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
9327
9326
 
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
- }
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
- SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
9333
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
9335
9334
 
9336
- return ret;
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
- return;
20277
- if (!change.path.includes('data_system.SYS_GLOBAL_OBJ_REFS')) return;
20278
- const ref_id = change.path.split('SYS_GLOBAL_OBJ_REFS.')[1].split('.')[0];
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
- let ret;
9211
- const _session = SESSION_OBJ[SESSION_ID];
9212
- let _ds_0 = _session.DS_GLB[0];
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
- function createWatchedObject(obj, onChange) {
9215
- const watchers = new WeakMap();
9213
+ // function createWatchedObject(obj, onChange) {
9214
+ // const watchers = new WeakMap();
9216
9215
 
9217
- function createProxy(target, path = []) {
9218
- if (watchers.has(target)) {
9219
- return watchers.get(target);
9220
- }
9216
+ // function createProxy(target, path = []) {
9217
+ // if (watchers.has(target)) {
9218
+ // return watchers.get(target);
9219
+ // }
9221
9220
 
9222
- const proxy = new Proxy(target, {
9223
- set(obj, prop, value) {
9224
- const oldValue = obj[prop];
9225
- let currentPath = [...path, prop];
9221
+ // const proxy = new Proxy(target, {
9222
+ // set(obj, prop, value) {
9223
+ // const oldValue = obj[prop];
9224
+ // let currentPath = [...path, prop];
9226
9225
 
9227
- // Set the new value
9228
- obj[prop] = value;
9226
+ // // Set the new value
9227
+ // obj[prop] = value;
9229
9228
 
9230
- // If the new value is an object, make it observable too
9231
- if (typeof value === 'object' && value !== null) {
9232
- obj[prop] = createProxy(value, currentPath);
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
- // Notify of change
9236
- // if (oldValue !== value) {
9237
- if (!_.isEqual(value, oldValue)) {
9238
- currentPath.shift();
9239
- onChange({
9240
- path: currentPath.join('.'),
9241
- oldValue,
9242
- newValue: value,
9243
- type: 'set',
9244
- timestamp: Date.now(),
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
- return true;
9249
- },
9247
+ // return true;
9248
+ // },
9250
9249
 
9251
- deleteProperty(obj, prop) {
9252
- const oldValue = obj[prop];
9253
- const currentPath = [...path, prop];
9250
+ // deleteProperty(obj, prop) {
9251
+ // const oldValue = obj[prop];
9252
+ // const currentPath = [...path, prop];
9254
9253
 
9255
- delete obj[prop];
9254
+ // delete obj[prop];
9256
9255
 
9257
- onChange({
9258
- path: currentPath.join('.'),
9259
- oldValue,
9260
- newValue: undefined,
9261
- type: 'delete',
9262
- timestamp: Date.now(),
9263
- });
9256
+ // onChange({
9257
+ // path: currentPath.join('.'),
9258
+ // oldValue,
9259
+ // newValue: undefined,
9260
+ // type: 'delete',
9261
+ // timestamp: Date.now(),
9262
+ // });
9264
9263
 
9265
- return true;
9266
- },
9267
- });
9264
+ // return true;
9265
+ // },
9266
+ // });
9268
9267
 
9269
- // Make nested objects observable
9270
- for (const [key, value] of Object.entries(target)) {
9271
- if (typeof value === 'object' && value !== null) {
9272
- target[key] = createProxy(value, [...path, key]);
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
- watchers.set(target, proxy);
9277
- return proxy;
9278
- }
9275
+ // watchers.set(target, proxy);
9276
+ // return proxy;
9277
+ // }
9279
9278
 
9280
- return createProxy(obj);
9281
- }
9279
+ // return createProxy(obj);
9280
+ // }
9282
9281
 
9283
- let _ds = _session.DS_GLB[dsSessionP];
9282
+ // let _ds = _session.DS_GLB[dsSessionP];
9284
9283
 
9285
- // const watchedDs = createWatchedObject({ _ref: _ds }, async (change) => {
9286
- // // console.log('Change detected:', change);
9287
- // const { path, newValue, oldValue } = change;
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
- const createBasicProxy = (target) => {
9292
- return new Proxy(target, {
9293
- // Intercept property access
9294
- get(obj, prop) {
9295
- console.log(`Getting property: ${String(prop)}`);
9296
- return prop in obj ? obj[prop] : `Property ${String(prop)} not found`;
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
- // Intercept property assignment
9300
- set(obj, prop, value) {
9301
- console.log(`Setting property: ${String(prop)} to ${value}`);
9302
- obj[prop] = value;
9303
- return true; // indicates success
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
- // Intercept property deletion
9307
- deleteProperty(obj, prop) {
9308
- console.log(`Deleting property: ${String(prop)}`);
9309
- if (prop in obj) {
9310
- delete obj[prop];
9311
- return true;
9312
- }
9313
- return false;
9314
- },
9315
- });
9316
- };
9317
- const p = createBasicProxy(_ds);
9318
- // let obj = { ds: watchedDs._ref, data: {}, props: _ds.in_parameters || {} };
9319
- let obj = { ds: {}, data: {}, props: _ds.in_parameters || {} };
9320
- try {
9321
- const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
9322
- obj.data = _ds?.data_feed?.rows?.[row_idx];
9323
- } catch (error) {
9324
- // error normal if find_ROWID_idx fail
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
- let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
9326
+ // let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
9328
9327
 
9329
- if ($elm) {
9330
- const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
9331
- obj.attributes = attributes;
9332
- obj.xu_ui_id = $elm.attr('xu-ui-id');
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
- SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
9334
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
9336
9335
 
9337
- return ret;
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
- return;
20278
- if (!change.path.includes('data_system.SYS_GLOBAL_OBJ_REFS')) return;
20279
- const ref_id = change.path.split('SYS_GLOBAL_OBJ_REFS.')[1].split('.')[0];
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