@xuda.io/xuda-worker-bundle-min 1.3.522 → 1.3.524
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 +57 -53
- 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,63 @@ 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
|
-
|
|
3101
|
+
if (!field_obj.triggers) {
|
|
3102
|
+
continue;
|
|
3103
|
+
}
|
|
3104
|
+
for await (const trigger_obj of field_obj.triggers) {
|
|
3105
|
+
if (
|
|
3106
|
+
oninit_triggers_to_runP &&
|
|
3107
|
+
!oninit_triggers_to_runP?.includes(trigger_obj.id)
|
|
3108
|
+
) {
|
|
3103
3109
|
continue;
|
|
3104
3110
|
}
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
trigger_obj.data.
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
break;
|
|
3121
|
-
}
|
|
3111
|
+
if (
|
|
3112
|
+
trigger_obj.data.trigger === "oninit" &&
|
|
3113
|
+
["get_data", "set_data", "batch", "update", "raise_event"].includes(
|
|
3114
|
+
trigger_obj.data.action
|
|
3115
|
+
)
|
|
3116
|
+
) {
|
|
3117
|
+
if (!trigger_obj.data.action) {
|
|
3118
|
+
func.utils.debug_report(
|
|
3119
|
+
SESSION_ID,
|
|
3120
|
+
"_ds.get_field_init_count",
|
|
3121
|
+
`Error initiating event for field: ${fieldId} prog: ${_ds.v.viewSourceDesc} row: ${rowIdP} reason: missing action`,
|
|
3122
|
+
"E"
|
|
3123
|
+
);
|
|
3124
|
+
break;
|
|
3125
|
+
}
|
|
3122
3126
|
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
}
|
|
3127
|
+
if (trigger_obj.data.enabled) {
|
|
3128
|
+
SESSION_OBJ[SESSION_ID].DS_GLB[dataSourceSession].dataSource_init_arr[
|
|
3129
|
+
rowIdP
|
|
3130
|
+
][ret] = {
|
|
3131
|
+
eventInfo: trigger_obj,
|
|
3132
|
+
triggerId: trigger_obj.id,
|
|
3133
|
+
fieldId: fieldId,
|
|
3134
|
+
rowId: rowIdP,
|
|
3135
|
+
colId: field_obj.id,
|
|
3136
|
+
node_id: args.prog_id + "_" + trigger_obj.id + "_" + field_obj.id,
|
|
3137
|
+
fieldProp: field_obj,
|
|
3138
|
+
DEBUG_INFO_OBJ: {
|
|
3139
|
+
module: _ds.viewModule,
|
|
3140
|
+
action: "init field event",
|
|
3141
|
+
prop: fieldId,
|
|
3142
|
+
source: _ds.viewSourceDesc,
|
|
3143
|
+
type: "event",
|
|
3144
|
+
prog_id: args.prog_id,
|
|
3145
|
+
dsSession: dataSourceSession,
|
|
3146
|
+
},
|
|
3147
|
+
};
|
|
3148
|
+
ret++;
|
|
3146
3149
|
}
|
|
3147
3150
|
}
|
|
3148
3151
|
}
|
|
3149
3152
|
}
|
|
3153
|
+
// }
|
|
3150
3154
|
return ret;
|
|
3151
3155
|
};
|
|
3152
3156
|
func.datasource.get_view_events_count = async function (
|