@webtypen/webframez-core 0.3.31 → 0.3.32

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.
@@ -199,6 +199,19 @@ class DataBuilder {
199
199
  newData.forms = {};
200
200
  if (typeof type.forms === "function") {
201
201
  newData.forms = yield type.forms(req);
202
+ if (newData === null || newData === void 0 ? void 0 : newData.forms) {
203
+ for (let form in newData.forms) {
204
+ if (typeof newData.forms[form].pageActions === "function") {
205
+ newData.forms[form].pageActions = yield newData.forms[form].pageActions(req);
206
+ }
207
+ if (typeof newData.forms[form].fields === "function") {
208
+ newData.forms[form].fields = yield newData.forms[form].fields(req);
209
+ }
210
+ if (typeof newData.forms[form].backLink === "function") {
211
+ newData.forms[form].backLink = yield newData.forms[form].backLink(req);
212
+ }
213
+ }
214
+ }
202
215
  }
203
216
  for (let form in type.forms) {
204
217
  if (!type.forms[form] || !type.forms[form].fields) {
@@ -220,15 +233,6 @@ class DataBuilder {
220
233
  else if (type.forms[form].fields) {
221
234
  newData.forms[form].fields = JSON.parse(JSON.stringify(type.forms[form].fields));
222
235
  }
223
- if (typeof newData.forms[form].pageActions === "function") {
224
- newData.forms[form].pageActions = yield newData.forms[form].pageActions(req);
225
- }
226
- if (typeof newData.forms[form].fields === "function") {
227
- newData.forms[form].fields = yield newData.forms[form].fields(req);
228
- }
229
- if (typeof newData.forms[form].backLink === "function") {
230
- newData.forms[form].backLink = yield newData.forms[form].backLink(req);
231
- }
232
236
  if (!newData.forms[form].fields || newData.forms[form].fields.length < 1) {
233
237
  continue;
234
238
  }
package/dist/info.js CHANGED
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WebframezInfo = void 0;
4
4
  exports.WebframezInfo = {
5
- version: "0.3.31",
5
+ version: "0.3.32",
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webtypen/webframez-core",
3
- "version": "0.3.31",
3
+ "version": "0.3.32",
4
4
  "description": "The core package of the typescript based webframez (web-framework) by webtypen.de",
5
5
  "homepage": "https://webtypen.de/",
6
6
  "license": "MIT",
@@ -255,6 +255,20 @@ export class DataBuilder {
255
255
  newData.forms = {};
256
256
  if (typeof type.forms === "function") {
257
257
  newData.forms = await type.forms(req);
258
+
259
+ if (newData?.forms) {
260
+ for (let form in newData.forms) {
261
+ if (typeof newData.forms[form].pageActions === "function") {
262
+ newData.forms[form].pageActions = await newData.forms[form].pageActions(req);
263
+ }
264
+ if (typeof newData.forms[form].fields === "function") {
265
+ newData.forms[form].fields = await newData.forms[form].fields(req);
266
+ }
267
+ if (typeof newData.forms[form].backLink === "function") {
268
+ newData.forms[form].backLink = await newData.forms[form].backLink(req);
269
+ }
270
+ }
271
+ }
258
272
  }
259
273
 
260
274
  for (let form in type.forms) {
@@ -279,16 +293,6 @@ export class DataBuilder {
279
293
  newData.forms[form].fields = JSON.parse(JSON.stringify(type.forms[form].fields));
280
294
  }
281
295
 
282
- if (typeof newData.forms[form].pageActions === "function") {
283
- newData.forms[form].pageActions = await newData.forms[form].pageActions(req);
284
- }
285
- if (typeof newData.forms[form].fields === "function") {
286
- newData.forms[form].fields = await newData.forms[form].fields(req);
287
- }
288
- if (typeof newData.forms[form].backLink === "function") {
289
- newData.forms[form].backLink = await newData.forms[form].backLink(req);
290
- }
291
-
292
296
  if (!newData.forms[form].fields || newData.forms[form].fields.length < 1) {
293
297
  continue;
294
298
  }
package/src/info.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export const WebframezInfo = {
2
- version: "0.3.31",
2
+ version: "0.3.32",
3
3
  };