@ibiz-template/runtime 0.6.1-alpha.0 → 0.6.1-alpha.2

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 (44) hide show
  1. package/dist/index.esm.js +189 -114
  2. package/dist/index.system.min.js +1 -1
  3. package/out/controller/common/control/md-control.controller.d.ts +15 -0
  4. package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
  5. package/out/controller/common/control/md-control.controller.js +22 -3
  6. package/out/controller/common/view/view.controller.d.ts.map +1 -1
  7. package/out/controller/common/view/view.controller.js +1 -0
  8. package/out/controller/control/form/edit-form/edit-form.controller.d.ts.map +1 -1
  9. package/out/controller/control/form/edit-form/edit-form.controller.js +3 -1
  10. package/out/controller/control/gantt/gantt.controller.d.ts +3 -3
  11. package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
  12. package/out/controller/control/gantt/gantt.controller.js +1 -4
  13. package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
  14. package/out/controller/control/grid/grid/grid.controller.js +1 -0
  15. package/out/controller/control/tree/tree.controller.d.ts +8 -0
  16. package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
  17. package/out/controller/control/tree/tree.controller.js +14 -0
  18. package/out/controller/notification/internal-message.controller.d.ts +7 -0
  19. package/out/controller/notification/internal-message.controller.d.ts.map +1 -1
  20. package/out/controller/notification/internal-message.controller.js +14 -4
  21. package/out/engine/md-view.engine.d.ts.map +1 -1
  22. package/out/engine/md-view.engine.js +2 -1
  23. package/out/interface/controller/controller/control/i-gantt.controller.d.ts +31 -2
  24. package/out/interface/controller/controller/control/i-gantt.controller.d.ts.map +1 -1
  25. package/out/interface/controller/controller/notice/i-internal-message.controller.d.ts +7 -0
  26. package/out/interface/controller/controller/notice/i-internal-message.controller.d.ts.map +1 -1
  27. package/out/interface/controller/state/view/i-view.state.d.ts +7 -0
  28. package/out/interface/controller/state/view/i-view.state.d.ts.map +1 -1
  29. package/out/plugin/plugin-static-resource/plugin-static-resource.d.ts +8 -0
  30. package/out/plugin/plugin-static-resource/plugin-static-resource.d.ts.map +1 -1
  31. package/out/plugin/plugin-static-resource/plugin-static-resource.js +12 -1
  32. package/out/service/service/internal-message/internal-message.service.d.ts +8 -0
  33. package/out/service/service/internal-message/internal-message.service.d.ts.map +1 -1
  34. package/out/service/service/internal-message/internal-message.service.js +10 -0
  35. package/out/ui-action/provider/ui-action-provider-base.d.ts +2 -2
  36. package/out/ui-action/provider/ui-action-provider-base.d.ts.map +1 -1
  37. package/out/ui-action/provider/ui-action-provider-base.js +9 -4
  38. package/out/utils/handlebars/helpers/not/not.d.ts.map +1 -1
  39. package/out/utils/handlebars/helpers/not/not.js +2 -1
  40. package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -1
  41. package/out/utils/open-redirect-view/open-redirect-view.js +3 -0
  42. package/out/utils/script/script-function.d.ts.map +1 -1
  43. package/out/utils/script/script-function.js +1 -0
  44. package/package.json +6 -6
@@ -26,6 +26,10 @@ export class UIActionProviderBase {
26
26
  refreshMode: action.refreshMode,
27
27
  closeView: action.closeEditView,
28
28
  };
29
+ const { view } = args;
30
+ if (action.closeEditView) {
31
+ view.state.isClosing = true;
32
+ }
29
33
  // ** 界面逻辑替换执行界面行为
30
34
  const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
31
35
  if (uilogicAttachMode === 'REPLACE') {
@@ -37,14 +41,14 @@ export class UIActionProviderBase {
37
41
  }
38
42
  // **用户操作确认**
39
43
  if (!(await this.isConfirm(action, args))) {
40
- return this.returnError(result);
44
+ return this.returnError(result, view);
41
45
  }
42
46
  // ** 执行不同类型的界面行为独有逻辑,并且合并result
43
47
  const _result = await this.execAction(action, args);
44
48
  Object.assign(result, _result);
45
49
  // 如果是取消操作则中断后续处理逻辑。
46
50
  if (result.cancel === true) {
47
- return this.returnError(result);
51
+ return this.returnError(result, view);
48
52
  }
49
53
  // ** 界面行为执行之后,执行界面逻辑
50
54
  if (action.uilogicAttachMode === 'AFTER') {
@@ -64,7 +68,7 @@ export class UIActionProviderBase {
64
68
  if (nextResult) {
65
69
  Object.assign(result, nextResult);
66
70
  if (nextResult.cancel === true) {
67
- return this.returnError(result);
71
+ return this.returnError(result, view);
68
72
  }
69
73
  }
70
74
  }
@@ -91,7 +95,8 @@ export class UIActionProviderBase {
91
95
  * @returns {*} {IUIActionResult}
92
96
  * @memberof UIActionHandler
93
97
  */
94
- returnError(result) {
98
+ returnError(result, view) {
99
+ view.state.isClosing = false;
95
100
  return Object.assign(result, {
96
101
  refresh: false,
97
102
  closeView: false,
@@ -1 +1 @@
1
- {"version":3,"file":"not.d.ts","sourceRoot":"","sources":["../../../../../src/utils/handlebars/helpers/not/not.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;GASG;AACH,qBAAa,SAAU,SAAQ,UAAU;gBAC3B,GAAG,EAAE,KAAK;IAItB,SAAS,CACP,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,UAAU,CAAC,aAAa,GAChC,MAAM,GAAG,OAAO;CAIpB"}
1
+ {"version":3,"file":"not.d.ts","sourceRoot":"","sources":["../../../../../src/utils/handlebars/helpers/not/not.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;GASG;AACH,qBAAa,SAAU,SAAQ,UAAU;gBAC3B,GAAG,EAAE,KAAK;IAItB,SAAS,CACP,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,UAAU,CAAC,aAAa,GAChC,MAAM,GAAG,OAAO;CAIpB"}
@@ -1,3 +1,4 @@
1
+ import { isEmpty, isNil } from 'ramda';
1
2
  import { HelperUtil } from '../../utils';
2
3
  import { HelperBase } from '../helper-base';
3
4
  /**
@@ -15,7 +16,7 @@ export class HelperNot extends HelperBase {
15
16
  super(hbs, 'not');
16
17
  }
17
18
  onExecute(param, options) {
18
- const bol = Handlebars.Utils.isEmpty(param);
19
+ const bol = isEmpty(param) || isNil(param);
19
20
  return HelperUtil.handleJudgmentExecute(this, bol, options);
20
21
  }
21
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"open-redirect-view.d.ts","sourceRoot":"","sources":["../../../src/utils/open-redirect-view/open-redirect-view.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAK/D;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG;IACjD,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,CAiCA;AAED,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,QAAQ,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,EACpB,IAAI,GAAE,gBAAqB,GAC1B,OAAO,CAAC,UAAU,CAAC,CAOrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,gBAAqB,GAC1B,OAAO,CAAC,IAAI,CAAC,CASf;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,gBAAqB,GAC1B,OAAO,CAAC,YAAY,CAAC,CAoDvB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,EACpB,IAAI,GAAE,gBAAqB,GAC1B,OAAO,CAAC,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAAC,GAAG;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAyH3E;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,EACpB,IAAI,GAAE,gBAAqB,GAC1B,OAAO,CAAC,UAAU,CAAC,CA+BrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,KAAK,GACV,OAAO,CAAC,MAAM,CAAC,CAiDjB"}
1
+ {"version":3,"file":"open-redirect-view.d.ts","sourceRoot":"","sources":["../../../src/utils/open-redirect-view/open-redirect-view.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAK/D;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG;IACjD,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,CAiCA;AAED,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,QAAQ,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;GAWG;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
229
229
  viewId = refView.refAppViewId;
230
+ if (refView.openMode) {
231
+ opts.openMode = refView.openMode;
232
+ }
230
233
  if (viewId) {
231
234
  return {
232
235
  type: 'view',
@@ -1 +1 @@
1
- {"version":3,"file":"script-function.d.ts","sourceRoot":"","sources":["../../../src/utils/script/script-function.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAmB,MAAM,iBAAiB,CAAC;AASvE,qBAAa,cAAc;IACzB,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAE7B,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,CAAM;IAEjC,SAAS,CAAC,OAAO,EAAE,mBAAmB,CAAC;gBAGrC,OAAO,EAAE,MAAM,EAAE,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,mBAAoC;IAgB/C;;;;;;;;OAQG;IACH,SAAS,CAAC,UAAU,CAClB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,mBAAmB,GAC3B,MAAM;IAWT;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,mBAAmB,GAAG,IAAI;IA4B5E;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,GAAG,EAAE;IAuB7C;;;;;;;OAOG;IACH,SAAS,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAkD9D;;;;;;OAMG;IACH,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO;CAI/B"}
1
+ {"version":3,"file":"script-function.d.ts","sourceRoot":"","sources":["../../../src/utils/script/script-function.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAmB,MAAM,iBAAiB,CAAC;AASvE,qBAAa,cAAc;IACzB,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAE7B,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,CAAM;IAEjC,SAAS,CAAC,OAAO,EAAE,mBAAmB,CAAC;gBAGrC,OAAO,EAAE,MAAM,EAAE,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,mBAAoC;IAgB/C;;;;;;;;OAQG;IACH,SAAS,CAAC,UAAU,CAClB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,mBAAmB,GAC3B,MAAM;IAWT;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,mBAAmB,GAAG,IAAI;IA6B5E;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,GAAG,EAAE;IAuB7C;;;;;;;OAOG;IACH,SAAS,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAkD9D;;;;;;OAMG;IACH,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO;CAI/B"}
@@ -74,6 +74,7 @@ export class ScriptFunction {
74
74
  'view',
75
75
  'parent',
76
76
  'util',
77
+ 'ctrl',
77
78
  ];
78
79
  keys.push(...presetArgsKeys);
79
80
  // 除重
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/runtime",
3
- "version": "0.6.1-alpha.0",
3
+ "version": "0.6.1-alpha.2",
4
4
  "description": "控制器包",
5
5
  "type": "module",
6
6
  "main": "out/index.js",
@@ -16,7 +16,7 @@
16
16
  ],
17
17
  "scripts": {
18
18
  "dev": "tsc --watch",
19
- "build": "npm run lint && node scripts/build.js && npm run build:rollup && tsc --build",
19
+ "build": "npm run test:run && npm run lint && node scripts/build.js && npm run build:rollup && tsc --build",
20
20
  "build:rollup": "rollup -c",
21
21
  "lint": "eslint 'src/**/*.ts'",
22
22
  "lint:fix": "eslint --fix 'src/**/*.ts'",
@@ -35,8 +35,8 @@
35
35
  "animejs": "^3.2.2"
36
36
  },
37
37
  "devDependencies": {
38
- "@ibiz-template/core": "^0.6.1-dev.1",
39
- "@ibiz/model-core": "^0.1.11",
38
+ "@ibiz-template/core": "^0.6.1-alpha.2",
39
+ "@ibiz/model-core": "^0.1.12",
40
40
  "@types/animejs": "^3.1.12",
41
41
  "@types/path-browserify": "^1.0.2",
42
42
  "@types/qs": "^6.9.11",
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@ibiz-template/core": "^0.6.0",
57
- "@ibiz/model-core": "^0.1.11",
57
+ "@ibiz/model-core": "^0.1.12",
58
58
  "async-validator": "^4.2.5",
59
59
  "dayjs": "^1.11.7",
60
60
  "echarts": "^5.4.3",
@@ -66,5 +66,5 @@
66
66
  "qx-util": "^0.4.8",
67
67
  "ramda": "^0.29.0"
68
68
  },
69
- "gitHead": "b27683addc985ffe660fbc801cd4b0d855aff8f3"
69
+ "gitHead": "a41c806c321ea5ec6a9b3be23405aeaaba900f98"
70
70
  }