@xuda.io/xuda-worker-bundle-min 1.3.521 → 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.
Files changed (2) hide show
  1. package/index.js +54 -55
  2. 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
- if (
2988
- (await func.datasource.get_field_init_count(
2989
- SESSION_ID,
2990
- dataSourceSession,
2991
- idx,
2992
- false,
2993
- _ds.oninit_triggers_to_run
2994
- )) > 0
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
- for await (const field_obj of _view_obj.progFields) {
3100
- var fieldId = field_obj.data.field_id;
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
- if (!field_obj.triggers) {
3103
- continue;
3104
- }
3105
- for await (const trigger_obj of field_obj.triggers) {
3106
- if (!oninit_triggers_to_runP?.includes(trigger_obj.id)) continue;
3107
- if (
3108
- trigger_obj.data.trigger === "oninit" &&
3109
- ["get_data", "set_data", "batch", "update", "raise_event"].includes(
3110
- trigger_obj.data.action
3111
- )
3112
- ) {
3113
- if (!trigger_obj.data.action) {
3114
- func.utils.debug_report(
3115
- SESSION_ID,
3116
- "_ds.get_field_init_count",
3117
- `Error initiating event for field: ${fieldId} prog: ${_ds.v.viewSourceDesc} row: ${rowIdP} reason: missing action`,
3118
- "E"
3119
- );
3120
- break;
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
- if (trigger_obj.data.enabled) {
3124
- SESSION_OBJ[SESSION_ID].DS_GLB[
3125
- dataSourceSession
3126
- ].dataSource_init_arr[rowIdP][ret] = {
3127
- eventInfo: trigger_obj,
3128
- triggerId: trigger_obj.id,
3129
- fieldId: fieldId,
3130
- rowId: rowIdP,
3131
- colId: field_obj.id,
3132
- node_id: args.prog_id + "_" + trigger_obj.id + "_" + field_obj.id,
3133
- fieldProp: field_obj,
3134
- DEBUG_INFO_OBJ: {
3135
- module: _ds.viewModule,
3136
- action: "init field event",
3137
- prop: fieldId,
3138
- source: _ds.viewSourceDesc,
3139
- type: "event",
3140
- prog_id: args.prog_id,
3141
- dsSession: dataSourceSession,
3142
- },
3143
- };
3144
- ret++;
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 (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.521",
3
+ "version": "1.3.523",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {