@xuda.io/xuda-worker-bundle-min 1.3.522 → 1.3.523
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 +54 -55
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2984,15 +2984,14 @@ func.datasource.run_rows_form = async function (
|
|
|
2984
2984
|
true,
|
|
2985
2985
|
pre_init_fieldsP
|
|
2986
2986
|
);
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
) {
|
|
2987
|
+
const init_count = await func.datasource.get_field_init_count(
|
|
2988
|
+
SESSION_ID,
|
|
2989
|
+
dataSourceSession,
|
|
2990
|
+
idx,
|
|
2991
|
+
false,
|
|
2992
|
+
_ds.oninit_triggers_to_run
|
|
2993
|
+
);
|
|
2994
|
+
if (init_count > 0) {
|
|
2996
2995
|
await func.datasource.execute_field_init_events(
|
|
2997
2996
|
SESSION_ID,
|
|
2998
2997
|
dataSourceSession,
|
|
@@ -3095,58 +3094,58 @@ func.datasource.get_field_init_count = async function (
|
|
|
3095
3094
|
|
|
3096
3095
|
_ds.dataSource_init_arr[rowIdP] = {};
|
|
3097
3096
|
var ret = 0;
|
|
3098
|
-
if (_ds.v.ViewFieldsObjs) {
|
|
3099
|
-
|
|
3100
|
-
|
|
3097
|
+
// if (_ds.v.ViewFieldsObjs) {
|
|
3098
|
+
for await (const field_obj of _view_obj.progFields) {
|
|
3099
|
+
var fieldId = field_obj.data.field_id;
|
|
3101
3100
|
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3101
|
+
if (!field_obj.triggers) {
|
|
3102
|
+
continue;
|
|
3103
|
+
}
|
|
3104
|
+
for await (const trigger_obj of field_obj.triggers) {
|
|
3105
|
+
if (!oninit_triggers_to_runP?.includes(trigger_obj.id)) continue;
|
|
3106
|
+
if (
|
|
3107
|
+
trigger_obj.data.trigger === "oninit" &&
|
|
3108
|
+
["get_data", "set_data", "batch", "update", "raise_event"].includes(
|
|
3109
|
+
trigger_obj.data.action
|
|
3110
|
+
)
|
|
3111
|
+
) {
|
|
3112
|
+
if (!trigger_obj.data.action) {
|
|
3113
|
+
func.utils.debug_report(
|
|
3114
|
+
SESSION_ID,
|
|
3115
|
+
"_ds.get_field_init_count",
|
|
3116
|
+
`Error initiating event for field: ${fieldId} prog: ${_ds.v.viewSourceDesc} row: ${rowIdP} reason: missing action`,
|
|
3117
|
+
"E"
|
|
3118
|
+
);
|
|
3119
|
+
break;
|
|
3120
|
+
}
|
|
3122
3121
|
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
}
|
|
3122
|
+
if (trigger_obj.data.enabled) {
|
|
3123
|
+
SESSION_OBJ[SESSION_ID].DS_GLB[dataSourceSession].dataSource_init_arr[
|
|
3124
|
+
rowIdP
|
|
3125
|
+
][ret] = {
|
|
3126
|
+
eventInfo: trigger_obj,
|
|
3127
|
+
triggerId: trigger_obj.id,
|
|
3128
|
+
fieldId: fieldId,
|
|
3129
|
+
rowId: rowIdP,
|
|
3130
|
+
colId: field_obj.id,
|
|
3131
|
+
node_id: args.prog_id + "_" + trigger_obj.id + "_" + field_obj.id,
|
|
3132
|
+
fieldProp: field_obj,
|
|
3133
|
+
DEBUG_INFO_OBJ: {
|
|
3134
|
+
module: _ds.viewModule,
|
|
3135
|
+
action: "init field event",
|
|
3136
|
+
prop: fieldId,
|
|
3137
|
+
source: _ds.viewSourceDesc,
|
|
3138
|
+
type: "event",
|
|
3139
|
+
prog_id: args.prog_id,
|
|
3140
|
+
dsSession: dataSourceSession,
|
|
3141
|
+
},
|
|
3142
|
+
};
|
|
3143
|
+
ret++;
|
|
3146
3144
|
}
|
|
3147
3145
|
}
|
|
3148
3146
|
}
|
|
3149
3147
|
}
|
|
3148
|
+
// }
|
|
3150
3149
|
return ret;
|
|
3151
3150
|
};
|
|
3152
3151
|
func.datasource.get_view_events_count = async function (
|