@xuda.io/runtime-bundle 1.0.1311 → 1.0.1313

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.
@@ -9050,8 +9050,9 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
9050
9050
 
9051
9051
  // Notify of change
9052
9052
  if (oldValue !== value) {
9053
+ let cleanPath = currentPath.shift();
9053
9054
  onChange({
9054
- path: currentPath.join('.'),
9055
+ path: cleanPath.join('.'),
9055
9056
  oldValue,
9056
9057
  newValue: value,
9057
9058
  type: 'set',
@@ -9091,10 +9092,10 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
9091
9092
  return proxy;
9092
9093
  }
9093
9094
 
9094
- return createProxy({ _ref: obj });
9095
+ return createProxy(obj);
9095
9096
  }
9096
9097
 
9097
- const watchedUser = createWatchedObject(_ds, async (change) => {
9098
+ const watchedDs = createWatchedObject({ _ref: _ds }, async (change) => {
9098
9099
  // console.log('Change detected:', change);
9099
9100
  const { path, newValue } = change;
9100
9101
  try {
@@ -9111,7 +9112,7 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
9111
9112
 
9112
9113
  //////////////
9113
9114
 
9114
- let obj = { ds: _ds, data: {}, props: _ds.in_parameters || {}, watcher: watchedUser };
9115
+ let obj = { ds: watchedDs._ref, data: {}, props: _ds.in_parameters || {} };
9115
9116
  try {
9116
9117
  const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
9117
9118
  obj.data = _ds?.data_feed?.rows?.[row_idx];
@@ -9051,8 +9051,9 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
9051
9051
 
9052
9052
  // Notify of change
9053
9053
  if (oldValue !== value) {
9054
+ let cleanPath = currentPath.shift();
9054
9055
  onChange({
9055
- path: currentPath.join('.'),
9056
+ path: cleanPath.join('.'),
9056
9057
  oldValue,
9057
9058
  newValue: value,
9058
9059
  type: 'set',
@@ -9092,10 +9093,10 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
9092
9093
  return proxy;
9093
9094
  }
9094
9095
 
9095
- return createProxy({ _ref: obj });
9096
+ return createProxy(obj);
9096
9097
  }
9097
9098
 
9098
- const watchedUser = createWatchedObject(_ds, async (change) => {
9099
+ const watchedDs = createWatchedObject({ _ref: _ds }, async (change) => {
9099
9100
  // console.log('Change detected:', change);
9100
9101
  const { path, newValue } = change;
9101
9102
  try {
@@ -9112,7 +9113,7 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
9112
9113
 
9113
9114
  //////////////
9114
9115
 
9115
- let obj = { ds: _ds, data: {}, props: _ds.in_parameters || {}, watcher: watchedUser };
9116
+ let obj = { ds: watchedDs._ref, data: {}, props: _ds.in_parameters || {} };
9116
9117
  try {
9117
9118
  const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
9118
9119
  obj.data = _ds?.data_feed?.rows?.[row_idx];