@ibiz-template/runtime 0.7.41-alpha.110 → 0.7.41-alpha.112
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/dist/index.esm.js +317 -245
- package/dist/index.system.min.js +1 -1
- package/out/config/global-config.d.ts.map +1 -1
- package/out/config/global-config.js +2 -0
- package/out/controller/common/base.controller.js +2 -2
- package/out/controller/common/editor/editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/editor.controller.js +10 -1
- package/out/controller/common/view/view.controller.js +2 -2
- package/out/controller/control/calendar/calendar.controller.d.ts.map +1 -1
- package/out/controller/control/calendar/calendar.controller.js +15 -11
- package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts +6 -0
- package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-item/form-item.controller.js +14 -1
- package/out/controller/control/form/form-detail/form-item/form-item.state.d.ts +7 -0
- package/out/controller/control/form/form-detail/form-item/form-item.state.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-item/form-item.state.js +7 -0
- package/out/controller/control/form/form-detail/form-rawitem/form-rawitem.controller.d.ts +7 -0
- package/out/controller/control/form/form-detail/form-rawitem/form-rawitem.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-rawitem/form-rawitem.controller.js +15 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts +7 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +23 -2
- package/out/controller/control/report-panel/generator/bi-converter/base/grid-converter-base.js +9 -9
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +14 -10
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +22 -20
- package/out/interface/api/common/global-config/i-api-global-common-config.d.ts +9 -0
- package/out/interface/api/common/global-config/i-api-global-common-config.d.ts.map +1 -1
- package/out/interface/api/common/global-config/i-api-global-grid-config.d.ts +8 -0
- package/out/interface/api/common/global-config/i-api-global-grid-config.d.ts.map +1 -1
- package/out/interface/api/state/control/form-detail/i-api-form-item.state.d.ts +6 -0
- package/out/interface/api/state/control/form-detail/i-api-form-item.state.d.ts.map +1 -1
- package/out/logic-scheduler/executor/app-ui-action-executor.js +1 -1
- package/out/logic-scheduler/scheduler/view-logic-scheduler.d.ts +3 -4
- package/out/logic-scheduler/scheduler/view-logic-scheduler.d.ts.map +1 -1
- package/out/logic-scheduler/scheduler/view-logic-scheduler.js +7 -5
- package/out/utils/handlebars/helpers/date-format/date-format.d.ts +14 -0
- package/out/utils/handlebars/helpers/date-format/date-format.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/date-format/date-format.js +18 -0
- package/out/utils/handlebars/helpers/index.d.ts.map +1 -1
- package/out/utils/handlebars/helpers/index.js +2 -0
- package/out/utils/value-rule/value-rule.js +1 -1
- package/package.json +4 -4
- package/src/config/global-config.ts +2 -0
- package/src/controller/common/base.controller.ts +2 -2
- package/src/controller/common/editor/editor.controller.ts +13 -1
- package/src/controller/common/view/view.controller.ts +2 -2
- package/src/controller/control/calendar/calendar.controller.ts +15 -17
- package/src/controller/control/form/form-detail/form-item/form-item.controller.ts +14 -1
- package/src/controller/control/form/form-detail/form-item/form-item.state.ts +8 -0
- package/src/controller/control/form/form-detail/form-rawitem/form-rawitem.controller.ts +15 -0
- package/src/controller/control/grid/grid/grid.controller.ts +24 -1
- package/src/controller/control/report-panel/generator/bi-converter/base/grid-converter-base.ts +9 -9
- package/src/controller/control/tree/tree.controller.ts +14 -16
- package/src/engine/md-view.engine.ts +22 -24
- package/src/interface/api/common/global-config/i-api-global-common-config.ts +10 -0
- package/src/interface/api/common/global-config/i-api-global-grid-config.ts +9 -0
- package/src/interface/api/state/control/form-detail/i-api-form-item.state.ts +7 -0
- package/src/logic-scheduler/executor/app-ui-action-executor.ts +1 -1
- package/src/logic-scheduler/scheduler/view-logic-scheduler.ts +7 -5
- package/src/utils/handlebars/helpers/date-format/date-format.ts +20 -0
- package/src/utils/handlebars/helpers/index.ts +2 -0
- package/src/utils/value-rule/value-rule.ts +1 -1
|
@@ -28,6 +28,14 @@ export interface IApiGlobalGridConfig {
|
|
|
28
28
|
* @memberof IApiGlobalGridConfig
|
|
29
29
|
*/
|
|
30
30
|
saveErrorHandleMode: 'default' | 'reset';
|
|
31
|
+
/**
|
|
32
|
+
* @description 表格列对齐方式
|
|
33
|
+
* @type {('left' | 'center' | 'right')}
|
|
34
|
+
* @default center
|
|
35
|
+
* @platform web
|
|
36
|
+
* @memberof IApiGlobalGridConfig
|
|
37
|
+
*/
|
|
38
|
+
columnAlign: 'left' | 'center' | 'right';
|
|
31
39
|
/**
|
|
32
40
|
* @description 单元格超出呈现模式,wrap 换行,高度自动增高;ellipsis 省略,出...,悬浮出tooltip
|
|
33
41
|
* @type {('wrap' | 'ellipsis')}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-api-global-grid-config.d.ts","sourceRoot":"","sources":["../../../../../src/interface/api/common/global-config/i-api-global-grid-config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;IAErC;;;;;;OAMG;IACH,YAAY,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAC;IAE9C;;;;;;OAMG;IACH,mBAAmB,EAAE,SAAS,GAAG,OAAO,CAAC;IAEzC;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,GAAG,UAAU,CAAC;IAElC;;;;;;OAMG;IACH,eAAe,EAAE,OAAO,CAAC;CAC1B"}
|
|
1
|
+
{"version":3,"file":"i-api-global-grid-config.d.ts","sourceRoot":"","sources":["../../../../../src/interface/api/common/global-config/i-api-global-grid-config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;IAErC;;;;;;OAMG;IACH,YAAY,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAC;IAE9C;;;;;;OAMG;IACH,mBAAmB,EAAE,SAAS,GAAG,OAAO,CAAC;IAEzC;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAEzC;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,GAAG,UAAU,CAAC;IAElC;;;;;;OAMG;IACH,eAAe,EAAE,OAAO,CAAC;CAC1B"}
|
|
@@ -30,5 +30,11 @@ export interface IApiFormItemState extends IApiFormDetailState {
|
|
|
30
30
|
* @memberof IApiFormItemState
|
|
31
31
|
*/
|
|
32
32
|
inputTipUrl: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* @description 编辑器类名集合
|
|
35
|
+
* @type {(string[])}
|
|
36
|
+
* @memberof IApiFormItemState
|
|
37
|
+
*/
|
|
38
|
+
editorClass: string[];
|
|
33
39
|
}
|
|
34
40
|
//# sourceMappingURL=i-api-form-item.state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-api-form-item.state.d.ts","sourceRoot":"","sources":["../../../../../../src/interface/api/state/control/form-detail/i-api-form-item.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE;;;;;GAKG;AACH,MAAM,WAAW,iBAAkB,SAAQ,mBAAmB;IAC5D;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;;OAIG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAE5B;;;;OAIG;IACH,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAE7B;;;;OAIG;IACH,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"i-api-form-item.state.d.ts","sourceRoot":"","sources":["../../../../../../src/interface/api/state/control/form-detail/i-api-form-item.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE;;;;;GAKG;AACH,MAAM,WAAW,iBAAkB,SAAQ,mBAAmB;IAC5D;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;;OAIG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAE5B;;;;OAIG;IACH,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAE7B;;;;OAIG;IACH,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAEhC;;;;OAIG;IACH,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB"}
|
|
@@ -15,6 +15,6 @@ export class AppDEUIActionExecutor extends LogicExecutor {
|
|
|
15
15
|
if (!this.logic.appDEUIActionId) {
|
|
16
16
|
throw new RuntimeModelError(this.logic, ibiz.i18n.t('runtime.logicScheduler.executor.missingTrigger'));
|
|
17
17
|
}
|
|
18
|
-
UIActionUtil.execAndResolved(this.logic.appDEUIActionId, executeParams, this.logic.appId);
|
|
18
|
+
return UIActionUtil.execAndResolved(this.logic.appDEUIActionId, executeParams, this.logic.appId);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -15,10 +15,9 @@ export declare class ViewLogicScheduler extends LogicScheduler {
|
|
|
15
15
|
* 触发视图事件
|
|
16
16
|
* @author lxm
|
|
17
17
|
* @date 2023-06-26 02:26:33
|
|
18
|
-
* @param {
|
|
19
|
-
* @
|
|
20
|
-
* @return {*} {(boolean | undefined)}
|
|
18
|
+
* @param {EventBase} event 事件对象
|
|
19
|
+
* @return {*} {Promise<void>}
|
|
21
20
|
*/
|
|
22
|
-
triggerViewEvent(event: EventBase): void
|
|
21
|
+
triggerViewEvent(event: EventBase): Promise<void>;
|
|
23
22
|
}
|
|
24
23
|
//# sourceMappingURL=view-logic-scheduler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-logic-scheduler.d.ts","sourceRoot":"","sources":["../../../src/logic-scheduler/scheduler/view-logic-scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,cAAc;gBACxC,MAAM,EAAE,eAAe,EAAE,EAAE,aAAa,GAAE,MAAM,EAAO;IAQnE
|
|
1
|
+
{"version":3,"file":"view-logic-scheduler.d.ts","sourceRoot":"","sources":["../../../src/logic-scheduler/scheduler/view-logic-scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,cAAc;gBACxC,MAAM,EAAE,eAAe,EAAE,EAAE,aAAa,GAAE,MAAM,EAAO;IAQnE;;;;;;OAMG;IACG,gBAAgB,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAUxD"}
|
|
@@ -19,15 +19,17 @@ export class ViewLogicScheduler extends LogicScheduler {
|
|
|
19
19
|
* 触发视图事件
|
|
20
20
|
* @author lxm
|
|
21
21
|
* @date 2023-06-26 02:26:33
|
|
22
|
-
* @param {
|
|
23
|
-
* @
|
|
24
|
-
* @return {*} {(boolean | undefined)}
|
|
22
|
+
* @param {EventBase} event 事件对象
|
|
23
|
+
* @return {*} {Promise<void>}
|
|
25
24
|
*/
|
|
26
|
-
triggerViewEvent(event) {
|
|
25
|
+
async triggerViewEvent(event) {
|
|
27
26
|
const matchParams = {
|
|
28
27
|
eventName: event.eventName,
|
|
29
28
|
triggerType: 'VIEWEVENT',
|
|
30
29
|
};
|
|
31
|
-
this.triggerAndExecute(matchParams, event);
|
|
30
|
+
const result = this.triggerAndExecute(matchParams, event);
|
|
31
|
+
if (result === null || result === void 0 ? void 0 : result.length) {
|
|
32
|
+
await Promise.all(result);
|
|
33
|
+
}
|
|
32
34
|
}
|
|
33
35
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HelperBase } from '../helper-base';
|
|
2
|
+
/**
|
|
3
|
+
* @description 时间格式化,用法: 销售内示数据{{dateFormat now "YYYYMMDDHHmmss"}}.xlsx
|
|
4
|
+
* @author tony001
|
|
5
|
+
* @date 2026-07-06 15:07:49
|
|
6
|
+
* @export
|
|
7
|
+
* @class HelperDateFormat
|
|
8
|
+
* @extends {HelperBase}
|
|
9
|
+
*/
|
|
10
|
+
export declare class HelperDateFormat extends HelperBase {
|
|
11
|
+
constructor(hbs: IData);
|
|
12
|
+
onExecute(date: Date, format: string): string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=date-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-format.d.ts","sourceRoot":"","sources":["../../../../../src/utils/handlebars/helpers/date-format/date-format.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;GAOG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;gBAClC,GAAG,EAAE,KAAK;IAItB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;CAG9C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import { HelperBase } from '../helper-base';
|
|
3
|
+
/**
|
|
4
|
+
* @description 时间格式化,用法: 销售内示数据{{dateFormat now "YYYYMMDDHHmmss"}}.xlsx
|
|
5
|
+
* @author tony001
|
|
6
|
+
* @date 2026-07-06 15:07:49
|
|
7
|
+
* @export
|
|
8
|
+
* @class HelperDateFormat
|
|
9
|
+
* @extends {HelperBase}
|
|
10
|
+
*/
|
|
11
|
+
export class HelperDateFormat extends HelperBase {
|
|
12
|
+
constructor(hbs) {
|
|
13
|
+
super(hbs, 'dateFormat');
|
|
14
|
+
}
|
|
15
|
+
onExecute(date, format) {
|
|
16
|
+
return dayjs(date).format(format);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/handlebars/helpers/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/handlebars/helpers/index.ts"],"names":[],"mappings":"AAsBA;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,CAsB/C"}
|
|
@@ -18,6 +18,7 @@ import { HelperSnakeCase } from './snake-case/snake-case';
|
|
|
18
18
|
import { HelperSpinalCase } from './spinal-case/spinal-case';
|
|
19
19
|
import { HelperUpperCase } from './upper-case/upper-case';
|
|
20
20
|
import { HelperAbs } from './abs/abs';
|
|
21
|
+
import { HelperDateFormat } from './date-format/date-format';
|
|
21
22
|
/**
|
|
22
23
|
* 安装自定义助手
|
|
23
24
|
*
|
|
@@ -46,4 +47,5 @@ export function installHelpers(hsb) {
|
|
|
46
47
|
new HelperSpinalCase(hsb);
|
|
47
48
|
new HelperUpperCase(hsb);
|
|
48
49
|
new HelperEqPropertyValue(hsb);
|
|
50
|
+
new HelperDateFormat(hsb);
|
|
49
51
|
}
|
|
@@ -13,6 +13,6 @@ export function filterValueRules(vrs, name) {
|
|
|
13
13
|
const { checkMode } = vr; // 排除后台校验为2
|
|
14
14
|
const belongName = vr.deformItemName ||
|
|
15
15
|
vr.degridEditItemName;
|
|
16
|
-
return checkMode !== 2 && belongName === name;
|
|
16
|
+
return checkMode !== 2 && (belongName === null || belongName === void 0 ? void 0 : belongName.toLowerCase()) === name.toLowerCase();
|
|
17
17
|
});
|
|
18
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.112",
|
|
4
4
|
"description": "运行时逻辑库",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "out/index.js",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@ibiz-template/core": "^0.7.41-alpha.106",
|
|
43
|
-
"@ibiz/model-core": "^0.1.
|
|
43
|
+
"@ibiz/model-core": "^0.1.88",
|
|
44
44
|
"@types/animejs": "^3.1.12",
|
|
45
45
|
"@types/path-browserify": "^1.0.2",
|
|
46
46
|
"@types/qs": "^6.9.11",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@ibiz-template/core": "^0.6.0",
|
|
61
|
-
"@ibiz/model-core": "^0.1.
|
|
61
|
+
"@ibiz/model-core": "^0.1.88",
|
|
62
62
|
"async-validator": "^4.2.5",
|
|
63
63
|
"dayjs": "^1.11.7",
|
|
64
64
|
"echarts": "^5.4.3",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"qx-util": "^0.4.8",
|
|
71
71
|
"ramda": "^0.29.0"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "884c135f203cf1a0ae3977442b559b757acd6b47"
|
|
74
74
|
}
|
|
@@ -46,6 +46,7 @@ export class GlobalConfig implements IGlobalConfig {
|
|
|
46
46
|
editSaveMode: 'cell-blur',
|
|
47
47
|
saveErrorHandleMode: 'default',
|
|
48
48
|
overflowMode: 'wrap',
|
|
49
|
+
columnAlign: 'center',
|
|
49
50
|
emptyHiddenUnit: true,
|
|
50
51
|
};
|
|
51
52
|
|
|
@@ -128,6 +129,7 @@ export class GlobalConfig implements IGlobalConfig {
|
|
|
128
129
|
aiChunkView: '',
|
|
129
130
|
aiChunkEntity: '',
|
|
130
131
|
counterMaxValue: 99,
|
|
132
|
+
enhancedUI: false,
|
|
131
133
|
};
|
|
132
134
|
|
|
133
135
|
// 全局分页流布局配置
|
|
@@ -156,12 +156,12 @@ export class BaseController<
|
|
|
156
156
|
// 登记自身
|
|
157
157
|
this.mountCounter.enroll(SELF_KEY);
|
|
158
158
|
await this.onCreated();
|
|
159
|
+
ibiz.log.debug(`${this.constructor.name}:${this.name} onCreated`);
|
|
160
|
+
await this._evt.emit('onCreated', undefined);
|
|
159
161
|
this.state.isCreated = true;
|
|
160
162
|
this.force(() => {
|
|
161
163
|
this.mountSelf();
|
|
162
164
|
});
|
|
163
|
-
ibiz.log.debug(`${this.constructor.name}:${this.name} onCreated`);
|
|
164
|
-
this._evt.emit('onCreated', undefined);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
/**
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
IEditor,
|
|
4
4
|
IEditorItem,
|
|
5
5
|
INavigateParamContainer,
|
|
6
|
+
IControlAttribute,
|
|
6
7
|
} from '@ibiz/model-core';
|
|
7
8
|
import { DataTypes } from '@ibiz-template/core';
|
|
8
9
|
import dayjs from 'dayjs';
|
|
@@ -15,6 +16,7 @@ import {
|
|
|
15
16
|
} from '../../../interface/controller';
|
|
16
17
|
import { ValueExUtil } from '../../utils';
|
|
17
18
|
import { ControlController } from '../control';
|
|
19
|
+
import { PredefinedAttributes } from '../../../constant';
|
|
18
20
|
|
|
19
21
|
/**
|
|
20
22
|
* 编辑器控制器基类
|
|
@@ -309,7 +311,17 @@ export class EditorController<T extends IEditor = IEditor>
|
|
|
309
311
|
(item: IEditorItem) => item.id !== this.model.id,
|
|
310
312
|
);
|
|
311
313
|
}
|
|
312
|
-
|
|
314
|
+
// 合并语义化埋点属性
|
|
315
|
+
const controlAttributes =
|
|
316
|
+
(this.parent as IData).model?.controlAttributes?.filter(
|
|
317
|
+
(item: IControlAttribute) =>
|
|
318
|
+
PredefinedAttributes.CLASSNAMES === item.attrName ||
|
|
319
|
+
PredefinedAttributes.STYLES === item.attrName,
|
|
320
|
+
) || [];
|
|
321
|
+
if (controlAttributes.length) {
|
|
322
|
+
if (!this.model.controlAttributes) this.model.controlAttributes = [];
|
|
323
|
+
this.model.controlAttributes.push(...controlAttributes);
|
|
324
|
+
}
|
|
313
325
|
this.initExtraParams();
|
|
314
326
|
}
|
|
315
327
|
|
|
@@ -483,8 +483,8 @@ export class ViewController<
|
|
|
483
483
|
};
|
|
484
484
|
if (this.scheduler.hasViewEventTrigger) {
|
|
485
485
|
// 监听视图事件触发视图事件触发器
|
|
486
|
-
this.evt.onAll((_eventName, event) => {
|
|
487
|
-
this.scheduler!.triggerViewEvent(event);
|
|
486
|
+
this.evt.onAll(async (_eventName, event) => {
|
|
487
|
+
await this.scheduler!.triggerViewEvent(event);
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
490
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-case-declarations */
|
|
2
2
|
import dayjs from 'dayjs';
|
|
3
3
|
import { ISysCalendar, ISysCalendarItem } from '@ibiz/model-core';
|
|
4
|
-
import { RuntimeError
|
|
4
|
+
import { RuntimeError } from '@ibiz-template/core';
|
|
5
5
|
import {
|
|
6
6
|
CodeListItem,
|
|
7
7
|
ICalendarState,
|
|
@@ -314,8 +314,8 @@ export class CalendarController
|
|
|
314
314
|
};
|
|
315
315
|
if (this.viewScheduler.hasViewEventTrigger) {
|
|
316
316
|
// 监听视图事件触发视图事件触发器
|
|
317
|
-
this.evt.onAll((_eventName, event) => {
|
|
318
|
-
this.viewScheduler!.triggerViewEvent(event);
|
|
317
|
+
this.evt.onAll(async (_eventName, event) => {
|
|
318
|
+
await this.viewScheduler!.triggerViewEvent(event);
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
321
|
}
|
|
@@ -379,13 +379,12 @@ export class CalendarController
|
|
|
379
379
|
ctrl: this,
|
|
380
380
|
},
|
|
381
381
|
);
|
|
382
|
-
if (result === -1)
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
);
|
|
382
|
+
if (result === -1) {
|
|
383
|
+
ibiz.log.error(ibiz.i18n.t('runtime.engine.logicOpendata'));
|
|
384
|
+
return {
|
|
385
|
+
cancel: true,
|
|
386
|
+
};
|
|
387
|
+
}
|
|
389
388
|
return {
|
|
390
389
|
cancel: result ? result.ok : true,
|
|
391
390
|
};
|
|
@@ -415,13 +414,12 @@ export class CalendarController
|
|
|
415
414
|
ctrl: this,
|
|
416
415
|
},
|
|
417
416
|
);
|
|
418
|
-
if (result === -1)
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
);
|
|
417
|
+
if (result === -1) {
|
|
418
|
+
ibiz.log.error(ibiz.i18n.t('runtime.engine.logicNewdata'));
|
|
419
|
+
return {
|
|
420
|
+
cancel: true,
|
|
421
|
+
};
|
|
422
|
+
}
|
|
425
423
|
return {
|
|
426
424
|
cancel: result ? result.ok : true,
|
|
427
425
|
};
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from '../../../../../interface';
|
|
18
18
|
import { getEditorProvider } from '../../../../../register';
|
|
19
19
|
import { Srfuf } from '../../../../../service';
|
|
20
|
-
import { calcDeCodeNameById } from '../../../../../model';
|
|
20
|
+
import { calcDeCodeNameById, calcDynaClass } from '../../../../../model';
|
|
21
21
|
import { filterValueRules } from '../../../../../utils';
|
|
22
22
|
import { FormNotifyState } from '../../../../constant';
|
|
23
23
|
import { generateEditorRules, generateRules } from '../../../../utils';
|
|
@@ -620,4 +620,17 @@ export class FormItemController
|
|
|
620
620
|
clearTipsCache(): void {
|
|
621
621
|
localStorage.removeItem(this.TIPS_CACHE);
|
|
622
622
|
}
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* @description 计算动态样式表
|
|
626
|
+
* @param {IData} data
|
|
627
|
+
* @memberof FormItemController
|
|
628
|
+
*/
|
|
629
|
+
protected calcDynaClass(data: IData): void {
|
|
630
|
+
super.calcDynaClass(data);
|
|
631
|
+
if (this.model.editor?.dynaClass) {
|
|
632
|
+
const dynaClass = calcDynaClass(this.model.editor.dynaClass, data);
|
|
633
|
+
this.state.editorClass = dynaClass;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
623
636
|
}
|
|
@@ -2,6 +2,7 @@ import { IDEFormRawItem } from '@ibiz/model-core';
|
|
|
2
2
|
import { FormDetailController } from '../form-detail';
|
|
3
3
|
import { FormRawItemState } from './form-rawitem.state';
|
|
4
4
|
import { IApiFormRawItemController } from '../../../../../interface';
|
|
5
|
+
import { calcDynaClass } from '../../../../../model';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* @description 表单直接内容控制器
|
|
@@ -19,4 +20,18 @@ export class FormRawItemController
|
|
|
19
20
|
protected createState(): FormRawItemState {
|
|
20
21
|
return new FormRawItemState(this.parent?.state);
|
|
21
22
|
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @description 计算动态样式表
|
|
26
|
+
* @protected
|
|
27
|
+
* @param {IData} data
|
|
28
|
+
* @memberof FormRawItemController
|
|
29
|
+
*/
|
|
30
|
+
protected calcDynaClass(data: IData): void {
|
|
31
|
+
super.calcDynaClass(data);
|
|
32
|
+
if (this.model.rawItem?.dynaClass) {
|
|
33
|
+
const dynaClass = calcDynaClass(this.model.rawItem.dynaClass, data);
|
|
34
|
+
this.state.class.containerDyna = dynaClass;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
22
37
|
}
|
|
@@ -185,6 +185,17 @@ export class GridController<
|
|
|
185
185
|
return ibiz.config.grid.saveErrorHandleMode;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
/**
|
|
189
|
+
* @description 列对齐方式
|
|
190
|
+
* @readonly
|
|
191
|
+
* @type {("left" | "right" | "center")}
|
|
192
|
+
* @memberof GridController
|
|
193
|
+
*/
|
|
194
|
+
get columnAlign(): 'left' | 'right' | 'center' {
|
|
195
|
+
if (this.controlParams.columnalign) return this.controlParams.columnalign;
|
|
196
|
+
return ibiz.config.grid.columnAlign;
|
|
197
|
+
}
|
|
198
|
+
|
|
188
199
|
/**
|
|
189
200
|
* 是否有配置宽度自适应列
|
|
190
201
|
*
|
|
@@ -1829,10 +1840,22 @@ export class GridController<
|
|
|
1829
1840
|
const data = await this.getExportData(args.params);
|
|
1830
1841
|
const formatData = this.formatExcelData(data, fields);
|
|
1831
1842
|
const table = formatData.map(v => Object.values(v));
|
|
1843
|
+
|
|
1844
|
+
// 获取导出文件名,如果有自定义文件名格式则使用自定义文件名格式
|
|
1845
|
+
let fileName = this.model.logicName!;
|
|
1846
|
+
if (this.dataExport?.fileNameFormat) {
|
|
1847
|
+
fileName = await ibiz.util.hbs.render(this.dataExport.fileNameFormat, {
|
|
1848
|
+
context: this.context,
|
|
1849
|
+
params: this.params,
|
|
1850
|
+
data: this.view.state.srfactiveviewdata,
|
|
1851
|
+
now: new Date(),
|
|
1852
|
+
});
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1832
1855
|
await ibiz.platform.frontExport({
|
|
1833
1856
|
header,
|
|
1834
1857
|
data: table,
|
|
1835
|
-
fileName
|
|
1858
|
+
fileName,
|
|
1836
1859
|
});
|
|
1837
1860
|
}
|
|
1838
1861
|
|
package/src/controller/control/report-panel/generator/bi-converter/base/grid-converter-base.ts
CHANGED
|
@@ -35,24 +35,24 @@ export abstract class GridConverterBase extends ConverterBase {
|
|
|
35
35
|
grid_function_setting,
|
|
36
36
|
} = this.reportUIModel;
|
|
37
37
|
result.vars = {
|
|
38
|
-
'--ibiz-control-grid-header-align': grid_header_position,
|
|
39
|
-
'--ibiz-control-grid-header-font-size': `${grid_header_fontsize}px`,
|
|
40
|
-
'--ibiz-control-grid-header-text-color': grid_header_fontcolor,
|
|
41
|
-
'--ibiz-control-grid-
|
|
42
|
-
'--ibiz-control-grid-
|
|
38
|
+
'--ibiz-control-grid-header-cell-align': grid_header_position,
|
|
39
|
+
'--ibiz-control-grid-header-cell-font-size': `${grid_header_fontsize}px`,
|
|
40
|
+
'--ibiz-control-grid-header-cell-text-color': grid_header_fontcolor,
|
|
41
|
+
'--ibiz-control-grid-body-cell-font-size': `${grid_body_fontsize}px`,
|
|
42
|
+
'--ibiz-control-grid-body-cell-text-color': grid_body_fontcolor,
|
|
43
43
|
};
|
|
44
44
|
if (grid_header_fontstyle) {
|
|
45
45
|
const key =
|
|
46
46
|
grid_header_fontstyle === 'bold'
|
|
47
|
-
? '--ibiz-control-grid-header-font-weight'
|
|
48
|
-
: '--ibiz-control-grid-header-font-style';
|
|
47
|
+
? '--ibiz-control-grid-header-cell-font-weight'
|
|
48
|
+
: '--ibiz-control-grid-header-cell-font-style';
|
|
49
49
|
result.vars[key] = grid_header_fontstyle;
|
|
50
50
|
}
|
|
51
51
|
if (grid_body_fontstyle) {
|
|
52
52
|
const key =
|
|
53
53
|
grid_body_fontstyle === 'bold'
|
|
54
|
-
? '--ibiz-control-grid-
|
|
55
|
-
: '--ibiz-control-grid-
|
|
54
|
+
? '--ibiz-control-grid-body-cell-font-weight'
|
|
55
|
+
: '--ibiz-control-grid-body-cell-font-style';
|
|
56
56
|
result.vars[key] = grid_body_fontstyle;
|
|
57
57
|
}
|
|
58
58
|
if (grid_show_agg == '1') {
|
|
@@ -255,8 +255,8 @@ export class TreeController<
|
|
|
255
255
|
};
|
|
256
256
|
if (this.viewScheduler.hasViewEventTrigger) {
|
|
257
257
|
// 监听视图事件触发视图事件触发器
|
|
258
|
-
this.evt.onAll((_eventName, event) => {
|
|
259
|
-
this.viewScheduler!.triggerViewEvent(event);
|
|
258
|
+
this.evt.onAll(async (_eventName, event) => {
|
|
259
|
+
await this.viewScheduler!.triggerViewEvent(event);
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
262
|
}
|
|
@@ -1493,13 +1493,12 @@ export class TreeController<
|
|
|
1493
1493
|
},
|
|
1494
1494
|
);
|
|
1495
1495
|
|
|
1496
|
-
if (result === -1)
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
);
|
|
1496
|
+
if (result === -1) {
|
|
1497
|
+
ibiz.log.error(ibiz.i18n.t('runtime.engine.logicOpendata'));
|
|
1498
|
+
return {
|
|
1499
|
+
cancel: true,
|
|
1500
|
+
};
|
|
1501
|
+
}
|
|
1503
1502
|
|
|
1504
1503
|
return {
|
|
1505
1504
|
cancel: result ? !result.ok : true,
|
|
@@ -1537,13 +1536,12 @@ export class TreeController<
|
|
|
1537
1536
|
},
|
|
1538
1537
|
);
|
|
1539
1538
|
|
|
1540
|
-
if (result === -1)
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
);
|
|
1539
|
+
if (result === -1) {
|
|
1540
|
+
ibiz.log.error(ibiz.i18n.t('runtime.engine.logicNewdata'));
|
|
1541
|
+
return {
|
|
1542
|
+
cancel: true,
|
|
1543
|
+
};
|
|
1544
|
+
}
|
|
1547
1545
|
|
|
1548
1546
|
return {
|
|
1549
1547
|
cancel: result ? !result.ok : true,
|
|
@@ -332,21 +332,20 @@ export class MDViewEngine extends ViewEngineBase {
|
|
|
332
332
|
});
|
|
333
333
|
|
|
334
334
|
if (result === -1) {
|
|
335
|
-
|
|
336
|
-
this.view.model,
|
|
337
|
-
ibiz.i18n.t('runtime.engine.logicOpendata'),
|
|
338
|
-
);
|
|
339
|
-
} else {
|
|
340
|
-
if (result && result.ok && result.data && result.data.length > 0) {
|
|
341
|
-
this.view.evt.emit('onDataChange', {
|
|
342
|
-
data: result.data,
|
|
343
|
-
actionType: 'EDIT',
|
|
344
|
-
});
|
|
345
|
-
}
|
|
335
|
+
ibiz.log.error(ibiz.i18n.t('runtime.engine.logicOpendata'));
|
|
346
336
|
return {
|
|
347
|
-
cancel:
|
|
337
|
+
cancel: true,
|
|
348
338
|
};
|
|
349
339
|
}
|
|
340
|
+
if (result && result.ok && result.data && result.data.length > 0) {
|
|
341
|
+
this.view.evt.emit('onDataChange', {
|
|
342
|
+
data: result.data,
|
|
343
|
+
actionType: 'EDIT',
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
return {
|
|
347
|
+
cancel: result ? !result.ok : true,
|
|
348
|
+
};
|
|
350
349
|
}
|
|
351
350
|
|
|
352
351
|
/**
|
|
@@ -393,21 +392,20 @@ export class MDViewEngine extends ViewEngineBase {
|
|
|
393
392
|
});
|
|
394
393
|
|
|
395
394
|
if (result === -1) {
|
|
396
|
-
|
|
397
|
-
this.view.model,
|
|
398
|
-
ibiz.i18n.t('runtime.engine.logicNewdata'),
|
|
399
|
-
);
|
|
400
|
-
} else {
|
|
401
|
-
if (result.ok && result.data && result.data.length > 0) {
|
|
402
|
-
this.view.evt.emit('onDataChange', {
|
|
403
|
-
data: result.data,
|
|
404
|
-
actionType: 'NEW',
|
|
405
|
-
});
|
|
406
|
-
}
|
|
395
|
+
ibiz.log.error(ibiz.i18n.t('runtime.engine.logicNewdata'));
|
|
407
396
|
return {
|
|
408
|
-
cancel:
|
|
397
|
+
cancel: true,
|
|
409
398
|
};
|
|
410
399
|
}
|
|
400
|
+
if (result.ok && result.data && result.data.length > 0) {
|
|
401
|
+
this.view.evt.emit('onDataChange', {
|
|
402
|
+
data: result.data,
|
|
403
|
+
actionType: 'NEW',
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
return {
|
|
407
|
+
cancel: result ? !result.ok : true,
|
|
408
|
+
};
|
|
411
409
|
}
|
|
412
410
|
|
|
413
411
|
/**
|
|
@@ -231,4 +231,14 @@ export interface IApiGlobalCommonConfig {
|
|
|
231
231
|
* @memberof IApiGlobalCommonConfig
|
|
232
232
|
*/
|
|
233
233
|
counterMaxValue: number;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* @description 是否启用增强UI,非兼容性功能增强开关
|
|
237
|
+
* @type {boolean}
|
|
238
|
+
* @default false
|
|
239
|
+
* @platform web
|
|
240
|
+
* @platform mob
|
|
241
|
+
* @memberof IApiGlobalCommonConfig
|
|
242
|
+
*/
|
|
243
|
+
enhancedUI: boolean;
|
|
234
244
|
}
|
|
@@ -31,6 +31,15 @@ export interface IApiGlobalGridConfig {
|
|
|
31
31
|
*/
|
|
32
32
|
saveErrorHandleMode: 'default' | 'reset';
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* @description 表格列对齐方式
|
|
36
|
+
* @type {('left' | 'center' | 'right')}
|
|
37
|
+
* @default center
|
|
38
|
+
* @platform web
|
|
39
|
+
* @memberof IApiGlobalGridConfig
|
|
40
|
+
*/
|
|
41
|
+
columnAlign: 'left' | 'center' | 'right';
|
|
42
|
+
|
|
34
43
|
/**
|
|
35
44
|
* @description 单元格超出呈现模式,wrap 换行,高度自动增高;ellipsis 省略,出...,悬浮出tooltip
|
|
36
45
|
* @type {('wrap' | 'ellipsis')}
|
|
@@ -33,4 +33,11 @@ export interface IApiFormItemState extends IApiFormDetailState {
|
|
|
33
33
|
* @memberof IApiFormItemState
|
|
34
34
|
*/
|
|
35
35
|
inputTipUrl: string | undefined;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @description 编辑器类名集合
|
|
39
|
+
* @type {(string[])}
|
|
40
|
+
* @memberof IApiFormItemState
|
|
41
|
+
*/
|
|
42
|
+
editorClass: string[];
|
|
36
43
|
}
|
|
@@ -22,7 +22,7 @@ export class AppDEUIActionExecutor extends LogicExecutor {
|
|
|
22
22
|
ibiz.i18n.t('runtime.logicScheduler.executor.missingTrigger'),
|
|
23
23
|
);
|
|
24
24
|
}
|
|
25
|
-
UIActionUtil.execAndResolved(
|
|
25
|
+
return UIActionUtil.execAndResolved(
|
|
26
26
|
this.logic.appDEUIActionId,
|
|
27
27
|
executeParams,
|
|
28
28
|
this.logic.appId,
|