@xuda.io/xuda-worker-bundle-min 1.3.2440 → 1.3.2441
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/index.js +12 -13
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -817,11 +817,10 @@ func.runtime.bind.toggle_array_value = function (arr_value_before_cast, value_fr
|
|
|
817
817
|
};
|
|
818
818
|
func.runtime.bind.get_cast_value = async function (SESSION_ID, field_prop, input_field_type, raw_value) {
|
|
819
819
|
const field_type = func.runtime.bind.get_field_type(field_prop);
|
|
820
|
-
var value = await func.common.get_cast_val(SESSION_ID, 'xu-bind', 'value', field_type, raw_value);
|
|
821
820
|
if (field_type === 'object') {
|
|
822
|
-
|
|
821
|
+
return await func.common.get_cast_val(SESSION_ID, 'xu-bind', 'value', input_field_type, raw_value);
|
|
823
822
|
}
|
|
824
|
-
return value;
|
|
823
|
+
return await func.common.get_cast_val(SESSION_ID, 'xu-bind', 'value', field_type, raw_value);
|
|
825
824
|
};
|
|
826
825
|
func.runtime.bind.get_source_value = function (_ds, bind_field_id, is_dynamic_field) {
|
|
827
826
|
if (is_dynamic_field) {
|
|
@@ -858,7 +857,7 @@ func.runtime.bind.update_reference_source_array = async function (options) {
|
|
|
858
857
|
|
|
859
858
|
const arr_idx = Number(options.iterate_info._key);
|
|
860
859
|
const dataset_arr = await func.datasource.get_value(options.SESSION_ID, reference_source_obj.fieldIdP, options.dsSessionP, reference_source_obj.currentRecordId);
|
|
861
|
-
let new_arr =
|
|
860
|
+
let new_arr = structuredClone(dataset_arr.ret.value);
|
|
862
861
|
|
|
863
862
|
if (field_type === 'object' && options.val_is_reference_field) {
|
|
864
863
|
let obj_item = new_arr[arr_idx];
|
|
@@ -924,7 +923,7 @@ func.runtime.resources.load_plugin_runtime_css = async function (SESSION_ID, plu
|
|
|
924
923
|
return true;
|
|
925
924
|
};
|
|
926
925
|
func.runtime.resources.resolve_plugin_properties = async function (SESSION_ID, dsSessionP, attributes, properties) {
|
|
927
|
-
let resolved_properties =
|
|
926
|
+
let resolved_properties = structuredClone(properties);
|
|
928
927
|
for await (let [prop_name, prop_val] of Object.entries(resolved_properties || {})) {
|
|
929
928
|
prop_val.value = attributes?.[prop_name];
|
|
930
929
|
if (attributes?.[`xu-exp:${prop_name}`]) {
|
|
@@ -1347,7 +1346,7 @@ func.common.db = async function (SESSION_ID, serviceP, dataP, opt = {}, dsSessio
|
|
|
1347
1346
|
}
|
|
1348
1347
|
|
|
1349
1348
|
await db.get(row_id);
|
|
1350
|
-
let _data =
|
|
1349
|
+
let _data = structuredClone(dataP);
|
|
1351
1350
|
_data.ids = [row_id];
|
|
1352
1351
|
return await func.db.pouch['dbs_delete'](SESSION_ID, _data);
|
|
1353
1352
|
} catch (err) {
|
|
@@ -2588,7 +2587,7 @@ func.runtime.ui.get_node_snapshot = function (nodeP) {
|
|
|
2588
2587
|
if (func.runtime.ui.node_snapshot_cache.has(nodeP)) {
|
|
2589
2588
|
return func.runtime.ui.node_snapshot_cache.get(nodeP);
|
|
2590
2589
|
}
|
|
2591
|
-
const snapshot =
|
|
2590
|
+
const snapshot = structuredClone(nodeP);
|
|
2592
2591
|
func.runtime.ui.node_snapshot_cache.set(nodeP, snapshot);
|
|
2593
2592
|
return snapshot;
|
|
2594
2593
|
};
|
|
@@ -2694,7 +2693,7 @@ func.runtime.ui.generate_xu_ui_id = async function (SESSION_ID, nodeP, $containe
|
|
|
2694
2693
|
return hashed_ui_id;
|
|
2695
2694
|
};
|
|
2696
2695
|
func.runtime.ui.create_container = async function (options) {
|
|
2697
|
-
const _paramsP =
|
|
2696
|
+
const _paramsP = structuredClone(options.paramsP);
|
|
2698
2697
|
const _ds = SESSION_OBJ[options.SESSION_ID].DS_GLB[_paramsP.dsSessionP];
|
|
2699
2698
|
const $appendTo = func.runtime.ui.get_append_target(options.$container, options.$appendToP);
|
|
2700
2699
|
if (!$appendTo) return null;
|
|
@@ -3132,7 +3131,7 @@ func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, pa
|
|
|
3132
3131
|
_ds.data_feed = {};
|
|
3133
3132
|
|
|
3134
3133
|
// _ds.v.old_dataSource = _.cloneDeep(_ds);
|
|
3135
|
-
_ds.v.old_dataSource =
|
|
3134
|
+
_ds.v.old_dataSource = structuredClone(_ds);
|
|
3136
3135
|
} catch (err) {
|
|
3137
3136
|
console.error('function: init_existing_dataSource - error');
|
|
3138
3137
|
return;
|
|
@@ -4703,7 +4702,7 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
4703
4702
|
|
|
4704
4703
|
await func.runtime.ui.refresh_screen({
|
|
4705
4704
|
SESSION_ID,
|
|
4706
|
-
fields_changed_arr:
|
|
4705
|
+
fields_changed_arr: structuredClone(fields_changed),
|
|
4707
4706
|
datasource_changed: datasource_changed[0],
|
|
4708
4707
|
fields_changed_datasource: datasource_changed[0],
|
|
4709
4708
|
watcher: value,
|
|
@@ -4818,7 +4817,7 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
4818
4817
|
// await func.UI.screen.refresh_xu_attributes(SESSION_ID, _.cloneDeep(fields_changed), null, null, findMin(datasource_changed), avoid_xu_for_refresh, trigger);
|
|
4819
4818
|
await func.runtime.ui.refresh_xu_attributes({
|
|
4820
4819
|
SESSION_ID,
|
|
4821
|
-
fields_arr:
|
|
4820
|
+
fields_arr: structuredClone(fields_changed),
|
|
4822
4821
|
jobNoP: null,
|
|
4823
4822
|
$elm_to_search: null,
|
|
4824
4823
|
dsSession_changed: findMin(datasource_changed),
|
|
@@ -4829,7 +4828,7 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
4829
4828
|
// await removed from the below function cause to dead lock Mar 3 25
|
|
4830
4829
|
await func.runtime.ui.refresh_screen({
|
|
4831
4830
|
SESSION_ID,
|
|
4832
|
-
fields_changed_arr:
|
|
4831
|
+
fields_changed_arr: structuredClone(fields_changed),
|
|
4833
4832
|
datasource_changed: null,
|
|
4834
4833
|
fields_changed_datasource: datasource_changed[0],
|
|
4835
4834
|
});
|
|
@@ -5479,7 +5478,7 @@ func.datasource.set_VIEW_data = async function (SESSION_ID, args, _ds) {
|
|
|
5479
5478
|
};
|
|
5480
5479
|
_ds.viewEventExec_arr = {};
|
|
5481
5480
|
|
|
5482
|
-
var view =
|
|
5481
|
+
var view = structuredClone(await func.utils.VIEWS_OBJ.get(SESSION_ID, args.prog_id));
|
|
5483
5482
|
// var view = klona.klona(await func.utils.VIEWS_OBJ.get(SESSION_ID, args.prog_id));
|
|
5484
5483
|
|
|
5485
5484
|
_ds.v.dataSourceSrcType = view.dataSourceSrcType;
|