@xuda.io/runtime-bundle 1.0.1318 → 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
- // console.log('Change detected:', change);
28231
- const { path, newValue } = change;
28232
- try {
28233
- const datasource_changes = {
28234
- [dsSessionP]: {
28235
- ['datasource_main']: {
28236
- watcher: { path, newValue },
28237
- },
28238
- },
28239
- };
28240
- await func.datasource.update(SESSION_ID, datasource_changes);
28241
- } catch (error) {}
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,