@xuda.io/runtime-bundle 1.0.339 → 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.
- package/js/modules/xuda-system-globals-module.min.mjs +1 -1
- package/js/modules/xuda-system-globals-module.mjs +254 -270
- package/js/xuda-runtime-bundle.js +26 -42
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +26 -42
- package/js/xuda-runtime-slim.min.es.js +26 -42
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +18 -14
- package/js/xuda-worker-bundle.js +18 -14
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -3552,6 +3552,7 @@ func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, pa
|
|
|
3552
3552
|
_ds.data_system['SYS_GLOBAL_OBJ_FIREBASE_AUTH_INFO'] = _session.SYS_GLOBAL_OBJ_FIREBASE_AUTH_INFO;
|
|
3553
3553
|
|
|
3554
3554
|
_ds.data_system['SYS_GLOBAL_OBJ_CLIENT_INFO'] = _session.SYS_GLOBAL_OBJ_CLIENT_INFO;
|
|
3555
|
+
_ds.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
|
|
3555
3556
|
};
|
|
3556
3557
|
if (!SESSION_OBJ[SESSION_ID].DS_GLB) return;
|
|
3557
3558
|
|
|
@@ -5135,8 +5136,9 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
5135
5136
|
continue;
|
|
5136
5137
|
}
|
|
5137
5138
|
|
|
5138
|
-
try {
|
|
5139
|
-
|
|
5139
|
+
// try {
|
|
5140
|
+
const row_idx = func.common.find_ROWID_idx(_ds, record_id);
|
|
5141
|
+
if (_ds.data_feed.rows[row_idx][field_id] !== value) {
|
|
5140
5142
|
_ds.data_feed.rows[row_idx][field_id] = value;
|
|
5141
5143
|
await set_fieldComputed_dependencies(dataSource, field_id, null);
|
|
5142
5144
|
|
|
@@ -5170,21 +5172,23 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
5170
5172
|
}
|
|
5171
5173
|
}
|
|
5172
5174
|
}
|
|
5173
|
-
} catch (err) {
|
|
5174
|
-
console.error(err);
|
|
5175
|
-
}
|
|
5176
5175
|
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
if (!datasource_changed.includes(dataSource)) {
|
|
5181
|
-
datasource_changed.push(dataSource);
|
|
5182
|
-
}
|
|
5176
|
+
// } catch (err) {
|
|
5177
|
+
// console.error(err);
|
|
5178
|
+
// }
|
|
5183
5179
|
|
|
5184
|
-
|
|
5185
|
-
|
|
5180
|
+
if (!fields_changed.includes(field_id)) {
|
|
5181
|
+
fields_changed.push(field_id);
|
|
5182
|
+
}
|
|
5183
|
+
if (!datasource_changed.includes(dataSource)) {
|
|
5184
|
+
datasource_changed.push(dataSource);
|
|
5185
|
+
}
|
|
5186
|
+
|
|
5187
|
+
if (!_ds.data_feed.rows_changed) {
|
|
5188
|
+
_ds.data_feed.rows_changed = [];
|
|
5189
|
+
}
|
|
5190
|
+
if (!_ds.data_feed.rows_changed.includes(record_id)) _ds.data_feed.rows_changed.push(record_id);
|
|
5186
5191
|
}
|
|
5187
|
-
if (!_ds.data_feed.rows_changed.includes(record_id)) _ds.data_feed.rows_changed.push(record_id);
|
|
5188
5192
|
} else if (fields_data === 'set') {
|
|
5189
5193
|
_ds.currentRecordId = record_id;
|
|
5190
5194
|
}
|
|
@@ -11863,34 +11867,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11863
11867
|
return found;
|
|
11864
11868
|
};
|
|
11865
11869
|
|
|
11866
|
-
// // set panels_obj
|
|
11867
|
-
// for await (const [elem_key, elem_val] of Object.entries($elm)) {
|
|
11868
|
-
// if (elem_key === "length") break;
|
|
11869
|
-
// var $div = $(elem_val);
|
|
11870
|
-
// let xuData = $div.data().xuData;
|
|
11871
|
-
|
|
11872
|
-
// if (!$div.data().xuPanelData) continue;
|
|
11873
|
-
|
|
11874
|
-
// let dsSession = xuData.paramsP.dsSessionP;
|
|
11875
|
-
// var _session = SESSION_OBJ[SESSION_ID];
|
|
11876
|
-
// let _ds = _session?.DS_GLB[dsSession];
|
|
11877
|
-
// if (!_ds) continue;
|
|
11878
|
-
|
|
11879
|
-
// if (_ds.tree_obj.disableAutoRefresh) {
|
|
11880
|
-
// continue;
|
|
11881
|
-
// }
|
|
11882
|
-
|
|
11883
|
-
// const parent_element_ui_id = $div.data().xuPanelData.parent_element_ui_id;
|
|
11884
|
-
// if (!panels_obj[parent_element_ui_id]) {
|
|
11885
|
-
// panels_obj[parent_element_ui_id] = {
|
|
11886
|
-
// _ds,
|
|
11887
|
-
// $div,
|
|
11888
|
-
// ids: [],
|
|
11889
|
-
// };
|
|
11890
|
-
// }
|
|
11891
|
-
// panels_obj[parent_element_ui_id].ids.push($div.attr("xu-ui-id"));
|
|
11892
|
-
// }
|
|
11893
|
-
|
|
11894
11870
|
for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
|
|
11895
11871
|
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
|
|
11896
11872
|
const progDataSource_str = JSON.stringify(prog_doc.progDataSource);
|
|
@@ -12222,6 +12198,14 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12222
12198
|
|
|
12223
12199
|
const common_fx = {
|
|
12224
12200
|
'xu-ref': async function ($elm, val) {
|
|
12201
|
+
console.log('xu-ref', $elm, val);
|
|
12202
|
+
let _ds_0 = _session.DS_GLB[0];
|
|
12203
|
+
if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS']) {
|
|
12204
|
+
_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
|
|
12205
|
+
}
|
|
12206
|
+
// if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val]) {
|
|
12207
|
+
_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val] = { $el: $elm };
|
|
12208
|
+
// }
|
|
12225
12209
|
return {};
|
|
12226
12210
|
},
|
|
12227
12211
|
'xu-bind': async function ($elm, val) {
|
|
@@ -3553,6 +3553,7 @@ func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, pa
|
|
|
3553
3553
|
_ds.data_system['SYS_GLOBAL_OBJ_FIREBASE_AUTH_INFO'] = _session.SYS_GLOBAL_OBJ_FIREBASE_AUTH_INFO;
|
|
3554
3554
|
|
|
3555
3555
|
_ds.data_system['SYS_GLOBAL_OBJ_CLIENT_INFO'] = _session.SYS_GLOBAL_OBJ_CLIENT_INFO;
|
|
3556
|
+
_ds.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
|
|
3556
3557
|
};
|
|
3557
3558
|
if (!SESSION_OBJ[SESSION_ID].DS_GLB) return;
|
|
3558
3559
|
|
|
@@ -5136,8 +5137,9 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
5136
5137
|
continue;
|
|
5137
5138
|
}
|
|
5138
5139
|
|
|
5139
|
-
try {
|
|
5140
|
-
|
|
5140
|
+
// try {
|
|
5141
|
+
const row_idx = func.common.find_ROWID_idx(_ds, record_id);
|
|
5142
|
+
if (_ds.data_feed.rows[row_idx][field_id] !== value) {
|
|
5141
5143
|
_ds.data_feed.rows[row_idx][field_id] = value;
|
|
5142
5144
|
await set_fieldComputed_dependencies(dataSource, field_id, null);
|
|
5143
5145
|
|
|
@@ -5171,21 +5173,23 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
5171
5173
|
}
|
|
5172
5174
|
}
|
|
5173
5175
|
}
|
|
5174
|
-
} catch (err) {
|
|
5175
|
-
console.error(err);
|
|
5176
|
-
}
|
|
5177
5176
|
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
if (!datasource_changed.includes(dataSource)) {
|
|
5182
|
-
datasource_changed.push(dataSource);
|
|
5183
|
-
}
|
|
5177
|
+
// } catch (err) {
|
|
5178
|
+
// console.error(err);
|
|
5179
|
+
// }
|
|
5184
5180
|
|
|
5185
|
-
|
|
5186
|
-
|
|
5181
|
+
if (!fields_changed.includes(field_id)) {
|
|
5182
|
+
fields_changed.push(field_id);
|
|
5183
|
+
}
|
|
5184
|
+
if (!datasource_changed.includes(dataSource)) {
|
|
5185
|
+
datasource_changed.push(dataSource);
|
|
5186
|
+
}
|
|
5187
|
+
|
|
5188
|
+
if (!_ds.data_feed.rows_changed) {
|
|
5189
|
+
_ds.data_feed.rows_changed = [];
|
|
5190
|
+
}
|
|
5191
|
+
if (!_ds.data_feed.rows_changed.includes(record_id)) _ds.data_feed.rows_changed.push(record_id);
|
|
5187
5192
|
}
|
|
5188
|
-
if (!_ds.data_feed.rows_changed.includes(record_id)) _ds.data_feed.rows_changed.push(record_id);
|
|
5189
5193
|
} else if (fields_data === 'set') {
|
|
5190
5194
|
_ds.currentRecordId = record_id;
|
|
5191
5195
|
}
|
|
@@ -9929,34 +9933,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9929
9933
|
return found;
|
|
9930
9934
|
};
|
|
9931
9935
|
|
|
9932
|
-
// // set panels_obj
|
|
9933
|
-
// for await (const [elem_key, elem_val] of Object.entries($elm)) {
|
|
9934
|
-
// if (elem_key === "length") break;
|
|
9935
|
-
// var $div = $(elem_val);
|
|
9936
|
-
// let xuData = $div.data().xuData;
|
|
9937
|
-
|
|
9938
|
-
// if (!$div.data().xuPanelData) continue;
|
|
9939
|
-
|
|
9940
|
-
// let dsSession = xuData.paramsP.dsSessionP;
|
|
9941
|
-
// var _session = SESSION_OBJ[SESSION_ID];
|
|
9942
|
-
// let _ds = _session?.DS_GLB[dsSession];
|
|
9943
|
-
// if (!_ds) continue;
|
|
9944
|
-
|
|
9945
|
-
// if (_ds.tree_obj.disableAutoRefresh) {
|
|
9946
|
-
// continue;
|
|
9947
|
-
// }
|
|
9948
|
-
|
|
9949
|
-
// const parent_element_ui_id = $div.data().xuPanelData.parent_element_ui_id;
|
|
9950
|
-
// if (!panels_obj[parent_element_ui_id]) {
|
|
9951
|
-
// panels_obj[parent_element_ui_id] = {
|
|
9952
|
-
// _ds,
|
|
9953
|
-
// $div,
|
|
9954
|
-
// ids: [],
|
|
9955
|
-
// };
|
|
9956
|
-
// }
|
|
9957
|
-
// panels_obj[parent_element_ui_id].ids.push($div.attr("xu-ui-id"));
|
|
9958
|
-
// }
|
|
9959
|
-
|
|
9960
9936
|
for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
|
|
9961
9937
|
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
|
|
9962
9938
|
const progDataSource_str = JSON.stringify(prog_doc.progDataSource);
|
|
@@ -10288,6 +10264,14 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10288
10264
|
|
|
10289
10265
|
const common_fx = {
|
|
10290
10266
|
'xu-ref': async function ($elm, val) {
|
|
10267
|
+
console.log('xu-ref', $elm, val);
|
|
10268
|
+
let _ds_0 = _session.DS_GLB[0];
|
|
10269
|
+
if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS']) {
|
|
10270
|
+
_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
|
|
10271
|
+
}
|
|
10272
|
+
// if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val]) {
|
|
10273
|
+
_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val] = { $el: $elm };
|
|
10274
|
+
// }
|
|
10291
10275
|
return {};
|
|
10292
10276
|
},
|
|
10293
10277
|
'xu-bind': async function ($elm, val) {
|