@xuda.io/runtime-bundle 1.0.340 → 1.0.341

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.
@@ -28805,6 +28805,7 @@ func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, pa
28805
28805
  _ds.data_system['SYS_GLOBAL_OBJ_FIREBASE_AUTH_INFO'] = _session.SYS_GLOBAL_OBJ_FIREBASE_AUTH_INFO;
28806
28806
 
28807
28807
  _ds.data_system['SYS_GLOBAL_OBJ_CLIENT_INFO'] = _session.SYS_GLOBAL_OBJ_CLIENT_INFO;
28808
+ _ds.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
28808
28809
  };
28809
28810
  if (!SESSION_OBJ[SESSION_ID].DS_GLB) return;
28810
28811
 
@@ -30388,8 +30389,9 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
30388
30389
  continue;
30389
30390
  }
30390
30391
 
30391
- try {
30392
- const row_idx = func.common.find_ROWID_idx(_ds, record_id);
30392
+ // try {
30393
+ const row_idx = func.common.find_ROWID_idx(_ds, record_id);
30394
+ if (_ds.data_feed.rows[row_idx][field_id] !== value) {
30393
30395
  _ds.data_feed.rows[row_idx][field_id] = value;
30394
30396
  await set_fieldComputed_dependencies(dataSource, field_id, null);
30395
30397
 
@@ -30423,21 +30425,23 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
30423
30425
  }
30424
30426
  }
30425
30427
  }
30426
- } catch (err) {
30427
- console.error(err);
30428
- }
30429
30428
 
30430
- if (!fields_changed.includes(field_id)) {
30431
- fields_changed.push(field_id);
30432
- }
30433
- if (!datasource_changed.includes(dataSource)) {
30434
- datasource_changed.push(dataSource);
30435
- }
30429
+ // } catch (err) {
30430
+ // console.error(err);
30431
+ // }
30436
30432
 
30437
- if (!_ds.data_feed.rows_changed) {
30438
- _ds.data_feed.rows_changed = [];
30433
+ if (!fields_changed.includes(field_id)) {
30434
+ fields_changed.push(field_id);
30435
+ }
30436
+ if (!datasource_changed.includes(dataSource)) {
30437
+ datasource_changed.push(dataSource);
30438
+ }
30439
+
30440
+ if (!_ds.data_feed.rows_changed) {
30441
+ _ds.data_feed.rows_changed = [];
30442
+ }
30443
+ if (!_ds.data_feed.rows_changed.includes(record_id)) _ds.data_feed.rows_changed.push(record_id);
30439
30444
  }
30440
- if (!_ds.data_feed.rows_changed.includes(record_id)) _ds.data_feed.rows_changed.push(record_id);
30441
30445
  } else if (fields_data === 'set') {
30442
30446
  _ds.currentRecordId = record_id;
30443
30447
  }
@@ -32220,6 +32224,13 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
32220
32224
  const common_fx = {
32221
32225
  'xu-ref': async function ($elm, val) {
32222
32226
  console.log('xu-ref', $elm, val);
32227
+ let _ds_0 = _session.DS_GLB[0];
32228
+ if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS']) {
32229
+ _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
32230
+ }
32231
+ // if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val]) {
32232
+ _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val] = { $el: $elm };
32233
+ // }
32223
32234
  return {};
32224
32235
  },
32225
32236
  'xu-bind': async function ($elm, val) {