@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.
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -9020,6 +9020,40 @@ func.UI.teleport_garbage_collector = function (SESSION_ID = Object.keys(SESSION_
|
|
|
9020
9020
|
});
|
|
9021
9021
|
};
|
|
9022
9022
|
|
|
9023
|
+
func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_name) {
|
|
9024
|
+
let elm_nodes = [];
|
|
9025
|
+
const iterate_progUi = function (node) {
|
|
9026
|
+
for (let item of node) {
|
|
9027
|
+
if (!tag_name || item.tagName === tag_name) {
|
|
9028
|
+
if (prop) {
|
|
9029
|
+
if (!_.isEmpty(item.attributes)) {
|
|
9030
|
+
for (const [attr, val] of Object.entries(item.attributes)) {
|
|
9031
|
+
if (attr === `xu-exp:${prop}` || attr === prop) {
|
|
9032
|
+
// found = val.includes('@' + field_id);
|
|
9033
|
+
if (val.includes('@' + field_id)) {
|
|
9034
|
+
elm_nodes.push(item);
|
|
9035
|
+
break;
|
|
9036
|
+
}
|
|
9037
|
+
}
|
|
9038
|
+
}
|
|
9039
|
+
}
|
|
9040
|
+
} else {
|
|
9041
|
+
if (tag_name) {
|
|
9042
|
+
elm_nodes.push(item);
|
|
9043
|
+
}
|
|
9044
|
+
}
|
|
9045
|
+
}
|
|
9046
|
+
// if (elm_node) break;
|
|
9047
|
+
|
|
9048
|
+
if (item.children) {
|
|
9049
|
+
iterate_progUi(item.children);
|
|
9050
|
+
}
|
|
9051
|
+
}
|
|
9052
|
+
};
|
|
9053
|
+
iterate_progUi(progUi);
|
|
9054
|
+
return elm_nodes;
|
|
9055
|
+
};
|
|
9056
|
+
|
|
9023
9057
|
func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
9024
9058
|
let ret;
|
|
9025
9059
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
@@ -9095,20 +9129,20 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
|
9095
9129
|
return createProxy(obj);
|
|
9096
9130
|
}
|
|
9097
9131
|
|
|
9098
|
-
const watchedDs = createWatchedObject({ _ref: _ds }, async (change) => {
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
});
|
|
9132
|
+
// const watchedDs = createWatchedObject({ _ref: _ds }, async (change) => {
|
|
9133
|
+
// // console.log('Change detected:', change);
|
|
9134
|
+
// const { path, newValue } = change;
|
|
9135
|
+
// try {
|
|
9136
|
+
// const datasource_changes = {
|
|
9137
|
+
// [dsSessionP]: {
|
|
9138
|
+
// ['datasource_main']: {
|
|
9139
|
+
// watcher: { path, newValue },
|
|
9140
|
+
// },
|
|
9141
|
+
// },
|
|
9142
|
+
// };
|
|
9143
|
+
// await func.datasource.update(SESSION_ID, datasource_changes);
|
|
9144
|
+
// } catch (error) {}
|
|
9145
|
+
// });
|
|
9112
9146
|
|
|
9113
9147
|
//////////////
|
|
9114
9148
|
|
|
@@ -9137,40 +9171,6 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
|
9137
9171
|
|
|
9138
9172
|
return ret;
|
|
9139
9173
|
};
|
|
9140
|
-
|
|
9141
|
-
func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_name) {
|
|
9142
|
-
let elm_nodes = [];
|
|
9143
|
-
const iterate_progUi = function (node) {
|
|
9144
|
-
for (let item of node) {
|
|
9145
|
-
if (!tag_name || item.tagName === tag_name) {
|
|
9146
|
-
if (prop) {
|
|
9147
|
-
if (!_.isEmpty(item.attributes)) {
|
|
9148
|
-
for (const [attr, val] of Object.entries(item.attributes)) {
|
|
9149
|
-
if (attr === `xu-exp:${prop}` || attr === prop) {
|
|
9150
|
-
// found = val.includes('@' + field_id);
|
|
9151
|
-
if (val.includes('@' + field_id)) {
|
|
9152
|
-
elm_nodes.push(item);
|
|
9153
|
-
break;
|
|
9154
|
-
}
|
|
9155
|
-
}
|
|
9156
|
-
}
|
|
9157
|
-
}
|
|
9158
|
-
} else {
|
|
9159
|
-
if (tag_name) {
|
|
9160
|
-
elm_nodes.push(item);
|
|
9161
|
-
}
|
|
9162
|
-
}
|
|
9163
|
-
}
|
|
9164
|
-
// if (elm_node) break;
|
|
9165
|
-
|
|
9166
|
-
if (item.children) {
|
|
9167
|
-
iterate_progUi(item.children);
|
|
9168
|
-
}
|
|
9169
|
-
}
|
|
9170
|
-
};
|
|
9171
|
-
iterate_progUi(progUi);
|
|
9172
|
-
return elm_nodes;
|
|
9173
|
-
};
|
|
9174
9174
|
func.events = {};
|
|
9175
9175
|
func.events.validate = async function (SESSION_ID, triggerP, dsSessionP, eventIdP, sourceP, argumentsP, return_validation_onlyP) {
|
|
9176
9176
|
var _session = SESSION_OBJ[SESSION_ID];
|
|
@@ -9021,6 +9021,40 @@ func.UI.teleport_garbage_collector = function (SESSION_ID = Object.keys(SESSION_
|
|
|
9021
9021
|
});
|
|
9022
9022
|
};
|
|
9023
9023
|
|
|
9024
|
+
func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_name) {
|
|
9025
|
+
let elm_nodes = [];
|
|
9026
|
+
const iterate_progUi = function (node) {
|
|
9027
|
+
for (let item of node) {
|
|
9028
|
+
if (!tag_name || item.tagName === tag_name) {
|
|
9029
|
+
if (prop) {
|
|
9030
|
+
if (!_.isEmpty(item.attributes)) {
|
|
9031
|
+
for (const [attr, val] of Object.entries(item.attributes)) {
|
|
9032
|
+
if (attr === `xu-exp:${prop}` || attr === prop) {
|
|
9033
|
+
// found = val.includes('@' + field_id);
|
|
9034
|
+
if (val.includes('@' + field_id)) {
|
|
9035
|
+
elm_nodes.push(item);
|
|
9036
|
+
break;
|
|
9037
|
+
}
|
|
9038
|
+
}
|
|
9039
|
+
}
|
|
9040
|
+
}
|
|
9041
|
+
} else {
|
|
9042
|
+
if (tag_name) {
|
|
9043
|
+
elm_nodes.push(item);
|
|
9044
|
+
}
|
|
9045
|
+
}
|
|
9046
|
+
}
|
|
9047
|
+
// if (elm_node) break;
|
|
9048
|
+
|
|
9049
|
+
if (item.children) {
|
|
9050
|
+
iterate_progUi(item.children);
|
|
9051
|
+
}
|
|
9052
|
+
}
|
|
9053
|
+
};
|
|
9054
|
+
iterate_progUi(progUi);
|
|
9055
|
+
return elm_nodes;
|
|
9056
|
+
};
|
|
9057
|
+
|
|
9024
9058
|
func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
9025
9059
|
let ret;
|
|
9026
9060
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
@@ -9096,20 +9130,20 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
|
9096
9130
|
return createProxy(obj);
|
|
9097
9131
|
}
|
|
9098
9132
|
|
|
9099
|
-
const watchedDs = createWatchedObject({ _ref: _ds }, async (change) => {
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
});
|
|
9133
|
+
// const watchedDs = createWatchedObject({ _ref: _ds }, async (change) => {
|
|
9134
|
+
// // console.log('Change detected:', change);
|
|
9135
|
+
// const { path, newValue } = change;
|
|
9136
|
+
// try {
|
|
9137
|
+
// const datasource_changes = {
|
|
9138
|
+
// [dsSessionP]: {
|
|
9139
|
+
// ['datasource_main']: {
|
|
9140
|
+
// watcher: { path, newValue },
|
|
9141
|
+
// },
|
|
9142
|
+
// },
|
|
9143
|
+
// };
|
|
9144
|
+
// await func.datasource.update(SESSION_ID, datasource_changes);
|
|
9145
|
+
// } catch (error) {}
|
|
9146
|
+
// });
|
|
9113
9147
|
|
|
9114
9148
|
//////////////
|
|
9115
9149
|
|
|
@@ -9138,40 +9172,6 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
|
9138
9172
|
|
|
9139
9173
|
return ret;
|
|
9140
9174
|
};
|
|
9141
|
-
|
|
9142
|
-
func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_name) {
|
|
9143
|
-
let elm_nodes = [];
|
|
9144
|
-
const iterate_progUi = function (node) {
|
|
9145
|
-
for (let item of node) {
|
|
9146
|
-
if (!tag_name || item.tagName === tag_name) {
|
|
9147
|
-
if (prop) {
|
|
9148
|
-
if (!_.isEmpty(item.attributes)) {
|
|
9149
|
-
for (const [attr, val] of Object.entries(item.attributes)) {
|
|
9150
|
-
if (attr === `xu-exp:${prop}` || attr === prop) {
|
|
9151
|
-
// found = val.includes('@' + field_id);
|
|
9152
|
-
if (val.includes('@' + field_id)) {
|
|
9153
|
-
elm_nodes.push(item);
|
|
9154
|
-
break;
|
|
9155
|
-
}
|
|
9156
|
-
}
|
|
9157
|
-
}
|
|
9158
|
-
}
|
|
9159
|
-
} else {
|
|
9160
|
-
if (tag_name) {
|
|
9161
|
-
elm_nodes.push(item);
|
|
9162
|
-
}
|
|
9163
|
-
}
|
|
9164
|
-
}
|
|
9165
|
-
// if (elm_node) break;
|
|
9166
|
-
|
|
9167
|
-
if (item.children) {
|
|
9168
|
-
iterate_progUi(item.children);
|
|
9169
|
-
}
|
|
9170
|
-
}
|
|
9171
|
-
};
|
|
9172
|
-
iterate_progUi(progUi);
|
|
9173
|
-
return elm_nodes;
|
|
9174
|
-
};
|
|
9175
9175
|
func.UI.screen = {};
|
|
9176
9176
|
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) {
|
|
9177
9177
|
if (!prog_id) return console.error('program is empty');
|